]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix 160 MHz opclass channel to frequency conversion
authorJouni Malinen <jouni@qca.qualcomm.com>
Sun, 7 May 2017 18:54:58 +0000 (21:54 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 7 May 2017 19:08:43 +0000 (22:08 +0300)
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 <jouni@qca.qualcomm.com>
src/common/ieee802_11_common.c

index dc99f8b90c18e0e7f0f807a2d53a2bd20ae3a9fb..4da10d206ab2e552c0389a00617ef75122624bce 100644 (file)
@@ -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 */