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:
Bruno Randolf
2011-01-28 16:52:11 +09:00
committed by John W. Linville
parent 4914b3bb7f
commit 76a9f6fd9a
6 changed files with 44 additions and 51 deletions

View File

@@ -2399,7 +2399,8 @@ ath5k_init_softc(struct ath5k_softc *sc, const struct ath_bus_ops *bus_ops)
/* set up multi-rate retry capabilities */
if (sc->ah->ah_version == AR5K_AR5212) {
hw->max_rates = 4;
hw->max_rate_tries = 11;
hw->max_rate_tries = max(AR5K_INIT_RETRY_SHORT,
AR5K_INIT_RETRY_LONG);
}
hw->vif_data_size = sizeof(struct ath5k_vif);