Pārlūkot izejas kodu

qcacld-3.0: Find Session Id by BSSID while handling TSM Stats rsp

Currently, value of staIndex in dph hash table is not getting
updated after roaming. But diver invokes pe_find_session_by_sta_id
to get PE session to handle eWNI_SME_GET_TSM_STATS_RSP. Due to a
different value of staIndex and staid, session lookup fails for
StaId. This results in failure of IOCTL command "GETTSMSTATS"
after roaming.

Fix is to use bssid instead of sta id to find session in
lim_send_sme_pe_ese_tsm_rsp.

Change-Id: I42745c864ac0292dbcaae05f62a00a141705d431
CRs-Fixed: 2381668
Abhinav Kumar 6 gadi atpakaļ
vecāks
revīzija
aa8f2dffcc

+ 1 - 0
core/mac/inc/sir_api.h

@@ -828,6 +828,7 @@ typedef struct sAniGetTsmStatsRsp {
 				 * Per STA stats request must
 				 * contain valid
 				 */
+	struct qdf_mac_addr bssid; /* bssid to get the tsm stats for */
 	tAniTrafStrmMetrics tsmMetrics;
 	void *tsmStatsReq;      /* tsm stats request backup */
 } tAniGetTsmStatsRsp, *tpAniGetTsmStatsRsp;

+ 2 - 3
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -1638,9 +1638,8 @@ void lim_send_sme_pe_ese_tsm_rsp(struct mac_context *mac,
 	struct pe_session *pPeSessionEntry = NULL;
 
 	/* Get the Session Id based on Sta Id */
-	pPeSessionEntry =
-		pe_find_session_by_sta_id(mac, pPeStats->staId, &sessionId);
-
+	pPeSessionEntry = pe_find_session_by_bssid(mac, pPeStats->bssid.bytes,
+						   &sessionId);
 	/* Fill the Session Id */
 	if (NULL != pPeSessionEntry) {
 		/* Fill the Session Id */

+ 1 - 0
core/wma/src/wma_features.c

@@ -3171,6 +3171,7 @@ QDF_STATUS wma_process_tsm_stats_req(tp_wma_handle wma_handler,
 		return QDF_STATUS_E_NOMEM;
 	}
 	pTsmRspParams->staId = pStats->staId;
+	qdf_copy_macaddr(&pTsmRspParams->bssid, &pStats->bssId);
 	pTsmRspParams->rc = QDF_STATUS_E_FAILURE;
 	pTsmRspParams->tsmStatsReq = pStats;
 	pTsmMetric = &pTsmRspParams->tsmMetrics;