Forráskód Böngészése

qcacld-3.0: Add MLME CFG items and APIs for VHT

Add the basic infra for MLME CFG items and the APIs to be used from
other components for VHT - Part-1.

Change-Id: Ie74bfd42ed3d34cc218f20ee3f9d81dc6af02172
CRs-Fixed: 2322300
Abhinav Kumar 6 éve
szülő
commit
c1c266b7e7

+ 80 - 0
components/mlme/core/src/wlan_mlme_main.c

@@ -409,6 +409,85 @@ static void mlme_init_mbo_cfg(struct wlan_objmgr_psoc *psoc,
 			cfg_get(psoc, CFG_MBO_CAND_RSSI_BTC_THRESHOLD);
 }
 
+static void mlme_init_vht_cap_cfg(struct wlan_objmgr_psoc *psoc,
+				  struct mlme_vht_capabilities_info
+				  *vht_cap_info)
+{
+	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 =
+			cfg_default(CFG_VHT_HTC_VHTC);
+	vht_cap_info->link_adap_cap =
+			cfg_default(CFG_VHT_LINK_ADAPTATION_CAP);
+	vht_cap_info->rx_antpattern =
+			cfg_default(CFG_VHT_RX_ANT_PATTERN);
+	vht_cap_info->tx_antpattern =
+			cfg_default(CFG_VHT_TX_ANT_PATTERN);
+	vht_cap_info->rx_supp_data_rate =
+			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->ampdu_len =
+			cfg_get(psoc, CFG_VHT_MPDU_LEN);
+	vht_cap_info->ldpc_coding_cap =
+			cfg_get(psoc, CFG_VHT_LDPC_CODING_CAP);
+	vht_cap_info->short_gi_80mhz =
+			cfg_get(psoc, CFG_VHT_SHORT_GI_80MHZ);
+	vht_cap_info->short_gi_160mhz =
+			cfg_get(psoc, CFG_VHT_SHORT_GI_160_AND_80_PLUS_80MHZ);
+	vht_cap_info->tx_stbc =
+			cfg_get(psoc, CFG_VHT_TXSTBC);
+	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);
+	vht_cap_info->mu_bformer =
+			cfg_get(psoc, 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 =
+			cfg_get(psoc, CFG_VHT_ENABLE_RX_MCS_8_9);
+	vht_cap_info->tx_mcs =
+			cfg_get(psoc, CFG_VHT_ENABLE_TX_MCS_8_9);
+	vht_cap_info->rx_mcs2x2 =
+			cfg_get(psoc, CFG_VHT_ENABLE_RX_MCS2x2_8_9);
+	vht_cap_info->tx_mcs2x2 =
+			cfg_get(psoc, CFG_VHT_ENABLE_TX_MCS2x2_8_9);
+	vht_cap_info->enable_vht20_mcs9 =
+			cfg_get(psoc, CFG_ENABLE_VHT20_MCS9);
+	vht_cap_info->enable2x2 =
+			cfg_get(psoc, CFG_VHT_ENABLE_2x2_CAP_FEATURE);
+	vht_cap_info->enable_paid =
+			cfg_get(psoc, CFG_VHT_ENABLE_PAID_FEATURE);
+	vht_cap_info->enable_gid =
+			cfg_get(psoc, CFG_VHT_ENABLE_GID_FEATURE);
+	vht_cap_info->b24ghz_band =
+			cfg_get(psoc, CFG_ENABLE_VHT_FOR_24GHZ);
+	vht_cap_info->vendor_24ghz_band =
+			cfg_get(psoc, CFG_ENABLE_VENDOR_VHT_FOR_24GHZ);
+}
+
 static void mlme_init_rates_in_cfg(struct wlan_objmgr_psoc *psoc,
 				   struct wlan_mlme_rates *rates)
 {
@@ -1020,6 +1099,7 @@ QDF_STATUS mlme_cfg_on_psoc_enable(struct wlan_objmgr_psoc *psoc)
 	mlme_init_qos_cfg(psoc, &mlme_cfg->qos_mlme_params);
 	mlme_init_rates_in_cfg(psoc, &mlme_cfg->rates);
 	mlme_init_sap_protection_cfg(psoc, &mlme_cfg->sap_protection_cfg);
+	mlme_init_vht_cap_cfg(psoc, &mlme_cfg->vht_caps.vht_cap_info);
 	mlme_init_chainmask_cfg(psoc, &mlme_cfg->chainmask_cfg);
 	mlme_init_sap_cfg(psoc, &mlme_cfg->sap_cfg);
 	mlme_init_he_cap_in_cfg(psoc, &mlme_cfg->he_caps);

+ 0 - 1
components/mlme/dispatcher/inc/cfg_mlme.h

@@ -69,7 +69,6 @@
 	CFG_THRESHOLD_ALL \
 	CFG_TIMEOUT_ALL \
 	CFG_VHT_CAPS_ALL \
-	CFG_VHT_CAPS_ALL \
 	CFG_WEP_PARAMS_ALL
 
 #endif /* __CFG_MLME_H */

+ 443 - 3
components/mlme/dispatcher/inc/cfg_mlme_vht_caps.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2018 The Linux Foundation. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -23,6 +23,446 @@
 #ifndef __CFG_MLME_VHT_CAPS_H
 #define __CFG_MLME_VHT_CAPS_H
 
-#define CFG_VHT_CAPS_ALL
+#define CFG_VHT_SUPP_CHAN_WIDTH CFG_UINT( \
+		"supp_chan_width", \
+		0, \
+		2, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"VHT SUPPORTED CHAN WIDTH SET")
 
