]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Use defines in hostapd_set_freq_params()
authorJouni Malinen <j@w1.fi>
Sat, 4 Feb 2017 18:50:16 +0000 (20:50 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 4 Feb 2017 18:50:16 +0000 (20:50 +0200)
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 <j@w1.fi>
src/common/hw_features_common.c

index ef4b59df3406eb2ac4b45d36b1d9d81f6a25d29b..77aadf34e7fb0c559c8081d8e5fd6c20ea828c60 100644 (file)
@@ -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) {