From: Chenming Huang Date: Tue, 20 Feb 2024 06:25:09 +0000 (+0530) Subject: AP MLD: Find the link that is waiting for scan events X-Git-Tag: hostap_2_11~216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b682e72d9d1db170aaf81ca56cea12b5d1712a5;p=thirdparty%2Fhostap.git AP MLD: Find the link that is waiting for scan events 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 --- diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c index 2d3206909..6ee62b0e8 100644 --- a/src/ap/drv_callbacks.c +++ b/src/ap/drv_callbacks.c @@ -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);