-#endif /* __CFG_MLME_HT_CAPS_H */
+#define CFG_VHT_BEAMFORMEE_ANT_SUPP CFG_UINT( \
+		"tx_bfee_ant_supp", \
+		0, \
+		8, \
+		8, \
+		CFG_VALUE_OR_DEFAULT, \
+		"VHT BEAMFORMEE ANTENNA SUPPORTED CAP")
+
+#define CFG_VHT_NUM_SOUNDING_DIMENSIONS CFG_UINT( \
+		"num_soundingdim", \
+		0, \
+		3, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"VHT NUMBER OF SOUNDING DIMENSIONS")
+
+#define CFG_VHT_HTC_VHTC CFG_BOOL( \
+		"htc_vhtc", \
+		0, \
+		"VHT HTC VHTC")
+
+#define CFG_VHT_LINK_ADAPTATION_CAP CFG_UINT( \
+		"link_adap_cap", \
+		0, \
+		3, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"VHT LINK ADAPTATION CAP")
+
+#define CFG_VHT_RX_ANT_PATTERN CFG_BOOL( \
+		"rx_antpattern", \
+		1, \
+		"VHT RX ANTENNA PATTERN CAP")
+
+#define CFG_VHT_TX_ANT_PATTERN CFG_BOOL( \
+		"tx_antpattern", \
+		1, \
+		"VHT TX ANTENNA PATTERN CAP")
+
+#define CFG_VHT_RX_SUPP_DATA_RATE CFG_UINT( \
+		"rx_supp_data_rate", \
+		0, \
+		780, \
+		780, \
+		CFG_VALUE_OR_DEFAULT, \
+		"VHT RX SUPP DATA RATE")
+
+#define CFG_VHT_TX_SUPP_DATA_RATE CFG_UINT( \
+		"tx_supp_data_rate", \
+		0, \
+		780, \
+		780, \
+		CFG_VALUE_OR_DEFAULT, \
+		"VHT TX SUPP DATA RATE")
+
+#define CFG_VHT_ENABLE_TXBF_20MHZ CFG_BOOL( \
+		"enable_txbf_20mhz", \
+		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( \
+		"su_bformer", \
+		0, \
+		"VHT SU BEAMFORMER CAP")
+
+#define CFG_VHT_SU_BEAMFORMEE_CAP CFG_INI_BOOL( \
+		"su_bformee", \
+		1, \
+		"VHT SU BEAMFORMEE CAP")
+
+#define CFG_VHT_MU_BEAMFORMER_CAP CFG_INI_BOOL( \
+		"mu_bformer", \
+		0, \
+		"VHT MU BEAMFORMER CAP")
+
+#define CFG_VHT_TXOP_PS CFG_INI_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")
+
+/*
+ * <ini>
+ * gVhtChannelWidth - Channel width capability for 11ac
+ * @Min: 0
+ * @Max: 4
+ * @Default: 3
+ *
+ * This ini is  used to set channel width capability for 11AC.
+ * eHT_CHANNEL_WIDTH_20MHZ = 0,
+ * eHT_CHANNEL_WIDTH_40MHZ = 1,
+ * eHT_CHANNEL_WIDTH_80MHZ = 2,
+ * eHT_CHANNEL_WIDTH_160MHZ = 3,
+ * eHT_CHANNEL_WIDTH_80P80MHZ = 4,
+ *
+ * Related: NA
+ *
+ * Supported Feature: 11AC
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_VHT_CHANNEL_WIDTH CFG_INI_UINT( \
+		"gVhtChannelWidth", \
+		0, \
+		4, \
+		2, \
+		CFG_VALUE_OR_DEFAULT, \
+		"Channel width capability for 11ac")
+
+/*
+ * <ini>
+ * gVhtRxMCS - VHT Rx MCS capability for 1x1 mode
+ * @Min: 0
+ * @Max: 2
+ * @Default: 0
+ *
+ * This ini is  used to set VHT Rx MCS capability for 1x1 mode.
+ * 0, MCS0-7
+ * 1, MCS0-8
+ * 2, MCS0-9
+ *
+ * Related: NA
+ *
+ * Supported Feature: 11AC
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_VHT_ENABLE_RX_MCS_8_9 CFG_INI_UINT( \
+		"gVhtRxMCS", \
+		0, \
+		2, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"VHT Rx MCS")
+
+/*
+ * <ini>
+ * gVhtTxMCS - VHT Tx MCS capability for 1x1 mode
+ * @Min: 0
+ * @Max: 2
+ * @Default: 0
+ *
+ * This ini is  used to set VHT Tx MCS capability for 1x1 mode.
+ * 0, MCS0-7
+ * 1, MCS0-8
+ * 2, MCS0-9
+ *
+ * Related: NA
+ *
+ * Supported Feature: 11AC
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_VHT_ENABLE_TX_MCS_8_9 CFG_INI_UINT( \
+		"gVhtTxMCS", \
+		0, \
+		2, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"VHT Tx MCS")
+
+/*
+ * <ini>
+ * gVhtRxMCS2x2 - VHT Rx MCS capability for 2x2 mode
+ * @Min: 0
+ * @Max: 2
+ * @Default: 0
+ *
+ * This ini is  used to set VHT Rx MCS capability for 2x2 mode.
+ * 0, MCS0-7
+ * 1, MCS0-8
+ * 2, MCS0-9
+ *
+ * Related: NA
+ *
+ * Supported Feature: 11AC
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_VHT_ENABLE_RX_MCS2x2_8_9 CFG_INI_UINT( \
+		"gVhtRxMCS2x2", \
+		0, \
+		2, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"VHT Rx MCS 2x2")
+
+/*
+ * <ini>
+ * gVhtTxMCS2x2 - VHT Tx MCS capability for 2x2 mode
+ * @Min: 0
+ * @Max: 2
+ * @Default: 0
+ *
+ * This ini is  used to set VHT Tx MCS capability for 2x2 mode.
+ * 0, MCS0-7
+ * 1, MCS0-8
+ * 2, MCS0-9
+ *
+ * Related: NA
+ *
+ * Supported Feature: 11AC
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_VHT_ENABLE_TX_MCS2x2_8_9 CFG_INI_UINT( \
+		"gVhtTxMCS2x2", \
+		0, \
+		2, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"VHT Tx MCS 2x2")
+
+/*
+ * <ini>
+ * enable_vht20_mcs9 - Enables VHT MCS9 in 20M BW operation
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * Related: NA
+ *
+ * Supported Feature: 11AC
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_ENABLE_VHT20_MCS9 CFG_INI_BOOL( \
+		"enable_vht20_mcs9", \
+		1, \
+		"Enables VHT MCS9 in 20M BW")
+
+/*
+ * <ini>
+ * gEnable2x2 - Enables/disables VHT Tx/Rx MCS values for 2x2
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini disables/enables 2x2 mode. If this is zero then DUT operates as 1x1
+ *
+ * 0, Disable
+ * 1, Enable
+ *
+ * Related: NA
+ *
+ * Supported Feature: 11AC
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_VHT_ENABLE_2x2_CAP_FEATURE CFG_INI_BOOL( \
+		"gEnable2x2", \
+		0, \
+		"VHT Enable 2x2")
+
+/*
+ * <ini>
+ * gEnableMuBformee - Enables/disables multi-user (MU) beam formee capability
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * This ini enables/disables multi-user (MU) beam formee
+ * capability
+ *
+ * Change MU Bformee only when  gTxBFEnable is enabled.
+ * When gTxBFEnable and gEnableMuBformee are set, MU beam formee capability is
+ * enabled.
+ * Related:  gTxBFEnable
+ *
+ * Supported Feature: 11AC
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE CFG_INI_BOOL( \
+		"gEnableMuBformee", \
+		0, \
+		"VHT Enable MU Beamformee")
+
+#define CFG_VHT_ENABLE_PAID_FEATURE CFG_INI_BOOL( \
+		"gEnablePAID", \
+		0, \
+		"VHT Enable PAID")
+
+#define CFG_VHT_ENABLE_GID_FEATURE CFG_INI_BOOL( \
+		"gEnableGID", \
+		0, \
+		"VHT Enable GID")
+
+/* Parameter to control VHT support in 2.4 GHz band */
+#define CFG_ENABLE_VHT_FOR_24GHZ CFG_INI_BOOL( \
+		"gEnableVhtFor24GHzBand", \
+		0, \
+		"VHT Enable for 24GHz")
+
+/*
+ * gEnableVendorVhtFor24GHzBand:Parameter to control VHT support
+ * based on vendor ie in 2.4 GHz band
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This parameter will enable SAP to read VHT capability in vendor ie in Assoc
+ * Req and send VHT caps in Resp to establish connection in VHT Mode.
+ * Supported Feature: SAP
+ *
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_ENABLE_VENDOR_VHT_FOR_24GHZ CFG_INI_BOOL( \
+		"gEnableVendorVhtFor24GHzBand", \
+		1, \
+		"VHT Enable Vendor for 24GHz")
+
+/* Macro to handle maximum receive AMPDU size configuration */
+#define CFG_VHT_AMPDU_LEN_EXPONENT CFG_INI_UINT( \
+		"gVhtAmpduLenExponent", \
+		0, \
+		7, \
+		3, \
+		CFG_VALUE_OR_DEFAULT, \
+		"VHT AMPDU Len in Exponent")
+
+#define CFG_VHT_MPDU_LEN CFG_INI_UINT( \
+		"gVhtMpduLen", \
+		0, \
+		2, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"VHT MPDU Length")
+
+#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_NUM_SOUNDING_DIMENSIONS) \
+	CFG(CFG_VHT_MU_BEAMFORMER_CAP) \
+	CFG(CFG_VHT_TXOP_PS) \
+	CFG(CFG_VHT_HTC_VHTC) \
+	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) \
+	CFG(CFG_VHT_ENABLE_TX_MCS_8_9) \
+	CFG(CFG_VHT_ENABLE_RX_MCS2x2_8_9) \
+	CFG(CFG_VHT_ENABLE_TX_MCS2x2_8_9) \
+	CFG(CFG_ENABLE_VHT20_MCS9) \
+	CFG(CFG_VHT_ENABLE_2x2_CAP_FEATURE) \
+	CFG(CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE) \
+	CFG(CFG_VHT_ENABLE_PAID_FEATURE) \
+	CFG(CFG_VHT_ENABLE_GID_FEATURE) \
+	CFG(CFG_ENABLE_VHT_FOR_24GHZ) \
+	CFG(CFG_ENABLE_VENDOR_VHT_FOR_24GHZ) \
+	CFG(CFG_VHT_AMPDU_LEN_EXPONENT) \
+	CFG(CFG_VHT_MPDU_LEN)
+
+#endif /* __CFG_MLME_VHT_CAPS_H */

