mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 22:23:14 -04:00
qcacld-3.0: Get dynamic nss configuration for STA
For STA, get dynamic nss configuration if it is supported by FW. Change-Id: Ie1fce5896e473e361672f7e021d3acf6653cb964 CRs-Fixed: 2822062
This commit is contained in:
parent
cc13af9fd6
commit
feb24397f1
1 changed files with 23 additions and 10 deletions
|
|
@ -1257,19 +1257,32 @@ QDF_STATUS hdd_get_nss(struct hdd_adapter *adapter, uint8_t *nss)
|
|||
{
|
||||
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
||||
bool bval;
|
||||
QDF_STATUS status;
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
|
||||
status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("unable to get vht_enable2x2");
|
||||
return status;
|
||||
/*
|
||||
* If FW is supporting the dynamic nss update, this command is meant to
|
||||
* be per vdev, so get nss in the ini params of that particular vdev
|
||||
* otherwise get it from the global param enable2x2
|
||||
*/
|
||||
if (hdd_ctx->dynamic_nss_chains_support) {
|
||||
uint8_t nss_2g, nss_5g;
|
||||
|
||||
sme_get_vdev_type_nss(adapter->device_mode, &nss_2g, &nss_5g);
|
||||
/* Different settings in 2G and 5G is not supported */
|
||||
*nss = nss_2g;
|
||||
} else {
|
||||
status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("unable to get vht_enable2x2");
|
||||
return status;
|
||||
}
|
||||
|
||||
*nss = (bval) ? 2 : 1;
|
||||
if (!policy_mgr_is_hw_dbs_2x2_capable(hdd_ctx->psoc) &&
|
||||
policy_mgr_is_current_hwmode_dbs(hdd_ctx->psoc))
|
||||
*nss = *nss - 1;
|
||||
}
|
||||
|
||||
*nss = (bval) ? 2 : 1;
|
||||
if (!policy_mgr_is_hw_dbs_2x2_capable(hdd_ctx->psoc) &&
|
||||
policy_mgr_is_current_hwmode_dbs(hdd_ctx->psoc))
|
||||
*nss = *nss - 1;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue