summaryrefslogtreecommitdiff
path: root/src/vendorcode/google
diff options
context:
space:
mode:
authorSugnan Prabhu S <sugnan.prabhu.s@intel.com>2021-08-31 07:19:30 +0530
committerTim Wawrzynczak <twawrzynczak@chromium.org>2021-09-02 22:55:00 +0000
commitcc50770cd0eeab0794264f2e6bccdfa7c117f2b9 (patch)
tree3ea6a55912fc299a472a8d7c3f0cd19d7708209c /src/vendorcode/google
parentd1fc832c527699265c7d04517010cc4b0ea6aabd (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/vendorcode/google')
-rw-r--r--src/vendorcode/google/chromeos/sar.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vendorcode/google/chromeos/sar.c b/src/vendorcode/google/chromeos/sar.c
index 5c16f7606b..7b84d1ad55 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 <WRDD>[EWRD]]
* [WGDS_REVISION,CHAINS_COUNT,SUBBANDS_COUNT<WGDS_DATA>]
* [PPAG_REVISION,MODE,CHAINS_COUNT,SUBBANDS_COUNT<PPAG_DATA>]
+ * [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)
{