From c4e3177ed0fddbbd6ea3ccc664db3cb8e1b3b77e Mon Sep 17 00:00:00 2001 From: Vulupala Shashank Reddy Date: Tue, 30 Mar 2021 11:27:32 +0530 Subject: [PATCH] qcacld-3.0: Fix data rate in mgmt rx packets in packet capture mode Currently the rate, ofdm and cck flags are filled to support only legacy rates.To support other rates too, fill ofdm and cck flags based on phymode and fill rate in terms of 500 Kbps in tx status. Change-Id: I972919ebd2cbd19a1b55af0324e481fada7f12cd CRs-Fixed: 2917079 --- .../pkt_capture/core/src/wlan_pkt_capture_mgmt_txrx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 a27ef0acd887..cfedd39685bd 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 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 The Linux Foundation. All rights reserved. + * Copyright (c) 2020, 2021 The Linux Foundation. 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 @@ -484,12 +484,13 @@ pkt_capture_mgmt_rx_data_cb(struct wlan_objmgr_psoc *psoc, txrx_status.rtap_flags |= ((txrx_status.rate == 6 /* Mbps */) ? BIT(1) : 0); - if (txrx_status.rate == 6) + if (rx_params->phy_mode != WLAN_PHYMODE_11B) txrx_status.ofdm_flag = 1; else txrx_status.cck_flag = 1; - txrx_status.rate = ((txrx_status.rate == 6 /* Mbps */) ? 0x0c : 0x02); + /* Convert rate from Mbps to 500 Kbps */ + txrx_status.rate = txrx_status.rate * 2; txrx_status.add_rtap_ext = true; wh = (struct ieee80211_frame *)qdf_nbuf_data(nbuf);