diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-01-05 10:12:45 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-01-05 10:13:24 -0500 |
commit | 1032c736e81cdf490ae62f86da7efe67c3c3e61d (patch) | |
tree | a0c3919849f97dbbc5ea7c6a9ac1d7a639e44a73 /drivers/net/wireless/rt2x00 | |
parent | 117ff42fd43e92d24c6aa6f3e4f0f1e1edada140 (diff) | |
parent | cb00ec382b57d35b955c085198cd54a0c1fcdc94 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Conflicts:
drivers/net/wireless/b43legacy/dma.c
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.c | 47 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 65 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 16 |
5 files changed, 69 insertions, 67 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800.h b/drivers/net/wireless/rt2x00/rt2800.h index 4778620347c..2571a2fa3d0 100644 --- a/drivers/net/wireless/rt2x00/rt2800.h +++ b/drivers/net/wireless/rt2x00/rt2800.h | |||
@@ -50,7 +50,7 @@ | |||
50 | * RF2853 2.4G/5G 3T3R | 50 | * RF2853 2.4G/5G 3T3R |
51 | * RF3320 2.4G 1T1R(RT3350/RT3370/RT3390) | 51 | * RF3320 2.4G 1T1R(RT3350/RT3370/RT3390) |
52 | * RF3322 2.4G 2T2R(RT3352/RT3371/RT3372/RT3391/RT3392) | 52 | * RF3322 2.4G 2T2R(RT3352/RT3371/RT3372/RT3391/RT3392) |
53 | * RF3853 2.4G/5G 3T3R(RT3883/RT3563/RT3573/RT3593/RT3662) | 53 | * RF3053 2.4G/5G 3T3R(RT3883/RT3563/RT3573/RT3593/RT3662) |
54 | * RF5370 2.4G 1T1R | 54 | * RF5370 2.4G 1T1R |
55 | * RF5390 2.4G 1T1R | 55 | * RF5390 2.4G 1T1R |
56 | */ | 56 | */ |
@@ -66,7 +66,7 @@ | |||
66 | #define RF2853 0x000a | 66 | #define RF2853 0x000a |
67 | #define RF3320 0x000b | 67 | #define RF3320 0x000b |
68 | #define RF3322 0x000c | 68 | #define RF3322 0x000c |
69 | #define RF3853 0x000d | 69 | #define RF3053 0x000d |
70 | #define RF5370 0x5370 | 70 | #define RF5370 0x5370 |
71 | #define RF5390 0x5390 | 71 | #define RF5390 0x5390 |
72 | 72 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c index e5df380d4fb..22a1a8fc6e0 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/rt2x00/rt2800lib.c | |||
@@ -1944,19 +1944,24 @@ static void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, | |||
1944 | info->default_power2 = TXPOWER_A_TO_DEV(info->default_power2); | 1944 | info->default_power2 = TXPOWER_A_TO_DEV(info->default_power2); |
1945 | } | 1945 | } |
1946 | 1946 | ||
1947 | if (rt2x00_rf(rt2x00dev, RF2020) || | 1947 | switch (rt2x00dev->chip.rf) { |
1948 | rt2x00_rf(rt2x00dev, RF3020) || | 1948 | case RF2020: |
1949 | rt2x00_rf(rt2x00dev, RF3021) || | 1949 | case RF3020: |
1950 | rt2x00_rf(rt2x00dev, RF3022) || | 1950 | case RF3021: |
1951 | rt2x00_rf(rt2x00dev, RF3320)) | 1951 | case RF3022: |
1952 | case RF3320: | ||
1952 | rt2800_config_channel_rf3xxx(rt2x00dev, conf, rf, info); | 1953 | rt2800_config_channel_rf3xxx(rt2x00dev, conf, rf, info); |
1953 | else if (rt2x00_rf(rt2x00dev, RF3052)) | 1954 | break; |
1955 | case RF3052: | ||
1954 | rt2800_config_channel_rf3052(rt2x00dev, conf, rf, info); | 1956 | rt2800_config_channel_rf3052(rt2x00dev, conf, rf, info); |
1955 | else if (rt2x00_rf(rt2x00dev, RF5370) || | 1957 | break; |
1956 | rt2x00_rf(rt2x00dev, RF5390)) | 1958 | case RF5370: |
1959 | case RF5390: | ||
1957 | rt2800_config_channel_rf53xx(rt2x00dev, conf, rf, info); | 1960 | rt2800_config_channel_rf53xx(rt2x00dev, conf, rf, info); |
1958 | else | 1961 | break; |
1962 | default: | ||
1959 | rt2800_config_channel_rf2xxx(rt2x00dev, conf, rf, info); | 1963 | rt2800_config_channel_rf2xxx(rt2x00dev, conf, rf, info); |
1964 | } | ||
1960 | 1965 | ||
1961 | /* | 1966 | /* |
1962 | * Change BBP settings | 1967 | * Change BBP settings |
@@ -3932,15 +3937,18 @@ int rt2800_init_eeprom(struct rt2x00_dev *rt2x00dev) | |||
3932 | rt2x00_set_chip(rt2x00dev, rt2x00_get_field32(reg, MAC_CSR0_CHIPSET), | 3937 | rt2x00_set_chip(rt2x00dev, rt2x00_get_field32(reg, MAC_CSR0_CHIPSET), |
3933 | value, rt2x00_get_field32(reg, MAC_CSR0_REVISION)); | 3938 | value, rt2x00_get_field32(reg, MAC_CSR0_REVISION)); |
3934 | 3939 | ||
3935 | if (!rt2x00_rt(rt2x00dev, RT2860) && | 3940 | switch (rt2x00dev->chip.rt) { |
3936 | !rt2x00_rt(rt2x00dev, RT2872) && | 3941 | case RT2860: |
3937 | !rt2x00_rt(rt2x00dev, RT2883) && | 3942 | case RT2872: |
3938 | !rt2x00_rt(rt2x00dev, RT3070) && | 3943 | case RT2883: |
3939 | !rt2x00_rt(rt2x00dev, RT3071) && | 3944 | case RT3070: |
3940 | !rt2x00_rt(rt2x00dev, RT3090) && | 3945 | case RT3071: |
3941 | !rt2x00_rt(rt2x00dev, RT3390) && | 3946 | case RT3090: |
3942 | !rt2x00_rt(rt2x00dev, RT3572) && | 3947 | case RT3390: |
3943 | !rt2x00_rt(rt2x00dev, RT5390)) { | 3948 | case RT3572: |
3949 | case RT5390: | ||
3950 | break; | ||
3951 | default: | ||
3944 | ERROR(rt2x00dev, "Invalid RT chipset detected.\n"); | 3952 | ERROR(rt2x00dev, "Invalid RT chipset detected.\n"); |
3945 | return -ENODEV; | 3953 | return -ENODEV; |
3946 | } | 3954 | } |
@@ -4554,6 +4562,9 @@ int rt2800_get_survey(struct ieee80211_hw *hw, int idx, | |||
4554 | survey->channel_time_ext_busy = busy_ext / 1000; | 4562 | survey->channel_time_ext_busy = busy_ext / 1000; |
4555 | } | 4563 | } |
4556 | 4564 | ||
4565 | if (!(hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) | ||
4566 | survey->filled |= SURVEY_INFO_IN_USE; | ||
4567 | |||
4557 | return 0; | 4568 | return 0; |
4558 | 4569 | ||
4559 | } | 4570 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index ee01d2e883a..f8eb49f5ac2 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -400,10 +400,10 @@ static void rt2800usb_write_tx_desc(struct queue_entry *entry, | |||
400 | /* | 400 | /* |
401 | * The size of TXINFO_W0_USB_DMA_TX_PKT_LEN is | 401 | * The size of TXINFO_W0_USB_DMA_TX_PKT_LEN is |
402 | * TXWI + 802.11 header + L2 pad + payload + pad, | 402 | * TXWI + 802.11 header + L2 pad + payload + pad, |
403 | * so need to decrease size of TXINFO and USB end pad. | 403 | * so need to decrease size of TXINFO. |
404 | */ | 404 | */ |
405 | rt2x00_set_field32(&word, TXINFO_W0_USB_DMA_TX_PKT_LEN, | 405 | rt2x00_set_field32(&word, TXINFO_W0_USB_DMA_TX_PKT_LEN, |
406 | entry->skb->len - TXINFO_DESC_SIZE - 4); | 406 | roundup(entry->skb->len, 4) - TXINFO_DESC_SIZE); |
407 | rt2x00_set_field32(&word, TXINFO_W0_WIV, | 407 | rt2x00_set_field32(&word, TXINFO_W0_WIV, |
408 | !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc->flags)); | 408 | !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc->flags)); |
409 | rt2x00_set_field32(&word, TXINFO_W0_QSEL, 2); | 409 | rt2x00_set_field32(&word, TXINFO_W0_QSEL, 2); |
@@ -421,37 +421,20 @@ static void rt2800usb_write_tx_desc(struct queue_entry *entry, | |||
421 | skbdesc->desc_len = TXINFO_DESC_SIZE + TXWI_DESC_SIZE; | 421 | skbdesc->desc_len = TXINFO_DESC_SIZE + TXWI_DESC_SIZE; |
422 | } | 422 | } |
423 | 423 | ||
424 | static void rt2800usb_write_tx_data(struct queue_entry *entry, | 424 | /* |
425 | struct txentry_desc *txdesc) | 425 | * TX data initialization |
426 | */ | ||
427 | static int rt2800usb_get_tx_data_len(struct queue_entry *entry) | ||
426 | { | 428 | { |
427 | unsigned int len; | ||
428 | int err; | ||
429 | |||
430 | rt2800_write_tx_data(entry, txdesc); | ||
431 | |||
432 | /* | 429 | /* |
433 | * pad(1~3 bytes) is added after each 802.11 payload. | 430 | * pad(1~3 bytes) is needed after each 802.11 payload. |
434 | * USB end pad(4 bytes) is added at each USB bulk out packet end. | 431 | * USB end pad(4 bytes) is needed at each USB bulk out packet end. |
435 | * TX frame format is : | 432 | * TX frame format is : |
436 | * | TXINFO | TXWI | 802.11 header | L2 pad | payload | pad | USB end pad | | 433 | * | TXINFO | TXWI | 802.11 header | L2 pad | payload | pad | USB end pad | |
437 | * |<------------- tx_pkt_len ------------->| | 434 | * |<------------- tx_pkt_len ------------->| |
438 | */ | 435 | */ |
439 | len = roundup(entry->skb->len, 4) + 4; | ||
440 | err = skb_padto(entry->skb, len); | ||
441 | if (unlikely(err)) { | ||
442 | WARNING(entry->queue->rt2x00dev, "TX SKB padding error, out of memory\n"); | ||
443 | return; | ||
444 | } | ||
445 | 436 | ||
446 | entry->skb->len = len; | 437 | return roundup(entry->skb->len, 4) + 4; |
447 | } | ||
448 | |||
449 | /* | ||
450 | * TX data initialization | ||
451 | */ | ||
452 | static int rt2800usb_get_tx_data_len(struct queue_entry *entry) | ||
453 | { | ||
454 | return entry->skb->len; | ||
455 | } | 438 | } |
456 | 439 | ||
457 | /* | 440 | /* |
@@ -807,7 +790,7 @@ static const struct rt2x00lib_ops rt2800usb_rt2x00_ops = { | |||
807 | .flush_queue = rt2x00usb_flush_queue, | 790 | .flush_queue = rt2x00usb_flush_queue, |
808 | .tx_dma_done = rt2800usb_tx_dma_done, | 791 | .tx_dma_done = rt2800usb_tx_dma_done, |
809 | .write_tx_desc = rt2800usb_write_tx_desc, | 792 | .write_tx_desc = rt2800usb_write_tx_desc, |
810 | .write_tx_data = rt2800usb_write_tx_data, | 793 | .write_tx_data = rt2800_write_tx_data, |
811 | .write_beacon = rt2800_write_beacon, | 794 | .write_beacon = rt2800_write_beacon, |
812 | .clear_beacon = rt2800_clear_beacon, | 795 | .clear_beacon = rt2800_clear_beacon, |
813 | .get_tx_data_len = rt2800usb_get_tx_data_len, | 796 | .get_tx_data_len = rt2800usb_get_tx_data_len, |
@@ -914,12 +897,14 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
914 | { USB_DEVICE(0x050d, 0x8053) }, | 897 | { USB_DEVICE(0x050d, 0x8053) }, |
915 | { USB_DEVICE(0x050d, 0x805c) }, | 898 | { USB_DEVICE(0x050d, 0x805c) }, |
916 | { USB_DEVICE(0x050d, 0x815c) }, | 899 | { USB_DEVICE(0x050d, 0x815c) }, |
900 | { USB_DEVICE(0x050d, 0x825a) }, | ||
917 | { USB_DEVICE(0x050d, 0x825b) }, | 901 | { USB_DEVICE(0x050d, 0x825b) }, |
918 | { USB_DEVICE(0x050d, 0x935a) }, | 902 | { USB_DEVICE(0x050d, 0x935a) }, |
919 | { USB_DEVICE(0x050d, 0x935b) }, | 903 | { USB_DEVICE(0x050d, 0x935b) }, |
920 | /* Buffalo */ | 904 | /* Buffalo */ |
921 | { USB_DEVICE(0x0411, 0x00e8) }, | 905 | { USB_DEVICE(0x0411, 0x00e8) }, |
922 | { USB_DEVICE(0x0411, 0x0158) }, | 906 | { USB_DEVICE(0x0411, 0x0158) }, |
907 | { USB_DEVICE(0x0411, 0x015d) }, | ||
923 | { USB_DEVICE(0x0411, 0x016f) }, | 908 | { USB_DEVICE(0x0411, 0x016f) }, |
924 | { USB_DEVICE(0x0411, 0x01a2) }, | 909 | { USB_DEVICE(0x0411, 0x01a2) }, |
925 | /* Corega */ | 910 | /* Corega */ |
@@ -934,6 +919,8 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
934 | { USB_DEVICE(0x07d1, 0x3c0e) }, | 919 | { USB_DEVICE(0x07d1, 0x3c0e) }, |
935 | { USB_DEVICE(0x07d1, 0x3c0f) }, | 920 | { USB_DEVICE(0x07d1, 0x3c0f) }, |
936 | { USB_DEVICE(0x07d1, 0x3c11) }, | 921 | { USB_DEVICE(0x07d1, 0x3c11) }, |
922 | { USB_DEVICE(0x07d1, 0x3c13) }, | ||
923 | { USB_DEVICE(0x07d1, 0x3c15) }, | ||
937 | { USB_DEVICE(0x07d1, 0x3c16) }, | 924 | { USB_DEVICE(0x07d1, 0x3c16) }, |
938 | /* Draytek */ | 925 | /* Draytek */ |
939 | { USB_DEVICE(0x07fa, 0x7712) }, | 926 | { USB_DEVICE(0x07fa, 0x7712) }, |
@@ -943,6 +930,7 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
943 | { USB_DEVICE(0x7392, 0x7711) }, | 930 | { USB_DEVICE(0x7392, 0x7711) }, |
944 | { USB_DEVICE(0x7392, 0x7717) }, | 931 | { USB_DEVICE(0x7392, 0x7717) }, |
945 | { USB_DEVICE(0x7392, 0x7718) }, | 932 | { USB_DEVICE(0x7392, 0x7718) }, |
933 | { USB_DEVICE(0x7392, 0x7722) }, | ||
946 | /* Encore */ | 934 | /* Encore */ |
947 | { USB_DEVICE(0x203d, 0x1480) }, | 935 | { USB_DEVICE(0x203d, 0x1480) }, |
948 | { USB_DEVICE(0x203d, 0x14a9) }, | 936 | { USB_DEVICE(0x203d, 0x14a9) }, |
@@ -976,6 +964,8 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
976 | { USB_DEVICE(0x13b1, 0x0031) }, | 964 | { USB_DEVICE(0x13b1, 0x0031) }, |
977 | { USB_DEVICE(0x1737, 0x0070) }, | 965 | { USB_DEVICE(0x1737, 0x0070) }, |
978 | { USB_DEVICE(0x1737, 0x0071) }, | 966 | { USB_DEVICE(0x1737, 0x0071) }, |
967 | { USB_DEVICE(0x1737, 0x0077) }, | ||
968 | { USB_DEVICE(0x1737, 0x0078) }, | ||
979 | /* Logitec */ | 969 | /* Logitec */ |
980 | { USB_DEVICE(0x0789, 0x0162) }, | 970 | { USB_DEVICE(0x0789, 0x0162) }, |
981 | { USB_DEVICE(0x0789, 0x0163) }, | 971 | { USB_DEVICE(0x0789, 0x0163) }, |
@@ -999,9 +989,13 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
999 | { USB_DEVICE(0x0db0, 0x871b) }, | 989 | { USB_DEVICE(0x0db0, 0x871b) }, |
1000 | { USB_DEVICE(0x0db0, 0x871c) }, | 990 | { USB_DEVICE(0x0db0, 0x871c) }, |
1001 | { USB_DEVICE(0x0db0, 0x899a) }, | 991 | { USB_DEVICE(0x0db0, 0x899a) }, |
992 | /* Ovislink */ | ||
993 | { USB_DEVICE(0x1b75, 0x3071) }, | ||
994 | { USB_DEVICE(0x1b75, 0x3072) }, | ||
1002 | /* Para */ | 995 | /* Para */ |
1003 | { USB_DEVICE(0x20b8, 0x8888) }, | 996 | { USB_DEVICE(0x20b8, 0x8888) }, |
1004 | /* Pegatron */ | 997 | /* Pegatron */ |
998 | { USB_DEVICE(0x1d4d, 0x0002) }, | ||
1005 | { USB_DEVICE(0x1d4d, 0x000c) }, | 999 | { USB_DEVICE(0x1d4d, 0x000c) }, |
1006 | { USB_DEVICE(0x1d4d, 0x000e) }, | 1000 | { USB_DEVICE(0x1d4d, 0x000e) }, |
1007 | { USB_DEVICE(0x1d4d, 0x0011) }, | 1001 | { USB_DEVICE(0x1d4d, 0x0011) }, |
@@ -1054,7 +1048,9 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1054 | /* Sparklan */ | 1048 | /* Sparklan */ |
1055 | { USB_DEVICE(0x15a9, 0x0006) }, | 1049 | { USB_DEVICE(0x15a9, 0x0006) }, |
1056 | /* Sweex */ | 1050 | /* Sweex */ |
1051 | { USB_DEVICE(0x177f, 0x0153) }, | ||
1057 | { USB_DEVICE(0x177f, 0x0302) }, | 1052 | { USB_DEVICE(0x177f, 0x0302) }, |
1053 | { USB_DEVICE(0x177f, 0x0313) }, | ||
1058 | /* U-Media */ | 1054 | /* U-Media */ |
1059 | { USB_DEVICE(0x157e, 0x300e) }, | 1055 | { USB_DEVICE(0x157e, 0x300e) }, |
1060 | { USB_DEVICE(0x157e, 0x3013) }, | 1056 | { USB_DEVICE(0x157e, 0x3013) }, |
@@ -1138,25 +1134,20 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1138 | { USB_DEVICE(0x13d3, 0x3322) }, | 1134 | { USB_DEVICE(0x13d3, 0x3322) }, |
1139 | /* Belkin */ | 1135 | /* Belkin */ |
1140 | { USB_DEVICE(0x050d, 0x1003) }, | 1136 | { USB_DEVICE(0x050d, 0x1003) }, |
1141 | { USB_DEVICE(0x050d, 0x825a) }, | ||
1142 | /* Buffalo */ | 1137 | /* Buffalo */ |
1143 | { USB_DEVICE(0x0411, 0x012e) }, | 1138 | { USB_DEVICE(0x0411, 0x012e) }, |
1144 | { USB_DEVICE(0x0411, 0x0148) }, | 1139 | { USB_DEVICE(0x0411, 0x0148) }, |
1145 | { USB_DEVICE(0x0411, 0x0150) }, | 1140 | { USB_DEVICE(0x0411, 0x0150) }, |
1146 | { USB_DEVICE(0x0411, 0x015d) }, | ||
1147 | /* Corega */ | 1141 | /* Corega */ |
1148 | { USB_DEVICE(0x07aa, 0x0041) }, | 1142 | { USB_DEVICE(0x07aa, 0x0041) }, |
1149 | { USB_DEVICE(0x07aa, 0x0042) }, | 1143 | { USB_DEVICE(0x07aa, 0x0042) }, |
1150 | { USB_DEVICE(0x18c5, 0x0008) }, | 1144 | { USB_DEVICE(0x18c5, 0x0008) }, |
1151 | /* D-Link */ | 1145 | /* D-Link */ |
1152 | { USB_DEVICE(0x07d1, 0x3c0b) }, | 1146 | { USB_DEVICE(0x07d1, 0x3c0b) }, |
1153 | { USB_DEVICE(0x07d1, 0x3c13) }, | ||
1154 | { USB_DEVICE(0x07d1, 0x3c15) }, | ||
1155 | { USB_DEVICE(0x07d1, 0x3c17) }, | 1147 | { USB_DEVICE(0x07d1, 0x3c17) }, |
1156 | { USB_DEVICE(0x2001, 0x3c17) }, | 1148 | { USB_DEVICE(0x2001, 0x3c17) }, |
1157 | /* Edimax */ | 1149 | /* Edimax */ |
1158 | { USB_DEVICE(0x7392, 0x4085) }, | 1150 | { USB_DEVICE(0x7392, 0x4085) }, |
1159 | { USB_DEVICE(0x7392, 0x7722) }, | ||
1160 | /* Encore */ | 1151 | /* Encore */ |
1161 | { USB_DEVICE(0x203d, 0x14a1) }, | 1152 | { USB_DEVICE(0x203d, 0x14a1) }, |
1162 | /* Fujitsu Stylistic 550 */ | 1153 | /* Fujitsu Stylistic 550 */ |
@@ -1172,20 +1163,13 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1172 | /* LevelOne */ | 1163 | /* LevelOne */ |
1173 | { USB_DEVICE(0x1740, 0x0605) }, | 1164 | { USB_DEVICE(0x1740, 0x0605) }, |
1174 | { USB_DEVICE(0x1740, 0x0615) }, | 1165 | { USB_DEVICE(0x1740, 0x0615) }, |
1175 | /* Linksys */ | ||
1176 | { USB_DEVICE(0x1737, 0x0077) }, | ||
1177 | { USB_DEVICE(0x1737, 0x0078) }, | ||
1178 | /* Logitec */ | 1166 | /* Logitec */ |
1179 | { USB_DEVICE(0x0789, 0x0168) }, | 1167 | { USB_DEVICE(0x0789, 0x0168) }, |
1180 | { USB_DEVICE(0x0789, 0x0169) }, | 1168 | { USB_DEVICE(0x0789, 0x0169) }, |
1181 | /* Motorola */ | 1169 | /* Motorola */ |
1182 | { USB_DEVICE(0x100d, 0x9032) }, | 1170 | { USB_DEVICE(0x100d, 0x9032) }, |
1183 | /* Ovislink */ | ||
1184 | { USB_DEVICE(0x1b75, 0x3071) }, | ||
1185 | { USB_DEVICE(0x1b75, 0x3072) }, | ||
1186 | /* Pegatron */ | 1171 | /* Pegatron */ |
1187 | { USB_DEVICE(0x05a6, 0x0101) }, | 1172 | { USB_DEVICE(0x05a6, 0x0101) }, |
1188 | { USB_DEVICE(0x1d4d, 0x0002) }, | ||
1189 | { USB_DEVICE(0x1d4d, 0x0010) }, | 1173 | { USB_DEVICE(0x1d4d, 0x0010) }, |
1190 | /* Planex */ | 1174 | /* Planex */ |
1191 | { USB_DEVICE(0x2019, 0x5201) }, | 1175 | { USB_DEVICE(0x2019, 0x5201) }, |
@@ -1204,9 +1188,6 @@ static struct usb_device_id rt2800usb_device_table[] = { | |||
1204 | { USB_DEVICE(0x083a, 0xc522) }, | 1188 | { USB_DEVICE(0x083a, 0xc522) }, |
1205 | { USB_DEVICE(0x083a, 0xd522) }, | 1189 | { USB_DEVICE(0x083a, 0xd522) }, |
1206 | { USB_DEVICE(0x083a, 0xf511) }, | 1190 | { USB_DEVICE(0x083a, 0xf511) }, |
1207 | /* Sweex */ | ||
1208 | { USB_DEVICE(0x177f, 0x0153) }, | ||
1209 | { USB_DEVICE(0x177f, 0x0313) }, | ||
1210 | /* Zyxel */ | 1191 | /* Zyxel */ |
1211 | { USB_DEVICE(0x0586, 0x341a) }, | 1192 | { USB_DEVICE(0x0586, 0x341a) }, |
1212 | #endif | 1193 | #endif |
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 99ff12d0c29..b03b22c47b1 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -189,9 +189,9 @@ struct rt2x00_chip { | |||
189 | #define RT3090 0x3090 /* 2.4GHz PCIe */ | 189 | #define RT3090 0x3090 /* 2.4GHz PCIe */ |
190 | #define RT3390 0x3390 | 190 | #define RT3390 0x3390 |
191 | #define RT3572 0x3572 | 191 | #define RT3572 0x3572 |
192 | #define RT3593 0x3593 /* PCIe */ | 192 | #define RT3593 0x3593 |
193 | #define RT3883 0x3883 /* WSOC */ | 193 | #define RT3883 0x3883 /* WSOC */ |
194 | #define RT5390 0x5390 /* 2.4GHz */ | 194 | #define RT5390 0x5390 /* 2.4GHz */ |
195 | 195 | ||
196 | u16 rf; | 196 | u16 rf; |
197 | u16 rev; | 197 | u16 rev; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 1e31050dafc..2eea3866504 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -298,12 +298,22 @@ static bool rt2x00usb_kick_tx_entry(struct queue_entry *entry, void* data) | |||
298 | return false; | 298 | return false; |
299 | 299 | ||
300 | /* | 300 | /* |
301 | * USB devices cannot blindly pass the skb->len as the | 301 | * USB devices require certain padding at the end of each frame |
302 | * length of the data to usb_fill_bulk_urb. Pass the skb | 302 | * and urb. Those paddings are not included in skbs. Pass entry |
303 | * to the driver to determine what the length should be. | 303 | * to the driver to determine what the overall length should be. |
304 | */ | 304 | */ |
305 | length = rt2x00dev->ops->lib->get_tx_data_len(entry); | 305 | length = rt2x00dev->ops->lib->get_tx_data_len(entry); |
306 | 306 | ||
307 | status = skb_padto(entry->skb, length); | ||
308 | if (unlikely(status)) { | ||
309 | /* TODO: report something more appropriate than IO_FAILED. */ | ||
310 | WARNING(rt2x00dev, "TX SKB padding error, out of memory\n"); | ||
311 | set_bit(ENTRY_DATA_IO_FAILED, &entry->flags); | ||
312 | rt2x00lib_dmadone(entry); | ||
313 | |||
314 | return false; | ||
315 | } | ||
316 | |||
307 | usb_fill_bulk_urb(entry_priv->urb, usb_dev, | 317 | usb_fill_bulk_urb(entry_priv->urb, usb_dev, |
308 | usb_sndbulkpipe(usb_dev, entry->queue->usb_endpoint), | 318 | usb_sndbulkpipe(usb_dev, entry->queue->usb_endpoint), |
309 | entry->skb->data, length, | 319 | entry->skb->data, length, |