Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 183924
b: refs/heads/master
c: 1dbfd9d
h: refs/heads/master
v: v3
  • Loading branch information
Vivek Natarajan authored and John W. Linville committed Jan 29, 2010
1 parent 19f151e commit 3aa782e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 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: f276586a8af410d2b79733daf52471605b6559e9
refs/heads/master: 1dbfd9d46a6df5232ba0b12d2da950da89eff3da
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,7 @@ struct ath_softc {
u8 nbcnvifs;
u16 nvifs;
bool ps_enabled;
bool ps_idle;
unsigned long ps_usecount;
enum ath9k_int imask;

Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,10 @@ void ath9k_ps_restore(struct ath_softc *sc)
if (--sc->ps_usecount != 0)
goto unlock;

if (sc->ps_enabled &&
!(sc->ps_flags & (PS_WAIT_FOR_BEACON |
if (sc->ps_idle)
ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_FULL_SLEEP);
else if (sc->ps_enabled &&
!(sc->ps_flags & (PS_WAIT_FOR_BEACON |
PS_WAIT_FOR_CAB |
PS_WAIT_FOR_PSPOLL_DATA |
PS_WAIT_FOR_TX_ACK)))
Expand Down Expand Up @@ -1528,6 +1530,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
spin_unlock_bh(&sc->wiphy_lock);

if (enable_radio) {
sc->ps_idle = false;
ath_radio_enable(sc, hw);
ath_print(common, ATH_DBG_CONFIG,
"not-idle: enabling radio\n");
Expand Down Expand Up @@ -1635,6 +1638,7 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)

if (disable_radio) {
ath_print(common, ATH_DBG_CONFIG, "idle: disabling radio\n");
sc->ps_idle = true;
ath_radio_disable(sc, hw);
}

Expand Down

0 comments on commit 3aa782e

Please sign in to comment.