summaryrefslogtreecommitdiff
path: root/src/drivers/intel/wifi/wifi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/intel/wifi/wifi.c')
-rw-r--r--src/drivers/intel/wifi/wifi.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/drivers/intel/wifi/wifi.c b/src/drivers/intel/wifi/wifi.c
index e19711425e..01a338d1d5 100644
--- a/src/drivers/intel/wifi/wifi.c
+++ b/src/drivers/intel/wifi/wifi.c
@@ -255,9 +255,34 @@ static const char *intel_wifi_acpi_name(const struct device *dev)
}
#endif
+static void pci_dev_apply_quirks(struct device *dev)
+{
+ unsigned int cap;
+ uint16_t val;
+ struct device *root = dev->bus->dev;
+
+ switch (dev->device) {
+ case PCI_DEVICE_ID_TP_9260_SERIES_WIFI:
+ cap = pci_find_capability(root, PCI_CAP_ID_PCIE);
+ /* Check the LTR for root port and enable it */
+ if (cap) {
+ val = pci_read_config16(root, cap +
+ PCI_EXP_DEV_CAP2_OFFSET);
+ if (val & LTR_MECHANISM_SUPPORT) {
+ val = pci_read_config16(root, cap +
+ PCI_EXP_DEV_CTL_STS2_CAP_OFFSET);
+ val |= LTR_MECHANISM_EN;
+ pci_write_config16(root, cap +
+ PCI_EXP_DEV_CTL_STS2_CAP_OFFSET, val);
+ }
+ }
+ }
+}
+
static void wifi_pci_dev_init(struct device *dev)
{
pci_dev_init(dev);
+ pci_dev_apply_quirks(dev);
if (IS_ENABLED(CONFIG_ELOG)) {
uint32_t val;