aboutsummaryrefslogtreecommitdiff
path: root/contrib/wpa/wpa_supplicant/op_classes.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/wpa/wpa_supplicant/op_classes.c')
-rw-r--r--contrib/wpa/wpa_supplicant/op_classes.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/contrib/wpa/wpa_supplicant/op_classes.c b/contrib/wpa/wpa_supplicant/op_classes.c
index bd53c5ceceaf..a0ad0c2ff572 100644
--- a/contrib/wpa/wpa_supplicant/op_classes.c
+++ b/contrib/wpa/wpa_supplicant/op_classes.c
@@ -207,15 +207,11 @@ enum chan_allowed verify_channel(struct hostapd_hw_modes *mode, u8 op_class,
if (!(flag & HOSTAPD_CHAN_HT40MINUS))
return NOT_ALLOWED;
res2 = allow_channel(mode, op_class, channel - 4, NULL);
- } else if (bw == BW40PLUS) {
+ } else if (bw == BW40PLUS ||
+ (bw == BW40 && !(((channel - 1) / 4) % 2))) {
if (!(flag & HOSTAPD_CHAN_HT40PLUS))
return NOT_ALLOWED;
res2 = allow_channel(mode, op_class, channel + 4, NULL);
- } else if (is_6ghz_op_class(op_class) && bw == BW40) {
- if (get_6ghz_sec_channel(channel) < 0)
- res2 = allow_channel(mode, op_class, channel - 4, NULL);
- else
- res2 = allow_channel(mode, op_class, channel + 4, NULL);
} else if (bw == BW80) {
/*
* channel is a center channel and as such, not necessarily a