aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/mac80211-ops.c
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2011-01-28 16:52:11 +0900
committerJohn W. Linville <linville@tuxdriver.com>2011-01-28 15:46:23 -0500
commit76a9f6fd9adc5ce62b4ea36a099bb1458d4cb7a6 (patch)
tree49cb62eea2aae4415e967900ab514d9956f5c593 /drivers/net/wireless/ath/ath5k/mac80211-ops.c
parent4914b3bb7fa6badc25e77e22c47fde22b924b53f (diff)
downloadkernel_samsung_smdk4412-76a9f6fd9adc5ce62b4ea36a099bb1458d4cb7a6.zip
kernel_samsung_smdk4412-76a9f6fd9adc5ce62b4ea36a099bb1458d4cb7a6.tar.gz
kernel_samsung_smdk4412-76a9f6fd9adc5ce62b4ea36a099bb1458d4cb7a6.tar.bz2
ath5k: Fix short and long retry configuration
The register definition for retry configuration on AR5212 was wrong, and simply copied over from AR5210. Update the register definitions from the documentation. Let the short and long retries be configured from mac80211 and use the standard values of 7 and 4 by default. Also we need to make sure we don't export more retries than we are configured for to mac80211 (and the rate module) in hw->max_rate_tries. Also clean up the code by removing unused defines and variables and drop the different values for "station retries" - if these need to be different it can be handled tru ah_retry_long/short. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/mac80211-ops.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/mac80211-ops.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index d76d68c..36a5199 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -226,6 +226,7 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)
struct ath5k_hw *ah = sc->ah;
struct ieee80211_conf *conf = &hw->conf;
int ret = 0;
+ int i;
mutex_lock(&sc->lock);
@@ -243,6 +244,14 @@ ath5k_config(struct ieee80211_hw *hw, u32 changed)
ath5k_hw_set_txpower_limit(ah, (conf->power_level * 2));
}
+ if (changed & IEEE80211_CONF_CHANGE_RETRY_LIMITS) {
+ ah->ah_retry_long = conf->long_frame_max_tx_count;
+ ah->ah_retry_short = conf->short_frame_max_tx_count;
+
+ for (i = 0; i < ah->ah_capabilities.cap_queues.q_tx_num; i++)
+ ath5k_hw_set_tx_retry_limits(ah, i);
+ }
+
/* TODO:
* 1) Move this on config_interface and handle each case
* separately eg. when we have only one STA vif, use