diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/wifi/generic/acpi.c | 32 | ||||
-rw-r--r-- | src/drivers/wifi/generic/generic.c | 13 |
2 files changed, 17 insertions, 28 deletions
diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c index 88bcf3a483..ee122ea2d8 100644 --- a/src/drivers/wifi/generic/acpi.c +++ b/src/drivers/wifi/generic/acpi.c @@ -517,21 +517,19 @@ static void wifi_ssdt_write_properties(const struct device *dev, const char *sco /* Scope */ acpigen_write_scope(scope); - if (dev->path.type == DEVICE_PATH_GENERIC) { - if (config) { - /* Wake capabilities */ - acpigen_write_PRW(config->wake, ACPI_S3); - - /* Add _DSD for DmaProperty property. */ - if (config->is_untrusted) { - struct acpi_dp *dsd, *pkg; - - dsd = acpi_dp_new_table("_DSD"); - pkg = acpi_dp_new_table(ACPI_DSD_DMA_PROPERTY_UUID); - acpi_dp_add_integer(pkg, "DmaProperty", 1); - acpi_dp_add_package(dsd, pkg); - acpi_dp_write(dsd); - } + if (config) { + /* Wake capabilities */ + acpigen_write_PRW(config->wake, ACPI_S3); + + /* Add _DSD for DmaProperty property. */ + if (config->is_untrusted) { + struct acpi_dp *dsd, *pkg; + + dsd = acpi_dp_new_table("_DSD"); + pkg = acpi_dp_new_table(ACPI_DSD_DMA_PROPERTY_UUID); + acpi_dp_add_integer(pkg, "DmaProperty", 1); + acpi_dp_add_package(dsd, pkg); + acpi_dp_write(dsd); } } @@ -603,9 +601,7 @@ void wifi_pcie_fill_ssdt(const struct device *dev) return; wifi_ssdt_write_device(dev, path); - const struct device *child = dev->link_list->children; - if (child && child->path.type == DEVICE_PATH_GENERIC) - wifi_ssdt_write_properties(child, path); + wifi_ssdt_write_properties(dev, path); } const char *wifi_pcie_acpi_name(const struct device *dev) diff --git a/src/drivers/wifi/generic/generic.c b/src/drivers/wifi/generic/generic.c index e8e066bc79..62a543032f 100644 --- a/src/drivers/wifi/generic/generic.c +++ b/src/drivers/wifi/generic/generic.c @@ -21,7 +21,6 @@ struct device_operations wifi_pcie_ops = { .enable_resources = pci_dev_enable_resources, .init = wifi_pci_dev_init, .ops_pci = &pci_dev_ops_pci, - .scan_bus = scan_static_bus, #if CONFIG(HAVE_ACPI_TABLES) .acpi_name = wifi_pcie_acpi_name, .acpi_fill_ssdt = wifi_pcie_fill_ssdt, @@ -42,11 +41,6 @@ struct device_operations wifi_cnvi_ops = { #endif }; -struct device_operations wifi_generic_ops = { - .read_resources = noop_read_resources, - .set_resources = noop_set_resources, -}; - static bool is_cnvi(const struct device *dev) { return dev && dev->path.type != DEVICE_PATH_PCI; @@ -66,11 +60,10 @@ bool wifi_generic_cnvi_ddr_rfim_enabled(const struct device *dev) static void wifi_generic_enable(struct device *dev) { #if !DEVTREE_EARLY - const struct device *parent = dev->bus->dev; - if (parent && parent->ops == &wifi_pcie_ops) - dev->ops = &wifi_generic_ops; - else + if (is_cnvi(dev)) dev->ops = &wifi_cnvi_ops; + else + dev->ops = &wifi_pcie_ops; #endif } |