]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Handle scan results with MLD connection
authorIlan Peer <ilan.peer@intel.com>
Wed, 30 Nov 2022 13:09:35 +0000 (15:09 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 3 Dec 2022 15:27:54 +0000 (17:27 +0200)
With an MLD connection the BSSID reported in the association
event is the MLD AP address, while the association state reported
in the scan results relates to the MLD AP specific link. In such a
case do not disconnect.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
src/drivers/driver_nl80211_scan.c

index d54dd3a33e7980d16a1d36ee42ac3553a039cbd8..7a7890c71e8fa8d76a88acc730f85a25a3d9bb1c 100644 (file)
@@ -911,8 +911,21 @@ static void nl80211_check_bss_status(struct wpa_driver_nl80211_data *drv,
                           "nl80211: Local state (associated with " MACSTR
                           ") does not match with BSS state",
                           MAC2STR(drv->bssid));
-               clear_state_mismatch(drv, r->bssid);
-               clear_state_mismatch(drv, drv->bssid);
+
+               if (os_memcmp(drv->sta_mlo_info.ap_mld_addr, drv->bssid,
+                             ETH_ALEN) != 0) {
+                       clear_state_mismatch(drv, r->bssid);
+
+                       if (!is_zero_ether_addr(drv->sta_mlo_info.ap_mld_addr))
+                               clear_state_mismatch(
+                                       drv, drv->sta_mlo_info.ap_mld_addr);
+                       else
+                               clear_state_mismatch(drv, drv->bssid);
+
+               } else {
+                       wpa_printf(MSG_DEBUG,
+                                  "nl80211: BSSID is the MLD address");
+               }
        }
 }