Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] rtl8187: Fix transmission count sent to mac80211
@ 2008-11-17 15:08 Larry Finger
  2008-11-17 19:42 ` Herton Ronaldo Krzesinski
  0 siblings, 1 reply; 5+ messages in thread
From: Larry Finger @ 2008-11-17 15:08 UTC (permalink / raw)
  To: John W Linville, Johannes Berg
  Cc: Herton Ronaldo Krzesinski, Hin-Tak Leung, linux-wireless

In the commit entitled "mac80211/drivers: rewrite the rate control API"
(commit 9ea2c74de0ec971e8ec9fc5aaea9cd5b4fec95b6), the meaning of the packet
transmit count was changed from the number of retries to the total number.
In driver rtl8187, this change was missed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---

Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -488,7 +488,7 @@ static void rtl8187b_status_cb(struct ur
 			__skb_unlink(skb, &priv->b_tx_status.queue);
 			if (tok)
 				info->flags |= IEEE80211_TX_STAT_ACK;
-			info->status.rates[0].count = pkt_rc;
+			info->status.rates[0].count = pkt_rc + 1;
 
 			ieee80211_tx_status_irqsafe(hw, skb);
 		}

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

* Re: [PATCH] rtl8187: Fix transmission count sent to mac80211
  2008-11-17 15:08 [PATCH] rtl8187: Fix transmission count sent to mac80211 Larry Finger
@ 2008-11-17 19:42 ` Herton Ronaldo Krzesinski
  2008-11-17 19:47   ` Johannes Berg
  0 siblings, 1 reply; 5+ messages in thread
From: Herton Ronaldo Krzesinski @ 2008-11-17 19:42 UTC (permalink / raw)
  To: Larry Finger
  Cc: John W Linville, Johannes Berg, Hin-Tak Leung, linux-wireless

On Monday 17 November 2008 13:08:21 Larry Finger wrote:
> In the commit entitled "mac80211/drivers: rewrite the rate control API"
> (commit 9ea2c74de0ec971e8ec9fc5aaea9cd5b4fec95b6), the meaning of the
> packet transmit count was changed from the number of retries to the total
> number. In driver rtl8187, this change was missed.

With this change as before, when using pid, rate never go above 1M in testing 
here (minstrel doesn't have the same issue). May be because this in 
rate_control_pid_tx_status (inside rc80211_pid_algo.c)?

        if (!(info->flags & IEEE80211_TX_STAT_ACK)) {
                spinfo->tx_num_failed += 2;
                spinfo->tx_num_xmit++;
        } else if (info->status.rates[0].count) {
                spinfo->tx_num_failed++;
                spinfo->tx_num_xmit++;
        }

as pkt_rc + 1, looks like we always will increment tx_num_failed, and may be 
it's causing this. Well this is only judging by a quick look, I may be wrong.

>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> ---
>
> Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_dev.c
> +++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
> @@ -488,7 +488,7 @@ static void rtl8187b_status_cb(struct ur
>  			__skb_unlink(skb, &priv->b_tx_status.queue);
>  			if (tok)
>  				info->flags |= IEEE80211_TX_STAT_ACK;
> -			info->status.rates[0].count = pkt_rc;
> +			info->status.rates[0].count = pkt_rc + 1;
>
>  			ieee80211_tx_status_irqsafe(hw, skb);
>  		}

--
[]'s
Herton

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

* Re: [PATCH] rtl8187: Fix transmission count sent to mac80211
  2008-11-17 19:42 ` Herton Ronaldo Krzesinski
@ 2008-11-17 19:47   ` Johannes Berg
  2008-11-17 20:29     ` Herton Ronaldo Krzesinski
  0 siblings, 1 reply; 5+ messages in thread
From: Johannes Berg @ 2008-11-17 19:47 UTC (permalink / raw)
  To: Herton Ronaldo Krzesinski
  Cc: Larry Finger, John W Linville, Hin-Tak Leung, linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1156 bytes --]

