From 740d243df39b5df9c59cc6131d9b4da2b213a8d9 Mon Sep 17 00:00:00 2001 From: Aloka Dixit Date: Tue, 17 Aug 2021 16:11:22 -0700 Subject: [PATCH 15/23] eht: changes to the neighbor report element Set bit 21 in the neighbor report for an EHT AP as described in IEEE P802.11be/D1.4, January 2022, section 9.4.2.36. Also move the check for 'he' outside the check for 'ht' as ht and vht are not enabled for 6GHz band. Signed-off-by: Aloka Dixit --- src/ap/neighbor_db.c | 8 ++++++-- src/common/ieee802_11_defs.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) --- a/src/ap/neighbor_db.c +++ b/src/ap/neighbor_db.c @@ -243,6 +243,7 @@ void hostapd_neighbor_set_own_report(str int ht = hapd->iconf->ieee80211n && !hapd->conf->disable_11n; int vht = hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac; int he = hapd->iconf->ieee80211ax && !hapd->conf->disable_11ax; + int eht = he && hapd->iconf->ieee80211be && !hapd->conf->disable_11be; struct wpa_ssid_value ssid; u8 channel, op_class; u8 center_freq1_idx = 0, center_freq2_idx = 0; @@ -278,8 +279,12 @@ void hostapd_neighbor_set_own_report(str /* VHT bit added in IEEE P802.11-REVmc/D4.3 */ if (vht) bssid_info |= NEI_REP_BSSID_INFO_VHT; - if (he) - bssid_info |= NEI_REP_BSSID_INFO_HE; + } + + if (he) { + bssid_info |= NEI_REP_BSSID_INFO_HE; + if (eht) + bssid_info |= NEI_REP_BSSID_INFO_EHT; } /* TODO: Set NEI_REP_BSSID_INFO_MOBILITY_DOMAIN if MDE is set */ --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -2237,7 +2237,7 @@ enum phy_type { #define NEI_REP_BSSID_INFO_VHT BIT(12) #define NEI_REP_BSSID_INFO_FTM BIT(13) #define NEI_REP_BSSID_INFO_HE BIT(14) - +#define NEI_REP_BSSID_INFO_EHT BIT(21) /* * IEEE P802.11-REVmc/D5.0 Table 9-152 - HT/VHT Operation Information * subfields.