+ 85 - 1
components/mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -279,8 +279,92 @@ struct wlan_mlme_mbo {
 	int8_t mbo_candidate_rssi_btc_thres;
 };
 
+/**
+ * struct wlan_mlme_vht_caps - MLME VHT config items
+ * @supp_chan_width: Supported Channel Width
+ * @ldpc_coding_cap: LDPC Coding Capability
+ * @short_gi_80mhz: 80MHz Short Guard Interval
+ * @short_gi_160mhz: 160MHz Short Guard Interval
+ * @tx_stbc: Tx STBC cap
+ * @rx_stbc: Rx STBC cap
+ * @su_bformer: SU Beamformer cap
+ * @su_bformee: SU Beamformee cap
+ * @tx_bfee_ant_supp: Tx beamformee anti supp
+ * @num_soundingdim: Number of sounding dimensions
+ * @mu_bformer: MU Beamformer cap
+ * @txop_ps: Tx OPs in power save
+ * @htc_vhtc: htc_vht capability
+ * @link_adap_cap: Link adaptation capability
+ * @rx_antpattern: Rx Antenna Pattern cap
+ * @tx_antpattern: Tx Antenna Pattern cap
+ * @rx_mcs_map: Rx MCS Map
+ * @tx_mcs_map: Tx MCS Map
+ * @rx_supp_data_rate: Rx highest supported data rate
+ * @tx_supp_data_rate: Tx highest supported data rate
+ * @basic_mcs_set: Basic MCS set
+ * @enable_txbf_20mhz: enable tx bf for 20mhz
+ * @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
+ * @rx_mcs2x2: VHT Rx MCS capability for 2x2 mode
+ * @tx_mcs2x2: VHT Tx MCS capability for 2x2 mode
+ * @enable_vht20_mcs9: Enables VHT MCS9 in 20M BW operation
+ * @enable2x2: Enables/disables VHT Tx/Rx MCS values for 2x2
+ * @enable_mu_bformee: Enables/disables multi-user (MU)
+ * beam formee capability
+ * @enable_paid: Enables/disables paid
+ * @enable_gid: Enables/disables gid
+ * @b24ghz_band: To control VHT support in 2.4 GHz band
+ * @vendor_24ghz_band: to control VHT support based on vendor
+ * 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
+ */
+struct mlme_vht_capabilities_info {
+	uint8_t supp_chan_width;
+	bool ldpc_coding_cap;
+	bool short_gi_80mhz;
+	bool short_gi_160mhz;
+	bool tx_stbc;
+	bool rx_stbc;
+	bool su_bformer;
+	bool su_bformee;
+	uint8_t tx_bfee_ant_supp;
+	uint8_t num_soundingdim;
+	bool mu_bformer;
+	bool txop_ps;
+	bool htc_vhtc;
+	uint8_t link_adap_cap;
+	bool rx_antpattern;
+	bool tx_antpattern;
+	uint32_t rx_mcs_map;
+	uint32_t tx_mcs_map;
+	uint32_t rx_supp_data_rate;
+	uint32_t tx_supp_data_rate;
+	uint32_t basic_mcs_set;
+	bool enable_txbf_20mhz;
+	uint8_t channel_width;
+	uint8_t rx_mcs;
+	uint8_t tx_mcs;
+	uint8_t rx_mcs2x2;
+	uint8_t tx_mcs2x2;
+	bool enable_vht20_mcs9;
+	bool enable2x2;
+	bool enable_mu_bformee;
+	bool enable_paid;
+	bool enable_gid;
+	bool b24ghz_band;
+	bool vendor_24ghz_band;
+	uint8_t ampdu_len_exponent;
+	uint8_t ampdu_len;
+};
+
+/**
+ * struct wlan_mlme_vht_caps - VHT Capabilities related config items
+ * @vht_cap_info: VHT capabilities Info Structure
+ */
 struct wlan_mlme_vht_caps {
-	/* VHT related configs */
+	struct mlme_vht_capabilities_info vht_cap_info;
 };
 
 /**

+ 0 - 253
core/hdd/inc/wlan_hdd_cfg.h

@@ -3795,184 +3795,6 @@ enum hdd_link_speed_rpt_type {
 	eHDD_LINK_SPEED_REPORT_MAX_SCALED = 2,
 };
 
-/*
- * <ini>
- * gVhtChannelWidth - Channel width capability for 11ac
- * @Min: 0
- * @Max: 4
- * @Default: 3
- *
- * This ini is  used to set channel width capability for 11AC.
- * eHT_CHANNEL_WIDTH_20MHZ = 0,
- * eHT_CHANNEL_WIDTH_40MHZ = 1,
- * eHT_CHANNEL_WIDTH_80MHZ = 2,
- * eHT_CHANNEL_WIDTH_160MHZ = 3,
- * eHT_CHANNEL_WIDTH_80P80MHZ = 4,
- *
- * Related: NA
- *
- * Supported Feature: 11AC
- *
- * Usage: External
- *
- * </ini>
- */
-#define CFG_VHT_CHANNEL_WIDTH                "gVhtChannelWidth"
-#define CFG_VHT_CHANNEL_WIDTH_MIN            (0)
-#define CFG_VHT_CHANNEL_WIDTH_MAX            (4)
-#define CFG_VHT_CHANNEL_WIDTH_DEFAULT        (2)
-
-/*
- * <ini>
- * gVhtRxMCS - VHT Rx MCS capability for 1x1 mode
- * @Min: 0
- * @Max: 2
- * @Default: 0
- *
- * This ini is  used to set VHT Rx MCS capability for 1x1 mode.
- * 0, MCS0-7
- * 1, MCS0-8
- * 2, MCS0-9
- *
- * Related: NA
- *
- * Supported Feature: 11AC
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-
-#define CFG_VHT_ENABLE_RX_MCS_8_9               "gVhtRxMCS"
-#define CFG_VHT_ENABLE_RX_MCS_8_9_MIN           (0)
-#define CFG_VHT_ENABLE_RX_MCS_8_9_MAX           (2)
-#define CFG_VHT_ENABLE_RX_MCS_8_9_DEFAULT       (0)
-
-/*
- * <ini>
- * gVhtTxMCS - VHT Tx MCS capability for 1x1 mode
- * @Min: 0
- * @Max: 2
- * @Default: 0
- *
- * This ini is  used to set VHT Tx MCS capability for 1x1 mode.
- * 0, MCS0-7
- * 1, MCS0-8
- * 2, MCS0-9
- *
- * Related: NA
- *
- * Supported Feature: 11AC
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-
-#define CFG_VHT_ENABLE_TX_MCS_8_9               "gVhtTxMCS"
-#define CFG_VHT_ENABLE_TX_MCS_8_9_MIN           (0)
-#define CFG_VHT_ENABLE_TX_MCS_8_9_MAX           (2)
-#define CFG_VHT_ENABLE_TX_MCS_8_9_DEFAULT       (0)
-
-/*
- * <ini>
- * gVhtRxMCS2x2 - VHT Rx MCS capability for 2x2 mode
- * @Min: 0
- * @Max: 2
- * @Default: 0
- *
- * This ini is  used to set VHT Rx MCS capability for 2x2 mode.
- * 0, MCS0-7
- * 1, MCS0-8
- * 2, MCS0-9
- *
- * Related: NA
- *
- * Supported Feature: 11AC
- *
- * Usage: External
- *
- * </ini>
- */
-
-#define CFG_VHT_ENABLE_RX_MCS2x2_8_9               "gVhtRxMCS2x2"
-#define CFG_VHT_ENABLE_RX_MCS2x2_8_9_MIN           (0)
-#define CFG_VHT_ENABLE_RX_MCS2x2_8_9_MAX           (2)
-#define CFG_VHT_ENABLE_RX_MCS2x2_8_9_DEFAULT       (0)
-
-/*
- * <ini>
- * gVhtTxMCS2x2 - VHT Tx MCS capability for 2x2 mode
- * @Min: 0
- * @Max: 2
- * @Default: 0
- *
- * This ini is  used to set VHT Tx MCS capability for 2x2 mode.
- * 0, MCS0-7
- * 1, MCS0-8
- * 2, MCS0-9
- *
- * Related: NA
- *
- * Supported Feature: 11AC
- *
- * Usage: External
- *
- * </ini>
- */
-
-#define CFG_VHT_ENABLE_TX_MCS2x2_8_9               "gVhtTxMCS2x2"
-#define CFG_VHT_ENABLE_TX_MCS2x2_8_9_MIN           (0)
-#define CFG_VHT_ENABLE_TX_MCS2x2_8_9_MAX           (2)
-#define CFG_VHT_ENABLE_TX_MCS2x2_8_9_DEFAULT       (0)
-
-/*
- * <ini>
- * enable_vht20_mcs9 - Enables VHT MCS9 in 20M BW operation
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * Related: NA
- *
- * Supported Feature: 11AC
- *
- * Usage: External
- *
- * </ini>
- */
-
-#define CFG_ENABLE_VHT20_MCS9               "enable_vht20_mcs9"
-#define CFG_ENABLE_VHT20_MCS9_MIN           (0)
-#define CFG_ENABLE_VHT20_MCS9_MAX           (1)
-#define CFG_ENABLE_VHT20_MCS9_DEFAULT       (1)
-
-/*
- * <ini>
- * gEnable2x2 - Enables/disables VHT Tx/Rx MCS values for 2x2
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini disables/enables 2x2 mode. If this is zero then DUT operates as 1x1
- *
- * 0, Disable
- * 1, Enable
- *
- * Related: NA
- *
- * Supported Feature: 11AC
- *
- * Usage: External
- *
- * </ini>
- */
-
-#define CFG_VHT_ENABLE_2x2_CAP_FEATURE         "gEnable2x2"
-#define CFG_VHT_ENABLE_2x2_CAP_FEATURE_MIN     (0)
-#define CFG_VHT_ENABLE_2x2_CAP_FEATURE_MAX     (1)
-#define CFG_VHT_ENABLE_2x2_CAP_FEATURE_DEFAULT (0)
-
 /*
  * <ini>
  * enable_bt_chain_separation - Enables/disables bt /wlan chainmask assignment
@@ -4092,43 +3914,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_VDEV_TYPE_NSS_5G_MAX     (0xAAAA)
 #define CFG_VDEV_TYPE_NSS_5G_DEFAULT (0xAAAA)
 
-/*
- * <ini>
- * gEnableMuBformee - Enables/disables multi-user (MU) beam formee capability
- * @Min: 0
- * @Max: 1
- * @Default: 0
- *
- * This ini enables/disables multi-user (MU) beam formee
- * capability
- *
- * Change MU Bformee only when  gTxBFEnable is enabled.
- * When gTxBFEnable and gEnableMuBformee are set, MU beam formee capability is
- * enabled.
- * Related:  gTxBFEnable
- *
- * Supported Feature: 11AC
- *
- * Usage: External
- *
- * </ini>
- */
-
-#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE         "gEnableMuBformee"
-#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_MIN     (0)
-#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_MAX     (1)
-#define CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_DEFAULT (0)
-
-#define CFG_VHT_ENABLE_PAID_FEATURE             "gEnablePAID"
-#define CFG_VHT_ENABLE_PAID_FEATURE_MIN         (0)
-#define CFG_VHT_ENABLE_PAID_FEATURE_MAX         (1)
-#define CFG_VHT_ENABLE_PAID_FEATURE_DEFAULT     (0)
-
-#define CFG_VHT_ENABLE_GID_FEATURE              "gEnableGID"
-#define CFG_VHT_ENABLE_GID_FEATURE_MIN          (0)
-#define CFG_VHT_ENABLE_GID_FEATURE_MAX          (1)
-#define CFG_VHT_ENABLE_GID_FEATURE_DEFAULT      (0)
-
 #define CFG_HT_ENABLE_SMPS_CAP_FEATURE          "gEnableHtSMPS"
 #define CFG_HT_ENABLE_SMPS_CAP_FEATURE_MIN      (0)
 #define CFG_HT_ENABLE_SMPS_CAP_FEATURE_MAX      (1)
