Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247283
b: refs/heads/master
c: 9d39e5b
h: refs/heads/master
i:
  247281: e77dcc5
  247279: 75b3b59
v: v3
  • Loading branch information
Johannes Berg authored and Wey-Yi Guy committed Apr 30, 2011
1 parent 9f34205 commit 6b1dc07
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ff776cecec92fe7cac4a9ce1919576ad6e737e08
refs/heads/master: 9d39e5bad76a8830a8fa0c03cadc1e36ce2ec2ef
21 changes: 15 additions & 6 deletions trunk/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2363,12 +2363,21 @@ void iwlagn_stop_device(struct iwl_priv *priv)
/* device going down, Stop using ICT table */
iwl_disable_ict(priv);

iwlagn_txq_ctx_stop(priv);
iwlagn_rxq_stop(priv);

/* Power-down device's busmaster DMA clocks */
iwl_write_prph(priv, APMG_CLK_DIS_REG, APMG_CLK_VAL_DMA_CLK_RQT);
udelay(5);
/*
* If a HW restart happens during firmware loading,
* then the firmware loading might call this function
* and later it might be called again due to the
* restart. So don't process again if the device is
* already dead.
*/
if (test_bit(STATUS_DEVICE_ENABLED, &priv->status)) {
iwlagn_txq_ctx_stop(priv);
iwlagn_rxq_stop(priv);

/* Power-down device's busmaster DMA clocks */
iwl_write_prph(priv, APMG_CLK_DIS_REG, APMG_CLK_VAL_DMA_CLK_RQT);
udelay(5);
}

/* Make sure (redundant) we've released our request to stay awake */
iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,8 @@ void iwl_apm_stop(struct iwl_priv *priv)
{
IWL_DEBUG_INFO(priv, "Stop card, put in low power state\n");

clear_bit(STATUS_DEVICE_ENABLED, &priv->status);

/* Stop device's DMA activity */
iwl_apm_stop_master(priv);

Expand Down Expand Up @@ -1109,6 +1111,8 @@ int iwl_apm_init(struct iwl_priv *priv)
iwl_set_bits_prph(priv, APMG_PCIDEV_STT_REG,
APMG_PCIDEV_STT_VAL_L1_ACT_DIS);

set_bit(STATUS_DEVICE_ENABLED, &priv->status);

out:
return ret;
}
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ void iwlcore_free_geos(struct iwl_priv *priv);
#define STATUS_SCAN_HW 15
#define STATUS_POWER_PMI 16
#define STATUS_FW_ERROR 17
#define STATUS_DEVICE_ENABLED 18


static inline int iwl_is_ready(struct iwl_priv *priv)
Expand Down

0 comments on commit 6b1dc07

Please sign in to comment.