Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102811
b: refs/heads/master
c: f118a91
h: refs/heads/master
i:
  102809: fb1f9fa
  102807: 36e385b
v: v3
  • Loading branch information
Tomas Winkler authored and John W. Linville committed Jun 3, 2008
1 parent 3e42ed6 commit 74218b8
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 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: 7f066108d15d06ec3534434333f0274c868fe798
refs/heads/master: f118a91d16127e461cc8c17c529306910f13a8b1
19 changes: 18 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/iwl-4965.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,22 @@ void iwl4965_hw_txq_ctx_stop(struct iwl_priv *priv)
iwl_hw_txq_ctx_free(priv);
}

static void iwl4965_apm_stop(struct iwl_priv *priv)
{
unsigned long flags;

iwl4965_hw_nic_stop_master(priv);

spin_lock_irqsave(&priv->lock, flags);

iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);

udelay(10);

iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
spin_unlock_irqrestore(&priv->lock, flags);
}

static int iwl4965_apm_reset(struct iwl_priv *priv)
{
int ret = 0;
Expand All @@ -658,6 +674,7 @@ static int iwl4965_apm_reset(struct iwl_priv *priv)
/* FIXME: put here L1A -L0S w/a */

iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);

ret = iwl_poll_bit(priv, CSR_RESET,
CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY,
CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25);
Expand Down Expand Up @@ -689,7 +706,6 @@ static int iwl4965_apm_reset(struct iwl_priv *priv)
spin_unlock_irqrestore(&priv->lock, flags);

return ret;

}

#define REG_RECALIB_PERIOD (60)
Expand Down Expand Up @@ -3625,6 +3641,7 @@ static struct iwl_lib_ops iwl4965_lib = {
.apm_ops = {
.init = iwl4965_apm_init,
.reset = iwl4965_apm_reset,
.stop = iwl4965_apm_stop,
.config = iwl4965_nic_config,
.set_pwr_src = iwl4965_set_pwr_src,
},
Expand Down
20 changes: 20 additions & 0 deletions trunk/drivers/net/wireless/iwlwifi/iwl-5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,25 @@ static int iwl5000_apm_init(struct iwl_priv *priv)
return ret;
}

/* FIXME: this is indentical to 4965 */
static void iwl5000_apm_stop(struct iwl_priv *priv)
{
unsigned long flags;

iwl4965_hw_nic_stop_master(priv);

spin_lock_irqsave(&priv->lock, flags);

iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_SW_RESET);

udelay(10);

iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);

spin_unlock_irqrestore(&priv->lock, flags);
}


static int iwl5000_apm_reset(struct iwl_priv *priv)
{
int ret = 0;
Expand Down Expand Up @@ -859,6 +878,7 @@ static struct iwl_lib_ops iwl5000_lib = {
.apm_ops = {
.init = iwl5000_apm_init,
.reset = iwl5000_apm_reset,
.stop = iwl5000_apm_stop,
.config = iwl5000_nic_config,
.set_pwr_src = iwl4965_set_pwr_src,
},
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 @@ -125,6 +125,7 @@ struct iwl_lib_ops {
struct {
int (*init)(struct iwl_priv *priv);
int (*reset)(struct iwl_priv *priv);
void (*stop)(struct iwl_priv *priv);
void (*config)(struct iwl_priv *priv);
int (*set_pwr_src)(struct iwl_priv *priv, enum iwl_pwr_src src);
} apm_ops;
Expand Down

0 comments on commit 74218b8

Please sign in to comment.