]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
ath5k: preserve antenna settings
authorBruno Randolf <br1@einfach.org>
Tue, 9 Mar 2010 07:55:28 +0000 (16:55 +0900)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 10 Mar 2010 22:44:32 +0000 (17:44 -0500)
save antenna settings and preserve across resets.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath5k/attach.c
drivers/net/wireless/ath/ath5k/base.c
drivers/net/wireless/ath/ath5k/phy.c

index 42284445b75e72beeb6cc68d0356c74cc4ba21fc..c8bb102a4db4560427a08a1d43782f86a875c09d 100644 (file)
@@ -123,6 +123,7 @@ int ath5k_hw_attach(struct ath5k_softc *sc)
        ah->ah_cw_min = AR5K_TUNE_CWMIN;
        ah->ah_limit_tx_retries = AR5K_INIT_TX_RETRY;
        ah->ah_software_retry = false;
+       ah->ah_ant_mode = AR5K_ANTMODE_DEFAULT;
 
        /*
         * Find the mac version
index e7a989c707ac2e0824935fe85e24faf4d6a3e6ea..fdf3190e4611888e529ef7b8af9816421778e8c1 100644 (file)
@@ -2971,7 +2971,7 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)
         * then we must allow the user to set how many tx antennas we
         * have available
         */
-       ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT);
+       ath5k_hw_set_antenna_mode(ah, ah->ah_ant_mode);
 
 unlock:
        mutex_unlock(&sc->lock);
index 10ad877c2cdfa88f9dc3ac29875d49b866ed8e14..5aee85f27c0e2622d2b51c3303b0a6f69f6051de 100644 (file)
@@ -1929,6 +1929,7 @@ ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode)
 
        ah->ah_tx_ant = tx_ant;
        ah->ah_ant_mode = ant_mode;
+       ah->ah_def_ant = def_ant;
 
        sta_id1 |= use_def_for_tx ? AR5K_STA_ID1_DEFAULT_ANTENNA : 0;
        sta_id1 |= update_def_on_tx ? AR5K_STA_ID1_DESC_ANTENNA : 0;