forked from Minki/linux
rtlwifi: Use PCI Express Capability accessors
Use PCI Express Capability access functions to simplify rtlwifi driver. [bhelgaas: split iwlegacy, iwlwifi, rtlwifi into separate patches] Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
a7238b37ce
commit
332badc323
@ -372,13 +372,11 @@ static void rtl_pci_parse_configuration(struct pci_dev *pdev,
|
||||
struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
|
||||
|
||||
u8 tmp;
|
||||
int pos;
|
||||
u8 linkctrl_reg;
|
||||
u16 linkctrl_reg;
|
||||
|
||||
/*Link Control Register */
|
||||
pos = pci_pcie_cap(pdev);
|
||||
pci_read_config_byte(pdev, pos + PCI_EXP_LNKCTL, &linkctrl_reg);
|
||||
pcipriv->ndis_adapter.linkctrl_reg = linkctrl_reg;
|
||||
pcie_capability_read_word(pdev, PCI_EXP_LNKCTL, &linkctrl_reg);
|
||||
pcipriv->ndis_adapter.linkctrl_reg = (u8)linkctrl_reg;
|
||||
|
||||
RT_TRACE(rtlpriv, COMP_INIT, DBG_TRACE, "Link Control Register =%x\n",
|
||||
pcipriv->ndis_adapter.linkctrl_reg);
|
||||
|
Loading…
Reference in New Issue
Block a user