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

Commit 2b97da90 authored by Shwetha G K's avatar Shwetha G K Committed by Wu Gao
Browse files

qcacmn: Fix invalid VAP instance error in RCC case

Fix the invalid VAP instance error seen when RCC is
enabled and ol_ath_stats (enhanced stats) feature is
disabled case.
Populate gI as well similar to other rate stats in
CFR handler where this information would not be
available if ol_ath_stats is disabled.

CRs-Fixed: 3056621
Change-Id: Id1af6359408cb977ba0becf298121ee10dd5ef72
parent c4bd71be
Loading
Loading
Loading
Loading
+35 −1
Original line number Diff line number Diff line
@@ -1197,12 +1197,15 @@ dp_rx_mon_populate_cfr_ppdu_info(struct dp_pdev *pdev,
				 struct hal_rx_ppdu_info *ppdu_info,
				 struct cdp_rx_indication_ppdu *cdp_rx_ppdu)
{
	struct dp_peer *peer;
	struct dp_ast_entry *ast_entry;
	struct dp_soc *soc = pdev->soc;
	uint32_t ast_index;
	int chain;

	cdp_rx_ppdu->ppdu_id = ppdu_info->com_info.ppdu_id;
	cdp_rx_ppdu->timestamp = ppdu_info->rx_status.tsft;
	cdp_rx_ppdu->u.ppdu_type = ppdu_info->rx_status.reception_type;
	cdp_rx_ppdu->num_users = ppdu_info->com_info.num_users;

	for (chain = 0; chain < MAX_CHAIN; chain++)
		cdp_rx_ppdu->per_chain_rssi[chain] =
@@ -1212,6 +1215,12 @@ dp_rx_mon_populate_cfr_ppdu_info(struct dp_pdev *pdev,
	cdp_rx_ppdu->beamformed = ppdu_info->rx_status.beamformed;
	cdp_rx_ppdu->u.ldpc = ppdu_info->rx_status.ldpc;

	if ((ppdu_info->rx_status.sgi == VHT_SGI_NYSM) &&
	    (ppdu_info->rx_status.preamble_type == HAL_RX_PKT_TYPE_11AC))
		cdp_rx_ppdu->u.gi = CDP_SGI_0_4_US;
	else
		cdp_rx_ppdu->u.gi = ppdu_info->rx_status.sgi;

	if (ppdu_info->rx_status.preamble_type == HAL_RX_PKT_TYPE_11AC) {
		cdp_rx_ppdu->u.stbc = ppdu_info->rx_status.is_stbc;
	} else if (ppdu_info->rx_status.preamble_type ==
@@ -1223,6 +1232,31 @@ dp_rx_mon_populate_cfr_ppdu_info(struct dp_pdev *pdev,
	}

	dp_rx_mon_handle_cfr_mu_info(pdev, ppdu_info, cdp_rx_ppdu);
	ast_index = ppdu_info->rx_status.ast_index;
	if (ast_index >= wlan_cfg_get_max_ast_idx(soc->wlan_cfg_ctx)) {
		cdp_rx_ppdu->peer_id = HTT_INVALID_PEER;
		cdp_rx_ppdu->num_users = 0;
		return;
	}

	ast_entry = soc->ast_table[ast_index];
	if (!ast_entry || ast_entry->peer_id == HTT_INVALID_PEER) {
		cdp_rx_ppdu->peer_id = HTT_INVALID_PEER;
		cdp_rx_ppdu->num_users = 0;
		return;
	}

	peer = dp_peer_get_ref_by_id(soc, ast_entry->peer_id,
				     DP_MOD_ID_RX_PPDU_STATS);
	if (!peer) {
		cdp_rx_ppdu->peer_id = HTT_INVALID_PEER;
		cdp_rx_ppdu->num_users = 0;
		return;
	}

	cdp_rx_ppdu->peer_id = peer->peer_id;
	cdp_rx_ppdu->vdev_id = peer->vdev->vdev_id;
	cdp_rx_ppdu->num_users = ppdu_info->com_info.num_users;
}

/**