Эх сурвалжийг харах

qcacld-3.0: ADD MLME INI items of FE_BEAMFORM and WLAN_REG

Add the following WLAN_REG ini configs and FE_BEAMFORM
cfg items to MLME cfg:
1. WNI_CFG_11D_ENABLED
2. WNI_CFG_11H_ENABLED
3. WNI_CFG_TX_BF_CAP
4. WNI_CFG_AS_CAP
5. WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP

Introduce the basic infra APIs related to these configs
from mlme.

In csr_roam_open_session, lim_populate_vht_mcs_set,
lim_sta_send_add_bss, populate_dot11f_tdls_ht_vht_cap,
populate_dot11f_vht_caps and sme_update_nss, local structure
is updated instead of mlme global structure for vht caps and
thus the mlme vht caps contains only the default values.

Fix this by updating mlme vht caps in mlme_update_vht_cap.

Change-Id: I1a948d7a44ad2bcc7f711c46b278971d7e4026e7
CRs-Fixed: 2354562
Abhinav Kumar 6 жил өмнө
parent
commit
f069e13d9a

+ 8 - 0
mlme/core/src/wlan_mlme_main.c

@@ -349,6 +349,9 @@ static void mlme_init_generic_cfg(struct wlan_objmgr_psoc *psoc,
 	gen->debug_packet_log = cfg_get(psoc, CFG_ENABLE_DEBUG_PACKET_LOG);
 	mlme_init_pmf_cfg(psoc, gen);
 	mlme_init_lpass_support_cfg(psoc, gen);
+
+	gen->enabled_11h = cfg_default(CFG_11H_SUPPORT_ENABLED);
+	gen->enabled_11d = cfg_default(CFG_11D_SUPPORT_ENABLED);
 }
 
 static void mlme_init_edca_ani_cfg(struct wlan_mlme_edca_params *edca_params)
@@ -806,6 +809,11 @@ static void mlme_init_vht_cap_cfg(struct wlan_objmgr_psoc *psoc,
 
 	if (vht_cap_info->enable2x2 && vht_cap_info->su_bformer)
 		vht_cap_info->num_soundingdim = NUM_OF_SOUNDING_DIMENSIONS;
+
+	vht_cap_info->tx_bf_cap = cfg_default(CFG_TX_BF_CAP);
+	vht_cap_info->as_cap = cfg_default(CFG_AS_CAP);
+	vht_cap_info->disable_ldpc_with_txbf_ap =
+			cfg_get(psoc, CFG_DISABLE_LDPC_WITH_TXBF_AP);
 }
 
 static void mlme_init_rates_in_cfg(struct wlan_objmgr_psoc *psoc,

+ 46 - 0
mlme/dispatcher/inc/cfg_mlme_generic.h

@@ -94,6 +94,50 @@
 		1, \
 		"RTT3 enable/disable info")
 
