From 1e20bcc70c0de4389ae31deee03c6c1cfb295997 Mon Sep 17 00:00:00 2001 From: Ashish Kumar Dhanotiya Date: Fri, 15 Jun 2018 11:28:51 +0530 Subject: [PATCH] qcacld-3.0: Vendor command support to enable/disable GTX Add vendor command support to enable or disable GTX. Currently there is no vendor attribute to enable/disable GTX from vendor command. Add vendor attribute QCA_WLAN_VENDOR_ATTR_CONFIG_GTX support through QCA_NL80211_VENDOR_SUBCMD_SET_WIFI_CONFIGURATION vendor command and with new wmi command WMI_VDEV_PARAM_GTX_ENABLE. Change-Id: I8a740f9209ffd5f6438c3cfdd830ee2a76d0aa52 CRs-Fixed: 2253655 --- core/hdd/src/wlan_hdd_cfg80211.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index f356981f84..85ab99a417 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -6262,6 +6262,7 @@ wlan_hdd_wifi_config_policy[QCA_WLAN_VENDOR_ATTR_CONFIG_MAX + 1] = { [QCA_WLAN_VENDOR_ATTR_CONFIG_TOTAL_BEACON_MISS_COUNT] = {.type = NLA_U8}, [QCA_WLAN_VENDOR_ATTR_CONFIG_SCAN_ENABLE] = {.type = NLA_U8 }, [QCA_WLAN_VENDOR_ATTR_CONFIG_RSN_IE] = {.type = NLA_U8}, + [QCA_WLAN_VENDOR_ATTR_CONFIG_GTX] = {.type = NLA_U8}, }; static const struct nla_policy @@ -7218,6 +7219,21 @@ __wlan_hdd_cfg80211_wifi_configuration_set(struct wiphy *wiphy, hdd_ctx->force_rsne_override); } + if (tb[QCA_WLAN_VENDOR_ATTR_CONFIG_GTX]) { + uint8_t config_gtx; + + config_gtx = nla_get_u8(tb[QCA_WLAN_VENDOR_ATTR_CONFIG_GTX]); + if (config_gtx > 1) { + hdd_err_rl("Invalid config_gtx value %d", config_gtx); + return -EINVAL; + } + ret_val = sme_cli_set_command(adapter->session_id, + WMI_VDEV_PARAM_GTX_ENABLE, + config_gtx, VDEV_CMD); + if (ret_val) + hdd_err("Failed to set GTX"); + } + return ret_val; }