summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hostapd/hidl/vendor/1.0/hostapd_vendor.cpp5
-rw-r--r--wpa_supplicant/hidl/1.0/sta_network.cpp5
-rw-r--r--wpa_supplicant/hidl/1.1/sta_network.cpp5
3 files changed, 10 insertions, 5 deletions
diff --git a/hostapd/hidl/vendor/1.0/hostapd_vendor.cpp b/hostapd/hidl/vendor/1.0/hostapd_vendor.cpp
index 82ed5ba..0ea5d35 100644
--- a/hostapd/hidl/vendor/1.0/hostapd_vendor.cpp
+++ b/hostapd/hidl/vendor/1.0/hostapd_vendor.cpp
@@ -202,10 +202,13 @@ std::string AddOrUpdateHostapdConfig(
qsap_cmd(StringPrintf(kQsapSetFmt, dual_mode_str, "channel", std::to_string(iface_params.channelParams.channel).c_str()));
}
+ // reset fields to default
+ qsap_cmd(StringPrintf(kQsapSetFmt, dual_mode_str, "ht_capab", "[SHORT-GI-20] [GF] [DSSS_CCK-40] [LSIG-TXOP-PROT]"));
+ qsap_cmd(StringPrintf(kQsapSetFmt, dual_mode_str, "vht_oper_chwidth", "0"));
+
switch (iface_params.channelParams.band) {
case IHostapd::Band::BAND_2_4_GHZ:
qsap_cmd(StringPrintf(kQsapSetFmt, dual_mode_str, "hw_mode", "g"));
- qsap_cmd(StringPrintf(kQsapSetFmt, dual_mode_str, "ht_capab", "[SHORT-GI-20] [GF] [DSSS_CCK-40] [LSIG-TXOP-PROT]"));
break;
case IHostapd::Band::BAND_5_GHZ:
qsap_cmd(StringPrintf(kQsapSetFmt, dual_mode_str, "hw_mode", "a"));
diff --git a/wpa_supplicant/hidl/1.0/sta_network.cpp b/wpa_supplicant/hidl/1.0/sta_network.cpp
index f471941..717b54f 100644
--- a/wpa_supplicant/hidl/1.0/sta_network.cpp
+++ b/wpa_supplicant/hidl/1.0/sta_network.cpp
@@ -865,8 +865,9 @@ SupplicantStatus StaNetwork::setWepTxKeyIdxInternal(uint32_t key_idx)
SupplicantStatus StaNetwork::setRequirePmfInternal(bool enable)
{
struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
- wpa_ssid->ieee80211w =
- enable ? MGMT_FRAME_PROTECTION_REQUIRED : NO_MGMT_FRAME_PROTECTION;
+ if (enable) {
+ wpa_ssid->ieee80211w = MGMT_FRAME_PROTECTION_REQUIRED;
+ }
resetInternalStateAfterParamsUpdate();
return {SupplicantStatusCode::SUCCESS, ""};
}
diff --git a/wpa_supplicant/hidl/1.1/sta_network.cpp b/wpa_supplicant/hidl/1.1/sta_network.cpp
index 9d4cc91..330e14c 100644
--- a/wpa_supplicant/hidl/1.1/sta_network.cpp
+++ b/wpa_supplicant/hidl/1.1/sta_network.cpp
@@ -884,8 +884,9 @@ SupplicantStatus StaNetwork::setWepTxKeyIdxInternal(uint32_t key_idx)
SupplicantStatus StaNetwork::setRequirePmfInternal(bool enable)
{
struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
- wpa_ssid->ieee80211w =
- enable ? MGMT_FRAME_PROTECTION_REQUIRED : NO_MGMT_FRAME_PROTECTION;
+ if (enable) {
+ wpa_ssid->ieee80211w = MGMT_FRAME_PROTECTION_REQUIRED;
+ }
resetInternalStateAfterParamsUpdate();
return {SupplicantStatusCode::SUCCESS, ""};
}