diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c
index d0f49e6e9c..b2a0421bc2 100644
--- a/components/mlme/core/src/wlan_mlme_main.c
+++ b/components/mlme/core/src/wlan_mlme_main.c
@@ -25,6 +25,8 @@
#include "wlan_scan_public_structs.h"
#include "cfg_mlme_threshold.h"
+#define NUM_OF_SOUNDING_DIMENSIONS 1 /*Nss - 1, (Nss = 2 for 2x2)*/
+
struct wlan_mlme_psoc_obj *mlme_get_psoc_obj(struct wlan_objmgr_psoc *psoc)
{
struct wlan_mlme_psoc_obj *mlme_obj;
@@ -462,8 +464,6 @@ static void mlme_init_vht_cap_cfg(struct wlan_objmgr_psoc *psoc,
{
vht_cap_info->supp_chan_width =
cfg_default(CFG_VHT_SUPP_CHAN_WIDTH);
- vht_cap_info->tx_bfee_ant_supp =
- cfg_default(CFG_VHT_BEAMFORMEE_ANT_SUPP);
vht_cap_info->num_soundingdim =
cfg_default(CFG_VHT_NUM_SOUNDING_DIMENSIONS);
vht_cap_info->htc_vhtc =
@@ -478,39 +478,47 @@ static void mlme_init_vht_cap_cfg(struct wlan_objmgr_psoc *psoc,
cfg_default(CFG_VHT_RX_SUPP_DATA_RATE);
vht_cap_info->tx_supp_data_rate =
cfg_default(CFG_VHT_TX_SUPP_DATA_RATE);
- vht_cap_info->enable_txbf_20mhz =
- cfg_default(CFG_VHT_ENABLE_TXBF_20MHZ);
+ vht_cap_info->txop_ps =
+ cfg_default(CFG_VHT_TXOP_PS);
+ vht_cap_info->rx_mcs_map =
+ WNI_CFG_VHT_RX_MCS_MAP_STADEF;
+ vht_cap_info->tx_mcs_map =
+ WNI_CFG_VHT_TX_MCS_MAP_STADEF;
+ vht_cap_info->basic_mcs_set =
+ CFG_VHT_BASIC_MCS_SET_STADEF;
+ vht_cap_info->su_bformer =
+ cfg_default(CFG_VHT_SU_BEAMFORMER_CAP);
+ vht_cap_info->tx_bfee_ant_supp =
+ cfg_get(psoc, CFG_VHT_BEAMFORMEE_ANT_SUPP);
+
+ vht_cap_info->enable_txbf_20mhz =
+ cfg_get(psoc, CFG_VHT_ENABLE_TXBF_20MHZ);
vht_cap_info->ampdu_len =
cfg_get(psoc, CFG_VHT_MPDU_LEN);
+
vht_cap_info->ldpc_coding_cap =
- cfg_get(psoc, CFG_VHT_LDPC_CODING_CAP);
+ cfg_get(psoc, CFG_RX_LDPC_ENABLE);
vht_cap_info->short_gi_80mhz =
- cfg_get(psoc, CFG_VHT_SHORT_GI_80MHZ);
+ cfg_get(psoc, CFG_SHORT_GI_40MHZ);
vht_cap_info->short_gi_160mhz =
- cfg_get(psoc, CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ);
+ cfg_get(psoc, CFG_SHORT_GI_40MHZ);
vht_cap_info->tx_stbc =
- cfg_get(psoc, CFG_VHT_TXSTBC);
+ cfg_get(psoc, CFG_TX_STBC_ENABLE);
vht_cap_info->rx_stbc =
- cfg_get(psoc, CFG_VHT_RXSTBC);
- vht_cap_info->su_bformer =
- cfg_get(psoc, CFG_VHT_SU_BEAMFORMER_CAP);
- vht_cap_info->su_bformee =
- cfg_get(psoc, CFG_VHT_SU_BEAMFORMEE_CAP);
+ cfg_get(psoc, CFG_RX_STBC_ENABLE);
+
+ if (vht_cap_info->enable_txbf_20mhz)
+ vht_cap_info->su_bformee =
+ cfg_default(CFG_VHT_SU_BEAMFORMEE_CAP);
+
vht_cap_info->mu_bformer =
- cfg_get(psoc, CFG_VHT_MU_BEAMFORMER_CAP);
+ cfg_default(CFG_VHT_MU_BEAMFORMER_CAP);
+
vht_cap_info->enable_mu_bformee =
cfg_get(psoc, CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE);
- vht_cap_info->txop_ps =
- cfg_get(psoc, CFG_VHT_TXOP_PS);
vht_cap_info->ampdu_len_exponent =
cfg_get(psoc, CFG_VHT_AMPDU_LEN_EXPONENT);
- vht_cap_info->rx_mcs_map =
- cfg_get(psoc, CFG_VHT_RX_MCS_MAP);
- vht_cap_info->tx_mcs_map =
- cfg_get(psoc, CFG_VHT_TX_MCS_MAP);
- vht_cap_info->basic_mcs_set =
- cfg_get(psoc, CFG_VHT_BASIC_MCS_SET);
vht_cap_info->channel_width =
cfg_get(psoc, CFG_VHT_CHANNEL_WIDTH);
vht_cap_info->rx_mcs =
@@ -533,6 +541,17 @@ static void mlme_init_vht_cap_cfg(struct wlan_objmgr_psoc *psoc,
cfg_get(psoc, CFG_ENABLE_VHT_FOR_24GHZ);
vht_cap_info->vendor_24ghz_band =
cfg_get(psoc, CFG_ENABLE_VENDOR_VHT_FOR_24GHZ);
+ vht_cap_info->tx_bfee_sap =
+ cfg_get(psoc, CFG_VHT_ENABLE_TXBF_SAP_MODE);
+ vht_cap_info->vendor_vhtie =
+ cfg_get(psoc, CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE);
+
+ if (vht_cap_info->enable2x2)
+ vht_cap_info->enable_tx_su =
+ cfg_get(psoc, CFG_VHT_ENABLE_TX_SU_BEAM_FORMER);
+
+ if (vht_cap_info->enable2x2 && vht_cap_info->enable_tx_su)
+ vht_cap_info->num_soundingdim = NUM_OF_SOUNDING_DIMENSIONS;
}
static void mlme_init_rates_in_cfg(struct wlan_objmgr_psoc *psoc,
diff --git a/components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h b/components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h
index bb953ca9eb..52f55546bc 100644
--- a/components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h
+++ b/components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h
@@ -31,14 +31,39 @@
CFG_VALUE_OR_DEFAULT, \
"VHT SUPPORTED CHAN WIDTH SET")
-#define CFG_VHT_BEAMFORMEE_ANT_SUPP CFG_UINT( \
- "tx_bfee_ant_supp", \
+/*
+ *
+ * gTxBFCsnValue - ini to set VHT/HE STS Caps field
+ * @Min: 0
+ * @Max: 7
+ * @Default: 7
+ *
+ * This ini is used to configure the STS capability shown in AC/AX mode
+ * MGMT frame IE, the final STS field shown in VHT/HE IE will be calculated
+ * by MIN of (INI set, target report value). Only if gTxBFEnable is enabled
+ * and SU/MU BEAMFORMEE Caps is shown, then STS Caps make sense.
+ *
+ * Related: gTxBFEnable.
+ *
+ * Supported Feature: STA/SAP
+ *
+ * Usage: Internal
+ *
+ *
+ */
+#define CFG_VHT_BEAMFORMEE_ANT_SUPP CFG_INI_UINT( \
+ "txBFCsnValue", \
0, \
- 8, \
- 8, \
+ 7, \
+ 7, \
CFG_VALUE_OR_DEFAULT, \
"VHT BEAMFORMEE ANTENNA SUPPORTED CAP")
+#define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER CFG_INI_BOOL( \
+ "gEnableTxSUBeamformer", \
+ 0, \
+ "vht tx su beam former")
+
#define CFG_VHT_NUM_SOUNDING_DIMENSIONS CFG_UINT( \
"num_soundingdim", \
0, \
@@ -86,80 +111,31 @@
CFG_VALUE_OR_DEFAULT, \
"VHT TX SUPP DATA RATE")
-#define CFG_VHT_ENABLE_TXBF_20MHZ CFG_BOOL( \
- "enable_txbf_20mhz", \
+#define CFG_VHT_ENABLE_TXBF_20MHZ CFG_INI_BOOL( \
+ "gTxBFEnable", \
0, \
"VHT ENABLE TXBF 20MHZ")
-#define CFG_VHT_LDPC_CODING_CAP CFG_INI_BOOL( \
- "ldpc_coding_cap", \
- 0, \
- "VHT LDPC CODING CAP")
-
-#define CFG_VHT_SHORT_GI_80MHZ CFG_INI_BOOL( \
- "short_gi_80mhz", \
- 1, \
- "VHT SHORT GI 80MHZ")
-
-#define CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ CFG_INI_BOOL( \
- "short_gi_160mhz", \
- 0, \
- "VHT SHORT GI 160 AND 80 PLUS 80MHZ")
-
-#define CFG_VHT_TXSTBC CFG_INI_BOOL( \
- "tx_stbc", \
- 0, \
- "VHT Tx STBC")
-
-#define CFG_VHT_RXSTBC CFG_INI_BOOL( \
- "rx_stbc", \
- 1, \
- "VHT Rx STBC")
-
-#define CFG_VHT_SU_BEAMFORMER_CAP CFG_INI_BOOL( \
+#define CFG_VHT_SU_BEAMFORMER_CAP CFG_BOOL( \
"su_bformer", \
0, \
"VHT SU BEAMFORMER CAP")
-#define CFG_VHT_SU_BEAMFORMEE_CAP CFG_INI_BOOL( \
+#define CFG_VHT_SU_BEAMFORMEE_CAP CFG_BOOL( \
"su_bformee", \
1, \
"VHT SU BEAMFORMEE CAP")
-#define CFG_VHT_MU_BEAMFORMER_CAP CFG_INI_BOOL( \
+#define CFG_VHT_MU_BEAMFORMER_CAP CFG_BOOL( \
"mu_bformer", \
0, \
"VHT MU BEAMFORMER CAP")
-#define CFG_VHT_TXOP_PS CFG_INI_BOOL( \
+#define CFG_VHT_TXOP_PS CFG_BOOL( \
"txop_ps", \
0, \
"VHT TXOP PS")
-#define CFG_VHT_RX_MCS_MAP CFG_INI_UINT( \
- "rx_mcs_map", \
- 0, \
- 65535, \
- 65534, \
- CFG_VALUE_OR_DEFAULT, \
- "VHT RX MCS MAP")
-
-#define CFG_VHT_TX_MCS_MAP CFG_INI_UINT( \
- "tx_mcs_map", \
- 0, \
- 65535, \
- 65534, \
- CFG_VALUE_OR_DEFAULT, \
- "VHT TX MCS MAP")
-
-#define CFG_VHT_BASIC_MCS_SET CFG_INI_UINT( \
- "basic_mcs_set", \
- 0, \
- 65535, \
- 65534, \
- CFG_VALUE_OR_DEFAULT, \
- "VHT BASIC MCS SET")
-
/*
*
* gVhtChannelWidth - Channel width capability for 11ac
@@ -427,16 +403,44 @@
CFG_VALUE_OR_DEFAULT, \
"VHT MPDU Length")
+/*
+ * Enable / Disable Tx beamformee in SAP mode
+ * Default: Disable
+ */
+#define CFG_VHT_ENABLE_TXBF_SAP_MODE CFG_INI_BOOL( \
+ "gEnableTxBFeeSAP", \
+ 0, \
+ "Enable tx bf sap mode")
+
+/*
+ *
+ * enable_subfee_vendor_vhtie - ini to enable/disable SU Bformee in vendor VHTIE
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to enable/disable SU Bformee in vendor vht ie if gTxBFEnable
+ * is enabled. if gTxBFEnable is 0 this will not have any effect.
+ *
+ * Related: gTxBFEnable.
+ *
+ * Supported Feature: STA
+ *
+ * Usage: External
+ *
+ *
+ */
+#define CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE CFG_INI_BOOL( \
+ "enable_subfee_vendor_vhtie", \
+ 0, \
+ "Enable subfee in vendor vht ie")
+
#define CFG_VHT_CAPS_ALL \
CFG(CFG_VHT_SUPP_CHAN_WIDTH) \
- CFG(CFG_VHT_LDPC_CODING_CAP) \
- CFG(CFG_VHT_SHORT_GI_80MHZ) \
- CFG(CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ) \
- CFG(CFG_VHT_TXSTBC) \
- CFG(CFG_VHT_RXSTBC) \
CFG(CFG_VHT_SU_BEAMFORMER_CAP) \
CFG(CFG_VHT_SU_BEAMFORMEE_CAP) \
CFG(CFG_VHT_BEAMFORMEE_ANT_SUPP) \
+ CFG(CFG_VHT_ENABLE_TX_SU_BEAM_FORMER) \
CFG(CFG_VHT_NUM_SOUNDING_DIMENSIONS) \
CFG(CFG_VHT_MU_BEAMFORMER_CAP) \
CFG(CFG_VHT_TXOP_PS) \
@@ -444,11 +448,8 @@
CFG(CFG_VHT_LINK_ADAPTATION_CAP) \
CFG(CFG_VHT_RX_ANT_PATTERN) \
CFG(CFG_VHT_TX_ANT_PATTERN) \
- CFG(CFG_VHT_RX_MCS_MAP) \
- CFG(CFG_VHT_TX_MCS_MAP) \
CFG(CFG_VHT_RX_SUPP_DATA_RATE) \
CFG(CFG_VHT_TX_SUPP_DATA_RATE) \
- CFG(CFG_VHT_BASIC_MCS_SET) \
CFG(CFG_VHT_ENABLE_TXBF_20MHZ) \
CFG(CFG_VHT_CHANNEL_WIDTH) \
CFG(CFG_VHT_ENABLE_RX_MCS_8_9) \
@@ -463,6 +464,8 @@
CFG(CFG_ENABLE_VHT_FOR_24GHZ) \
CFG(CFG_ENABLE_VENDOR_VHT_FOR_24GHZ) \
CFG(CFG_VHT_AMPDU_LEN_EXPONENT) \
- CFG(CFG_VHT_MPDU_LEN)
+ CFG(CFG_VHT_MPDU_LEN) \
+ CFG(CFG_VHT_ENABLE_TXBF_SAP_MODE) \
+ CFG(CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE)
#endif /* __CFG_MLME_VHT_CAPS_H */
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h
index efd939e488..56a31bb519 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h
@@ -726,7 +726,18 @@ QDF_STATUS wlan_mlme_cfg_get_vht_chan_width(struct wlan_objmgr_psoc *psoc,
* Return: QDF_STATUS
*/
QDF_STATUS wlan_mlme_cfg_set_vht_chan_width(struct wlan_objmgr_psoc *psoc,
- uint8_t value);
+ uint8_t value);
+
+/**
+ * wlan_mlme_cfg_get_vht_chan_width() - sets vht supported channel width into
+ * cfg item
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wlan_mlme_cfg_get_vht_chan_width(struct wlan_objmgr_psoc *psoc,
+ uint8_t *value);
/**
* wlan_mlme_cfg_get_vht_ldpc_coding_cap() - gets vht ldpc coding cap from
@@ -737,7 +748,7 @@ QDF_STATUS wlan_mlme_cfg_set_vht_chan_width(struct wlan_objmgr_psoc *psoc,
* Return: QDF_STATUS
*/
QDF_STATUS wlan_mlme_cfg_get_vht_ldpc_coding_cap(struct wlan_objmgr_psoc *psoc,
- bool *value);
+ bool *value);
/**
* wlan_mlme_cfg_set_vht_ldpc_coding_cap() - sets vht ldpc coding cap into
@@ -773,26 +784,26 @@ QDF_STATUS wlan_mlme_cfg_set_vht_short_gi_80mhz(struct wlan_objmgr_psoc *psoc,
bool value);
/**
- * wlan_mlme_cfg_get_vht_short_gi_160mhz() - gets vht short gi 160MHz from
+ * wlan_mlme_cfg_get_short_gi_160_mhz() - gets vht short gi 160MHz from
* cfg item
* @psoc: psoc context
* @value: pointer to get required data
*
* Return: QDF_STATUS
*/
-QDF_STATUS wlan_mlme_cfg_get_vht_short_gi_160mhz(struct wlan_objmgr_psoc *psoc,
- bool *value);
+QDF_STATUS wlan_mlme_cfg_get_short_gi_160_mhz(struct wlan_objmgr_psoc *psoc,
+ bool *value);
/**
- * wlan_mlme_cfg_set_vht_short_gi_160mhz() - sets vht short gi 160MHz into
+ * wlan_mlme_cfg_set_short_gi_160_mhz() - sets vht short gi 160MHz into
* cfg item
* @psoc: psoc context
* @value: data to be set
*
* Return: QDF_STATUS
*/
-QDF_STATUS wlan_mlme_cfg_set_vht_short_gi_160mhz(struct wlan_objmgr_psoc *psoc,
- bool value);
+QDF_STATUS wlan_mlme_cfg_set_short_gi_160_mhz(struct wlan_objmgr_psoc *psoc,
+ bool value);
/**
* wlan_mlme_cfg_get_vht_tx_stbc() - gets vht tx stbc from
@@ -805,6 +816,17 @@ QDF_STATUS wlan_mlme_cfg_set_vht_short_gi_160mhz(struct wlan_objmgr_psoc *psoc,
QDF_STATUS wlan_mlme_cfg_get_vht_tx_stbc(struct wlan_objmgr_psoc *psoc,
bool *value);
+/**
+ * wlan_mlme_cfg_get_vht_rx_stbc() - gets vht rx stbc from
+ * cfg item
+ * @psoc: psoc context
+ * @value: pointer to get required data
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wlan_mlme_cfg_get_vht_rx_stbc(struct wlan_objmgr_psoc *psoc,
+ bool *value);
+
/**
* wlan_mlme_cfg_set_vht_tx_stbc() - sets vht tx stbc into
* cfg item
@@ -872,7 +894,8 @@ QDF_STATUS wlan_mlme_cfg_set_vht_su_bformee(struct wlan_objmgr_psoc *psoc,
bool value);
/**
- * wlan_mlme_cfg_set_vht_tx_bfee_ant_supp() - sets vht Beamformee antenna support cap
+ * wlan_mlme_cfg_set_vht_tx_bfee_ant_supp() - sets vht Beamformee antenna
+ * support cap
* into cfg item
* @psoc: psoc context
* @value: data to be set
@@ -882,6 +905,18 @@ QDF_STATUS wlan_mlme_cfg_set_vht_su_bformee(struct wlan_objmgr_psoc *psoc,
QDF_STATUS wlan_mlme_cfg_set_vht_tx_bfee_ant_supp(struct wlan_objmgr_psoc *psoc,
uint8_t value);
+/**
+ * wlan_mlme_cfg_get_vht_tx_bfee_ant_supp() - sets vht Beamformee antenna
+ * support cap
+ * into cfg item
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wlan_mlme_cfg_get_vht_tx_bfee_ant_supp(struct wlan_objmgr_psoc *psoc,
+ uint8_t *value);
+
/**
* wlan_mlme_cfg_set_vht_num_sounding_dim() - sets vht no of sounding dimensions
* into cfg item
@@ -1071,6 +1106,26 @@ QDF_STATUS wlan_mlme_cfg_get_vht_basic_mcs_set(struct wlan_objmgr_psoc *psoc,
QDF_STATUS wlan_mlme_cfg_set_vht_basic_mcs_set(struct wlan_objmgr_psoc *psoc,
uint32_t value);
+/**
+ * wlan_mlme_get_vht_enable_tx_bf() - VHT Rx MCS capability for 1x1 mode
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wlan_mlme_get_vht_enable_tx_bf(struct wlan_objmgr_psoc *psoc,
+ bool *value);
+
+/**
+ * wlan_mlme_get_vht_enable_tx_su_beam() - VHT enable tx su beam
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS wlan_mlme_get_vht_enable_tx_su_beam(struct wlan_objmgr_psoc *psoc,
+ bool *value);
+
/**
* wlan_mlme_get_vht_channel_width() - gets Channel width capability
* for 11ac
@@ -1192,4 +1247,23 @@ QDF_STATUS wlan_mlme_get_vht_for_24ghz(struct wlan_objmgr_psoc *psoc,
QDF_STATUS wlan_mlme_get_vendor_vht_for_24ghz(struct wlan_objmgr_psoc *psoc,
bool *value);
+/**
+ * mlme_update_vht_cap() - update vht capabilities
+ * @psoc: psoc context
+ * @cfg: data to be set
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS mlme_update_vht_cap(struct wlan_objmgr_psoc *psoc,
+ struct wma_tgt_vht_cap *cfg);
+
+/**
+ * mlme_update_nss_vht_cap() - Update the number of spatial
+ * streams supported for vht
+ * @psoc: psoc context
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS mlme_update_nss_vht_cap(struct wlan_objmgr_psoc *psoc);
+
#endif /* _WLAN_MLME_API_H_ */
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
index 04ac0d2833..ad3dacd7c4 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h
@@ -29,6 +29,16 @@
#define CFG_PMKID_MODES_OKC (0x1)
#define CFG_PMKID_MODES_PMKSA_CACHING (0x2)
+#define CFG_VHT_BASIC_MCS_SET_STADEF 0xFFFE
+
+#define CFG_VHT_RX_MCS_MAP_STAMIN 0
+#define CFG_VHT_RX_MCS_MAP_STAMAX 65535
+#define CFG_VHT_RX_MCS_MAP_STADEF 65534
+
+#define CFG_VHT_TX_MCS_MAP_STAMIN 0
+#define CFG_VHT_TX_MCS_MAP_STAMAX 65535
+#define CFG_VHT_TX_MCS_MAP_STADEF 65534
+
#define CFG_STR_DATA_LEN 17
#define CFG_EDCA_DATA_LEN 17
@@ -312,6 +322,7 @@ struct wlan_mlme_mbo {
* @tx_supp_data_rate: Tx highest supported data rate
* @basic_mcs_set: Basic MCS set
* @enable_txbf_20mhz: enable tx bf for 20mhz
+ * @enable_tx_su: enable VHT tx su beam former
* @channel_width: Channel width capability for 11ac
* @rx_mcs: VHT Rx MCS capability for 1x1 mode
* @tx_mcs: VHT Tx MCS capability for 1x1 mode
@@ -328,6 +339,8 @@ struct wlan_mlme_mbo {
* ie in 2.4 GHz band
* @ampdu_len_exponent: To handle maximum receive AMPDU ampdu len exponent
* @ampdu_len: To handle maximum receive AMPDU ampdu len
+ * @tx_bfee_sap: enable tx bfee SAp
+ * @subfee_vendor_vhtie: enable subfee vendor vht ie
*/
struct mlme_vht_capabilities_info {
uint8_t supp_chan_width;
@@ -352,9 +365,10 @@ struct mlme_vht_capabilities_info {
uint32_t tx_supp_data_rate;
uint32_t basic_mcs_set;
bool enable_txbf_20mhz;
+ bool enable_tx_su;
uint8_t channel_width;
- uint8_t rx_mcs;
- uint8_t tx_mcs;
+ uint32_t rx_mcs;
+ uint32_t tx_mcs;
uint8_t rx_mcs2x2;
uint8_t tx_mcs2x2;
bool enable_vht20_mcs9;
@@ -366,6 +380,8 @@ struct mlme_vht_capabilities_info {
bool vendor_24ghz_band;
uint8_t ampdu_len_exponent;
uint8_t ampdu_len;
+ bool tx_bfee_sap;
+ bool vendor_vhtie;
};
/**
diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
index 633bf26cbb..137301b3fb 100644
--- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
+++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h
@@ -1045,6 +1045,23 @@ QDF_STATUS ucfg_mlme_cfg_set_vht_chan_width(struct wlan_objmgr_psoc *psoc,
return wlan_mlme_cfg_set_vht_chan_width(psoc, value);
}
+/**
+ * ucfg_mlme_cfg_get_vht_chan_width() - gets vht supported channel width into
+ * cfg item
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
+ */
+static inline
+QDF_STATUS ucfg_mlme_cfg_get_vht_chan_width(struct wlan_objmgr_psoc *psoc,
+ uint8_t *value)
+{
+ return wlan_mlme_cfg_get_vht_chan_width(psoc, value);
+}
+
/**
* ucfg_mlme_cfg_set_vht_ldpc_coding_cap() - sets vht ldpc coding cap into
* cfg item
@@ -1062,6 +1079,42 @@ ucfg_mlme_cfg_set_vht_ldpc_coding_cap(struct wlan_objmgr_psoc *psoc,
return wlan_mlme_cfg_set_vht_ldpc_coding_cap(psoc, value);
}
+/**
+ * ucfg_mlme_cfg_get_short_gi_160_mhz() - gets basic set SHORT GI 160MHZ from
+ * cfg item
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers to get the
+ * ignore_peer_ht_opmode flag value
+ *
+ * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
+ */
+static inline QDF_STATUS
+ucfg_mlme_cfg_get_short_gi_160_mhz(struct wlan_objmgr_psoc *psoc,
+ bool *value)
+{
+ return wlan_mlme_cfg_get_short_gi_160_mhz(psoc, value);
+}
+
+/**
+ * ucfg_mlme_cfg_set_short_gi_160_mhz() - sets basic set SHORT GI 160MHZ into
+ * cfg item
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers to get the
+ * ignore_peer_ht_opmode flag value
+ *
+ * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
+ */
+static inline QDF_STATUS
+ucfg_mlme_cfg_set_short_gi_160_mhz(struct wlan_objmgr_psoc *psoc,
+ bool value)
+{
+ return wlan_mlme_cfg_set_short_gi_160_mhz(psoc, value);
+}
+
/**
* ucfg_mlme_cfg_get_vht_tx_stbc() - gets vht tx stbc from
* cfg item
@@ -1080,6 +1133,24 @@ ucfg_mlme_cfg_get_vht_tx_stbc(struct wlan_objmgr_psoc *psoc,
return wlan_mlme_cfg_get_vht_tx_stbc(psoc, value);
}
+/**
+ * ucfg_mlme_cfg_get_vht_rx_stbc() - gets vht tx stbc from
+ * cfg item
+ * @psoc: psoc context
+ * @value: pointer to get required data
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers to get the
+ * ignore_peer_ht_opmode flag value
+ *
+ * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
+ */
+static inline QDF_STATUS
+ucfg_mlme_cfg_get_vht_rx_stbc(struct wlan_objmgr_psoc *psoc,
+ bool *value)
+{
+ return wlan_mlme_cfg_get_vht_rx_stbc(psoc, value);
+}
+
/**
* ucfg_mlme_cfg_set_vht_tx_bfee_ant_supp() - sets vht Beamformee antenna
* support cap into cfg item
@@ -1097,6 +1168,23 @@ ucfg_mlme_cfg_set_vht_tx_bfee_ant_supp(struct wlan_objmgr_psoc *psoc,
return wlan_mlme_cfg_set_vht_tx_bfee_ant_supp(psoc, value);
}
+/**
+ * ucfg_mlme_cfg_get_vht_tx_bfee_ant_supp() - gets vht Beamformee antenna
+ * support cap into cfg item
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
+ */
+static inline QDF_STATUS
+ucfg_mlme_cfg_get_vht_tx_bfee_ant_supp(struct wlan_objmgr_psoc *psoc,
+ uint8_t *value)
+{
+ return wlan_mlme_cfg_get_vht_tx_bfee_ant_supp(psoc, value);
+}
+
/**
* ucfg_mlme_cfg_get_vht_rx_mcs_map() - gets vht rx mcs map from
* cfg item
@@ -1237,6 +1325,40 @@ ucfg_mlme_cfg_set_vht_basic_mcs_set(struct wlan_objmgr_psoc *psoc,
return wlan_mlme_cfg_set_vht_basic_mcs_set(psoc, value);
}
+/**
+ * ucfg_mlme_get_vht_enable_tx_bf() - gets enable TXBF for 20MHZ
+ * for 11ac
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers to get the
+ * ignore_peer_ht_opmode flag value
+ *
+ * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
+ */
+static inline QDF_STATUS
+ucfg_mlme_get_vht_enable_tx_bf(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+ return wlan_mlme_get_vht_enable_tx_bf(psoc, value);
+}
+
+/**
+ * ucfg_mlme_get_vht_enable_tx_su_beam() - gets enable enable_tx_su_beam
+ * for 11ac
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers to get the
+ * ignore_peer_ht_opmode flag value
+ *
+ * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
+ */
+static inline QDF_STATUS
+ucfg_mlme_get_vht_enable_tx_su_beam(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+ return wlan_mlme_get_vht_enable_tx_su_beam(psoc, value);
+}
+
/**
* ucfg_mlme_get_vht_channel_width() - gets Channel width capability
* for 11ac
@@ -1433,4 +1555,39 @@ ucfg_mlme_get_vendor_vht_for_24ghz(struct wlan_objmgr_psoc *psoc, bool *value)
{
return wlan_mlme_get_vendor_vht_for_24ghz(psoc, value);
}
+
+/**
+ * ucfg_mlme_update_vht_cap() - Update vht capabilities
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers to get the
+ * ignore_peer_ht_opmode flag value
+ *
+ * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
+ */
+static inline QDF_STATUS
+ucfg_mlme_update_vht_cap(struct wlan_objmgr_psoc *psoc,
+ struct wma_tgt_vht_cap *cfg)
+{
+ return mlme_update_vht_cap(psoc, cfg);
+}
+
+/**
+ * ucfg_mlme_update_nss_vht_cap() -Update the number of spatial
+ * streams supported for vht
+ * @psoc: psoc context
+ * @value: data to be set
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers to get the
+ * ignore_peer_ht_opmode flag value
+ *
+ * Return: QDF_STATUS_SUCCESS or QDF_STATUS_FAILURE
+ */
+static inline QDF_STATUS
+ucfg_mlme_update_nss_vht_cap(struct wlan_objmgr_psoc *psoc)
+{
+ return mlme_update_nss_vht_cap(psoc);
+}
+
#endif /* _WLAN_MLME_UCFG_API_H_ */
diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c
index 46f5af691b..11620d3d54 100644
--- a/components/mlme/dispatcher/src/wlan_mlme_api.c
+++ b/components/mlme/dispatcher/src/wlan_mlme_api.c
@@ -1230,6 +1230,21 @@ wlan_mlme_cfg_set_vht_chan_width(struct wlan_objmgr_psoc *psoc, uint8_t value)
return QDF_STATUS_SUCCESS;
}
+QDF_STATUS
+wlan_mlme_cfg_get_vht_chan_width(struct wlan_objmgr_psoc *psoc, uint8_t *value)
+{
+ struct wlan_mlme_psoc_obj *mlme_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.vht_caps.vht_cap_info.supp_chan_width;
+
+ return QDF_STATUS_SUCCESS;
+}
QDF_STATUS
wlan_mlme_cfg_set_vht_ldpc_coding_cap(struct wlan_objmgr_psoc *psoc,
@@ -1248,6 +1263,39 @@ wlan_mlme_cfg_set_vht_ldpc_coding_cap(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
+QDF_STATUS
+wlan_mlme_cfg_set_short_gi_160_mhz(struct wlan_objmgr_psoc *psoc,
+ bool value)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+ if (!mlme_obj) {
+ mlme_err("Failed to get MLME Obj");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ mlme_obj->cfg.vht_caps.vht_cap_info.short_gi_160mhz = value;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+wlan_mlme_cfg_get_short_gi_160_mhz(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+ struct wlan_mlme_psoc_obj *mlme_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.vht_caps.vht_cap_info.short_gi_160mhz;
+
+ return QDF_STATUS_SUCCESS;
+}
+
QDF_STATUS
wlan_mlme_cfg_get_vht_tx_stbc(struct wlan_objmgr_psoc *psoc, bool *value)
{
@@ -1264,6 +1312,21 @@ wlan_mlme_cfg_get_vht_tx_stbc(struct wlan_objmgr_psoc *psoc, bool *value)
return QDF_STATUS_SUCCESS;
}
+QDF_STATUS
+wlan_mlme_cfg_get_vht_rx_stbc(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+ struct wlan_mlme_psoc_obj *mlme_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.vht_caps.vht_cap_info.rx_stbc;
+
+ return QDF_STATUS_SUCCESS;
+}
QDF_STATUS
wlan_mlme_cfg_set_vht_tx_bfee_ant_supp(struct wlan_objmgr_psoc *psoc,
@@ -1282,6 +1345,23 @@ wlan_mlme_cfg_set_vht_tx_bfee_ant_supp(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
+QDF_STATUS
+wlan_mlme_cfg_get_vht_tx_bfee_ant_supp(struct wlan_objmgr_psoc *psoc,
+ uint8_t *value)
+{
+ struct wlan_mlme_psoc_obj *mlme_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.vht_caps.vht_cap_info.tx_bfee_ant_supp;
+
+ return QDF_STATUS_SUCCESS;
+}
+
QDF_STATUS
wlan_mlme_cfg_get_vht_rx_mcs_map(struct wlan_objmgr_psoc *psoc,
uint32_t *value)
@@ -1418,6 +1498,38 @@ wlan_mlme_cfg_set_vht_basic_mcs_set(struct wlan_objmgr_psoc *psoc,
return QDF_STATUS_SUCCESS;
}
+QDF_STATUS
+wlan_mlme_get_vht_enable_tx_bf(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+ struct wlan_mlme_psoc_obj *mlme_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.vht_caps.vht_cap_info.enable_txbf_20mhz;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+wlan_mlme_get_vht_enable_tx_su_beam(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+ struct wlan_mlme_psoc_obj *mlme_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.vht_caps.vht_cap_info.enable_tx_su;
+
+ return QDF_STATUS_SUCCESS;
+}
+
QDF_STATUS
wlan_mlme_get_vht_channel_width(struct wlan_objmgr_psoc *psoc, uint8_t *value)
{
@@ -1610,3 +1722,142 @@ wlan_mlme_get_vendor_vht_for_24ghz(struct wlan_objmgr_psoc *psoc, bool *value)
return QDF_STATUS_SUCCESS;
}
+
+QDF_STATUS mlme_update_vht_cap(struct wlan_objmgr_psoc *psoc,
+ struct wma_tgt_vht_cap *cfg)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+ struct mlme_vht_capabilities_info vht_cap_info;
+ uint32_t value = 0;
+ bool hw_rx_ldpc_enabled;
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+ if (!mlme_obj) {
+ mlme_err("Failed to get MLME Obj");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ vht_cap_info = mlme_obj->cfg.vht_caps.vht_cap_info;
+
+ /*
+ * VHT max MPDU length:
+ * override if user configured value is too high
+ * that the target cannot support
+ */
+ if (vht_cap_info.ampdu_len > cfg->vht_max_mpdu)
+ vht_cap_info.ampdu_len = cfg->vht_max_mpdu;
+
+ value = (CFG_VHT_BASIC_MCS_SET_STADEF & VHT_MCS_1x1) |
+ vht_cap_info.basic_mcs_set;
+ if (vht_cap_info.enable2x2)
+ value = (value & VHT_MCS_2x2) | (vht_cap_info.rx_mcs2x2 << 2);
+ vht_cap_info.basic_mcs_set = value;
+
+ value = (CFG_VHT_RX_MCS_MAP_STADEF & VHT_MCS_1x1) | vht_cap_info.rx_mcs;
+ if (vht_cap_info.enable2x2)
+ value = (value & VHT_MCS_2x2) | (vht_cap_info.rx_mcs2x2 << 2);
+ vht_cap_info.rx_mcs_map = value;
+
+ value = (CFG_VHT_TX_MCS_MAP_STADEF & VHT_MCS_1x1) | vht_cap_info.tx_mcs;
+ if (vht_cap_info.enable2x2)
+ value = (value & VHT_MCS_2x2) | (vht_cap_info.tx_mcs2x2 << 2);
+ vht_cap_info.tx_mcs_map = value;
+
+ /* Set HW RX LDPC capability */
+ hw_rx_ldpc_enabled = !!cfg->vht_rx_ldpc;
+ if (hw_rx_ldpc_enabled != vht_cap_info.ldpc_coding_cap)
+ vht_cap_info.ldpc_coding_cap = hw_rx_ldpc_enabled;
+
+ /* set the Guard interval 80MHz */
+ if (vht_cap_info.short_gi_80mhz && !cfg->vht_short_gi_80)
+ vht_cap_info.short_gi_80mhz = cfg->vht_short_gi_80;
+
+ /* Set VHT TX STBC cap */
+ if (vht_cap_info.tx_stbc && !cfg->vht_tx_stbc)
+ vht_cap_info.tx_stbc = cfg->vht_tx_stbc;
+
+ /* Set VHT RX STBC cap */
+ if (vht_cap_info.rx_stbc && !cfg->vht_rx_stbc)
+ vht_cap_info.rx_stbc = cfg->vht_rx_stbc;
+
+ /* Set VHT SU Beamformer cap */
+ if (vht_cap_info.su_bformer && !cfg->vht_su_bformer)
+ vht_cap_info.su_bformer = cfg->vht_su_bformer;
+
+ /* check and update SU BEAMFORMEE capabality */
+ if (vht_cap_info.enable_txbf_20mhz && !cfg->vht_su_bformee)
+ vht_cap_info.su_bformee = cfg->vht_su_bformee;
+
+ /* Set VHT MU Beamformer cap */
+ if (vht_cap_info.mu_bformer && !cfg->vht_mu_bformer)
+ vht_cap_info.mu_bformer = cfg->vht_mu_bformer;
+
+ /* Set VHT MU Beamformee cap */
+ if (vht_cap_info.enable_mu_bformee && !cfg->vht_mu_bformee)
+ vht_cap_info.enable_mu_bformee = cfg->vht_mu_bformee;
+
+ /*
+ * VHT max AMPDU len exp:
+ * override if user configured value is too high
+ * that the target cannot support.
+ * Even though Rome publish ampdu_len=7, it can
+ * only support 4 because of some h/w bug.
+ */
+ if (vht_cap_info.ampdu_len_exponent > cfg->vht_max_ampdu_len_exp)
+ vht_cap_info.ampdu_len_exponent = cfg->vht_max_ampdu_len_exp;
+
+ /* Set VHT TXOP PS CAP */
+ if (vht_cap_info.txop_ps && !cfg->vht_txop_ps)
+ vht_cap_info.txop_ps = cfg->vht_txop_ps;
+
+ /* set the Guard interval 160MHz */
+ if (vht_cap_info.short_gi_160mhz && !cfg->vht_short_gi_160)
+ vht_cap_info.short_gi_160mhz = cfg->vht_short_gi_160;
+
+ return QDF_STATUS_SUCCESS;
+
+}
+
+QDF_STATUS mlme_update_nss_vht_cap(struct wlan_objmgr_psoc *psoc)
+{
+ struct wlan_mlme_psoc_obj *mlme_obj;
+ struct mlme_vht_capabilities_info vht_cap_info;
+ uint32_t temp = 0;
+
+ mlme_obj = mlme_get_psoc_obj(psoc);
+ if (!mlme_obj) {
+ mlme_err("Failed to get MLME Obj");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ vht_cap_info = mlme_obj->cfg.vht_caps.vht_cap_info;
+
+ temp = vht_cap_info.basic_mcs_set;
+ temp = (temp & 0xFFFC) | vht_cap_info.rx_mcs;
+ if (vht_cap_info.enable2x2)
+ temp = (temp & 0xFFF3) | (vht_cap_info.rx_mcs2x2 << 2);
+ else
+ temp |= 0x000C;
+
+ vht_cap_info.basic_mcs_set = temp;
+
+ temp = vht_cap_info.rx_mcs_map;
+ temp = (temp & 0xFFFC) | vht_cap_info.rx_mcs;
+ if (vht_cap_info.enable2x2)
+ temp = (temp & 0xFFF3) | (vht_cap_info.rx_mcs2x2 << 2);
+ else
+ temp |= 0x000C;
+
+ vht_cap_info.rx_mcs_map = temp;
+
+ temp = vht_cap_info.tx_mcs_map;
+ temp = (temp & 0xFFFC) | vht_cap_info.tx_mcs;
+ if (vht_cap_info.enable2x2)
+ temp = (temp & 0xFFF3) | (vht_cap_info.tx_mcs2x2 << 2);
+ else
+ temp |= 0x000C;
+
+ vht_cap_info.tx_mcs_map = temp;
+
+ return QDF_STATUS_SUCCESS;
+}
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index f9b6c65019..93e0f55c9c 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -4468,78 +4468,6 @@ enum hdd_link_speed_rpt_type {
#define CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_MAX (1)
#define CFG_ENABLE_MCC_ADATIVE_SCHEDULER_ENABLED_DEFAULT (1)
-#define CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE "gTxBFEnable"
-#define CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_MIN (WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STAMIN)
-#define CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_MAX (WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STAMAX)
-#define CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_DEFAULT (WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STADEF)
-
-/*
- *
- * enable_subfee_vendor_vhtie - ini to enable/disable SU Bformee in vendor VHTIE
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This ini is used to enable/disable SU Bformee in vendor vht ie if gTxBFEnable
- * is enabled. if gTxBFEnable is 0 this will not have any effect.
- *
- * Related: gTxBFEnable.
- *
- * Supported Feature: STA
- *
- * Usage: External
- *
- *
- */
-#define CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE_NAME "enable_subfee_vendor_vhtie"
-#define CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE_MIN (0)
-#define CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE_MAX (1)
-#define CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE_DEFAULT (1)
-
-/*
- * Enable / Disable Tx beamformee in SAP mode
- * Default: Disable
- */
-#define CFG_VHT_ENABLE_TXBF_SAP_MODE "gEnableTxBFeeSAP"
-#define CFG_VHT_ENABLE_TXBF_SAP_MODE_MIN (0)
-#define CFG_VHT_ENABLE_TXBF_SAP_MODE_MAX (1)
-#define CFG_VHT_ENABLE_TXBF_SAP_MODE_DEFAULT (0)
-
-/*
- *
- * gTxBFCsnValue - ini to set VHT/HE STS Caps field
- * @Min: 0
- * @Max: 7
- * @Default: 7
- *
- * This ini is used to configure the STS capability shown in AC/AX mode
- * MGMT frame IE, the final STS field shown in VHT/HE IE will be calculated
- * by MIN of (INI set, target report value). Only if gTxBFEnable is enabled
- * and SU/MU BEAMFORMEE Caps is shown, then STS Caps make sense.
- *
- * Related: gTxBFEnable.
- *
- * Supported Feature: STA/SAP
- *
- * Usage: Internal
- *
- *
- */
-#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED "gTxBFCsnValue"
-#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_MIN (WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMIN)
-#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_MAX (WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMAX - 1)
-#define CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_DEFAULT (WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STADEF - 1)
-
-#define CFG_VHT_ENABLE_TXBF_IN_20MHZ "gEnableTxBFin20MHz"
-#define CFG_VHT_ENABLE_TXBF_IN_20MHZ_MIN (0)
-#define CFG_VHT_ENABLE_TXBF_IN_20MHZ_MAX (1)
-#define CFG_VHT_ENABLE_TXBF_IN_20MHZ_DEFAULT (0)
-
-#define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER "gEnableTxSUBeamformer"
-#define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_MIN (0)
-#define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_MAX (1)
-#define CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_DEFAULT (0)
-
#define CFG_DISABLE_LDPC_WITH_TXBF_AP "gDisableLDPCWithTxbfAP"
#define CFG_DISABLE_LDPC_WITH_TXBF_AP_MIN (0)
#define CFG_DISABLE_LDPC_WITH_TXBF_AP_MAX (1)
@@ -8202,30 +8130,12 @@ struct hdd_config {
uint32_t bad_peer_tput_ieee80211ac;
uint32_t bad_peer_limit_ieee80211ac;
#endif
- uint8_t vhtChannelWidth;
- uint8_t vhtRxMCS;
- uint8_t vhtTxMCS;
- bool enableTxBF;
- bool enable_subfee_vendor_vhtie;
- bool enable_txbf_sap_mode;
- bool enable_vht20_mcs9;
- uint8_t txBFCsnValue;
- bool enable_su_tx_bformer;
- uint8_t vhtRxMCS2x2;
- uint8_t vhtTxMCS2x2;
- bool enable2x2;
uint32_t vdev_type_nss_2g;
uint32_t vdev_type_nss_5g;
- bool enableMuBformee;
- bool enableVhtpAid;
- bool enableVhtGid;
- bool enableTxBFin20MHz;
uint8_t enableAmpduPs;
uint8_t enableHtSmps;
uint8_t htSmps;
bool enableFirstScan2GOnly;
- bool enableRxSTBC;
- bool enableTxSTBC;
uint8_t enable_tx_ldpc;
uint8_t enable_rx_ldpc;
bool prevent_link_down;
@@ -8234,8 +8144,6 @@ struct hdd_config {
uint8_t enableMCCAdaptiveScheduler;
bool enableSSR;
bool enable_data_stall_det;
- bool enableVhtFor24GHzBand;
- bool enable_sap_vendor_vht;
bool bFastRoamInConIniFeatureEnabled;
bool fEnableSNRMonitoring;
/*PNO related parameters */
@@ -8258,8 +8166,7 @@ struct hdd_config {
uint32_t ibssPs1RxChainInAtimEnable;
bool enable_ip_tcp_udp_checksum_offload;
- uint8_t fVhtAmpduLenExponent;
- uint32_t vhtMpduLen;
+ uint32_t IpaConfig;
bool IpaClkScalingEnable;
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
uint32_t WlanMccToSccSwitchMode;
diff --git a/core/hdd/inc/wlan_hdd_main.h b/core/hdd/inc/wlan_hdd_main.h
index fe1b9ab858..af03161f6c 100644
--- a/core/hdd/inc/wlan_hdd_main.h
+++ b/core/hdd/inc/wlan_hdd_main.h
@@ -3260,6 +3260,18 @@ void hdd_pld_ipa_uc_shutdown_pipes(void);
* Return: per_index_score within the max limit
*/
uint32_t hdd_limit_max_per_index_score(uint32_t per_index_score);
+
+/**
+ * hdd_update_score_config - API to update candidate scoring related params
+ * configuration parameters
+ * @score_config: score config to update
+ * @cfg: config params
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS hdd_update_score_config(
+ struct scoring_config *score_config, struct hdd_context *hdd_ctx);
+
/**
* hdd_get_stainfo() - get stainfo for the specified peer
* @astainfo: array of the station info in which the sta info
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index f0d3a93362..f14231adcf 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -1688,20 +1688,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_ENABLE_FIRST_SCAN_2G_ONLY_MIN,
CFG_ENABLE_FIRST_SCAN_2G_ONLY_MAX),
- REG_VARIABLE(CFG_ENABLE_RX_STBC, WLAN_PARAM_Integer,
- struct hdd_config, enableRxSTBC,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_RX_STBC_DEFAULT,
- CFG_ENABLE_RX_STBC_MIN,
- CFG_ENABLE_RX_STBC_MAX),
-
- REG_VARIABLE(CFG_ENABLE_TX_STBC, WLAN_PARAM_Integer,
- struct hdd_config, enableTxSTBC,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_TX_STBC_DEFAULT,
- CFG_ENABLE_TX_STBC_MIN,
- CFG_ENABLE_TX_STBC_MAX),
-
REG_VARIABLE(CFG_SCAN_AGING_PARAM_NAME, WLAN_PARAM_Integer,
struct hdd_config, scanAgingTimeout,
VAR_FLAGS_OPTIONAL,
@@ -1745,48 +1731,6 @@ struct reg_table_entry g_registry_table[] = {
CFG_IBSS_ADHOC_CHANNEL_24GHZ_MIN,
CFG_IBSS_ADHOC_CHANNEL_24GHZ_MAX),
- REG_VARIABLE(CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE, WLAN_PARAM_Integer,
- struct hdd_config, enableTxBF,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_DEFAULT,
- CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_MIN,
- CFG_VHT_SU_BEAMFORMEE_CAP_FEATURE_MAX),
-
- REG_VARIABLE(CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE_NAME, WLAN_PARAM_Integer,
- struct hdd_config, enable_subfee_vendor_vhtie,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE_DEFAULT,
- CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE_MIN,
- CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE_MAX),
-
- REG_VARIABLE(CFG_VHT_ENABLE_TXBF_SAP_MODE, WLAN_PARAM_Integer,
- struct hdd_config, enable_txbf_sap_mode,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_VHT_ENABLE_TXBF_SAP_MODE_DEFAULT,
- CFG_VHT_ENABLE_TXBF_SAP_MODE_MIN,
- CFG_VHT_ENABLE_TXBF_SAP_MODE_MAX),
-
- REG_VARIABLE(CFG_VHT_ENABLE_TXBF_IN_20MHZ, WLAN_PARAM_Integer,
- struct hdd_config, enableTxBFin20MHz,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_VHT_ENABLE_TXBF_IN_20MHZ_DEFAULT,
- CFG_VHT_ENABLE_TXBF_IN_20MHZ_MIN,
- CFG_VHT_ENABLE_TXBF_IN_20MHZ_MAX),
-
- REG_VARIABLE(CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED, WLAN_PARAM_Integer,
- struct hdd_config, txBFCsnValue,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_DEFAULT,
- CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_MIN,
- CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_MAX),
-
- REG_VARIABLE(CFG_VHT_ENABLE_TX_SU_BEAM_FORMER, WLAN_PARAM_Integer,
- struct hdd_config, enable_su_tx_bformer,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_DEFAULT,
- CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_MIN,
- CFG_VHT_ENABLE_TX_SU_BEAM_FORMER_MAX),
-
REG_VARIABLE(CFG_DISABLE_LDPC_WITH_TXBF_AP, WLAN_PARAM_Integer,
struct hdd_config, disableLDPCWithTxbfAP,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -4384,137 +4328,6 @@ QDF_STATUS hdd_hex_string_to_u16_array(char *str,
return QDF_STATUS_SUCCESS;
}
-/**
- * hdd_update_vht_cap_in_cfg() - to update VHT cap in global CFG
- * @hdd_ctx: pointer to hdd context
- *
- * This API will update the VHT config in CFG after taking intersection
- * of INI and firmware capabilities provided reading CFG
- *
- * Return: true or false
- */
-static bool hdd_update_vht_cap_in_cfg(struct hdd_context *hdd_ctx)
-{
- bool status = true;
- uint32_t val;
- struct hdd_config *config = hdd_ctx->config;
- mac_handle_t mac_handle = hdd_ctx->mac_handle;
-
- if (sme_cfg_set_int(mac_handle, WNI_CFG_VHT_ENABLE_TXBF_20MHZ,
- config->enableTxBFin20MHz) ==
- QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Couldn't set value for WNI_CFG_VHT_ENABLE_TXBF_20MHZ");
- }
- /* Based on cfg.ini, update the Basic MCS set, RX/TX MCS map
- * in the cfg.dat. Valid values are 0(MCS0-7), 1(MCS0-8), 2(MCS0-9)
- * we update only the least significant 2 bits in the
- * corresponding fields.
- */
- if ((config->dot11Mode == eHDD_DOT11_MODE_AUTO) ||
- (config->dot11Mode == eHDD_DOT11_MODE_11ac_ONLY) ||
- (config->dot11Mode == eHDD_DOT11_MODE_11ac)) {
- /* Currently shortGI40Mhz is used for shortGI80Mhz and 160MHz*/
- if (sme_cfg_set_int(mac_handle, WNI_CFG_VHT_SHORT_GI_80MHZ,
- config->ShortGI40MhzEnable) == QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Couldn't pass WNI_VHT_SHORT_GI_80MHZ to CFG");
- }
-
- if (sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
- config->ShortGI40MhzEnable) == QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Couldn't pass SHORT_GI_160MHZ to CFG");
- }
-
- /* Hardware is capable of doing
- * 128K AMPDU in 11AC mode
- */
- if (sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_AMPDU_LEN_EXPONENT,
- config->fVhtAmpduLenExponent) ==
- QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Couldn't pass on WNI_CFG_VHT_AMPDU_LEN_EXPONENT to CFG");
- }
- /* Change MU Bformee only when TxBF is enabled */
- if (config->enableTxBF) {
- sme_cfg_get_int(mac_handle,
- WNI_CFG_VHT_MU_BEAMFORMEE_CAP, &val);
-
- if (val != config->enableMuBformee) {
- if (sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_MU_BEAMFORMEE_CAP,
- config->enableMuBformee
- ) == QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Couldn't pass on WNI_CFG_VHT_MU_BEAMFORMEE_CAP to CFG");
- }
- }
- }
- if (sme_cfg_set_int(mac_handle, WNI_CFG_VHT_MAX_MPDU_LENGTH,
- config->vhtMpduLen) == QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Couldn't pass on WNI_CFG_VHT_MAX_MPDU_LENGTH to CFG");
- }
-
- if (config->enable2x2 && config->enable_su_tx_bformer) {
- if (sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_SU_BEAMFORMER_CAP,
- config->enable_su_tx_bformer) ==
- QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("set SU_BEAMFORMER_CAP to CFG failed");
- }
- if (sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS,
- NUM_OF_SOUNDING_DIMENSIONS) ==
- QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("failed to set NUM_OF_SOUNDING_DIM");
- }
- }
- }
-
- if (sme_cfg_set_int(mac_handle, WNI_CFG_VHT_RXSTBC,
- config->enableRxSTBC) == QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Couldn't pass on WNI_CFG_VHT_RXSTBC to CFG");
- }
-
- if (sme_cfg_set_int(mac_handle, WNI_CFG_VHT_TXSTBC,
- config->enableTxSTBC) == QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Couldn't pass on WNI_CFG_VHT_TXSTBC to CFG");
- }
-
- /* first get HW RX LDPC capability */
- if (sme_cfg_get_int(mac_handle, WNI_CFG_VHT_LDPC_CODING_CAP, &val) ==
- QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Could not get WNI_CFG_VHT_LDPC_CODING_CAP");
- }
-
- /* enable RX LDPC only when both INI and HW are enabled */
- if (sme_cfg_set_int(mac_handle, WNI_CFG_VHT_LDPC_CODING_CAP,
- config->enable_rx_ldpc && val) ==
- QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Couldn't pass on WNI_CFG_VHT_LDPC_CODING_CAP to CFG");
- }
-
- if (sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
- config->txBFCsnValue) ==
- QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Couldn't pass on WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED to CFG");
- }
- return status;
-
-}
-
/**
* hdd_update_config_cfg() - API to update INI setting based on hw/fw caps
* @hdd_ctx: pointer to hdd_ctx
@@ -4538,11 +4351,6 @@ bool hdd_update_config_cfg(struct hdd_context *hdd_ctx)
* So read 5G HT capablity and update 2G and 5G capablities.
*/
- if (!hdd_update_vht_cap_in_cfg(hdd_ctx)) {
- status = false;
- hdd_err("Couldn't set VHT CAP in cfg");
- }
-
if (0 != hdd_update_he_cap_in_cfg(hdd_ctx)) {
status = false;
hdd_err("Couldn't set HE CAP in cfg");
@@ -4638,7 +4446,12 @@ QDF_STATUS hdd_set_policy_mgr_user_cfg(struct hdd_context *hdd_ctx)
hdd_ctx->config->enableMCCAdaptiveScheduler;
user_cfg->max_concurrent_active_sessions =
hdd_ctx->config->gMaxConcurrentActiveSessions;
- user_cfg->enable2x2 = hdd_ctx->config->enable2x2;
+
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc,
+ &user_cfg->enable2x2);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+
user_cfg->mcc_to_scc_switch_mode =
hdd_ctx->config->WlanMccToSccSwitchMode;
user_cfg->sub_20_mhz_enabled = cds_is_sub_20_mhz_enabled();
@@ -4785,20 +4598,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
/* Remaining config params not obtained from registry
* On RF EVB beacon using channel 1.
*/
- smeConfig->csrConfig.nVhtChannelWidth = pConfig->vhtChannelWidth;
- smeConfig->csrConfig.enableTxBF = pConfig->enableTxBF;
- smeConfig->csrConfig.enable_subfee_vendor_vhtie =
- pConfig->enable_subfee_vendor_vhtie;
-
- smeConfig->csrConfig.enable_txbf_sap_mode =
- pConfig->enable_txbf_sap_mode;
- smeConfig->csrConfig.enable2x2 = pConfig->enable2x2;
- smeConfig->csrConfig.enableVhtFor24GHz = pConfig->enableVhtFor24GHzBand;
- smeConfig->csrConfig.vendor_vht_sap =
- pConfig->enable_sap_vendor_vht;
- smeConfig->csrConfig.enableMuBformee = pConfig->enableMuBformee;
- smeConfig->csrConfig.enableVhtpAid = pConfig->enableVhtpAid;
- smeConfig->csrConfig.enableVhtGid = pConfig->enableVhtGid;
smeConfig->csrConfig.enableHtSmps = pConfig->enableHtSmps;
smeConfig->csrConfig.htSmps = pConfig->htSmps;
/* This param cannot be configured from INI */
@@ -4910,7 +4709,6 @@ QDF_STATUS hdd_set_sme_config(struct hdd_context *hdd_ctx)
smeConfig->csrConfig.enable_tx_ldpc = pConfig->enable_tx_ldpc;
smeConfig->csrConfig.enable_rx_ldpc = pConfig->enable_rx_ldpc;
- smeConfig->csrConfig.enable_vht20_mcs9 = pConfig->enable_vht20_mcs9;
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
smeConfig->csrConfig.cc_switch_mode = pConfig->WlanMccToSccSwitchMode;
#endif
@@ -5146,17 +4944,16 @@ void hdd_get_pmkid_modes(struct hdd_context *hdd_ctx,
QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss)
{
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
- struct hdd_config *hdd_config = hdd_ctx->config;
- uint32_t temp = 0;
uint32_t rx_supp_data_rate, tx_supp_data_rate;
bool status = true;
QDF_STATUS qdf_status;
struct mlme_ht_capabilities_info ht_cap_info;
uint8_t mcs_set[SIZE_OF_SUPPORTED_MCS_SET] = {0};
uint8_t mcs_set_temp[SIZE_OF_SUPPORTED_MCS_SET];
- uint32_t val, val32;
+ uint32_t val;
uint8_t enable2x2;
mac_handle_t mac_handle;
+ bool bval = 0;
if ((nss == 2) && (hdd_ctx->num_rf_chains != 2)) {
hdd_err("No support for 2 spatial streams");
@@ -5165,7 +4962,11 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss)
enable2x2 = (nss == 1) ? 0 : 1;
- if (hdd_config->enable2x2 == enable2x2) {
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+
+ if (bval == enable2x2) {
hdd_debug("NSS same as requested");
return QDF_STATUS_SUCCESS;
}
@@ -5176,9 +4977,11 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss)
return QDF_STATUS_E_INVAL;
}
- hdd_config->enable2x2 = enable2x2;
+ status = ucfg_mlme_set_vht_enable2x2(hdd_ctx->psoc, enable2x2);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
- if (!hdd_config->enable2x2) {
+ if (!enable2x2) {
/* 1x1 */
rx_supp_data_rate = VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
tx_supp_data_rate = VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
@@ -5189,19 +4992,20 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss)
}
/* Update Rx Highest Long GI data Rate */
- if (sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,
- rx_supp_data_rate) == QDF_STATUS_E_FAILURE) {
+ qdf_status =
+ ucfg_mlme_cfg_set_vht_rx_supp_data_rate(hdd_ctx->psoc,
+ rx_supp_data_rate);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
+ hdd_err("Failed to set rx_supp_data_rate");
status = false;
- hdd_err("Could not pass on WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE to CFG");
}
-
/* Update Tx Highest Long GI data Rate */
- if (sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
- tx_supp_data_rate) == QDF_STATUS_E_FAILURE) {
+ qdf_status =
+ ucfg_mlme_cfg_set_vht_tx_supp_data_rate(hdd_ctx->psoc,
+ tx_supp_data_rate);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
+ hdd_err("Failed to set tx_supp_data_rate");
status = false;
- hdd_err("Could not pass on WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE to CFG");
}
qdf_status = ucfg_mlme_get_ht_cap_info(hdd_ctx->psoc, &ht_cap_info);
@@ -5210,12 +5014,15 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss)
status = false;
}
- if (!(hdd_ctx->ht_tx_stbc_supported && hdd_config->enable2x2)) {
+ if (!(hdd_ctx->ht_tx_stbc_supported && enable2x2)) {
ht_cap_info.tx_stbc = 0;
} else {
- sme_cfg_get_int(mac_handle, WNI_CFG_VHT_TXSTBC, &val32);
- hdd_debug("STBC %d", val32);
- ht_cap_info.tx_stbc = val32;
+ qdf_status =
+ ucfg_mlme_cfg_get_vht_tx_stbc(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
+ hdd_err("Failed to get vht_tx_stbc");
+ ht_cap_info.tx_stbc = bval;
+ }
}
qdf_status = ucfg_mlme_set_ht_cap_info(hdd_ctx->psoc, ht_cap_info);
@@ -5224,43 +5031,10 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss)
hdd_err("Could not set the HT_CAP_INFO");
}
- sme_cfg_get_int(mac_handle, WNI_CFG_VHT_BASIC_MCS_SET, &temp);
- temp = (temp & 0xFFFC) | hdd_config->vhtRxMCS;
- if (hdd_config->enable2x2)
- temp = (temp & 0xFFF3) | (hdd_config->vhtRxMCS2x2 << 2);
- else
- temp |= 0x000C;
-
- if (sme_cfg_set_int(mac_handle, WNI_CFG_VHT_BASIC_MCS_SET,
- temp) == QDF_STATUS_E_FAILURE) {
+ status = ucfg_mlme_update_nss_vht_cap(hdd_ctx->psoc);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
+ hdd_err("Failed to set update_nss_vht_cap");
status = false;
- hdd_err("Could not pass on WNI_CFG_VHT_BASIC_MCS_SET to CFG");
- }
-
- sme_cfg_get_int(mac_handle, WNI_CFG_VHT_RX_MCS_MAP, &temp);
- temp = (temp & 0xFFFC) | hdd_config->vhtRxMCS;
- if (hdd_config->enable2x2)
- temp = (temp & 0xFFF3) | (hdd_config->vhtRxMCS2x2 << 2);
- else
- temp |= 0x000C;
-
- if (sme_cfg_set_int(mac_handle, WNI_CFG_VHT_RX_MCS_MAP,
- temp) == QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Could not pass on WNI_CFG_VHT_RX_MCS_MAP to CFG");
- }
-
- sme_cfg_get_int(mac_handle, WNI_CFG_VHT_TX_MCS_MAP, &temp);
- temp = (temp & 0xFFFC) | hdd_config->vhtTxMCS;
- if (hdd_config->enable2x2)
- temp = (temp & 0xFFF3) | (hdd_config->vhtTxMCS2x2 << 2);
- else
- temp |= 0x000C;
-
- if (sme_cfg_set_int(mac_handle, WNI_CFG_VHT_TX_MCS_MAP,
- temp) == QDF_STATUS_E_FAILURE) {
- status = false;
- hdd_err("Could not pass on WNI_CFG_VHT_TX_MCS_MAP to CFG");
}
#define WLAN_HDD_RX_MCS_ALL_NSTREAM_RATES 0xff
@@ -5269,7 +5043,7 @@ QDF_STATUS hdd_update_nss(struct hdd_adapter *adapter, uint8_t nss)
mcs_set_temp, &val);
mcs_set[0] = mcs_set_temp[0];
- if (hdd_config->enable2x2)
+ if (enable2x2)
for (val = 0; val < nss; val++)
mcs_set[val] = WLAN_HDD_RX_MCS_ALL_NSTREAM_RATES;
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 0d8f124170..ead3a42aff 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -2720,12 +2720,12 @@ static int __wlan_hdd_cfg80211_do_acs(struct wiphy *wiphy,
(adapter->device_mode == QDF_P2P_GO_MODE &&
!hdd_ctx->config->go_force_11n_for_11ac &&
hdd_ctx->config->go_11ac_override))) {
- hdd_debug("ACS Config override for 11AC, vhtChannelWidth %d",
- hdd_ctx->config->vhtChannelWidth);
vht_enabled = 1;
sap_config->acs_cfg.hw_mode = eCSR_DOT11_MODE_11ac;
- sap_config->acs_cfg.ch_width =
- hdd_ctx->config->vhtChannelWidth;
+ qdf_status =
+ ucfg_mlme_get_vht_channel_width(hdd_ctx->psoc,
+ &ch_width);
+ sap_config->acs_cfg.ch_width = ch_width;
}
/* No VHT80 in 2.4G so perform ACS accordingly */
@@ -6181,6 +6181,9 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
uint8_t tid = 0, ac;
uint16_t buff_size = 0;
mac_handle_t mac_handle;
+ QDF_STATUS status;
+ bool bval = false;
+ uint8_t value = 0;
hdd_enter_dev(dev);
@@ -6367,7 +6370,11 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
adapter->session_id,
cfg_val, ac);
if (cfg_val) {
- if (sme_config->csrConfig.enable2x2)
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc,
+ &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+ if (bval)
/*2x2 MCS 5 value*/
he_mcs_val = 0x45;
else
@@ -6415,9 +6422,14 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
if (tb[QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_HE_TX_BEAMFORMEE_NSTS]) {
cfg_val = nla_get_u8(tb[
QCA_WLAN_VENDOR_ATTR_WIFI_TEST_CONFIG_HE_TX_BEAMFORMEE_NSTS]);
- if (cfg_val > hdd_ctx->config->txBFCsnValue) {
+ status = ucfg_mlme_cfg_get_vht_tx_bfee_ant_supp(hdd_ctx->psoc,
+ &value);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get tx_bfee_ant_supp");
+
+ if (cfg_val > value) {
hdd_err("NSTS %d not supported, supp_val %d", cfg_val,
- hdd_ctx->config->txBFCsnValue);
+ value);
ret_val = -ENOTSUPP;
goto send_err;
}
@@ -6425,8 +6437,7 @@ __wlan_hdd_cfg80211_set_wifi_test_config(struct wiphy *wiphy,
ret_val = sme_update_tx_bfee_nsts(hdd_ctx->mac_handle,
adapter->session_id,
cfg_val,
- hdd_ctx->config->txBFCsnValue
- );
+ value);
if (ret_val)
sme_err("Failed to set Tx beamformee cap");
@@ -8775,6 +8786,8 @@ static void hdd_update_acs_sap_config(struct hdd_context *hdd_ctx,
tsap_config_t *sap_config,
struct hdd_vendor_chan_info *channel_list)
{
+ uint8_t ch_width;
+ QDF_STATUS status;
sap_config->channel = channel_list->pri_ch;
sap_config->ch_params.center_freq_seg0 =
@@ -8784,15 +8797,19 @@ static void hdd_update_acs_sap_config(struct hdd_context *hdd_ctx,
sap_config->ch_params.sec_ch_offset = channel_list->ht_sec_ch;
sap_config->ch_params.ch_width = channel_list->chan_width;
- if (sap_config->channel >= 36)
- sap_config->ch_width_orig =
- hdd_ctx->config->vhtChannelWidth;
- else
+ if (sap_config->channel >= 36) {
+ status =
+ ucfg_mlme_get_vht_channel_width(hdd_ctx->psoc,
+ &ch_width);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("Failed to set channel_width");
+ sap_config->ch_width_orig = ch_width;
+ } else {
sap_config->ch_width_orig =
hdd_ctx->config->nChannelBondingMode24GHz ?
eHT_CHANNEL_WIDTH_40MHZ :
eHT_CHANNEL_WIDTH_20MHZ;
-
+ }
sap_config->acs_cfg.pri_ch = channel_list->pri_ch;
sap_config->acs_cfg.ch_width = channel_list->chan_width;
sap_config->acs_cfg.vht_seg0_center_ch =
diff --git a/core/hdd/src/wlan_hdd_green_ap.c b/core/hdd/src/wlan_hdd_green_ap.c
index d3863e18b0..c12122a136 100644
--- a/core/hdd/src/wlan_hdd_green_ap.c
+++ b/core/hdd/src/wlan_hdd_green_ap.c
@@ -27,6 +27,7 @@
#include
#include
#include
+#include "wlan_mlme_ucfg_api.h"
/**
* hdd_green_ap_check_enable() - to check whether to enable green ap or not
@@ -115,6 +116,8 @@ int hdd_green_ap_start_state_mc(struct hdd_context *hdd_ctx,
struct hdd_config *cfg;
bool enable_green_ap = false;
uint8_t num_sap_sessions = 0, num_p2p_go_sessions = 0, ret = 0;
+ QDF_STATUS status;
+ bool bval = false;
cfg = hdd_ctx->config;
if (!cfg) {
@@ -122,9 +125,15 @@ int hdd_green_ap_start_state_mc(struct hdd_context *hdd_ctx,
return -EINVAL;
}
- if (!cfg->enable2x2 || !cfg->enable_green_ap) {
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
+ hdd_err("unable to get vht_enable2x2");
+ return -EINVAL;
+ }
+
+ if (!bval || !cfg->enable_green_ap) {
hdd_debug("Green AP not enabled: enable2x2:%d, enable_green_ap:%d",
- cfg->enable2x2, cfg->enable_green_ap);
+ bval, cfg->enable_green_ap);
return 0;
}
diff --git a/core/hdd/src/wlan_hdd_he.c b/core/hdd/src/wlan_hdd_he.c
index 8066e04428..3b0341f77e 100644
--- a/core/hdd/src/wlan_hdd_he.c
+++ b/core/hdd/src/wlan_hdd_he.c
@@ -56,8 +56,9 @@ void hdd_update_tgt_he_cap(struct hdd_context *hdd_ctx,
uint8_t chan_width;
QDF_STATUS status;
tDot11fIEhe_cap *he_cap = &cfg->he_cap;
- struct hdd_config *config = hdd_ctx->config;
tDot11fIEhe_cap he_cap_ini = {0};
+ uint8_t value = 0;
+ bool bval;
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_CONTROL, he_cap->htc_he);
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_TWT_REQUESTOR,
@@ -135,7 +136,13 @@ void hdd_update_tgt_he_cap(struct hdd_context *hdd_ctx,
he_cap->midamble_tx_rx_max_nsts);
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_LTF_NDP,
he_cap->he_4x_ltf_3200_gi_ndp);
- if (config->enableRxSTBC) {
+
+ status = ucfg_mlme_cfg_get_vht_rx_stbc(hdd_ctx->psoc,
+ &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable_rx_su_beam");
+
+ if (bval) {
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_RX_STBC_LT80,
he_cap->rx_stbc_lt_80mhz);
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_RX_STBC_GT80,
@@ -144,7 +151,13 @@ void hdd_update_tgt_he_cap(struct hdd_context *hdd_ctx,
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_RX_STBC_LT80, 0);
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_RX_STBC_GT80, 0);
}
- if (config->enableTxSTBC) {
+
+ status = ucfg_mlme_cfg_get_vht_tx_stbc(hdd_ctx->psoc,
+ &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable_tx_su_beam");
+
+ if (bval) {
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_TX_STBC_LT80,
he_cap->tx_stbc_lt_80mhz);
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_TX_STBC_GT80,
@@ -159,7 +172,12 @@ void hdd_update_tgt_he_cap(struct hdd_context *hdd_ctx,
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_DCM_RX, he_cap->dcm_enc_rx);
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_MU_PPDU, he_cap->ul_he_mu);
- if (config->enable_su_tx_bformer) {
+ status = ucfg_mlme_get_vht_enable_tx_su_beam(hdd_ctx->psoc,
+ &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable_tx_su_beam");
+
+ if (bval) {
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_SU_BEAMFORMER,
he_cap->su_beamformer);
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_NUM_SOUND_LT80,
@@ -175,7 +193,11 @@ void hdd_update_tgt_he_cap(struct hdd_context *hdd_ctx,
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_MU_BEAMFORMER, 0);
}
- if (config->enableTxBF) {
+ status = ucfg_mlme_get_vht_enable_tx_bf(hdd_ctx->psoc,
+ &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable_tx_bf");
+ if (bval) {
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_SU_BEAMFORMEE,
he_cap->su_beamformee);
hdd_he_set_wni_cfg(hdd_ctx, WNI_CFG_HE_BFEE_STS_LT80,
@@ -259,7 +281,12 @@ void hdd_update_tgt_he_cap(struct hdd_context *hdd_ctx,
if (status == QDF_STATUS_E_FAILURE)
hdd_alert("could not set 5G HE PPET");
- he_cap_ini.bfee_sts_lt_80 = config->txBFCsnValue;
+ status = ucfg_mlme_cfg_get_vht_tx_bfee_ant_supp(hdd_ctx->psoc,
+ &value);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get tx_bfee_ant_supp");
+
+ he_cap_ini.bfee_sts_lt_80 = value;
sme_update_tgt_he_cap(hdd_ctx->mac_handle, cfg, &he_cap_ini);
}
diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c
index a0d856d2b8..21ab0815fa 100644
--- a/core/hdd/src/wlan_hdd_hostapd.c
+++ b/core/hdd/src/wlan_hdd_hostapd.c
@@ -4185,6 +4185,8 @@ static int wlan_hdd_sap_p2p_11ac_overrides(struct hdd_adapter *ap_adapter)
{
tsap_config_t *sap_cfg = &ap_adapter->session.ap.sap_config;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(ap_adapter);
+ uint8_t ch_width;
+ QDF_STATUS status;
/* Fixed channel 11AC override:
* 11AC override in qcacld is introduced for following reasons:
@@ -4218,8 +4220,12 @@ static int wlan_hdd_sap_p2p_11ac_overrides(struct hdd_adapter *ap_adapter)
sap_cfg->SapHw_mode = eCSR_DOT11_MODE_11ac;
if (sap_cfg->channel >= 36) {
- sap_cfg->ch_width_orig =
- hdd_ctx->config->vhtChannelWidth;
+ status =
+ ucfg_mlme_get_vht_channel_width(hdd_ctx->psoc,
+ &ch_width);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("Failed to set channel_width");
+ sap_cfg->ch_width_orig = ch_width;
} else {
/*
* Allow 40 Mhz in 2.4 Ghz only if indicated by
@@ -4557,6 +4563,7 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
bool val;
uint32_t auto_channel_select_weight =
cfg_default(CFG_AUTO_CHANNEL_SELECT_WEIGHT);
+ bool bval = false;
hdd_enter();
@@ -5008,8 +5015,11 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
if (!cds_is_sub_20_mhz_enabled())
wlan_hdd_set_sap_hwmode(adapter);
- if (IS_24G_CH(pConfig->channel) &&
- hdd_ctx->config->enableVhtFor24GHzBand &&
+ status = ucfg_mlme_get_vht_for_24ghz(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(qdf_status))
+ hdd_err("Failed to get vht_for_24ghz");
+
+ if (IS_24G_CH(pConfig->channel) && bval &&
(pConfig->SapHw_mode == eCSR_DOT11_MODE_11n ||
pConfig->SapHw_mode == eCSR_DOT11_MODE_11n_ONLY))
pConfig->SapHw_mode = eCSR_DOT11_MODE_11ac;
diff --git a/core/hdd/src/wlan_hdd_hostapd_wext.c b/core/hdd/src/wlan_hdd_hostapd_wext.c
index a2168bb345..52adec2ea3 100644
--- a/core/hdd/src/wlan_hdd_hostapd_wext.c
+++ b/core/hdd/src/wlan_hdd_hostapd_wext.c
@@ -461,6 +461,7 @@ static __iw_softap_setparam(struct net_device *dev,
QDF_STATUS status;
int ret = 0;
struct hdd_context *hdd_ctx;
+ bool bval = false;
hdd_enter_dev(dev);
@@ -567,12 +568,17 @@ static __iw_softap_setparam(struct net_device *dev,
case QCSAP_PARAM_SET_MC_RATE:
{
tSirRateUpdateInd rateUpdate = {0};
- struct hdd_config *pConfig = hdd_ctx->config;
hdd_debug("MC Target rate %d", set_value);
qdf_copy_macaddr(&rateUpdate.bssid,
&adapter->mac_addr);
- rateUpdate.nss = (pConfig->enable2x2 == 0) ? 0 : 1;
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
+ hdd_err("unable to get vht_enable2x2");
+ ret = -1;
+ }
+ rateUpdate.nss = (bval == 0) ? 0 : 1;
+
rateUpdate.dev_mode = adapter->device_mode;
rateUpdate.mcastDataRate24GHz = set_value;
rateUpdate.mcastDataRate24GHzTxFlag = 1;
diff --git a/core/hdd/src/wlan_hdd_ioctl.c b/core/hdd/src/wlan_hdd_ioctl.c
index 07b85a0a54..cfce8afdc2 100644
--- a/core/hdd/src/wlan_hdd_ioctl.c
+++ b/core/hdd/src/wlan_hdd_ioctl.c
@@ -2813,6 +2813,7 @@ int wlan_hdd_set_mc_rate(struct hdd_adapter *adapter, int targetRate)
QDF_STATUS status;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
struct hdd_config *pConfig;
+ bool bval = false;
if (hdd_ctx == NULL) {
hdd_err("HDD context is null");
@@ -2828,7 +2829,14 @@ int wlan_hdd_set_mc_rate(struct hdd_adapter *adapter, int targetRate)
return -EINVAL;
}
pConfig = hdd_ctx->config;
- rateUpdate.nss = (pConfig->enable2x2 == 0) ? 0 : 1;
+
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
+ hdd_err("unable to get vht_enable2x2");
+ return -EINVAL;
+ }
+ rateUpdate.nss = (bval == 0) ? 0 : 1;
+
rateUpdate.dev_mode = adapter->device_mode;
rateUpdate.mcastDataRate24GHz = targetRate;
rateUpdate.mcastDataRate24GHzTxFlag = 1;
@@ -5159,7 +5167,7 @@ static int drv_cmd_set_rmc_tx_rate(struct hdd_adapter *adapter,
enum tx_rate_info txFlags = 0;
tSirRateUpdateInd rateUpdateParams = {0};
int status;
- struct hdd_config *pConfig = hdd_ctx->config;
+ bool bval = false;
if ((QDF_IBSS_MODE != adapter->device_mode) &&
(QDF_SAP_MODE != adapter->device_mode)) {
@@ -5185,7 +5193,13 @@ static int drv_cmd_set_rmc_tx_rate(struct hdd_adapter *adapter,
* Fill the user specifieed RMC rate param
* and the derived tx flags.
*/
- rateUpdateParams.nss = (pConfig->enable2x2 == 0) ? 0 : 1;
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status)) {
+ hdd_err("unable to get vht_enable2x2");
+ ret = -EINVAL;
+ goto exit;
+ }
+ rateUpdateParams.nss = (bval == 0) ? 0 : 1;
rateUpdateParams.reliableMcastDataRate = uRate;
rateUpdateParams.reliableMcastDataRateTxFlag = txFlags;
rateUpdateParams.dev_mode = adapter->device_mode;
@@ -6525,13 +6539,20 @@ static int hdd_parse_setantennamode_command(const uint8_t *value)
*/
static bool hdd_is_supported_chain_mask_2x2(struct hdd_context *hdd_ctx)
{
- /*
+ QDF_STATUS status;
+ bool bval = false;
+
+/*
* Revisit and the update logic to determine the number
* of TX/RX chains supported in the system when
* antenna sharing per band chain mask support is
* brought in
*/
- return (hdd_ctx->config->enable2x2 == 0x01) ? true : false;
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+
+ return (bval == 0x01) ? true : false;
}
/**
@@ -6543,13 +6564,20 @@ static bool hdd_is_supported_chain_mask_2x2(struct hdd_context *hdd_ctx)
*/
static bool hdd_is_supported_chain_mask_1x1(struct hdd_context *hdd_ctx)
{
+ QDF_STATUS status;
+ bool bval = false;
+
/*
* Revisit and update the logic to determine the number
* of TX/RX chains supported in the system when
* antenna sharing per band chain mask support is
* brought in
*/
- return (!hdd_ctx->config->enable2x2) ? true : false;
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+
+ return (!bval) ? true : false;
}
QDF_STATUS hdd_update_smps_antenna_mode(struct hdd_context *hdd_ctx, int mode)
diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c
index b3bb146d7e..33dd2581a2 100644
--- a/core/hdd/src/wlan_hdd_main.c
+++ b/core/hdd/src/wlan_hdd_main.c
@@ -1326,8 +1326,14 @@ static void hdd_update_vdev_nss(struct hdd_context *hdd_ctx)
struct hdd_config *cfg_ini = hdd_ctx->config;
uint8_t max_supp_nss = 1;
mac_handle_t mac_handle;
+ QDF_STATUS status;
+ bool bval;
- if (cfg_ini->enable2x2 && !cds_is_sub_20_mhz_enabled())
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+
+ if (bval && !cds_is_sub_20_mhz_enabled())
max_supp_nss = 2;
hdd_debug("max nss %d vdev_type_nss_2g %x vdev_type_nss_5g %x",
max_supp_nss, cfg_ini->vdev_type_nss_2g,
@@ -1353,22 +1359,27 @@ static void hdd_update_wiphy_vhtcap(struct hdd_context *hdd_ctx)
{
struct ieee80211_supported_band *band_5g =
hdd_ctx->wiphy->bands[NL80211_BAND_5GHZ];
- uint32_t val;
+ QDF_STATUS status;
+ uint8_t value = 0, value1 = 0;
if (!band_5g) {
hdd_debug("5GHz band disabled, skipping capability population");
return;
}
- val = hdd_ctx->config->txBFCsnValue;
- band_5g->vht_cap.cap |= (val << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT);
+ status = ucfg_mlme_cfg_get_vht_tx_bfee_ant_supp(hdd_ctx->psoc,
+ &value);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get tx_bfee_ant_supp");
- val = NUM_OF_SOUNDING_DIMENSIONS;
+ band_5g->vht_cap.cap |= (value << IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT);
+
+ value1 = NUM_OF_SOUNDING_DIMENSIONS;
band_5g->vht_cap.cap |=
- (val << IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT);
+ (value1 << IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_SHIFT);
hdd_debug("Updated wiphy vhtcap:0x%x, CSNAntSupp:%d, NumSoundDim:%d",
- band_5g->vht_cap.cap, hdd_ctx->config->txBFCsnValue, val);
+ band_5g->vht_cap.cap, value, value1);
}
/**
@@ -1401,10 +1412,10 @@ static void hdd_update_tgt_ht_cap(struct hdd_context *hdd_ctx,
{
QDF_STATUS status;
uint32_t value;
- struct hdd_config *pconfig = hdd_ctx->config;
struct mlme_ht_capabilities_info ht_cap_info;
uint8_t mcs_set[SIZE_OF_SUPPORTED_MCS_SET];
mac_handle_t mac_handle = hdd_ctx->mac_handle;
+ bool b_enable1x1;
/* get the MPDU density */
status = sme_cfg_get_int(mac_handle, WNI_CFG_MPDU_DENSITY, &value);
@@ -1450,31 +1461,34 @@ static void hdd_update_tgt_ht_cap(struct hdd_context *hdd_ctx,
hdd_ctx->num_rf_chains = cfg->num_rf_chains;
hdd_ctx->ht_tx_stbc_supported = cfg->ht_tx_stbc;
- if (pconfig->enable2x2 && (cfg->num_rf_chains == 2)) {
- pconfig->enable2x2 = 1;
- } else {
- pconfig->enable2x2 = 0;
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &b_enable1x1);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+
+ b_enable1x1 = b_enable1x1 && (cfg->num_rf_chains == 2);
+
+ status = ucfg_mlme_set_vht_enable2x2(hdd_ctx->psoc, b_enable1x1);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to set vht_enable2x2");
+
+ if (b_enable1x1 == false) {
ht_cap_info.tx_stbc = 0;
/* 1x1 */
/* Update Rx Highest Long GI data Rate */
- if (sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,
- VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1)
- == QDF_STATUS_E_FAILURE) {
- hdd_err("Could not pass on WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE to CCM");
- }
-
+ status = ucfg_mlme_cfg_set_vht_rx_supp_data_rate(
+ hdd_ctx->psoc,
+ VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("Failed to set rx_supp_data_rate");
/* Update Tx Highest Long GI data Rate */
- if (sme_cfg_set_int
- (mac_handle,
- WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
- VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1) ==
- QDF_STATUS_E_FAILURE) {
- hdd_err("VHT_TX_HIGHEST_SUPP_RATE_1_1 to CCM fail");
- }
+ status = ucfg_mlme_cfg_set_vht_tx_supp_data_rate(
+ hdd_ctx->psoc,
+ VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_1_1);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("Failed to set tx_supp_data_rate");
}
- if (!(cfg->ht_tx_stbc && pconfig->enable2x2))
+ if (!(cfg->ht_tx_stbc && b_enable1x1))
ht_cap_info.tx_stbc = 0;
status = ucfg_mlme_set_ht_cap_info(hdd_ctx->psoc, ht_cap_info);
@@ -1487,7 +1501,8 @@ static void hdd_update_tgt_ht_cap(struct hdd_context *hdd_ctx,
hdd_debug("Read MCS rate set");
if (cfg->num_rf_chains > SIZE_OF_SUPPORTED_MCS_SET)
cfg->num_rf_chains = SIZE_OF_SUPPORTED_MCS_SET;
- if (pconfig->enable2x2) {
+
+ if (b_enable1x1) {
for (value = 0; value < cfg->num_rf_chains; value++)
mcs_set[value] =
WLAN_HDD_RX_MCS_ALL_NSTREAM_RATES;
@@ -1508,264 +1523,21 @@ static void hdd_update_tgt_vht_cap(struct hdd_context *hdd_ctx,
struct wma_tgt_vht_cap *cfg)
{
QDF_STATUS status;
- uint32_t value = 0;
- struct hdd_config *pconfig = hdd_ctx->config;
struct wiphy *wiphy = hdd_ctx->wiphy;
struct ieee80211_supported_band *band_5g =
wiphy->bands[HDD_NL80211_BAND_5GHZ];
- uint32_t temp = 0;
uint32_t ch_width = eHT_CHANNEL_WIDTH_80MHZ;
- uint32_t hw_rx_ldpc_enabled;
struct wma_caps_per_phy caps_per_phy;
- mac_handle_t mac_handle;
+ uint8_t val = 0;
if (!band_5g) {
hdd_debug("5GHz band disabled, skipping capability population");
return;
}
- mac_handle = hdd_ctx->mac_handle;
-
- /* Get the current MPDU length */
- status =
- sme_cfg_get_int(mac_handle, WNI_CFG_VHT_MAX_MPDU_LENGTH,
- &value);
-
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("could not get MPDU LENGTH");
- value = 0;
- }
-
- /*
- * VHT max MPDU length:
- * override if user configured value is too high
- * that the target cannot support
- */
- if (value > cfg->vht_max_mpdu) {
- status = sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_MAX_MPDU_LENGTH,
- cfg->vht_max_mpdu);
-
- if (status == QDF_STATUS_E_FAILURE)
- hdd_err("could not set VHT MAX MPDU LENGTH");
- }
-
- sme_cfg_get_int(mac_handle, WNI_CFG_VHT_BASIC_MCS_SET, &temp);
- temp = (temp & VHT_MCS_1x1) | pconfig->vhtRxMCS;
-
- if (pconfig->enable2x2)
- temp = (temp & VHT_MCS_2x2) | (pconfig->vhtRxMCS2x2 << 2);
-
- if (sme_cfg_set_int(mac_handle, WNI_CFG_VHT_BASIC_MCS_SET, temp) ==
- QDF_STATUS_E_FAILURE) {
- hdd_err("Could not pass VHT_BASIC_MCS_SET to CCM");
- }
-
- sme_cfg_get_int(mac_handle, WNI_CFG_VHT_RX_MCS_MAP, &temp);
- temp = (temp & VHT_MCS_1x1) | pconfig->vhtRxMCS;
- if (pconfig->enable2x2)
- temp = (temp & VHT_MCS_2x2) | (pconfig->vhtRxMCS2x2 << 2);
-
- if (sme_cfg_set_int(mac_handle, WNI_CFG_VHT_RX_MCS_MAP, temp) ==
- QDF_STATUS_E_FAILURE) {
- hdd_err("Could not pass WNI_CFG_VHT_RX_MCS_MAP to CCM");
- }
-
- sme_cfg_get_int(mac_handle, WNI_CFG_VHT_TX_MCS_MAP, &temp);
- temp = (temp & VHT_MCS_1x1) | pconfig->vhtTxMCS;
- if (pconfig->enable2x2)
- temp = (temp & VHT_MCS_2x2) | (pconfig->vhtTxMCS2x2 << 2);
-
- hdd_debug("vhtRxMCS2x2 - %x temp - %u enable2x2 %d",
- pconfig->vhtRxMCS2x2, temp, pconfig->enable2x2);
-
- if (sme_cfg_set_int(mac_handle, WNI_CFG_VHT_TX_MCS_MAP, temp) ==
- QDF_STATUS_E_FAILURE) {
- hdd_err("Could not pass WNI_CFG_VHT_TX_MCS_MAP to CCM");
- }
- /* Get the current RX LDPC setting */
- status = sme_cfg_get_int(mac_handle, WNI_CFG_VHT_LDPC_CODING_CAP,
- &value);
-
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("could not get VHT LDPC CODING CAP");
- value = 0;
- }
-
- /* Set HW RX LDPC capability */
- hw_rx_ldpc_enabled = !!cfg->vht_rx_ldpc;
- if (hw_rx_ldpc_enabled != value) {
- status = sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_LDPC_CODING_CAP,
- hw_rx_ldpc_enabled);
-
- if (status == QDF_STATUS_E_FAILURE)
- hdd_err("could not set VHT LDPC CODING CAP to CCM");
- }
-
- /* Get current GI 80 value */
- status = sme_cfg_get_int(mac_handle, WNI_CFG_VHT_SHORT_GI_80MHZ,
- &value);
-
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("could not get SHORT GI 80MHZ");
- value = 0;
- }
-
- /* set the Guard interval 80MHz */
- if (value && !cfg->vht_short_gi_80) {
- status = sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_SHORT_GI_80MHZ,
- cfg->vht_short_gi_80);
-
- if (status == QDF_STATUS_E_FAILURE)
- hdd_err("could not set SHORT GI 80MHZ to CCM");
- }
-
- /* Get VHT TX STBC cap */
- status = sme_cfg_get_int(mac_handle, WNI_CFG_VHT_TXSTBC, &value);
-
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("could not get VHT TX STBC");
- value = 0;
- }
-
- /* VHT TX STBC cap */
- if (value && !cfg->vht_tx_stbc) {
- status = sme_cfg_set_int(mac_handle, WNI_CFG_VHT_TXSTBC,
- cfg->vht_tx_stbc);
-
- if (status == QDF_STATUS_E_FAILURE)
- hdd_err("could not set the VHT TX STBC to CCM");
- }
-
- /* Get VHT RX STBC cap */
- status = sme_cfg_get_int(mac_handle, WNI_CFG_VHT_RXSTBC, &value);
-
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("could not get VHT RX STBC");
- value = 0;
- }
-
- /* VHT RX STBC cap */
- if (value && !cfg->vht_rx_stbc) {
- status = sme_cfg_set_int(mac_handle, WNI_CFG_VHT_RXSTBC,
- cfg->vht_rx_stbc);
-
- if (status == QDF_STATUS_E_FAILURE)
- hdd_err("could not set the VHT RX STBC to CCM");
- }
-
- /* Get VHT SU Beamformer cap */
- status = sme_cfg_get_int(mac_handle, WNI_CFG_VHT_SU_BEAMFORMER_CAP,
- &value);
-
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("could not get VHT SU BEAMFORMER CAP");
- value = 0;
- }
-
- /* set VHT SU Beamformer cap */
- if (value && !cfg->vht_su_bformer) {
- status = sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_SU_BEAMFORMER_CAP,
- cfg->vht_su_bformer);
-
- if (status == QDF_STATUS_E_FAILURE)
- hdd_err("could not set VHT SU BEAMFORMER CAP");
- }
-
- /* check and update SU BEAMFORMEE capabality */
- if (pconfig->enableTxBF && !cfg->vht_su_bformee)
- pconfig->enableTxBF = cfg->vht_su_bformee;
-
- status = sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_SU_BEAMFORMEE_CAP,
- pconfig->enableTxBF);
-
- if (status == QDF_STATUS_E_FAILURE)
- hdd_err("could not set VHT SU BEAMFORMEE CAP");
-
- /* Get VHT MU Beamformer cap */
- status = sme_cfg_get_int(mac_handle, WNI_CFG_VHT_MU_BEAMFORMER_CAP,
- &value);
-
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("could not get VHT MU BEAMFORMER CAP");
- value = 0;
- }
-
- /* set VHT MU Beamformer cap */
- if (value && !cfg->vht_mu_bformer) {
- status = sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_MU_BEAMFORMER_CAP,
- cfg->vht_mu_bformer);
-
- if (status == QDF_STATUS_E_FAILURE)
- hdd_err("could not set the VHT MU BEAMFORMER CAP to CCM");
- }
-
- /* Get VHT MU Beamformee cap */
- status = sme_cfg_get_int(mac_handle, WNI_CFG_VHT_MU_BEAMFORMEE_CAP,
- &value);
-
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("could not get VHT MU BEAMFORMEE CAP");
- value = 0;
- }
-
- /* set VHT MU Beamformee cap */
- if (value && !cfg->vht_mu_bformee) {
- status = sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_MU_BEAMFORMEE_CAP,
- cfg->vht_mu_bformee);
-
- if (status == QDF_STATUS_E_FAILURE)
- hdd_err("could not set VHT MU BEAMFORMER CAP");
- }
-
- /* Get VHT MAX AMPDU Len exp */
- status = sme_cfg_get_int(mac_handle, WNI_CFG_VHT_AMPDU_LEN_EXPONENT,
- &value);
-
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("could not get VHT AMPDU LEN");
- value = 0;
- }
-
- /*
- * VHT max AMPDU len exp:
- * override if user configured value is too high
- * that the target cannot support.
- * Even though Rome publish ampdu_len=7, it can
- * only support 4 because of some h/w bug.
- */
-
- if (value > cfg->vht_max_ampdu_len_exp) {
- status = sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_AMPDU_LEN_EXPONENT,
- cfg->vht_max_ampdu_len_exp);
-
- if (status == QDF_STATUS_E_FAILURE)
- hdd_err("could not set the VHT AMPDU LEN EXP");
- }
-
- /* Get VHT TXOP PS CAP */
- status = sme_cfg_get_int(mac_handle, WNI_CFG_VHT_TXOP_PS, &value);
-
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("could not get VHT TXOP PS");
- value = 0;
- }
-
- /* set VHT TXOP PS cap */
- if (value && !cfg->vht_txop_ps) {
- status = sme_cfg_set_int(mac_handle, WNI_CFG_VHT_TXOP_PS,
- cfg->vht_txop_ps);
-
- if (status == QDF_STATUS_E_FAILURE)
- hdd_err("could not set the VHT TXOP PS");
- }
+ status = ucfg_mlme_update_vht_cap(hdd_ctx->psoc, cfg);
+ if (QDF_IS_STATUS_ERROR(status))
+ hdd_err("could not update vht capabilities");
if (WMI_VHT_CAP_MAX_MPDU_LEN_11454 == cfg->vht_max_mpdu)
band_5g->vht_cap.cap |= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454;
@@ -1776,43 +1548,35 @@ static void hdd_update_tgt_vht_cap(struct hdd_context *hdd_ctx,
if (cfg->supp_chan_width & (1 << eHT_CHANNEL_WIDTH_80P80MHZ)) {
- status = sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET,
+ status =
+ ucfg_mlme_cfg_set_vht_chan_width(hdd_ctx->psoc,
VHT_CAP_160_AND_80P80_SUPP);
- if (status == QDF_STATUS_E_FAILURE)
+ if (QDF_IS_STATUS_ERROR(status))
hdd_err("could not set the VHT CAP 160");
band_5g->vht_cap.cap |=
IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ;
ch_width = eHT_CHANNEL_WIDTH_80P80MHZ;
} else if (cfg->supp_chan_width & (1 << eHT_CHANNEL_WIDTH_160MHZ)) {
- status = sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET,
- VHT_CAP_160_SUPP);
- if (status == QDF_STATUS_E_FAILURE)
+ status =
+ ucfg_mlme_cfg_set_vht_chan_width(hdd_ctx->psoc,
+ VHT_CAP_160_SUPP);
+ if (QDF_IS_STATUS_ERROR(status))
hdd_err("could not set the VHT CAP 160");
band_5g->vht_cap.cap |=
IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ;
ch_width = eHT_CHANNEL_WIDTH_160MHZ;
}
- pconfig->vhtChannelWidth = QDF_MIN(pconfig->vhtChannelWidth,
- ch_width);
- /* Get the current GI 160 value */
- status = sme_cfg_get_int(mac_handle,
- WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
- &value);
- if (status != QDF_STATUS_SUCCESS) {
- hdd_err("could not get GI 80 & 160");
- value = 0;
- }
- /* set the Guard interval 160MHz */
- if (value && !cfg->vht_short_gi_160) {
- status = sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
- cfg->vht_short_gi_160);
- if (status == QDF_STATUS_E_FAILURE)
- hdd_err("failed to set SHORT GI 160MHZ");
- }
+ status =
+ ucfg_mlme_cfg_get_vht_chan_width(hdd_ctx->psoc, &val);
+ if (QDF_IS_STATUS_ERROR(status))
+ hdd_err("could not get channel_width");
+
+ val = QDF_MIN(val, ch_width);
+ status =
+ ucfg_mlme_cfg_set_vht_chan_width(hdd_ctx->psoc, val);
+ if (QDF_IS_STATUS_ERROR(status))
+ hdd_err("could not set the channel width");
if (cfg->vht_rx_ldpc & WMI_VHT_CAP_RX_LDPC) {
band_5g->vht_cap.cap |= IEEE80211_VHT_CAP_RXLDPC;
@@ -1933,6 +1697,8 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg)
uint8_t antenna_mode;
QDF_STATUS status;
mac_handle_t mac_handle;
+ bool bval = false;
+ uint8_t value = 0;
if (!hdd_ctx) {
hdd_err("HDD context is NULL");
@@ -2099,7 +1865,11 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg)
hdd_debug("fine_time_meas_cap: 0x%x",
hdd_ctx->config->fine_time_meas_cap);
- antenna_mode = (hdd_ctx->config->enable2x2 == 0x01) ?
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+
+ antenna_mode = (bval == 0x01) ?
HDD_ANTENNA_MODE_2X2 : HDD_ANTENNA_MODE_1X1;
hdd_update_smps_antenna_mode(hdd_ctx, antenna_mode);
hdd_debug("Init current antenna mode: %d",
@@ -2108,21 +1878,28 @@ void hdd_update_tgt_cfg(hdd_handle_t hdd_handle, struct wma_tgt_cfg *cfg)
hdd_ctx->rcpi_enabled = cfg->rcpi_enabled;
hdd_update_ra_rate_limit(hdd_ctx, cfg);
- if ((hdd_ctx->config->txBFCsnValue >
+ status = ucfg_mlme_cfg_get_vht_tx_bfee_ant_supp(hdd_ctx->psoc,
+ &value);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ status = false;
+ hdd_err("set tx_bfee_ant_supp failed");
+ }
+
+ if ((value >
WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF) &&
- !cfg->tx_bfee_8ss_enabled)
- hdd_ctx->config->txBFCsnValue =
- WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF;
+ !cfg->tx_bfee_8ss_enabled) {
+ status =
+ ucfg_mlme_cfg_set_vht_tx_bfee_ant_supp(hdd_ctx->psoc,
+ WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF);
+ if (QDF_IS_STATUS_ERROR(status)) {
+ status = false;
+ hdd_err("set tx_bfee_ant_supp failed");
+ }
+ }
mac_handle = hdd_ctx->mac_handle;
- status = sme_cfg_set_int(mac_handle,
- WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
- hdd_ctx->config->txBFCsnValue);
- if (QDF_IS_STATUS_ERROR(status))
- hdd_err("fw update WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED to CFG fails");
- hdd_debug("Target 8ss fw support %d txBFCsnValue %d",
- cfg->tx_bfee_8ss_enabled, hdd_ctx->config->txBFCsnValue);
+ hdd_debug("txBFCsnValue %d", value);
/*
* Update txBFCsnValue and NumSoundingDim values to vhtcap in wiphy
@@ -4173,11 +3950,16 @@ QDF_STATUS hdd_init_station_mode(struct hdd_adapter *adapter)
QDF_STATUS status;
int ret_val;
mac_handle_t mac_handle;
+ bool bval = false;
hdd_ctx = WLAN_HDD_GET_CTX(adapter);
mac_handle = hdd_ctx->mac_handle;
sme_set_curr_device_mode(mac_handle, adapter->device_mode);
- sme_set_pdev_ht_vht_ies(mac_handle, hdd_ctx->config->enable2x2);
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+ sme_set_pdev_ht_vht_ies(mac_handle, bval);
+
sme_set_vdev_ies_per_band(mac_handle, adapter->session_id);
hdd_roam_profile_init(adapter);
@@ -4493,9 +4275,14 @@ static int hdd_configure_chain_mask(struct hdd_adapter *adapter)
QDF_STATUS status;
struct wma_caps_per_phy non_dbs_phy_cap;
struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+ bool bval = false;
+
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
hdd_debug("enable2x2: %d, lte_coex: %d, disable_DBS: %d",
- hdd_ctx->config->enable2x2, hdd_ctx->lte_coex_ant_share,
+ bval, hdd_ctx->lte_coex_ant_share,
hdd_ctx->config->dual_mac_feature_disable);
hdd_debug("enable_bt_chain_separation %d",
hdd_ctx->config->enable_bt_chain_separation);
@@ -4516,8 +4303,7 @@ static int hdd_configure_chain_mask(struct hdd_adapter *adapter)
return 0;
}
- if (hdd_ctx->config->enable2x2 &&
- !hdd_ctx->config->enable_bt_chain_separation) {
+ if (bval && !hdd_ctx->config->enable_bt_chain_separation) {
hdd_debug("2x2 enabled. skip chain mask programming");
return 0;
}
@@ -4664,6 +4450,7 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
bool enable_dtim_1chrx;
QDF_STATUS status;
struct hdd_context *hdd_ctx;
+ bool bval = false;
hdd_enter_dev(adapter->dev);
@@ -4744,7 +4531,11 @@ int hdd_set_fw_params(struct hdd_adapter *adapter)
enable_dtim_1chrx);
}
- if (hdd_ctx->config->enable2x2) {
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+
+ if (bval) {
hdd_debug("configuring 2x2 mode fw params");
ret = sme_set_cck_tx_fir_override(hdd_ctx->mac_handle,
@@ -10894,6 +10685,7 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
struct policy_mgr_dp_cbacks dp_cbs = {0};
bool value;
enum pmo_auto_pwr_detect_failure_mode auto_power_fail_mode;
+ bool bval = false;
mac_handle = hdd_ctx->mac_handle;
@@ -10951,7 +10743,11 @@ int hdd_configure_cds(struct hdd_context *hdd_ctx)
goto out;
}
- if (!hdd_ctx->config->enable2x2) {
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+
+ if (!bval) {
if (num_11b_tx_chains > 1)
num_11b_tx_chains = 1;
if (num_11ag_tx_chains > 1)
@@ -13971,41 +13767,25 @@ uint32_t hdd_limit_max_per_index_score(uint32_t per_index_score)
return per_index_score;
}
-/**
- * hdd_update_score_config - API to update candidate scoring related params
- * configuration parameters
- * @score_config: score config to update
- * @cfg: config params
- *
- * Return: QDF_STATUS
- */
-static QDF_STATUS
-hdd_update_score_config(struct scoring_config *score_config,
- struct hdd_config *cfg)
+QDF_STATUS hdd_update_score_config(
+ struct scoring_config *score_config, struct hdd_context *hdd_ctx)
{
- struct hdd_context *hdd_ctx;
- bool enable2x2 = false;
+ struct hdd_config *cfg = hdd_ctx->config;
QDF_STATUS status;
-
- hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
- if (!hdd_ctx) {
- hdd_err("HDD context is NULL");
- return QDF_STATUS_E_FAILURE;
- }
+ bool bval = false;
sme_update_score_config(hdd_ctx->mac_handle, score_config);
score_config->cb_mode_24G = cfg->nChannelBondingMode24GHz;
score_config->cb_mode_5G = cfg->nChannelBondingMode5GHz;
- status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &enable2x2);
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
if (!QDF_IS_STATUS_SUCCESS(status))
- hdd_err("unable to get enable2x2");
-
+ hdd_err("unable to get vht_enable2x2");
score_config->vdev_nss_24g =
- enable2x2 ? CFG_STA_NSS(cfg->vdev_type_nss_2g) : 1;
+ bval ? CFG_STA_NSS(cfg->vdev_type_nss_2g) : 1;
score_config->vdev_nss_5g =
- enable2x2 ? CFG_STA_NSS(cfg->vdev_type_nss_5g) : 1;
+ bval ? CFG_STA_NSS(cfg->vdev_type_nss_5g) : 1;
if (cfg->dot11Mode == eHDD_DOT11_MODE_AUTO ||
cfg->dot11Mode == eHDD_DOT11_MODE_11ax ||
@@ -14021,10 +13801,18 @@ hdd_update_score_config(struct scoring_config *score_config,
cfg->dot11Mode == eHDD_DOT11_MODE_11n_ONLY)
score_config->ht_cap = 1;
- if (score_config->vht_cap && cfg->enableVhtFor24GHzBand)
+ status = ucfg_mlme_get_vht_for_24ghz(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("Failed to get vht_for_24ghz");
+ if (score_config->vht_cap && bval)
score_config->vht_24G_cap = 1;
- if (cfg->enableTxBF)
+ status = ucfg_mlme_get_vht_enable_tx_bf(hdd_ctx->psoc,
+ &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable_tx_bf");
+
+ if (bval)
score_config->beamformee_cap = 1;
return QDF_STATUS_SUCCESS;
@@ -14102,7 +13890,7 @@ static int hdd_update_scan_config(struct hdd_context *hdd_ctx)
hdd_update_pno_config(&scan_cfg.pno_cfg, cfg);
hdd_update_ie_whitelist_attr(&scan_cfg.ie_whitelist, hdd_ctx);
- status = hdd_update_score_config(&scan_cfg.score_config, cfg);
+ status = hdd_update_score_config(&scan_cfg.score_config, hdd_ctx);
if (QDF_IS_STATUS_ERROR(status)) {
hdd_err("Failed to update scoring config");
return -EINVAL;
diff --git a/core/hdd/src/wlan_hdd_nan_datapath.c b/core/hdd/src/wlan_hdd_nan_datapath.c
index b3027372ed..93b232cce1 100644
--- a/core/hdd/src/wlan_hdd_nan_datapath.c
+++ b/core/hdd/src/wlan_hdd_nan_datapath.c
@@ -37,6 +37,7 @@
#include "wlan_nan_api.h"
#include "nan_public_structs.h"
#include "cfg_nan_api.h"
+#include "wlan_mlme_ucfg_api.h"
/**
* hdd_nan_datapath_target_config() - Configure NAN datapath features
@@ -401,6 +402,7 @@ int hdd_init_nan_data_mode(struct hdd_adapter *adapter)
QDF_STATUS status;
int32_t ret_val;
mac_handle_t mac_handle;
+ bool bval = false;
ret_val = hdd_vdev_create(adapter, hdd_sme_roam_callback, adapter);
if (ret_val) {
@@ -412,7 +414,12 @@ int hdd_init_nan_data_mode(struct hdd_adapter *adapter)
/* Configure self HT/VHT capabilities */
sme_set_curr_device_mode(mac_handle, adapter->device_mode);
- sme_set_pdev_ht_vht_ies(mac_handle, hdd_ctx->config->enable2x2);
+
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+
+ sme_set_pdev_ht_vht_ies(mac_handle, bval);
sme_set_vdev_ies_per_band(mac_handle, adapter->session_id);
hdd_roam_profile_init(adapter);
diff --git a/core/hdd/src/wlan_hdd_stats.c b/core/hdd/src/wlan_hdd_stats.c
index 8ab56b82ac..cd03f8a146 100644
--- a/core/hdd/src/wlan_hdd_stats.c
+++ b/core/hdd/src/wlan_hdd_stats.c
@@ -36,6 +36,8 @@
#include "wlan_hdd_debugfs_llstat.h"
#include "wlan_reg_services_api.h"
#include
+#include "wlan_mlme_ucfg_api.h"
+#include "wlan_mlme_ucfg_api.h"
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)) && !defined(WITH_BACKPORTS)
#define HDD_INFO_SIGNAL STATION_INFO_SIGNAL
@@ -3945,7 +3947,7 @@ int wlan_hdd_get_station_remote(struct wiphy *wiphy,
* @tx_nss: The TX NSS from fw stats
*
* Return: 0 for success
- */
+ nt wlan_hdd_update_phymode(struct net_device *net, mac_handle_t mac_handle, int */
static int hdd_report_max_rate(mac_handle_t mac_handle,
struct hdd_config *config,
struct station_info *sinfo,
@@ -3970,6 +3972,14 @@ static int hdd_report_max_rate(mac_handle_t mac_handle,
uint8_t max_mcs_idx = 0;
uint8_t rate_flag = 1;
int mode = 0, max_ht_idx;
+ QDF_STATUS stat = QDF_STATUS_E_FAILURE;
+ struct hdd_context *hdd_ctx;
+
+ hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
+ if (!hdd_ctx) {
+ hdd_err("HDD context is NULL");
+ return QDF_STATUS_E_FAILURE;
+ }
/* we do not want to necessarily report the current speed */
if (eHDD_LINK_SPEED_REPORT_MAX == config->reportMaxLinkSpeed) {
@@ -4076,9 +4086,10 @@ static int hdd_report_max_rate(mac_handle_t mac_handle,
/* VHT80 rate has separate rate table */
if (tx_rate_flags & (TX_RATE_VHT20 | TX_RATE_VHT40 |
TX_RATE_VHT80)) {
- sme_cfg_get_int(mac_handle,
- WNI_CFG_VHT_TX_MCS_MAP,
- &vht_mcs_map);
+ stat = ucfg_mlme_cfg_get_vht_tx_mcs_map(hdd_ctx->psoc,
+ &vht_mcs_map);
+ if (QDF_IS_STATUS_ERROR(stat))
+ hdd_err("failed to get tx_mcs_map");
vht_max_mcs = (enum data_rate_11ac_max_mcs)
(vht_mcs_map & DATA_RATE_11AC_MCS_MASK);
if (tx_rate_flags & TX_RATE_SGI)
diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c
index 47eeb580ce..a9da38dda7 100644
--- a/core/hdd/src/wlan_hdd_wext.c
+++ b/core/hdd/src/wlan_hdd_wext.c
@@ -3441,13 +3441,12 @@ int hdd_set_ldpc(struct hdd_adapter *adapter, int value)
hdd_err("Failed to set HT capability info");
return -EIO;
}
- status = sme_cfg_set_int(mac_handle, WNI_CFG_VHT_LDPC_CODING_CAP,
- value);
- if (QDF_STATUS_SUCCESS != status) {
+ status =
+ ucfg_mlme_cfg_set_vht_ldpc_coding_cap(hdd_ctx->psoc, value);
+ if (QDF_IS_STATUS_ERROR(status)) {
hdd_err("Failed to set VHT LDPC capability info");
return -EIO;
}
-
ret = sme_update_ht_config(mac_handle, adapter->session_id,
WNI_CFG_HT_CAP_INFO_ADVANCE_CODING,
value);
@@ -3682,7 +3681,7 @@ int wlan_hdd_update_phymode(struct net_device *net, mac_handle_t mac_handle,
bool ch_bond24 = false, ch_bond5g = false;
tSmeConfigParams *sme_config;
uint32_t chwidth = WNI_CFG_CHANNEL_BONDING_MODE_DISABLE;
- uint32_t vhtchanwidth;
+ uint8_t vhtchanwidth;
eCsrPhyMode phymode = -EIO, old_phymode;
enum hdd_dot11_mode hdd_dot11mode = phddctx->config->dot11Mode;
enum band_info curr_band = BAND_ALL;
@@ -3715,7 +3714,11 @@ int wlan_hdd_update_phymode(struct net_device *net, mac_handle_t mac_handle,
else if (band_capability == BAND_5G)
band_5g = true;
- vhtchanwidth = phddctx->config->vhtChannelWidth;
+ halStatus = ucfg_mlme_get_vht_channel_width(phddctx->psoc,
+ &vhtchanwidth);
+ if (!QDF_IS_STATUS_SUCCESS(halStatus))
+ hdd_err("Failed to set channel_width");
+
hdd_debug("ch_bond24=%d ch_bond5g=%d band_24=%d band_5g=%d VHT_ch_width=%u",
ch_bond24, ch_bond5g, band_24, band_5g, vhtchanwidth);
@@ -3898,7 +3901,10 @@ int wlan_hdd_update_phymode(struct net_device *net, mac_handle_t mac_handle,
vhtchanwidth = eHT_CHANNEL_WIDTH_80MHZ;
break;
default:
- vhtchanwidth = phddctx->config->vhtChannelWidth;
+ halStatus = ucfg_mlme_get_vht_channel_width(phddctx->psoc,
+ &vhtchanwidth);
+ if (!QDF_IS_STATUS_SUCCESS(halStatus))
+ hdd_err("Failed to set channel_width");
break;
}
@@ -3956,7 +3962,6 @@ int wlan_hdd_update_phymode(struct net_device *net, mac_handle_t mac_handle,
sme_config->csrConfig.channelBondingMode24GHz = chwidth;
sme_config->csrConfig.channelBondingMode5GHz = chwidth;
}
- sme_config->csrConfig.nVhtChannelWidth = vhtchanwidth;
sme_update_config(mac_handle, sme_config);
phddctx->config->dot11Mode = hdd_dot11mode;
@@ -3964,7 +3969,6 @@ int wlan_hdd_update_phymode(struct net_device *net, mac_handle_t mac_handle,
sme_config->csrConfig.channelBondingMode24GHz;
phddctx->config->nChannelBondingMode5GHz =
sme_config->csrConfig.channelBondingMode5GHz;
- phddctx->config->vhtChannelWidth = vhtchanwidth;
if (hdd_update_config_cfg(phddctx) == false) {
hdd_err("could not update config_dat");
retval = -EIO;
@@ -5510,6 +5514,8 @@ static int __iw_setnone_getint(struct net_device *dev,
int ret;
tSmeConfigParams *sme_config;
struct hdd_context *hdd_ctx;
+ QDF_STATUS status;
+ bool bval = false;
hdd_enter_dev(dev);
@@ -5569,7 +5575,10 @@ static int __iw_setnone_getint(struct net_device *dev,
case WE_GET_NSS:
{
sme_get_config_param(mac_handle, sme_config);
- *value = (sme_config->csrConfig.enable2x2 == 0) ? 1 : 2;
+ status = ucfg_mlme_get_vht_enable2x2(hdd_ctx->psoc, &bval);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("unable to get vht_enable2x2");
+ *value = (bval == 0) ? 1 : 2;
if (policy_mgr_is_current_hwmode_dbs(hdd_ctx->psoc))
*value = *value - 1;
hdd_debug("GET_NSS: Current NSS:%d", *value);
@@ -6201,6 +6210,8 @@ static int __iw_get_char_setnone(struct net_device *dev,
struct hdd_context *hdd_ctx;
mac_handle_t mac_handle;
int ret;
+ QDF_STATUS status;
+ uint8_t value;
hdd_enter_dev(dev);
@@ -6675,40 +6686,43 @@ static int __iw_get_char_setnone(struct net_device *dev,
break;
case eCSR_DOT11_MODE_11ac:
case eCSR_DOT11_MODE_11ac_ONLY:
- if (hddctx->config->vhtChannelWidth ==
- eHT_CHANNEL_WIDTH_20MHZ)
+ status =
+ ucfg_mlme_get_vht_channel_width(hddctx->psoc,
+ &value);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("Failed to set channel_width");
+ if (value == eHT_CHANNEL_WIDTH_20MHZ)
snprintf(extra, WE_MAX_STR_LEN,
"11ACVHT20");
- else if (hddctx->config->vhtChannelWidth ==
- eHT_CHANNEL_WIDTH_40MHZ)
+ else if (value == eHT_CHANNEL_WIDTH_40MHZ)
snprintf(extra, WE_MAX_STR_LEN,
"11ACVHT40");
- else if (hddctx->config->vhtChannelWidth ==
- eHT_CHANNEL_WIDTH_80MHZ)
+ else if (value == eHT_CHANNEL_WIDTH_80MHZ)
snprintf(extra, WE_MAX_STR_LEN,
"11ACVHT80");
- else if (hddctx->config->vhtChannelWidth ==
- eHT_CHANNEL_WIDTH_160MHZ)
+ else if (value == eHT_CHANNEL_WIDTH_160MHZ)
snprintf(extra, WE_MAX_STR_LEN,
"11ACVHT160");
break;
case eCSR_DOT11_MODE_11ax:
case eCSR_DOT11_MODE_11ax_ONLY:
+ status =
+ ucfg_mlme_get_vht_channel_width(hddctx->psoc,
+ &value);
+ if (!QDF_IS_STATUS_SUCCESS(status))
+ hdd_err("Failed to set channel_width");
+
/* currently using vhtChannelWidth */
- if (hddctx->config->vhtChannelWidth ==
- eHT_CHANNEL_WIDTH_20MHZ)
+ if (value == eHT_CHANNEL_WIDTH_20MHZ)
snprintf(extra, WE_MAX_STR_LEN,
"11AX_HE_20");
- else if (hddctx->config->vhtChannelWidth ==
- eHT_CHANNEL_WIDTH_40MHZ)
+ else if (value == eHT_CHANNEL_WIDTH_40MHZ)
snprintf(extra, WE_MAX_STR_LEN,
"11AX_HE_40");
- else if (hddctx->config->vhtChannelWidth ==
- eHT_CHANNEL_WIDTH_80MHZ)
+ else if (value == eHT_CHANNEL_WIDTH_80MHZ)
snprintf(extra, WE_MAX_STR_LEN,
"11AX_HE_80");
- else if (hddctx->config->vhtChannelWidth ==
- eHT_CHANNEL_WIDTH_160MHZ)
+ else if (value == eHT_CHANNEL_WIDTH_160MHZ)
snprintf(extra, WE_MAX_STR_LEN,
"11AX_HE_160");
break;
diff --git a/core/mac/inc/wni_cfg.h b/core/mac/inc/wni_cfg.h
index c44622b713..8e9f90387b 100644
--- a/core/mac/inc/wni_cfg.h
+++ b/core/mac/inc/wni_cfg.h
@@ -65,35 +65,6 @@ enum {
WNI_CFG_HT_INFO_FIELD3,
WNI_CFG_BASIC_MCS_SET,
WNI_CFG_CURRENT_MCS_SET,
- WNI_CFG_VHT_MAX_MPDU_LENGTH,
- WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET,
- WNI_CFG_VHT_LDPC_CODING_CAP,
- WNI_CFG_VHT_SHORT_GI_80MHZ,
- WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
- WNI_CFG_VHT_TXSTBC,
- WNI_CFG_VHT_RXSTBC,
- WNI_CFG_VHT_SU_BEAMFORMER_CAP,
- WNI_CFG_VHT_SU_BEAMFORMEE_CAP,
- WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
- WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS,
- WNI_CFG_VHT_MU_BEAMFORMER_CAP,
- WNI_CFG_VHT_MU_BEAMFORMEE_CAP,
- WNI_CFG_VHT_TXOP_PS,
- WNI_CFG_VHT_HTC_VHTC_CAP,
- WNI_CFG_VHT_AMPDU_LEN_EXPONENT,
- WNI_CFG_VHT_LINK_ADAPTATION_CAP,
- WNI_CFG_VHT_RX_ANT_PATTERN,
- WNI_CFG_VHT_TX_ANT_PATTERN,
- WNI_CFG_VHT_RX_MCS_MAP,
- WNI_CFG_VHT_TX_MCS_MAP,
- WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,
- WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
- WNI_CFG_VHT_BASIC_MCS_SET,
- WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT,
- WNI_CFG_VHT_SS_UNDER_UTIL,
- WNI_CFG_VHT_40MHZ_UTILIZATION,
- WNI_CFG_VHT_80MHZ_UTILIZATION,
- WNI_CFG_VHT_160MHZ_UTILIZATION,
WNI_CFG_MPDU_DENSITY,
WNI_CFG_MAX_RX_AMPDU_FACTOR,
WNI_CFG_SCAN_IN_POWERSAVE,
@@ -117,7 +88,6 @@ enum {
WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP,
WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY,
WNI_CFG_IBSS_ATIM_WIN_SIZE,
- WNI_CFG_VHT_ENABLE_TXBF_20MHZ,
WNI_CFG_MAX_HT_MCS_TX_DATA,
WNI_CFG_DISABLE_ABG_RATE_FOR_TX_DATA,
WNI_CFG_RATE_FOR_TX_MGMT,
@@ -685,9 +655,6 @@ enum {
#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STAMAX 1
#define WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STADEF 1
-#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMIN 0
-#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMAX 8
-#define WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STADEF 8
/*
* WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_FW_DEF + 1 is
* assumed to be the default fw supported BF antennas, if fw
diff --git a/core/mac/src/cfg/cfg_param_name.c b/core/mac/src/cfg/cfg_param_name.c
index 852dd65f5a..ef51928c18 100644
--- a/core/mac/src/cfg/cfg_param_name.c
+++ b/core/mac/src/cfg/cfg_param_name.c
@@ -80,35 +80,6 @@ const char *cfg_get_string(uint16_t cfg_id)
CASE_RETURN_STRING(WNI_CFG_HT_INFO_FIELD3);
CASE_RETURN_STRING(WNI_CFG_BASIC_MCS_SET);
CASE_RETURN_STRING(WNI_CFG_CURRENT_MCS_SET);
- CASE_RETURN_STRING(WNI_CFG_VHT_MAX_MPDU_LENGTH);
- CASE_RETURN_STRING(WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET);
- CASE_RETURN_STRING(WNI_CFG_VHT_LDPC_CODING_CAP);
- CASE_RETURN_STRING(WNI_CFG_VHT_SHORT_GI_80MHZ);
- CASE_RETURN_STRING(WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ);
- CASE_RETURN_STRING(WNI_CFG_VHT_TXSTBC);
- CASE_RETURN_STRING(WNI_CFG_VHT_RXSTBC);
- CASE_RETURN_STRING(WNI_CFG_VHT_SU_BEAMFORMER_CAP);
- CASE_RETURN_STRING(WNI_CFG_VHT_SU_BEAMFORMEE_CAP);
- CASE_RETURN_STRING(WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED);
- CASE_RETURN_STRING(WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS);
- CASE_RETURN_STRING(WNI_CFG_VHT_MU_BEAMFORMER_CAP);
- CASE_RETURN_STRING(WNI_CFG_VHT_MU_BEAMFORMEE_CAP);
- CASE_RETURN_STRING(WNI_CFG_VHT_TXOP_PS);
- CASE_RETURN_STRING(WNI_CFG_VHT_HTC_VHTC_CAP);
- CASE_RETURN_STRING(WNI_CFG_VHT_AMPDU_LEN_EXPONENT);
- CASE_RETURN_STRING(WNI_CFG_VHT_LINK_ADAPTATION_CAP);
- CASE_RETURN_STRING(WNI_CFG_VHT_RX_ANT_PATTERN);
- CASE_RETURN_STRING(WNI_CFG_VHT_TX_ANT_PATTERN);
- CASE_RETURN_STRING(WNI_CFG_VHT_RX_MCS_MAP);
- CASE_RETURN_STRING(WNI_CFG_VHT_TX_MCS_MAP);
- CASE_RETURN_STRING(WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE);
- CASE_RETURN_STRING(WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE);
- CASE_RETURN_STRING(WNI_CFG_VHT_BASIC_MCS_SET);
- CASE_RETURN_STRING(WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT);
- CASE_RETURN_STRING(WNI_CFG_VHT_SS_UNDER_UTIL);
- CASE_RETURN_STRING(WNI_CFG_VHT_40MHZ_UTILIZATION);
- CASE_RETURN_STRING(WNI_CFG_VHT_80MHZ_UTILIZATION);
- CASE_RETURN_STRING(WNI_CFG_VHT_160MHZ_UTILIZATION);
CASE_RETURN_STRING(WNI_CFG_MPDU_DENSITY);
CASE_RETURN_STRING(WNI_CFG_MAX_RX_AMPDU_FACTOR);
CASE_RETURN_STRING(WNI_CFG_WOWLAN_UCAST_PATTERN_FILTER_ENABLE);
@@ -131,7 +102,6 @@ const char *cfg_get_string(uint16_t cfg_id)
CASE_RETURN_STRING(WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP);
CASE_RETURN_STRING(WNI_CFG_RMC_ACTION_PERIOD_FREQUENCY);
CASE_RETURN_STRING(WNI_CFG_IBSS_ATIM_WIN_SIZE);
- CASE_RETURN_STRING(WNI_CFG_VHT_ENABLE_TXBF_20MHZ);
CASE_RETURN_STRING(WNI_CFG_MAX_HT_MCS_TX_DATA);
CASE_RETURN_STRING(WNI_CFG_DISABLE_ABG_RATE_FOR_TX_DATA);
CASE_RETURN_STRING(WNI_CFG_RATE_FOR_TX_MGMT);
diff --git a/core/mac/src/cfg/cfg_proc_msg.c b/core/mac/src/cfg/cfg_proc_msg.c
index d53104e29c..f903ce6116 100644
--- a/core/mac/src/cfg/cfg_proc_msg.c
+++ b/core/mac/src/cfg/cfg_proc_msg.c
@@ -226,180 +226,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_SAVE |
CFG_CTL_RESTART | CFG_CTL_NTF_LIM,
0, 0, 0},
- {WNI_CFG_VHT_MAX_MPDU_LENGTH,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_MAX_MPDU_LENGTH_STAMIN,
- WNI_CFG_VHT_MAX_MPDU_LENGTH_STAMAX,
- WNI_CFG_VHT_MAX_MPDU_LENGTH_STADEF},
- {WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET_STAMIN,
- WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET_STAMAX,
- WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET_STADEF},
- {WNI_CFG_VHT_LDPC_CODING_CAP,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_LDPC_CODING_CAP_STAMIN,
- WNI_CFG_VHT_LDPC_CODING_CAP_STAMAX,
- WNI_CFG_VHT_LDPC_CODING_CAP_STADEF},
- {WNI_CFG_VHT_SHORT_GI_80MHZ,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_SHORT_GI_80MHZ_STAMIN,
- WNI_CFG_VHT_SHORT_GI_80MHZ_STAMAX,
- WNI_CFG_VHT_SHORT_GI_80MHZ_STADEF},
- {WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ_STAMIN,
- WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ_STAMAX,
- WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ_STADEF},
- {WNI_CFG_VHT_TXSTBC,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_TXSTBC_STAMIN,
- WNI_CFG_VHT_TXSTBC_STAMAX,
- WNI_CFG_VHT_TXSTBC_STADEF},
- {WNI_CFG_VHT_RXSTBC,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_RXSTBC_STAMIN,
- WNI_CFG_VHT_RXSTBC_STAMAX,
- WNI_CFG_VHT_RXSTBC_STADEF},
- {WNI_CFG_VHT_SU_BEAMFORMER_CAP,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_SU_BEAMFORMER_CAP_STAMIN,
- WNI_CFG_VHT_SU_BEAMFORMER_CAP_STAMAX,
- WNI_CFG_VHT_SU_BEAMFORMER_CAP_STADEF},
- {WNI_CFG_VHT_SU_BEAMFORMEE_CAP,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STAMIN,
- WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STAMAX,
- WNI_CFG_VHT_SU_BEAMFORMEE_CAP_STADEF},
- {WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMIN,
- WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STAMAX,
- WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED_STADEF},
- {WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_STAMIN,
- WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_STAMAX,
- WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS_STADEF},
- {WNI_CFG_VHT_MU_BEAMFORMER_CAP,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_MU_BEAMFORMER_CAP_STAMIN,
- WNI_CFG_VHT_MU_BEAMFORMER_CAP_STAMAX,
- WNI_CFG_VHT_MU_BEAMFORMER_CAP_STADEF},
- {WNI_CFG_VHT_MU_BEAMFORMEE_CAP,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_MU_BEAMFORMEE_CAP_STAMIN,
- WNI_CFG_VHT_MU_BEAMFORMEE_CAP_STAMAX,
- WNI_CFG_VHT_MU_BEAMFORMEE_CAP_STADEF},
- {WNI_CFG_VHT_TXOP_PS,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_TXOP_PS_STAMIN,
- WNI_CFG_VHT_TXOP_PS_STAMAX,
- WNI_CFG_VHT_TXOP_PS_STADEF},
- {WNI_CFG_VHT_HTC_VHTC_CAP,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_HTC_VHTC_CAP_STAMIN,
- WNI_CFG_VHT_HTC_VHTC_CAP_STAMAX,
- WNI_CFG_VHT_HTC_VHTC_CAP_STADEF},
- {WNI_CFG_VHT_AMPDU_LEN_EXPONENT,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_AMPDU_LEN_EXPONENT_STAMIN,
- WNI_CFG_VHT_AMPDU_LEN_EXPONENT_STAMAX,
- WNI_CFG_VHT_AMPDU_LEN_EXPONENT_STADEF},
- {WNI_CFG_VHT_LINK_ADAPTATION_CAP,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_LINK_ADAPTATION_CAP_STAMIN,
- WNI_CFG_VHT_LINK_ADAPTATION_CAP_STAMAX,
- WNI_CFG_VHT_LINK_ADAPTATION_CAP_STADEF},
- {WNI_CFG_VHT_RX_ANT_PATTERN,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_RX_ANT_PATTERN_STAMIN,
- WNI_CFG_VHT_RX_ANT_PATTERN_STAMAX,
- WNI_CFG_VHT_RX_ANT_PATTERN_STADEF},
- {WNI_CFG_VHT_TX_ANT_PATTERN,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_TX_ANT_PATTERN_STAMIN,
- WNI_CFG_VHT_TX_ANT_PATTERN_STAMAX,
- WNI_CFG_VHT_TX_ANT_PATTERN_STADEF},
- {WNI_CFG_VHT_RX_MCS_MAP,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_RX_MCS_MAP_STAMIN,
- WNI_CFG_VHT_RX_MCS_MAP_STAMAX,
- WNI_CFG_VHT_RX_MCS_MAP_STADEF},
- {WNI_CFG_VHT_TX_MCS_MAP,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_TX_MCS_MAP_STAMIN,
- WNI_CFG_VHT_TX_MCS_MAP_STAMAX,
- WNI_CFG_VHT_TX_MCS_MAP_STADEF},
- {WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_STAMIN,
- WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_STAMAX,
- WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_STADEF},
- {WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_STAMIN,
- WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_STAMAX,
- WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE_STADEF},
- {WNI_CFG_VHT_BASIC_MCS_SET,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_BASIC_MCS_SET_STAMIN,
- WNI_CFG_VHT_BASIC_MCS_SET_STAMAX,
- WNI_CFG_VHT_BASIC_MCS_SET_STADEF},
- {WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT_STAMIN,
- WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT_STAMAX,
- WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT_STADEF},
- {WNI_CFG_VHT_SS_UNDER_UTIL,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_SS_UNDER_UTIL_STAMIN,
- WNI_CFG_VHT_SS_UNDER_UTIL_STAMAX,
- WNI_CFG_VHT_SS_UNDER_UTIL_STADEF},
- {WNI_CFG_VHT_40MHZ_UTILIZATION,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_40MHZ_UTILIZATION_STAMIN,
- WNI_CFG_VHT_40MHZ_UTILIZATION_STAMAX,
- WNI_CFG_VHT_40MHZ_UTILIZATION_STADEF},
- {WNI_CFG_VHT_80MHZ_UTILIZATION,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_80MHZ_UTILIZATION_STAMIN,
- WNI_CFG_VHT_80MHZ_UTILIZATION_STAMAX,
- WNI_CFG_VHT_80MHZ_UTILIZATION_STADEF},
- {WNI_CFG_VHT_160MHZ_UTILIZATION,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
- CFG_CTL_NTF_LIM,
- WNI_CFG_VHT_80MHZ_UTILIZATION_STADEF,
- WNI_CFG_VHT_160MHZ_UTILIZATION_STAMAX,
- WNI_CFG_VHT_160MHZ_UTILIZATION_STADEF},
{WNI_CFG_MPDU_DENSITY,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT |
CFG_CTL_RESTART | CFG_CTL_NTF_LIM,
@@ -525,11 +351,6 @@ cgstatic cfg_static[CFG_PARAM_MAX_NUM] = {
WNI_CFG_IBSS_ATIM_WIN_SIZE_STAMIN,
WNI_CFG_IBSS_ATIM_WIN_SIZE_STAMAX,
WNI_CFG_IBSS_ATIM_WIN_SIZE_STADEF},
- {WNI_CFG_VHT_ENABLE_TXBF_20MHZ,
- CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
- WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STAMIN,
- WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STAMAX,
- WNI_CFG_VHT_ENABLE_TXBF_20MHZ_STADEF},
{WNI_CFG_MAX_HT_MCS_TX_DATA,
CFG_CTL_VALID | CFG_CTL_RE | CFG_CTL_WE | CFG_CTL_INT,
WNI_CFG_MAX_HT_MCS_TX_DATA_STAMIN,
diff --git a/core/mac/src/include/parser_api.h b/core/mac/src/include/parser_api.h
index 4a4af2c31f..8e47c801b1 100644
--- a/core/mac/src/include/parser_api.h
+++ b/core/mac/src/include/parser_api.h
@@ -1082,10 +1082,6 @@ populate_dot11f_vht_operation(tpAniSirGlobal pMac,
tpPESession psessionEntry,
tDot11fIEVHTOperation *pDot11f);
-QDF_STATUS
-populate_dot11f_vht_ext_bss_load(tpAniSirGlobal pMac,
- tDot11fIEVHTExtBssLoad *pDot11f);
-
QDF_STATUS
populate_dot11f_ext_cap(tpAniSirGlobal pMac, bool isVHTEnabled,
tDot11fIEExtCap *pDot11f, tpPESession psessionEntry);
diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c
index 2819cb9fc4..6e36e121a5 100644
--- a/core/mac/src/pe/lim/lim_assoc_utils.c
+++ b/core/mac/src/pe/lim/lim_assoc_utils.c
@@ -1336,45 +1336,23 @@ QDF_STATUS lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
tpPESession session_entry,
uint8_t nss)
{
- uint32_t val;
uint32_t self_sta_dot11mode = 0;
uint16_t mcs_map_mask = MCSMAPMASK1x1;
uint16_t mcs_map_mask2x2 = 0;
+ struct mlme_vht_capabilities_info vht_cap_info;
wlan_cfg_get_int(mac_ctx, WNI_CFG_DOT11_MODE, &self_sta_dot11mode);
if (!IS_DOT11_MODE_VHT(self_sta_dot11mode))
return QDF_STATUS_SUCCESS;
- if (wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_RX_MCS_MAP, &val) !=
- QDF_STATUS_SUCCESS) {
- pe_err("could not retrieve VHT RX MCS MAP");
- goto error;
- }
- rates->vhtRxMCSMap = (uint16_t) val;
+ vht_cap_info = mac_ctx->mlme_cfg->vht_caps.vht_cap_info;
- if (wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_TX_MCS_MAP, &val) !=
- QDF_STATUS_SUCCESS) {
- pe_err("could not retrieve VHT TX MCS MAP");
- goto error;
- }
- rates->vhtTxMCSMap = (uint16_t) val;
-
- if (wlan_cfg_get_int(mac_ctx,
- WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,
- &val) != QDF_STATUS_SUCCESS) {
- pe_err("couldn't retrieve VHT RX Supported data rate MAP");
- goto error;
- }
- rates->vhtRxHighestDataRate = (uint16_t) val;
-
- if (wlan_cfg_get_int(mac_ctx,
- WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
- &val) != QDF_STATUS_SUCCESS) {
- pe_err("couldn't retrieve VHT RX Supported data rate MAP");
- goto error;
- }
- rates->vhtTxHighestDataRate = (uint16_t) val;
+ rates->vhtRxMCSMap = (uint16_t)vht_cap_info.rx_mcs_map;
+ rates->vhtTxMCSMap = (uint16_t)vht_cap_info.tx_mcs_map;
+ rates->vhtRxHighestDataRate =
+ (uint16_t) vht_cap_info.rx_supp_data_rate;
+ rates->vhtTxHighestDataRate = (uint16_t)vht_cap_info.tx_supp_data_rate;
if (NSS_1x1_MODE == nss) {
rates->vhtRxMCSMap |= VHT_MCS_1x1;
@@ -1384,7 +1362,7 @@ QDF_STATUS lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
rates->vhtRxHighestDataRate =
VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
if (session_entry && !session_entry->ch_width &&
- !mac_ctx->roam.configParam.enable_vht20_mcs9 &&
+ !mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_vht20_mcs9 &&
((rates->vhtRxMCSMap & VHT_1x1_MCS_MASK) ==
VHT_1x1_MCS9_MAP)) {
DISABLE_VHT_MCS_9(rates->vhtRxMCSMap,
@@ -1394,7 +1372,7 @@ QDF_STATUS lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
}
} else {
if (session_entry && !session_entry->ch_width &&
- !mac_ctx->roam.configParam.enable_vht20_mcs9 &&
+ !mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_vht20_mcs9 &&
((rates->vhtRxMCSMap & VHT_2x2_MCS_MASK) ==
VHT_2x2_MCS9_MAP)) {
DISABLE_VHT_MCS_9(rates->vhtRxMCSMap,
@@ -1460,7 +1438,7 @@ QDF_STATUS lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
}
pe_debug("enable2x2 - %d nss %d vhtRxMCSMap - %x vhtTxMCSMap - %x",
- mac_ctx->roam.configParam.enable2x2, nss,
+ mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable2x2, nss,
rates->vhtRxMCSMap, rates->vhtTxMCSMap);
if (NULL != session_entry) {
@@ -1472,9 +1450,6 @@ QDF_STATUS lim_populate_vht_mcs_set(tpAniSirGlobal mac_ctx,
}
return QDF_STATUS_SUCCESS;
-error:
-
- return QDF_STATUS_E_FAILURE;
}
/**
@@ -2733,7 +2708,6 @@ lim_add_sta_self(tpAniSirGlobal pMac, uint16_t staIdx, uint8_t updateSta,
QDF_STATUS retCode = QDF_STATUS_SUCCESS;
tSirMacAddr staMac;
uint32_t listenInterval = WNI_CFG_LISTEN_INTERVAL_STADEF;
- uint32_t ampduLenExponent = 0;
/*This self Sta dot 11 mode comes from the cfg and the expectation here is
* that cfg carries the systemwide capability that device under
* consideration can support. This capability gets plumbed into the cfg
@@ -2873,14 +2847,10 @@ lim_add_sta_self(tpAniSirGlobal pMac, uint16_t staIdx, uint8_t updateSta,
pAddStaParams->enable_su_tx_bformer);
/* In 11ac mode, the hardware is capable of supporting 128K AMPDU size */
- if (IS_DOT11_MODE_VHT(selfStaDot11Mode)) {
- if (wlan_cfg_get_int
- (pMac, WNI_CFG_VHT_AMPDU_LEN_EXPONENT, &duLenExponent)
- != QDF_STATUS_SUCCESS) {
- pe_err("Couldn't get WNI_CFG_VHT_AMPDU_LEN_EXPONENT");
- }
- pAddStaParams->maxAmpduSize = (uint8_t) ampduLenExponent;
- }
+ if (IS_DOT11_MODE_VHT(selfStaDot11Mode))
+ pAddStaParams->maxAmpduSize =
+ pMac->mlme_cfg->vht_caps.vht_cap_info.ampdu_len_exponent;
+
pAddStaParams->vhtTxMUBformeeCapable =
psessionEntry->vht_config.mu_beam_formee;
pAddStaParams->enableVhtpAid = psessionEntry->enableVhtpAid;
@@ -3606,11 +3576,13 @@ QDF_STATUS lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
tpDphHashNode pStaDs = NULL;
uint8_t chanWidthSupp = 0;
bool is_vht_cap_in_vendor_ie = false;
- uint32_t enableTxBF20MHz;
tDot11fIEVHTCaps *vht_caps = NULL;
tDot11fIEVHTOperation *vht_oper = NULL;
tAddStaParams *sta_context;
uint32_t listen_interval = WNI_CFG_LISTEN_INTERVAL_STADEF;
+ struct mlme_vht_capabilities_info vht_cap_info;
+
+ vht_cap_info = pMac->mlme_cfg->vht_caps.vht_cap_info;
/* Package SIR_HAL_ADD_BSS_REQ message parameters */
pAddBssParams = qdf_mem_malloc(sizeof(tAddBssParams));
@@ -3907,11 +3879,7 @@ QDF_STATUS lim_sta_send_add_bss(tpAniSirGlobal pMac, tpSirAssocRsp pAssocRsp,
sta_context->enable_su_tx_bformer);
} else {
sta_context->ch_width = CH_WIDTH_20MHZ;
- if ((QDF_IS_STATUS_SUCCESS(
- wlan_cfg_get_int(pMac,
- WNI_CFG_VHT_ENABLE_TXBF_20MHZ,
- &enableTxBF20MHz))) &&
- (false == enableTxBF20MHz))
+ if (vht_cap_info.enable_txbf_20mhz)
sta_context->vhtTxBFCapable = 0;
}
pAddBssParams->staContext.mimoPS =
diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
index 4e6cab6aaa..162622593d 100644
--- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c
@@ -413,11 +413,8 @@ static void mlm_add_sta(tpAniSirGlobal mac_ctx, tpAddStaParams sta_param,
* capabilities
*/
if (IS_DOT11_MODE_VHT(self_dot11mode)) {
- val = 0; /* Default 8K AMPDU size */
- if (QDF_STATUS_SUCCESS != wlan_cfg_get_int(mac_ctx,
- WNI_CFG_VHT_AMPDU_LEN_EXPONENT, &val))
- pe_err("Couldn't get WNI_CFG_VHT_AMPDU_LEN_EXPONENT");
- sta_param->maxAmpduSize = (uint8_t) val;
+ sta_param->maxAmpduSize =
+ mac_ctx->mlme_cfg->vht_caps.vht_cap_info.ampdu_len_exponent;
}
sta_param->enableVhtpAid = session_entry->enableVhtpAid;
sta_param->enableAmpduPs = session_entry->enableAmpduPs;
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index f3e86207f3..0f77e45d6b 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -805,7 +805,7 @@ __lim_handle_sme_start_bss_request(tpAniSirGlobal mac_ctx, uint32_t *msg_buf)
pe_debug("persona - %d, nss - %d",
session->pePersona, session->vdev_nss);
session->nss = session->vdev_nss;
- if (!mac_ctx->roam.configParam.enable2x2)
+ if (!mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable2x2)
session->nss = 1;
/*
* Allocate memory for the array of
diff --git a/core/mac/src/pe/lim/lim_process_tdls.c b/core/mac/src/pe/lim/lim_process_tdls.c
index bc9b803ebb..832fce52b0 100644
--- a/core/mac/src/pe/lim/lim_process_tdls.c
+++ b/core/mac/src/pe/lim/lim_process_tdls.c
@@ -698,6 +698,9 @@ static void populate_dot11f_tdls_ht_vht_cap(tpAniSirGlobal pMac,
{
uint8_t nss;
uint32_t val;
+ struct mlme_vht_capabilities_info vht_cap_info;
+
+ vht_cap_info = pMac->mlme_cfg->vht_caps.vht_cap_info;
if (IS_5G_CH(psessionEntry->currentOperChannel))
nss = pMac->vdev_type_nss_5g.tdls;
@@ -736,7 +739,7 @@ static void populate_dot11f_tdls_ht_vht_cap(tpAniSirGlobal pMac,
pe_debug("HT present: %hu, Chan Width: %hu",
htCap->present, htCap->supportedChannelWidthSet);
if (((psessionEntry->currentOperChannel <= SIR_11B_CHANNEL_END) &&
- pMac->roam.configParam.enableVhtFor24GHz) ||
+ pMac->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band) ||
(psessionEntry->currentOperChannel >= SIR_11B_CHANNEL_END)) {
if (IS_DOT11_MODE_VHT(selfDot11Mode) &&
IS_FEATURE_SUPPORTED_BY_FW(DOT11AC)) {
@@ -758,18 +761,12 @@ static void populate_dot11f_tdls_ht_vht_cap(tpAniSirGlobal pMac,
vhtCap->muBeamformeeCap = 0;
vhtCap->muBeamformerCap = 0;
- wlan_cfg_get_int(pMac, WNI_CFG_VHT_RX_MCS_MAP, &val);
- vhtCap->rxMCSMap = val;
- wlan_cfg_get_int(pMac,
- WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,
- &val);
- vhtCap->rxHighSupDataRate = val;
- wlan_cfg_get_int(pMac, WNI_CFG_VHT_TX_MCS_MAP, &val);
- vhtCap->txMCSMap = val;
- wlan_cfg_get_int(pMac,
- WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
- &val);
- vhtCap->txSupDataRate = val;
+ vhtCap->rxMCSMap = vht_cap_info.rx_mcs_map;
+
+ vhtCap->rxHighSupDataRate =
+ vht_cap_info.rx_supp_data_rate;
+ vhtCap->txMCSMap = vht_cap_info.tx_mcs_map;
+ vhtCap->txSupDataRate = vht_cap_info.tx_supp_data_rate;
if (nss == NSS_1x1_MODE) {
vhtCap->txMCSMap |= DISABLE_NSS2_MCS;
vhtCap->rxMCSMap |= DISABLE_NSS2_MCS;
@@ -1006,7 +1003,7 @@ static void populate_dotf_tdls_vht_aid(tpAniSirGlobal pMac, uint32_t selfDot11Mo
tpPESession psessionEntry)
{
if (((psessionEntry->currentOperChannel <= SIR_11B_CHANNEL_END) &&
- pMac->roam.configParam.enableVhtFor24GHz) ||
+ pMac->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band) ||
(psessionEntry->currentOperChannel >= SIR_11B_CHANNEL_END)) {
if (IS_DOT11_MODE_VHT(selfDot11Mode) &&
IS_FEATURE_SUPPORTED_BY_FW(DOT11AC)) {
diff --git a/core/mac/src/pe/lim/lim_prop_exts_utils.c b/core/mac/src/pe/lim/lim_prop_exts_utils.c
index 3656891d36..daab386497 100644
--- a/core/mac/src/pe/lim/lim_prop_exts_utils.c
+++ b/core/mac/src/pe/lim/lim_prop_exts_utils.c
@@ -200,8 +200,6 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie,
int8_t *local_constraint, tpPESession session)
{
tSirProbeRespBeacon *beacon_struct;
- uint32_t enable_txbf_20mhz;
- QDF_STATUS cfg_get_status = QDF_STATUS_E_FAILURE;
uint8_t ap_bcon_ch_width;
bool new_ch_width_dfn = false;
tDot11fIEVHTOperation *vht_op;
@@ -267,11 +265,7 @@ lim_extract_ap_capability(tpAniSirGlobal mac_ctx, uint8_t *p_ie,
if (session->vhtCapabilityPresentInBeacon == 1 &&
!session->htSupportedChannelWidthSet) {
- cfg_get_status = wlan_cfg_get_int(mac_ctx,
- WNI_CFG_VHT_ENABLE_TXBF_20MHZ,
- &enable_txbf_20mhz);
- if ((QDF_IS_STATUS_SUCCESS(cfg_get_status)) &&
- (false == enable_txbf_20mhz))
+ if (mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable_txbf_20mhz)
session->vht_config.su_beam_formee = 0;
} else if (session->vhtCapabilityPresentInBeacon &&
vht_op->chanWidth) {
diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c
index baf5018e77..60056a2f62 100644
--- a/core/mac/src/pe/lim/lim_send_management_frames.c
+++ b/core/mac/src/pe/lim/lim_send_management_frames.c
@@ -231,7 +231,7 @@ lim_send_probe_req_mgmt_frame(tpAniSirGlobal mac_ctx,
* is false and dot11mode is 11ac set it to 11n.
*/
if (channel <= SIR_11B_CHANNEL_END &&
- (false == mac_ctx->roam.configParam.enableVhtFor24GHz) &&
+ (false == mac_ctx->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band) &&
(WNI_CFG_DOT11_MODE_11AC == dot11mode ||
WNI_CFG_DOT11_MODE_11AC_ONLY == dot11mode))
dot11mode = WNI_CFG_DOT11_MODE_11N;
@@ -1856,7 +1856,7 @@ lim_send_assoc_req_mgmt_frame(tpAniSirGlobal mac_ctx,
frm->vendor_vht_ie.sub_type =
pe_session->vendor_specific_vht_ie_sub_type;
frm->vendor_vht_ie.VHTCaps.present = 1;
- if (!mac_ctx->roam.configParam.enable_subfee_vendor_vhtie &&
+ if (!mac_ctx->mlme_cfg->vht_caps.vht_cap_info.vendor_vhtie &&
pe_session->vht_config.su_beam_formee) {
pe_debug("Disable SU beamformee for vendor IE");
pe_session->vht_config.su_beam_formee = 0;
diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c
index 3ed43822e4..a38a25e359 100644
--- a/core/mac/src/pe/lim/lim_utils.c
+++ b/core/mac/src/pe/lim/lim_utils.c
@@ -7955,7 +7955,7 @@ QDF_STATUS lim_populate_he_mcs_set(tpAniSirGlobal mac_ctx,
}
pe_debug("enable2x2 - %d nss %d",
- mac_ctx->roam.configParam.enable2x2, nss);
+ mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable2x2, nss);
pe_debug("he_rx_lt_80 - 0x%x he_tx_lt_80 0x%x",
rates->rx_he_mcs_map_lt_80, rates->tx_he_mcs_map_lt_80);
pe_debug("he_rx_160 - 0x%x he_tx_160 0x%x",
diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
index 1bc4962865..8969c2acab 100644
--- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c
+++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c
@@ -800,20 +800,6 @@ static void lim_log_vht_operation(tpAniSirGlobal pMac,
#endif /* DUMP_MGMT_CNTNTS */
}
-static void lim_log_vht_ext_bss_load(tpAniSirGlobal pMac,
- tDot11fIEVHTExtBssLoad *pDot11f)
-{
-#ifdef DUMP_MGMT_CNTNTS
- pe_debug("muMIMOCapStaCount: %d",
- pDot11f->muMIMOCapStaCount);
- pe_debug("ssUnderUtil: %d", pDot11f->ssUnderUtil);
- pe_debug("FortyMHzUtil: %d", pDot11f->FortyMHzUtil);
- pe_debug("EightyMHzUtil: %d", pDot11f->EightyMHzUtil);
- pe_debug("OneSixtyMHzUtil: %d",
- pDot11f->OneSixtyMHzUtil);
-#endif /* DUMP_MGMT_CNTNTS */
-}
-
static void lim_log_operating_mode(tpAniSirGlobal pMac,
tDot11fIEOperatingMode *pDot11f)
{
@@ -852,17 +838,21 @@ QDF_STATUS
populate_dot11f_vht_caps(tpAniSirGlobal pMac,
tpPESession psessionEntry, tDot11fIEVHTCaps *pDot11f)
{
- QDF_STATUS nStatus;
uint32_t nCfgValue = 0;
+ struct mlme_vht_capabilities_info vht_cap_info;
+
+ if (!(pMac->mlme_cfg)) {
+ pe_err("invalid mlme cfg");
+ return QDF_STATUS_E_FAILURE;
+ }
+ vht_cap_info = pMac->mlme_cfg->vht_caps.vht_cap_info;
pDot11f->present = 1;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_MAX_MPDU_LENGTH, nCfgValue);
+ nCfgValue = vht_cap_info.ampdu_len;
pDot11f->maxMPDULen = (nCfgValue & 0x0003);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET,
- nCfgValue);
+ nCfgValue = vht_cap_info.supp_chan_width;
pDot11f->supportedChannelWidthSet = (nCfgValue & 0x0003);
nCfgValue = 0;
@@ -922,118 +912,71 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac,
pDot11f->vhtLinkAdaptCap =
psessionEntry->vht_config.vht_link_adapt;
} else {
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_LDPC_CODING_CAP,
- nCfgValue);
+ nCfgValue = vht_cap_info.ldpc_coding_cap;
pDot11f->ldpcCodingCap = (nCfgValue & 0x0001);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_SHORT_GI_80MHZ,
- nCfgValue);
+ nCfgValue = vht_cap_info.short_gi_80mhz;
pDot11f->shortGI80MHz = (nCfgValue & 0x0001);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac,
- WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
- nCfgValue);
+ nCfgValue = vht_cap_info.short_gi_160mhz;
pDot11f->shortGI160and80plus80MHz = (nCfgValue & 0x0001);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_TXSTBC, nCfgValue);
+ nCfgValue = vht_cap_info.tx_stbc;
pDot11f->txSTBC = (nCfgValue & 0x0001);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_RXSTBC, nCfgValue);
+ nCfgValue = vht_cap_info.rx_stbc;
pDot11f->rxSTBC = (nCfgValue & 0x0007);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac,
- WNI_CFG_VHT_SU_BEAMFORMEE_CAP, nCfgValue);
+ nCfgValue = vht_cap_info.su_bformee;
pDot11f->suBeamformeeCap = (nCfgValue & 0x0001);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac,
- WNI_CFG_VHT_MU_BEAMFORMEE_CAP, nCfgValue);
+ nCfgValue = vht_cap_info.enable_mu_bformee;
pDot11f->muBeamformeeCap = (nCfgValue & 0x0001);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_SU_BEAMFORMER_CAP,
- nCfgValue);
+ nCfgValue = vht_cap_info.su_bformer;
pDot11f->suBeamFormerCap = (nCfgValue & 0x0001);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac,
- WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
- nCfgValue);
+ nCfgValue = vht_cap_info.tx_bfee_ant_supp;
pDot11f->csnofBeamformerAntSup = (nCfgValue & 0x0007);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac,
- WNI_CFG_VHT_TXOP_PS,
- nCfgValue);
+ nCfgValue = vht_cap_info.txop_ps;
pDot11f->vhtTXOPPS = (nCfgValue & 0x0001);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac,
- WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS,
- nCfgValue);
+ nCfgValue = vht_cap_info.num_soundingdim;
pDot11f->numSoundingDim = (nCfgValue & 0x0007);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac,
- WNI_CFG_VHT_HTC_VHTC_CAP,
- nCfgValue);
+ nCfgValue = vht_cap_info.htc_vhtc;
pDot11f->htcVHTCap = (nCfgValue & 0x0001);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac,
- WNI_CFG_VHT_RX_ANT_PATTERN,
- nCfgValue);
- pDot11f->rxAntPattern = nCfgValue;
+ pDot11f->rxAntPattern = vht_cap_info.rx_antpattern;
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac,
- WNI_CFG_VHT_TX_ANT_PATTERN,
- nCfgValue);
- pDot11f->txAntPattern = nCfgValue;
+ pDot11f->txAntPattern = vht_cap_info.tx_antpattern;
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac,
- WNI_CFG_VHT_AMPDU_LEN_EXPONENT,
- nCfgValue);
+ nCfgValue = vht_cap_info.ampdu_len_exponent;
pDot11f->maxAMPDULenExp = (nCfgValue & 0x0007);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac,
- WNI_CFG_VHT_LINK_ADAPTATION_CAP,
- nCfgValue);
+ nCfgValue = vht_cap_info.link_adap_cap;
pDot11f->vhtLinkAdaptCap = (nCfgValue & 0x0003);
}
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_MU_BEAMFORMER_CAP, nCfgValue);
+ nCfgValue = vht_cap_info.mu_bformer;
pDot11f->muBeamformerCap = (nCfgValue & 0x0001);
pDot11f->reserved1 = 0;
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_RX_MCS_MAP, nCfgValue);
+ nCfgValue = vht_cap_info.rx_mcs_map;
pDot11f->rxMCSMap = (nCfgValue & 0x0000FFFF);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_RX_HIGHEST_SUPPORTED_DATA_RATE,
- nCfgValue);
+ nCfgValue = vht_cap_info.rx_supp_data_rate;
pDot11f->rxHighSupDataRate = (nCfgValue & 0x00001FFF);
pDot11f->reserved2 = 0;
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_TX_MCS_MAP, nCfgValue);
+ nCfgValue = vht_cap_info.tx_mcs_map;
pDot11f->txMCSMap = (nCfgValue & 0x0000FFFF);
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_TX_HIGHEST_SUPPORTED_DATA_RATE,
- nCfgValue);
+ nCfgValue = vht_cap_info.tx_supp_data_rate;
pDot11f->txSupDataRate = (nCfgValue & 0x00001FFF);
pDot11f->reserved3 = 0;
@@ -1046,7 +989,7 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac,
pDot11f->rxHighSupDataRate =
VHT_RX_HIGHEST_SUPPORTED_DATA_RATE_1_1;
if (!psessionEntry->ch_width &&
- !pMac->roam.configParam.enable_vht20_mcs9 &&
+ !pMac->mlme_cfg->vht_caps.vht_cap_info.enable_vht20_mcs9 &&
((pDot11f->txMCSMap & VHT_1x1_MCS_MASK) ==
VHT_1x1_MCS9_MAP)) {
DISABLE_VHT_MCS_9(pDot11f->txMCSMap,
@@ -1056,7 +999,7 @@ populate_dot11f_vht_caps(tpAniSirGlobal pMac,
}
} else {
if (!psessionEntry->ch_width &&
- !pMac->roam.configParam.enable_vht20_mcs9 &&
+ !pMac->mlme_cfg->vht_caps.vht_cap_info.enable_vht20_mcs9 &&
((pDot11f->txMCSMap & VHT_2x2_MCS_MASK) ==
VHT_2x2_MCS9_MAP)) {
DISABLE_VHT_MCS_9(pDot11f->txMCSMap,
@@ -1075,9 +1018,6 @@ populate_dot11f_vht_operation(tpAniSirGlobal pMac,
tpPESession psessionEntry,
tDot11fIEVHTOperation *pDot11f)
{
- QDF_STATUS nStatus;
- uint32_t nCfgValue = 0;
-
pDot11f->present = 1;
if (psessionEntry->ch_width > CH_WIDTH_40MHZ) {
@@ -1096,9 +1036,8 @@ populate_dot11f_vht_operation(tpAniSirGlobal pMac,
pDot11f->chanCenterFreqSeg2 = 0;
}
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_BASIC_MCS_SET, nCfgValue);
- pDot11f->basicMCSSet = (uint16_t) nCfgValue;
+ pDot11f->basicMCSSet =
+ (uint16_t)pMac->mlme_cfg->vht_caps.vht_cap_info.basic_mcs_set;
lim_log_vht_operation(pMac, pDot11f);
@@ -1106,40 +1045,6 @@ populate_dot11f_vht_operation(tpAniSirGlobal pMac,
}
-QDF_STATUS
-populate_dot11f_vht_ext_bss_load(tpAniSirGlobal pMac,
- tDot11fIEVHTExtBssLoad *pDot11f)
-{
- QDF_STATUS nStatus;
- uint32_t nCfgValue = 0;
-
- pDot11f->present = 1;
-
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_MU_MIMO_CAP_STA_COUNT,
- nCfgValue);
- pDot11f->muMIMOCapStaCount = (uint8_t) nCfgValue;
-
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_SS_UNDER_UTIL, nCfgValue);
- pDot11f->ssUnderUtil = (uint8_t) nCfgValue;
-
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_40MHZ_UTILIZATION, nCfgValue);
- pDot11f->FortyMHzUtil = (uint8_t) nCfgValue;
-
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_80MHZ_UTILIZATION, nCfgValue);
- pDot11f->EightyMHzUtil = (uint8_t) nCfgValue;
-
- nCfgValue = 0;
- CFG_GET_INT(nStatus, pMac, WNI_CFG_VHT_160MHZ_UTILIZATION, nCfgValue);
- pDot11f->EightyMHzUtil = (uint8_t) nCfgValue;
-
- lim_log_vht_ext_bss_load(pMac, pDot11f);
-
- return QDF_STATUS_SUCCESS;
-}
-
QDF_STATUS
populate_dot11f_ext_cap(tpAniSirGlobal pMac,
bool isVHTEnabled, tDot11fIEExtCap *pDot11f,
diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h
index c68c37922f..57354935df 100644
--- a/core/sme/inc/csr_api.h
+++ b/core/sme/inc/csr_api.h
@@ -1136,16 +1136,8 @@ typedef struct tagCsrConfigParam {
* request from HDD
*/
bool fScanTwice;
- uint32_t nVhtChannelWidth;
- uint8_t enableTxBF;
- bool enable_subfee_vendor_vhtie;
- uint8_t enable_txbf_sap_mode;
- uint8_t enable2x2;
bool enableVhtFor24GHz;
bool vendor_vht_sap;
- uint8_t enableMuBformee;
- uint8_t enableVhtpAid;
- uint8_t enableVhtGid;
uint8_t enableAmpduPs;
uint8_t enableHtSmps;
uint8_t htSmps;
@@ -1165,7 +1157,6 @@ typedef struct tagCsrConfigParam {
uint8_t enable_tx_ldpc;
uint8_t enable_rx_ldpc;
uint8_t disable_high_ht_mcs_2x2;
- bool enable_vht20_mcs9;
uint8_t max_amsdu_num;
uint32_t ho_delay_for_rx;
uint32_t min_delay_btw_roam_scans;
diff --git a/core/sme/inc/csr_internal.h b/core/sme/inc/csr_internal.h
index 27d62b3856..6ed7ee484d 100644
--- a/core/sme/inc/csr_internal.h
+++ b/core/sme/inc/csr_internal.h
@@ -488,13 +488,6 @@ struct csr_config {
/* To enable scanning 2g channels twice on single scan req from HDD */
bool fScanTwice;
uint32_t nVhtChannelWidth;
- bool enable_subfee_vendor_vhtie;
- uint8_t enable_txbf_sap_mode;
- bool enable_vht20_mcs9;
- uint8_t enable2x2;
- bool enableVhtFor24GHz;
- uint8_t enableVhtpAid;
- uint8_t enableVhtGid;
uint8_t enableHtSmps;
uint8_t htSmps;
bool send_smps_action;
diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c
index 51f5ec436e..9238274f93 100644
--- a/core/sme/src/common/sme_api.c
+++ b/core/sme/src/common/sme_api.c
@@ -12743,11 +12743,14 @@ QDF_STATUS sme_update_nss(tHalHandle h_hal, uint8_t nss)
uint32_t i;
struct mlme_ht_capabilities_info *ht_cap_info;
struct csr_roam_session *csr_session;
+ struct mlme_vht_capabilities_info vht_cap_info;
+
+ vht_cap_info = mac_ctx->mlme_cfg->vht_caps.vht_cap_info;
status = sme_acquire_global_lock(&mac_ctx->sme);
if (QDF_STATUS_SUCCESS == status) {
- mac_ctx->roam.configParam.enable2x2 = (nss == 1) ? 0 : 1;
+ vht_cap_info.enable2x2 = (nss == 1) ? 0 : 1;
/* get the HT capability info*/
ht_cap_info = &mac_ctx->mlme_cfg->ht_caps.ht_cap_info;
@@ -12782,14 +12785,9 @@ void sme_update_user_configured_nss(tHalHandle hal, uint8_t nss)
int sme_update_tx_bfee_supp(tHalHandle hal, uint8_t session_id,
uint8_t cfg_val)
{
- QDF_STATUS status;
+ tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
- status = sme_cfg_set_int(hal, WNI_CFG_VHT_SU_BEAMFORMEE_CAP,
- cfg_val);
- if (status != QDF_STATUS_SUCCESS) {
- sme_err("Failed to set SU BFEE CFG");
- return -EFAULT;
- }
+ mac_ctx->mlme_cfg->vht_caps.vht_cap_info.su_bformee = cfg_val;
return sme_update_he_tx_bfee_supp(hal, session_id, cfg_val);
}
@@ -12798,7 +12796,6 @@ int sme_update_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id,
uint8_t usr_cfg_val, uint8_t nsts_val)
{
tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
- QDF_STATUS status = QDF_STATUS_SUCCESS;
uint8_t nsts_set_val;
mac_ctx->usr_cfg_tx_bfee_nsts = usr_cfg_val;
@@ -12806,13 +12803,8 @@ int sme_update_tx_bfee_nsts(mac_handle_t hal, uint8_t session_id,
nsts_set_val = usr_cfg_val;
else
nsts_set_val = nsts_val;
- status = sme_cfg_set_int(hal,
- WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
- nsts_set_val);
- if (status != QDF_STATUS_SUCCESS) {
- sme_err("Failed to set SU BFEE NSTS CFG");
- return -EFAULT;
- }
+ mac_ctx->mlme_cfg->vht_caps.vht_cap_info.tx_bfee_ant_supp
+ = nsts_set_val;
if (usr_cfg_val)
sme_set_he_tx_bf_cbf_rates(session_id);
@@ -12899,7 +12891,7 @@ int sme_update_he_mcs(tHalHandle hal, uint8_t session_id, uint16_t he_mcs)
case HE_80_MCS0_7:
case HE_80_MCS0_9:
case HE_80_MCS0_11:
- if (mac_ctx->roam.configParam.enable2x2) {
+ if (mac_ctx->mlme_cfg->vht_caps.vht_cap_info.enable2x2) {
mcs_map = HE_SET_MCS_4_NSS(mcs_map, mcs_val, 1);
mcs_map = HE_SET_MCS_4_NSS(mcs_map, mcs_val, 2);
} else {
diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c
index 298be559b2..0216e7c1d5 100644
--- a/core/sme/src/csr/csr_api_roam.c
+++ b/core/sme/src/csr/csr_api_roam.c
@@ -1197,7 +1197,7 @@ QDF_STATUS csr_update_channel_list(tpAniSirGlobal pMac)
(pMac->roam.configParam.uCfgDot11Mode ==
eCSR_CFG_DOT11_MODE_11AC_ONLY)) {
pChanList->vht_en = true;
- if (pMac->roam.configParam.enableVhtFor24GHz)
+ if (pMac->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band)
pChanList->vht_24_en = true;
}
if ((pMac->roam.configParam.uCfgDot11Mode ==
@@ -3011,20 +3011,6 @@ QDF_STATUS csr_change_default_config_param(tpAniSirGlobal pMac,
/* Remove this code once SLM_Sessionization is supported */
/* BMPS_WORKAROUND_NOT_NEEDED */
pMac->roam.configParam.doBMPSWorkaround = 0;
-
- pMac->roam.configParam.nVhtChannelWidth =
- pParam->nVhtChannelWidth;
- pMac->roam.configParam.enable_subfee_vendor_vhtie =
- pParam->enable_subfee_vendor_vhtie;
- pMac->roam.configParam.enable_txbf_sap_mode =
- pParam->enable_txbf_sap_mode;
- pMac->roam.configParam.enable_vht20_mcs9 =
- pParam->enable_vht20_mcs9;
- pMac->roam.configParam.enable2x2 = pParam->enable2x2;
- pMac->roam.configParam.enableVhtFor24GHz =
- pParam->enableVhtFor24GHz;
- pMac->roam.configParam.enableVhtpAid = pParam->enableVhtpAid;
- pMac->roam.configParam.enableVhtGid = pParam->enableVhtGid;
pMac->roam.configParam.enableHtSmps = pParam->enableHtSmps;
pMac->roam.configParam.htSmps = pParam->htSmps;
pMac->roam.configParam.send_smps_action =
@@ -3236,14 +3222,6 @@ QDF_STATUS csr_get_config_param(tpAniSirGlobal pMac, tCsrConfigParam *pParam)
qdf_mem_copy(&pParam->neighborRoamConfig,
&cfg_params->neighborRoamConfig,
sizeof(tCsrNeighborRoamConfigParams));
- pParam->nVhtChannelWidth = cfg_params->nVhtChannelWidth;
- pParam->enable_subfee_vendor_vhtie =
- cfg_params->enable_subfee_vendor_vhtie;
- pParam->enable_txbf_sap_mode =
- cfg_params->enable_txbf_sap_mode;
- pParam->enable_vht20_mcs9 = cfg_params->enable_vht20_mcs9;
- pParam->enableVhtFor24GHz = cfg_params->enableVhtFor24GHz;
- pParam->enable2x2 = cfg_params->enable2x2;
pParam->isFastTransitionEnabled = cfg_params->isFastTransitionEnabled;
pParam->RoamRssiDiff = cfg_params->RoamRssiDiff;
pParam->nRoamPrefer5GHz = cfg_params->nRoamPrefer5GHz;
@@ -13106,7 +13084,7 @@ csr_compute_mode_and_band(tpAniSirGlobal mac_ctx,
enum band_info *band,
uint8_t opr_ch)
{
- bool vht_24_ghz = mac_ctx->roam.configParam.enableVhtFor24GHz;
+ bool vht_24_ghz = mac_ctx->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band;
switch (mac_ctx->roam.configParam.uCfgDot11Mode) {
case eCSR_CFG_DOT11_MODE_11A:
@@ -13305,7 +13283,7 @@ enum csr_cfgdot11mode curr_mode = mac_ctx->roam.configParam.uCfgDot11Mode;
}
if (IS_24G_CH(opr_chn) &&
- (false == mac_ctx->roam.configParam.enableVhtFor24GHz) &&
+ (false == mac_ctx->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band) &&
(eCSR_CFG_DOT11_MODE_11AC == cfg_dot11_mode ||
eCSR_CFG_DOT11_MODE_11AC_ONLY == cfg_dot11_mode))
cfg_dot11_mode = eCSR_CFG_DOT11_MODE_11N;
@@ -15303,6 +15281,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
struct vdev_type_nss *vdev_type_nss;
struct action_oui_search_attr vendor_ap_search_attr;
tDot11fIEVHTCaps *vht_caps = NULL;
+ bool bvalue = 0;
if (!pSession) {
sme_err("session %d not found", sessionId);
@@ -15414,7 +15393,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
pSession->bssParams.
uCfgDot11Mode);
if (pBssDescription->channelId <= 14
- && false == pMac->roam.configParam.enableVhtFor24GHz
+ && false == pMac->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band
&& WNI_CFG_DOT11_MODE_11AC == ucDot11Mode) {
/* Need to disable VHT operation in 2.4 GHz band */
ucDot11Mode = WNI_CFG_DOT11_MODE_11N;
@@ -15440,7 +15419,7 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
pSession->vdev_nss = pSession->nss;
}
- if (!pMac->roam.configParam.enable2x2)
+ if (!pMac->mlme_cfg->vht_caps.vht_cap_info.enable2x2)
pSession->nss = 1;
if (pSession->nss == 1)
@@ -15947,15 +15926,8 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
channelId);
}
- if (wlan_cfg_get_int(pMac, WNI_CFG_VHT_SU_BEAMFORMEE_CAP,
- &value) != QDF_STATUS_SUCCESS)
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
- ("Failed to get SU beamformee capability"));
- if (wlan_cfg_get_int(pMac,
- WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
- &value1) != QDF_STATUS_SUCCESS)
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
- ("Failed to get CSN beamformee capability"));
+ value = pMac->mlme_cfg->vht_caps.vht_cap_info.su_bformee;
+ value1 = pMac->mlme_cfg->vht_caps.vht_cap_info.tx_bfee_ant_supp;
csr_join_req->vht_config.su_beam_formee = value;
@@ -15983,33 +15955,27 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
}
csr_join_req->vht_config.csnof_beamformer_antSup = txBFCsnValue;
- if (wlan_cfg_get_int(pMac,
- WNI_CFG_VHT_SU_BEAMFORMER_CAP, &value)
- != QDF_STATUS_SUCCESS)
- sme_err("Failed to get SU beamformer capability");
-
+ bvalue = pMac->mlme_cfg->vht_caps.vht_cap_info.su_bformer;
/*
* Set SU Bformer only if SU Bformer is enabled in INI
* and AP is SU Bformee capable
*/
- if (value && !((IS_BSS_VHT_CAPABLE(pIes->VHTCaps) &&
+ if (bvalue && !((IS_BSS_VHT_CAPABLE(pIes->VHTCaps) &&
pIes->VHTCaps.suBeamformeeCap) ||
(IS_BSS_VHT_CAPABLE(
pIes->vendor_vht_ie.VHTCaps)
&& pIes->vendor_vht_ie.VHTCaps.
suBeamformeeCap)))
- value = 0;
+ bvalue = 0;
- csr_join_req->vht_config.su_beam_former = value;
+ csr_join_req->vht_config.su_beam_former = bvalue;
/* Set num soundingdim value to 0 if SU Bformer is disabled */
if (!csr_join_req->vht_config.su_beam_former)
csr_join_req->vht_config.num_soundingdim = 0;
- if (wlan_cfg_get_int(pMac,
- WNI_CFG_VHT_MU_BEAMFORMEE_CAP, &value)
- != QDF_STATUS_SUCCESS)
- sme_err("Failed to get CSN beamformee capability");
+ value =
+ pMac->mlme_cfg->vht_caps.vht_cap_info.enable_mu_bformee;
/*
* Set MU Bformee only if SU Bformee is enabled and
* MU Bformee is enabled in INI
@@ -16021,10 +15987,10 @@ QDF_STATUS csr_send_join_req_msg(tpAniSirGlobal pMac, uint32_t sessionId,
csr_join_req->vht_config.mu_beam_formee = 0;
csr_join_req->enableVhtpAid =
- (uint8_t) pMac->roam.configParam.enableVhtpAid;
+ pMac->mlme_cfg->vht_caps.vht_cap_info.enable_gid;
csr_join_req->enableVhtGid =
- (uint8_t) pMac->roam.configParam.enableVhtGid;
+ pMac->mlme_cfg->vht_caps.vht_cap_info.enable_gid;
csr_join_req->enableAmpduPs =
(uint8_t)pMac->mlme_cfg->feature_flags.enable_ampdu;
@@ -16820,18 +16786,11 @@ QDF_STATUS csr_send_mb_start_bss_req_msg(tpAniSirGlobal pMac, uint32_t
&pSession->htConfig,
sizeof(tSirHTConfig));
- if (wlan_cfg_get_int(pMac, WNI_CFG_VHT_SU_BEAMFORMEE_CAP, &value)
- != QDF_STATUS_SUCCESS)
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
- "could not get SU beam formee capability");
+ value = pMac->mlme_cfg->vht_caps.vht_cap_info.su_bformee;
pMsg->vht_config.su_beam_formee =
(uint8_t)value &&
- (uint8_t)pMac->roam.configParam.enable_txbf_sap_mode;
- if (wlan_cfg_get_int(pMac,
- WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
- &value) != QDF_STATUS_SUCCESS)
- QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
- ("Failed to get CSN beamformee capability"));
+ (uint8_t)pMac->mlme_cfg->vht_caps.vht_cap_info.tx_bfee_sap;
+ value = pMac->mlme_cfg->vht_caps.vht_cap_info.tx_bfee_ant_supp;
pMsg->vht_config.csnof_beamformer_antSup = (uint8_t)value;
pMsg->vht_config.mu_beam_formee = 0;
@@ -17134,8 +17093,14 @@ QDF_STATUS csr_roam_open_session(tpAniSirGlobal mac_ctx,
QDF_STATUS status;
uint32_t existing_session_id;
struct mlme_ht_capabilities_info *ht_cap_info;
- uint32_t nCfgValue;
struct csr_roam_session *session;
+ struct mlme_vht_capabilities_info vht_cap_info;
+
+ if (!(mac_ctx->mlme_cfg)) {
+ pe_err("invalid mlme cfg");
+ return QDF_STATUS_E_FAILURE;
+ }
+ vht_cap_info = mac_ctx->mlme_cfg->vht_caps.vht_cap_info;
/* check to see if the mac address already belongs to a session */
status = csr_roam_get_session_id_from_bssid(mac_ctx,
@@ -17211,81 +17176,27 @@ QDF_STATUS csr_roam_open_session(tpAniSirGlobal mac_ctx,
}
#endif /* FEATURE_WLAN_BTAMP_UT_RF */
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_MAX_MPDU_LENGTH, &nCfgValue);
- session->vht_config.max_mpdu_len = nCfgValue;
+ session->vht_config.max_mpdu_len = vht_cap_info.ampdu_len;
+ session->vht_config.supported_channel_widthset =
+ vht_cap_info.supp_chan_width;
+ session->vht_config.ldpc_coding = vht_cap_info.ldpc_coding_cap;
+ session->vht_config.shortgi80 = vht_cap_info.short_gi_80mhz;
+ session->vht_config.shortgi160and80plus80 = vht_cap_info.short_gi_160mhz;
+ session->vht_config.tx_stbc = vht_cap_info.tx_stbc;
+ session->vht_config.rx_stbc = vht_cap_info.rx_stbc;
+ session->vht_config.su_beam_former = vht_cap_info.su_bformer;
+ session->vht_config.su_beam_formee = vht_cap_info.su_bformee;
+ session->vht_config.csnof_beamformer_antSup =
+ vht_cap_info.tx_bfee_ant_supp;
+ session->vht_config.num_soundingdim = vht_cap_info.num_soundingdim;
+ session->vht_config.mu_beam_former = vht_cap_info.mu_bformer;
+ session->vht_config.mu_beam_formee = vht_cap_info.enable_mu_bformee;
+ session->vht_config.vht_txops = vht_cap_info.txop_ps;
+ session->vht_config.htc_vhtcap = vht_cap_info.htc_vhtc;
+ session->vht_config.rx_antpattern = vht_cap_info.rx_antpattern;
+ session->vht_config.tx_antpattern = vht_cap_info.tx_antpattern;
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_SUPPORTED_CHAN_WIDTH_SET,
- &nCfgValue);
- session->vht_config.supported_channel_widthset = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_LDPC_CODING_CAP, &nCfgValue);
- session->vht_config.ldpc_coding = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_SHORT_GI_80MHZ, &nCfgValue);
- session->vht_config.shortgi80 = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ,
- &nCfgValue);
- session->vht_config.shortgi160and80plus80 = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_TXSTBC, &nCfgValue);
- session->vht_config.tx_stbc = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_RXSTBC, &nCfgValue);
- session->vht_config.rx_stbc = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_SU_BEAMFORMER_CAP, &nCfgValue);
- session->vht_config.su_beam_former = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_SU_BEAMFORMEE_CAP, &nCfgValue);
- session->vht_config.su_beam_formee = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_CSN_BEAMFORMEE_ANT_SUPPORTED,
- &nCfgValue);
- session->vht_config.csnof_beamformer_antSup = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_NUM_SOUNDING_DIMENSIONS,
- &nCfgValue);
- session->vht_config.num_soundingdim = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_MU_BEAMFORMER_CAP, &nCfgValue);
- session->vht_config.mu_beam_former = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_MU_BEAMFORMEE_CAP, &nCfgValue);
- session->vht_config.mu_beam_formee = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_TXOP_PS, &nCfgValue);
- session->vht_config.vht_txops = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_HTC_VHTC_CAP, &nCfgValue);
- session->vht_config.htc_vhtcap = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_RX_ANT_PATTERN, &nCfgValue);
- session->vht_config.rx_antpattern = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_TX_ANT_PATTERN, &nCfgValue);
- session->vht_config.tx_antpattern = nCfgValue;
-
- nCfgValue = 0;
- wlan_cfg_get_int(mac_ctx, WNI_CFG_VHT_AMPDU_LEN_EXPONENT, &nCfgValue);
- session->vht_config.max_ampdu_lenexp = nCfgValue;
+ session->vht_config.max_ampdu_lenexp = vht_cap_info.ampdu_len_exponent;
csr_update_session_he_cap(mac_ctx, session);
@@ -20697,7 +20608,7 @@ QDF_STATUS csr_roam_channel_change_req(tpAniSirGlobal pMac,
pMsg->dot11mode = csr_translate_to_wni_cfg_dot11_mode(pMac,
param.uCfgDot11Mode);
if (IS_24G_CH(pMsg->targetChannel) &&
- (false == pMac->roam.configParam.enableVhtFor24GHz) &&
+ (false == pMac->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band) &&
(WNI_CFG_DOT11_MODE_11AC == pMsg->dot11mode ||
WNI_CFG_DOT11_MODE_11AC_ONLY == pMsg->dot11mode))
pMsg->dot11mode = WNI_CFG_DOT11_MODE_11N;
diff --git a/core/sme/src/csr/csr_roam_preauth.c b/core/sme/src/csr/csr_roam_preauth.c
index 53d51e7051..d90411ae3d 100644
--- a/core/sme/src/csr/csr_roam_preauth.c
+++ b/core/sme/src/csr/csr_roam_preauth.c
@@ -499,7 +499,7 @@ static uint32_t csr_get_dot11_mode(tpAniSirGlobal mac_ctx,
dot11mode, ucfg_dot11_mode);
if (bss_desc->channelId <= 14 &&
- false == mac_ctx->roam.configParam.enableVhtFor24GHz &&
+ false == mac_ctx->mlme_cfg->vht_caps.vht_cap_info.b24ghz_band &&
WNI_CFG_DOT11_MODE_11AC == dot11mode) {
/* Need to disable VHT operation in 2.4 GHz band */
dot11mode = WNI_CFG_DOT11_MODE_11N;