Reject association request from stations that announce HT/VHT capabilities in 6 GHz band. Also reject the stations that does not support HE in 6 GHz band. Signed-off-by: Rajkumar Manoharan <rmanohar@xxxxxxxxxxxxxx> --- src/ap/ieee802_11.c | 25 +++++++++++++++++++++++++ src/common/ieee802_11_defs.h | 1 + 2 files changed, 26 insertions(+) diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 18ce144d373f..b3644aa7991e 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -3148,6 +3148,14 @@ static int check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta, return WLAN_STATUS_ASSOC_DENIED_NO_HT; } + if (is_6ghz_op_class(hapd->iconf->op_class) && + (sta->flags & WLAN_STA_HT)) { + hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211, + HOSTAPD_LEVEL_INFO, "HT capab not allowed in " + "6 GHz band - reject association"); + return WLAN_STATUS_CAPS_UNSUPPORTED; + } + #ifdef CONFIG_IEEE80211AC if (hapd->iconf->ieee80211ac) { resp = copy_sta_vht_capab(hapd, sta, elems.vht_capabilities); @@ -3174,6 +3182,15 @@ static int check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta, return resp; } #endif /* CONFIG_IEEE80211AC */ + + if (is_6ghz_op_class(hapd->iconf->op_class) && + (sta->flags & WLAN_STA_VHT)) { + hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211, + HOSTAPD_LEVEL_INFO, "VHT capab not allowed in " + "6 GHz band - reject association"); + return WLAN_STATUS_CAPS_UNSUPPORTED; + } + #ifdef CONFIG_IEEE80211AX if (hapd->iconf->ieee80211ax) { resp = copy_sta_he_capab(hapd, sta, IEEE80211_MODE_AP, @@ -3182,6 +3199,14 @@ static int check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta, if (resp != WLAN_STATUS_SUCCESS) return resp; } + + if (is_6ghz_op_class(hapd->iconf->op_class) && + !(sta->flags & WLAN_STA_HE)) { + hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211, + HOSTAPD_LEVEL_INFO, "Station does not support " + "mandatory HE PHY - reject association"); + return WLAN_STATUS_ASSOC_DENIED_NO_HE; + } #endif /* CONFIG_IEEE80211AX */ #ifdef CONFIG_P2P diff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h index 7efbdc0834a2..55be298a8f6d 100644 --- a/src/common/ieee802_11_defs.h +++ b/src/common/ieee802_11_defs.h @@ -204,6 +204,7 @@ #define WLAN_STATUS_FILS_AUTHENTICATION_FAILURE 112 #define WLAN_STATUS_UNKNOWN_AUTHENTICATION_SERVER 113 #define WLAN_STATUS_UNKNOWN_PASSWORD_IDENTIFIER 123 +#define WLAN_STATUS_ASSOC_DENIED_NO_HE 124 #define WLAN_STATUS_SAE_HASH_TO_ELEMENT 126 /* Reason codes (IEEE Std 802.11-2016, 9.4.1.7, Table 9-45) */ -- 2.7.4 _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap