diff options
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00debug.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00usb.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 7 |
9 files changed, 13 insertions, 35 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index b5b0ded83e0f..bb3d83560d02 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1016,8 +1016,8 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1016 | rt2x00_desc_write(entry_priv->desc, 1, word); | 1016 | rt2x00_desc_write(entry_priv->desc, 1, word); |
1017 | 1017 | ||
1018 | rt2x00_desc_read(txd, 2, &word); | 1018 | rt2x00_desc_read(txd, 2, &word); |
1019 | rt2x00_set_field32(&word, TXD_W2_BUFFER_LENGTH, skbdesc->data_len); | 1019 | rt2x00_set_field32(&word, TXD_W2_BUFFER_LENGTH, skb->len); |
1020 | rt2x00_set_field32(&word, TXD_W2_DATABYTE_COUNT, skbdesc->data_len); | 1020 | rt2x00_set_field32(&word, TXD_W2_DATABYTE_COUNT, skb->len); |
1021 | rt2x00_desc_write(txd, 2, word); | 1021 | rt2x00_desc_write(txd, 2, word); |
1022 | 1022 | ||
1023 | rt2x00_desc_read(txd, 3, &word); | 1023 | rt2x00_desc_read(txd, 3, &word); |
@@ -1507,8 +1507,6 @@ static int rt2400pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
1507 | */ | 1507 | */ |
1508 | skbdesc = get_skb_frame_desc(skb); | 1508 | skbdesc = get_skb_frame_desc(skb); |
1509 | memset(skbdesc, 0, sizeof(*skbdesc)); | 1509 | memset(skbdesc, 0, sizeof(*skbdesc)); |
1510 | skbdesc->data = skb->data; | ||
1511 | skbdesc->data_len = skb->len; | ||
1512 | skbdesc->desc = entry_priv->desc; | 1510 | skbdesc->desc = entry_priv->desc; |
1513 | skbdesc->desc_len = intf->beacon->queue->desc_size; | 1511 | skbdesc->desc_len = intf->beacon->queue->desc_size; |
1514 | skbdesc->entry = intf->beacon; | 1512 | skbdesc->entry = intf->beacon; |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index 74b54c948b8d..3c956b91c4e3 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1823,8 +1823,6 @@ static int rt2500pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
1823 | */ | 1823 | */ |
1824 | skbdesc = get_skb_frame_desc(skb); | 1824 | skbdesc = get_skb_frame_desc(skb); |
1825 | memset(skbdesc, 0, sizeof(*skbdesc)); | 1825 | memset(skbdesc, 0, sizeof(*skbdesc)); |
1826 | skbdesc->data = skb->data; | ||
1827 | skbdesc->data_len = skb->len; | ||
1828 | skbdesc->desc = entry_priv->desc; | 1826 | skbdesc->desc = entry_priv->desc; |
1829 | skbdesc->desc_len = intf->beacon->queue->desc_size; | 1827 | skbdesc->desc_len = intf->beacon->queue->desc_size; |
1830 | skbdesc->entry = intf->beacon; | 1828 | skbdesc->entry = intf->beacon; |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index 076221413db7..1bfb68a920a8 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1088,7 +1088,8 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1088 | rt2x00_set_field32(&word, TXD_W0_NEW_SEQ, | 1088 | rt2x00_set_field32(&word, TXD_W0_NEW_SEQ, |
1089 | test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)); | 1089 | test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)); |
1090 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); | 1090 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); |
1091 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skbdesc->data_len); | 1091 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, |
1092 | skb->len - skbdesc->desc_len); | ||
1092 | rt2x00_set_field32(&word, TXD_W0_CIPHER, CIPHER_NONE); | 1093 | rt2x00_set_field32(&word, TXD_W0_CIPHER, CIPHER_NONE); |
1093 | rt2x00_desc_write(txd, 0, word); | 1094 | rt2x00_desc_write(txd, 0, word); |
1094 | } | 1095 | } |
@@ -1196,8 +1197,6 @@ static void rt2500usb_fill_rxdone(struct queue_entry *entry, | |||
1196 | * Adjust the skb memory window to the frame boundaries. | 1197 | * Adjust the skb memory window to the frame boundaries. |
1197 | */ | 1198 | */ |
1198 | skb_trim(entry->skb, rxdesc->size); | 1199 | skb_trim(entry->skb, rxdesc->size); |
1199 | skbdesc->data = entry->skb->data; | ||
1200 | skbdesc->data_len = rxdesc->size; | ||
1201 | } | 1200 | } |
1202 | 1201 | ||
1203 | /* | 1202 | /* |
@@ -1711,8 +1710,6 @@ static int rt2500usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
1711 | */ | 1710 | */ |
1712 | skbdesc = get_skb_frame_desc(skb); | 1711 | skbdesc = get_skb_frame_desc(skb); |
1713 | memset(skbdesc, 0, sizeof(*skbdesc)); | 1712 | memset(skbdesc, 0, sizeof(*skbdesc)); |
1714 | skbdesc->data = skb->data + intf->beacon->queue->desc_size; | ||
1715 | skbdesc->data_len = skb->len - intf->beacon->queue->desc_size; | ||
1716 | skbdesc->desc = skb->data; | 1713 | skbdesc->desc = skb->data; |
1717 | skbdesc->desc_len = intf->beacon->queue->desc_size; | 1714 | skbdesc->desc_len = intf->beacon->queue->desc_size; |
1718 | skbdesc->entry = intf->beacon; | 1715 | skbdesc->entry = intf->beacon; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00debug.c b/drivers/net/wireless/rt2x00/rt2x00debug.c index bd92cb8e68e0..300cf061035f 100644 --- a/drivers/net/wireless/rt2x00/rt2x00debug.c +++ b/drivers/net/wireless/rt2x00/rt2x00debug.c | |||
@@ -133,7 +133,7 @@ void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, | |||
133 | return; | 133 | return; |
134 | } | 134 | } |
135 | 135 | ||
136 | skbcopy = alloc_skb(sizeof(*dump_hdr) + desc->desc_len + desc->data_len, | 136 | skbcopy = alloc_skb(sizeof(*dump_hdr) + desc->desc_len + skb->len, |
137 | GFP_ATOMIC); | 137 | GFP_ATOMIC); |
138 | if (!skbcopy) { | 138 | if (!skbcopy) { |
139 | DEBUG(rt2x00dev, "Failed to copy skb for dump.\n"); | 139 | DEBUG(rt2x00dev, "Failed to copy skb for dump.\n"); |
@@ -144,7 +144,7 @@ void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, | |||
144 | dump_hdr->version = cpu_to_le32(DUMP_HEADER_VERSION); | 144 | dump_hdr->version = cpu_to_le32(DUMP_HEADER_VERSION); |
145 | dump_hdr->header_length = cpu_to_le32(sizeof(*dump_hdr)); | 145 | dump_hdr->header_length = cpu_to_le32(sizeof(*dump_hdr)); |
146 | dump_hdr->desc_length = cpu_to_le32(desc->desc_len); | 146 | dump_hdr->desc_length = cpu_to_le32(desc->desc_len); |
147 | dump_hdr->data_length = cpu_to_le32(desc->data_len); | 147 | dump_hdr->data_length = cpu_to_le32(skb->len); |
148 | dump_hdr->chip_rt = cpu_to_le16(rt2x00dev->chip.rt); | 148 | dump_hdr->chip_rt = cpu_to_le16(rt2x00dev->chip.rt); |
149 | dump_hdr->chip_rf = cpu_to_le16(rt2x00dev->chip.rf); | 149 | dump_hdr->chip_rf = cpu_to_le16(rt2x00dev->chip.rf); |
150 | dump_hdr->chip_rev = cpu_to_le32(rt2x00dev->chip.rev); | 150 | dump_hdr->chip_rev = cpu_to_le32(rt2x00dev->chip.rev); |
@@ -155,7 +155,7 @@ void rt2x00debug_dump_frame(struct rt2x00_dev *rt2x00dev, | |||
155 | dump_hdr->timestamp_usec = cpu_to_le32(timestamp.tv_usec); | 155 | dump_hdr->timestamp_usec = cpu_to_le32(timestamp.tv_usec); |
156 | 156 | ||
157 | memcpy(skb_put(skbcopy, desc->desc_len), desc->desc, desc->desc_len); | 157 | memcpy(skb_put(skbcopy, desc->desc_len), desc->desc, desc->desc_len); |
158 | memcpy(skb_put(skbcopy, desc->data_len), desc->data, desc->data_len); | 158 | memcpy(skb_put(skbcopy, skb->len), skb->data, skb->len); |
159 | 159 | ||
160 | skb_queue_tail(&intf->frame_dump_skbqueue, skbcopy); | 160 | skb_queue_tail(&intf->frame_dump_skbqueue, skbcopy); |
161 | wake_up_interruptible(&intf->frame_dump_waitqueue); | 161 | wake_up_interruptible(&intf->frame_dump_waitqueue); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c index 9745277c81ce..a9819aad5e7d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c | |||
@@ -61,8 +61,6 @@ int rt2x00pci_write_tx_data(struct queue_entry *entry) | |||
61 | */ | 61 | */ |
62 | skbdesc = get_skb_frame_desc(entry->skb); | 62 | skbdesc = get_skb_frame_desc(entry->skb); |
63 | memset(skbdesc, 0, sizeof(*skbdesc)); | 63 | memset(skbdesc, 0, sizeof(*skbdesc)); |
64 | skbdesc->data = entry->skb->data; | ||
65 | skbdesc->data_len = entry->skb->len; | ||
66 | skbdesc->desc = entry_priv->desc; | 64 | skbdesc->desc = entry_priv->desc; |
67 | skbdesc->desc_len = entry->queue->desc_size; | 65 | skbdesc->desc_len = entry->queue->desc_size; |
68 | skbdesc->entry = entry; | 66 | skbdesc->entry = entry; |
@@ -126,8 +124,6 @@ void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev) | |||
126 | */ | 124 | */ |
127 | skbdesc = get_skb_frame_desc(entry->skb); | 125 | skbdesc = get_skb_frame_desc(entry->skb); |
128 | memset(skbdesc, 0, sizeof(*skbdesc)); | 126 | memset(skbdesc, 0, sizeof(*skbdesc)); |
129 | skbdesc->data = entry->skb->data; | ||
130 | skbdesc->data_len = entry->skb->len; | ||
131 | skbdesc->desc = entry_priv->desc; | 127 | skbdesc->desc = entry_priv->desc; |
132 | skbdesc->desc_len = queue->desc_size; | 128 | skbdesc->desc_len = queue->desc_size; |
133 | skbdesc->entry = entry; | 129 | skbdesc->entry = entry; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index 623fc27dc7bb..fcf52520b016 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -105,11 +105,8 @@ enum data_queue_qid { | |||
105 | struct skb_frame_desc { | 105 | struct skb_frame_desc { |
106 | unsigned int flags; | 106 | unsigned int flags; |
107 | 107 | ||
108 | unsigned short data_len; | ||
109 | unsigned short desc_len; | ||
110 | |||
111 | void *data; | ||
112 | void *desc; | 108 | void *desc; |
109 | unsigned int desc_len; | ||
113 | 110 | ||
114 | struct queue_entry *entry; | 111 | struct queue_entry *entry; |
115 | }; | 112 | }; |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 8cf6e3f253e9..797023cad947 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -192,8 +192,6 @@ int rt2x00usb_write_tx_data(struct queue_entry *entry) | |||
192 | */ | 192 | */ |
193 | skbdesc = get_skb_frame_desc(entry->skb); | 193 | skbdesc = get_skb_frame_desc(entry->skb); |
194 | memset(skbdesc, 0, sizeof(*skbdesc)); | 194 | memset(skbdesc, 0, sizeof(*skbdesc)); |
195 | skbdesc->data = entry->skb->data + entry->queue->desc_size; | ||
196 | skbdesc->data_len = entry->skb->len - entry->queue->desc_size; | ||
197 | skbdesc->desc = entry->skb->data; | 195 | skbdesc->desc = entry->skb->data; |
198 | skbdesc->desc_len = entry->queue->desc_size; | 196 | skbdesc->desc_len = entry->queue->desc_size; |
199 | skbdesc->entry = entry; | 197 | skbdesc->entry = entry; |
@@ -352,7 +350,6 @@ static void rt2x00usb_interrupt_rxdone(struct urb *urb) | |||
352 | } | 350 | } |
353 | 351 | ||
354 | /* Update data pointers, trim buffer to correct size */ | 352 | /* Update data pointers, trim buffer to correct size */ |
355 | skbdesc->data = entry->skb->data; | ||
356 | skb_trim(entry->skb, rxdesc.size); | 353 | skb_trim(entry->skb, rxdesc.size); |
357 | 354 | ||
358 | /* | 355 | /* |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 746f87c8e704..5b7267ece1b9 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -1562,7 +1562,7 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1562 | 1562 | ||
1563 | if (skbdesc->desc_len > TXINFO_SIZE) { | 1563 | if (skbdesc->desc_len > TXINFO_SIZE) { |
1564 | rt2x00_desc_read(txd, 11, &word); | 1564 | rt2x00_desc_read(txd, 11, &word); |
1565 | rt2x00_set_field32(&word, TXD_W11_BUFFER_LENGTH0, skbdesc->data_len); | 1565 | rt2x00_set_field32(&word, TXD_W11_BUFFER_LENGTH0, skb->len); |
1566 | rt2x00_desc_write(txd, 11, word); | 1566 | rt2x00_desc_write(txd, 11, word); |
1567 | } | 1567 | } |
1568 | 1568 | ||
@@ -1581,7 +1581,7 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1581 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, | 1581 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, |
1582 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); | 1582 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); |
1583 | rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, 0); | 1583 | rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, 0); |
1584 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skbdesc->data_len); | 1584 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len); |
1585 | rt2x00_set_field32(&word, TXD_W0_BURST, | 1585 | rt2x00_set_field32(&word, TXD_W0_BURST, |
1586 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); | 1586 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); |
1587 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE); | 1587 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE); |
@@ -2375,8 +2375,6 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2375 | */ | 2375 | */ |
2376 | skbdesc = get_skb_frame_desc(skb); | 2376 | skbdesc = get_skb_frame_desc(skb); |
2377 | memset(skbdesc, 0, sizeof(*skbdesc)); | 2377 | memset(skbdesc, 0, sizeof(*skbdesc)); |
2378 | skbdesc->data = skb->data; | ||
2379 | skbdesc->data_len = skb->len; | ||
2380 | skbdesc->desc = entry_priv->desc; | 2378 | skbdesc->desc = entry_priv->desc; |
2381 | skbdesc->desc_len = intf->beacon->queue->desc_size; | 2379 | skbdesc->desc_len = intf->beacon->queue->desc_size; |
2382 | skbdesc->entry = intf->beacon; | 2380 | skbdesc->entry = intf->beacon; |
@@ -2401,7 +2399,7 @@ static int rt61pci_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
2401 | skbdesc->desc, skbdesc->desc_len); | 2399 | skbdesc->desc, skbdesc->desc_len); |
2402 | rt2x00pci_register_multiwrite(rt2x00dev, | 2400 | rt2x00pci_register_multiwrite(rt2x00dev, |
2403 | beacon_base + skbdesc->desc_len, | 2401 | beacon_base + skbdesc->desc_len, |
2404 | skbdesc->data, skbdesc->data_len); | 2402 | skb->data, skb->len); |
2405 | rt61pci_kick_tx_queue(rt2x00dev, QID_BEACON); | 2403 | rt61pci_kick_tx_queue(rt2x00dev, QID_BEACON); |
2406 | 2404 | ||
2407 | return 0; | 2405 | return 0; |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index ae50f6332dfa..800a1e278d1e 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1320,7 +1320,8 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1320 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, | 1320 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, |
1321 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); | 1321 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); |
1322 | rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, 0); | 1322 | rt2x00_set_field32(&word, TXD_W0_TKIP_MIC, 0); |
1323 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skbdesc->data_len); | 1323 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, |
1324 | skb->len - skbdesc->desc_len); | ||
1324 | rt2x00_set_field32(&word, TXD_W0_BURST2, | 1325 | rt2x00_set_field32(&word, TXD_W0_BURST2, |
1325 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); | 1326 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); |
1326 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE); | 1327 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE); |
@@ -1466,8 +1467,6 @@ static void rt73usb_fill_rxdone(struct queue_entry *entry, | |||
1466 | */ | 1467 | */ |
1467 | skb_pull(entry->skb, entry->queue->desc_size); | 1468 | skb_pull(entry->skb, entry->queue->desc_size); |
1468 | skb_trim(entry->skb, rxdesc->size); | 1469 | skb_trim(entry->skb, rxdesc->size); |
1469 | skbdesc->data = entry->skb->data; | ||
1470 | skbdesc->data_len = rxdesc->size; | ||
1471 | } | 1470 | } |
1472 | 1471 | ||
1473 | /* | 1472 | /* |
@@ -1980,8 +1979,6 @@ static int rt73usb_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
1980 | */ | 1979 | */ |
1981 | skbdesc = get_skb_frame_desc(skb); | 1980 | skbdesc = get_skb_frame_desc(skb); |
1982 | memset(skbdesc, 0, sizeof(*skbdesc)); | 1981 | memset(skbdesc, 0, sizeof(*skbdesc)); |
1983 | skbdesc->data = skb->data + intf->beacon->queue->desc_size; | ||
1984 | skbdesc->data_len = skb->len - intf->beacon->queue->desc_size; | ||
1985 | skbdesc->desc = skb->data; | 1982 | skbdesc->desc = skb->data; |
1986 | skbdesc->desc_len = intf->beacon->queue->desc_size; | 1983 | skbdesc->desc_len = intf->beacon->queue->desc_size; |
1987 | skbdesc->entry = intf->beacon; | 1984 | skbdesc->entry = intf->beacon; |