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.

Change-Id: I4fcc2370f758f80f00aaf04a4f23e24934d92f52
CRs-Fixed: 2364495
This commit is contained in:
Sourav Mohapatra
2018-12-11 09:39:33 +05:30
zatwierdzone przez nshrivas
rodzic fec6d6c8c4
commit 9e014cf171
4 zmienionych plików z 20 dodań i 2 usunięć

Wyświetl plik

@@ -1036,6 +1036,20 @@ enum hdd_wext_control {
/* End of action oui inis */
/*
* 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 CFG_INI_BOOL( \
"gEnableRTTSupport", \
1, \
"The param is used to enable/disable support for RTT")
#define CFG_HDD_ALL \
CFG_ENABLE_PACKET_LOG_ALL \
CFG_ENABLE_RUNTIME_PM_ALL \
@@ -1058,6 +1072,7 @@ enum hdd_wext_control {
CFG(CFG_ENABLE_FW_UART_PRINT) \
CFG(CFG_ENABLE_MAC_PROVISION) \
CFG(CFG_ENABLE_RAMDUMP_COLLECTION) \
CFG(CFG_ENABLE_RTT_SUPPORT) \
CFG(CFG_INTERFACE_CHANGE_WAIT) \
CFG(CFG_INFORM_BSS_RSSI_RAW) \
CFG(CFG_MULTICAST_HOST_FW_MSGS) \

Wyświetl plik

@@ -1501,6 +1501,7 @@ struct hdd_config {
bool mac_provision;
uint32_t provisioned_intf_pool;
uint32_t derived_intf_pool;
uint8_t enable_rtt_support;
};
#define VAR_OFFSET(_Struct, _Var) (offsetof(_Struct, _Var))

Wyświetl plik

@@ -3171,8 +3171,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) &&
hdd_ctx->config->enable_rtt_support) {
hdd_debug("RTT is supported by firmware and framework");
fset |= WIFI_FEATURE_D2D_RTT;
fset |= WIFI_FEATURE_D2AP_RTT;
}

Wyświetl plik

@@ -9386,6 +9386,7 @@ static void hdd_cfg_params_init(struct hdd_context *hdd_ctx)
cfg_get(psoc,
CFG_ACTION_OUI_DISABLE_AGGRESSIVE_TX),
ACTION_OUI_MAX_STR_LEN);
config->enable_rtt_support = cfg_get(psoc, CFG_ENABLE_RTT_SUPPORT);
hdd_init_vc_mode_cfg_bitmap(config, psoc);
hdd_init_runtime_pm(config, psoc);