]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ath9k: improve max rate retry handling
authorFelix Fietkau <nbd@openwrt.org>
Sun, 24 Jan 2010 02:26:11 +0000 (03:26 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 25 Jan 2010 21:36:27 +0000 (16:36 -0500)
ath9k currently forces hw->max_rate_tries to 4 to work around rate
control inefficiencies. This has some negative side effects, such as
rate_control_send_low also using a maximum of 4 tries, which could
negatively affect reliability of unicast management frames.
This patch pushes the retry limit to the rate control instead, and
allows it to use more tries on the last stage to prevent unnecessary
packet loss.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/init.c
drivers/net/wireless/ath/ath9k/rc.c

index 5f78d7a5ff226fe5d1085b22d266bd76f333d1fa..c3066b553546afea3067209670c5b59e00e35c35 100644 (file)
@@ -640,8 +640,7 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
        hw->max_rates = 4;
        hw->channel_change_time = 5000;
        hw->max_listen_interval = 10;
-       /* Hardware supports 10 but we use 4 */
-       hw->max_rate_tries = 4;
+       hw->max_rate_tries = 10;
        hw->sta_data_size = sizeof(struct ath_node);
        hw->vif_data_size = sizeof(struct ath_vif);
 
index c915954d4d5bff58d686a947492bba9b5ce96cec..74290137f43d7544923a996a42a7597e0a98a96b 100644 (file)
@@ -678,13 +678,13 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
         * For Multi Rate Retry we use a different number of
         * retry attempt counts. This ends up looking like this:
         *
-        * MRR[0] = 2
-        * MRR[1] = 2
-        * MRR[2] = 2
-        * MRR[3] = 4
+        * MRR[0] = 4
+        * MRR[1] = 4
+        * MRR[2] = 4
+        * MRR[3] = 8
         *
         */
-       try_per_rate = sc->hw->max_rate_tries;
+       try_per_rate = 4;
 
        rate_table = sc->cur_rate_table;
        rix = ath_rc_get_highest_rix(sc, ath_rc_priv, rate_table, &is_probe);
@@ -714,7 +714,7 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
        for ( ; i < 4; i++) {
                /* Use twice the number of tries for the last MRR segment. */
                if (i + 1 == 4)
-                       try_per_rate = 4;
+                       try_per_rate = 8;
 
                ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &nrix);
                /* All other rates in the series have RTS enabled */