Kapil Porwal has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/70262 )
Change subject: drivers/wifi/generic: Fix properties in generic-under-PCI device case ......................................................................
drivers/wifi/generic: Fix properties in generic-under-PCI device case
In the devicetree case where a generic device underneath the Intel PCI CNVi device carries the device properties, the incorrect device was passed to wifi_ssdt_write_properties.
BUG=b:259716145 TEST=Dump SSDT and see that _PRW and _DSD for CNVi device contains the value from the devicetree on google/kuldax.
SSDT when generic-under-PCI: Scope (_SB.PCI0.WFA3) { Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake { 0x6D, 0x03 }) Name (_DSD, Package (0x02) // _DSD: Device-Specific Data { ToUUID ("70d24161-6dd5-4c9e-8070-705531292865"), Package (0x01) { Package (0x02) { "DmaProperty", One } } }) Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method { ToBuffer (Arg0, Local0) Return (Buffer (One) { 0x00 // . }) } }
SSDT when CNVi: Scope (_SB.PCI0.CNVW) { Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake { 0x6D, 0x03 }) Name (_DSD, Package (0x02) // _DSD: Device-Specific Data { ToUUID ("70d24161-6dd5-4c9e-8070-705531292865"), Package (0x01) { Package (0x02) { "DmaProperty", One } } }) Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method { ToBuffer (Arg0, Local0) Return (Buffer (One) { 0x00 // . }) } }
Signed-off-by: Kapil Porwal kapilporwal@google.com Change-Id: I6f7d0b826ce067b40fa89d74f421d7018ecc3fbb --- M src/drivers/wifi/generic/acpi.c 1 file changed, 84 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/62/70262/1
diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c index 3996739..6555c11 100644 --- a/src/drivers/wifi/generic/acpi.c +++ b/src/drivers/wifi/generic/acpi.c @@ -585,13 +585,18 @@ void wifi_pcie_fill_ssdt(const struct device *dev) { const char *path; + const struct device *child;
path = acpi_device_path(dev); if (!path) return;
wifi_ssdt_write_device(dev, path); - wifi_ssdt_write_properties(dev, path); + child = dev->link_list ? dev->link_list->children : NULL; + if (child && child->path.type == DEVICE_PATH_GENERIC) + wifi_ssdt_write_properties(child, path); + else + wifi_ssdt_write_properties(dev, path); }
const char *wifi_pcie_acpi_name(const struct device *dev)