qcacmn: Ignore rx hw stats reo command status callback
Host queries for reo hw stats by sending reo queue status command on all the rx tids. After sending host waits to receive for all the rx tids reo hw stats. If the hw stats reo status is not received for all the rx tids with in the specified timeout value corresponding peers's reference is released. In parallel if disconnect happens from userspace, there is always a chance to access the freed rxtid reference in rx hw stats callback. So in case of rx hw stats event timeout ignore processing the reo command status rx stats callback. Change-Id: I0aba346a25564a3c29751f1f5a1d4e9204b93d33 CRs-Fixed: 2619720
This commit is contained in:
@@ -3586,17 +3586,20 @@ bool dp_find_peer_exist(struct cdp_soc_t *soc_hdl, uint8_t pdev_id,
|
||||
* @dp_stats_cmd_cb: REO command callback function
|
||||
* @cb_ctxt: Callback context
|
||||
*
|
||||
* Return: none
|
||||
* Return: count of tid stats cmd send succeeded
|
||||
*/
|
||||
void dp_peer_rxtid_stats(struct dp_peer *peer, void (*dp_stats_cmd_cb),
|
||||
int dp_peer_rxtid_stats(struct dp_peer *peer,
|
||||
dp_rxtid_stats_cmd_cb dp_stats_cmd_cb,
|
||||
void *cb_ctxt)
|
||||
{
|
||||
struct dp_soc *soc = peer->vdev->pdev->soc;
|
||||
struct hal_reo_cmd_params params;
|
||||
int i;
|
||||
int stats_cmd_sent_cnt = 0;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!dp_stats_cmd_cb)
|
||||
return;
|
||||
return stats_cmd_sent_cnt;
|
||||
|
||||
qdf_mem_zero(¶ms, sizeof(params));
|
||||
for (i = 0; i < DP_MAX_TIDS; i++) {
|
||||
@@ -3609,13 +3612,20 @@ void dp_peer_rxtid_stats(struct dp_peer *peer, void (*dp_stats_cmd_cb),
|
||||
(uint64_t)(rx_tid->hw_qdesc_paddr) >> 32;
|
||||
|
||||
if (cb_ctxt) {
|
||||
dp_reo_send_cmd(soc, CMD_GET_QUEUE_STATS,
|
||||
¶ms, dp_stats_cmd_cb, cb_ctxt);
|
||||
status = dp_reo_send_cmd(
|
||||
soc, CMD_GET_QUEUE_STATS,
|
||||
¶ms, dp_stats_cmd_cb,
|
||||
cb_ctxt);
|
||||
} else {
|
||||
dp_reo_send_cmd(soc, CMD_GET_QUEUE_STATS,
|
||||
¶ms, dp_stats_cmd_cb, rx_tid);
|
||||
status = dp_reo_send_cmd(
|
||||
soc, CMD_GET_QUEUE_STATS,
|
||||
¶ms, dp_stats_cmd_cb,
|
||||
rx_tid);
|
||||
}
|
||||
|
||||
if (QDF_IS_STATUS_SUCCESS(status))
|
||||
stats_cmd_sent_cnt++;
|
||||
|
||||
/* Flush REO descriptor from HW cache to update stats
|
||||
* in descriptor memory. This is to help debugging */
|
||||
qdf_mem_zero(¶ms, sizeof(params));
|
||||
@@ -3629,6 +3639,8 @@ void dp_peer_rxtid_stats(struct dp_peer *peer, void (*dp_stats_cmd_cb),
|
||||
NULL);
|
||||
}
|
||||
}
|
||||
|
||||
return stats_cmd_sent_cnt;
|
||||
}
|
||||
|
||||
QDF_STATUS
|
||||
|
Reference in New Issue
Block a user