From 04822245293000c7bae32a0867ede4dfee09a061 Mon Sep 17 00:00:00 2001 From: wadesong Date: Thu, 12 Jul 2018 19:50:36 +0800 Subject: qcacld-3.0: Fix two improper info clearing cases 1) When STA connection is established correctly, the privacy setting in HDD layer shouldn't be cleared unconditionally. 2) When change interface operation is to take place, the mode specific connection info table shouldn't be cleared before concurrency checking is done, because once concurrency check fails, there will be no way to restore the connection table. Add code to return from connection startup function without clearing the privacy settings when connection is successful. Add code to do connection table clearing only when concurrency checking passes. Change-Id: If7387e56317b32fb30cc9fecfebb6ef378c4c2ef CRs-Fixed: 2277643 --- core/hdd/src/wlan_hdd_cfg80211.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 24d3faf9bf7c..aa013e0d42fa 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -14581,17 +14581,6 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy, return -EINVAL; } - pConfig = pHddCtx->config; - wdev = ndev->ieee80211_ptr; - - /* Reset the current device mode bit mask */ - cds_clear_concurrency_mode(pAdapter->device_mode); - - /* - * must be called after cds_clear_concurrency_mode's invocation so the - * current adapter's old device mode mapping is removed from our - * internal records. - */ if (!cds_allow_concurrency( wlan_hdd_convert_nl_iftype_to_hdd_type(type), 0, HW_MODE_20_MHZ)) { @@ -14599,6 +14588,12 @@ static int __wlan_hdd_cfg80211_change_iface(struct wiphy *wiphy, return -EINVAL; } + pConfig = pHddCtx->config; + wdev = ndev->ieee80211_ptr; + + /* Reset the current device mode bit mask */ + cds_clear_concurrency_mode(pAdapter->device_mode); + hdd_update_tdls_ct_and_teardown_links(pHddCtx); if ((pAdapter->device_mode == QDF_STA_MODE) || (pAdapter->device_mode == QDF_P2P_CLIENT_MODE) || @@ -18556,8 +18551,8 @@ static int __wlan_hdd_cfg80211_connect(struct wiphy *wiphy, bssid_hint, channel, 0); if (0 > status) { hdd_err("connect failed"); - return status; } + return status; con_chk_failed: wlan_hdd_cfg80211_clear_privacy(pAdapter); -- cgit v1.2.3