summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhqu <hqu@codeaurora.org>2017-10-28 16:05:21 +0800
committersnandini <snandini@codeaurora.org>2017-11-04 20:50:30 -0700
commitb68a562caa1de69b3d11c0a56b82d532af7dab45 (patch)
treeb9bc4077d2f3fc9883feaad135f013222c6b3500
parent67bc7ba4510bdb6fb27d2d1d0cd14860ae314c51 (diff)
qcacld-3.0: Keep WEP key when vendor subcmd restart sap
When vendor subcmd set sap channel, driver will do sap restart, WEP key will be cleared when stop bss, then it will cause WEP shared connection fail. Fix is to keep WEP key when bss stop caused by QCA_WLAN_VENDOR_ATTR_SAP_CONFIG_CHANNEL. Change-Id: Ib91993ae953f04c01dc9130774f91300dd8bd62a CRs-Fixed: 2134346
-rw-r--r--core/hdd/inc/wlan_hdd_main.h3
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c1
-rw-r--r--core/hdd/src/wlan_hdd_hostapd.c10
3 files changed, 11 insertions, 3 deletions
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index f0a08cdd145a..bb202f5b074e 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -867,10 +867,13 @@ typedef struct hdd_hostapd_state_s {
* to maintain SCC mode with the STA role on the same card.
* this usually happens when STA is connected to an external
* AP that runs on a different channel
+ * @BSS_STOP_DUE_TO_VENDOR_CONFIG_CHAN: BSS stopped due to
+ * vendor subcmd set sap config channel
*/
enum bss_stop_reason {
BSS_STOP_REASON_INVALID = 0,
BSS_STOP_DUE_TO_MCC_SCC_SWITCH = 1,
+ BSS_STOP_DUE_TO_VENDOR_CONFIG_CHAN = 2,
};
/**
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 9d83646d7fda..3e9e142c5219 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -9482,6 +9482,7 @@ __wlan_hdd_cfg80211_sap_configuration_set(struct wiphy *wiphy,
ap_ctx->sapConfig.channel = config_channel;
ap_ctx->sapConfig.ch_params.ch_width =
ap_ctx->sapConfig.ch_width_orig;
+ ap_ctx->bss_stop_reason = BSS_STOP_DUE_TO_VENDOR_CONFIG_CHAN;
cds_set_channel_params(ap_ctx->sapConfig.channel,
ap_ctx->sapConfig.sec_ch,
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index 72f9e7f868ec..8eb7498cc8e1 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -1842,9 +1842,13 @@ QDF_STATUS hdd_hostapd_sap_event_cb(tpSap_Event pSapEvent,
}
hdd_debug("bss_stop_reason=%d", pHddApCtx->bss_stop_reason);
- if (pHddApCtx->bss_stop_reason !=
- BSS_STOP_DUE_TO_MCC_SCC_SWITCH) {
- /* when MCC to SCC switching happens, key storage
+ if ((BSS_STOP_DUE_TO_MCC_SCC_SWITCH !=
+ pHddApCtx->bss_stop_reason) &&
+ (BSS_STOP_DUE_TO_VENDOR_CONFIG_CHAN !=
+ pHddApCtx->bss_stop_reason)) {
+ /*
+ * when MCC to SCC switching or vendor subcmd
+ * setting sap config channel happens, key storage
* should not be cleared due to hostapd will not
* repopulate the original keys
*/