Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33ff4850 authored by Shwetha G K's avatar Shwetha G K Committed by Madan Koyyalamudi
Browse files

qcacmn: Add mcs, gI & sig info to cfr metadata

Add mcs rate, gI type and other SU sig info to cfr metadata.
For Tx based capture mcs rate & gI type is applicable
MCS For legacy mode
      0: 48 Mbps
      1: 24 Mbps
      2: 12 Mbps
      3: 6 Mbps
      4: 54 Mbps
      5: 36 Mbps
      6: 18 Mbps
      7: 9 Mbps
      8: invalid entry
MCS for HT, 0-7: MCS0-MCS7,
MCS for VHT, 0-9: MCS0-MCS9,
MCS for HE, 0-11 MCS0-MCS11, 12-13: 4096QAM
GI:
     0: 0.8 us
     1: 0.4 us
     2: 1.6 us
     3: 3.2 us
ltf_size:
     0: he_ltf_1_x
     1: he_ltf_2_x
     2: he_ltf_4_x
dcm: Indicates if DCM set
     0: No DCM
     1: DCM
sgi: Indicates if short gI used
     0: No short gI
     1: short gI
beamformed: Is packet beamformed
     0: non-beamformed
     1: beamformed
stbc: Indicates if stbc applied
     0: No STBC
     1: STBC
Coding:
     0: BCC
     1: LDPC

Change-Id: If6ab4b4878ab24406aba0e890ec08a2dae2b4634
parent aee8b781
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -223,11 +223,12 @@ void target_if_cfr_fill_header(struct csi_cfr_header *hdr,
		else
			hdr->cmn.chip_type = CFR_CAPTURE_RADIO_NONE;
	} else if (target_type == TARGET_TYPE_QCA8074V2) {
		hdr->cmn.cfr_metadata_version = CFR_META_VERSION_4;
		hdr->cmn.cfr_metadata_version = CFR_META_VERSION_6;
		hdr->cmn.chip_type = CFR_CAPTURE_RADIO_HKV2;
	} else {
		if ((target_type == TARGET_TYPE_QCN9000) ||
		    (target_type == TARGET_TYPE_QCA6018) ||
		if (target_type == TARGET_TYPE_QCN9000)
			hdr->cmn.cfr_metadata_version = CFR_META_VERSION_7;
		else if ((target_type == TARGET_TYPE_QCA6018) ||
			 ((target_type == TARGET_TYPE_QCA5018) && (!is_rcc)))
			hdr->cmn.cfr_metadata_version = CFR_META_VERSION_5;
		else
+15 −1
Original line number Diff line number Diff line
@@ -410,7 +410,7 @@ static void dump_metadata(struct csi_cfr_header *header, uint32_t cookie)
			  meta->chain_phase[chain_id]);
	}

	if (header->cmn.cfr_metadata_version == CFR_META_VERSION_5) {
	if (header->cmn.cfr_metadata_version >= CFR_META_VERSION_5) {
		cfr_debug("rtt_cfo_measurement = %d\n",
			  meta->rtt_cfo_measurement);
		cfr_debug("rx_start_ts = %u\n", meta->rx_start_ts);
@@ -420,6 +420,9 @@ static void dump_metadata(struct csi_cfr_header *header, uint32_t cookie)
				  chain_id,
				  meta->agc_gain[chain_id]);
		}

		cfr_debug("mcs_rate = %u\n", meta->mcs_rate);
		cfr_debug("gi_type = %u\n", meta->gi_type);
	}
}

@@ -848,6 +851,15 @@ void target_if_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf)
	meta->agc_gain[6] = get_gain_db(get_u16_lsb(cfr_info->agc_gain_info3));
	meta->agc_gain[7] = get_gain_db(get_u16_msb(cfr_info->agc_gain_info3));

	meta->mcs_rate = cfr_info->mcs_rate;
	meta->gi_type = cfr_info->gi_type;
	meta->sig_info.ltf_size = cdp_rx_ppdu->u.ltf_size;
	meta->sig_info.stbc = cdp_rx_ppdu->u.stbc;
	meta->sig_info.sgi = (cdp_rx_ppdu->u.gi == CDP_SGI_0_4_US) ? 1 : 0;
	meta->sig_info.dcm = cdp_rx_ppdu->u.dcm;
	meta->sig_info.coding = cdp_rx_ppdu->u.ldpc;
	meta->sig_info.beamformed = cdp_rx_ppdu->beamformed;

	if (meta->num_mu_users > pcfr->max_mu_users)
		meta->num_mu_users = pcfr->max_mu_users;

@@ -1409,6 +1421,8 @@ target_if_peer_capture_event(ol_scn_t sc, uint8_t *data, uint32_t datalen)
		     HOST_MAX_CHAINS * sizeof(tx_evt_param.agc_gain[0]));
	header->u.meta_enh.rtt_cfo_measurement = tx_evt_param.cfo_measurement;
	header->u.meta_enh.rx_start_ts = tx_evt_param.rx_start_ts;
	header->u.meta_enh.mcs_rate    = tx_evt_param.mcs_rate;
	header->u.meta_enh.gi_type     = tx_evt_param.gi_type;

	status = correlate_and_relay_enh(pdev, cookie, lut,
					 CORRELATE_TX_EV_MODULE_ID);