Define new BSS command info mask for AP MLD address

The ap_mld_addr entry was added without introducing a new mask bit which
does not follow the expected style for adding new information into the
BSS command and might result in unexpected behavior for external
components. Define a new BSS command information mask bit for this AP
MLD address and print the AP MLD address in the BSS info only if the
mask bit is set.

Fixes: db99e7341a ("Add AP MLD address into BSS command output")
Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
Kiran Kumar Lokere 2023-08-23 12:40:53 -07:00 committed by Jouni Malinen
parent 770e5a808f
commit 377d617b57
2 changed files with 3 additions and 1 deletions

View file

@ -473,6 +473,7 @@ extern "C" {
#define WPA_BSS_MASK_FILS_INDICATION BIT(24)
#define WPA_BSS_MASK_RNR BIT(25)
#define WPA_BSS_MASK_ML BIT(26)
#define WPA_BSS_MASK_AP_MLD_ADDR BIT(27)
/* VENDOR_ELEM_* frame id values */

View file

@ -5686,7 +5686,8 @@ static int print_bss_info(struct wpa_supplicant *wpa_s, struct wpa_bss *bss,
}
#endif /* CONFIG_FILS */
if (!is_zero_ether_addr(bss->mld_addr)) {
if (!is_zero_ether_addr(bss->mld_addr) &&
(mask & WPA_BSS_MASK_AP_MLD_ADDR)) {
ret = os_snprintf(pos, end - pos,
"ap_mld_addr=" MACSTR "\n",
MAC2STR(bss->mld_addr));