From 8bf5d2ab5e91ba5788fee4177964e73e5af4d6d9 Mon Sep 17 00:00:00 2001 From: Vulupala Shashank Reddy Date: Wed, 1 Dec 2021 09:25:59 +0530 Subject: [PATCH] qcacld-3.0: Fix phy type for mgmt rx packets in pkt capture mode In packet capture mode currently the cck and ofdm flags are filled by checking phy mode received from FW. But now FW is sending below rate codes instead of phy mode. So update the check in host to check rate code and based on rate code fill cck and ofdm. The proper filling of cck and ofdm will help Wireshark to derive correct phy type in the packet capture. WIFI_HW_RATECODE_PREAM_OFDM, WIFI_HW_RATECODE_PREAM_CCK, WIFI_HW_RATECODE_PREAM_HT, WIFI_HW_RATECODE_PREAM_VHT, WIFI_HW_RATECODE_PREAM_HE, Change-Id: Ie9b38dd403a0bf39397ff22e80dd24dfa152fdcd CRs-Fixed: 3079456 --- components/pkt_capture/core/inc/wlan_pkt_capture_mgmt_txrx.h | 2 ++ components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/pkt_capture/core/inc/wlan_pkt_capture_mgmt_txrx.h b/components/pkt_capture/core/inc/wlan_pkt_capture_mgmt_txrx.h index f456107b9f0c..b10866c20793 100644 --- a/components/pkt_capture/core/inc/wlan_pkt_capture_mgmt_txrx.h +++ b/components/pkt_capture/core/inc/wlan_pkt_capture_mgmt_txrx.h @@ -1,5 +1,6 @@ /* * Copyright (c) 2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2021 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 @@ -33,6 +34,7 @@ #define RESERVE_BYTES (100) #define RATE_LIMIT (16) #define INVALID_RSSI_FOR_TX (-128) +#define PKTCAPTURE_RATECODE_CCK (1) /** * pkt_capture_process_mgmt_tx_data() - process management tx packets diff --git a/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c b/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c index 961a4ae040a8..28f13cb7338d 100644 --- a/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c +++ b/components/pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c @@ -609,7 +609,7 @@ pkt_capture_mgmt_rx_data_cb(struct wlan_objmgr_psoc *psoc, txrx_status.rtap_flags |= ((txrx_status.rate == 6 /* Mbps */) ? BIT(1) : 0); - if (rx_params->phy_mode != WLAN_PHYMODE_11B) + if (rx_params->phy_mode != PKTCAPTURE_RATECODE_CCK) txrx_status.ofdm_flag = 1; else txrx_status.cck_flag = 1;