Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68dd49ef authored by Jon Mason's avatar Jon Mason Committed by John W. Linville
Browse files

iwlwifi: remove unnecessary read of PCI_CAP_ID_EXP



The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.

Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
Acked-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 333c0dbf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ static u16 iwl_pciexp_link_ctrl(struct iwl_bus *bus)
	u16 pci_lnk_ctl;
	struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus);

	pos = pci_find_capability(pci_dev, PCI_CAP_ID_EXP);
	pos = pci_pcie_cap(pci_dev);
	pci_read_config_word(pci_dev, pos + PCI_EXP_LNKCTL, &pci_lnk_ctl);
	return pci_lnk_ctl;
}