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>
This commit is contained in:
Jouni Malinen 2017-01-07 12:49:48 +02:00
parent 5cda350896
commit 40e9a3f326

View File

@ -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",