diff options
author | Sugnan Prabhu S <sugnan.prabhu.s@intel.com> | 2021-08-31 07:19:30 +0530 |
---|---|---|
committer | Tim Wawrzynczak <twawrzynczak@chromium.org> | 2021-09-02 22:55:00 +0000 |
commit | cc50770cd0eeab0794264f2e6bccdfa7c117f2b9 (patch) | |
tree | 3ea6a55912fc299a472a8d7c3f0cd19d7708209c /src/drivers/wifi/generic | |
parent | d1fc832c527699265c7d04517010cc4b0ea6aabd (diff) |
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 <sugnan.prabhu.s@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57061
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/drivers/wifi/generic')
-rw-r--r-- | src/drivers/wifi/generic/acpi.c | 53 |
1 files changed, 53 insertions, 0 deletions
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); } |