msm: ipa : Fix update of buffer recycle stats

The stats for tmp allocs should be updated only if additional
buffers are available.

Change-Id: Ic064f87a54e37ef046d6761c79664e1ea830d04c
Acked-by: Priyadarshini Rajagopal <prajagop@qti.qualcomm.com>
Signed-off-by: Bojun Pan <bojunp@codeaurora.org>
This commit is contained in:
Bojun Pan 2019-09-26 19:25:27 -07:00 • committed by Gerrit - the friendly Code Review server
commit 791e8ab19a

View file

@ -1975,9 +1975,9 @@ static void ipa3_replenish_rx_page_recycle(struct ipa3_sys_context *sys)
* Could not find idle page at curr index.
* Allocate a new one.
*/
ipa3_ctx->stats.page_recycle_stats[stats_i].tmp_alloc++;
if (curr_wq == atomic_read(&sys->repl->tail_idx))
break;
ipa3_ctx->stats.page_recycle_stats[stats_i].tmp_alloc++;
rx_pkt = sys->repl->cache[curr_wq];
curr_wq = (++curr_wq == sys->repl->capacity) ?
0 : curr_wq;