summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSourav Mohapatra <mohapatr@codeaurora.org>2018-12-06 16:31:19 +0530
committernshrivas <nshrivas@codeaurora.org>2018-12-19 08:31:03 -0800
commitce2b17a2d55964ca3e815700970339f4c3e43ab9 (patch)
treedada29b856cd3a2209e6bc473dd27b3dd6485969
parente85b1249fbef0702806c04bf547a703fd40a72e6 (diff)
qcacld-3.0: Add support to enable/disable RTT feature
Define a new ini param to provide control over enabling and disabling support for RTT. In cases where the framework did not support RTT but firmware did, it resulted in failed test cases. prima -> qcacld-3.0 propagation Change-Id: I4fcc2370f758f80f00aaf04a4f23e24934d92f52 CRs-Fixed: 2364495
-rw-r--r--core/hdd/inc/wlan_hdd_cfg.h15
-rw-r--r--core/hdd/src/wlan_hdd_cfg.c7
-rw-r--r--core/hdd/src/wlan_hdd_cfg80211.c5
3 files changed, 25 insertions, 2 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h
index 7d8cfcc4d4a1..1d3c9f2430e3 100644
--- a/core/hdd/inc/wlan_hdd_cfg.h
+++ b/core/hdd/inc/wlan_hdd_cfg.h
@@ -3609,6 +3609,20 @@ enum hdd_dot11_mode {
#define CFG_FW_RSSI_MONITORING_DEFAULT (1)
/*
+ * gEnableRTTsupport
+ *
+ * @Min: 0 - Disabled
+ * @Max: 1 - Enabled
+ * @Default: 1 - Enabled
+ *
+ * The param is used to enable/disable support for RTT
+ */
+#define CFG_ENABLE_RTT_SUPPORT "gEnableRTTSupport"
+#define CFG_ENABLE_RTT_SUPPORT_DEFAULT (1)
+#define CFG_ENABLE_RTT_SUPPORT_MIN (0)
+#define CFG_ENABLE_RTT_SUPPORT_MAX (1)
+
+/*
* <ini>
* gFWMccRtsCtsProtection - RTS-CTS protection in MCC.
* @Min: 0
@@ -16136,6 +16150,7 @@ struct hdd_config {
bool roam_force_rssi_trigger;
uint32_t roam_preauth_retry_count;
uint32_t roam_preauth_no_ack_timeout;
+ uint32_t enable_rtt_support;
};
#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 d2ebcaf18a61..32878f57fe6e 100644
--- a/core/hdd/src/wlan_hdd_cfg.c
+++ b/core/hdd/src/wlan_hdd_cfg.c
@@ -3618,6 +3618,13 @@ struct reg_table_entry g_registry_table[] = {
CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_MIN,
CFG_ENABLE_NON_DFS_CHAN_ON_RADAR_MAX),
+ REG_VARIABLE(CFG_ENABLE_RTT_SUPPORT, WLAN_PARAM_Integer,
+ struct hdd_config, enable_rtt_support,
+ VAR_FLAGS_OPTIONAL,
+ CFG_ENABLE_RTT_SUPPORT_DEFAULT,
+ CFG_ENABLE_RTT_SUPPORT_MIN,
+ CFG_ENABLE_RTT_SUPPORT_MAX ),
+
REG_VARIABLE(CFG_P2P_LISTEN_DEFER_INTERVAL_NAME, WLAN_PARAM_Integer,
struct hdd_config, p2p_listen_defer_interval,
VAR_FLAGS_OPTIONAL |
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c
index 51688c5373cd..a4cadd4b5fd9 100644
--- a/core/hdd/src/wlan_hdd_cfg80211.c
+++ b/core/hdd/src/wlan_hdd_cfg80211.c
@@ -2145,8 +2145,9 @@ __wlan_hdd_cfg80211_get_supported_features(struct wiphy *wiphy,
hdd_debug("NAN is supported by firmware");
fset |= WIFI_FEATURE_NAN;
}
- if (sme_is_feature_supported_by_fw(RTT)) {
- hdd_debug("RTT is supported by firmware");
+ if (sme_is_feature_supported_by_fw(RTT) &&
+ pHddCtx->config->enable_rtt_support) {
+ hdd_debug("RTT is supported by firmware and framework");
fset |= WIFI_FEATURE_D2D_RTT;
fset |= WIFI_FEATURE_D2AP_RTT;
}