소스 검색

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
Ashish Kumar Dhanotiya 6 년 전
부모
커밋
1e20bcc70c
1개의 변경된 파일16개의 추가작업 그리고 0개의 파일을 삭제
  1. 16 0
      core/hdd/src/wlan_hdd_cfg80211.c

+ 16 - 0
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;
 }