summaryrefslogtreecommitdiff
path: root/src/vendorcode
diff options
context:
space:
mode:
authorSugnan Prabhu S <sugnan.prabhu.s@intel.com>2021-08-25 17:36:44 +0530
committerTim Wawrzynczak <twawrzynczak@chromium.org>2021-09-02 22:55:37 +0000
commitd70f4818911c40aec2a0ad927eb09b0a6cd14d16 (patch)
treee1c8e284c9ad146aec1eec9c680a200d0826983c /src/vendorcode
parentcc50770cd0eeab0794264f2e6bccdfa7c117f2b9 (diff)
wifi: Add support for DSM methods for intel wifi card
Add support for DSM methods as per the connectivity document 559910_Intel_Connectivity_Platforms_BIOS_Guidelines_Rev6_4.pdf BUG=b:191720858 TEST=Check the generated SSDT tables for DSM methods Change-Id: Ie154edf188531fe6c260274edaa694cf3b3605d3 Signed-off-by: Sugnan Prabhu S <sugnan.prabhu.s@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/56751 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/vendorcode')
-rw-r--r--src/vendorcode/google/chromeos/sar.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vendorcode/google/chromeos/sar.c b/src/vendorcode/google/chromeos/sar.c
index 7b84d1ad55..895958860b 100644
--- a/src/vendorcode/google/chromeos/sar.c
+++ b/src/vendorcode/google/chromeos/sar.c
@@ -84,6 +84,14 @@ static int sar_avg_table_size(const struct avg_profile *sar_avg)
return sizeof(struct avg_profile);
}
+static int dsm_table_size(const struct dsm_profile *dsm)
+{
+ if (dsm == NULL)
+ return 0;
+
+ return sizeof(struct dsm_profile);
+}
+
static bool valid_legacy_length(size_t bin_len)
{
if (bin_len == LEGACY_SAR_WGDS_BIN_SIZE)
@@ -134,6 +142,7 @@ static int fill_wifi_sar_limits(union wifi_sar_limits *sar_limits, const uint8_t
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);
+ expected_sar_bin_size += dsm_table_size(sar_limits->dsm);
if (sar_bin_size != expected_sar_bin_size) {
printk(BIOS_ERR, "ERROR: Invalid SAR size, expected: %ld, obtained: %ld\n",
@@ -198,6 +207,7 @@ static int fill_wifi_sar_limits_legacy(union wifi_sar_limits *sar_limits,
* [WGDS_REVISION,CHAINS_COUNT,SUBBANDS_COUNT<WGDS_DATA>]
* [PPAG_REVISION,MODE,CHAINS_COUNT,SUBBANDS_COUNT<PPAG_DATA>]
* [WTAS_REVISION, WTAS_DATA]
+ * [DSM_RETURN_VALUES]
*
* 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