set operating class along with operating channel width

While setting up the P2P GO interface, supplicant sets the
operating channel width to CHANWIDTH_USE_HT, in cases where it
fails to set 80MHz 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 80MHz from hostapd interface
setup.

Bug: 238780049
Test: Manual - Verified that P2P GO come up even when complete 80MHz
spectrum is not available.

Change-Id: Ifaf442914eec091b1fe01d8f246d4cedb0fa990b
diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
index 7de9249..0261362 100644
--- a/wpa_supplicant/ap.c
+++ b/wpa_supplicant/ap.c
@@ -175,6 +175,10 @@
 	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);
 }