diff options
| author | Ashish Kumar Dhanotiya <adhanoti@codeaurora.org> | 2018-05-29 18:46:26 +0530 |
|---|---|---|
| committer | nshrivas <nshrivas@codeaurora.org> | 2018-06-18 05:18:39 -0700 |
| commit | 98766d9d1612d2896e15f3392a1606b282997238 (patch) | |
| tree | 877d65b407e627a46a9820fbdfbca814208995ef | |
| parent | 7742901706cb6265dcbec7640aeb690110765bb4 (diff) | |
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
| -rw-r--r-- | core/hdd/src/wlan_hdd_cfg80211.c | 23 | ||||
| -rw-r--r-- | uapi/linux/qca_vendor.h | 6 |
2 files changed, 29 insertions, 0 deletions
diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 21ec853d6752..26fbb51ba951 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -169,6 +169,11 @@ */ #define WLAN_DEAUTH_DPTRACE_DUMP_COUNT 100 +/* + * Count to ratelimit the HDD logs during NL parsing + */ +#define HDD_NL_ERR_RATE_LIMIT 5 + static const u32 hdd_gcmp_cipher_suits[] = { WLAN_CIPHER_SUITE_GCMP, WLAN_CIPHER_SUITE_GCMP_256, @@ -5488,6 +5493,7 @@ wlan_hdd_wifi_config_policy[QCA_WLAN_VENDOR_ATTR_CONFIG_MAX + 1] = { .type = NLA_U8}, [QCA_WLAN_VENDOR_ATTR_CONFIG_LATENCY_LEVEL] = {.type = NLA_U16 }, [QCA_WLAN_VENDOR_ATTR_CONFIG_RSN_IE] = {.type = NLA_U8}, + [QCA_WLAN_VENDOR_ATTR_CONFIG_GTX] = {.type = NLA_U8}, }; /** @@ -6287,6 +6293,23 @@ __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_ratelimited(HDD_NL_ERR_RATE_LIMIT, + "Invalid config_gtx value %d", + config_gtx); + return -EINVAL; + } + ret_val = sme_cli_set_command(adapter->sessionId, + WMI_VDEV_PARAM_GTX_ENABLE, + config_gtx, VDEV_CMD); + if (ret_val) + hdd_err("Failed to set GTX"); + } + return ret_val; } diff --git a/uapi/linux/qca_vendor.h b/uapi/linux/qca_vendor.h index 6b167af35420..27c6f465accd 100644 --- a/uapi/linux/qca_vendor.h +++ b/uapi/linux/qca_vendor.h @@ -3338,6 +3338,12 @@ enum qca_wlan_vendor_attr_config { */ QCA_WLAN_VENDOR_ATTR_CONFIG_RSN_IE = 56, + /* + * 8-bit unsigned value to trigger green Tx power saving. + * 1-Enable, 0-Disable + */ + QCA_WLAN_VENDOR_ATTR_CONFIG_GTX = 57, + QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_CONFIG_MAX = QCA_WLAN_VENDOR_ATTR_CONFIG_AFTER_LAST - 1, |
