[wpa_supplicant] Cumulative patch from b8491ae5a
Also revert local solution for encrypted IMSI and use the upstream version.
Bug: 134177972
Test: Device boots up and connects to WPA3/OWE wifi networks, run traffic.
Test: Able to turn on/off softap, associate wifi STA, run traffic.
Test: Regression test passed (Bug: 137653009)
Change-Id: Ie34a0138a3a2039b03101c788b43acbb33f8332a
diff --git a/src/ap/acs.c b/src/ap/acs.c
index 3b45075..11178a1 100644
--- a/src/ap/acs.c
+++ b/src/ap/acs.c
@@ -594,12 +594,12 @@
iface->conf->secondary_channel)
n_chans = 2;
- if (iface->conf->ieee80211ac) {
- switch (iface->conf->vht_oper_chwidth) {
- case VHT_CHANWIDTH_80MHZ:
+ if (iface->conf->ieee80211ac || iface->conf->ieee80211ax) {
+ switch (hostapd_get_oper_chwidth(iface->conf)) {
+ case CHANWIDTH_80MHZ:
n_chans = 4;
break;
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_160MHZ:
n_chans = 8;
break;
}
@@ -607,7 +607,7 @@
bw = num_chan_to_bw(n_chans);
- /* TODO: VHT80+80. Update acs_adjust_vht_center_freq() too. */
+ /* TODO: VHT/HE80+80. Update acs_adjust_center_freq() too. */
wpa_printf(MSG_DEBUG,
"ACS: Survey analysis for selected bandwidth %d MHz", bw);
@@ -647,9 +647,9 @@
}
if (iface->current_mode->mode == HOSTAPD_MODE_IEEE80211A &&
- iface->conf->ieee80211ac) {
- if (iface->conf->vht_oper_chwidth ==
- VHT_CHANWIDTH_80MHZ &&
+ (iface->conf->ieee80211ac || iface->conf->ieee80211ax)) {
+ if (hostapd_get_oper_chwidth(iface->conf) ==
+ CHANWIDTH_80MHZ &&
!acs_usable_vht80_chan(chan)) {
wpa_printf(MSG_DEBUG,
"ACS: Channel %d: not allowed as primary channel for VHT80",
@@ -657,8 +657,8 @@
continue;
}
- if (iface->conf->vht_oper_chwidth ==
- VHT_CHANWIDTH_160MHZ &&
+ if (hostapd_get_oper_chwidth(iface->conf) ==
+ CHANWIDTH_160MHZ &&
!acs_usable_vht160_chan(chan)) {
wpa_printf(MSG_DEBUG,
"ACS: Channel %d: not allowed as primary channel for VHT160",
@@ -783,20 +783,20 @@
}
-static void acs_adjust_vht_center_freq(struct hostapd_iface *iface)
+static void acs_adjust_center_freq(struct hostapd_iface *iface)
{
int offset;
wpa_printf(MSG_DEBUG, "ACS: Adjusting VHT center frequency");
- switch (iface->conf->vht_oper_chwidth) {
- case VHT_CHANWIDTH_USE_HT:
+ switch (hostapd_get_oper_chwidth(iface->conf)) {
+ case CHANWIDTH_USE_HT:
offset = 2 * iface->conf->secondary_channel;
break;
- case VHT_CHANWIDTH_80MHZ:
+ case CHANWIDTH_80MHZ:
offset = 6;
break;
- case VHT_CHANWIDTH_160MHZ:
+ case CHANWIDTH_160MHZ:
offset = 14;
break;
default:
@@ -807,8 +807,8 @@
return;
}
- iface->conf->vht_oper_centr_freq_seg0_idx =
- iface->conf->channel + offset;
+ hostapd_set_oper_centr_freq_seg0_idx(iface->conf,
+ iface->conf->channel + offset);
}
@@ -863,8 +863,8 @@
iface->conf->channel = ideal_chan->chan;
- if (iface->conf->ieee80211ac)
- acs_adjust_vht_center_freq(iface);
+ if (iface->conf->ieee80211ac || iface->conf->ieee80211ax)
+ acs_adjust_center_freq(iface);
err = 0;
fail: