diff options
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2500usb.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800pci.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800usb.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00queue.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt61pci.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 2 |
9 files changed, 14 insertions, 15 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 08a4789fc2d8..6f898913492a 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1017,8 +1017,8 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1017 | rt2x00_desc_write(entry_priv->desc, 1, word); | 1017 | rt2x00_desc_write(entry_priv->desc, 1, word); |
1018 | 1018 | ||
1019 | rt2x00_desc_read(txd, 2, &word); | 1019 | rt2x00_desc_read(txd, 2, &word); |
1020 | rt2x00_set_field32(&word, TXD_W2_BUFFER_LENGTH, skb->len); | 1020 | rt2x00_set_field32(&word, TXD_W2_BUFFER_LENGTH, txdesc->length); |
1021 | rt2x00_set_field32(&word, TXD_W2_DATABYTE_COUNT, skb->len); | 1021 | rt2x00_set_field32(&word, TXD_W2_DATABYTE_COUNT, txdesc->length); |
1022 | rt2x00_desc_write(txd, 2, word); | 1022 | rt2x00_desc_write(txd, 2, word); |
1023 | 1023 | ||
1024 | rt2x00_desc_read(txd, 3, &word); | 1024 | rt2x00_desc_read(txd, 3, &word); |
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c index d084d70e5fe2..d9b630455e7d 100644 --- a/drivers/net/wireless/rt2x00/rt2500pci.c +++ b/drivers/net/wireless/rt2x00/rt2500pci.c | |||
@@ -1208,7 +1208,7 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1208 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); | 1208 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); |
1209 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, | 1209 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, |
1210 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); | 1210 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); |
1211 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len); | 1211 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); |
1212 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE); | 1212 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE); |
1213 | rt2x00_desc_write(txd, 0, word); | 1213 | rt2x00_desc_write(txd, 0, word); |
1214 | } | 1214 | } |
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c index c1eec17fe186..c6e6e7b0ea53 100644 --- a/drivers/net/wireless/rt2x00/rt2500usb.c +++ b/drivers/net/wireless/rt2x00/rt2500usb.c | |||
@@ -1071,7 +1071,7 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1071 | rt2x00_set_field32(&word, TXD_W0_NEW_SEQ, | 1071 | rt2x00_set_field32(&word, TXD_W0_NEW_SEQ, |
1072 | test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)); | 1072 | test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)); |
1073 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); | 1073 | rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); |
1074 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len); | 1074 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); |
1075 | rt2x00_set_field32(&word, TXD_W0_CIPHER, !!txdesc->cipher); | 1075 | rt2x00_set_field32(&word, TXD_W0_CIPHER, !!txdesc->cipher); |
1076 | rt2x00_set_field32(&word, TXD_W0_KEY_ID, txdesc->key_idx); | 1076 | rt2x00_set_field32(&word, TXD_W0_KEY_ID, txdesc->key_idx); |
1077 | rt2x00_desc_write(txd, 0, word); | 1077 | rt2x00_desc_write(txd, 0, word); |
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c index 89281d78f04d..f08b6a37bf2d 100644 --- a/drivers/net/wireless/rt2x00/rt2800pci.c +++ b/drivers/net/wireless/rt2x00/rt2800pci.c | |||
@@ -663,7 +663,7 @@ static int rt2800pci_write_tx_data(struct queue_entry* entry, | |||
663 | test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ? | 663 | test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ? |
664 | txdesc->key_idx : 0xff); | 664 | txdesc->key_idx : 0xff); |
665 | rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT, | 665 | rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT, |
666 | skb->len - txdesc->l2pad); | 666 | txdesc->length); |
667 | rt2x00_set_field32(&word, TXWI_W1_PACKETID, | 667 | rt2x00_set_field32(&word, TXWI_W1_PACKETID, |
668 | skbdesc->entry->queue->qid + 1); | 668 | skbdesc->entry->queue->qid + 1); |
669 | rt2x00_desc_write(txwi, 1, word); | 669 | rt2x00_desc_write(txwi, 1, word); |
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c index 2b79d6e58f40..67f8234f24d0 100644 --- a/drivers/net/wireless/rt2x00/rt2800usb.c +++ b/drivers/net/wireless/rt2x00/rt2800usb.c | |||
@@ -437,7 +437,7 @@ static void rt2800usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
437 | test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ? | 437 | test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags) ? |
438 | txdesc->key_idx : 0xff); | 438 | txdesc->key_idx : 0xff); |
439 | rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT, | 439 | rt2x00_set_field32(&word, TXWI_W1_MPDU_TOTAL_BYTE_COUNT, |
440 | skb->len - txdesc->l2pad); | 440 | txdesc->length); |
441 | rt2x00_set_field32(&word, TXWI_W1_PACKETID, | 441 | rt2x00_set_field32(&word, TXWI_W1_PACKETID, |
442 | skbdesc->entry->queue->qid + 1); | 442 | skbdesc->entry->queue->qid + 1); |
443 | rt2x00_desc_write(txwi, 1, word); | 443 | rt2x00_desc_write(txwi, 1, word); |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c index a68cf90f6c4e..59d9459acfaf 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.c +++ b/drivers/net/wireless/rt2x00/rt2x00queue.c | |||
@@ -333,12 +333,10 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry, | |||
333 | txdesc->aifs = entry->queue->aifs; | 333 | txdesc->aifs = entry->queue->aifs; |
334 | 334 | ||
335 | /* | 335 | /* |
336 | * Header and alignment information. | 336 | * Header and frame information. |
337 | */ | 337 | */ |
338 | txdesc->length = entry->skb->len; | ||
338 | txdesc->header_length = ieee80211_get_hdrlen_from_skb(entry->skb); | 339 | txdesc->header_length = ieee80211_get_hdrlen_from_skb(entry->skb); |
339 | if (test_bit(DRIVER_REQUIRE_L2PAD, &rt2x00dev->flags) && | ||
340 | (entry->skb->len > txdesc->header_length)) | ||
341 | txdesc->l2pad = L2PAD_SIZE(txdesc->header_length); | ||
342 | 340 | ||
343 | /* | 341 | /* |
344 | * Check whether this frame is to be acked. | 342 | * Check whether this frame is to be acked. |
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index f519aba4ff0f..94a48c174d67 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -285,8 +285,8 @@ enum txentry_desc_flags { | |||
285 | * | 285 | * |
286 | * @flags: Descriptor flags (See &enum queue_entry_flags). | 286 | * @flags: Descriptor flags (See &enum queue_entry_flags). |
287 | * @queue: Queue identification (See &enum data_queue_qid). | 287 | * @queue: Queue identification (See &enum data_queue_qid). |
288 | * @length: Length of the entire frame. | ||
288 | * @header_length: Length of 802.11 header. | 289 | * @header_length: Length of 802.11 header. |
289 | * @l2pad: Amount of padding to align 802.11 payload to 4-byte boundrary. | ||
290 | * @length_high: PLCP length high word. | 290 | * @length_high: PLCP length high word. |
291 | * @length_low: PLCP length low word. | 291 | * @length_low: PLCP length low word. |
292 | * @signal: PLCP signal. | 292 | * @signal: PLCP signal. |
@@ -311,8 +311,8 @@ struct txentry_desc { | |||
311 | 311 | ||
312 | enum data_queue_qid queue; | 312 | enum data_queue_qid queue; |
313 | 313 | ||
314 | u16 length; | ||
314 | u16 header_length; | 315 | u16 header_length; |
315 | u16 l2pad; | ||
316 | 316 | ||
317 | u16 length_high; | 317 | u16 length_high; |
318 | u16 length_low; | 318 | u16 length_low; |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index ac69dbe5719b..8099ecaf8694 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -1808,7 +1808,8 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1808 | 1808 | ||
1809 | if (skbdesc->desc_len > TXINFO_SIZE) { | 1809 | if (skbdesc->desc_len > TXINFO_SIZE) { |
1810 | rt2x00_desc_read(txd, 11, &word); | 1810 | rt2x00_desc_read(txd, 11, &word); |
1811 | rt2x00_set_field32(&word, TXD_W11_BUFFER_LENGTH0, skb->len); | 1811 | rt2x00_set_field32(&word, TXD_W11_BUFFER_LENGTH0, |
1812 | txdesc->length); | ||
1812 | rt2x00_desc_write(txd, 11, word); | 1813 | rt2x00_desc_write(txd, 11, word); |
1813 | } | 1814 | } |
1814 | 1815 | ||
@@ -1831,7 +1832,7 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1831 | rt2x00_set_field32(&word, TXD_W0_KEY_TABLE, | 1832 | rt2x00_set_field32(&word, TXD_W0_KEY_TABLE, |
1832 | test_bit(ENTRY_TXD_ENCRYPT_PAIRWISE, &txdesc->flags)); | 1833 | test_bit(ENTRY_TXD_ENCRYPT_PAIRWISE, &txdesc->flags)); |
1833 | rt2x00_set_field32(&word, TXD_W0_KEY_INDEX, txdesc->key_idx); | 1834 | rt2x00_set_field32(&word, TXD_W0_KEY_INDEX, txdesc->key_idx); |
1834 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len); | 1835 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); |
1835 | rt2x00_set_field32(&word, TXD_W0_BURST, | 1836 | rt2x00_set_field32(&word, TXD_W0_BURST, |
1836 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); | 1837 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); |
1837 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, txdesc->cipher); | 1838 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, txdesc->cipher); |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 7ebe14b64fe8..1399c18bc667 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1494,7 +1494,7 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1494 | rt2x00_set_field32(&word, TXD_W0_KEY_TABLE, | 1494 | rt2x00_set_field32(&word, TXD_W0_KEY_TABLE, |
1495 | test_bit(ENTRY_TXD_ENCRYPT_PAIRWISE, &txdesc->flags)); | 1495 | test_bit(ENTRY_TXD_ENCRYPT_PAIRWISE, &txdesc->flags)); |
1496 | rt2x00_set_field32(&word, TXD_W0_KEY_INDEX, txdesc->key_idx); | 1496 | rt2x00_set_field32(&word, TXD_W0_KEY_INDEX, txdesc->key_idx); |
1497 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, skb->len); | 1497 | rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); |
1498 | rt2x00_set_field32(&word, TXD_W0_BURST2, | 1498 | rt2x00_set_field32(&word, TXD_W0_BURST2, |
1499 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); | 1499 | test_bit(ENTRY_TXD_BURST, &txdesc->flags)); |
1500 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, txdesc->cipher); | 1500 | rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, txdesc->cipher); |