Jérémy Compostella has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/83430?usp=email )
Change subject: drivers/wifi: Support Energy Detection Threshold ......................................................................
drivers/wifi: Support Energy Detection Threshold
The 'Energy Detection Threshold' DSM function control provides the desired status of the EDT optimizations.
The implementation follows document 559910 Intel Connectivity Platforms BIOS Guideline revision 8.3 specification.
BUG=b:TBD TEST=ACPI DSM Function 10 reflects the value of the SAR binary
Change-Id: I2e2e9d4f5420020bd7540cb36fa8aebfedf62285 Signed-off-by: Jeremy Compostella jeremy.compostella@intel.com --- M src/drivers/wifi/generic/acpi.c M src/include/sar.h 2 files changed, 69 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/83430/1
diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c index 13120d4..7b5e9d2 100644 --- a/src/drivers/wifi/generic/acpi.c +++ b/src/drivers/wifi/generic/acpi.c @@ -145,6 +145,73 @@ }
/* + * 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_6G8 + * 1 - Enable EDT optimization for UHB_6G8 + * + * 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 @@ 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 */ }; diff --git a/src/include/sar.h b/src/include/sar.h index 5968645..c8e9d41 100644 --- a/src/include/sar.h +++ b/src/include/sar.h @@ -60,6 +60,7 @@ uint32_t enablement_11ax; uint32_t unii_4; uint32_t enablement_11be; + uint32_t energy_detection_threshold; };
struct bsar_profile {