summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}