VHT: Add option for requiring use of VHT

Signed-hostap: Mahesh Palivela <maheshp@posedge.com>
This commit is contained in:
Mahesh Palivela 2012-08-10 19:53:24 +03:00 committed by Jouni Malinen
parent 14708b501f
commit 140e850a66
4 changed files with 13 additions and 0 deletions

View file

@ -2222,6 +2222,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
"vht_capab", line);
errors++;
}
} else if (os_strcmp(buf, "require_vht") == 0) {
conf->require_vht = atoi(pos);
} else if (os_strcmp(buf, "vht_oper_chwidth") == 0) {
conf->vht_oper_chwidth = atoi(pos);
#endif /* CONFIG_IEEE80211AC */

View file

@ -550,6 +550,9 @@ wmm_ac_vo_acm=0
# 0 = Tx antenna pattern might change during the lifetime of an association
# 1 = Tx antenna pattern does not change during the lifetime of an association
#vht_capab=[SHORT-GI-80][HTC-VHT]
#
# Require stations to support VHT PHY (reject association if they do not)
#require_vht=1
# 0 = 20 or 40 MHz operating Channel width
# 1 = 80 MHz channel width

View file

@ -476,6 +476,7 @@ struct hostapd_config {
int require_ht;
u32 vht_capab;
int ieee80211ac;
int require_vht;
u8 vht_oper_chwidth;
};

View file

@ -653,6 +653,13 @@ static u16 check_assoc_ies(struct hostapd_data *hapd, struct sta_info *sta,
elems.vht_capabilities_len);
if (resp != WLAN_STATUS_SUCCESS)
return resp;
if (hapd->iconf->ieee80211ac && hapd->iconf->require_vht &&
!(sta->flags & WLAN_STA_VHT)) {
hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
HOSTAPD_LEVEL_INFO, "Station does not support "
"mandatory VHT PHY - reject association");
return WLAN_STATUS_UNSPECIFIED_FAILURE;
}
#endif /* CONFIG_IEEE80211AC */
if ((hapd->conf->wpa & WPA_PROTO_RSN) && elems.rsn_ie) {