+/*
+ * <ini>
+ * g11hSupportEnabled - Enable 11h support
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to set 11h support flag
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_11H_SUPPORT_ENABLED CFG_INI_BOOL( \
+		"g11hSupportEnabled", \
+		1, \
+		"11h Enable Flag")
+
+/*
+ * <ini>
+ * g11dSupportEnabled - Enable 11d support
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to set 11d support flag
+ *
+ * Related: None
+ *
+ * Supported Feature: STA
+ *
+ * Usage: Internal/External
+ *
+ * </ini>
+ */
+#define CFG_11D_SUPPORT_ENABLED CFG_INI_BOOL( \
+		"g11dSupportEnabled", \
+		1, \
+		"11d Enable Flag")
+
 /*
  * <ini>
  * BandCapability - Preferred band (0: Both,  1: 2.4G only,  2: 5G only)
@@ -494,6 +538,8 @@
 	CFG(CFG_PMF_SA_QUERY_RETRY_INTERVAL) \
 	CFG(CFG_ENABLE_RTT_MAC_RANDOMIZATION) \
 	CFG(CFG_RTT3_ENABLE) \
+	CFG(CFG_11H_SUPPORT_ENABLED) \
+	CFG(CFG_11D_SUPPORT_ENABLED) \
 	CFG(CFG_BAND_CAPABILITY) \
 	CFG(CFG_PREVENT_LINK_DOWN) \
 	CFG(CFG_SELECT_5GHZ_MARGIN) \

+ 40 - 1
mlme/dispatcher/inc/cfg_mlme_vht_caps.h

@@ -126,6 +126,42 @@
 		CFG_VALUE_OR_DEFAULT, \
 		"VHT TX SUPP DATA RATE")
 
+#define CFG_TX_BF_CAP CFG_INT( \
+		"tx_bf_cap", \
+		0, \
+		-1, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"TX BF CAP")
+
+#define CFG_AS_CAP CFG_UINT( \
+		"as_cap", \
+		0, \
+		255, \
+		0, \
+		CFG_VALUE_OR_DEFAULT, \
+		"AS CAP")
+
+/*
+ * <ini>
+ * gDisableLDPCWithTxbfAP - Disable LDPC with tx bf AP
+ * @Min: 0
+ * @Max: 1
+ * @Default: 0
+ *
+ * Related: NA
+ *
+ * Supported Feature: 11AC
+ *
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_DISABLE_LDPC_WITH_TXBF_AP CFG_INI_BOOL( \
+		"gDisableLDPCWithTxbfAP", \
+		0, \
+		"Disable LDPC with tx bf AP")
+
 /*
  * <ini>
  * gTxBFEnable - Enables SU beamformee caps
@@ -591,6 +627,9 @@
 	CFG(CFG_VHT_AMPDU_LEN_EXPONENT) \
 	CFG(CFG_VHT_MPDU_LEN) \
 	CFG(CFG_VHT_ENABLE_TXBF_SAP_MODE) \
-	CFG(CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE)
+	CFG(CFG_ENABLE_SUBFEE_IN_VENDOR_VHTIE) \
+	CFG(CFG_TX_BF_CAP) \
+	CFG(CFG_AS_CAP) \
+	CFG(CFG_DISABLE_LDPC_WITH_TXBF_AP)
 
 #endif /* __CFG_MLME_VHT_CAPS_H */

+ 37 - 0
mlme/dispatcher/inc/wlan_mlme_api.h

