aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2008-02-06 08:36:10 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-15 13:44:17 -0500
commita97b1f3d203d0fe5503578c6ee8bfdb89ed72679 (patch)
tree03bae078da4cb791ce044df34bcbe1afcf2d585a /drivers/net/wireless
parent281c56dd276e587a7b4a65764ac68ae250e73235 (diff)
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 <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/rndis_wlan.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index d3ecf89abd93..8ce2ddf8024f 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)
2300 struct usbnet *usbdev = priv->usbdev; 2300 struct usbnet *usbdev = priv->usbdev;
2301 struct iw_statistics iwstats; 2301 struct iw_statistics iwstats;
2302 __le32 rssi, tmp; 2302 __le32 rssi, tmp;
2303 int len, ret, bitrate, j; 2303 int len, ret, j;
2304 unsigned long flags; 2304 unsigned long flags;
2305 int update_jiffies = STATS_UPDATE_JIFFIES; 2305 int update_jiffies = STATS_UPDATE_JIFFIES;
2306 void *buf; 2306 void *buf;
@@ -2352,14 +2352,10 @@ static void rndis_update_wireless_stats(struct work_struct *work)
2352 if (ret == 0) 2352 if (ret == 0)
2353 iwstats.discard.misc += le32_to_cpu(tmp); 2353 iwstats.discard.misc += le32_to_cpu(tmp);
2354 2354
2355 /* Workaround transfer stalls on poor quality links. */ 2355 /* Workaround transfer stalls on poor quality links.
2356 len = sizeof(tmp); 2356 * TODO: find right way to fix these stalls (as stalls do not happen
2357 ret = rndis_query_oid(usbdev, OID_GEN_LINK_SPEED, &tmp, &len); 2357 * with ndiswrapper/windows driver). */
2358 if (ret == 0) { 2358 if (iwstats.qual.qual <= 25) {
2359 bitrate = le32_to_cpu(tmp) * 100;
2360 if (bitrate > 11000000)
2361 goto end;
2362
2363 /* Decrease stats worker interval to catch stalls. 2359 /* Decrease stats worker interval to catch stalls.
2364 * faster. Faster than 400-500ms causes packet loss, 2360 * faster. Faster than 400-500ms causes packet loss,
2365 * Slower doesn't catch stalls fast enough. 2361 * Slower doesn't catch stalls fast enough.