Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159132
b: refs/heads/master
c: 04717cc
h: refs/heads/master
v: v3
  • Loading branch information
Gabor Juhos authored and John W. Linville committed Jul 24, 2009
1 parent 29ea98f commit 53bc54f
Show file tree
Hide file tree
Showing 4 changed files with 17 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: ebaa24534ef54a8f665558536dbef3a761a9b841
refs/heads/master: 04717ccd80e5acc500239222684fcf8d2c759a84
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 @@ -559,6 +559,7 @@ struct ath_softc {
spinlock_t sc_resetlock;
spinlock_t sc_serial_rw;
spinlock_t ani_lock;
spinlock_t sc_pm_lock;
struct mutex mutex;

u8 curbssid[ETH_ALEN];
Expand Down
15 changes: 14 additions & 1 deletion trunk/drivers/net/wireless/ath/ath9k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -2728,7 +2728,8 @@ static bool ath9k_hw_set_power_awake(struct ath_hw *ah, int setChip)
return true;
}

bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
static bool ath9k_hw_setpower_nolock(struct ath_hw *ah,
enum ath9k_power_mode mode)
{
int status = true, setChip = true;
static const char *modes[] = {
Expand Down Expand Up @@ -2762,6 +2763,18 @@ bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
return status;
}

bool ath9k_hw_setpower(struct ath_hw *ah, enum ath9k_power_mode mode)
{
unsigned long flags;
bool ret;

spin_lock_irqsave(&ah->ah_sc->sc_pm_lock, flags);
ret = ath9k_hw_setpower_nolock(ah, mode);
spin_unlock_irqrestore(&ah->ah_sc->sc_pm_lock, flags);

return ret;
}

/*
* Helper for ASPM support.
*
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,7 @@ static int ath_init(u16 devid, struct ath_softc *sc)
spin_lock_init(&sc->sc_resetlock);
spin_lock_init(&sc->sc_serial_rw);
spin_lock_init(&sc->ani_lock);
spin_lock_init(&sc->sc_pm_lock);
mutex_init(&sc->mutex);
tasklet_init(&sc->intr_tq, ath9k_tasklet, (unsigned long)sc);
tasklet_init(&sc->bcon_tasklet, ath_beacon_tasklet,
Expand Down

0 comments on commit 53bc54f

Please sign in to comment.