summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath9k/main.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-03-03 04:46:45 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2009-03-05 19:39:41 (GMT)
commit0c98de6535f4de746618547c057dccd442ba968a (patch)
tree366df1959dec4e60acba3a726bde46aad6453ec3 /drivers/net/wireless/ath9k/main.c
parent707c1b4e68a2811ff2c9e75750a98a3310789a2d (diff)
downloadlinux-fsl-qoriq-0c98de6535f4de746618547c057dccd442ba968a.tar.xz
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 59b769e..48beef9 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)
* 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. */
@@ -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,
@@ -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 {