iwlwifi: use pci registers defined in pci_regs.h
This patch replaces where possible usage of pci register defined in the driver by ones defined in pci_regs.h Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
fe3d2c3fe3
commit
3fdb68de22
@@ -219,18 +219,19 @@ static void iwl5000_nic_config(struct iwl_priv *priv)
|
||||
{
|
||||
unsigned long flags;
|
||||
u16 radio_cfg;
|
||||
u16 link;
|
||||
u16 lctl;
|
||||
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
|
||||
pci_read_config_word(priv->pci_dev, PCI_CFG_LINK_CTRL, &link);
|
||||
lctl = iwl_pcie_link_ctl(priv);
|
||||
|
||||
/* L1 is enabled by BIOS */
|
||||
if ((link & PCI_CFG_LINK_CTRL_VAL_L1_EN) == PCI_CFG_LINK_CTRL_VAL_L1_EN)
|
||||
/* disable L0S disabled L1A enabled */
|
||||
/* HW bug W/A */
|
||||
/* L1-ASPM is enabled by BIOS */
|
||||
if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) == PCI_CFG_LINK_CTRL_VAL_L1_EN)
|
||||
/* L1-APSM enabled: disable L0S */
|
||||
iwl_set_bit(priv, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED);
|
||||
else
|
||||
/* L0S enabled L1A disabled */
|
||||
/* L1-ASPM disabled: enable L0S */
|
||||
iwl_clear_bit(priv, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED);
|
||||
|
||||
radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
|
||||
|
Reference in New Issue
Block a user