On 8/27/2023 7:05 PM, gregory.greenman@xxxxxxxxx wrote:
[...]
@@ -7218,6 +7217,19 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
if (err)
goto err_clear;
+ if (req->link_id > 0)
+ link = sdata_dereference(sdata->link[req->link_id], sdata);
+ else
+ link = sdata_dereference(sdata->link[0], sdata);
+
req->link_id >= 0 means MLD.
For non-MLD, req->link_id < 0, is it better to use sdata->deflink for non-MLD?
Is sdata->link[0] always pointer to sdata->deflink for non-MLD?
It has a comment for deflink of struct ieee80211_sta, but no comment for deflink
of struct ieee80211_sub_if_data.
+ if (WARN_ON(!link)) {
+ err = -ENOLINK;
+ goto err_clear;
+ }
+
+ sdata_info(sdata, "authenticate with %pM (local address=%pM)\n",
+ auth_data->ap_addr, link->conf->addr);
+
err = ieee80211_auth(sdata);
if (err) {
sta_info_destroy_addr(sdata, auth_data->ap_addr);