wpa_supplicant: Make valid_links u16

MAX_NUM_MLD_LINKS is 15, thus u8 isn't enough for the bitmap. Fix it.
While at it, clean MLO information better.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
This commit is contained in:
Andrei Otcheretianski 2022-11-30 15:09:30 +02:00 committed by Jouni Malinen
parent a2c4c0b1b6
commit 32b7454485
2 changed files with 5 additions and 6 deletions

View file

@ -310,14 +310,13 @@ void wpa_supplicant_stop_countermeasures(void *eloop_ctx, void *sock_ctx)
static void wpas_reset_mlo_info(struct wpa_supplicant *wpa_s) static void wpas_reset_mlo_info(struct wpa_supplicant *wpa_s)
{ {
int i;
if (!wpa_s->valid_links) if (!wpa_s->valid_links)
return; return;
wpa_s->valid_links = 0; wpa_s->valid_links = 0;
for (i = 0; i < MAX_NUM_MLD_LINKS; i++) wpa_s->mlo_assoc_link_id = 0;
wpa_s->links[i].bss = NULL; os_memset(wpa_s->ap_mld_addr, 0, ETH_ALEN);
os_memset(wpa_s->links, 0, sizeof(wpa_s->links));
} }

View file

@ -687,8 +687,8 @@ struct wpa_supplicant {
unsigned int assoc_freq; unsigned int assoc_freq;
u8 ap_mld_addr[ETH_ALEN]; u8 ap_mld_addr[ETH_ALEN];
u8 mlo_assoc_link_id; u8 mlo_assoc_link_id;
u8 valid_links; /* bitmap of valid MLO link IDs */ u16 valid_links; /* bitmap of valid MLO link IDs */
struct { struct ml_sta_link_info {
u8 addr[ETH_ALEN]; u8 addr[ETH_ALEN];
u8 bssid[ETH_ALEN]; u8 bssid[ETH_ALEN];
unsigned int freq; unsigned int freq;