summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVarun Reddy Yeturu <varunreddy.yeturu@codeaurora.org>2017-03-09 11:16:36 -0800
committerSandeep Puligilla <spuligil@codeaurora.org>2017-03-13 11:07:25 -0700
commit7dc049b9ba39ca85bdb1d39a69ea1a6d16334b95 (patch)
treee86dddaa1a2237519a9eac9859c01427d3a12ebd
parentfaf887b18c48444a0e9e6417293ea4fffcbaad25 (diff)
qcacld-3.0: Do not take a reference to bss when disconnect is deferred
Do not indicate the roam event to user space if disconnect is deferred, since it will soon be honored and a disconnect event will be sent to the user space. Do not reference the kernel bss data as well when disconnect is in progress Change-Id: I0b76a2af021efe0e1c8693c4e5908ed576770813 CRs-Fixed: 2017409
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index 5e2d0cd4285c..b087f2191c50 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -1904,6 +1904,11 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
qdf_mem_zero(&roam_profile, sizeof(roam_profile));
+ if (pAdapter->defer_disconnect) {
+ hdd_debug("Do not send roam event as discon will be processed");
+ goto done;
+ }
+
if (!rspRsnIe) {
hdd_err("Unable to allocate RSN IE");
goto done;
@@ -1989,10 +1994,9 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
hdd_debug("Req RSN IE:");
QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_DEBUG,
final_req_ie, (ssid_ie_len + reqRsnLength));
- if (!pAdapter->defer_disconnect)
- cfg80211_roamed_bss(dev, bss,
- final_req_ie, (ssid_ie_len + reqRsnLength),
- rspRsnIe, rspRsnLength, GFP_KERNEL);
+ cfg80211_roamed_bss(dev, bss,
+ final_req_ie, (ssid_ie_len + reqRsnLength),
+ rspRsnIe, rspRsnLength, GFP_KERNEL);
qdf_mem_copy(assoc_req_ies,
(u8 *)pCsrRoamInfo->pbFrames + pCsrRoamInfo->nBeaconLength,
@@ -2531,16 +2535,16 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
QDF_TRACE_LEVEL_DEBUG,
pFTAssocReq,
assocReqlen);
- roam_bss =
- hdd_cfg80211_get_bss(
- pAdapter->wdev.wiphy,
- chan,
- pRoamInfo->bssid.bytes,
- pRoamInfo->u.
- pConnectedProfile->SSID.ssId,
- pRoamInfo->u.
- pConnectedProfile->SSID.length);
- if (!pAdapter->defer_disconnect)
+ if (!pAdapter->defer_disconnect) {
+ roam_bss =
+ hdd_cfg80211_get_bss(
+ pAdapter->wdev.wiphy,
+ chan,
+ pRoamInfo->bssid.bytes,
+ pRoamInfo->u.
+ pConnectedProfile->SSID.ssId,
+ pRoamInfo->u.
+ pConnectedProfile->SSID.length);
cfg80211_roamed_bss(dev,
roam_bss,
pFTAssocReq,
@@ -2548,7 +2552,7 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
pFTAssocRsp,
assocRsplen,
GFP_KERNEL);
- wlan_hdd_send_roam_auth_event(
+ wlan_hdd_send_roam_auth_event(
pAdapter,
pRoamInfo->bssid.bytes,
pFTAssocReq,
@@ -2556,6 +2560,7 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
pFTAssocRsp,
assocRsplen,
pRoamInfo);
+ }
}
if (sme_get_ftptk_state
(WLAN_HDD_GET_HAL_CTX(pAdapter),