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

Commit a7238b37 authored by Jiang Liu's avatar Jiang Liu Committed by Bjorn Helgaas
Browse files

iwlwifi: Use PCI Express Capability accessors



Use PCI Express Capability access functions to simplify iwlwifi driver.

[bhelgaas: split iwlegacy, iwlwifi, rtlwifi into separate patches]
Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 4460eb52
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -675,13 +675,10 @@ static void iwl_set_pwr_vmain(struct iwl_trans *trans)
static u16 iwl_pciexp_link_ctrl(struct iwl_trans *trans)
{
	struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
	int pos;
	u16 pci_lnk_ctl;

	struct pci_dev *pci_dev = trans_pcie->pci_dev;

	pos = pci_pcie_cap(pci_dev);
	pci_read_config_word(pci_dev, pos + PCI_EXP_LNKCTL, &pci_lnk_ctl);
	pcie_capability_read_word(trans_pcie->pci_dev, PCI_EXP_LNKCTL,
				  &pci_lnk_ctl);
	return pci_lnk_ctl;
}