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:
Min Liu
2020-11-19 17:35:13 +08:00
committed by snandini
parent ce857836f1
commit 2dc9d8c956

View File

@@ -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); struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
bool bval; 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)) { * If FW is supporting the dynamic nss update, this command is meant to
hdd_err("unable to get vht_enable2x2"); * be per vdev, so get nss in the ini params of that particular vdev
return status; * 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; return status;
} }