aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/3945-mac.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2012-02-13 05:23:24 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-22 14:51:16 -0500
commit775ed8abde9420afc955ca7540aacdce721be6c1 (patch)
tree7ff55b22f75b9d694382514f6d59c490f5d1df1c /drivers/net/wireless/iwlegacy/3945-mac.c
parentc37281a076604937ec2403f3cfec71362f93c7d8 (diff)
iwlegacy: do not grab nic access if rfkill
If rfkill is on il_grab_nic_access() fail and we can not write to the various registers during stop procedure. Write to those registers unconditionally instead. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy/3945-mac.c')
-rw-r--r--drivers/net/wireless/iwlegacy/3945-mac.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index 002cf4fd5a55..ee91ab2e3858 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -2286,16 +2286,25 @@ __il3945_down(struct il_priv *il)
2286 test_bit(S_FW_ERROR, &il->status) << S_FW_ERROR | 2286 test_bit(S_FW_ERROR, &il->status) << S_FW_ERROR |
2287 test_bit(S_EXIT_PENDING, &il->status) << S_EXIT_PENDING; 2287 test_bit(S_EXIT_PENDING, &il->status) << S_EXIT_PENDING;
2288 2288
2289 /*
2290 * We disabled and synchronized interrupt, and priv->mutex is taken, so
2291 * here is the only thread which will program device registers, but
2292 * still have lockdep assertions, so we are taking reg_lock.
2293 */
2294 spin_lock_irq(&il->reg_lock);
2295 /* FIXME: il_grab_nic_access if rfkill is off ? */
2296
2289 il3945_hw_txq_ctx_stop(il); 2297 il3945_hw_txq_ctx_stop(il);
2290 il3945_hw_rxq_stop(il); 2298 il3945_hw_rxq_stop(il);
2291
2292 /* Power-down device's busmaster DMA clocks */ 2299 /* Power-down device's busmaster DMA clocks */
2293 il_wr_prph(il, APMG_CLK_DIS_REG, APMG_CLK_VAL_DMA_CLK_RQT); 2300 _il_wr_prph(il, APMG_CLK_DIS_REG, APMG_CLK_VAL_DMA_CLK_RQT);
2294 udelay(5); 2301 udelay(5);
2295
2296 /* Stop the device, and put it in low power state */ 2302 /* Stop the device, and put it in low power state */
2297 il_apm_stop(il); 2303 _il_apm_stop(il);
2298 2304
2305 spin_unlock_irq(&il->reg_lock);
2306
2307 il3945_hw_txq_ctx_free(il);
2299exit: 2308exit:
2300 memset(&il->card_alive, 0, sizeof(struct il_alive_resp)); 2309 memset(&il->card_alive, 0, sizeof(struct il_alive_resp));
2301 2310