[PATCH] hw_features: provide proper fallback to HT20 by defering channel pair check

Eduardo Abinader eduardoabinader at gmail.com
Wed Mar 29 05:04:27 PDT 2017


Defer decision, so we could possibly benefit from a fallback.
For instance, that may happen with FCC UNII ch165,
which is 20 MHz wide.

Signed-off-by: Eduardo Abinader <eduardoabinader at gmail.com>
---
 src/ap/hw_features.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
index 93d923a..318389c 100644
--- a/src/ap/hw_features.c
+++ b/src/ap/hw_features.c
@@ -720,24 +720,11 @@ static int hostapd_is_usable_chan(struct hostapd_iface *iface,
 }
 
 
-static int hostapd_is_usable_chans(struct hostapd_iface *iface)
-{
-	if (!hostapd_is_usable_chan(iface, iface->conf->channel, 1))
-		return 0;
-
-	if (!iface->conf->secondary_channel)
-		return 1;
-
-	return hostapd_is_usable_chan(iface, iface->conf->channel +
-				      iface->conf->secondary_channel * 4, 0);
-}
-
-
 static enum hostapd_chan_status
 hostapd_check_chans(struct hostapd_iface *iface)
 {
 	if (iface->conf->channel) {
-		if (hostapd_is_usable_chans(iface))
+		if (hostapd_is_usable_chan(iface, iface->conf->channel, 1))
 			return HOSTAPD_CHAN_VALID;
 		else
 			return HOSTAPD_CHAN_INVALID;
-- 
2.5.0




More information about the Hostap mailing list