]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP MLD: Find the link that is waiting for scan events
authorChenming Huang <quic_chenhuan@quicinc.com>
Tue, 20 Feb 2024 06:25:09 +0000 (11:55 +0530)
committerJouni Malinen <j@w1.fi>
Fri, 12 Apr 2024 07:23:27 +0000 (10:23 +0300)
In AP MLD case, HT scan results need to be handled in the link that
triggered this scan. So find the link that has a valid scan_cb to handle
EVENT_SCAN_RESULTS.

Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
src/ap/drv_callbacks.c

index 2d32069091a9442a2dfdf08ed285cae73af838c4..6ee62b0e87877796b91b8f9be92427e5d803ca23 100644 (file)
@@ -2374,6 +2374,22 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
        case EVENT_SCAN_RESULTS:
                if (hapd->iface->scan_cb)
                        hapd->iface->scan_cb(hapd->iface);
+#ifdef CONFIG_IEEE80211BE
+               if (!hapd->iface->scan_cb && hapd->conf->mld_ap) {
+                       /* Other links may be waiting for HT scan result */
+                       unsigned int i;
+
+                       for (i = 0; i < hapd->iface->interfaces->count; i++) {
+                               struct hostapd_iface *h =
+                                       hapd->iface->interfaces->iface[i];
+                               struct hostapd_data *h_hapd = h->bss[0];
+
+                               if (hostapd_is_ml_partner(hapd, h_hapd) &&
+                                   h_hapd->iface->scan_cb)
+                                       h_hapd->iface->scan_cb(h_hapd->iface);
+                       }
+               }
+#endif /* CONFIG_IEEE80211BE */
                break;
        case EVENT_WPS_BUTTON_PUSHED:
                hostapd_wps_button_pushed(hapd, NULL);