aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Cahill <ben.m.cahill@intel.com>2009-11-06 17:53:03 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-11 15:23:48 -0500
commit309e731a619bee28ace609b0c4c3a0029b7e5394 (patch)
treeb3bcb5430d6d7a090ffd0b57b13e431f7b586ca0
parentf060face819401fb1f6456d362c5bc6672bba655 (diff)
iwlwifi: MAC_ACCESS_REQ cleanup
Add txq_id info to "Tx queue requesting wakeup" debug message Add "Rx queue requesting wakeup" debug message Move clear of CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ to be after nearby iwl_write_prph(), since iwl_write_prph() sets it and clears it. Almost removed it entirely, but just making sure in case someone removes the iwl_write_prph()! Also remove unneeded priv->lock usage; this is now handled by priv->reg_lock within iwl_clear_bit(). Join a couple of lines that had unneeded line returns. Signed-off-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c12
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c5
4 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 8198e14b8fad..da0b38e866ba 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -1934,19 +1934,17 @@ static void __iwl_down(struct iwl_priv *priv)
1934 1934
1935 /* device going down, Stop using ICT table */ 1935 /* device going down, Stop using ICT table */
1936 iwl_disable_ict(priv); 1936 iwl_disable_ict(priv);
1937 spin_lock_irqsave(&priv->lock, flags);
1938 iwl_clear_bit(priv, CSR_GP_CNTRL,
1939 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
1940 spin_unlock_irqrestore(&priv->lock, flags);
1941 1937
1942 iwl_txq_ctx_stop(priv); 1938 iwl_txq_ctx_stop(priv);
1943 iwl_rxq_stop(priv); 1939 iwl_rxq_stop(priv);
1944 1940
1945 iwl_write_prph(priv, APMG_CLK_DIS_REG, 1941 /* Power-down device's busmaster DMA clocks */
1946 APMG_CLK_VAL_DMA_CLK_RQT); 1942 iwl_write_prph(priv, APMG_CLK_DIS_REG, APMG_CLK_VAL_DMA_CLK_RQT);
1947
1948 udelay(5); 1943 udelay(5);
1949 1944
1945 /* Make sure (redundant) we've released our request to stay awake */
1946 iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
1947
1950 /* Stop the device, and put it in low power state */ 1948 /* Stop the device, and put it in low power state */
1951 priv->cfg->ops->lib->apm_ops.stop(priv); 1949 priv->cfg->ops->lib->apm_ops.stop(priv);
1952 1950
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index d2dc7cceb5f2..61b3b0e6ed73 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -140,6 +140,8 @@ int iwl_rx_queue_update_write_ptr(struct iwl_priv *priv, struct iwl_rx_queue *q)
140 reg = iwl_read32(priv, CSR_UCODE_DRV_GP1); 140 reg = iwl_read32(priv, CSR_UCODE_DRV_GP1);
141 141
142 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { 142 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) {
143 IWL_DEBUG_INFO(priv, "Rx queue requesting wakeup, GP1 = 0x%x\n",
144 reg);
143 iwl_set_bit(priv, CSR_GP_CNTRL, 145 iwl_set_bit(priv, CSR_GP_CNTRL,
144 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); 146 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
145 goto exit_unlock; 147 goto exit_unlock;
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 905ceca88b95..9370e062000d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -96,7 +96,8 @@ int iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq)
96 reg = iwl_read32(priv, CSR_UCODE_DRV_GP1); 96 reg = iwl_read32(priv, CSR_UCODE_DRV_GP1);
97 97
98 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) { 98 if (reg & CSR_UCODE_DRV_GP1_BIT_MAC_SLEEP) {
99 IWL_DEBUG_INFO(priv, "Requesting wakeup, GP1 = 0x%x\n", reg); 99 IWL_DEBUG_INFO(priv, "Tx queue %d requesting wakeup, GP1 = 0x%x\n",
100 txq_id, reg);
100 iwl_set_bit(priv, CSR_GP_CNTRL, 101 iwl_set_bit(priv, CSR_GP_CNTRL,
101 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ); 102 CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
102 return ret; 103 return ret;
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 92ecdd9abd9f..05f118529fea 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -2600,9 +2600,8 @@ static void __iwl3945_down(struct iwl_priv *priv)
2600 iwl3945_hw_txq_ctx_stop(priv); 2600 iwl3945_hw_txq_ctx_stop(priv);
2601 iwl3945_hw_rxq_stop(priv); 2601 iwl3945_hw_rxq_stop(priv);
2602 2602
2603 iwl_write_prph(priv, APMG_CLK_DIS_REG, 2603 /* Power-down device's busmaster DMA clocks */
2604 APMG_CLK_VAL_DMA_CLK_RQT); 2604 iwl_write_prph(priv, APMG_CLK_DIS_REG, APMG_CLK_VAL_DMA_CLK_RQT);
2605
2606 udelay(5); 2605 udelay(5);
2607 2606
2608 /* Stop the device, and put it in low power state */ 2607 /* Stop the device, and put it in low power state */