From 92151b69be14f9510223cef9d074d495b8bb2175 Mon Sep 17 00:00:00 2001 From: Balaji Pothunoori Date: Mon, 3 Apr 2023 16:08:48 +0530 Subject: [PATCH] qcacld-3.0: Fix ofdm and cck flag info for mon mode data packets Currently cck and ofdm flags are filled wrongly for monitor mode data packets based on preamble and wireshark deriving incorrect phy type for 11G & 11B. This change is to update cck and ofdm flags based on packet type. Change-Id: I5fcdc463ea2a6d83253e39cc377a2471aeb4e144 CRs-Fixed: 3447567 --- .../pkt_capture/core/inc/wlan_pkt_capture_data_txrx.h | 3 +++ .../pkt_capture/core/src/wlan_pkt_capture_data_txrx.c | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/components/pkt_capture/core/inc/wlan_pkt_capture_data_txrx.h b/components/pkt_capture/core/inc/wlan_pkt_capture_data_txrx.h index e933c47ce78e..c56ff2787944 100644 --- a/components/pkt_capture/core/inc/wlan_pkt_capture_data_txrx.h +++ b/components/pkt_capture/core/inc/wlan_pkt_capture_data_txrx.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2020-2021 The Linux Foundation. All rights reserved. + * Copyright (c) 2021, 2023 Qualcomm Innovation Center, Inc. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -42,6 +43,8 @@ #define IEEE80211_RADIOTAP_HE_DATA1_STBC_KNOWN 0x0200 #endif +#define HAL_TX_PKT_TYPE_11B 1 + /** * pkt_capture_data_process_type - data pkt types to process * for packet capture mode diff --git a/components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c b/components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c index 0c69d911f0ac..3bd0a085964e 100644 --- a/components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c +++ b/components/pkt_capture/core/src/wlan_pkt_capture_data_txrx.c @@ -207,9 +207,9 @@ static void pkt_capture_tx_get_phy_info( break; } - if (preamble == 0) + if (preamble_type != HAL_TX_PKT_TYPE_11B) tx_status->ofdm_flag = 1; - else if (preamble == 1) + else tx_status->cck_flag = 1; tx_status->mcs = mcs; @@ -729,9 +729,9 @@ static void pkt_capture_rx_get_phy_info(void *context, void *psoc, break; } - if (preamble == 0) + if (preamble_type != HAL_RX_PKT_TYPE_11B) rx_status->ofdm_flag = 1; - else if (preamble == 1) + else rx_status->cck_flag = 1; rx_status->bw = bw;