ath9k: add DFS pattern detector instance to ath_softc
authorZefir Kurtisi <zefir.kurtisi@neratec.com>
Tue, 3 Apr 2012 15:15:50 +0000 (17:15 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 11 Apr 2012 20:23:53 +0000 (16:23 -0400)
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/init.c

index 0792d87558eff731f4538215deaad423f7d18659..0a37631390db8dc9c6b9c734c77a731b6298283b 100644 (file)
@@ -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);
index daaa86f2463b2e9e69a634b995728e564574fea9..7a6b9f69a7b1ad0ad0e674d0ec5e512c86b74629 100644 (file)
@@ -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;