aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/main.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-03-02 23:46:45 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-03-05 14:39:41 -0500
commit0c98de6535f4de746618547c057dccd442ba968a (patch)
tree366df1959dec4e60acba3a726bde46aad6453ec3 /drivers/net/wireless/ath9k/main.c
parent707c1b4e68a2811ff2c9e75750a98a3310789a2d (diff)
ath9k: Use new scan notifiers from mac80211
The only use case for this right now is ANI calibration, but more might come up in the future. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath9k/main.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 59b769e716fc..48beef9235b3 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -327,7 +327,7 @@ static void ath_ani_calibrate(unsigned long data)
327 * don't calibrate when we're scanning. 327 * don't calibrate when we're scanning.
328 * we are most likely not on our home channel. 328 * we are most likely not on our home channel.
329 */ 329 */
330 if (sc->rx.rxfilter & FIF_BCN_PRBRESP_PROMISC) 330 if (sc->sc_flags & SC_OP_SCANNING)
331 goto set_timer; 331 goto set_timer;
332 332
333 /* Long calibration runs independently of short calibration. */ 333 /* Long calibration runs independently of short calibration. */
@@ -2616,6 +2616,24 @@ static int ath9k_ampdu_action(struct ieee80211_hw *hw,
2616 return ret; 2616 return ret;
2617} 2617}
2618 2618
2619static void ath9k_sw_scan_start(struct ieee80211_hw *hw)
2620{
2621 struct ath_softc *sc = hw->priv;
2622
2623 mutex_lock(&sc->mutex);
2624 sc->sc_flags |= SC_OP_SCANNING;
2625 mutex_unlock(&sc->mutex);
2626}
2627
2628static void ath9k_sw_scan_complete(struct ieee80211_hw *hw)
2629{
2630 struct ath_softc *sc = hw->priv;
2631
2632 mutex_lock(&sc->mutex);
2633 sc->sc_flags &= ~SC_OP_SCANNING;
2634 mutex_unlock(&sc->mutex);
2635}
2636
2619struct ieee80211_ops ath9k_ops = { 2637struct ieee80211_ops ath9k_ops = {
2620 .tx = ath9k_tx, 2638 .tx = ath9k_tx,
2621 .start = ath9k_start, 2639 .start = ath9k_start,
@@ -2633,6 +2651,8 @@ struct ieee80211_ops ath9k_ops = {
2633 .set_tsf = ath9k_set_tsf, 2651 .set_tsf = ath9k_set_tsf,
2634 .reset_tsf = ath9k_reset_tsf, 2652 .reset_tsf = ath9k_reset_tsf,
2635 .ampdu_action = ath9k_ampdu_action, 2653 .ampdu_action = ath9k_ampdu_action,
2654 .sw_scan_start = ath9k_sw_scan_start,
2655 .sw_scan_complete = ath9k_sw_scan_complete,
2636}; 2656};
2637 2657
2638static struct { 2658static struct {