]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Update port authorized indication for MLO address
authorVinayak Yadawad <vinayak.yadawad@broadcom.com>
Mon, 20 Nov 2023 12:39:33 +0000 (18:09 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 24 Nov 2023 16:49:01 +0000 (18:49 +0200)
Handling of port authorized event for STA currently handles the
connected BSSID. This needs additional handling to support the AP MLD
address in case of MLO connection. The connected_addr expected by
cfg80211_port_authorized() is mld_addr for ML connection case.

Signed-off-by: Vinayak Yadawad <vinayak.yadawad@broadcom.com>
src/drivers/driver_nl80211_event.c

index 0091032e5501ac8979f54e0a12063ac8f783366e..b3daf546f7d6452ace344d257a3f62b17aa5fdaa 100644 (file)
@@ -3511,13 +3511,19 @@ static void nl80211_port_authorized(struct wpa_driver_nl80211_data *drv,
                wpa_printf(MSG_DEBUG,
                           "nl80211: Port authorized for STA addr "  MACSTR,
                        MAC2STR(addr));
-       } else if (is_sta_interface(drv->nlmode) &&
-                  os_memcmp(addr, drv->bssid, ETH_ALEN) != 0) {
-               wpa_printf(MSG_DEBUG,
-                          "nl80211: Ignore port authorized event for " MACSTR
-                          " (not the currently connected BSSID " MACSTR ")",
-                          MAC2STR(addr), MAC2STR(drv->bssid));
-               return;
+       } else if (is_sta_interface(drv->nlmode)) {
+               const u8 *connected_addr;
+
+               connected_addr = drv->sta_mlo_info.valid_links ?
+                       drv->sta_mlo_info.ap_mld_addr : drv->bssid;
+               if (os_memcmp(addr, connected_addr, ETH_ALEN) != 0) {
+                       wpa_printf(MSG_DEBUG,
+                                  "nl80211: Ignore port authorized event for "
+                                  MACSTR " (not the currently connected BSSID "
+                                  MACSTR ")",
+                                  MAC2STR(addr), MAC2STR(connected_addr));
+                       return;
+               }
        }
 
        if (tb[NL80211_ATTR_TD_BITMAP]) {