qca-wifi: Correct CFR data version

Correct the version where CFR data is being populated.

Change-Id: I4c55b5beefb2f93e09df47162406876a1861fa00
This commit is contained in:
Abhiram Jogadenu
2019-08-27 22:22:05 +05:30
committed by Gerrit - the friendly Code Review server
parent 2e9c30351f
commit 5bf0f819dc
2 changed files with 30 additions and 16 deletions

View File

@@ -254,8 +254,8 @@ bool cfr_dbr_event_handler(struct wlan_objmgr_pdev *pdev,
qdf_mem_copy(&lut->dma_hdr, &dma_hdr, sizeof(struct whal_cfir_dma_hdr));
header = &lut->header;
header->u.meta_v1.channel_bw = dma_hdr.upload_pkt_bw;
header->u.meta_v1.length = length;
header->u.meta_v2.channel_bw = dma_hdr.upload_pkt_bw;
header->u.meta_v2.length = length;
status = correlate_and_relay(pdev, cookie, lut,
CORRELATE_DBR_MODULE_ID);
if (status == STATUS_STREAM_AND_RELEASE) {
@@ -444,24 +444,24 @@ target_if_peer_capture_event(ol_scn_t sc, uint8_t *data, uint32_t datalen)
header->chip_type = CFR_CAPTURE_RADIO_HKV2;
header->pltform_type = CFR_PLATFORM_TYPE_ARM;
header->Reserved = 0;
header->u.meta_v1.status = (tx_evt_param.status &
header->u.meta_v2.status = (tx_evt_param.status &
PEER_CFR_CAPTURE_EVT_STATUS_MASK)?1:0;
header->u.meta_v1.capture_bw = tx_evt_param.bandwidth;
header->u.meta_v1.phy_mode = tx_evt_param.phy_mode;
header->u.meta_v1.prim20_chan = tx_evt_param.primary_20mhz_chan;
header->u.meta_v1.center_freq1 = tx_evt_param.band_center_freq1;
header->u.meta_v1.center_freq2 = tx_evt_param.band_center_freq2;
header->u.meta_v2.capture_bw = tx_evt_param.bandwidth;
header->u.meta_v2.phy_mode = tx_evt_param.phy_mode;
header->u.meta_v2.prim20_chan = tx_evt_param.primary_20mhz_chan;
header->u.meta_v2.center_freq1 = tx_evt_param.band_center_freq1;
header->u.meta_v2.center_freq2 = tx_evt_param.band_center_freq2;
/* Currently CFR data is captured on ACK of a Qos NULL frame.
* For 20 MHz, ACK is Legacy and for 40/80/160, ACK is DUP Legacy.
*/
header->u.meta_v1.capture_mode = tx_evt_param.bandwidth ?
header->u.meta_v2.capture_mode = tx_evt_param.bandwidth ?
CFR_DUP_LEGACY_ACK : CFR_LEGACY_ACK;
header->u.meta_v1.capture_type = tx_evt_param.capture_method;
header->u.meta_v1.num_rx_chain = wlan_vdev_mlme_get_rxchainmask(vdev);
header->u.meta_v1.sts_count = tx_evt_param.spatial_streams;
header->u.meta_v1.timestamp = tx_evt_param.timestamp_us;
header->u.meta_v2.capture_type = tx_evt_param.capture_method;
header->u.meta_v2.num_rx_chain = wlan_vdev_mlme_get_rxchainmask(vdev);
header->u.meta_v2.sts_count = tx_evt_param.spatial_streams;
header->u.meta_v2.timestamp = tx_evt_param.timestamp_us;
qdf_mem_copy(&header->u.meta_v1.peer_addr[0],
qdf_mem_copy(&header->u.meta_v2.peer_addr[0],
&tx_evt_param.peer_mac_addr.bytes[0], QDF_MAC_ADDR_SIZE);
qdf_mem_copy(&header->u.meta_v2.chain_rssi[0],
&tx_evt_param.chain_rssi[0],

View File

@@ -106,8 +106,22 @@ struct cfr_metadata_version_1 {
#define HOST_MAX_CHAINS 8
struct cfr_metadata_version_2 {
u_int32_t chain_rssi[HOST_MAX_CHAINS];
u_int16_t chain_phase[HOST_MAX_CHAINS];
u_int8_t peer_addr[QDF_MAC_ADDR_SIZE];
u_int8_t status;
u_int8_t capture_bw;
u_int8_t channel_bw;
u_int8_t phy_mode;
u_int16_t prim20_chan;
u_int16_t center_freq1;
u_int16_t center_freq2;
u_int8_t capture_mode;
u_int8_t capture_type;
u_int8_t sts_count;
u_int8_t num_rx_chain;
u_int32_t timestamp;
u_int32_t length;
u_int32_t chain_rssi[HOST_MAX_CHAINS];
u_int16_t chain_phase[HOST_MAX_CHAINS];
} __attribute__ ((__packed__));
struct csi_cfr_header {