From 2e40f969b137e34c12a0556a4c0ca551f1929da0 Mon Sep 17 00:00:00 2001 From: Veerendranath Jakkam Date: Mon, 21 Nov 2022 12:03:14 +0530 Subject: [PATCH] nl80211: Fix wrong requested links bitmap in sta_mlo_info.req_links 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 --- src/drivers/driver_nl80211.c | 2 +- src/drivers/driver_nl80211_event.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c index 182f3334d..86d5dd862 100644 --- a/src/drivers/driver_nl80211.c +++ b/src/drivers/driver_nl80211.c @@ -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 diff --git a/src/drivers/driver_nl80211_event.c b/src/drivers/driver_nl80211_event.c index 14d1db6e1..619670980 100644 --- a/src/drivers/driver_nl80211_event.c +++ b/src/drivers/driver_nl80211_event.c @@ -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) { -- 2.47.2