From: Sujith Manoharan Date: Wed, 16 Mar 2011 09:22:40 +0000 (+0200) Subject: HT: Skip ht_capab validation if ieee80211n=0 X-Git-Tag: hostap-1-bp~488 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec2b89098168ee6aade616ed9e2bad7a2d8eb27c;p=thirdparty%2Fhostap.git HT: Skip ht_capab validation if ieee80211n=0 There is no point in running through the 40 MHz scan if HT is actually disabled regardless of whether the ht_capab parameter is set. --- diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c index 9b0265fd3..f3fffd7da 100644 --- a/src/ap/hw_features.c +++ b/src/ap/hw_features.c @@ -486,9 +486,6 @@ static int ieee80211n_supported_ht_capab(struct hostapd_iface *iface) u16 hw = iface->current_mode->ht_capab; u16 conf = iface->conf->ht_capab; - if (!iface->conf->ieee80211n) - return 1; - if ((conf & HT_CAP_INFO_LDPC_CODING_CAP) && !(hw & HT_CAP_INFO_LDPC_CODING_CAP)) { wpa_printf(MSG_ERROR, "Driver does not support configured " @@ -588,6 +585,8 @@ int hostapd_check_ht_capab(struct hostapd_iface *iface) { #ifdef CONFIG_IEEE80211N int ret; + if (!iface->conf->ieee80211n) + return 0; if (!ieee80211n_supported_ht_capab(iface)) return -1; ret = ieee80211n_check_40mhz(iface);