wifi: mac80211: mlme: set sta.mlo to mlo state
authorJohannes Berg <johannes.berg@intel.com>
Mon, 18 Jul 2022 14:04:05 +0000 (16:04 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 22 Jul 2022 12:27:59 +0000 (14:27 +0200)
At this point, we've already changed link_id to be zero for
a non-MLO connection, so use the 'mlo' variable rather than
link ID to determine the MLO status of the station.

Fixes: bd363ee53302 ("wifi: mac80211: mlme: set sta.mlo correctly")
Fixes: 81151ce462e5 ("wifi: mac80211: support MLO authentication/association with one link")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/mlme.c

index 2d389e7..1ced0a4 100644 (file)
@@ -6393,7 +6393,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
        }
 
        if (!have_sta) {
-               if (link_id >= 0)
+               if (mlo)
                        new_sta = sta_info_alloc_with_link(sdata, ap_mld_addr,
                                                           link_id, cbss->bssid,
                                                           GFP_KERNEL);
@@ -6405,7 +6405,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata,
                        goto out_err;
                }
 
-               new_sta->sta.mlo = link_id >= 0;
+               new_sta->sta.mlo = mlo;
        }
 
        /*