summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRavi Joshi <ravij@qca.qualcomm.com>2016-01-22 12:01:52 -0800
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-03-09 18:09:22 +0530
commit61eda9861a0545d9fc61317e8e2282e1eb75d95a (patch)
tree9a86cfb4a270c736010b25eb6e7198e58d1c94ef
parent3f57f48d736993c92fd254fd90e10a03a311a68e (diff)
qcacld-2.0: Add an INI item to enable NaN data path feature
Add an INI item to enable NAN data path feature. NAN data path feature will be disabled by default. CRs-Fixed: 962367 Change-Id: I304fcc70c0e83d890ae95d2d4ff1b7ce691374e2
-rw-r--r--CORE/HDD/inc/wlan_hdd_cfg.h24
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg.c16
-rw-r--r--CORE/HDD/src/wlan_hdd_nan_datapath.c16
-rw-r--r--CORE/HDD/src/wlan_hdd_nan_datapath.h10
4 files changed, 66 insertions, 0 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 46b4d091e97e..bb7af35bcbff 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -3567,6 +3567,26 @@ enum dot11p_mode {
#define CFG_SAP_TX_LEAKAGE_THRESHOLD_MAX (1000)
#define CFG_SAP_TX_LEAKAGE_THRESHOLD_DEFAULT (310)
+#ifdef WLAN_FEATURE_NAN_DATAPATH
+/*
+ * Enable NaN data path feature. NaN data path enables
+ * NaN supported devices to exchange data over traditional
+ * TCP/UDP network stack.
+ */
+#define CFG_ENABLE_NAN_DATAPATH_NAME "genable_nan_datapath"
+#define CFG_ENABLE_NAN_DATAPATH_MIN (0)
+#define CFG_ENABLE_NAN_DATAPATH_MAX (1)
+#define CFG_ENABLE_NAN_DATAPATH_DEFAULT (0)
+
+/*
+ * NAN channel on which NAN data interface to start
+ */
+#define CFG_ENABLE_NAN_NDI_CHANNEL_NAME "gnan_datapath_ndi_channel"
+#define CFG_ENABLE_NAN_NDI_CHANNEL_MIN (6)
+#define CFG_ENABLE_NAN_NDI_CHANNEL_MAX (149)
+#define CFG_ENABLE_NAN_NDI_CHANNEL_DEFAULT (6)
+#endif
+
/*---------------------------------------------------------------------------
Type declarations
-------------------------------------------------------------------------*/
@@ -4284,6 +4304,10 @@ struct hdd_config {
bool ignore_peer_ht_opmode;
bool mib_stats_enabled;
bool enable_fatal_event;
+#ifdef WLAN_FEATURE_NAN_DATAPATH
+ bool enable_nan_datapath;
+ uint8_t nan_datapath_ndi_channel;
+#endif
};
typedef struct hdd_config hdd_config_t;
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 9305b2dea214..633d79b8c55d 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -59,6 +59,7 @@
#include <csrApi.h>
#include <pmcApi.h>
#include <wlan_hdd_misc.h>
+#include "wlan_hdd_nan_datapath.h"
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
static void
@@ -4334,7 +4335,21 @@ REG_TABLE_ENTRY g_registry_table[] =
CFG_IGNORE_PEER_HT_MODE_DEFAULT,
CFG_IGNORE_PEER_HT_MODE_MIN,
CFG_IGNORE_PEER_HT_MODE_MAX),
+#ifdef WLAN_FEATURE_NAN_DATAPATH
+ REG_VARIABLE(CFG_ENABLE_NAN_DATAPATH_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, enable_nan_datapath,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ENABLE_NAN_DATAPATH_DEFAULT,
+ CFG_ENABLE_NAN_DATAPATH_MIN,
+ CFG_ENABLE_NAN_DATAPATH_MAX),
+ REG_VARIABLE(CFG_ENABLE_NAN_NDI_CHANNEL_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, nan_datapath_ndi_channel,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ENABLE_NAN_NDI_CHANNEL_DEFAULT,
+ CFG_ENABLE_NAN_NDI_CHANNEL_MIN,
+ CFG_ENABLE_NAN_NDI_CHANNEL_MAX),
+#endif
};
@@ -5093,6 +5108,7 @@ void print_hdd_cfg(hdd_context_t *pHddCtx)
hddLog(LOG2, "Name = [gIdleTimeConc] Value = [%u]",
pHddCtx->cfg_ini->idle_time_conc);
+ hdd_ndp_print_ini_config(pHddCtx);
}
#define CFG_VALUE_MAX_LEN 256
diff --git a/CORE/HDD/src/wlan_hdd_nan_datapath.c b/CORE/HDD/src/wlan_hdd_nan_datapath.c
index 254047eae516..4b2e5426404e 100644
--- a/CORE/HDD/src/wlan_hdd_nan_datapath.c
+++ b/CORE/HDD/src/wlan_hdd_nan_datapath.c
@@ -23,5 +23,21 @@
*
* WLAN Host Device Driver nan datapath API implementation
*/
+#include "wlan_hdd_includes.h"
#include "wlan_hdd_nan_datapath.h"
+/**
+ * hdd_ndp_print_ini_config()- Print nan datapath specific INI configuration
+ * @hdd_ctx: handle to hdd context
+ *
+ * Return: None
+ */
+void hdd_ndp_print_ini_config(hdd_context_t *hdd_ctx)
+{
+ hddLog(LOG2, "Name = [%s] Value = [%u]",
+ CFG_ENABLE_NAN_DATAPATH_NAME,
+ hdd_ctx->cfg_ini->enable_nan_datapath);
+ hddLog(LOG2, "Name = [%s] Value = [%u]",
+ CFG_ENABLE_NAN_NDI_CHANNEL_NAME,
+ hdd_ctx->cfg_ini->nan_datapath_ndi_channel);
+}
diff --git a/CORE/HDD/src/wlan_hdd_nan_datapath.h b/CORE/HDD/src/wlan_hdd_nan_datapath.h
index c9295cb2577a..82427da309ba 100644
--- a/CORE/HDD/src/wlan_hdd_nan_datapath.h
+++ b/CORE/HDD/src/wlan_hdd_nan_datapath.h
@@ -27,5 +27,15 @@
#ifndef __WLAN_HDD_NAN_DATAPATH_H
#define __WLAN_HDD_NAN_DATAPATH_H
+struct hdd_context_s;
+
+#ifdef WLAN_FEATURE_NAN_DATAPATH
+void hdd_ndp_print_ini_config(struct hdd_context_s *hdd_ctx);
+#else
+static inline void hdd_ndp_print_ini_config(struct hdd_context_s *hdd_ctx)
+{
+}
+#endif /* WLAN_FEATURE_NAN_DATAPATH */
+
#endif /* __WLAN_HDD_NAN_DATAPATH_H */