scan: Include AP MLD ID in ML probe request if needed
According to IEEE P802.11be/D4.0, 35.3.4.2, the AP MLD ID must be included in the Probe Request ML element in case it is sent to a transmitted BSS in which case it should be set to 0. If it is sent to an non-transmitted BSSID, the AP MLD ID should not be included. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
parent
d64ec94140
commit
b29ac99d52
4 changed files with 26 additions and 6 deletions
|
@ -1571,6 +1571,7 @@ wpa_bss_parse_ml_rnr_ap_info(struct wpa_supplicant *wpa_s,
|
||||||
* should be initialized and #MAX_NUM_MLD_LINKS elements long
|
* should be initialized and #MAX_NUM_MLD_LINKS elements long
|
||||||
* @missing_links: Result bitmask of links that were not discovered (or %NULL)
|
* @missing_links: Result bitmask of links that were not discovered (or %NULL)
|
||||||
* @ssid: Target SSID (or %NULL)
|
* @ssid: Target SSID (or %NULL)
|
||||||
|
* @ap_mld_id: On return would hold the corresponding AP MLD ID (or %NULL)
|
||||||
* Returns: 0 on success or -1 for non-MLD or parsing failures
|
* Returns: 0 on success or -1 for non-MLD or parsing failures
|
||||||
*
|
*
|
||||||
* Parses the Basic Multi-Link element of the BSS into @link_info using the scan
|
* Parses the Basic Multi-Link element of the BSS into @link_info using the scan
|
||||||
|
@ -1582,7 +1583,8 @@ int wpa_bss_parse_basic_ml_element(struct wpa_supplicant *wpa_s,
|
||||||
struct wpa_bss *bss,
|
struct wpa_bss *bss,
|
||||||
u8 *ap_mld_addr,
|
u8 *ap_mld_addr,
|
||||||
u16 *missing_links,
|
u16 *missing_links,
|
||||||
struct wpa_ssid *ssid)
|
struct wpa_ssid *ssid,
|
||||||
|
u8 *ap_mld_id)
|
||||||
{
|
{
|
||||||
struct ieee802_11_elems elems;
|
struct ieee802_11_elems elems;
|
||||||
struct wpabuf *mlbuf;
|
struct wpabuf *mlbuf;
|
||||||
|
@ -1747,6 +1749,9 @@ int wpa_bss_parse_basic_ml_element(struct wpa_supplicant *wpa_s,
|
||||||
if (missing_links)
|
if (missing_links)
|
||||||
*missing_links = missing;
|
*missing_links = missing;
|
||||||
|
|
||||||
|
if (ap_mld_id)
|
||||||
|
*ap_mld_id = mbssid_idx;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
out:
|
out:
|
||||||
wpabuf_free(mlbuf);
|
wpabuf_free(mlbuf);
|
||||||
|
|
|
@ -216,7 +216,8 @@ int wpa_bss_parse_basic_ml_element(struct wpa_supplicant *wpa_s,
|
||||||
struct wpa_bss *bss,
|
struct wpa_bss *bss,
|
||||||
u8 *ap_mld_addr,
|
u8 *ap_mld_addr,
|
||||||
u16 *missing_links,
|
u16 *missing_links,
|
||||||
struct wpa_ssid *ssid);
|
struct wpa_ssid *ssid,
|
||||||
|
u8 *ap_mld_id);
|
||||||
u16 wpa_bss_parse_reconf_ml_element(struct wpa_supplicant *wpa_s,
|
u16 wpa_bss_parse_reconf_ml_element(struct wpa_supplicant *wpa_s,
|
||||||
struct wpa_bss *bss);
|
struct wpa_bss *bss);
|
||||||
|
|
||||||
|
|
|
@ -1153,7 +1153,7 @@ static bool wpas_valid_ml_bss(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
|
||||||
{
|
{
|
||||||
u16 removed_links;
|
u16 removed_links;
|
||||||
|
|
||||||
if (wpa_bss_parse_basic_ml_element(wpa_s, bss, NULL, NULL, NULL))
|
if (wpa_bss_parse_basic_ml_element(wpa_s, bss, NULL, NULL, NULL, NULL))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (bss->n_mld_links == 0)
|
if (bss->n_mld_links == 0)
|
||||||
|
@ -1871,6 +1871,7 @@ static int wpa_supplicant_connect_ml_missing(struct wpa_supplicant *wpa_s,
|
||||||
{
|
{
|
||||||
int *freqs;
|
int *freqs;
|
||||||
u16 missing_links = 0, removed_links;
|
u16 missing_links = 0, removed_links;
|
||||||
|
u8 ap_mld_id;
|
||||||
|
|
||||||
if (!((wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_MLO) &&
|
if (!((wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_MLO) &&
|
||||||
(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)))
|
(wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)))
|
||||||
|
@ -1878,7 +1879,8 @@ static int wpa_supplicant_connect_ml_missing(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
/* Try to resolve any missing link information */
|
/* Try to resolve any missing link information */
|
||||||
if (wpa_bss_parse_basic_ml_element(wpa_s, selected, NULL,
|
if (wpa_bss_parse_basic_ml_element(wpa_s, selected, NULL,
|
||||||
&missing_links, ssid) ||
|
&missing_links, ssid,
|
||||||
|
&ap_mld_id) ||
|
||||||
!missing_links)
|
!missing_links)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -1910,7 +1912,19 @@ static int wpa_supplicant_connect_ml_missing(struct wpa_supplicant *wpa_s,
|
||||||
wpa_s->manual_scan_freqs = freqs;
|
wpa_s->manual_scan_freqs = freqs;
|
||||||
|
|
||||||
os_memcpy(wpa_s->ml_probe_bssid, selected->bssid, ETH_ALEN);
|
os_memcpy(wpa_s->ml_probe_bssid, selected->bssid, ETH_ALEN);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* In case the ML probe request is intended to retrieve information from
|
||||||
|
* the transmitted BSS, the AP MLD ID should be included and should be
|
||||||
|
* set to zero.
|
||||||
|
* In case the ML probe requested is intended to retrieve information
|
||||||
|
* from a non-transmitted BSS, the AP MLD ID should not be included.
|
||||||
|
*/
|
||||||
|
if (ap_mld_id)
|
||||||
wpa_s->ml_probe_mld_id = -1;
|
wpa_s->ml_probe_mld_id = -1;
|
||||||
|
else
|
||||||
|
wpa_s->ml_probe_mld_id = 0;
|
||||||
|
|
||||||
wpa_s->ml_probe_links = missing_links;
|
wpa_s->ml_probe_links = missing_links;
|
||||||
|
|
||||||
wpa_s->normal_scans = 0;
|
wpa_s->normal_scans = 0;
|
||||||
|
|
|
@ -575,7 +575,7 @@ static void sme_send_authentication(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
if ((wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_MLO) &&
|
if ((wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_MLO) &&
|
||||||
!wpa_bss_parse_basic_ml_element(wpa_s, bss, wpa_s->ap_mld_addr,
|
!wpa_bss_parse_basic_ml_element(wpa_s, bss, wpa_s->ap_mld_addr,
|
||||||
NULL, ssid) &&
|
NULL, ssid, NULL) &&
|
||||||
bss->n_mld_links) {
|
bss->n_mld_links) {
|
||||||
wpa_printf(MSG_DEBUG, "MLD: In authentication");
|
wpa_printf(MSG_DEBUG, "MLD: In authentication");
|
||||||
wpas_sme_set_mlo_links(wpa_s, bss);
|
wpas_sme_set_mlo_links(wpa_s, bss);
|
||||||
|
|
Loading…
Reference in a new issue