AP MLD: Request Handle OBSS scan for a specific link

OBSS scan can be required in different links if operating as an AP MLD.
When triggering scan, specify the link ID for the driver to find the
correct link to scan.

Signed-off-by: Chenming Huang <quic_chenhuan@quicinc.com>
This commit is contained in:
Chenming Huang 2024-01-25 13:53:03 +05:30 committed by Jouni Malinen
parent c9ad16870b
commit d5e6f79988
4 changed files with 25 additions and 0 deletions

View file

@ -506,6 +506,12 @@ static void ap_ht40_scan_retry(void *eloop_data, void *user_data)
else
ieee80211n_scan_channels_5g(iface, &params);
params.link_id = -1;
#ifdef CONFIG_IEEE80211BE
if (iface->bss[0]->conf->mld_ap)
params.link_id = iface->bss[0]->mld_link_id;
#endif /* CONFIG_IEEE80211BE */
ret = hostapd_driver_scan(iface->bss[0], &params);
iface->num_ht40_scan_tries++;
os_free(params.freqs);
@ -557,6 +563,11 @@ static int ieee80211n_check_40mhz(struct hostapd_iface *iface)
else
ieee80211n_scan_channels_5g(iface, &params);
params.link_id = -1;
#ifdef CONFIG_IEEE80211BE
if (iface->bss[0]->conf->mld_ap)
params.link_id = iface->bss[0]->mld_link_id;
#endif /* CONFIG_IEEE80211BE */
ret = hostapd_driver_scan(iface->bss[0], &params);
os_free(params.freqs);

View file

@ -701,6 +701,14 @@ struct wpa_driver_scan_params {
*/
unsigned int min_probe_req_content:1;
/**
* link_id - Specify the link that is requesting the scan on an MLD
*
* This is set when operating as an AP MLD and doing an OBSS scan.
* -1 indicates that no particular link ID is set.
*/
s8 link_id;
/*
* NOTE: Whenever adding new parameters here, please make sure
* wpa_scan_clone_params() and wpa_scan_free_params() get updated with

View file

@ -1275,6 +1275,11 @@ int wpa_driver_nl80211_vendor_scan(struct i802_bss *bss,
goto fail;
}
if (is_ap_interface(drv->nlmode) &&
params->link_id != NL80211_DRV_LINK_ID_NA &&
nla_put_u8(msg, QCA_WLAN_VENDOR_ATTR_SCAN_LINK_ID, params->link_id))
goto fail;
nla_nest_end(msg, attr);
ret = send_and_recv_resp(drv, msg, scan_cookie_handler, &cookie);

View file

@ -3351,6 +3351,7 @@ wpa_scan_clone_params(const struct wpa_driver_scan_params *src)
params->duration = src->duration;
params->duration_mandatory = src->duration_mandatory;
params->oce_scan = src->oce_scan;
params->link_id = src->link_id;
if (src->sched_scan_plans_num > 0) {
params->sched_scan_plans =