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
This commit is contained in:
Abhinav Kumar 2019-01-11 20:02:26 +05:30 • committed by nshrivas
commit aa8f2dffcc
3 changed files with 4 additions and 3 deletions

View file

@ -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;

View file

@ -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 */

View file

@ -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;