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
This commit is contained in:
Padma, Santhosh Kumar 2017-09-01 20:15:27 +05:30 • committed by snandini
commit 3e47c63ff2
3 changed files with 74 additions and 0 deletions

View file

@ -12736,6 +12736,29 @@ enum hdd_external_acs_freq_band {
#define CFG_PHY_REG_MIN (0x0)
#define CFG_PHY_REG_MAX (0x2)
/*
* <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)
/*
* Type declarations
*/
@ -14916,6 +14939,9 @@ struct hdd_config {
uint8_t tx_chain_mask_5g;
uint8_t rx_chain_mask_5g;
uint32_t btm_offload_config;
#ifdef WLAN_FEATURE_SAE
bool is_sae_enabled;
#endif
};
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

View file

@ -5416,6 +5416,15 @@ struct reg_table_entry g_registry_table[] = {
CFG_BTM_ENABLE_DEFAULT,
CFG_BTM_ENABLE_MIN,
CFG_BTM_ENABLE_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
};
@ -6316,6 +6325,19 @@ static void hdd_wlm_cfg_log(struct hdd_context *hdd_ctx)
hdd_ctx->config->wlm_latency_flags_ultralow);
}
#ifdef WLAN_FEATURE_SAE
static void hdd_cfg_print_sae(struct hdd_context *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(struct hdd_context *hdd_ctx)
{
}
#endif
/**
* hdd_cfg_print() - print the hdd configuration
* @iniTable: pointer to hdd context
@ -7247,6 +7269,7 @@ void hdd_cfg_print(struct hdd_context *hdd_ctx)
hdd_ctx->config->enable_phy_reg_retention);
hdd_debug("Name = [btm_offload_config] value = [0x%x]",
hdd_ctx->config->btm_offload_config);
hdd_cfg_print_sae(hdd_ctx);
}

View file

@ -13753,6 +13753,29 @@ static void wlan_hdd_cfg80211_set_wiphy_fils_feature(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()
@ -13810,6 +13833,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);
hdd_config_sched_scan_plans_to_wiphy(wiphy, pCfg);
wlan_hdd_cfg80211_add_connected_pno_support(wiphy);