diff options
author | Bruno Randolf <br1@einfach.org> | 2010-03-09 02:55:28 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-10 17:44:32 -0500 |
commit | caec9112d6cb07cb5b82a967a448c3b15b257654 (patch) | |
tree | d590f4044585a288d10847694e0d36dfe77cc71b | |
parent | 604eeadd1880bddfb155369491cc13fb8d3f9df6 (diff) |
ath5k: preserve antenna settings
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>
-rw-r--r-- | drivers/net/wireless/ath/ath5k/attach.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/phy.c | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath5k/attach.c b/drivers/net/wireless/ath/ath5k/attach.c index 42284445b75e..c8bb102a4db4 100644 --- a/drivers/net/wireless/ath/ath5k/attach.c +++ b/drivers/net/wireless/ath/ath5k/attach.c | |||
@@ -123,6 +123,7 @@ int ath5k_hw_attach(struct ath5k_softc *sc) | |||
123 | ah->ah_cw_min = AR5K_TUNE_CWMIN; | 123 | ah->ah_cw_min = AR5K_TUNE_CWMIN; |
124 | ah->ah_limit_tx_retries = AR5K_INIT_TX_RETRY; | 124 | ah->ah_limit_tx_retries = AR5K_INIT_TX_RETRY; |
125 | ah->ah_software_retry = false; | 125 | ah->ah_software_retry = false; |
126 | ah->ah_ant_mode = AR5K_ANTMODE_DEFAULT; | ||
126 | 127 | ||
127 | /* | 128 | /* |
128 | * Find the mac version | 129 | * Find the mac version |
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index e7a989c707ac..fdf3190e4611 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -2971,7 +2971,7 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed) | |||
2971 | * then we must allow the user to set how many tx antennas we | 2971 | * then we must allow the user to set how many tx antennas we |
2972 | * have available | 2972 | * have available |
2973 | */ | 2973 | */ |
2974 | ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT); | 2974 | ath5k_hw_set_antenna_mode(ah, ah->ah_ant_mode); |
2975 | 2975 | ||
2976 | unlock: | 2976 | unlock: |
2977 | mutex_unlock(&sc->lock); | 2977 | mutex_unlock(&sc->lock); |
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index 10ad877c2cdf..5aee85f27c0e 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c | |||
@@ -1929,6 +1929,7 @@ ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode) | |||
1929 | 1929 | ||
1930 | ah->ah_tx_ant = tx_ant; | 1930 | ah->ah_tx_ant = tx_ant; |
1931 | ah->ah_ant_mode = ant_mode; | 1931 | ah->ah_ant_mode = ant_mode; |
1932 | ah->ah_def_ant = def_ant; | ||
1932 | 1933 | ||
1933 | sta_id1 |= use_def_for_tx ? AR5K_STA_ID1_DEFAULT_ANTENNA : 0; | 1934 | sta_id1 |= use_def_for_tx ? AR5K_STA_ID1_DEFAULT_ANTENNA : 0; |
1934 | sta_id1 |= update_def_on_tx ? AR5K_STA_ID1_DESC_ANTENNA : 0; | 1935 | sta_id1 |= update_def_on_tx ? AR5K_STA_ID1_DESC_ANTENNA : 0; |