aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/rrm.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2017-01-07 10:49:48 (GMT)
committerJouni Malinen <j@w1.fi>2017-01-07 10:49:48 (GMT)
commit40e9a3f326f684634911fbd333a8d5f9efce3b86 (patch)
tree4f468f5cb451f946b9c9be2aed4a28701c5756dc /wpa_supplicant/rrm.c
parent5cda350896812f0d1eec6a751b194027e2ccf1fc (diff)
downloadhostap-40e9a3f326f684634911fbd333a8d5f9efce3b86.zip
hostap-40e9a3f326f684634911fbd333a8d5f9efce3b86.tar.gz
hostap-40e9a3f326f684634911fbd333a8d5f9efce3b86.tar.bz2
RRM: Fix beacon report scan channels for VHT 80, 80+80, 160 MHz cases
ieee80211_chan_to_freq() is not really meant for conversion of 20 MHz primary channel numbers for wider VHT channels, so handle those as special cases here for now. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/rrm.c')
-rw-r--r--wpa_supplicant/rrm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/rrm.c b/wpa_supplicant/rrm.c
index f16cbc2..af2759e 100644
--- a/wpa_supplicant/rrm.c
+++ b/wpa_supplicant/rrm.c
@@ -424,6 +424,12 @@ static int wpas_add_channel(u8 op_class, u8 chan, u8 num_primary_channels,
u8 primary_chan = chan - (2 * num_primary_channels - 2) + i * 4;
freqs[i] = ieee80211_chan_to_freq(NULL, op_class, primary_chan);
+ /* ieee80211_chan_to_freq() is not really meant for this
+ * conversion of 20 MHz primary channel numbers for wider VHT
+ * channels, so handle those as special cases here for now. */
+ if (freqs[i] < 0 &&
+ (op_class == 128 || op_class == 129 || op_class == 130))
+ freqs[i] = 5000 + 5 * primary_chan;
if (freqs[i] < 0) {
wpa_printf(MSG_DEBUG,
"Beacon Report: Invalid channel %u",