qcacmn: Add a new version of hal_srng API does not update HW pointer
Add hal_srng unlock API to be used in completions reap funtion (CE) in
which HW head pointer/tail pointers need not be updated
CRs-Fixed: 1088985
Change-Id: Ia54b144e5dfd0b37bbabf992c764697928ddf76d
diff --git a/hal/wifi3.0/hal_api.h b/hal/wifi3.0/hal_api.h
index 1051286..20652c5 100644
--- a/hal/wifi3.0/hal_api.h
+++ b/hal/wifi3.0/hal_api.h
@@ -492,6 +492,21 @@
SRNG_UNLOCK(&(srng->lock));
}
+/**
+ * hal_srng_access_end_reap - Unlock ring access
+ * This should be used only if hal_srng_access_start to start ring access
+ * and should be used only while reaping SRC ring completions
+ *
+ * @hal_soc: Opaque HAL SOC handle
+ * @hal_ring: Ring pointer (Source or Destination ring)
+ *
+ * Return: 0 on success; error on failire
+ */
+static inline void hal_srng_access_end_reap(void *hal_soc, void *hal_ring)
+{
+ struct hal_srng *srng = (struct hal_srng *)hal_ring;
+ SRNG_UNLOCK(&(srng->lock));
+}
/* TODO: Check if the following definitions is available in HW headers */
#define WBM_IDLE_DESC_LIST 1
diff --git a/hif/src/ce/ce_service_srng.c b/hif/src/ce/ce_service_srng.c
index e65bf62..352b968 100644
--- a/hif/src/ce/ce_service_srng.c
+++ b/hif/src/ce/ce_service_srng.c
@@ -519,7 +519,7 @@
src_ring->sw_index = sw_index;
status = QDF_STATUS_SUCCESS;
}
- hal_srng_access_end(scn->hal_soc, src_ring->srng_ctx);
+ hal_srng_access_end_reap(scn->hal_soc, src_ring->srng_ctx);
return status;
}