From 1ed08baf89e455d0d087fb1e7177bc5f07b4d7ac Mon Sep 17 00:00:00 2001 From: Sujith Manoharan Date: Mon, 2 Apr 2012 11:03:14 +0530 Subject: [PATCH] hostapd: Do not allow HT in 11b mode When the HW mode has been configured as 11b, disable HT operations. Signed-hostap: Sujith Manoharan --- hostapd/config_file.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hostapd/config_file.c b/hostapd/config_file.c index 638adcc40..6fa53f353 100644 --- a/hostapd/config_file.c +++ b/hostapd/config_file.c @@ -1090,6 +1090,12 @@ static int hostapd_config_check_bss(struct hostapd_bss_config *bss, #endif /* CONFIG_IEEE80211R */ #ifdef CONFIG_IEEE80211N + if (conf->ieee80211n && conf->hw_mode == HOSTAPD_MODE_IEEE80211B) { + bss->disable_11n = 1; + wpa_printf(MSG_ERROR, "HT (IEEE 802.11n) in 11b mode is not " + "allowed, disabling HT capabilites"); + } + if (conf->ieee80211n && bss->ssid.security_policy == SECURITY_STATIC_WEP) { bss->disable_11n = 1;