qcacld-3.0: Add ini support to control 6G SAP fils disc

6Ghz SAP needs to send either a probe response or fils
discovery at every 20ms.

Add a new ini to configure the probe response or
fils discovery frame.

enable_6g_sap_fils_discovery=1 sends fils discovery frame
at every 20ms.
enable_6g_sap_fils_discovery=0 sends probe response frame
at every 20ms

Change-Id: I6c5fb339135cf11be071d73970ea3704441380eb
CRs-Fixed: 2586524
This commit is contained in:
Sandeep Puligilla
2019-12-20 17:03:50 -08:00
committed by nshrivas
orang tua 4558769a68
melakukan 511c6e2402
7 mengubah file dengan 84 tambahan dan 6 penghapusan

Melihat File

@@ -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,

Melihat File

@@ -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 */
/*
*
* <ini>
* 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
*
* </ini>
*/
#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 */

Melihat File

@@ -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

Melihat File

@@ -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;
};
/**

Melihat File

@@ -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

Melihat File

@@ -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)
{

Melihat File

@@ -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) {