Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 38c775e7 authored by Venkateswara Naralasetty's avatar Venkateswara Naralasetty Committed by Ananya Gupta
Browse files

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
parent f581e710
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Permission to use, copy, modify, and/or distribute this software for
 * any purpose with or without fee is hereby granted, provided that the
@@ -643,7 +643,8 @@ dp_rx_intrabss_fwd(struct dp_soc *soc,
				}
			}

			if (!dp_tx_send((struct cdp_soc_t *)soc,
			if (!soc->is_tx_pause &&
			    !dp_tx_send((struct cdp_soc_t *)soc,
					ta_peer->vdev->vdev_id, nbuf)) {
				DP_STATS_INC_PKT(ta_peer, rx.intra_bss.pkts, 1,
						 len);
@@ -684,17 +685,18 @@ dp_rx_intrabss_fwd(struct dp_soc *soc,

		/* Set cb->ftype to intrabss FWD */
		qdf_nbuf_set_tx_ftype(nbuf_copy, CB_FTYPE_INTRABSS_FWD);
		if (dp_tx_send((struct cdp_soc_t *)soc,
			       ta_peer->vdev->vdev_id, nbuf_copy)) {

		if (!soc->is_tx_pause && !dp_tx_send((struct cdp_soc_t *)soc,
						     ta_peer->vdev->vdev_id,
						     nbuf_copy)) {
			DP_STATS_INC_PKT(ta_peer, rx.intra_bss.pkts, 1, len);
			tid_stats->intrabss_cnt++;
		} else {
			DP_STATS_INC_PKT(ta_peer, rx.intra_bss.fail, 1, len);
			tid_stats->fail_cnt[INTRABSS_DROP]++;
			qdf_nbuf_free(nbuf_copy);
		} else {
			DP_STATS_INC_PKT(ta_peer, rx.intra_bss.pkts, 1, len);
			tid_stats->intrabss_cnt++;
		}
	}

end:
	/* return false as we have to still send the original pkt
	 * up the stack