diff options
author | Furquan Shaikh <furquan@google.com> | 2020-11-09 08:07:10 -0800 |
---|---|---|
committer | Furquan Shaikh <furquan@google.com> | 2020-11-10 05:17:16 +0000 |
commit | 43cc3c0273a165da17c50dad68c009ea557c9462 (patch) | |
tree | c92a107f92dd76f1e0f28b3348a364c2ac508b7a | |
parent | 2e7317568a26e0dd985672e83e5ffdc339b7a278 (diff) | |
download | coreboot-43cc3c0273a165da17c50dad68c009ea557c9462.tar.xz |
drivers/wifi: Check device is of type PCI before checking vendor ID
CB:46865 ("mb, soc/intel: Reorganize CNVi device entries in
devicetree") reorganized the devicetree entries to make the
representation of CNVi device consistent with other internal PCI
devices. Since a dummy generic device is added for the CNVi device,
`emit_sar_acpi_structures()` needs to first check if the device is PCI
before checking the vendor ID. This ensures that SAR table generation
is skipped only for PCIe devices with non-Intel vendor IDs and not for
the dummy generic device.
BUG=b:165105210
Change-Id: I3c8d18538b94ed1072cfcc108552f3a1ac320395
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47364
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
-rw-r--r-- | src/drivers/wifi/generic/acpi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/drivers/wifi/generic/acpi.c b/src/drivers/wifi/generic/acpi.c index 1cc4bd080f..cd5af4ecfa 100644 --- a/src/drivers/wifi/generic/acpi.c +++ b/src/drivers/wifi/generic/acpi.c @@ -44,8 +44,11 @@ static void emit_sar_acpi_structures(const struct device *dev) struct wifi_sar_limits sar_limits; struct wifi_sar_delta_table *wgds; - /* CBFS SAR and SAR ACPI tables are currently used only by Intel WiFi devices. */ - if (dev->vendor != PCI_VENDOR_ID_INTEL) + /* + * If device type is PCI, ensure that the device has Intel vendor ID. CBFS SAR and SAR + * ACPI tables are currently used only by Intel WiFi devices. + */ + if (dev->path.type == DEVICE_PATH_PCI && dev->vendor != PCI_VENDOR_ID_INTEL) return; /* Retrieve the sar limits data */ |