aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rndis_wlan.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rndis_wlan.c')
-rw-r--r--drivers/net/wireless/rndis_wlan.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index d3ecf89abd93..d9460aed1f22 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -228,9 +228,9 @@ struct NDIS_WLAN_BSSID_EX {
228 struct NDIS_802_11_SSID Ssid; 228 struct NDIS_802_11_SSID Ssid;
229 __le32 Privacy; 229 __le32 Privacy;
230 __le32 Rssi; 230 __le32 Rssi;
231 enum NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; 231 __le32 NetworkTypeInUse;
232 struct NDIS_802_11_CONFIGURATION Configuration; 232 struct NDIS_802_11_CONFIGURATION Configuration;
233 enum NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; 233 __le32 InfrastructureMode;
234 u8 SupportedRates[NDIS_802_11_LENGTH_RATES_EX]; 234 u8 SupportedRates[NDIS_802_11_LENGTH_RATES_EX];
235 __le32 IELength; 235 __le32 IELength;
236 u8 IEs[0]; 236 u8 IEs[0];
@@ -279,11 +279,11 @@ struct RNDIS_CONFIG_PARAMETER_INFOBUFFER {
279} __attribute__((packed)); 279} __attribute__((packed));
280 280
281/* these have to match what is in wpa_supplicant */ 281/* these have to match what is in wpa_supplicant */
282enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg; 282enum wpa_alg { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP };
283enum { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP, CIPHER_WEP104 } 283enum wpa_cipher { CIPHER_NONE, CIPHER_WEP40, CIPHER_TKIP, CIPHER_CCMP,
284 wpa_cipher; 284 CIPHER_WEP104 };
285enum { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE, KEY_MGMT_802_1X_NO_WPA, 285enum wpa_key_mgmt { KEY_MGMT_802_1X, KEY_MGMT_PSK, KEY_MGMT_NONE,
286 KEY_MGMT_WPA_NONE } wpa_key_mgmt; 286 KEY_MGMT_802_1X_NO_WPA, KEY_MGMT_WPA_NONE };
287 287
288/* 288/*
289 * private data 289 * private data
@@ -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.