@@ -1857,4 +1857,41 @@ QDF_STATUS wlan_mlme_is_sap_uapsd_enabled(struct wlan_objmgr_psoc *psoc,
  */
 QDF_STATUS wlan_mlme_set_sap_uapsd_flag(struct wlan_objmgr_psoc *psoc,
 					bool value);
+
+/**
+ * wlan_mlme_is_11h_enabled() - Get the 11h flag
+ * @psoc: psoc context
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_is_11h_enabled(struct wlan_objmgr_psoc *psoc, bool *value);
+
+/**
+ * wlan_mlme_set_11h_enabled() - Set the 11h flag
+ * @psoc: psoc context
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_set_11h_enabled(struct wlan_objmgr_psoc *psoc, bool value);
+
+/**
+ * wlan_mlme_is_11d_enabled() - Get the 11d flag
+ * @psoc: psoc context
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_is_11d_enabled(struct wlan_objmgr_psoc *psoc, bool *value);
+
+/**
+ * wlan_mlme_set_11d_enabled() - Set the 11h flag
+ * @psoc: psoc context
+ *
+ * Return: QDF_STATUS
+ */
+QDF_STATUS
+wlan_mlme_set_11d_enabled(struct wlan_objmgr_psoc *psoc, bool value);
+
 #endif /* _WLAN_MLME_API_H_ */

+ 10 - 0
mlme/dispatcher/inc/wlan_mlme_public_struct.h

@@ -646,6 +646,9 @@ struct wlan_mlme_mbo {
  * @ampdu_len: To handle maximum receive AMPDU ampdu len
  * @tx_bfee_sap: enable tx bfee SAp
  * @subfee_vendor_vhtie: enable subfee vendor vht ie
+ * @tx_bf_cap: Transmit bf capability
+ * @as_cap: Antenna sharing capability info
+ * @disable_ldpc_with_txbf_ap: Disable ldpc capability
  */
 struct mlme_vht_capabilities_info {
 	uint8_t supp_chan_width;
@@ -686,6 +689,9 @@ struct mlme_vht_capabilities_info {
 	uint8_t ampdu_len;
 	bool tx_bfee_sap;
 	bool vendor_vhtie;
+	uint8_t tx_bf_cap;
+	uint8_t as_cap;
+	bool disable_ldpc_with_txbf_ap;
 };
 
 /**
@@ -902,6 +908,8 @@ struct wlan_mlme_chainmask {
  * @optimize_ca_event: Enable/Disable Optimization of CA events
  * @fw_timeout_crash: Enable/Disable FW Timeout Crash *
  * @debug_packet_log: Debug packet log flags
+ * @enabled_11h: enable 11h flag
+ * @enabled_11d: enable 11d flag
  */
 struct wlan_mlme_generic {
 	enum band_info band_capability;
@@ -925,6 +933,8 @@ struct wlan_mlme_generic {
 	bool optimize_ca_event;
 	bool fw_timeout_crash;
 	uint8_t debug_packet_log;
+	bool enabled_11h;
+	bool enabled_11d;
 };
 
 /*

+ 60 - 0
mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -2358,6 +2358,66 @@ ucfg_mlme_update_nss_vht_cap(struct wlan_objmgr_psoc *psoc)
 	return mlme_update_nss_vht_cap(psoc);
 }
 
+/**
+ * ucfg_mlme_is_11h_enabled() - Get 11h flag
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline QDF_STATUS
+ucfg_mlme_is_11h_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+	return wlan_mlme_is_11h_enabled(psoc, value);
+}
+
+/**
+ * ucfg_mlme_set_11h_enabled() - Set 11h flag
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline QDF_STATUS
+ucfg_mlme_set_11h_enabled(struct wlan_objmgr_psoc *psoc, bool value)
+{
+	return wlan_mlme_set_11h_enabled(psoc, value);
+}
+
+/**
+ * ucfg_mlme_is_11d_enabled() - Get 11d flag
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline QDF_STATUS
+ucfg_mlme_is_11d_enabled(struct wlan_objmgr_psoc *psoc, bool *value)
+{
+	return wlan_mlme_is_11d_enabled(psoc, value);
+}
+
+/**
+ * ucfg_mlme_set_11d_enabled() - Set 11d flag
+ * @psoc: pointer to psoc object
+ * @value: Value that needs to be set from the caller
+ *
+ * Inline UCFG API to be used by HDD/OSIF callers
+ *
+ * Return: QDF Status
+ */
+static inline QDF_STATUS
+ucfg_mlme_set_11d_enabled(struct wlan_objmgr_psoc *psoc, bool value)
+{
+	return wlan_mlme_set_11d_enabled(psoc, value);
+}
+
 /**
  * ucfg_mlme_get_opr_rate_set() - Get operational rate set
  * @psoc: pointer to psoc object

+ 63 - 0
mlme/dispatcher/src/wlan_mlme_api.c

@@ -2351,6 +2351,69 @@ QDF_STATUS mlme_set_wep_key(struct wlan_mlme_wep_cfg *wep_params,
 	return QDF_STATUS_SUCCESS;
 }
 
+QDF_STATUS
+wlan_mlme_is_11h_enabled(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.gen.enabled_11h;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+wlan_mlme_set_11h_enabled(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.gen.enabled_11h = value;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+wlan_mlme_is_11d_enabled(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.gen.enabled_11d;
+
+	return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS
+wlan_mlme_set_11d_enabled(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.gen.enabled_11d = value;
+
+	return QDF_STATUS_SUCCESS;
+}
 QDF_STATUS
 wlan_mlme_cfg_set_vht_chan_width(struct wlan_objmgr_psoc *psoc, uint8_t value)
 {