qcacmn: Fix napi bucket calulation issue

In case of fast patch CE_state->receive_count can go beyond
HIF_NAPI_MAX_RECEIVES as batch processing is happening. This
is causing bucket calculation working. In this case setting
receive_count to HIF_NAPI_MAX_RECEIVES as a fix.

Change-Id: I3179b6f9f893342ead68e46dc4b75fd55e6c7839
CRs-Fixed: 2331579
Цей коміт міститься в:
Venkateswara Swamy Bandaru
2018-10-10 19:31:06 +05:30
зафіксовано nshrivas
джерело 2fcd71bff6
коміт 9578c2adec

Переглянути файл

@@ -262,6 +262,15 @@ bool hif_ce_service_should_yield(struct hif_softc *scn,
struct CE_state *ce_state)
{
bool yield = hif_max_num_receives_reached(scn, ce_state->receive_count);
/* Setting receive_count to MAX_NUM_OF_RECEIVES when this count goes
* beyond MAX_NUM_OF_RECEIVES for NAPI backet calulation issue. This
* can happen in fast path handling as processing is happenning in
* batches.
*/
if (yield)
ce_state->receive_count = MAX_NUM_OF_RECEIVES;
return yield;
}
#else
@@ -284,6 +293,14 @@ bool hif_ce_service_should_yield(struct hif_softc *scn,
rxpkt_thresh_reached = hif_max_num_receives_reached
(scn, ce_state->receive_count);
/* Setting receive_count to MAX_NUM_OF_RECEIVES when this count goes
* beyond MAX_NUM_OF_RECEIVES for NAPI backet calulation issue. This
* can happen in fast path handling as processing is happenning in
* batches.
*/
if (rxpkt_thresh_reached)
ce_state->receive_count = MAX_NUM_OF_RECEIVES;
yield = time_limit_reached || rxpkt_thresh_reached;
if (yield && ce_state->htt_rx_data)