@@ -5168,33 +4953,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_DISABLE_LDPC_WITH_TXBF_AP_MAX         (1)
 #define CFG_DISABLE_LDPC_WITH_TXBF_AP_DEFAULT     (0)
 
-/* Parameter to control VHT support in 2.4 GHz band */
-#define CFG_ENABLE_VHT_FOR_24GHZ_NAME             "gEnableVhtFor24GHzBand"
-#define CFG_ENABLE_VHT_FOR_24GHZ_MIN              (0)
-#define CFG_ENABLE_VHT_FOR_24GHZ_MAX              (1)
-#define CFG_ENABLE_VHT_FOR_24GHZ_DEFAULT          (0)
-
-/*
- * gEnableVendorVhtFor24GHzBand:Parameter to control VHT support
- * based on vendor ie in 2.4 GHz band
- * @Min: 0
- * @Max: 1
- * @Default: 1
- *
- * This parameter will enable SAP to read VHT capability in vendor ie in Assoc
- * Req and send VHT caps in Resp to establish connection in VHT Mode.
- * Supported Feature: SAP
- *
- *
- * Usage: Internal/External
- *
- * </ini>
- */
-#define CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_NAME      "gEnableVendorVhtFor24GHzBand"
-#define CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_MIN       (0)
-#define CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_MAX       (1)
-#define CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_DEFAULT   (1)
-
 /*
  * <ini>
  * gEnableSNRMonitoring - Enables SNR Monitoring
@@ -5322,17 +5080,6 @@ enum hdd_link_speed_rpt_type {
 #define CFG_ENABLE_FW_LOG_MAX                    (CFG_ENABLE_FW_LOG_DIAG)
 #define CFG_ENABLE_FW_LOG_DEFAULT                (CFG_ENABLE_FW_LOG_WMI)
 
-/* Macro to handle maximum receive AMPDU size configuration */
-#define CFG_VHT_AMPDU_LEN_EXPONENT_NAME                "gVhtAmpduLenExponent"
-#define CFG_VHT_AMPDU_LEN_EXPONENT_MIN                 (0)
-#define CFG_VHT_AMPDU_LEN_EXPONENT_MAX                 (7)
-#define CFG_VHT_AMPDU_LEN_EXPONENT_DEFAULT             (3)
-
-#define CFG_VHT_MPDU_LEN_NAME                          "gVhtMpduLen"
-#define CFG_VHT_MPDU_LEN_MIN                           (0)
-#define CFG_VHT_MPDU_LEN_MAX                           (2)
-#define CFG_VHT_MPDU_LEN_DEFAULT                       (0)
-
 /*
  * <ini>
  * gEnableDebugLog - Enable/Disable the Connection related logs

+ 0 - 99
core/hdd/src/wlan_hdd_cfg.c

@@ -1693,55 +1693,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_THROTTLE_DUTY_CYCLE_LEVEL3_MIN,
 		     CFG_THROTTLE_DUTY_CYCLE_LEVEL3_MAX),
 
-	REG_VARIABLE(CFG_VHT_CHANNEL_WIDTH, WLAN_PARAM_Integer,
-		     struct hdd_config, vhtChannelWidth,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
-		     CFG_VHT_CHANNEL_WIDTH_DEFAULT,
-		     CFG_VHT_CHANNEL_WIDTH_MIN,
-		     CFG_VHT_CHANNEL_WIDTH_MAX),
-
-	REG_VARIABLE(CFG_VHT_ENABLE_RX_MCS_8_9, WLAN_PARAM_Integer,
-		     struct hdd_config, vhtRxMCS,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
-		     CFG_VHT_ENABLE_RX_MCS_8_9_DEFAULT,
-		     CFG_VHT_ENABLE_RX_MCS_8_9_MIN,
-		     CFG_VHT_ENABLE_RX_MCS_8_9_MAX),
-
-	REG_VARIABLE(CFG_VHT_ENABLE_TX_MCS_8_9, WLAN_PARAM_Integer,
-		     struct hdd_config, vhtTxMCS,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
-		     CFG_VHT_ENABLE_TX_MCS_8_9_DEFAULT,
-		     CFG_VHT_ENABLE_TX_MCS_8_9_MIN,
-		     CFG_VHT_ENABLE_TX_MCS_8_9_MAX),
-
-	REG_VARIABLE(CFG_VHT_ENABLE_RX_MCS2x2_8_9, WLAN_PARAM_Integer,
-		     struct hdd_config, vhtRxMCS2x2,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
-		     CFG_VHT_ENABLE_RX_MCS2x2_8_9_DEFAULT,
-		     CFG_VHT_ENABLE_RX_MCS2x2_8_9_MIN,
-		     CFG_VHT_ENABLE_RX_MCS2x2_8_9_MAX),
-
-	REG_VARIABLE(CFG_VHT_ENABLE_TX_MCS2x2_8_9, WLAN_PARAM_Integer,
-		     struct hdd_config, vhtTxMCS2x2,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
-		     CFG_VHT_ENABLE_TX_MCS2x2_8_9_DEFAULT,
-		     CFG_VHT_ENABLE_TX_MCS2x2_8_9_MIN,
-		     CFG_VHT_ENABLE_TX_MCS2x2_8_9_MAX),
-
-	REG_VARIABLE(CFG_ENABLE_VHT20_MCS9, WLAN_PARAM_Integer,
-		     struct hdd_config, enable_vht20_mcs9,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
-		     CFG_ENABLE_VHT20_MCS9_DEFAULT,
-		     CFG_ENABLE_VHT20_MCS9_MIN,
-		     CFG_ENABLE_VHT20_MCS9_MAX),
-
-	REG_VARIABLE(CFG_VHT_ENABLE_2x2_CAP_FEATURE, WLAN_PARAM_Integer,
-		     struct hdd_config, enable2x2,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_VHT_ENABLE_2x2_CAP_FEATURE_DEFAULT,
-		     CFG_VHT_ENABLE_2x2_CAP_FEATURE_MIN,
-		     CFG_VHT_ENABLE_2x2_CAP_FEATURE_MAX),
-
 	REG_VARIABLE(CFG_VDEV_TYPE_NSS_2G, WLAN_PARAM_Integer,
 		     struct hdd_config, vdev_type_nss_2g,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -1763,27 +1714,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_VDEV_TYPE_NSS_5G_MIN,
 		     CFG_VDEV_TYPE_NSS_5G_MAX),
 
-	REG_VARIABLE(CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE, WLAN_PARAM_Integer,
-		     struct hdd_config, enableMuBformee,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_DEFAULT,
-		     CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_MIN,
-		     CFG_VHT_ENABLE_MU_BFORMEE_CAP_FEATURE_MAX),
-
-	REG_VARIABLE(CFG_VHT_ENABLE_PAID_FEATURE, WLAN_PARAM_Integer,
-		     struct hdd_config, enableVhtpAid,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_VHT_ENABLE_PAID_FEATURE_DEFAULT,
-		     CFG_VHT_ENABLE_PAID_FEATURE_MIN,
-		     CFG_VHT_ENABLE_PAID_FEATURE_MAX),
-
-	REG_VARIABLE(CFG_VHT_ENABLE_GID_FEATURE, WLAN_PARAM_Integer,
-		     struct hdd_config, enableVhtGid,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
-		     CFG_VHT_ENABLE_GID_FEATURE_DEFAULT,
-		     CFG_VHT_ENABLE_GID_FEATURE_MIN,
-		     CFG_VHT_ENABLE_GID_FEATURE_MAX),
-
 
 	REG_VARIABLE(CFG_HT_ENABLE_SMPS_CAP_FEATURE, WLAN_PARAM_Integer,
 		     struct hdd_config, enableHtSmps,
@@ -1967,21 +1897,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_ENABLE_DATA_STALL_DETECTION_MIN,
 		     CFG_ENABLE_DATA_STALL_DETECTION_MAX),
 
-	REG_VARIABLE(CFG_ENABLE_VHT_FOR_24GHZ_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, enableVhtFor24GHzBand,
-		     VAR_FLAGS_OPTIONAL,
-		     CFG_ENABLE_VHT_FOR_24GHZ_DEFAULT,
-		     CFG_ENABLE_VHT_FOR_24GHZ_MIN,
-		     CFG_ENABLE_VHT_FOR_24GHZ_MAX),
-
-
-	REG_VARIABLE(CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, enable_sap_vendor_vht,
-		     VAR_FLAGS_OPTIONAL,
-		     CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_DEFAULT,
-		     CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_MIN,
-		     CFG_ENABLE_VENDOR_VHT_FOR_24GHZ_MAX),
-
 	REG_DYNAMIC_VARIABLE(CFG_ENABLE_FAST_ROAM_IN_CONCURRENCY,
 			     WLAN_PARAM_Integer,
 			     struct hdd_config, bFastRoamInConIniFeatureEnabled,
@@ -2093,20 +2008,6 @@ struct reg_table_entry g_registry_table[] = {
 		     CFG_IPA_LOW_BANDWIDTH_MBPS_MAX),
 #endif
 
-	REG_VARIABLE(CFG_VHT_AMPDU_LEN_EXPONENT_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, fVhtAmpduLenExponent,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
-		     CFG_VHT_AMPDU_LEN_EXPONENT_DEFAULT,
-		     CFG_VHT_AMPDU_LEN_EXPONENT_MIN,
-		     CFG_VHT_AMPDU_LEN_EXPONENT_MAX),
-
-	REG_VARIABLE(CFG_VHT_MPDU_LEN_NAME, WLAN_PARAM_Integer,
-		     struct hdd_config, vhtMpduLen,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
-		     CFG_VHT_MPDU_LEN_DEFAULT,
-		     CFG_VHT_MPDU_LEN_MIN,
-		     CFG_VHT_MPDU_LEN_MAX),
-
 	REG_VARIABLE(CFG_COALESING_IN_IBSS_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, isCoalesingInIBSSAllowed,
 		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,