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:

کامیت شده توسط
nshrivas

والد
1efe085f49
کامیت
5423c25281
@@ -57,4 +57,59 @@ QDF_STATUS wlan_mlme_set_ht_cap_info(struct wlan_objmgr_psoc *psoc,
|
||||
*/
|
||||
QDF_STATUS wlan_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value);
|
||||
/**
|
||||
* wlan_mlme_get_tx_chainmask_cck() - Get the tx_chainmask_cfg value
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set from the caller
|
||||
*
|
||||
* Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
|
||||
*/
|
||||
QDF_STATUS wlan_mlme_get_tx_chainmask_cck(struct wlan_objmgr_psoc *psoc,
|
||||
bool *value);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_tx_chainmask_1ss() - Get the tx_chainmask_1ss value
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set from the caller
|
||||
*
|
||||
* Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
|
||||
*/
|
||||
QDF_STATUS wlan_mlme_get_tx_chainmask_1ss(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *value);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_num_11b_tx_chains() - Get the number of 11b only tx chains
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set from the caller
|
||||
*
|
||||
* Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
|
||||
*/
|
||||
QDF_STATUS wlan_mlme_get_num_11b_tx_chains(struct wlan_objmgr_psoc *psoc,
|
||||
uint16_t *value);
|
||||
|
||||
/**
|
||||
* wlan_mlme_get_num_11ag_tx_chains() - get the total number of 11a/g tx chains
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set from the caller
|
||||
*
|
||||
* Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
|
||||
*/
|
||||
QDF_STATUS wlan_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc,
|
||||
uint16_t *value);
|
||||
|
||||
/**
|
||||
* wlan_mlme_configure_chain_mask() - configure chainmask parameters
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @session_id: vdev_id
|
||||
*
|
||||
* Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
|
||||
*/
|
||||
QDF_STATUS wlan_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t session_id);
|
||||
|
||||
#endif /* _WLAN_MLME_API_H_ */
|
||||
|
@@ -117,4 +117,65 @@ QDF_STATUS ucfg_mlme_get_ignore_peer_ht_mode(struct wlan_objmgr_psoc *psoc,
|
||||
{
|
||||
return wlan_mlme_get_ignore_peer_ht_mode(psoc, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_tx_chainmask_1ss() - Get the tx_chainmask_1ss value
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set from the caller
|
||||
*
|
||||
* Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_mlme_get_tx_chainmask_1ss(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t *value)
|
||||
{
|
||||
return wlan_mlme_get_tx_chainmask_1ss(psoc, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_num_11b_tx_chains() - Get the number of 11b only tx chains
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set from the caller
|
||||
*
|
||||
* Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_mlme_get_num_11b_tx_chains(struct wlan_objmgr_psoc *psoc,
|
||||
uint16_t *value)
|
||||
{
|
||||
return wlan_mlme_get_num_11b_tx_chains(psoc, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_get_num_11ag_tx_chains() - get the total number of 11a/g tx chains
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @value: Value that needs to be set from the caller
|
||||
*
|
||||
* Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_mlme_get_num_11ag_tx_chains(struct wlan_objmgr_psoc *psoc,
|
||||
uint16_t *value)
|
||||
{
|
||||
return wlan_mlme_get_num_11ag_tx_chains(psoc, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* ucfg_mlme_configure_chain_mask() - configure chainmask parameters
|
||||
*
|
||||
* @psoc: pointer to psoc object
|
||||
* @session_id: vdev_id
|
||||
*
|
||||
* Return: QDF_STATUS_FAILURE or QDF_STATUS_SUCCESS
|
||||
*/
|
||||
static inline
|
||||
QDF_STATUS ucfg_mlme_configure_chain_mask(struct wlan_objmgr_psoc *psoc,
|
||||
uint8_t session_id)
|
||||
{
|
||||
return wlan_mlme_configure_chain_mask(psoc, session_id);
|
||||
}
|
||||
|
||||
#endif /* _WLAN_MLME_UCFG_API_H_ */
|
||||
|
@@ -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;
|
||||
}
|
||||
|
مرجع در شماره جدید
Block a user