Ver código fonte

qcacld-3.0: Abort preauth if disconnect is received for the current AP

qcacld-2.0 to qcacld-3.0 propagation

If preauth is in progress with too many APs in the roamable AP
list and at the same time disconnect is received from supplicant as
part of unload, the deauth req will be queued in sme pending list
till csr completes the preauth process.

Now as part of unload, driver may purge the sme pending command list
and with it the disconnect command may also get removed if preauth
takes too much time.

This will lead to DEL BSS missing before HAL STOP and thus crash.

To avoid this abort the preauth process once disconnect is received.

Change-Id: I1c35f0c7e38295cfadafdad69f0b9a99ba61404c
CRs-Fixed: 942579
Abhishek Singh 9 anos atrás
pai
commit
96c736af6d

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

@@ -7955,7 +7955,7 @@ CDF_STATUS csr_roam_save_connected_infomation(tpAniSirGlobal pMac,
 }
 
 
-static bool is_disconnect_pending(tpAniSirGlobal pmac,
+bool is_disconnect_pending(tpAniSirGlobal pmac,
 				uint8_t sessionid)
 {
 	tListElem *entry = NULL;

+ 2 - 0
core/sme/src/csr/csr_inside_api.h

@@ -1065,6 +1065,8 @@ csr_get_bssdescr_from_scan_handle(tScanResultHandle result_handle,
 				  tSirBssDescription *bss_descr);
 void csr_release_scan_command(tpAniSirGlobal pMac, tSmeCmd *pCommand,
 			      eCsrScanStatus scanStatus);
+bool is_disconnect_pending(tpAniSirGlobal mac_ctx,
+				   uint8_t sessionid);
 void csr_scan_active_list_timeout_handle(void *userData);
 CDF_STATUS csr_prepare_disconnect_command(tpAniSirGlobal mac,
 			uint32_t session_id, tSmeCmd **sme_cmd);

+ 8 - 1
core/sme/src/csr/csr_neighbor_roam.c

@@ -1039,6 +1039,7 @@ CDF_STATUS csr_neighbor_roam_preauth_rsp_handler(tpAniSirGlobal mac_ctx,
 	} else {
 		tpCsrNeighborRoamBSSInfo neighbor_bss_node = NULL;
 		tListElem *entry;
+		bool is_dis_pending = false;
 
 		sms_log(mac_ctx, LOGE,
 			FL("Preauth failed retry number %d, status = 0x%x"),
@@ -1092,11 +1093,17 @@ CDF_STATUS csr_neighbor_roam_preauth_rsp_handler(tpAniSirGlobal mac_ctx,
 				mac_ctx, neighbor_bss_node);
 		}
 NEXT_PREAUTH:
+		is_dis_pending = is_disconnect_pending(mac_ctx, session_id);
+		if (is_dis_pending) {
+			sms_log(mac_ctx, LOGE,
+				FL("Disconnect in progress, Abort preauth"));
+			goto ABORT_PREAUTH;
+		}
 		/* Issue preauth request for the same/next entry */
 		if (CDF_STATUS_SUCCESS == csr_neighbor_roam_issue_preauth_req(
 						mac_ctx, session_id))
 			goto DEQ_PREAUTH;
-
+ABORT_PREAUTH:
 		if (csr_roam_is_roam_offload_scan_enabled(mac_ctx)) {
 			if (neighbor_roam_info->uOsRequestedHandoff) {
 				neighbor_roam_info->uOsRequestedHandoff = 0;