qcacmn: create work queue to process htt stats

process htt stats in work queue context

Change-Id: Ibacc09e3921da2fa88173bc0cfdc2f0ced51cc68
CRs-Fixed: 2070977
This commit is contained in:
Om Prakash Tripathi
2017-07-07 20:27:25 +05:30
committed by snandini
parent bd5b3c2c9b
commit 2cd7fab473
4 changed files with 27 additions and 1 deletions

View File

@@ -1060,6 +1060,15 @@ error:
qdf_nbuf_free(htt_msg);
}
void htt_t2h_stats_handler(void *context)
{
struct dp_soc *soc = (struct dp_soc *)context;
if (soc && qdf_atomic_read(&soc->cmn_init_done))
dp_process_htt_stat_msg(soc);
}
/**
* dp_txrx_fw_stats_handler():Function to process HTT EXT stats
* @soc: DP SOC handle
@@ -1116,7 +1125,7 @@ static inline void dp_txrx_fw_stats_handler(struct dp_soc *soc,
* HTT EXT STATS message
*/
if (done)
dp_process_htt_stat_msg(soc);
qdf_sched_work(0, &soc->htt_stats_work);
return;

View File

@@ -145,4 +145,12 @@ int htt_h2t_rx_ring_cfg(void *htt_soc, int pdev_id, void *hal_srng,
int hal_ring_type, int ring_buf_size,
struct htt_rx_ring_tlv_filter *htt_tlv_filter);
/*
* htt_t2h_stats_handler() - target to host stats work handler
* @context: context (dp soc context)
*
* Return: void
*/
void htt_t2h_stats_handler(void *context);
#endif /* _DP_HTT_H_ */

View File

@@ -1510,6 +1510,9 @@ static void dp_soc_detach_wifi3(void *txrx_soc)
qdf_atomic_set(&soc->cmn_init_done, 0);
qdf_flush_work(0, &soc->htt_stats_work);
qdf_disable_work(0, &soc->htt_stats_work);
for (i = 0; i < MAX_PDEV_CNT; i++) {
if (soc->pdev_list[i])
dp_pdev_detach_wifi3(
@@ -1714,6 +1717,10 @@ static int dp_soc_attach_target_wifi3(struct cdp_soc_t *cdp_soc)
dp_rxdma_ring_config(soc);
DP_STATS_INIT(soc);
/* initialize work queue for stats processing */
qdf_create_work(0, &soc->htt_stats_work, htt_t2h_stats_handler, soc);
return 0;
}

View File

@@ -652,6 +652,8 @@ struct dp_soc {
qdf_nbuf_queue_t htt_stats_msg;
/* T2H Ext stats message length */
uint32_t htt_msg_len;
/* work queue to process htt stats */
qdf_work_t htt_stats_work;
};
#define MAX_RX_MAC_RINGS 2
/* Same as NAC_MAX_CLENT */