From 511222c187e86175bf9832a62619a05d1900c1fb Mon Sep 17 00:00:00 2001 From: Ravi Sarawadi Date: Mon, 6 May 2024 09:58:52 -0700 Subject: drivers/wifi: Support Wi-Fi 7 11be Enablement Add 802.11be (aka. Wi-Fi 7) enable/disable support based on document 559910 Intel Connectivity Platforms BIOS_Guidelines revision 8.3. There are countries where Wi-Fi 7 should be disabled by default. This adds capability for OEM to enable or disable by updating the board specific Specific Absorption Rate (SAR) binary. BUG=b:348345300 BRANCH=firmware-rex-15709.B TEST=SSDT dump shows that the _DSM method returns the value supplied by the SAR binary for function 12 Change-Id: Ifa1482d7511f48f5138d4c68566f07ce79f37a7a Signed-off-by: Ravi Sarawadi Signed-off-by: Jeremy Compostella Reviewed-on: https://review.coreboot.org/c/coreboot/+/82207 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: Eric Lai Reviewed-by: YH Lin --- src/drivers/wifi/generic/acpi.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src/drivers') diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c index fd1da06934..d3da51b116 100644 --- a/src/drivers/wifi/generic/acpi.c +++ b/src/drivers/wifi/generic/acpi.c @@ -143,6 +143,28 @@ static void wifi_dsm_unii4_control_enable(void *args) acpigen_write_return_integer(dsm_config->unii_4); } +/* + * Function 12: Control Enablement 802.11be on certificated modules + * Bit 0 + * 0 - 11BE disabled for China Mainland + * 1 - 11BE enabled for China Mainland + * + * Bit 1 + * 0 - 11BE disabled for South Korea + * 1 - 11BE enabled for South Korea + * + * Bit 2:27 - Reserved (shall be set to zeroes) + * + * Bit 28:31 - 11BE enablement revision + * + */ +static void wifi_dsm_11be_country_enablement(void *args) +{ + struct dsm_profile *dsm_config = (struct dsm_profile *)args; + + acpigen_write_return_integer(dsm_config->enablement_11be); +} + static void wifi_dsm_ddrrfim_func3_cb(void *ptr) { const bool is_cnvi_ddr_rfim_enabled = *(bool *)ptr; @@ -158,6 +180,11 @@ static void (*wifi_dsm_callbacks[])(void *) = { wifi_dsm_uart_configurations, /* Function 5 */ wifi_dsm_ukrane_russia_11ax_enable, /* Function 6 */ wifi_dsm_unii4_control_enable, /* Function 7 */ + NULL, /* Function 8 */ + NULL, /* Function 9 */ + NULL, /* Function 10 */ + NULL, /* Function 11 */ + wifi_dsm_11be_country_enablement, /* Function 12 */ }; /* -- cgit v1.2.3