wifi: mac80211: fix AddBA response addressing
authorJohannes Berg <johannes.berg@intel.com>
Fri, 16 Sep 2022 17:15:52 +0000 (19:15 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 7 Oct 2022 13:24:11 +0000 (15:24 +0200)
Since this frame is addressed from/to an MLD, it should be
built with the correct AP MLD address (in station mode) to
be encrypted properly.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/agg-rx.c

index 9414d3bbd65f647372dee157cc88dd345d028979..eaef88a603e54a9b005f46753ab274d0c5199a97 100644 (file)
@@ -242,7 +242,7 @@ static void ieee80211_send_addba_resp(struct sta_info *sta, u8 *da, u16 tid,
            sdata->vif.type == NL80211_IFTYPE_MESH_POINT)
                memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
        else if (sdata->vif.type == NL80211_IFTYPE_STATION)
-               memcpy(mgmt->bssid, sdata->deflink.u.mgd.bssid, ETH_ALEN);
+               memcpy(mgmt->bssid, sdata->vif.cfg.ap_addr, ETH_ALEN);
        else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
                memcpy(mgmt->bssid, sdata->u.ibss.bssid, ETH_ALEN);