summaryrefslogtreecommitdiff
path: root/src/drivers/wifi/generic/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/wifi/generic/generic.c')
-rw-r--r--src/drivers/wifi/generic/generic.c13
1 files changed, 3 insertions, 10 deletions
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
}