From: Sunil Date: Tue, 19 Jul 2022 00:04:20 +0000 (+0000) Subject: P2P: Set operating class along with operating channel width X-Git-Tag: hostap_2_11~1687 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=768537921e82423fe3440fa105bd4697e7b5c88d;p=thirdparty%2Fhostap.git P2P: Set operating class along with operating channel width 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 --- diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index 7de924945..67f2d8ac1 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -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); }