Browse Source

qcacmn: Fix 'need_status' during rxtid deletion

Set 'need_status' while sending REO queue update command
for deleting REO queues to get status from HW, which will
trigger callback to cleanup and free the queues.
Also fix issue in initializing REO command descriptor, causing
command number to be cleared.

Change-Id: Ie30fc80f76d835e239dd0b3d3e78c7f32bfa09a4
Karunakar Dasineni 6 years ago
parent
commit
6a5267501f
2 changed files with 19 additions and 7 deletions
  1. 1 1
      dp/wifi3.0/dp_peer.c
  2. 18 6
      hal/wifi3.0/hal_reo.c

+ 1 - 1
dp/wifi3.0/dp_peer.c

@@ -1521,7 +1521,7 @@ static int dp_rx_tid_delete_wifi3(struct dp_peer *peer, int tid)
 
 	qdf_mem_zero(&params, sizeof(params));
 
-	params.std.need_status = 0;
+	params.std.need_status = 1;
 	params.std.addr_lo = rx_tid->hw_qdesc_paddr & 0xffffffff;
 	params.std.addr_hi = (uint64_t)(rx_tid->hw_qdesc_paddr) >> 32;
 	params.u.upd_queue_params.update_vld = 1;

+ 18 - 6
hal/wifi3.0/hal_reo.c

@@ -102,7 +102,9 @@ inline int hal_reo_cmd_queue_stats(void *reo_ring, struct hal_soc *soc,
 	/* Offsets of descriptor fields defined in HW headers start from
 	 * the field after TLV header */
 	reo_desc += (sizeof(struct tlv_32_hdr) >> 2);
-	qdf_mem_zero((void *)reo_desc, sizeof(struct reo_get_queue_stats));
+	qdf_mem_zero((void *)(reo_desc + NUM_OF_DWORDS_UNIFORM_REO_CMD_HEADER),
+		     sizeof(struct reo_get_queue_stats) -
+		     (NUM_OF_DWORDS_UNIFORM_REO_CMD_HEADER << 2));
 
 	HAL_DESC_SET_FIELD(reo_desc, UNIFORM_REO_CMD_HEADER_0,
 		REO_STATUS_REQUIRED, cmd->std.need_status);
@@ -142,7 +144,9 @@ inline int hal_reo_cmd_flush_queue(void *reo_ring, struct hal_soc *soc,
 	/* Offsets of descriptor fields defined in HW headers start from
 	 * the field after TLV header */
 	reo_desc += (sizeof(struct tlv_32_hdr) >> 2);
-	qdf_mem_zero((void *)reo_desc, sizeof(struct reo_flush_queue));
+	qdf_mem_zero((void *)(reo_desc + NUM_OF_DWORDS_UNIFORM_REO_CMD_HEADER),
+		     sizeof(struct reo_flush_queue) -
+		     (NUM_OF_DWORDS_UNIFORM_REO_CMD_HEADER << 2));
 
 	HAL_DESC_SET_FIELD(reo_desc, UNIFORM_REO_CMD_HEADER_0,
 		REO_STATUS_REQUIRED, cmd->std.need_status);
@@ -207,7 +211,9 @@ inline int hal_reo_cmd_flush_cache(void *reo_ring, struct hal_soc *soc,
 	/* Offsets of descriptor fields defined in HW headers start from
 	 * the field after TLV header */
 	reo_desc += (sizeof(struct tlv_32_hdr) >> 2);
-	qdf_mem_zero((void *)reo_desc, sizeof(struct reo_flush_cache));
+	qdf_mem_zero((void *)(reo_desc + NUM_OF_DWORDS_UNIFORM_REO_CMD_HEADER),
+		     sizeof(struct reo_flush_cache) -
+		     (NUM_OF_DWORDS_UNIFORM_REO_CMD_HEADER << 2));
 
 	HAL_DESC_SET_FIELD(reo_desc, UNIFORM_REO_CMD_HEADER_0,
 		REO_STATUS_REQUIRED, cmd->std.need_status);
@@ -277,7 +283,9 @@ inline int hal_reo_cmd_unblock_cache(void *reo_ring, struct hal_soc *soc,
 	/* Offsets of descriptor fields defined in HW headers start from
 	 * the field after TLV header */
 	reo_desc += (sizeof(struct tlv_32_hdr) >> 2);
-	qdf_mem_zero((void *)reo_desc, sizeof(struct reo_unblock_cache));
+	qdf_mem_zero((void *)(reo_desc + NUM_OF_DWORDS_UNIFORM_REO_CMD_HEADER),
+		     sizeof(struct reo_unblock_cache) -
+		     (NUM_OF_DWORDS_UNIFORM_REO_CMD_HEADER << 2));
 
 	HAL_DESC_SET_FIELD(reo_desc, UNIFORM_REO_CMD_HEADER_0,
 		REO_STATUS_REQUIRED, cmd->std.need_status);
@@ -318,7 +326,9 @@ inline int hal_reo_cmd_flush_timeout_list(void *reo_ring, struct hal_soc *soc,
 	/* Offsets of descriptor fields defined in HW headers start from
 	 * the field after TLV header */
 	reo_desc += (sizeof(struct tlv_32_hdr) >> 2);
-	qdf_mem_zero((void *)reo_desc, sizeof(struct reo_flush_timeout_list));
+	qdf_mem_zero((void *)(reo_desc + NUM_OF_DWORDS_UNIFORM_REO_CMD_HEADER),
+		     sizeof(struct reo_flush_timeout_list) -
+		     (NUM_OF_DWORDS_UNIFORM_REO_CMD_HEADER << 2));
 
 	HAL_DESC_SET_FIELD(reo_desc, UNIFORM_REO_CMD_HEADER_0,
 		REO_STATUS_REQUIRED, cmd->std.need_status);
@@ -364,7 +374,9 @@ inline int hal_reo_cmd_update_rx_queue(void *reo_ring, struct hal_soc *soc,
 	/* Offsets of descriptor fields defined in HW headers start from
 	 * the field after TLV header */
 	reo_desc += (sizeof(struct tlv_32_hdr) >> 2);
-	qdf_mem_zero((void *)reo_desc, sizeof(struct reo_update_rx_reo_queue));
+	qdf_mem_zero((void *)(reo_desc + NUM_OF_DWORDS_UNIFORM_REO_CMD_HEADER),
+		     sizeof(struct reo_update_rx_reo_queue) -
+		     (NUM_OF_DWORDS_UNIFORM_REO_CMD_HEADER << 2));
 
 	HAL_DESC_SET_FIELD(reo_desc, UNIFORM_REO_CMD_HEADER_0,
 		REO_STATUS_REQUIRED, cmd->std.need_status);