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

qcacld-3.0: Introduce ini parameter for SAE support on SAP

Define ini parameter enable_sae_for_sap to enable SAE
support on SAP. It's enabled by default.

Change-Id: I94f099862ad04e0c9f5155ad9dd7165241540c45
CRs-Fixed: 2394661
Srinivas Dasari 6 жил өмнө
parent
commit
ed83ddebcd

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

@@ -1130,6 +1130,18 @@ static void mlme_init_twt_cfg(struct wlan_objmgr_psoc *psoc,
 	twt_cfg->twt_congestion_timeout = cfg_get(psoc, CFG_TWT_CONGESTION_TIMEOUT);
 }
 
+#ifdef WLAN_FEATURE_SAE
+static bool is_sae_sap_enabled(struct wlan_objmgr_psoc *psoc)
+{
+	return cfg_get(psoc, CFG_IS_SAP_SAE_ENABLED);
+}
+#else
+static bool is_sae_sap_enabled(struct wlan_objmgr_psoc *psoc)
+{
+	return false;
+}
+#endif
+
 static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc,
 			      struct wlan_mlme_cfg_sap *sap_cfg)
 {
@@ -1187,6 +1199,7 @@ static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc,
 		cfg_get(psoc, CFG_SAP_11AC_OVERRIDE);
 	sap_cfg->go_11ac_override =
 		cfg_get(psoc, CFG_GO_11AC_OVERRIDE);
+	sap_cfg->sap_sae_enabled = is_sae_sap_enabled(psoc);
 }
 
 static void mlme_init_obss_ht40_cfg(struct wlan_objmgr_psoc *psoc,

+ 31 - 0
components/mlme/dispatcher/inc/cfg_mlme_sap.h

@@ -678,7 +678,38 @@
 				1, \
 				"Override bw to 11ac for P2P GO")
 
+#ifdef WLAN_FEATURE_SAE
+/*
+ *
+ * <ini>
+ * enable_sae_for_sap - Enable/Disable SAE support in driver for SAP
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to enable/disable SAE support in driver for SAP mode
+ * Driver will process/drop the SAE authentication frames based on this config.
+ *
+ * Related: None
+ *
+ * Supported Feature: SAE
+ * Usage: External
+ *
+ * </ini>
+ */
+#define CFG_IS_SAP_SAE_ENABLED CFG_INI_BOOL( \
+				"enable_sae_for_sap", \
+				1, \
+				"Enable/Disable SAE support for SAP")
+
+#define CFG_SAP_SAE CFG(CFG_IS_SAP_SAE_ENABLED)
+
+#else
+#define CFG_SAP_SAE
+#endif /* WLAN_FEATURE_SAE */
+
 #define CFG_SAP_ALL \
+	CFG_SAP_SAE \
 	CFG(CFG_AP_ENABLE_RANDOM_BSSID) \
 	CFG(CFG_SSID) \
 	CFG(CFG_BEACON_INTERVAL) \

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

@@ -617,6 +617,7 @@ struct wlan_mlme_cfg_sap {
 	uint8_t sap_mcc_chnl_avoid;
 	bool sap_11ac_override;
 	bool go_11ac_override;
+	bool sap_sae_enabled;
 };
 
 /**