summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDeepak Dhamdhere <ddhamdhe@codeaurora.org>2016-05-25 20:36:47 -0700
committerNandini Suresh <snandini@codeaurora.org>2016-06-29 19:42:00 -0700
commit3385d7595e6f3f7b1f63d2e73d367336af01197b (patch)
tree38f68141a3b6dfd1655fc09f760da6cb6adac913
parent63f64ddbaf4be80d75c612527cb3320b75242f93 (diff)
qcacld-3.0: Add INI items to enable NAN datapath feature
Propagation from qcacld-2.0 to qcacld-3.0. Add .ini items to enable NAN datapath feature. It will be disabled by default. Name: genable_nan_datapath Minimum: 0 (disable) Maximum: 1 (enable) Default: 0 (disable) 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.c17
-rw-r--r--core/hdd/src/wlan_hdd_nan_datapath.c17
-rw-r--r--core/hdd/src/wlan_hdd_nan_datapath.h10
4 files changed, 68 insertions, 0 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index d9924984d4cf..aa35ba4d8671 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -3157,6 +3157,26 @@ enum dot11p_mode {
#define CFG_IGNORE_PEER_HT_MODE_MAX (1)
#define CFG_IGNORE_PEER_HT_MODE_DEFAULT (0)
+#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
+
/*
* Dense Roam Min APs
* minimum number of AP required for dense roam
@@ -4045,6 +4065,10 @@ struct hdd_config {
uint8_t adapt_dwell_lpf_weight;
uint8_t adapt_dwell_passive_mon_intval;
uint8_t adapt_dwell_wifi_act_threshold;
+#ifdef WLAN_FEATURE_NAN_DATAPATH
+ bool enable_nan_datapath;
+ uint8_t nan_datapath_ndi_channel;
+#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 6a8507b832c5..9577e2b43304 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -45,6 +45,7 @@
#include <wlan_hdd_misc.h>
#include <wlan_hdd_napi.h>
#include <cds_concurrency.h>
+#include "wlan_hdd_nan_datapath.h"
static void
cb_notify_set_roam_prefer5_g_hz(hdd_context_t *pHddCtx, unsigned long notifyId)
@@ -3919,6 +3920,21 @@ REG_TABLE_ENTRY g_registry_table[] = {
CFG_EDCA_BE_AIFS_VALUE_DEFAULT,
CFG_EDCA_BE_AIFS_VALUE_MIN,
CFG_EDCA_BE_AIFS_VALUE_MAX),
+#ifdef WLAN_FEATURE_NAN_DATAPATH
+ REG_VARIABLE(CFG_ENABLE_NAN_DATAPATH_NAME, WLAN_PARAM_Integer,
+ struct hdd_config, 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,
+ struct hdd_config, 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
REG_VARIABLE(CFG_ENABLE_DP_TRACE, WLAN_PARAM_Integer,
struct hdd_config, enable_dp_trace,
@@ -5657,6 +5673,7 @@ void hdd_cfg_print(hdd_context_t *pHddCtx)
hdd_info("Name = [%s] Value = [%u]",
CFG_ADAPT_DWELL_WIFI_THRESH_NAME,
pHddCtx->config->adapt_dwell_wifi_act_threshold);
+ hdd_ndp_print_ini_config(pHddCtx);
}
diff --git a/core/hdd/src/wlan_hdd_nan_datapath.c b/core/hdd/src/wlan_hdd_nan_datapath.c
index 3c955f33ae3e..dc97c4bad2ec 100644
--- a/core/hdd/src/wlan_hdd_nan_datapath.c
+++ b/core/hdd/src/wlan_hdd_nan_datapath.c
@@ -23,4 +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->config->enable_nan_datapath);
+ hddLog(LOG2, "Name = [%s] Value = [%u]",
+ CFG_ENABLE_NAN_NDI_CHANNEL_NAME,
+ hdd_ctx->config->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 */