qcacld-3.0: Remove legacy ini for chainmask configs

Remove the legacy ini config values defined in hdd_cfg.
Call the mlme cfg get api to retrieve chainmask config values.
Remove the tx_chainmask_cck from cds_config as mlme object is
not initialized during cds_open. Call mlme cfg api during
wma_open to populate the tx_chainmask_cck value.

Change-Id: If48aeb62cf35e2e604be2b72845b8e98c5c313dc
CRs-Fixed: 2310382
This commit is contained in:
Pragaspathi Thilagaraj
2018-08-18 01:23:01 +05:30
committed by nshrivas
parent 1efe085f49
commit 5423c25281
3 changed files with 259 additions and 0 deletions

View File

@@ -22,6 +22,8 @@
#include "cfg_ucfg_api.h"
#include "wlan_mlme_main.h"
#include "wlan_mlme_ucfg_api.h"
#include "wma_types.h"
#include "wmi_unified.h"
QDF_STATUS wlan_mlme_get_ht_cap_info(struct wlan_objmgr_psoc *psoc,
struct mlme_ht_capabilities_info
@@ -70,3 +72,144 @@ QDF_STATUS wlan_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
*value = mlme_obj->cfg.sap_protection_cfg.ignore_peer_ht_mode;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_get_tx_chainmask_cck(struct wlan_objmgr_psoc *psoc,
bool *value)
{
struct wlan_mlme_psoc_obj *mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("Failed to get MLME Obj");
return QDF_STATUS_E_FAILURE;
}
*value = mlme_obj->cfg.chainmask_cfg.tx_chain_mask_cck;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_get_tx_chainmask_1ss(struct wlan_objmgr_psoc *psoc,
uint8_t *value)
{
struct wlan_mlme_psoc_obj *mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("Failed to get MLME Obj");
return QDF_STATUS_E_FAILURE;
}
*value = mlme_obj->cfg.chainmask_cfg.tx_chain_mask_1ss;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_get_num_11b_tx_chains(struct wlan_objmgr_psoc *psoc,
uint16_t *value)
{
struct wlan_mlme_psoc_obj *mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("Failed to get MLME Obj");
return QDF_STATUS_E_FAILURE;
}
*value = mlme_obj->cfg.chainmask_cfg.num_11b_tx_chains;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc,
uint16_t *value)
{
struct wlan_mlme_psoc_obj *mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("Failed to get MLME Obj");
return QDF_STATUS_E_FAILURE;
}
*value = mlme_obj->cfg.chainmask_cfg.num_11ag_tx_chains;
return QDF_STATUS_SUCCESS;
}
QDF_STATUS wlan_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc,
uint8_t session_id)
{
int ret_val;
uint8_t ch_msk_val;
struct wlan_mlme_psoc_obj *mlme_obj = mlme_get_psoc_obj(psoc);
if (!mlme_obj) {
mlme_err("Failed to get MLME Obj");
return QDF_STATUS_E_FAILURE;
}
mlme_debug("txchainmask1x1: %d rxchainmask1x1: %d",
mlme_obj->cfg.chainmask_cfg.txchainmask1x1,
mlme_obj->cfg.chainmask_cfg.rxchainmask1x1);
mlme_debug("tx_chain_mask_2g: %d, rx_chain_mask_2g: %d",
mlme_obj->cfg.chainmask_cfg.tx_chain_mask_2g,
mlme_obj->cfg.chainmask_cfg.rx_chain_mask_2g);
mlme_debug("tx_chain_mask_5g: %d, rx_chain_mask_5g: %d",
mlme_obj->cfg.chainmask_cfg.tx_chain_mask_5g,
mlme_obj->cfg.chainmask_cfg.rx_chain_mask_5g);
if (mlme_obj->cfg.chainmask_cfg.txchainmask1x1) {
ch_msk_val = mlme_obj->cfg.chainmask_cfg.txchainmask1x1;
ret_val = wma_cli_set_command(session_id,
WMI_PDEV_PARAM_TX_CHAIN_MASK,
ch_msk_val, PDEV_CMD);
if (ret_val)
return QDF_STATUS_E_FAILURE;
}
if (mlme_obj->cfg.chainmask_cfg.rxchainmask1x1) {
ch_msk_val = mlme_obj->cfg.chainmask_cfg.rxchainmask1x1;
ret_val = wma_cli_set_command(session_id,
WMI_PDEV_PARAM_RX_CHAIN_MASK,
ch_msk_val, PDEV_CMD);
if (ret_val)
return QDF_STATUS_E_FAILURE;
}
if (mlme_obj->cfg.chainmask_cfg.txchainmask1x1 ||
mlme_obj->cfg.chainmask_cfg.rxchainmask1x1) {
mlme_debug("band agnostic tx/rx chain mask set. skip per band chain mask");
return QDF_STATUS_SUCCESS;
}
if (mlme_obj->cfg.chainmask_cfg.tx_chain_mask_2g) {
ch_msk_val = mlme_obj->cfg.chainmask_cfg.tx_chain_mask_2g;
ret_val = wma_cli_set_command(session_id,
WMI_PDEV_PARAM_TX_CHAIN_MASK_2G,
ch_msk_val, PDEV_CMD);
if (0 != ret_val)
return QDF_STATUS_E_FAILURE;
}
if (mlme_obj->cfg.chainmask_cfg.rx_chain_mask_2g) {
ch_msk_val = mlme_obj->cfg.chainmask_cfg.rx_chain_mask_2g;
ret_val = wma_cli_set_command(session_id,
WMI_PDEV_PARAM_RX_CHAIN_MASK_2G,
ch_msk_val, PDEV_CMD);
if (0 != ret_val)
return QDF_STATUS_E_FAILURE;
}
if (mlme_obj->cfg.chainmask_cfg.tx_chain_mask_5g) {
ch_msk_val = mlme_obj->cfg.chainmask_cfg.tx_chain_mask_5g;
ret_val = wma_cli_set_command(session_id,
WMI_PDEV_PARAM_TX_CHAIN_MASK_5G,
ch_msk_val, PDEV_CMD);
if (0 != ret_val)
return QDF_STATUS_E_FAILURE;
}
if (mlme_obj->cfg.chainmask_cfg.rx_chain_mask_5g) {
ch_msk_val = mlme_obj->cfg.chainmask_cfg.rx_chain_mask_5g;
ret_val = wma_cli_set_command(session_id,
WMI_PDEV_PARAM_RX_CHAIN_MASK_5G,
ch_msk_val, PDEV_CMD);
if (0 != ret_val)
return QDF_STATUS_E_FAILURE;
}
return QDF_STATUS_SUCCESS;
}