]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
P2P: Set operating class along with operating channel width
authorSunil <sunilravi@google.com>
Tue, 19 Jul 2022 00:04:20 +0000 (00:04 +0000)
committerJouni Malinen <j@w1.fi>
Thu, 22 Sep 2022 21:04:30 +0000 (00:04 +0300)
While setting up the P2P GO interface, wpa_supplicant sets the operating
channel width to CHANWIDTH_USE_HT in cases where it fails to set 80 MHz
bandwidth. In the same flow, update the operating class, too, according
to the channel width. This is to avoid setting up the operational
channel width back to 80 MHz from hostapd interface setup.

Signed-off-by: Sunil <sunilravi@google.com>
wpa_supplicant/ap.c

index 7de924945725df23fbfd492bc0445ac67394ac00..67f2d8ac143d3d6e20b6010adeddc7b91d069c26 100644 (file)
@@ -175,6 +175,9 @@ no_vht:
        hostapd_set_oper_centr_freq_seg0_idx(
                conf, conf->channel + conf->secondary_channel * 2);
        hostapd_set_oper_chwidth(conf, CONF_OPER_CHWIDTH_USE_HT);
+       ieee80211_freq_to_channel_ext(ssid->frequency, 0,
+                                     conf->vht_oper_chwidth,
+                                     &conf->op_class, &conf->channel);
 }