summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorZefir Kurtisi <zefir.kurtisi@neratec.com>2012-04-03 17:15:50 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-11 16:23:53 -0400
commit8e92d3f24234b467f95276db99a55e1244d14afb (patch)
treea1b9fa1edcd1c0dc107da6a4542be8155faf1315 /drivers
parent6ee159e26f1bb0177b37ebc858693932465839a3 (diff)
downloadlinux-8e92d3f24234b467f95276db99a55e1244d14afb.tar.gz
linux-8e92d3f24234b467f95276db99a55e1244d14afb.tar.bz2
linux-8e92d3f24234b467f95276db99a55e1244d14afb.zip
ath9k: add DFS pattern detector instance to ath_softc
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c4
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 0792d87558ef..0a37631390db 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -26,6 +26,7 @@
#include "debug.h"
#include "common.h"
#include "mci.h"
+#include "dfs.h"
/*
* Header for the ath9k.ko driver core *only* -- hw code nor any other driver
@@ -683,6 +684,7 @@ struct ath_softc {
struct ath_ant_comb ant_comb;
u8 ant_tx, ant_rx;
+ struct dfs_pattern_detector *dfs_detector;
};
void ath9k_tasklet(unsigned long data);
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index daaa86f2463b..7a6b9f69a7b1 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -521,6 +521,8 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
atomic_set(&ah->intr_ref_cnt, -1);
sc->sc_ah = ah;
+ sc->dfs_detector = dfs_pattern_detector_init(NL80211_DFS_UNSET);
+
if (!pdata) {
ah->ah_flags |= AH_USE_EEPROM;
sc->sc_ah->led_pin = -1;
@@ -825,6 +827,8 @@ static void ath9k_deinit_softc(struct ath_softc *sc)
ath_tx_cleanupq(sc, &sc->tx.txq[i]);
ath9k_hw_deinit(sc->sc_ah);
+ if (sc->dfs_detector != NULL)
+ sc->dfs_detector->exit(sc->dfs_detector);
kfree(sc->sc_ah);
sc->sc_ah = NULL;