]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
AP mode indication of Beacon protection being enabled
authorJouni Malinen <jouni@codeaurora.org>
Mon, 17 Feb 2020 20:55:12 +0000 (22:55 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 17 Feb 2020 21:48:24 +0000 (23:48 +0200)
Add the new Extended Capability bit for indicating Beacon protection.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/ap/ieee802_11_shared.c
src/common/ieee802_11_defs.h

index 4f7a9706ad890e5816292a6d485c42401cc3f27e..a225639a91e9f831b0f2b85f1933d158c40b30e5 100644 (file)
@@ -397,6 +397,8 @@ static void hostapd_ext_capab_byte(struct hostapd_data *hapd, u8 *pos, int idx)
                                               * Identifiers Used Exclusively */
                }
 #endif /* CONFIG_SAE */
+               if (hapd->conf->beacon_prot)
+                       *pos |= 0x10; /* Bit 84 - Beacon Protection Enabled */
                break;
        }
 }
@@ -456,6 +458,8 @@ u8 * hostapd_eid_ext_capab(struct hostapd_data *hapd, u8 *eid)
            hostapd_sae_pw_id_in_use(hapd->conf))
                len = 11;
 #endif /* CONFIG_SAE */
+       if (len < 11 && hapd->conf->beacon_prot)
+               len = 11;
        if (len < hapd->iface->extended_capa_len)
                len = hapd->iface->extended_capa_len;
        if (len == 0)
index f7192705327c81da2b13874a24e138a701f54229..23e739d0e6d89afe939057de3915bee5a2a3b652 100644 (file)
 #define WLAN_EXT_CAPAB_COMPLETE_NON_TX_BSSID_PROFILE 80
 #define WLAN_EXT_CAPAB_SAE_PW_ID 81
 #define WLAN_EXT_CAPAB_SAE_PW_ID_EXCLUSIVELY 82
+#define WLAN_EXT_CAPAB_BEACON_PROTECTION 84
 
 /* Extended RSN Capabilities */
 /* bits 0-3: Field length (n-1) */