瀏覽代碼

qcacld-3.0: eSmeCommandDelStaSession stuck in smeCmdActiveList

qcacld-2.0 to qcacld-3.0 propagation.

1.Use iw tool to let dut connect to remote ap, dut is working
on wlan0.
2.At same time, use hostapd to start sap also on interface
wlan0.

In item1, before connect to ap, dut will do an internal scan
to search ap, if scan result matched configured ap profile,
dut trys to connect to ap.

In item2, when starting sap, found it's sta mode it will try
to disconnect dut with remote ap and close sta session.

  #1 If ap start action happened in item1's scan period, trying
  disconnecting won't take effect as currently sta has not yet
  connected with remote ap.
  So after item1's scan finished, dut continues to do connection.

  #2 During closing sta session, sme issued eSmeCommandDelStaSession,
  as currently sta is doing connection, so session is in started
  status, this cause closure failed, so there is no chance to remove
  cmd in smeCmdActiveList.
  While cmd pending in smeCmdActiveList for 120s, driver issued crash.

The solution is in item1 after scan complete to check whether it's
needed to start following connection. If stop action has been issued
during scan period, then don't do the connection.

Change-Id: If632e21cb13277fba371ff1bf8df97febf856d09
CRs-Fixed: 923375
kaliu 9 年之前
父節點
當前提交
154d789744
共有 3 個文件被更改,包括 13 次插入2 次删除
  1. 3 1
      core/sme/inc/csr_api.h
  2. 3 1
      core/sme/src/csr/csr_api_roam.c
  3. 7 0
      core/sme/src/csr/csr_api_scan.c

+ 3 - 1
core/sme/inc/csr_api.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -662,6 +662,8 @@ typedef enum {
 	eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTED,
 	/* Participating in a Infra network and connected to a peer */
 	eCSR_ASSOC_STATE_TYPE_INFRA_CONNECTED,
+	/* Disconnecting with AP or stop connecting process */
+	eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTING,
 
 } eCsrConnectState;
 

+ 3 - 1
core/sme/src/csr/csr_api_roam.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -7777,6 +7777,8 @@ CDF_STATUS csr_roam_disconnect_internal(tpAniSirGlobal pMac, uint32_t sessionId,
 		status = csr_roam_issue_disassociate_cmd(pMac, sessionId,
 							 reason);
 	} else {
+		pMac->roam.roamSession[sessionId].connectState =
+			eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTING;
 		csr_scan_abort_scan_for_ssid(pMac, sessionId);
 		status = CDF_STATUS_CMD_NOT_QUEUED;
 		sms_log(pMac, LOG1,

+ 7 - 0
core/sme/src/csr/csr_api_scan.c

@@ -1181,6 +1181,13 @@ CDF_STATUS csr_scan_handle_search_for_ssid(tpAniSirGlobal pMac,
 		status = csr_scan_get_result(pMac, pScanFilter, &hBSSList);
 		if (!CDF_IS_STATUS_SUCCESS(status))
 			break;
+		if (pMac->roam.roamSession[sessionId].connectState ==
+				eCSR_ASSOC_STATE_TYPE_INFRA_DISCONNECTING) {
+			sms_log(pMac, LOGE,
+				FL("upper layer issued disconnetion"));
+			status = CDF_STATUS_E_FAILURE;
+			break;
+		}
 		status = csr_roam_issue_connect(pMac, sessionId, pProfile,
 						hBSSList, eCsrHddIssued,
 						pCommand->u.scanCmd.roamId,