qcacmn: Increase fw_txrx rem stats counter size

rem_stats keeps counter of remaining stats to be processed.
At present this counter is of type uint8_t and hence can
accumulate till 256 counter but num_stats is of type uint32_t.
Hence if remainting stats to be precessed is 256 then rem_stats
value will be 0 as it will only consider LSB 8 BITS and it will
result in stats mismatch and hence memory leak.

Increasing size to uint64_t to accumulate more counter size.

Change-Id: Ifa86c7e4a73a5a700e9033c8756e986d86025cf9
This commit is contained in:
Ankit Kumar
2019-10-12 15:47:23 +05:30
committed by nshrivas
parent ce8c3108d5
commit f3557ff4d1

View File

@@ -1926,7 +1926,7 @@ void htt_t2h_stats_handler(void *context)
uint32_t *msg_word;
qdf_nbuf_t htt_msg = NULL;
uint8_t done;
uint8_t rem_stats;
uint32_t rem_stats;
if (!soc || !qdf_atomic_read(&soc->cmn_init_done)) {
QDF_TRACE(QDF_MODULE_ID_TXRX, QDF_TRACE_LEVEL_ERROR,
@@ -1959,10 +1959,14 @@ void htt_t2h_stats_handler(void *context)
rem_stats = --soc->htt_stats.num_stats;
qdf_spin_unlock_bh(&soc->htt_stats.lock);
dp_process_htt_stat_msg(&htt_stats, soc);
/* If there are more stats to process, schedule stats work again */
/* If there are more stats to process, schedule stats work again.
* Scheduling prior to processing ht_stats to queue with early
* index
*/
if (rem_stats)
qdf_sched_work(0, &soc->htt_stats.work);
dp_process_htt_stat_msg(&htt_stats, soc);
}
/*