Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158919
b: refs/heads/master
c: e5f0921
h: refs/heads/master
i:
  158917: 95ffe9f
  158915: 7bc4dcc
  158911: dc516af
v: v3
  • Loading branch information
Senthil Balasubramanian authored and John W. Linville committed Jul 10, 2009
1 parent fc4d99b commit 1c89c8d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 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: f38faa31e0da07390d72fb67d3151e56c54871f4
refs/heads/master: e5f0921a9593365b506f69daa3cfd19c0ed1340b
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 @@ -540,6 +540,7 @@ struct ath_softc {
int irq;
spinlock_t sc_resetlock;
spinlock_t sc_serial_rw;
spinlock_t ani_lock;
struct mutex mutex;

u8 curbssid[ETH_ALEN];
Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ static void ath_ani_calibrate(unsigned long data)
* don't calibrate when we're scanning.
* we are most likely not on our home channel.
*/
spin_lock(&sc->ani_lock);
if (sc->sc_flags & SC_OP_SCANNING)
goto set_timer;

Expand Down Expand Up @@ -405,6 +406,7 @@ static void ath_ani_calibrate(unsigned long data)
ath9k_ps_restore(sc);

set_timer:
spin_unlock(&sc->ani_lock);
/*
* Set timer interval based on previous results.
* The interval must be the shortest necessary to satisfy ANI,
Expand Down Expand Up @@ -1310,6 +1312,7 @@ static int ath_init(u16 devid, struct ath_softc *sc)
spin_lock_init(&sc->wiphy_lock);
spin_lock_init(&sc->sc_resetlock);
spin_lock_init(&sc->sc_serial_rw);
spin_lock_init(&sc->ani_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 Expand Up @@ -2682,21 +2685,21 @@ static void ath9k_sw_scan_start(struct ieee80211_hw *hw)
aphy->state = ATH_WIPHY_SCAN;
ath9k_wiphy_pause_all_forced(sc, aphy);

mutex_lock(&sc->mutex);
spin_lock_bh(&sc->ani_lock);
sc->sc_flags |= SC_OP_SCANNING;
mutex_unlock(&sc->mutex);
spin_unlock_bh(&sc->ani_lock);
}

static void ath9k_sw_scan_complete(struct ieee80211_hw *hw)
{
struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc;

mutex_lock(&sc->mutex);
spin_lock_bh(&sc->ani_lock);
aphy->state = ATH_WIPHY_ACTIVE;
sc->sc_flags &= ~SC_OP_SCANNING;
sc->sc_flags |= SC_OP_FULL_RESET;
mutex_unlock(&sc->mutex);
spin_unlock_bh(&sc->ani_lock);
}

struct ieee80211_ops ath9k_ops = {
Expand Down

0 comments on commit 1c89c8d

Please sign in to comment.