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>
This commit is contained in:
committed by
John W. Linville
parent
4914b3bb7f
commit
76a9f6fd9a
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user