Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a97b1f3d203d0fe5503578c6ee8bfdb89ed72679
Commit:     a97b1f3d203d0fe5503578c6ee8bfdb89ed72679
Parent:     281c56dd276e587a7b4a65764ac68ae250e73235
Author:     Jussi Kivilinna <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 6 15:36:10 2008 +0200
Committer:  John W. Linville <[EMAIL PROTECTED]>
CommitDate: Fri Feb 15 13:44:17 2008 -0500

    rndis_wlan: enable stall workaround by link quality instead of link speed
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: John W. Linville <[EMAIL PROTECTED]>
---
 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 git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to