linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k: improve max rate retry handling
@ 2010-01-24  2:26 Felix Fietkau
  2010-01-27 17:38 ` Luis R. Rodriguez
  0 siblings, 1 reply; 3+ messages in thread
From: Felix Fietkau @ 2010-01-24  2:26 UTC (permalink / raw)
  To: linux-wireless; +Cc: Luis R. Rodriguez, John W. Linville

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>
---
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -645,8 +645,7 @@ void ath9k_set_hw_capab(struct ath_softc
 	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);
 
--- 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, str
 	 * 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, str
 	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 */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath9k: improve max rate retry handling
  2010-01-24  2:26 [PATCH] ath9k: improve max rate retry handling Felix Fietkau
@ 2010-01-27 17:38 ` Luis R. Rodriguez
  2010-01-27 19:43   ` John W. Linville
  0 siblings, 1 reply; 3+ messages in thread
From: Luis R. Rodriguez @ 2010-01-27 17:38 UTC (permalink / raw)
  To: Felix Fietkau; +Cc: linux-wireless, John W. Linville

On Sat, Jan 23, 2010 at 6:26 PM, Felix Fietkau <nbd@openwrt.org> wrote:
> 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.

If this is not merged yet and if its not too much trouble, would you
mind splitting this into two separate patches, one which increases the
MRR segment retry count, and the other which does what the current
commit log says? Reason is increasing the MRR segment retry count
might be useful as a cherry pick for older kernels.

  Luis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath9k: improve max rate retry handling
  2010-01-27 17:38 ` Luis R. Rodriguez
@ 2010-01-27 19:43   ` John W. Linville
  0 siblings, 0 replies; 3+ messages in thread
From: John W. Linville @ 2010-01-27 19:43 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Felix Fietkau, linux-wireless

On Wed, Jan 27, 2010 at 09:38:06AM -0800, Luis R. Rodriguez wrote:
> On Sat, Jan 23, 2010 at 6:26 PM, Felix Fietkau <nbd@openwrt.org> wrote:
> > 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.
> 
> If this is not merged yet and if its not too much trouble, would you
> mind splitting this into two separate patches, one which increases the
> MRR segment retry count, and the other which does what the current
> commit log says? Reason is increasing the MRR segment retry count
> might be useful as a cherry pick for older kernels.

It's already merged...

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-27 19:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-24  2:26 [PATCH] ath9k: improve max rate retry handling Felix Fietkau
2010-01-27 17:38 ` Luis R. Rodriguez
2010-01-27 19:43   ` John W. Linville

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).