From e9a6af6660075345d94e420a1f311e1fcd2815fb Mon Sep 17 00:00:00 2001 From: Aniruddha Paul Date: Thu, 19 Nov 2020 13:14:19 +0530 Subject: [PATCH] qcacmn: Drop invalid peer frames with RA as STA and TA != BSSID In HKv1, if smart monitor mode is enabled on RE, we are getting invalid peer frames with RA as STA mac of RE and the TA not matching with any NAC list or the the BSSID.Such frames need to dropped in order to avoid HM_WDS false addition. Change-Id: If641052c3f0ac5ce49afcc52062462d8b7eaa0e6 --- dp/wifi3.0/dp_rx.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/dp/wifi3.0/dp_rx.c b/dp/wifi3.0/dp_rx.c index 22c205ee31..b8f7bc4de9 100644 --- a/dp/wifi3.0/dp_rx.c +++ b/dp/wifi3.0/dp_rx.c @@ -950,10 +950,28 @@ out: qdf_nbuf_pull_head(mpdu, RX_PKT_TLVS_LEN); msg.nbuf = mpdu; msg.vdev_id = vdev->vdev_id; - if (pdev->soc->cdp_soc.ol_ops->rx_invalid_peer) + + /* + * NOTE: Only valid for HKv1. + * If smart monitor mode is enabled on RE, we are getting invalid + * peer frames with RA as STA mac of RE and the TA not matching + * with any NAC list or the the BSSID.Such frames need to dropped + * in order to avoid HM_WDS false addition. + */ + if (pdev->soc->cdp_soc.ol_ops->rx_invalid_peer) { + if (!soc->hw_nac_monitor_support && + pdev->filter_neighbour_peers && + vdev->opmode == wlan_op_mode_sta) { + QDF_TRACE(QDF_MODULE_ID_DP, + QDF_TRACE_LEVEL_WARN, + "Drop inv peer pkts with STA RA:%pm", + wh->i_addr1); + goto free; + } pdev->soc->cdp_soc.ol_ops->rx_invalid_peer( (struct cdp_ctrl_objmgr_psoc *)soc->ctrl_psoc, pdev->pdev_id, &msg); + } free: /* Drop and free packet */