diff options
author | Jeremy Compostella <jeremy.compostella@intel.com> | 2024-07-11 15:43:35 -0700 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-07-15 18:14:58 +0000 |
commit | dd4b3aa7b92dd2a0ed64e5f38f0dfc8a2f1f9505 (patch) | |
tree | caf50f927466311f662c7ad6c5a0d796dad9f043 /src/drivers | |
parent | 6b82519cba6d49cb313f1f034234143b64ef0c46 (diff) |
drivers/wifi: Support Energy Detection Threshold
The 'Energy Detection Threshold' DSM function 10 provides the desired
status of the EDT optimizations.
The implementation follows document 559910 Intel Connectivity
Platforms BIOS Guideline revision 8.3 specification.
BUG=b:352788465
TEST=ACPI DSM Function 10 reflects the value of the SAR binary
Change-Id: I2e2e9d4f5420020bd7540cb36fa8aebfedf62285
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83430
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: YH Lin <yueherngl@google.com>
Diffstat (limited to 'src/drivers')
-rw-r--r-- | src/drivers/wifi/generic/acpi.c | 69 |
1 files changed, 68 insertions, 1 deletions
diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c index 13120d4acf..946962c2af 100644 --- a/src/drivers/wifi/generic/acpi.c +++ b/src/drivers/wifi/generic/acpi.c @@ -145,6 +145,73 @@ static void wifi_dsm_unii4_control_enable(void *args) } /* + * Function 10: Energy Detection Threshold (EDT) + * Bits 0-3: EDT revision - Default 0 + * + * Bits 4-5: Reserved - Should be 0 + * + * Bit 6: HB EDT Level. 5 GHz ETSI - EDT Level change - Default 0 + * 0 - Disable EDT optimization for ETSI HB + * 1 - Enable EDT optimization for ETSI HB + * + * Bits 7-8: Reserved - Should be 0 + * + * Bit 9: UHB EDT Level. 6 GHz FCC - EDT Level change - Default 0 + * 0 - Disable EDT optimization for FCC UHB + * 1 - Enable EDT optimization for FCC UHB + * + * Bit 10-12: Reserved - Default 0 + * + * Bit 13: EDT_En_HB_5G2/3 - Default 0 + * 0 - Disable EDT optimization for HB_5G2/3 + * 1 - Enable EDT optimization for HB_5G2/3 + * + * Bit 14: EDT_En_HB_5G4 - Default 0 + * 0 - Disable EDT optimization for HB_5G4 + * 1 - Enable EDT optimization for HB_5G4 + * + * Bit 15: EDT_En_HB_5G6 - Default 0 + * 0 - Disable EDT optimization for HB_5G6 + * 1 - Enable EDT optimization for HB_5G6 + * + * Bit 16: EDT_En_HB_5G8/9 - Default 0 + * 0 - Disable EDT optimization for HB_5G8/9 + * 1 - Enable EDT optimization for HB_5G8/9 + * + * Bit 17: EDT_En_UHB_6G1 - Default 0 + * 0 - Disable EDT optimization for UHB_6G1 + * 1 - Enable EDT optimization for UHB_6G1 + * + * Bit 18: EDT_En_UHB_6G3 - Default 0 + * 0 - Disable EDT optimization for UHB_6G3 + * 1 - Enable EDT optimization for UHB_6G3 + * + * Bit 19: EDT_En_UHB_6G5 - Default 0 + * 0 - Disable EDT optimization for UHB_6G5 + * 1 - Enable EDT optimization for UHB_6G5 + * + * Bit 20: EDT_En_UHB_6G6 - Default 0 + * 0 - Disable EDT optimization for UHB_6G6 + * 1 - Enable EDT optimization for UHB_6G6 + * + * Bit 21: EDT_En_UHB_6G8 - Default 0 + * 0 - Disable EDT optimization for UHB_6G8 + * 1 - Enable EDT optimization for UHB_6G8 + * + * Bit 22: EDT_En_UHB_7G0 - Default 0 + * 0 - Disable EDT optimization for UHB_7G0 + * 1 - Enable EDT optimization for UHB_7G0 + * + * Bits 23-31: Reserved - Should be 0 + */ +static void wifi_dsm_energy_detection_threshold(void *args) +{ + struct dsm_profile *dsm_config = (struct dsm_profile *)args; + + acpigen_write_return_integer(dsm_config->energy_detection_threshold); +} + +/* * Function 12: Control Enablement 802.11be on certificated modules * Bit 0 * 0 - 11BE disabled for China Mainland @@ -183,7 +250,7 @@ static void (*wifi_dsm_callbacks[])(void *) = { wifi_dsm_unii4_control_enable, /* Function 7 */ NULL, /* Function 8 */ NULL, /* Function 9 */ - NULL, /* Function 10 */ + wifi_dsm_energy_detection_threshold, /* Function 10 */ NULL, /* Function 11 */ wifi_dsm_11be_country_enablement, /* Function 12 */ }; |