diff options
author | Jiang Liu <jiang.liu@huawei.com> | 2012-08-20 14:18:08 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 10:11:15 -0600 |
commit | 332badc323e3846faca15b110c22d62946c1df60 (patch) | |
tree | 48fd55607b2a8d4bed787df428446b0b4ac441e2 /drivers/net | |
parent | a7238b37ce794d75b822865a389429ed007ca983 (diff) |
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/rtlwifi/pci.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c index 80f75d3ba84a..5983631a1b1a 100644 --- a/drivers/net/wireless/rtlwifi/pci.c +++ b/drivers/net/wireless/rtlwifi/pci.c @@ -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); |