From: Jouni Malinen Date: Sat, 4 Feb 2017 18:50:16 +0000 (+0200) Subject: Use defines in hostapd_set_freq_params() X-Git-Tag: hostap_2_7~1683 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4d6e79f867c66f8d56ce6ea12c1f616b7c7981b9;p=thirdparty%2Fhostap.git Use defines in hostapd_set_freq_params() Use the defines for vht_oper_chwidth values more consistently in hostapd_set_freq_params() to make this more readable. Signed-off-by: Jouni Malinen --- diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c index ef4b59df3..77aadf34e 100644 --- a/src/common/hw_features_common.c +++ b/src/common/hw_features_common.c @@ -388,8 +388,10 @@ 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) || + if ((vht_oper_chwidth == VHT_CHANWIDTH_80MHZ && + center_segment1) || + (vht_oper_chwidth == VHT_CHANWIDTH_80P80MHZ && + !center_segment1) || !sec_channel_offset) return -1; if (!center_segment0) {