aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2020-02-17 20:55:12 (GMT)
committerJouni Malinen <j@w1.fi>2020-02-17 21:48:24 (GMT)
commitc1df321b6c8e6fd3317337d3cc5c6914328311da (patch)
tree0ba112f00d77bf8b2787e0bcc63e719898ee1154
parent92d407dbd6bdccad266413a9f9da266a30446197 (diff)
downloadhostap-c1df321b6c8e6fd3317337d3cc5c6914328311da.zip
hostap-c1df321b6c8e6fd3317337d3cc5c6914328311da.tar.gz
hostap-c1df321b6c8e6fd3317337d3cc5c6914328311da.tar.bz2
AP mode indication of Beacon protection being enabled
Add the new Extended Capability bit for indicating Beacon protection. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--src/ap/ieee802_11_shared.c4
-rw-r--r--src/common/ieee802_11_defs.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c
index 4f7a970..a225639 100644
--- a/src/ap/ieee802_11_shared.c
+++ b/src/ap/ieee802_11_shared.c
@@ -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)
diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h
index f719270..23e739d 100644
--- a/src/common/ieee802_11_defs.h
+++ b/src/common/ieee802_11_defs.h
@@ -558,6 +558,7 @@
#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) */