Browse Source

qcacld-3.0: Properly handle disconnect request from userspace

qcacld-2.0 to qcacld-3.0 propagation

1) Currently we notify connect event to CFG80211 module even
   though there is disconnect request from upperlayer being
   queued in case of disconnect timeout.

2) Cancel ongoing ROC to avoid defer processing of disconnect
   command until ROC completion.

   change made to address the same.

Change-Id: Ib824c07e25f9f7ced0279faddc3d958d1c92b1eb
CRs-Fixed: 884364
Edhar, Mahesh Kumar 8 years ago
parent
commit
732f698488
2 changed files with 7 additions and 3 deletions
  1. 6 3
      core/hdd/src/wlan_hdd_assoc.c
  2. 1 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 6 - 3
core/hdd/src/wlan_hdd_assoc.c

@@ -2358,9 +2358,12 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
 	/* HDD has initiated disconnect, do not send connect result indication
 	 * to kernel as it will be handled by __cfg80211_disconnect.
 	 */
-	if ((eConnectionState_Disconnecting == pHddStaCtx->conn_info.connState)
-	    && ((eCSR_ROAM_RESULT_ASSOCIATED == roamResult)
-		|| (eCSR_ROAM_ASSOCIATION_FAILURE == roamStatus))) {
+	if (((eConnectionState_Disconnecting ==
+	    pHddStaCtx->conn_info.connState) ||
+	    (eConnectionState_NotConnected ==
+	    pHddStaCtx->conn_info.connState)) &&
+	    ((eCSR_ROAM_RESULT_ASSOCIATED == roamResult) ||
+	    (eCSR_ROAM_ASSOCIATION_FAILURE == roamStatus))) {
 		hddLog(LOG1, FL("Disconnect from HDD in progress"));
 		hddDisconInProgress = true;
 	}

+ 1 - 0
core/hdd/src/wlan_hdd_cfg80211.c

@@ -11715,6 +11715,7 @@ static int __wlan_hdd_cfg80211_disconnect(struct wiphy *wiphy,
 			hdd_abort_mac_scan(pHddCtx, pAdapter->sessionId,
 					   eCSR_SCAN_ABORT_DEFAULT);
 		}
+		wlan_hdd_cleanup_remain_on_channel_ctx(pAdapter);
 #ifdef FEATURE_WLAN_TDLS
 		/* First clean up the tdls peers if any */
 		for (staIdx = 0; staIdx < pHddCtx->max_num_tdls_sta; staIdx++) {