WNM: Store whether disassociation address is an MLD MAC address
Commit 17a2aa822c
("WNM: Follow BTM procedure if the last link is
dropped") added code to store either the MLD MAC address or BSSID when
being disassociated. However, it did not save which one was stored
making the tests later on awkward.
Store whether it was an MLD MAC address or not and then do the test
accordingly.
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
This commit is contained in:
parent
63ac001ed2
commit
93eb3b83c6
2 changed files with 9 additions and 5 deletions
|
@ -1495,12 +1495,17 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s,
|
||||||
/* The last link is being removed (which must be the assoc link)
|
/* The last link is being removed (which must be the assoc link)
|
||||||
*/
|
*/
|
||||||
wpa_s->wnm_link_removal = true;
|
wpa_s->wnm_link_removal = true;
|
||||||
|
wpa_s->wnm_disassoc_mld = false;
|
||||||
os_memcpy(wpa_s->wnm_dissoc_addr,
|
os_memcpy(wpa_s->wnm_dissoc_addr,
|
||||||
wpa_s->links[wpa_s->mlo_assoc_link_id].bssid,
|
wpa_s->links[wpa_s->mlo_assoc_link_id].bssid,
|
||||||
ETH_ALEN);
|
ETH_ALEN);
|
||||||
|
} else if (wpa_s->valid_links) {
|
||||||
|
wpa_s->wnm_disassoc_mld = true;
|
||||||
|
os_memcpy(wpa_s->wnm_dissoc_addr, wpa_s->ap_mld_addr,
|
||||||
|
ETH_ALEN);
|
||||||
} else {
|
} else {
|
||||||
os_memcpy(wpa_s->wnm_dissoc_addr, wpa_s->valid_links ?
|
wpa_s->wnm_disassoc_mld = false;
|
||||||
wpa_s->ap_mld_addr : wpa_s->bssid, ETH_ALEN);
|
os_memcpy(wpa_s->wnm_dissoc_addr, wpa_s->bssid, ETH_ALEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disassoc_imminent) {
|
if (disassoc_imminent) {
|
||||||
|
@ -2066,9 +2071,7 @@ bool wnm_is_bss_excluded(struct wpa_supplicant *wpa_s, struct wpa_bss *bss)
|
||||||
* In case disassociation imminent is set, do no try to use a BSS to
|
* In case disassociation imminent is set, do no try to use a BSS to
|
||||||
* which we are connected.
|
* which we are connected.
|
||||||
*/
|
*/
|
||||||
if (wpa_s->wnm_link_removal ||
|
if (!wpa_s->wnm_disassoc_mld) {
|
||||||
!(wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_MLO) ||
|
|
||||||
is_zero_ether_addr(bss->mld_addr)) {
|
|
||||||
if (ether_addr_equal(bss->bssid, wpa_s->wnm_dissoc_addr))
|
if (ether_addr_equal(bss->bssid, wpa_s->wnm_dissoc_addr))
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1308,6 +1308,7 @@ struct wpa_supplicant {
|
||||||
u8 wnm_num_neighbor_report;
|
u8 wnm_num_neighbor_report;
|
||||||
u8 wnm_mode;
|
u8 wnm_mode;
|
||||||
bool wnm_link_removal;
|
bool wnm_link_removal;
|
||||||
|
bool wnm_disassoc_mld;
|
||||||
u8 wnm_dissoc_addr[ETH_ALEN];
|
u8 wnm_dissoc_addr[ETH_ALEN];
|
||||||
u16 wnm_dissoc_timer;
|
u16 wnm_dissoc_timer;
|
||||||
u8 wnm_bss_termination_duration[12];
|
u8 wnm_bss_termination_duration[12];
|
||||||
|
|
Loading…
Reference in a new issue