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

Jouni Malinen j at w1.fi
Wed Mar 29 04:20:16 PDT 2017


On Tue, Mar 21, 2017 at 12:24:54PM +0100, Eduardo Abinader wrote:
> Defer decision, so we could possibly benefit from a fallback.
> ---

This is missing the Signed-off-by: line (see the top level CONTRIBUTIONS
file for details).

> diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
> index 93d923a..fd93a4c 100644
> --- a/src/ap/hw_features.c
> +++ b/src/ap/hw_features.c
> @@ -725,11 +725,7 @@ 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);
> +	return 1;
>  }


There is not much remaining in hostapd_is_usable_chans() after this.. In
practice, it would be simply return !hostapd_is_usable_chan(iface,
iface->conf->channel, 1). It would likely be simpler to just get rid of
the function completely and handle this within the only caller in
hostapd_check_chans().
 
-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list