diff --git a/dp/wifi3.0/dp_rx.h b/dp/wifi3.0/dp_rx.h index bac3fc3f57..d8e662c22c 100644 --- a/dp/wifi3.0/dp_rx.h +++ b/dp/wifi3.0/dp_rx.h @@ -1310,6 +1310,23 @@ dp_rx_update_protocol_tag(struct dp_soc *soc, struct dp_vdev *vdev, bool is_reo_exception, bool is_update_stats) { } + +/** + * dp_rx_err_cce_drop() - Reads CCE metadata from the RX MSDU end TLV + * and returns whether cce metadata matches + * @soc: core txrx main context + * @vdev: vdev on which the packet is received + * @nbuf: QDF pkt buffer on which the protocol tag should be set + * @rx_tlv_hdr: rBbase address where the RX TLVs starts + * Return: bool + */ +static inline bool +dp_rx_err_cce_drop(struct dp_soc *soc, struct dp_vdev *vdev, + qdf_nbuf_t nbuf, uint8_t *rx_tlv_hdr) +{ + return false; +} + #endif /* WLAN_SUPPORT_RX_PROTOCOL_TYPE_TAG */ #ifndef WLAN_SUPPORT_RX_FLOW_TAG diff --git a/dp/wifi3.0/dp_rx_err.c b/dp/wifi3.0/dp_rx_err.c index cd93685da7..a6136284f1 100644 --- a/dp/wifi3.0/dp_rx_err.c +++ b/dp/wifi3.0/dp_rx_err.c @@ -1293,6 +1293,23 @@ dp_rx_null_q_desc_handle(struct dp_soc *soc, qdf_nbuf_t nbuf, /* IEEE80211_SEQ_MAX indicates invalid start_seq */ } + /* + * Drop packets in this path if cce_match is found. Packets will come + * in following path depending on whether tidQ is setup. + * 1. If tidQ is setup: WIFILI_HAL_RX_WBM_REO_PSH_RSN_ROUTE and + * cce_match = 1 + * Packets with WIFILI_HAL_RX_WBM_REO_PSH_RSN_ROUTE are already + * dropped. + * 2. If tidQ is not setup: WIFILI_HAL_RX_WBM_REO_PSH_RSN_ERROR and + * cce_match = 1 + * These packets need to be dropped and should not get delivered + * to stack. + */ + if (qdf_unlikely(dp_rx_err_cce_drop(soc, vdev, nbuf, rx_tlv_hdr))) { + qdf_nbuf_free(nbuf); + return QDF_STATUS_E_FAILURE; + } + if (qdf_unlikely(vdev->rx_decap_type == htt_cmn_pkt_type_raw)) { qdf_nbuf_set_next(nbuf, NULL); dp_rx_deliver_raw(vdev, nbuf, peer);