From bf5043dc92cec27ed8b2c929ecd5e5578cf9ac67 Mon Sep 17 00:00:00 2001 From: Jeevan Kukkalli Date: Tue, 26 Apr 2022 16:09:36 +0530 Subject: [PATCH] qcacmn: set appropriate rx packet offset Set appropriate rx packet offset when full pkt is subscribed in litemon case. Change-Id: I1b1149b5105ce2b61c6e6ddc7841c21ce0b7870c CRs-Fixed: 3183047 --- dp/inc/cdp_txrx_mon_struct.h | 2 -- dp/wifi3.0/monitor/2.0/dp_mon_filter_2.0.c | 5 +++-- dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.h | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dp/inc/cdp_txrx_mon_struct.h b/dp/inc/cdp_txrx_mon_struct.h index a2ae40c9f2..9e8be9503e 100644 --- a/dp/inc/cdp_txrx_mon_struct.h +++ b/dp/inc/cdp_txrx_mon_struct.h @@ -37,8 +37,6 @@ #define CDP_LITE_MON_FILTER_ALL 0xFFFF -#define CDP_LITE_MON_RX_PACKET_OFFSET 8 - /* This should align with nac mac type enumerations in ieee80211_ioctl.h */ #define CDP_LITE_MON_PEER_MAC_TYPE_CLIENT 2 diff --git a/dp/wifi3.0/monitor/2.0/dp_mon_filter_2.0.c b/dp/wifi3.0/monitor/2.0/dp_mon_filter_2.0.c index 8393aca0fa..2d8ea32a87 100644 --- a/dp/wifi3.0/monitor/2.0/dp_mon_filter_2.0.c +++ b/dp/wifi3.0/monitor/2.0/dp_mon_filter_2.0.c @@ -2346,8 +2346,9 @@ dp_mon_filter_setup_rx_lite_mon(struct dp_mon_pdev_be *be_mon_pdev) ctrl_len, data_len)) { rx_tlv_filter->tlv_filter.packet = 1; - rx_tlv_filter->tlv_filter.rx_packet_offset = - CDP_LITE_MON_RX_PACKET_OFFSET; + /* get offset size in QWORDS */ + rx_tlv_filter->tlv_filter.rx_pkt_tlv_offset = + DP_GET_NUM_QWORDS(DP_RX_MON_PACKET_OFFSET); if (mgmt_len == CDP_LITE_MON_LEN_FULL) rx_tlv_filter->tlv_filter.mgmt_dma_length = DEFAULT_DMA_LENGTH; diff --git a/dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.h b/dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.h index bf05f15bd2..62e83eb7a3 100644 --- a/dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.h +++ b/dp/wifi3.0/monitor/2.0/dp_rx_mon_2.0.h @@ -23,6 +23,7 @@ #define DP_RX_MON_PACKET_OFFSET 8 #define DP_RX_MON_RX_HDR_OFFSET 8 +#define DP_GET_NUM_QWORDS(num) ((num) >> 3) /* * dp_rx_mon_buffers_alloc() - allocate rx monitor buffers * @soc: DP soc handle