From f52e7f0e38ff40ead398d43067e8437531bee2e0 Mon Sep 17 00:00:00 2001 From: Sai Rupesh Chevuru Date: Mon, 11 Apr 2022 20:46:14 +0530 Subject: [PATCH] qcacmn: Special cases handling in the case of multicast MLO In the case of ME6, Backhaul WDS, NAWDS 1. Send the igmp pkt on the same link where it received, as these features will use peer based FW metadata. 2. Bypass the reinjection. Change-Id: Idf0058e182257fbcedd8eb5fc8bcde945e8a91bc CRs-Fixed: 3171558 --- dp/wifi3.0/be/dp_be_rx.c | 9 ++++++++- dp/wifi3.0/dp_tx.c | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/be/dp_be_rx.c b/dp/wifi3.0/be/dp_be_rx.c index 0af82a2bc0..5ccb4307e7 100644 --- a/dp/wifi3.0/be/dp_be_rx.c +++ b/dp/wifi3.0/be/dp_be_rx.c @@ -1112,10 +1112,17 @@ bool dp_rx_mlo_igmp_handler(struct dp_soc *soc, if (!(qdf_nbuf_is_ipv4_igmp_pkt(nbuf) || qdf_nbuf_is_ipv6_igmp_pkt(nbuf))) return false; + /* + * In the case of ME6, Backhaul WDS, NAWDS + * send the igmp pkt on the same link where it received, + * as these features will use peer based tcl metadata + */ qdf_nbuf_set_next(nbuf, NULL); - if (vdev->mcast_enhancement_en || be_vdev->mcast_primary) + if (vdev->mcast_enhancement_en || be_vdev->mcast_primary || + qdf_atomic_test_bit(WDS_EXT_PEER_INIT_BIT, &peer->wds_ext.init) || + peer->nawds_enabled) goto send_pkt; mcast_primary_vdev = dp_mlo_get_mcast_primary_vdev(be_soc, be_vdev, diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c index f139ba652d..a9c39f0860 100644 --- a/dp/wifi3.0/dp_tx.c +++ b/dp/wifi3.0/dp_tx.c @@ -2102,6 +2102,15 @@ int dp_tx_frame_is_drop(struct dp_vdev *vdev, uint8_t *srcmac, uint8_t *dstmac) /* MLO vdev id inc offset */ #define DP_MLO_VDEV_ID_OFFSET 0x80 +static inline void +dp_tx_bypass_reinjection(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc) +{ + if (!(tx_desc->flags & DP_TX_DESC_FLAG_TO_FW)) { + tx_desc->flags |= DP_TX_DESC_FLAG_TO_FW; + qdf_atomic_inc(&soc->num_tx_exception); + } +} + static inline void dp_tx_update_mcast_param(uint16_t peer_id, uint16_t *htt_tcl_metadata, @@ -2122,6 +2131,11 @@ dp_tx_update_mcast_param(uint16_t peer_id, } } #else +static inline void +dp_tx_bypass_reinjection(struct dp_soc *soc, struct dp_tx_desc_s *tx_desc) +{ +} + static inline void dp_tx_update_mcast_param(uint16_t peer_id, uint16_t *htt_tcl_metadata, @@ -2179,6 +2193,7 @@ dp_tx_send_msdu_single(struct dp_vdev *vdev, qdf_nbuf_t nbuf, DP_TCL_METADATA_TYPE_PEER_BASED); DP_TX_TCL_METADATA_PEER_ID_SET(htt_tcl_metadata, peer_id); + dp_tx_bypass_reinjection(soc, tx_desc); } else htt_tcl_metadata = vdev->htt_tcl_metadata;