P2P: Include channels 149 to 161 for operating classes 128 and 130

With the configuration defined in the global_op_class array, the
channels starting from 149 in the operating classes 128 and 130 were not
considered for P2P channel setup due to the non-continuous
incrementation of channel indexes. The other channels in these operating
classes were considered. Handle the channels from 149 to 161 in the
operating classes 128 and 130 for P2P channel setup by handling this
jump in the channel number incrementation.

Signed-off-by: Sreeramya Soratkal <ssramya@codeaurora.org>
This commit is contained in:
Sreeramya Soratkal 2020-08-18 21:46:12 +05:30 committed by Jouni Malinen
parent ac882374a5
commit 760d10cdea

View File

@ -3737,6 +3737,13 @@ static int wpas_p2p_setup_channels(struct wpa_supplicant *wpa_s,
wpa_s->global->p2p_24ghz_social_channels = 1;
for (ch = o->min_chan; ch <= o->max_chan; ch += o->inc) {
enum chan_allowed res;
/* Check for non-continuous jump in channel index
* incrementation */
if ((o->op_class == 128 || o->op_class == 130) &&
ch < 149 && ch + o->inc > 149)
ch = 149;
res = wpas_p2p_verify_channel(wpa_s, mode, ch, o->bw);
if (res == ALLOWED) {
if (reg == NULL) {