Răsfoiți Sursa

qcacmn: Don't return error when mon status ring replenish fails

Don't return error even when host fails to attach single
buffer to monitor status ring, because in ring process path
buffer attach should be taken care if not done in replenish path.

Change-Id: Id032959234a66d3eb4c35819f760d37eb92a08be
CRs-Fixed: 3634756
Karthik Kantamneni 1 an în urmă
părinte
comite
6f36269b7a
1 a modificat fișierele cu 9 adăugiri și 9 ștergeri
  1. 9 9
      dp/wifi3.0/monitor/1.0/dp_rx_mon_status_1.0.c

+ 9 - 9
dp/wifi3.0/monitor/1.0/dp_rx_mon_status_1.0.c

@@ -1033,7 +1033,7 @@ QDF_STATUS dp_rx_mon_status_buffers_replenish(struct dp_soc *dp_soc,
 	union dp_rx_desc_list_elem_t *next;
 	union dp_rx_desc_list_elem_t *next;
 	void *rxdma_srng;
 	void *rxdma_srng;
 	struct dp_pdev *dp_pdev = dp_get_pdev_for_lmac_id(dp_soc, mac_id);
 	struct dp_pdev *dp_pdev = dp_get_pdev_for_lmac_id(dp_soc, mac_id);
-	QDF_STATUS status = QDF_STATUS_SUCCESS;
+	uint32_t hp, tp;
 
 
 	if (!dp_pdev) {
 	if (!dp_pdev) {
 		dp_rx_mon_status_debug("%pK: pdev is null for mac_id = %d",
 		dp_rx_mon_status_debug("%pK: pdev is null for mac_id = %d",
@@ -1093,19 +1093,19 @@ QDF_STATUS dp_rx_mon_status_buffers_replenish(struct dp_soc *dp_soc,
 		 * to fill in buffer at current HP.
 		 * to fill in buffer at current HP.
 		 */
 		 */
 		if (qdf_unlikely(!rx_netbuf)) {
 		if (qdf_unlikely(!rx_netbuf)) {
-			dp_rx_mon_status_err("%pK: qdf_nbuf allocate or map fail, count %d",
-					     dp_soc, count);
+			hal_get_sw_hptp(dp_soc->hal_soc, rxdma_srng, &tp, &hp);
+			dp_err("%pK: qdf_nbuf allocate or map fail, count %d hp:%u tp:%u",
+			       dp_soc, count, hp, tp);
 			/*
 			/*
 			 * If buffer allocation fails on current HP, then
 			 * If buffer allocation fails on current HP, then
 			 * decrement HP so it will be set to previous index
 			 * decrement HP so it will be set to previous index
 			 * where proper buffer is attached.
 			 * where proper buffer is attached.
 			 */
 			 */
-			if (!count)
-				status = QDF_STATUS_E_NOMEM;
-			else
-				hal_srng_src_dec_hp(dp_soc->hal_soc,
-						    rxdma_srng);
+			hal_srng_src_dec_hp(dp_soc->hal_soc,
+					    rxdma_srng);
 
 
+			hal_get_sw_hptp(dp_soc->hal_soc, rxdma_srng, &tp, &hp);
+			dp_err("HP adjusted to proper buffer index, hp:%u tp:%u", hp, tp);
 			break;
 			break;
 		}
 		}
 
 
@@ -1160,7 +1160,7 @@ QDF_STATUS dp_rx_mon_status_buffers_replenish(struct dp_soc *dp_soc,
 			mac_id, rx_desc_pool);
 			mac_id, rx_desc_pool);
 	}
 	}
 
 
-	return status;
+	return QDF_STATUS_SUCCESS;
 }
 }
 
 
 #if !defined(DISABLE_MON_CONFIG) && defined(MON_ENABLE_DROP_FOR_MAC)
 #if !defined(DISABLE_MON_CONFIG) && defined(MON_ENABLE_DROP_FOR_MAC)