Explorar o código

qcacmn: Remove skip HP update logic during tx pause flag is set

Currently HP update can skip for few packets if the system suspend
is happening in parallel with tx. This could lead to SMMU fault if
the skipped HP update goes after tx desc force free.

Remove the tx pause check in HP updates and have the check before
calling dp_tx_send in case of intra-bss forward case. No special
handling is needed for non intra-bss case as we don't expect packets
from network stack after suspend.

Change-Id: Id4f2cefcc0a14e7c16438b9bda5cb1d55eb05050
CRs-Fixed: 3327818
Venkateswara Naralasetty %!s(int64=2) %!d(string=hai) anos
pai
achega
cdbbb3ed59
Modificáronse 2 ficheiros con 13 adicións e 12 borrados
  1. 11 8
      dp/wifi3.0/dp_rx.c
  2. 2 4
      dp/wifi3.0/dp_tx.c

+ 11 - 8
dp/wifi3.0/dp_rx.c

@@ -1075,16 +1075,18 @@ bool dp_rx_intrabss_mcbc_fwd(struct dp_soc *soc, struct dp_txrx_peer *ta_peer,
 						      tid_stats))
 		return false;
 
-	if (dp_tx_send((struct cdp_soc_t *)soc,
-		       ta_peer->vdev->vdev_id, nbuf_copy)) {
+	/* Don't send packets if tx is paused */
+	if (!soc->is_tx_pause &&
+	    !dp_tx_send((struct cdp_soc_t *)soc,
+			ta_peer->vdev->vdev_id, nbuf_copy)) {
+		DP_PEER_PER_PKT_STATS_INC_PKT(ta_peer, rx.intra_bss.pkts, 1,
+					      len);
+		tid_stats->intrabss_cnt++;
+	} else {
 		DP_PEER_PER_PKT_STATS_INC_PKT(ta_peer, rx.intra_bss.fail, 1,
 					      len);
 		tid_stats->fail_cnt[INTRABSS_DROP]++;
 		dp_rx_nbuf_free(nbuf_copy);
-	} else {
-		DP_PEER_PER_PKT_STATS_INC_PKT(ta_peer, rx.intra_bss.pkts, 1,
-					      len);
-		tid_stats->intrabss_cnt++;
 	}
 	return false;
 }
@@ -1135,8 +1137,9 @@ bool dp_rx_intrabss_ucast_fwd(struct dp_soc *soc, struct dp_txrx_peer *ta_peer,
 	qdf_mem_set(nbuf->cb, 0x0, sizeof(nbuf->cb));
 	dp_classify_critical_pkts(soc, ta_peer->vdev, nbuf);
 
-	if (!dp_tx_send((struct cdp_soc_t *)soc,
-			tx_vdev_id, nbuf)) {
+	/* Don't send packets if tx is paused */
+	if (!soc->is_tx_pause && !dp_tx_send((struct cdp_soc_t *)soc,
+					     tx_vdev_id, nbuf)) {
 		DP_PEER_PER_PKT_STATS_INC_PKT(ta_peer, rx.intra_bss.pkts, 1,
 					      len);
 	} else {

+ 2 - 4
dp/wifi3.0/dp_tx.c

@@ -1635,8 +1635,7 @@ dp_tx_ring_access_end_wrapper(struct dp_soc *soc,
 
 	ret = hif_rtpm_get(HIF_RTPM_GET_ASYNC, HIF_RTPM_ID_DP);
 	if (QDF_IS_STATUS_SUCCESS(ret)) {
-		if (hif_system_pm_state_check(soc->hif_handle) ||
-					qdf_unlikely(soc->is_tx_pause)) {
+		if (hif_system_pm_state_check(soc->hif_handle)) {
 			dp_tx_hal_ring_access_end_reap(soc, hal_ring_hdl);
 			hal_srng_set_event(hal_ring_hdl, HAL_SRNG_FLUSH_EVENT);
 			hal_srng_inc_flush_cnt(hal_ring_hdl);
@@ -1661,8 +1660,7 @@ dp_tx_ring_access_end_wrapper(struct dp_soc *soc,
 			      hal_ring_handle_t hal_ring_hdl,
 			      int coalesce)
 {
-	if (hif_system_pm_state_check(soc->hif_handle) ||
-					qdf_unlikely(soc->is_tx_pause)) {
+	if (hif_system_pm_state_check(soc->hif_handle)) {
 		dp_tx_hal_ring_access_end_reap(soc, hal_ring_hdl);
 		hal_srng_set_event(hal_ring_hdl, HAL_SRNG_FLUSH_EVENT);
 		hal_srng_inc_flush_cnt(hal_ring_hdl);