mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
qcacld-3.0: Verify the nss config with rf chains supported
The driver fills the nss chains params in the vdev during vdev create. The nss and chain params are filled by the user in the ini file, but it may happen that the user filled the nss param for that particular vdev as 2, and the number of supported rf chains are 1, which is sent to the driver by FW, so that would result in nss as 2, and chains as 1, which cannot be supported. Fix is to downgrade the nss to the number of chains supported by the FW. Change-Id: Ifa3ee74dbe5b8d19c6dc11ff64e42dbffadaa018 CRs-Fixed: 2354205
This commit is contained in:
parent
f70523abed
commit
cbf1212230
1 changed files with 19 additions and 0 deletions
|
|
@ -4805,6 +4805,17 @@ static uint8_t sme_get_nss_chain_shift(enum QDF_OPMODE device_mode)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
sme_check_nss_chain_ini_param(struct wlan_mlme_nss_chains *vdev_ini_cfg,
|
||||
uint8_t rf_chains_supported,
|
||||
enum nss_chains_band_info band)
|
||||
{
|
||||
vdev_ini_cfg->rx_nss[band] = QDF_MIN(vdev_ini_cfg->rx_nss[band],
|
||||
rf_chains_supported);
|
||||
vdev_ini_cfg->tx_nss[band] = QDF_MIN(vdev_ini_cfg->tx_nss[band],
|
||||
rf_chains_supported);
|
||||
}
|
||||
|
||||
static void
|
||||
sme_fill_nss_chain_params(struct mac_context *mac_ctx,
|
||||
struct wlan_mlme_nss_chains *vdev_ini_cfg,
|
||||
|
|
@ -4864,6 +4875,14 @@ sme_fill_nss_chain_params(struct mac_context *mac_ctx,
|
|||
|
||||
vdev_ini_cfg->disable_tx_mrc[band] =
|
||||
nss_chains_ini_cfg->disable_tx_mrc[band];
|
||||
/*
|
||||
* Check whether the rx/tx nss is greater than the number of rf chains
|
||||
* supported by FW, if so downgrade the nss to the number of chains
|
||||
* supported, as higher nss cannot be supported with less chains.
|
||||
*/
|
||||
sme_check_nss_chain_ini_param(vdev_ini_cfg, rf_chains_supported,
|
||||
band);
|
||||
|
||||
}
|
||||
|
||||
void sme_populate_nss_chain_params(mac_handle_t mac_handle,
|
||||
|
|
|
|||
Loading…
Reference in a new issue