Bläddra i källkod

qcacld-3.0: Fix invalid session used in ap ecsa timeout api

If ecsa timeout is active and stop bss is received. During
pe delete session the timer is stopped and destroyed. But if
if timer has already expired and has posted the message to MC
thread the timer callback will be called with pe session which
is already deleted.

Fix this by checking if of pe session is valid in timeout API.
Also reset dfsIncludeChanSwIe during pe delete session.

Change-Id: I67d7e65c8136daaa04afa8b01b7019b0b8b36dae
CRs-Fixed: 2372278
Abhishek Singh 6 år sedan
förälder
incheckning
eb7751ad7b
2 ändrade filer med 3 tillägg och 2 borttagningar
  1. 1 0
      core/mac/src/pe/lim/lim_session.c
  2. 2 2
      core/mac/src/pe/lim/lim_utils.c

+ 1 - 0
core/mac/src/pe/lim/lim_session.c

@@ -904,6 +904,7 @@ void pe_delete_session(struct mac_context *mac_ctx, struct pe_session *session)
 	if (LIM_IS_AP_ROLE(session)) {
 		qdf_mc_timer_stop(&session->protection_fields_reset_timer);
 		qdf_mc_timer_destroy(&session->protection_fields_reset_timer);
+		session->dfsIncludeChanSwIe = 0;
 		qdf_mc_timer_stop(&session->ap_ecsa_timer);
 		qdf_mc_timer_destroy(&session->ap_ecsa_timer);
 		lim_del_pmf_sa_query_timer(mac_ctx, session);

+ 2 - 2
core/mac/src/pe/lim/lim_utils.c

@@ -7881,8 +7881,8 @@ void lim_process_ap_ecsa_timeout(void *data)
 	uint8_t bcn_int, ch, ch_width;
 	QDF_STATUS status;
 
-	if (!session) {
-		pe_err("Session is NULL");
+	if (!session || !session->valid) {
+		pe_err("Session is not valid");
 		return;
 	}