aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-07-15 15:37:23 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-07-22 14:27:41 +0200
commit8a9be422f5ff34ec7abec289c6fe862d9e7864d2 (patch)
tree2c070a18fd4fcc8fbf9524107f4001a84707dcd2 /net/mac80211/mlme.c
parentwifi: wl1251: fix repeated words in comments (diff)
downloadlinux-dev-8a9be422f5ff34ec7abec289c6fe862d9e7864d2.tar.xz
linux-dev-8a9be422f5ff34ec7abec289c6fe862d9e7864d2.zip
wifi: mac80211: tx: use AP address in some places for MLO
In a few places we need to use the AP (MLD) address, not the deflink BSSID, the link address translation will happen later. To make that work properly for fast-xmit, set up the ap_addr in the vif.cfg earlier. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 912095e4e256..ee1a72519c15 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2743,8 +2743,6 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata,
changed[link_id] |= ieee80211_link_set_associated(link, cbss);
}
- memcpy(sdata->vif.cfg.ap_addr, assoc_data->ap_addr, ETH_ALEN);
-
/* just to be sure */
ieee80211_stop_poll(sdata);
@@ -4893,6 +4891,9 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
sta->sta.wme = (elems->wmm_param || elems->s1g_capab) &&
local->hw.queues >= IEEE80211_NUM_ACS;
+ /* needed for fast-xmit setup in sta_info_move_state() */
+ memcpy(sdata->vif.cfg.ap_addr, assoc_data->ap_addr, ETH_ALEN);
+
err = sta_info_move_state(sta, IEEE80211_STA_ASSOC);
if (!err && !(ifmgd->flags & IEEE80211_STA_CONTROL_PORT))
err = sta_info_move_state(sta, IEEE80211_STA_AUTHORIZED);
@@ -4927,6 +4928,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
return true;
out_err:
+ eth_zero_addr(sdata->vif.cfg.ap_addr);
mutex_unlock(&sdata->local->sta_mtx);
return false;
}