]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Fix wrong requested links bitmap in sta_mlo_info.req_links
authorVeerendranath Jakkam <quic_vjakkam@quicinc.com>
Mon, 21 Nov 2022 06:33:14 +0000 (12:03 +0530)
committerJouni Malinen <j@w1.fi>
Mon, 21 Nov 2022 16:31:02 +0000 (18:31 +0200)
Currently sta_mlo_info.req_links is not getting cleared before
populating the requested links information for a new connection/roam
event. This is causing wrong requested links bitmap in
sta_mlo_info.req_links if there is a change in requested link IDs
between the previous and the new connection. To avoid such issues fully
clear MLO connection information after disconnection and before
populating MLO connection information during (re)association event.

Fixes: cc2236299f99 ("nl80211: Get all requested MLO links information from (re)association events")
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
src/drivers/driver_nl80211.c
src/drivers/driver_nl80211_event.c

index 182f3334dbb923e02d222314957e6f7196eaf4d8..86d5dd862aebcc615e8a27b9dce54687dcfdbaf8 100644 (file)
@@ -271,7 +271,7 @@ void nl80211_mark_disconnected(struct wpa_driver_nl80211_data *drv)
        if (drv->associated)
                os_memcpy(drv->prev_bssid, drv->bssid, ETH_ALEN);
        drv->associated = 0;
-       drv->sta_mlo_info.valid_links = 0;
+       os_memset(&drv->sta_mlo_info, 0, sizeof(drv->sta_mlo_info));
        os_memset(drv->bssid, 0, ETH_ALEN);
        drv->first_bss->freq = 0;
 #ifdef CONFIG_DRIVER_NL80211_QCA
index 14d1db6e1e5f8a48392bad1329e34f45629b3dc8..619670980f4ce628efc07694a04ea622e3056dda 100644 (file)
@@ -814,7 +814,7 @@ static void mlme_event_connect(struct wpa_driver_nl80211_data *drv,
        }
 
        drv->associated = 1;
-       drv->sta_mlo_info.valid_links = 0;
+       os_memset(&drv->sta_mlo_info, 0, sizeof(drv->sta_mlo_info));
        nl80211_parse_mlo_info(drv, qca_roam_auth, addr, mlo_links, req_ie,
                               resp_ie);
        if (!drv->sta_mlo_info.valid_links && addr) {