aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-05-29 04:34:56 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-03 15:00:20 -0400
commit8f0618914e02c62c5cf2482f8acc7eb8e9afb816 (patch)
treee964a5a4ed139fcbc96c766a328686525f0008c5 /drivers/net/wireless/iwlwifi/iwl-4965.c
parent885ba202cabd90b8ade1fe59185dc96ed4d69e02 (diff)
iwlwifi: setup correctly L1 L0S pi link values
This patch setups L1 L0S pci link values. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index d548bda1ff72..bf0bd4af10c8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -496,6 +496,10 @@ static int iwl4965_apm_init(struct iwl_priv *priv)
496 iwl_set_bit(priv, CSR_GIO_CHICKEN_BITS, 496 iwl_set_bit(priv, CSR_GIO_CHICKEN_BITS,
497 CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER); 497 CSR_GIO_CHICKEN_BITS_REG_BIT_DIS_L0S_EXIT_TIMER);
498 498
499 /* disable L0s without affecting L1 :don't wait for ICH L0s bug W/A) */
500 iwl_set_bit(priv, CSR_GIO_CHICKEN_BITS,
501 CSR_GIO_CHICKEN_BITS_REG_BIT_L1A_NO_L0S_RX);
502
499 /* set "initialization complete" bit to move adapter 503 /* set "initialization complete" bit to move adapter
500 * D0U* --> D0A* state */ 504 * D0U* --> D0A* state */
501 iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); 505 iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
@@ -514,11 +518,12 @@ static int iwl4965_apm_init(struct iwl_priv *priv)
514 goto out; 518 goto out;
515 519
516 /* enable DMA */ 520 /* enable DMA */
517 iwl_write_prph(priv, APMG_CLK_CTRL_REG, 521 iwl_write_prph(priv, APMG_CLK_CTRL_REG, APMG_CLK_VAL_DMA_CLK_RQT |
518 APMG_CLK_VAL_DMA_CLK_RQT | APMG_CLK_VAL_BSM_CLK_RQT); 522 APMG_CLK_VAL_BSM_CLK_RQT);
519 523
520 udelay(20); 524 udelay(20);
521 525
526 /* disable L1-Active */
522 iwl_set_bits_prph(priv, APMG_PCIDEV_STT_REG, 527 iwl_set_bits_prph(priv, APMG_PCIDEV_STT_REG,
523 APMG_PCIDEV_STT_VAL_L1_ACT_DIS); 528 APMG_PCIDEV_STT_VAL_L1_ACT_DIS);
524 529
@@ -546,8 +551,13 @@ static void iwl4965_nic_config(struct iwl_priv *priv)
546 551
547 pci_read_config_byte(priv->pci_dev, PCI_LINK_CTRL, &val_link); 552 pci_read_config_byte(priv->pci_dev, PCI_LINK_CTRL, &val_link);
548 553
549 /* disable L1 entry -- workaround for pre-B1 */ 554 /* L1 is enabled by BIOS */
550 pci_write_config_byte(priv->pci_dev, PCI_LINK_CTRL, val_link & ~0x02); 555 if ((val_link & PCI_LINK_VAL_L1_EN) == PCI_LINK_VAL_L1_EN)
556 /* diable L0S disabled L1A enabled */
557 iwl_set_bit(priv, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED);
558 else
559 /* L0S enabled L1A disabled */
560 iwl_clear_bit(priv, CSR_GIO_REG, CSR_GIO_REG_VAL_L0S_ENABLED);
551 561
552 radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG); 562 radio_cfg = iwl_eeprom_query16(priv, EEPROM_RADIO_CONFIG);
553 563