Преглед на файлове

qca-wifi: Correct data populated in csi_cfr_header

Two fields got swapped while polulating csi_cfr_header and
a field was missed. Corret and add missing fields.

CRs-Fixed: 2421237, 2421241, 2421209
Change-Id: Ife8ebc663292af021cc4556985c088092509b339
Abhiram Jogadenu преди 6 години
родител
ревизия
7ab1a58c47
променени са 1 файла, в които са добавени 8 реда и са изтрити 3 реда
  1. 8 3
      cfr/src/target_if_cfr_8074v2.c

+ 8 - 3
cfr/src/target_if_cfr_8074v2.c

@@ -250,7 +250,7 @@ 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.capture_bw = dma_hdr.upload_pkt_bw;
+	header->u.meta_v1.channel_bw = dma_hdr.upload_pkt_bw;
 	header->u.meta_v1.num_rx_chain = dma_hdr.num_chains + 1;
 	header->u.meta_v1.length = length;
 	status = correlate_and_relay(pdev, cookie, lut,
@@ -427,12 +427,17 @@ target_if_peer_capture_event(ol_scn_t sc, uint8_t *data, uint32_t datalen)
 	header->pltform_type           = CFR_PLATFORM_TYPE_ARM;
 	header->Reserved               = 0;
 	header->u.meta_v1.status       = (tx_evt_param.status &
-					  PEER_CFR_CAPTURE_EVT_STATUS_MASK)?0:1;
-	header->u.meta_v1.channel_bw   = tx_evt_param.bandwidth;
+					  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;
+	/* 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 ?
+					 CFR_DUP_LEGACY_ACK : CFR_LEGACY_ACK;
 	header->u.meta_v1.capture_type = tx_evt_param.capture_method;
 	header->u.meta_v1.sts_count    = tx_evt_param.spatial_streams;
 	header->u.meta_v1.timestamp    = tx_evt_param.timestamp_us;