Linux wireless drivers development
 help / color / mirror / Atom feed
From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
To: linux-wireless <linux-wireless@vger.kernel.org>
Cc: linville@tuxdriver.com
Subject: Re: [PATCH] rndis_wlan: enable stall workaround by link quality instead of link speed
Date: Sat, 16 Feb 2008 12:06:16 +0200	[thread overview]
Message-ID: <1203156376.7931.5.camel@localhost> (raw)
In-Reply-To: <20080206133609.12743.17426.stgit@fate.lan>

Hello,

Did I send this patch to right person/place, I hope this gets on 2.6.25.

 - Jussi

On Wed, 2008-02-06 at 15:36 +0200, Jussi Kivilinna wrote:
> Enable workaround for poor link stalls by link quality instead of link
> speed. Using link speed caused workaround be active always on 802.11b
> networks which reduced performance and not even catch all stalls.
> 
> Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
> ---
> 
>  drivers/net/wireless/rndis_wlan.c |   14 +++++---------
>  1 files changed, 5 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
> index d3ecf89..8ce2ddf 100644
> --- a/drivers/net/wireless/rndis_wlan.c
> +++ b/drivers/net/wireless/rndis_wlan.c
> @@ -2300,7 +2300,7 @@ static void rndis_update_wireless_stats(struct work_struct *work)
>  	struct usbnet *usbdev = priv->usbdev;
>  	struct iw_statistics iwstats;
>  	__le32 rssi, tmp;
> -	int len, ret, bitrate, j;
> +	int len, ret, j;
>  	unsigned long flags;
>  	int update_jiffies = STATS_UPDATE_JIFFIES;
>  	void *buf;
> @@ -2352,14 +2352,10 @@ static void rndis_update_wireless_stats(struct work_struct *work)
>  	if (ret == 0)
>  		iwstats.discard.misc += le32_to_cpu(tmp);
>  
> -	/* Workaround transfer stalls on poor quality links. */
> -	len = sizeof(tmp);
> -	ret = rndis_query_oid(usbdev, OID_GEN_LINK_SPEED, &tmp, &len);
> -	if (ret == 0) {
> -		bitrate = le32_to_cpu(tmp) * 100;
> -		if (bitrate > 11000000)
> -			goto end;
> -
> +	/* Workaround transfer stalls on poor quality links.
> +	 * TODO: find right way to fix these stalls (as stalls do not happen
> +	 * with ndiswrapper/windows driver). */
> +	if (iwstats.qual.qual <= 25) {
>  		/* Decrease stats worker interval to catch stalls.
>  		 * faster. Faster than 400-500ms causes packet loss,
>  		 * Slower doesn't catch stalls fast enough.
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 


  reply	other threads:[~2008-02-16 10:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-06 13:36 [PATCH] rndis_wlan: enable stall workaround by link quality instead of link speed Jussi Kivilinna
2008-02-16 10:06 ` Jussi Kivilinna [this message]
2008-02-16 14:33   ` John W. Linville

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1203156376.7931.5.camel@localhost \
    --to=jussi.kivilinna@mbnet.fi \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox