aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlban Browaeys <prahal@yahoo.com>2009-12-04 17:47:00 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-21 18:56:29 -0500
commit1398d4580eff2656f3a808ec24744ce5a842db35 (patch)
tree3d11eac574e232219f5ca512d1572130c242834c /drivers
parente81e0aef32bfa7f593b14479b9c7eaa7196798ac (diff)
rt2x00 : trim the skb after having the l2pad removed.
Otherwise we end up truncating the skb before removing the l2pad thus we might have the truncated part become garbage while getting it back in remove_l2pad. For the same issue: remove the skb_trim from the rt2800 fill_rxdone (it is done after l2pad removal in rt2x00lib_rxdone). Signed-off-by: Alban Browaeys <prahal@yahoo.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <ivdoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800pci.c1
-rw-r--r--drivers/net/wireless/rt2x00/rt2800usb.c1
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c6
3 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800pci.c b/drivers/net/wireless/rt2x00/rt2800pci.c
index dfc886fcb44d..6fcb2bb840b2 100644
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
@@ -927,7 +927,6 @@ static void rt2800pci_fill_rxdone(struct queue_entry *entry,
927 * Remove TXWI descriptor from start of buffer. 927 * Remove TXWI descriptor from start of buffer.
928 */ 928 */
929 skb_pull(entry->skb, RXWI_DESC_SIZE); 929 skb_pull(entry->skb, RXWI_DESC_SIZE);
930 skb_trim(entry->skb, rxdesc->size);
931} 930}
932 931
933/* 932/*
diff --git a/drivers/net/wireless/rt2x00/rt2800usb.c b/drivers/net/wireless/rt2x00/rt2800usb.c
index af85d18cdbe7..1db8667a6ff1 100644
--- a/drivers/net/wireless/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/rt2x00/rt2800usb.c
@@ -663,7 +663,6 @@ static void rt2800usb_fill_rxdone(struct queue_entry *entry,
663 * Remove RXWI descriptor from start of buffer. 663 * Remove RXWI descriptor from start of buffer.
664 */ 664 */
665 skb_pull(entry->skb, skbdesc->desc_len); 665 skb_pull(entry->skb, skbdesc->desc_len);
666 skb_trim(entry->skb, rxdesc->size);
667} 666}
668 667
669/* 668/*
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 06c43ca39bf8..cc6bcc5a20c7 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -385,9 +385,6 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev,
385 memset(&rxdesc, 0, sizeof(rxdesc)); 385 memset(&rxdesc, 0, sizeof(rxdesc));
386 rt2x00dev->ops->lib->fill_rxdone(entry, &rxdesc); 386 rt2x00dev->ops->lib->fill_rxdone(entry, &rxdesc);
387 387
388 /* Trim buffer to correct size */
389 skb_trim(entry->skb, rxdesc.size);
390
391 /* 388 /*
392 * The data behind the ieee80211 header must be 389 * The data behind the ieee80211 header must be
393 * aligned on a 4 byte boundary. 390 * aligned on a 4 byte boundary.
@@ -409,6 +406,9 @@ void rt2x00lib_rxdone(struct rt2x00_dev *rt2x00dev,
409 else 406 else
410 rt2x00queue_align_payload(entry->skb, header_length); 407 rt2x00queue_align_payload(entry->skb, header_length);
411 408
409 /* Trim buffer to correct size */
410 skb_trim(entry->skb, rxdesc.size);
411
412 /* 412 /*
413 * Check if the frame was received using HT. In that case, 413 * Check if the frame was received using HT. In that case,
414 * the rate is the MCS index and should be passed to mac80211 414 * the rate is the MCS index and should be passed to mac80211