From 76a9f6fd9adc5ce62b4ea36a099bb1458d4cb7a6 Mon Sep 17 00:00:00 2001 From: Bruno Randolf Date: Fri, 28 Jan 2011 16:52:11 +0900 Subject: 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 Signed-off-by: John W. Linville --- drivers/net/wireless/ath/ath5k/mac80211-ops.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/net/wireless/ath/ath5k/mac80211-ops.c') 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 -- cgit v1.1