qcacmn: Fix invalid RSSI issue
For QCN9160 target, uCode reports the dBm converted values in status tlv. Hence, remove conversion at HOST. Populate proper chip type for QCN9160's RCC. CRs-Fixed: 3509733 Change-Id: I8422f661161337cdce5ef8001fb502aebdbe0dc2
This commit is contained in:

committed by
Rahul Choudhary

parent
6c446e7547
commit
6bce625a5b
@@ -62,6 +62,35 @@ u_int32_t snr_to_signal_strength(uint8_t snr)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* tagret_if_snr_to_signal_strength() - wrapper API to snr_to_signal_strength to
|
||||||
|
* consider target_type.
|
||||||
|
* @target_type: target type of the pdev
|
||||||
|
* @meta: pointer to CFR metadata
|
||||||
|
* @ppdu: rx ppdu having per chain rssi to be converted to dBm
|
||||||
|
*
|
||||||
|
* Return: none
|
||||||
|
*/
|
||||||
|
static inline
|
||||||
|
void target_if_snr_to_signal_strength(uint32_t target_type,
|
||||||
|
struct enh_cfr_metadata *meta,
|
||||||
|
struct cdp_rx_indication_ppdu *ppdu)
|
||||||
|
{
|
||||||
|
uint8_t i;
|
||||||
|
|
||||||
|
/* No need to add CMN_NOISE_FLOOR for york */
|
||||||
|
if (target_type == TARGET_TYPE_QCN9160) {
|
||||||
|
for (i = 0; i < MAX_CHAIN; i++) {
|
||||||
|
meta->chain_rssi[i] = (int8_t)ppdu->per_chain_rssi[i];
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (i = 0; i < MAX_CHAIN; i++) {
|
||||||
|
meta->chain_rssi[i] =
|
||||||
|
snr_to_signal_strength(ppdu->per_chain_rssi[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get_lut_entry() - Retrieve LUT entry using cookie number
|
* get_lut_entry() - Retrieve LUT entry using cookie number
|
||||||
* @pcfr: PDEV CFR object
|
* @pcfr: PDEV CFR object
|
||||||
@@ -1206,9 +1235,7 @@ void target_if_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf)
|
|||||||
if (meta->num_mu_users > pcfr->max_mu_users)
|
if (meta->num_mu_users > pcfr->max_mu_users)
|
||||||
meta->num_mu_users = pcfr->max_mu_users;
|
meta->num_mu_users = pcfr->max_mu_users;
|
||||||
|
|
||||||
for (i = 0; i < MAX_CHAIN; i++)
|
target_if_snr_to_signal_strength(target_type, meta, cdp_rx_ppdu);
|
||||||
meta->chain_rssi[i] =
|
|
||||||
snr_to_signal_strength(cdp_rx_ppdu->per_chain_rssi[i]);
|
|
||||||
|
|
||||||
if (cdp_rx_ppdu->u.ppdu_type != CDP_RX_TYPE_SU) {
|
if (cdp_rx_ppdu->u.ppdu_type != CDP_RX_TYPE_SU) {
|
||||||
for (i = 0 ; i < meta->num_mu_users; i++) {
|
for (i = 0 ; i < meta->num_mu_users; i++) {
|
||||||
@@ -2317,7 +2344,8 @@ QDF_STATUS cfr_enh_init_pdev(struct wlan_objmgr_psoc *psoc,
|
|||||||
target_type == TARGET_TYPE_QCN9160) {
|
target_type == TARGET_TYPE_QCN9160) {
|
||||||
pcfr->subbuf_size = STREAMFS_MAX_SUBBUF_SPRUCE;
|
pcfr->subbuf_size = STREAMFS_MAX_SUBBUF_SPRUCE;
|
||||||
pcfr->num_subbufs = STREAMFS_NUM_SUBBUF_SPRUCE;
|
pcfr->num_subbufs = STREAMFS_NUM_SUBBUF_SPRUCE;
|
||||||
pcfr->chip_type = CFR_CAPTURE_RADIO_SPRUCE;
|
pcfr->chip_type = (target_type == TARGET_TYPE_QCN6122) ?
|
||||||
|
CFR_CAPTURE_RADIO_SPRUCE : CFR_CAPTURE_RADIO_YORK;
|
||||||
pcfr->max_mu_users = SPRUCE_CFR_MU_USERS;
|
pcfr->max_mu_users = SPRUCE_CFR_MU_USERS;
|
||||||
} else if (target_type == TARGET_TYPE_QCN9224) {
|
} else if (target_type == TARGET_TYPE_QCN9224) {
|
||||||
pcfr->subbuf_size = STREAMFS_MAX_SUBBUF_WAIKIKI;
|
pcfr->subbuf_size = STREAMFS_MAX_SUBBUF_WAIKIKI;
|
||||||
|
Reference in New Issue
Block a user