[PATCH] hw_features: Remove redundant conditions

Jouni Malinen j at w1.fi
Sat Feb 4 10:48:21 PST 2017


On Fri, Feb 03, 2017 at 04:57:57PM +0900, Masashi Honma wrote:
> vht_oper_chwidth is always one in this context.

> diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c
> @@ -388,9 +388,7 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
>  		/* fall through */
>  	case VHT_CHANWIDTH_80MHZ:
>  		data->bandwidth = 80;
> -		if ((vht_oper_chwidth == 1 && center_segment1) ||
> -		    (vht_oper_chwidth == 3 && !center_segment1) ||
> -		    !sec_channel_offset)
> +		if (center_segment1 || !sec_channel_offset)
>  			return -1;

vht_oper_chwidth can be 3 (VHT_CHANWIDTH_80P80MHZ) here.. That's what
that "fall through" case would do.

-- 
Jouni Malinen                                            PGP id EFC895FA



More information about the Hostap mailing list