Explorar o código

qcacld-3.0: Handle Reassociation request failure

qcacld-2.0 to qcacld-3.0 propagation

If pre-authentication is successful and the reassoc request
comes with an invalid BSSID, then clean up the PE session and
then clean up the upper layers like SME and HDD.

CRs-Fixed: 970551
Change-Id: Idb0ce24f4cb4e1f3dd02c3691e1698441b7606ce
Varun Reddy Yeturu %!s(int64=8) %!d(string=hai) anos
pai
achega
658b8026a3

+ 1 - 4
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -53,8 +53,6 @@
 
 #define MAX_SUPPORTED_PEERS_WEP 16
 
-static void lim_handle_sme_join_result(tpAniSirGlobal, tSirResultCodes, uint16_t,
-				       tpPESession);
 void lim_process_mlm_join_cnf(tpAniSirGlobal, uint32_t *);
 void lim_process_mlm_auth_cnf(tpAniSirGlobal, uint32_t *);
 void lim_process_mlm_start_cnf(tpAniSirGlobal, uint32_t *);
@@ -1341,8 +1339,7 @@ void lim_process_mlm_set_keys_cnf(tpAniSirGlobal pMac, uint32_t *pMsgBuf)
  *
  * Return: None
  */
-static void
-lim_handle_sme_join_result(tpAniSirGlobal mac_ctx,
+void lim_handle_sme_join_result(tpAniSirGlobal mac_ctx,
 	tSirResultCodes result_code, uint16_t prot_status_code,
 	tpPESession session_entry)
 {

+ 12 - 2
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -2101,11 +2101,21 @@ static void __lim_process_sme_reassoc_req(tpAniSirGlobal mac_ctx,
 			reassoc_req->bssDescription.bssId,
 			&session_id);
 	if (session_entry == NULL) {
-		lim_print_mac_addr(mac_ctx, reassoc_req->bssDescription.bssId,
-				LOGE);
 		lim_log(mac_ctx, LOGE,
 			FL("Session does not exist for given bssId"));
+		lim_print_mac_addr(mac_ctx, reassoc_req->bssDescription.bssId,
+				LOGE);
 		ret_code = eSIR_SME_INVALID_PARAMETERS;
+		lim_get_session_info(mac_ctx, (uint8_t *)msg_buf,
+				&sme_session_id, &transaction_id);
+		session_entry =
+			pe_find_session_by_sme_session_id(mac_ctx,
+					sme_session_id);
+		if (session_entry != NULL)
+			lim_handle_sme_join_result(mac_ctx,
+					eSIR_SME_INVALID_PARAMETERS,
+					eSIR_MAC_UNSPEC_FAILURE_STATUS,
+					session_entry);
 		goto end;
 	}
 #ifdef FEATURE_WLAN_DIAG_SUPPORT /* FEATURE_WLAN_DIAG_SUPPORT */

+ 2 - 0
core/mac/src/pe/lim/lim_send_messages.h

@@ -106,4 +106,6 @@ tSirRetStatus lim_send_exclude_unencrypt_ind(tpAniSirGlobal pMac,
 #endif
 tSirRetStatus lim_send_ht40_obss_scanind(tpAniSirGlobal mac_ctx,
 						tpPESession session);
+void lim_handle_sme_join_result(tpAniSirGlobal,
+		tSirResultCodes, uint16_t, tpPESession);
 #endif