diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-01-10 16:02:44 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:09:47 -0500 |
commit | 40561b8426c27f187e2ae496ed603e7c4e3ab818 (patch) | |
tree | 8aa31c5aca687b58590dfe2ba5a5aae9d44b5217 /drivers/net/wireless/rt2x00/rt73usb.c | |
parent | dd0d43ea0bbd4c4554b13d4a5d282f9c4d1b5591 (diff) |
rt2x00: Data and desc pointer initialization
rt2500usb and rt73usb data and desc pointer initialization
was incorrect because it was using uninitialized variables
to determine the length.
In addition rt2500usb used skb_pull and removed the ieee80211
from each received frame instead of using skb_trim to remove
the device descriptor from the frame.
Finally this also fixes the descriptor override when 4 byte
aligning occured. We still need a completely valid descriptor
when using the TX/RX dumping capabilities in debugfs.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt73usb.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt73usb.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index f9518764aeb0..4d576ab3e7f9 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1398,15 +1398,12 @@ static void rt73usb_fill_rxdone(struct data_entry *entry, | |||
1398 | desc->my_bss = !!rt2x00_get_field32(word0, RXD_W0_MY_BSS); | 1398 | desc->my_bss = !!rt2x00_get_field32(word0, RXD_W0_MY_BSS); |
1399 | 1399 | ||
1400 | /* | 1400 | /* |
1401 | * Pull the skb to clear the descriptor area. | ||
1402 | */ | ||
1403 | skb_pull(entry->skb, entry->ring->desc_size); | ||
1404 | |||
1405 | /* | ||
1406 | * Set descriptor and data pointer. | 1401 | * Set descriptor and data pointer. |
1407 | */ | 1402 | */ |
1408 | skbdesc->desc = entry->skb->data - skbdesc->desc_len; | 1403 | skbdesc->desc = entry->skb->data; |
1409 | skbdesc->data = entry->skb->data; | 1404 | skbdesc->desc_len = entry->ring->desc_size; |
1405 | skbdesc->data = entry->skb->data + entry->ring->desc_size; | ||
1406 | skbdesc->data_len = desc->size; | ||
1410 | } | 1407 | } |
1411 | 1408 | ||
1412 | /* | 1409 | /* |