diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index e84361627dea..876432aea2ea 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/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, diff --git a/components/mlme/dispatcher/inc/cfg_mlme_sap.h b/components/mlme/dispatcher/inc/cfg_mlme_sap.h index 88ccba803179..7f89e9ff8bff 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_sap.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_sap.h @@ -678,7 +678,38 @@ 1, \ "Override bw to 11ac for P2P GO") +#ifdef WLAN_FEATURE_SAE +/* + * + * + * 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 + * + * + */ +#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) \ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 5c92fd42cd77..b1e22802d83e 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/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; }; /**