From fc8337d5de6efdc2655e5817affe9ba56cb60089 Mon Sep 17 00:00:00 2001 From: Amit Shukla Date: Fri, 14 Feb 2020 14:53:32 -0800 Subject: [PATCH] qcacmn: Add support for noACK frames Intercept monitor destination path for NDPA frames, use it to generate noack frames for tx capture. Change-Id: Ia54196bd84729a7863954b6deec7e02b52f23556 CRs-Fixed: 2605672 --- dp/wifi3.0/dp_rx_mon_dest.c | 25 +++++++++++++++++++++++++ hal/wifi3.0/hal_rx.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/dp/wifi3.0/dp_rx_mon_dest.c b/dp/wifi3.0/dp_rx_mon_dest.c index c497d28fc501..ccb1b0ab5dc0 100644 --- a/dp/wifi3.0/dp_rx_mon_dest.c +++ b/dp/wifi3.0/dp_rx_mon_dest.c @@ -28,6 +28,29 @@ #include "dp_rx_mon.h" #include "wlan_cfg.h" #include "dp_internal.h" +#ifdef WLAN_TX_PKT_CAPTURE_ENH +#include "dp_rx_mon_feature.h" + +static inline void +dp_handle_tx_capture(struct dp_soc *soc, struct dp_pdev *pdev, + qdf_nbuf_t mon_mpdu) +{ + struct hal_rx_ppdu_info *ppdu_info = &pdev->ppdu_info; + + if (pdev->tx_capture_enabled != CDP_TX_ENH_CAPTURE_DISABLED && + ppdu_info->sw_frame_group_id == HAL_MPDU_SW_FRAME_GROUP_CTRL_NDPA) + dp_handle_tx_capture_from_dest(soc, pdev, mon_mpdu); +} + +#else +static inline void +dp_handle_tx_capture(struct dp_soc *soc, struct dp_pdev *pdev, + qdf_nbuf_t mon_mpdu) +{ +} + +#endif + /* The maxinum buffer length allocated for radio tap */ #define MAX_MONITOR_HEADER (512) @@ -963,6 +986,8 @@ QDF_STATUS dp_rx_mon_deliver(struct dp_soc *soc, uint32_t mac_id, pdev->ppdu_info.rx_status.chan_noise_floor = pdev->chan_noise_floor; + dp_handle_tx_capture(soc, pdev, mon_mpdu); + if (!qdf_nbuf_update_radiotap(&pdev->ppdu_info.rx_status, mon_mpdu, qdf_nbuf_headroom(mon_mpdu))) { diff --git a/hal/wifi3.0/hal_rx.h b/hal/wifi3.0/hal_rx.h index f5c413e695b3..32791fafd4fa 100644 --- a/hal/wifi3.0/hal_rx.h +++ b/hal/wifi3.0/hal_rx.h @@ -1191,6 +1191,7 @@ hal_rx_msdu_start_toeplitz_get(uint8_t *buf) * @ HAL_MPDU_SW_FRAME_GROUP_MGMT: management frame * @ HAL_MPDU_SW_FRAME_GROUP_MGMT_PROBE_REQ: probe req frame * @ HAL_MPDU_SW_FRAME_GROUP_CTRL: control frame + * @ HAL_MPDU_SW_FRAME_GROUP_CTRL_NDPA: NDPA frame * @ HAL_MPDU_SW_FRAME_GROUP_CTRL_BAR: BAR frame * @ HAL_MPDU_SW_FRAME_GROUP_CTRL_RTS: RTS frame * @ HAL_MPDU_SW_FRAME_GROUP_UNSUPPORTED: unsupported @@ -1205,6 +1206,7 @@ enum hal_rx_mpdu_info_sw_frame_group_id_type { HAL_MPDU_SW_FRAME_GROUP_MGMT_PROBE_REQ = 8, HAL_MPDU_SW_FRAME_GROUP_MGMT_BEACON = 12, HAL_MPDU_SW_FRAME_GROUP_CTRL = 20, + HAL_MPDU_SW_FRAME_GROUP_CTRL_NDPA = 25, HAL_MPDU_SW_FRAME_GROUP_CTRL_BAR = 28, HAL_MPDU_SW_FRAME_GROUP_CTRL_RTS = 31, HAL_MPDU_SW_FRAME_GROUP_UNSUPPORTED = 36,