Prechádzať zdrojové kódy

qcacld-3.0: Do not take a reference to bss when disconnect is deferred

Propagation from cld3.0-1.1 to cld3.0-2.0

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
Varun Reddy Yeturu 8 rokov pred
rodič
commit
c13305eeac
1 zmenil súbory, kde vykonal 12 pridanie a 8 odobranie
  1. 12 8
      core/hdd/src/wlan_hdd_assoc.c

+ 12 - 8
core/hdd/src/wlan_hdd_assoc.c

@@ -1955,6 +1955,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;
@@ -2040,10 +2045,9 @@ static void hdd_send_re_assoc_event(struct net_device *dev,
 	hdd_notice("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,
@@ -2629,8 +2633,8 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
 							QDF_TRACE_LEVEL_DEBUG,
 							pFTAssocReq,
 							assocReqlen);
-						roam_bss =
-							hdd_cfg80211_get_bss(
+						if (!pAdapter->defer_disconnect) {
+							roam_bss = hdd_cfg80211_get_bss(
 								pAdapter->wdev.wiphy,
 								chan,
 								pRoamInfo->bssid.bytes,
@@ -2638,7 +2642,6 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
 								pConnectedProfile->SSID.ssId,
 								pRoamInfo->u.
 								pConnectedProfile->SSID.length);
-						if (!pAdapter->defer_disconnect)
 							cfg80211_roamed_bss(dev,
 								roam_bss,
 								pFTAssocReq,
@@ -2646,7 +2649,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,
@@ -2654,6 +2657,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),