qcacmn: Make napi rely on rx_pending flag
Use the rx_pending flag to determine if there is more work.
hif_napi_poll should not rely on the amount of work done
to determine if there is more work to do.
Change-Id: Ibf83cfb8f9aed6fdc3400b6a6945156283f56485
CRs-Fixed: 998319
diff --git a/hif/src/ce/ce_service.c b/hif/src/ce/ce_service.c
index 476a288..c5028d8 100644
--- a/hif/src/ce/ce_service.c
+++ b/hif/src/ce/ce_service.c
@@ -1982,14 +1982,13 @@
/**
* ce_check_rx_pending() - ce_check_rx_pending
- * @scn: hif_softc
- * @ce_id: ce_id
+ * @CE_state: context of the copy engine to check
*
- * Return: bool
+ * Return: true if there per_engine_service
+ * didn't process all the rx descriptors.
*/
-bool ce_check_rx_pending(struct hif_softc *scn, int ce_id)
+bool ce_check_rx_pending(struct CE_state *CE_state)
{
- struct CE_state *CE_state = scn->ce_id_to_state[ce_id];
if (qdf_atomic_read(&CE_state->rx_pending))
return true;
else