summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwadesong <wadesong@codeaurora.org>2020-05-27 11:27:10 +0800
committerwadesong <wadesong@codeaurora.org>2020-06-03 11:55:52 +0800
commitc0d514cb81bb7d2b904022a4f48b43934dd280ac (patch)
tree8b4fc8a764832fc0a515c8ff2cbeb78cceb05609
parent0ed8c5897189bb1351c1274f1e909c5b36b91d5c (diff)
qcacld-3.0: Introduce ini parameter for SAE support on SAP
Define ini parameter enable_sae_for_sap to enable SAE support on SAP. It's enabled by default. Change-Id: I94f099862ad04e0c9f5155ad9dd7165241540c45 CRs-Fixed: 2695414
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h26
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c20
2 files changed, 44 insertions, 2 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 29cbd5a83397..6a75c30e4610 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.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
@@ -13481,6 +13481,29 @@ enum hw_filter_mode {
/*
* <ini>
+ * enable_sae_for_sap - Enable/Disable SAE support in driver for SAP
+ * @Min: 0
+ * @Max: 1
+ * @Default: 1
+ *
+ * This ini is used to enable/disable SAE support in driver for SAP mode
+ * Driver will process/drop the SAE authentication frames based on this config.
+ *
+ * Related: None
+ *
+ * Supported Feature: SAE
+ * Usage: External
+ *
+ * </ini>
+ */
+
+#define CFG_ENABLE_SAE_FOR_SAP_NAME "enable_sae_for_sap"
+#define CFG_ENABLE_SAE_FOR_SAP_DEFAULT (1)
+#define CFG_ENABLE_SAE_FOR_SAP_MIN (0)
+#define CFG_ENABLE_SAE_FOR_SAP_MAX (1)
+
+/*
+ * <ini>
* chan_width_weightage - Channel Width Weightage to calculate best candidate
* @Min: 0
* @Max: 100
@@ -16490,6 +16513,7 @@ struct hdd_config {
uint8_t enable_tx_sch_delay;
#ifdef WLAN_FEATURE_SAE
bool is_sae_enabled;
+ bool enable_sae_for_sap;
#endif
bool enable_rtt_mac_randomization;
bool enable_ftopen;
diff --git a/core/hdd/src/wlan_hdd_cfg.c b/core/hdd/src/wlan_hdd_cfg.c
index c47987d70367..185d5e62555f 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -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
@@ -5625,6 +5625,12 @@ struct reg_table_entry g_registry_table[] = {
CFG_IS_SAE_ENABLED_DEFAULT,
CFG_IS_SAE_ENABLED_MIN,
CFG_IS_SAE_ENABLED_MAX),
+ REG_VARIABLE(CFG_ENABLE_SAE_FOR_SAP_NAME, WLAN_PARAM_Integer,
+ struct hdd_config, enable_sae_for_sap,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ENABLE_SAE_FOR_SAP_DEFAULT,
+ CFG_ENABLE_SAE_FOR_SAP_MIN,
+ CFG_ENABLE_SAE_FOR_SAP_MAX),
#endif
REG_VARIABLE(CFG_BTM_SOLICITED_TIMEOUT, WLAN_PARAM_Integer,
@@ -6795,10 +6801,21 @@ static void hdd_cfg_print_sae(hdd_context_t *hdd_ctx)
CFG_IS_SAE_ENABLED_NAME,
hdd_ctx->config->is_sae_enabled);
}
+
+static void hdd_cfg_print_sae_sap(hdd_context_t *hdd_ctx)
+{
+ hdd_debug("Name = [%s] value = [%u]",
+ CFG_ENABLE_SAE_FOR_SAP_NAME,
+ hdd_ctx->config->enable_sae_for_sap);
+}
#else
static void hdd_cfg_print_sae(hdd_context_t *hdd_ctx)
{
}
+
+static void hdd_cfg_print_sae_sap(hdd_context_t *hdd_ctx)
+{
+}
#endif
#ifdef MWS_COEX
@@ -7895,6 +7912,7 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
CFG_CHANNEL_SELECT_LOGIC_CONC_NAME,
pHddCtx->config->channel_select_logic_conc);
hdd_cfg_print_sae(pHddCtx);
+ hdd_cfg_print_sae_sap(pHddCtx);
hdd_debug("Name = [%s] value = [0x%x]",
CFG_ENABLE_UNIT_TEST_FRAMEWORK_NAME,
pHddCtx->config->is_unit_test_framework_enabled);