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/vendorcode/google/chromeos/sar.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/vendorcode/google') diff --git a/src/vendorcode/google/chromeos/sar.c b/src/vendorcode/google/chromeos/sar.c index 5c16f7606b61..7b84d1ad5583 100644 --- a/src/vendorcode/google/chromeos/sar.c +++ b/src/vendorcode/google/chromeos/sar.c @@ -76,6 +76,14 @@ static int gain_table_size(const struct gain_profile *gain) return sizeof(struct gain_profile) + (gain->chains_count * gain->bands_count); } +static int sar_avg_table_size(const struct avg_profile *sar_avg) +{ + if (sar_avg == NULL) + return 0; + + return sizeof(struct avg_profile); +} + static bool valid_legacy_length(size_t bin_len) { if (bin_len == LEGACY_SAR_WGDS_BIN_SIZE) @@ -125,6 +133,7 @@ static int fill_wifi_sar_limits(union wifi_sar_limits *sar_limits, const uint8_t expected_sar_bin_size += sar_table_size(sar_limits->sar); expected_sar_bin_size += wgds_table_size(sar_limits->wgds); expected_sar_bin_size += gain_table_size(sar_limits->ppag); + expected_sar_bin_size += sar_avg_table_size(sar_limits->wtas); if (sar_bin_size != expected_sar_bin_size) { printk(BIOS_ERR, "ERROR: Invalid SAR size, expected: %ld, obtained: %ld\n", @@ -188,6 +197,7 @@ static int fill_wifi_sar_limits_legacy(union wifi_sar_limits *sar_limits, * [SAR_REVISION,DSAR_SET_COUNT,CHAINS_COUNT,SUBBANDS_COUNT [EWRD]] * [WGDS_REVISION,CHAINS_COUNT,SUBBANDS_COUNT] * [PPAG_REVISION,MODE,CHAINS_COUNT,SUBBANDS_COUNT] + * [WTAS_REVISION, WTAS_DATA] * * The configuration data will always have the revision added in the file for each of the * block, based on the revision number and validity, size of the specific block will be @@ -222,6 +232,11 @@ static int fill_wifi_sar_limits_legacy(union wifi_sar_limits *sar_limits, * [Antenna gain used for 6525-6705MHz frequency] * [Antenna gain used for 6705-6865MHz frequency] * [Antenna gain used for 6865-7105MHz frequency] + * + * [WTAS_DATA] = + * [Enable/disable the TAS feature] + * [Number of blocked countries that are not approved by the OEM to support this feature] + * [deny_list_entry_<1-16>: ISO country code to block] */ int get_wifi_sar_limits(union wifi_sar_limits *sar_limits) { -- cgit v1.2.3