From 07e6b5f67d4b5e957a56d6dbcd7328238f1074fe Mon Sep 17 00:00:00 2001 From: Matt Chen Date: Thu, 4 Nov 2021 18:13:25 +0800 Subject: [PATCH] drivers/wifi/generic: fix package_size to align with WLAN driver Change to use MAX_DSAR_SET_COUNT which WLAN driver always expects 3 no matter what the revision is for EWRD. It will pass the WLAN driver check then to retrieve the data properly. BUG=b:204414616 TEST= tested on brya with DRTU tool to verify if SAR table is read properly or not. Change-Id: I18e7d5f658bbf42b7eeed3da330508f14b86c0f8 Signed-off-by: Matt Chen Reviewed-on: https://review.coreboot.org/c/coreboot/+/58951 Tested-by: build bot (Jenkins) Reviewed-by: Kane Chen Reviewed-by: EricR Lai Reviewed-by: Tim Wawrzynczak --- src/drivers/wifi/generic/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c index 11fc0e084f..3cc1c63aa9 100644 --- a/src/drivers/wifi/generic/acpi.c +++ b/src/drivers/wifi/generic/acpi.c @@ -273,7 +273,7 @@ static void sar_emit_ewrd(const struct sar_profile *sar) * Emit 'Domain Type' + 'Dynamic SAR Enable' + 'Extended SAR sets count' * + number of bytes for Set#2 & 3 & 4 */ - package_size = 1 + 1 + 1 + table_size * sar->dsar_set_count; + package_size = 1 + 1 + 1 + table_size * MAX_DSAR_SET_COUNT; acpigen_write_package(package_size); acpigen_write_dword(DOMAIN_TYPE_WIFI); acpigen_write_dword(1);