From 1f3c49d418238e20a9eb256920b8f6fb149643bb Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 7 May 2017 21:54:58 +0300 Subject: [PATCH] Fix 160 MHz opclass channel to frequency conversion This needs to allow all 20 MHz channel numbers to be converted even though the Annex E table lists only channel _center_ frequencies 50 and 114. Neighbor Report (see IEEE Std 802.11-2016, 9.4.2.37 Neighbor Report element) uses Channel Number field with "last known primary channel of the AP" which refers to the 20 MHz channel and not the channel center frequency. Signed-off-by: Jouni Malinen --- src/common/ieee802_11_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index dc99f8b90..4da10d206 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -1119,7 +1119,7 @@ static int ieee80211_chan_to_freq_global(u8 op_class, u8 chan) return -1; return 5000 + 5 * chan; case 129: /* center freqs 50, 114; 160 MHz */ - if (chan < 50 || chan > 114) + if (chan < 36 || chan > 128) return -1; return 5000 + 5 * chan; case 180: /* 60 GHz band, channels 1..4 */