]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ath9k_hw: inform ANI calibration when scanning
authorLuis R. Rodriguez <lrodriguez@atheros.com>
Sat, 12 Jun 2010 04:33:44 +0000 (00:33 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 Jun 2010 19:39:29 +0000 (15:39 -0400)
The new ANI implementation will use this to skip ANI
calibration upon a scan. This cannot be ported to the
older ANI implementation unless default ANI values from
the ANI are also used upon a scan. This is essentially
what one of the things thenew ANI does.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ani.c
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
drivers/net/wireless/ath/ath9k/hw-ops.h
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/ath9k/mac.c
drivers/net/wireless/ath/ath9k/mac.h
drivers/net/wireless/ath/ath9k/recv.c

index 28a1dc375171029660ad273173608bf80191db7b..f5b971973d31951cfd3c4dc4572d37368474ee76 100644 (file)
@@ -322,7 +322,7 @@ static int32_t ath9k_hw_ani_get_listen_time(struct ath_hw *ah)
        return listenTime;
 }
 
-static void ath9k_ani_reset_old(struct ath_hw *ah)
+static void ath9k_ani_reset_old(struct ath_hw *ah, bool is_scanning)
 {
        struct ar5416AniState *aniState;
        struct ath9k_channel *chan = ah->curchan;
index f0cca4e36f7d8302c15bf52ec29b7a675dc91c6b..ffebd5a6172607875f2f08f232ad66494169a220 100644 (file)
@@ -416,7 +416,7 @@ void ath9k_host_rx_init(struct ath9k_htc_priv *priv)
 {
        ath9k_hw_rxena(priv->ah);
        ath9k_htc_opmode_init(priv);
-       ath9k_hw_startpcureceive(priv->ah);
+       ath9k_hw_startpcureceive(priv->ah, (priv->op_flags & OP_SCANNING));
        priv->rx.last_rssi = ATH_RSSI_DUMMY_MARKER;
 }
 
index 65d2c661efb0d33f8879a10e75d478b8f845eaf7..381da6c93b140933bcc91ded465a451032609064 100644 (file)
@@ -288,9 +288,9 @@ static inline bool ath9k_hw_iscal_supported(struct ath_hw *ah,
        return ath9k_hw_private_ops(ah)->iscal_supported(ah, calType);
 }
 
-static inline void ath9k_ani_reset(struct ath_hw *ah)
+static inline void ath9k_ani_reset(struct ath_hw *ah, bool is_scanning)
 {
-       ath9k_hw_private_ops(ah)->ani_reset(ah);
+       ath9k_hw_private_ops(ah)->ani_reset(ah, is_scanning);
 }
 
 #endif /* ATH9K_HW_OPS_H */
index a207a70224c0c8203e368ab1c154c9af06fdf720..790a4572270f92e6876bdc302aa962a939a8ea0c 100644 (file)
@@ -565,7 +565,7 @@ struct ath_hw_private_ops {
        void (*loadnf)(struct ath_hw *ah, struct ath9k_channel *chan);
 
        /* ANI */
-       void (*ani_reset)(struct ath_hw *ah);
+       void (*ani_reset)(struct ath_hw *ah, bool is_scanning);
        void (*ani_lower_immunity)(struct ath_hw *ah);
 };
 
index b4d01983e7e10eab98ed17e17d1fd45df47e7402..1550591ed41710f14ee0619c67b05ddc55d5da11 100644 (file)
@@ -757,11 +757,11 @@ void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp)
 }
 EXPORT_SYMBOL(ath9k_hw_putrxbuf);
 
-void ath9k_hw_startpcureceive(struct ath_hw *ah)
+void ath9k_hw_startpcureceive(struct ath_hw *ah, bool is_scanning)
 {
        ath9k_enable_mib_counters(ah);
 
-       ath9k_ani_reset(ah);
+       ath9k_ani_reset(ah, is_scanning);
 
        REG_CLR_BIT(ah, AR_DIAG_SW, (AR_DIAG_RX_DIS | AR_DIAG_RX_ABORT));
 }
index 00f3e0c7528a185e31abe85a2ce520e7524e2a12..3c65c91b049beabe15255b33b961c6414e5e8aa2 100644 (file)
@@ -715,7 +715,7 @@ void ath9k_hw_setuprxdesc(struct ath_hw *ah, struct ath_desc *ds,
                          u32 size, u32 flags);
 bool ath9k_hw_setrxabort(struct ath_hw *ah, bool set);
 void ath9k_hw_putrxbuf(struct ath_hw *ah, u32 rxdp);
-void ath9k_hw_startpcureceive(struct ath_hw *ah);
+void ath9k_hw_startpcureceive(struct ath_hw *ah, bool is_scanning);
 void ath9k_hw_stoppcurecv(struct ath_hw *ah);
 void ath9k_hw_abortpcurecv(struct ath_hw *ah);
 bool ath9k_hw_stopdmarecv(struct ath_hw *ah);
index d373364ef8a928f6c35934652f787f8f548a70f8..5141cd81b5d040c645d48293767857b302dbdb1e 100644 (file)
@@ -295,7 +295,7 @@ static void ath_edma_start_recv(struct ath_softc *sc)
 
        ath_opmode_init(sc);
 
-       ath9k_hw_startpcureceive(sc->sc_ah);
+       ath9k_hw_startpcureceive(sc->sc_ah, (sc->sc_flags & SC_OP_SCANNING));
 }
 
 static void ath_edma_stop_recv(struct ath_softc *sc)
@@ -501,7 +501,7 @@ int ath_startrecv(struct ath_softc *sc)
 start_recv:
        spin_unlock_bh(&sc->rx.rxbuflock);
        ath_opmode_init(sc);
-       ath9k_hw_startpcureceive(ah);
+       ath9k_hw_startpcureceive(ah, (sc->sc_flags & SC_OP_SCANNING));
 
        return 0;
 }