diff --git a/dp/wifi3.0/dp_rx.c b/dp/wifi3.0/dp_rx.c index 26a43c1ee6..b109446df8 100644 --- a/dp/wifi3.0/dp_rx.c +++ b/dp/wifi3.0/dp_rx.c @@ -2097,32 +2097,6 @@ void dp_rx_deliver_to_pkt_capture_no_peer(struct dp_soc *soc, qdf_nbuf_t nbuf, #endif -#if defined(FEATURE_MCL_REPEATER) && defined(FEATURE_MEC) -/** - * dp_rx_mec_check_wrapper() - wrapper to dp_rx_mcast_echo_check - * @soc: core DP main context - * @peer: dp peer handler - * @rx_tlv_hdr: start of the rx TLV header - * @nbuf: pkt buffer - * - * Return: bool (true if it is a looped back pkt else false) - */ -static inline bool dp_rx_mec_check_wrapper(struct dp_soc *soc, - struct dp_peer *peer, - uint8_t *rx_tlv_hdr, - qdf_nbuf_t nbuf) -{ - return dp_rx_mcast_echo_check(soc, peer, rx_tlv_hdr, nbuf); -} -#else -static inline bool dp_rx_mec_check_wrapper(struct dp_soc *soc, - struct dp_peer *peer, - uint8_t *rx_tlv_hdr, - qdf_nbuf_t nbuf) -{ - return false; -} -#endif #endif /* QCA_HOST_MODE_WIFI_DISABLED */ QDF_STATUS dp_rx_vdev_detach(struct dp_vdev *vdev) diff --git a/dp/wifi3.0/li/dp_li_rx.c b/dp/wifi3.0/li/dp_li_rx.c index b809d5593c..1d2ac4f5e7 100644 --- a/dp/wifi3.0/li/dp_li_rx.c +++ b/dp/wifi3.0/li/dp_li_rx.c @@ -54,6 +54,35 @@ bool is_sa_da_idx_valid(struct dp_soc *soc, uint8_t *rx_tlv_hdr, return true; } +#ifndef QCA_HOST_MODE_WIFI_DISABLED +#if defined(FEATURE_MCL_REPEATER) && defined(FEATURE_MEC) +/** + * dp_rx_mec_check_wrapper() - wrapper to dp_rx_mcast_echo_check + * @soc: core DP main context + * @peer: dp peer handler + * @rx_tlv_hdr: start of the rx TLV header + * @nbuf: pkt buffer + * + * Return: bool (true if it is a looped back pkt else false) + */ +static inline bool dp_rx_mec_check_wrapper(struct dp_soc *soc, + struct dp_peer *peer, + uint8_t *rx_tlv_hdr, + qdf_nbuf_t nbuf) +{ + return dp_rx_mcast_echo_check(soc, peer, rx_tlv_hdr, nbuf); +} +#else +static inline bool dp_rx_mec_check_wrapper(struct dp_soc *soc, + struct dp_peer *peer, + uint8_t *rx_tlv_hdr, + qdf_nbuf_t nbuf) +{ + return false; +} +#endif +#endif + /** * dp_rx_process_li() - Brain of the Rx processing functionality * Called from the bottom half (tasklet/NET_RX_SOFTIRQ) @@ -702,6 +731,17 @@ done: DP_STATS_INC(soc, rx.err.invalid_sa_da_idx, 1); continue; } + if (qdf_unlikely(dp_rx_mec_check_wrapper(soc, + peer, + rx_tlv_hdr, + nbuf))) { + /* this is a looped back MCBC pkt,drop it */ + DP_STATS_INC_PKT(peer, rx.mec_drop, 1, + QDF_NBUF_CB_RX_PKT_LEN(nbuf)); + qdf_nbuf_free(nbuf); + nbuf = next; + continue; + } /* WDS Source Port Learning */ if (qdf_likely(vdev->wds_enabled)) dp_rx_wds_srcport_learn(soc,