Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135089
b: refs/heads/master
c: 0c98de6
h: refs/heads/master
i:
  135087: abd46f9
v: v3
  • Loading branch information
Sujith authored and John W. Linville committed Mar 5, 2009
1 parent 9f60902 commit 4517da0
Show file tree
Hide file tree
Showing 3 changed files with 24 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: 707c1b4e68a2811ff2c9e75750a98a3310789a2d
refs/heads/master: 0c98de6535f4de746618547c057dccd442ba968a
2 changes: 2 additions & 0 deletions trunk/drivers/net/wireless/ath9k/ath9k.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ struct ath_rfkill {
#define SC_OP_RFKILL_HW_BLOCKED BIT(13)
#define SC_OP_WAIT_FOR_BEACON BIT(14)
#define SC_OP_LED_ON BIT(15)
#define SC_OP_SCANNING BIT(16)

struct ath_bus_ops {
void (*read_cachesize)(struct ath_softc *sc, int *csz);
Expand Down Expand Up @@ -682,4 +683,5 @@ static inline void ath9k_ps_restore(struct ath_softc *sc)
ath9k_hw_setpower(sc->sc_ah,
sc->sc_ah->restore_mode);
}

#endif /* ATH9K_H */
22 changes: 21 additions & 1 deletion trunk/drivers/net/wireless/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,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.
*/
if (sc->rx.rxfilter & FIF_BCN_PRBRESP_PROMISC)
if (sc->sc_flags & SC_OP_SCANNING)
goto set_timer;

/* Long calibration runs independently of short calibration. */
Expand Down Expand Up @@ -2616,6 +2616,24 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
return ret;
}

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

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

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

mutex_lock(&sc->mutex);
sc->sc_flags &= ~SC_OP_SCANNING;
mutex_unlock(&sc->mutex);
}

struct ieee80211_ops ath9k_ops = {
.tx = ath9k_tx,
.start = ath9k_start,
Expand All @@ -2633,6 +2651,8 @@ struct ieee80211_ops ath9k_ops = {
.set_tsf = ath9k_set_tsf,
.reset_tsf = ath9k_reset_tsf,
.ampdu_action = ath9k_ampdu_action,
.sw_scan_start = ath9k_sw_scan_start,
.sw_scan_complete = ath9k_sw_scan_complete,
};

static struct {
Expand Down

0 comments on commit 4517da0

Please sign in to comment.