Browse Source

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
Pamidipati, Vijay 8 years ago
parent
commit
dfe618e3b5
2 changed files with 16 additions and 1 deletions
  1. 15 0
      hal/wifi3.0/hal_api.h
  2. 1 1
      hif/src/ce/ce_service_srng.c

+ 15 - 0
hal/wifi3.0/hal_api.h

@@ -492,6 +492,21 @@ static inline void hal_srng_access_end(void *hal_soc, void *hal_ring)
 	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

+ 1 - 1
hif/src/ce/ce_service_srng.c

@@ -519,7 +519,7 @@ ce_completed_send_next_nolock_srng(struct CE_state *CE_state,
 		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;
 }