aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-01-23 21:26:11 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-25 16:36:27 -0500
commit658965107e2a45a1a4297cb494adc55797dd9ad1 (patch)
treeb054ad7126162a78507fd451f6b7439576fdb8f1 /drivers/net
parentff27fabe62d288038b36f41ac6a2190ed7d15993 (diff)
ath9k: improve max rate retry handling
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.c12
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 5f78d7a5ff22..c3066b553546 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -640,8 +640,7 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
640 hw->max_rates = 4; 640 hw->max_rates = 4;
641 hw->channel_change_time = 5000; 641 hw->channel_change_time = 5000;
642 hw->max_listen_interval = 10; 642 hw->max_listen_interval = 10;
643 /* Hardware supports 10 but we use 4 */ 643 hw->max_rate_tries = 10;
644 hw->max_rate_tries = 4;
645 hw->sta_data_size = sizeof(struct ath_node); 644 hw->sta_data_size = sizeof(struct ath_node);
646 hw->vif_data_size = sizeof(struct ath_vif); 645 hw->vif_data_size = sizeof(struct ath_vif);
647 646
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index c915954d4d5b..74290137f43d 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -678,13 +678,13 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
678 * For Multi Rate Retry we use a different number of 678 * For Multi Rate Retry we use a different number of
679 * retry attempt counts. This ends up looking like this: 679 * retry attempt counts. This ends up looking like this:
680 * 680 *
681 * MRR[0] = 2 681 * MRR[0] = 4
682 * MRR[1] = 2 682 * MRR[1] = 4
683 * MRR[2] = 2 683 * MRR[2] = 4
684 * MRR[3] = 4 684 * MRR[3] = 8
685 * 685 *
686 */ 686 */
687 try_per_rate = sc->hw->max_rate_tries; 687 try_per_rate = 4;
688 688
689 rate_table = sc->cur_rate_table; 689 rate_table = sc->cur_rate_table;
690 rix = ath_rc_get_highest_rix(sc, ath_rc_priv, rate_table, &is_probe); 690 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,
714 for ( ; i < 4; i++) { 714 for ( ; i < 4; i++) {
715 /* Use twice the number of tries for the last MRR segment. */ 715 /* Use twice the number of tries for the last MRR segment. */
716 if (i + 1 == 4) 716 if (i + 1 == 4)
717 try_per_rate = 4; 717 try_per_rate = 8;
718 718
719 ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &nrix); 719 ath_rc_get_lower_rix(rate_table, ath_rc_priv, rix, &nrix);
720 /* All other rates in the series have RTS enabled */ 720 /* All other rates in the series have RTS enabled */