Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97821071 authored by Abhinav Kumar's avatar Abhinav Kumar
Browse files

wlan: Add SAE related ini and cap exchange changes

propagation from qcacld-3.0 to prima

Add ini changes related to SAE and also changes related
to capability exchange with supplicant.

Change-Id: I8deaa124fe0c604e8777c4bffa064a2d8173661b
CRs-Fixed: 2530375
parent 4d44f639
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -3271,6 +3271,29 @@ This feature requires the dependent cfg.ini "gRoamPrefer5GHz" set to 1 */
#define CFG_ENABLE_DEFAULT_SAP           "gEnabledefaultSAP"
#define CFG_ENABLE_DEFAULT_SAP_DEFAULT   ""

/*
 * <ini>
 * sae_enabled - Enable/Disable SAE support in driver
 * @Min: 0
 * @Max: 1
 * @Default: 1
 *
 * 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 (1)
#define CFG_IS_SAE_ENABLED_MIN     (0)
#define CFG_IS_SAE_ENABLED_MAX     (1)

/*--------------------------------------------------------------------------- 
  Type declarations
  -------------------------------------------------------------------------*/ 
@@ -3888,6 +3911,9 @@ typedef struct
   bool                        indoor_channel_support;
   bool                        force_rsne_override;
   char enabledefaultSAP[CFG_CONCURRENT_IFACE_MAX_LEN];
#ifdef WLAN_FEATURE_SAE
   bool                        is_sae_enabled;
#endif
} hdd_config_t;

/*--------------------------------------------------------------------------- 
+20 −0
Original line number Diff line number Diff line
@@ -4040,6 +4040,14 @@ REG_VARIABLE( CFG_EXTSCAN_ENABLE, WLAN_PARAM_Integer,
                      VAR_FLAGS_NONE,
                      (void *)CFG_ENABLE_DEFAULT_SAP_DEFAULT),

#ifdef WLAN_FEATURE_SAE
  REG_VARIABLE(CFG_IS_SAE_ENABLED_NAME, WLAN_PARAM_Integer,
               hdd_config_t, 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
};

/*
@@ -4256,6 +4264,17 @@ VOS_STATUS hdd_parse_config_ini(hdd_context_t* pHddCtx)
   return vos_status;
}

#ifdef WLAN_FEATURE_SAE
static void hdd_cfg_print_sae(hdd_context_t *hdd_ctx)
{
   hddLog(LOG2, "Name = [%s] value = [%u]", CFG_IS_SAE_ENABLED_NAME,
          hdd_ctx->cfg_ini->is_sae_enabled);
}
#else
static void hdd_cfg_print_sae(hdd_context_t *hdd_ctx)
{
}
#endif

static void print_hdd_cfg(hdd_context_t *pHddCtx)
{
@@ -4717,6 +4736,7 @@ static void print_hdd_cfg(hdd_context_t *pHddCtx)
            "Name = [%s] Value = [%s] ",
            CFG_ENABLE_DEFAULT_SAP,
            pHddCtx->cfg_ini->enabledefaultSAP);
    hdd_cfg_print_sae(pHddCtx);
}


+26 −0
Original line number Diff line number Diff line
@@ -9140,6 +9140,31 @@ void wlan_hdd_cfg80211_scan_randomization_init(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,
                                             hdd_config_t *config)
{
    if (config->is_sae_enabled)
             wiphy->features |= NL80211_FEATURE_SAE;
}
#else
static
void wlan_hdd_cfg80211_set_wiphy_sae_feature(struct wiphy *wiphy,
                                             hdd_config_t *config)
{
}
#endif
/*
 * FUNCTION: wlan_hdd_cfg80211_init
 * This function is called by hdd_wlan_startup()
@@ -9379,6 +9404,7 @@ int wlan_hdd_cfg80211_init(struct device *dev,
    wiphy->n_vendor_events = ARRAY_SIZE(wlan_hdd_cfg80211_vendor_events);
    hdd_config_sched_scan_plans_to_wiphy(wiphy, pCfg);
    wlan_hdd_cfg80211_set_wiphy_sae_feature(wiphy, pCfg);
    EXIT();
    return 0;