diff options
Diffstat (limited to 'drivers/net/wireless/rndis_wlan.c')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index aa1880add186..2ecbedb26e15 100644 --- a/drivers/net/wireless/rndis_wlan.c +++ b/drivers/net/wireless/rndis_wlan.c | |||
@@ -83,11 +83,11 @@ MODULE_PARM_DESC(roamdelta, | |||
83 | "set roaming tendency: 0=aggressive, 1=moderate, " | 83 | "set roaming tendency: 0=aggressive, 1=moderate, " |
84 | "2=conservative (default: moderate)"); | 84 | "2=conservative (default: moderate)"); |
85 | 85 | ||
86 | static int modparam_workaround_interval = 500; | 86 | static int modparam_workaround_interval; |
87 | module_param_named(workaround_interval, modparam_workaround_interval, | 87 | module_param_named(workaround_interval, modparam_workaround_interval, |
88 | int, 0444); | 88 | int, 0444); |
89 | MODULE_PARM_DESC(workaround_interval, | 89 | MODULE_PARM_DESC(workaround_interval, |
90 | "set stall workaround interval in msecs (default: 500)"); | 90 | "set stall workaround interval in msecs (0=disabled) (default: 0)"); |
91 | 91 | ||
92 | 92 | ||
93 | /* various RNDIS OID defs */ | 93 | /* various RNDIS OID defs */ |
@@ -733,12 +733,13 @@ static int rndis_query_oid(struct usbnet *dev, __le32 oid, void *data, int *len) | |||
733 | le32_to_cpu(u.get_c->status)); | 733 | le32_to_cpu(u.get_c->status)); |
734 | 734 | ||
735 | if (ret == 0) { | 735 | if (ret == 0) { |
736 | memcpy(data, u.buf + le32_to_cpu(u.get_c->offset) + 8, *len); | ||
737 | |||
736 | ret = le32_to_cpu(u.get_c->len); | 738 | ret = le32_to_cpu(u.get_c->len); |
737 | if (ret > *len) | 739 | if (ret > *len) |
738 | *len = ret; | 740 | *len = ret; |
739 | memcpy(data, u.buf + le32_to_cpu(u.get_c->offset) + 8, *len); | ||
740 | ret = rndis_error_status(u.get_c->status); | ||
741 | 741 | ||
742 | ret = rndis_error_status(u.get_c->status); | ||
742 | if (ret < 0) | 743 | if (ret < 0) |
743 | devdbg(dev, "rndis_query_oid(%s): device returned " | 744 | devdbg(dev, "rndis_query_oid(%s): device returned " |
744 | "error, 0x%08x (%d)", oid_to_string(oid), | 745 | "error, 0x%08x (%d)", oid_to_string(oid), |
@@ -2549,7 +2550,7 @@ static void rndis_device_poller(struct work_struct *work) | |||
2549 | /* Workaround transfer stalls on poor quality links. | 2550 | /* Workaround transfer stalls on poor quality links. |
2550 | * TODO: find right way to fix these stalls (as stalls do not happen | 2551 | * TODO: find right way to fix these stalls (as stalls do not happen |
2551 | * with ndiswrapper/windows driver). */ | 2552 | * with ndiswrapper/windows driver). */ |
2552 | if (priv->last_qual <= 25) { | 2553 | if (priv->param_workaround_interval > 0 && priv->last_qual <= 25) { |
2553 | /* Decrease stats worker interval to catch stalls. | 2554 | /* Decrease stats worker interval to catch stalls. |
2554 | * faster. Faster than 400-500ms causes packet loss, | 2555 | * faster. Faster than 400-500ms causes packet loss, |
2555 | * Slower doesn't catch stalls fast enough. | 2556 | * Slower doesn't catch stalls fast enough. |