aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/3945.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.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.c')
-rw-r--r--drivers/net/wireless/iwlegacy/3945.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index 95ebd43ae537..103251dba459 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -1016,18 +1016,17 @@ il3945_hw_txq_ctx_stop(struct il_priv *il)
1016 int txq_id; 1016 int txq_id;
1017 1017
1018 /* stop SCD */ 1018 /* stop SCD */
1019 il_wr_prph(il, ALM_SCD_MODE_REG, 0); 1019 _il_wr_prph(il, ALM_SCD_MODE_REG, 0);
1020 il_wr_prph(il, ALM_SCD_TXFACT_REG, 0); 1020 _il_wr_prph(il, ALM_SCD_TXFACT_REG, 0);
1021 1021
1022 /* reset TFD queues */ 1022 /* reset TFD queues */
1023 for (txq_id = 0; txq_id < il->hw_params.max_txq_num; txq_id++) { 1023 for (txq_id = 0; txq_id < il->hw_params.max_txq_num; txq_id++) {
1024 il_wr(il, FH39_TCSR_CONFIG(txq_id), 0x0); 1024 _il_wr(il, FH39_TCSR_CONFIG(txq_id), 0x0);
1025 il_poll_bit(il, FH39_TSSR_TX_STATUS, 1025 _il_poll_bit(il, FH39_TSSR_TX_STATUS,
1026 FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(txq_id), 1026 FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(txq_id),
1027 1000); 1027 FH39_TSSR_TX_STATUS_REG_MSK_CHNL_IDLE(txq_id),
1028 1000);
1028 } 1029 }
1029
1030 il3945_hw_txq_ctx_free(il);
1031} 1030}
1032 1031
1033/** 1032/**
@@ -2176,12 +2175,14 @@ il3945_txpower_set_from_eeprom(struct il_priv *il)
2176int 2175int
2177il3945_hw_rxq_stop(struct il_priv *il) 2176il3945_hw_rxq_stop(struct il_priv *il)
2178{ 2177{
2179 int rc; 2178 int ret;
2180 2179
2181 il_wr(il, FH39_RCSR_CONFIG(0), 0); 2180 _il_wr(il, FH39_RCSR_CONFIG(0), 0);
2182 rc = il_poll_bit(il, FH39_RSSR_STATUS, 2181 ret = _il_poll_bit(il, FH39_RSSR_STATUS,
2183 FH39_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, 1000); 2182 FH39_RSSR_CHNL0_RX_STATUS_CHNL_IDLE,
2184 if (rc < 0) 2183 FH39_RSSR_CHNL0_RX_STATUS_CHNL_IDLE,
2184 1000);
2185 if (ret < 0)
2185 IL_ERR("Can't stop Rx DMA.\n"); 2186 IL_ERR("Can't stop Rx DMA.\n");
2186 2187
2187 return 0; 2188 return 0;