On Mon, 2008-11-17 at 17:42 -0200, Herton Ronaldo Krzesinski wrote:
> On Monday 17 November 2008 13:08:21 Larry Finger wrote:
> > In the commit entitled "mac80211/drivers: rewrite the rate control API"
> > (commit 9ea2c74de0ec971e8ec9fc5aaea9cd5b4fec95b6), the meaning of the
> > packet transmit count was changed from the number of retries to the total
> > number. In driver rtl8187, this change was missed.
> 
> With this change as before, when using pid, rate never go above 1M in testing 
> here (minstrel doesn't have the same issue). May be because this in 
> rate_control_pid_tx_status (inside rc80211_pid_algo.c)?
> 
>         if (!(info->flags & IEEE80211_TX_STAT_ACK)) {
>                 spinfo->tx_num_failed += 2;
>                 spinfo->tx_num_xmit++;
>         } else if (info->status.rates[0].count) {
>                 spinfo->tx_num_failed++;
>                 spinfo->tx_num_xmit++;
>         }
> 
> as pkt_rc + 1, looks like we always will increment tx_num_failed, and may be 
> it's causing this. Well this is only judging by a quick look, I may be wrong.

Larry recently fixed the above code too.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

* Re: [PATCH] rtl8187: Fix transmission count sent to mac80211
  2008-11-17 19:47   ` Johannes Berg
@ 2008-11-17 20:29     ` Herton Ronaldo Krzesinski
  2008-11-17 21:19       ` Hin-Tak Leung
  0 siblings, 1 reply; 5+ messages in thread
From: Herton Ronaldo Krzesinski @ 2008-11-17 20:29 UTC (permalink / raw)
  To: Johannes Berg
  Cc: Larry Finger, John W Linville, Hin-Tak Leung, linux-wireless

On Monday 17 November 2008 17:47:07 Johannes Berg wrote:
> On Mon, 2008-11-17 at 17:42 -0200, Herton Ronaldo Krzesinski wrote:
> > On Monday 17 November 2008 13:08:21 Larry Finger wrote:
> > > In the commit entitled "mac80211/drivers: rewrite the rate control API"
> > > (commit 9ea2c74de0ec971e8ec9fc5aaea9cd5b4fec95b6), the meaning of the
> > > packet transmit count was changed from the number of retries to the
> > > total number. In driver rtl8187, this change was missed.
> >
> > With this change as before, when using pid, rate never go above 1M in
> > testing here (minstrel doesn't have the same issue). May be because this
> > in rate_control_pid_tx_status (inside rc80211_pid_algo.c)?
> >
> >         if (!(info->flags & IEEE80211_TX_STAT_ACK)) {
> >                 spinfo->tx_num_failed += 2;
> >                 spinfo->tx_num_xmit++;
> >         } else if (info->status.rates[0].count) {
> >                 spinfo->tx_num_failed++;
> >                 spinfo->tx_num_xmit++;
> >         }
> >
> > as pkt_rc + 1, looks like we always will increment tx_num_failed, and may
> > be it's causing this. Well this is only judging by a quick look, I may be
> > wrong.
>
> Larry recently fixed the above code too.

Ah nice, I didn't saw it, I'm usually lagging reading mail... I saw it now.

Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>

>
> johannes

-- 
[]'s
Herton

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

* Re: [PATCH] rtl8187: Fix transmission count sent to mac80211
  2008-11-17 20:29     ` Herton Ronaldo Krzesinski
@ 2008-11-17 21:19       ` Hin-Tak Leung
  0 siblings, 0 replies; 5+ messages in thread
From: Hin-Tak Leung @ 2008-11-17 21:19 UTC (permalink / raw)
  To: Herton Ronaldo Krzesinski
  Cc: Johannes Berg, Larry Finger, John W Linville, linux-wireless

On Mon, Nov 17, 2008 at 8:29 PM, Herton Ronaldo Krzesinski
<herton@mandriva.com.br> wrote:
<sniped>
> Ah nice, I didn't saw it, I'm usually lagging reading mail... I saw it now.
>
> Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>

Tried the one-liner change on top of wireless-testing. Works alright
- no noticeable regression.

BTW, i don't check my gmail account as often than the other account
(and the sf accounts redirects
to that other account).

Hin-Tak

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

end of thread, other threads:[~2008-11-17 21:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-17 15:08 [PATCH] rtl8187: Fix transmission count sent to mac80211 Larry Finger
2008-11-17 19:42 ` Herton Ronaldo Krzesinski
2008-11-17 19:47   ` Johannes Berg
2008-11-17 20:29     ` Herton Ronaldo Krzesinski
2008-11-17 21:19       ` Hin-Tak Leung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox