From cc50770cd0eeab0794264f2e6bccdfa7c117f2b9 Mon Sep 17 00:00:00 2001 From: Sugnan Prabhu S Date: Tue, 31 Aug 2021 07:19:30 +0530 Subject: wifi: Add support for wifi time average SAR config Add support for the WTAS ACPI BIOS configuration table as per the connectivity document: 559910_Intel_Connectivity_Platforms_BIOS_Guidelines_Rev6_4.pdf BUG=b:193665559 TEST=Generated SAR file with the WTAS related configuration values and verified that the SSDT has the WTAS ACPI table. Change-Id: I42cf3cba7974e6db0e05de30846ef103a15fd584 Signed-off-by: Sugnan Prabhu S Reviewed-on: https://review.coreboot.org/c/coreboot/+/57061 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/drivers/wifi/generic/acpi.c | 53 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'src/drivers/wifi/generic') diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c index ed5b632216..5636abca68 100644 --- a/src/drivers/wifi/generic/acpi.c +++ b/src/drivers/wifi/generic/acpi.c @@ -267,6 +267,58 @@ static void sar_emit_ppag(struct gain_profile *ppag) acpigen_write_package_end(); } +static void sar_emit_wtas(struct avg_profile *wtas) +{ + int i; + size_t package_size; + + if (wtas == NULL) + return; + + /* + * Name (WTAS, Package() { + * { + * Revision, + * Package() + * { + * DomainType, // 0x7:WiFi + * WifiTASSelection, // Enable/Disable the TAS feature + * WifiTASListEntries, // No. of blocked countries not approved by OEM to + * BlockedListEntry1, support this feature + * BlockedListEntry2, + * BlockedListEntry3, + * BlockedListEntry4, + * BlockedListEntry5, + * BlockedListEntry6, + * BlockedListEntry7, + * BlockedListEntry8, + * BlockedListEntry9, + * BlockedListEntry10, + * BlockedListEntry11, + * BlockedListEntry12, + * BlockedListEntry13, + * BlockedListEntry14, + * BlockedListEntry15, + * BlockedListEntry16, + * } + * }) + */ + package_size = 1 + 1 + 1 + MAX_DENYLIST_ENTRY; + + acpigen_write_name("WTAS"); + acpigen_write_package(2); + acpigen_write_dword(wtas->revision); + acpigen_write_package(package_size); + acpigen_write_dword(DOMAIN_TYPE_WIFI); + acpigen_write_dword(wtas->tas_selection); + acpigen_write_dword(wtas->tas_list_size); + for (i = 0; i < MAX_DENYLIST_ENTRY; i++) + acpigen_write_byte(wtas->deny_list_entry[i]); + + acpigen_write_package_end(); + acpigen_write_package_end(); +} + static void emit_sar_acpi_structures(const struct device *dev) { union wifi_sar_limits sar_limits; @@ -288,6 +340,7 @@ static void emit_sar_acpi_structures(const struct device *dev) sar_emit_ewrd(sar_limits.sar); sar_emit_wgds(sar_limits.wgds); sar_emit_ppag(sar_limits.ppag); + sar_emit_wtas(sar_limits.wtas); free(sar_limits.sar); } -- cgit v1.2.3