diff options
| author | Padma, Santhosh Kumar <skpadma@codeaurora.org> | 2018-03-06 18:08:29 +0530 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-03-23 08:59:55 -0700 |
| commit | 1df489a10c728ab659ba77d1d71a6abc83e90fb1 (patch) | |
| tree | ee0b817908927feead3bfd320bc4f46e77eb8439 | |
| parent | 02613c84bca8a6dc2f2f8ec40dea8c0b07cde736 (diff) | |
qcacld-3.0: Add SAE related ini and cap exchange changes
Add ini changes related to SAE and also changes related
to capability exchange with supplicant.
Change-Id: I8deaa124fe0c604e8777c4bffa064a2d8173661b
CRs-Fixed: 2029357
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 26 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg.c | 23 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 26 |
3 files changed, 75 insertions, 0 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 283bd5a40575..8e516c1a9631 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -12836,6 +12836,29 @@ enum hw_filter_mode { /* * <ini> + * sae_enabled - Enable/Disable SAE support in driver + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * This ini is used to enable/disable SAE support in driver + * Driver will update config to supplicant based on this config. + * + * Related: None + * + * Supported Feature: SAE + * Usage: External + * + * </ini> + */ + +#define CFG_IS_SAE_ENABLED_NAME "sae_enabled" +#define CFG_IS_SAE_ENABLED_DEFAULT (0) +#define CFG_IS_SAE_ENABLED_MIN (0) +#define CFG_IS_SAE_ENABLED_MAX (1) + +/* + * <ini> * chan_width_weightage - Channel Width Weightage to calculate best candidate * @Min: 0 * @Max: 100 @@ -15189,6 +15212,9 @@ struct hdd_config { uint32_t neighbor_report_offload_max_req_cap; uint32_t channel_select_logic_conc; bool enable_dtim_selection_diversity; +#ifdef WLAN_FEATURE_SAE + bool is_sae_enabled; +#endif }; #define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var)) diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c index 83fdac8cdc87..6e3450d3323b 100644 --- a/core/hdd/src/wlan_hdd_cfg.c +++ b/core/hdd/src/wlan_hdd_cfg.c @@ -5537,6 +5537,15 @@ struct reg_table_entry g_registry_table[] = { CFG_DTIM_SELECTION_DIVERSITY_DEFAULT, CFG_DTIM_SELECTION_DIVERSITY_MIN, CFG_DTIM_SELECTION_DIVERSITY_MAX), + +#ifdef WLAN_FEATURE_SAE + REG_VARIABLE(CFG_IS_SAE_ENABLED_NAME, WLAN_PARAM_Integer, + struct hdd_config, is_sae_enabled, + VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT, + CFG_IS_SAE_ENABLED_DEFAULT, + CFG_IS_SAE_ENABLED_MIN, + CFG_IS_SAE_ENABLED_MAX), +#endif }; /** @@ -6472,6 +6481,19 @@ void hdd_cfg_print_11k_offload_params(hdd_context_t *hdd_ctx) hdd_ctx->config->neighbor_report_offload_max_req_cap); } +#ifdef WLAN_FEATURE_SAE +static void hdd_cfg_print_sae(hdd_context_t *hdd_ctx) +{ + hdd_debug("Name = [%s] value = [%u]", + CFG_IS_SAE_ENABLED_NAME, + hdd_ctx->config->is_sae_enabled); +} +#else +static void hdd_cfg_print_sae(hdd_context_t *hdd_ctx) +{ +} +#endif + /** * hdd_cfg_print() - print the hdd configuration * @iniTable: pointer to hdd context @@ -7412,6 +7434,7 @@ void hdd_cfg_print(hdd_context_t *pHddCtx) hdd_debug("Name = [%s] value = [0x%x]", CFG_CHANNEL_SELECT_LOGIC_CONC_NAME, pHddCtx->config->channel_select_logic_conc); + hdd_cfg_print_sae(pHddCtx); } /** diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index ea5795356eea..02d1e716aff7 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -13368,6 +13368,30 @@ static void wlan_hdd_cfg80211_set_wiphy_scan_flags(struct wiphy *wiphy) { } #endif + +#ifdef WLAN_FEATURE_SAE +/** + * wlan_hdd_cfg80211_set_wiphy_sae_feature() - Indicates support of SAE feature + * @wiphy: Pointer to wiphy + * @config: pointer to config + * + * This function is used to indicate the support of SAE + * + * Return: None + */ +static void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy, + struct hdd_config *config) +{ + if (config->is_sae_enabled) + wiphy->features |= NL80211_FEATURE_SAE; +} +#else +static void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy, + struct hdd_config *config) +{ +} +#endif + /* * FUNCTION: wlan_hdd_cfg80211_init * This function is called by hdd_wlan_startup() @@ -13434,6 +13458,8 @@ int wlan_hdd_cfg80211_init(struct device *dev, if (pCfg->is_fils_enabled) wlan_hdd_cfg80211_set_wiphy_fils_feature(wiphy); + wlan_hdd_cfg80211_set_wiphy_sae_feature(wiphy, pCfg); + wlan_hdd_cfg80211_set_wiphy_scan_flags(wiphy); hdd_config_sched_scan_plans_to_wiphy(wiphy, pCfg); |
