diff --git a/components/mlme/core/src/wlan_mlme_main.c b/components/mlme/core/src/wlan_mlme_main.c index 52092cf6c584..30d24a7b85bc 100644 --- a/components/mlme/core/src/wlan_mlme_main.c +++ b/components/mlme/core/src/wlan_mlme_main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020 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 @@ -1204,6 +1204,8 @@ static void mlme_init_sap_cfg(struct wlan_objmgr_psoc *psoc, sap_cfg->sap_sae_enabled = is_sae_sap_enabled(psoc); sap_cfg->is_sap_bcast_deauth_enabled = cfg_get(psoc, CFG_IS_SAP_BCAST_DEAUTH_ENABLED); + sap_cfg->is_6g_sap_fd_enabled = + cfg_get(psoc, CFG_6G_SAP_FILS_DISCOVERY_ENABLED); } 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 51f590e5f7c1..bcb6085c19bd 100644 --- a/components/mlme/dispatcher/inc/cfg_mlme_sap.h +++ b/components/mlme/dispatcher/inc/cfg_mlme_sap.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2020 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 @@ -741,6 +741,29 @@ #define CFG_SAP_SAE #endif /* WLAN_FEATURE_SAE */ +/* + * + * + * enable_sap_fils_discovery - Enable/Disable fils discovery for 6Ghz SAP + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * Enable: 6Ghz SAP transmits fils discovery frame at every 20ms + * Disable: 6Ghz SAP transmits probe response frame at every 20ms + * + * Related: None + * + * Supported Feature: SAP + * Usage: External + * + * + */ +#define CFG_6G_SAP_FILS_DISCOVERY_ENABLED CFG_INI_BOOL( \ + "enable_6g_sap_fils_discovery", \ + 1, \ + "Enable/Disable fils discovery for SAP") + #define CFG_SAP_ALL \ CFG_SAP_SAE \ CFG(CFG_AP_ENABLE_RANDOM_BSSID) \ @@ -775,6 +798,7 @@ CFG(CFG_SAP_11AC_OVERRIDE) \ CFG(CFG_GO_FORCE_11N_FOR_11AC) \ CFG(CFG_GO_11AC_OVERRIDE) \ - CFG(CFG_IS_SAP_BCAST_DEAUTH_ENABLED) + CFG(CFG_IS_SAP_BCAST_DEAUTH_ENABLED) \ + CFG(CFG_6G_SAP_FILS_DISCOVERY_ENABLED) #endif /* __CFG_MLME_SAP_H */ diff --git a/components/mlme/dispatcher/inc/wlan_mlme_api.h b/components/mlme/dispatcher/inc/wlan_mlme_api.h index d6d9bdba10ec..9e195f191199 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020 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 @@ -577,6 +577,18 @@ wlan_mlme_get_sap_bcast_deauth_enabled(struct wlan_objmgr_psoc *psoc, QDF_STATUS wlan_mlme_get_sap_allow_all_channels(struct wlan_objmgr_psoc *psoc, bool *value); +/** + * wlan_mlme_is_6g_sap_fd_enabled() - get the enable/disable value + * for 6g sap fils discovery + * @psoc: pointer to psoc object + * @value: Value that needs to get from the caller + * + * Return: QDF Status + */ +QDF_STATUS +wlan_mlme_is_6g_sap_fd_enabled(struct wlan_objmgr_psoc *psoc, + bool *value); + /** * wlan_mlme_get_sap_allow_all_channels() - get the value sap max peers * @psoc: pointer to psoc object diff --git a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h index 1bf70d41bcb1..63ec3b7bb03e 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_public_struct.h @@ -661,6 +661,7 @@ struct wlan_mlme_wps_params { * @go_11ac_override: Override GO bandwidth to 11ac * @sap_sae_enabled: enable sae in sap mode * @is_sap_bcast_deauth_enabled: enable bcast deauth for sap + * @is_6g_sap_fd_enabled: enable fils discovery on sap */ struct wlan_mlme_cfg_sap { uint8_t cfg_ssid[WLAN_SSID_MAX_LEN]; @@ -698,6 +699,7 @@ struct wlan_mlme_cfg_sap { bool go_11ac_override; bool sap_sae_enabled; bool is_sap_bcast_deauth_enabled; + bool is_6g_sap_fd_enabled; }; /** diff --git a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h index af96a2fc8ce0..0a8372228971 100644 --- a/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h +++ b/components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020 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 @@ -1426,6 +1426,23 @@ ucfg_mlme_get_sap_bcast_deauth_enabled(struct wlan_objmgr_psoc *psoc, return wlan_mlme_get_sap_bcast_deauth_enabled(psoc, value); } +/** + * ucfg_mlme_is_6g_sap_fd_enabled() - get the sap fils discovery + * enabled value + * @psoc: pointer to psoc object + * @value: Value that needs to be get from the caller + * + * Inline UCFG API to be used by HDD/OSIF callers + * + * Return: QDF Status + */ +static inline QDF_STATUS +ucfg_mlme_is_6g_sap_fd_enabled(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + return wlan_mlme_is_6g_sap_fd_enabled(psoc, value); +} + /** * ucfg_mlme_get_sap_allow_all_channels() - get the sap allow all channels * @psoc: pointer to psoc object diff --git a/components/mlme/dispatcher/src/wlan_mlme_api.c b/components/mlme/dispatcher/src/wlan_mlme_api.c index 691d1f4b3d77..6d0061ed6160 100644 --- a/components/mlme/dispatcher/src/wlan_mlme_api.c +++ b/components/mlme/dispatcher/src/wlan_mlme_api.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2018-2020 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 @@ -1730,6 +1730,21 @@ wlan_mlme_get_sap_bcast_deauth_enabled(struct wlan_objmgr_psoc *psoc, return QDF_STATUS_SUCCESS; } +QDF_STATUS +wlan_mlme_is_6g_sap_fd_enabled(struct wlan_objmgr_psoc *psoc, + bool *value) +{ + struct wlan_mlme_psoc_ext_obj *mlme_obj; + + mlme_obj = mlme_get_psoc_ext_obj(psoc); + if (!mlme_obj) + return QDF_STATUS_E_FAILURE; + + *value = mlme_obj->cfg.sap_cfg.is_6g_sap_fd_enabled; + + return QDF_STATUS_SUCCESS; +} + QDF_STATUS wlan_mlme_get_sap_allow_all_channels(struct wlan_objmgr_psoc *psoc, bool *value) { diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 7f6daf516c62..b0f814126c2b 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/core/hdd/src/wlan_hdd_hostapd.c @@ -3368,6 +3368,7 @@ QDF_STATUS hdd_init_ap_mode(struct hdd_adapter *adapter, bool reinit) enum dfs_mode acs_dfs_mode; bool acs_with_more_param = 0; uint8_t enable_sifs_burst = 0; + bool is_6g_sap_fd_enabled = 0; hdd_enter(); @@ -3467,6 +3468,11 @@ QDF_STATUS hdd_init_ap_mode(struct hdd_adapter *adapter, bool reinit) adapter->dev->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM; adapter->dev->features |= NETIF_F_RXCSUM; + ucfg_mlme_is_6g_sap_fd_enabled(hdd_ctx->psoc, &is_6g_sap_fd_enabled); + hdd_debug("6g sap fd enabled %d", is_6g_sap_fd_enabled); + if (is_6g_sap_fd_enabled) + wlan_vdev_mlme_feat_ext_cap_set(adapter->vdev, + WLAN_VDEV_FEXT_FILS_DISC_6G_SAP); hdd_set_tso_flags(hdd_ctx, adapter->dev); if (!reinit) {