rt2x00: skb->data pointer should not include TX descriptor
Make sure the skb->data pointer points to the frame data, not the TX descriptor. The frame dumping code relies on that. Signed-off-by: Mattias Nissler <mattias.nissler@gmx.de> Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
6c6aa3c004
commit
1abc3656e9
@@ -167,11 +167,6 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
|
||||
!test_bit(ENTRY_OWNER_DEVICE_DATA, &entry->flags))
|
||||
return;
|
||||
|
||||
/*
|
||||
* Remove the descriptor data from the buffer.
|
||||
*/
|
||||
skb_pull(entry->skb, entry->queue->desc_size);
|
||||
|
||||
/*
|
||||
* Obtain the status about this packet.
|
||||
* Note that when the status is 0 it does not mean the
|
||||
@@ -224,6 +219,12 @@ int rt2x00usb_write_tx_data(struct queue_entry *entry)
|
||||
entry->skb->data, length,
|
||||
rt2x00usb_interrupt_txdone, entry);
|
||||
|
||||
/*
|
||||
* Make sure the skb->data pointer points to the frame, not the
|
||||
* descriptor.
|
||||
*/
|
||||
skb_pull(entry->skb, entry->queue->desc_size);
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00usb_write_tx_data);
|
||||
|
||||
Reference in New Issue
Block a user