aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00usb.c
diff options
context:
space:
mode:
authorMattias Nissler <mattias.nissler@gmx.de>2008-08-29 15:07:20 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-29 16:24:12 -0400
commit1abc3656e961e62218257a85b3fe0a90ccd9036c (patch)
tree903167b49da4b96044f52bf42e4574a04e569662 /drivers/net/wireless/rt2x00/rt2x00usb.c
parent6c6aa3c004e702532cb0f549a96eb2f75636bd3b (diff)
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00usb.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c
index 2dd7c830c125..b73a7e0aeed4 100644
--- a/drivers/net/wireless/rt2x00/rt2x00usb.c
+++ b/drivers/net/wireless/rt2x00/rt2x00usb.c
@@ -168,11 +168,6 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb)
168 return; 168 return;
169 169
170 /* 170 /*
171 * Remove the descriptor data from the buffer.
172 */
173 skb_pull(entry->skb, entry->queue->desc_size);
174
175 /*
176 * Obtain the status about this packet. 171 * Obtain the status about this packet.
177 * Note that when the status is 0 it does not mean the 172 * Note that when the status is 0 it does not mean the
178 * frame was send out correctly. It only means the frame 173 * frame was send out correctly. It only means the frame
@@ -224,6 +219,12 @@ int rt2x00usb_write_tx_data(struct queue_entry *entry)
224 entry->skb->data, length, 219 entry->skb->data, length,
225 rt2x00usb_interrupt_txdone, entry); 220 rt2x00usb_interrupt_txdone, entry);
226 221
222 /*
223 * Make sure the skb->data pointer points to the frame, not the
224 * descriptor.
225 */
226 skb_pull(entry->skb, entry->queue->desc_size);
227
227 return 0; 228 return 0;
228} 229}
229EXPORT_SYMBOL_GPL(rt2x00usb_write_tx_data); 230EXPORT_SYMBOL_GPL(rt2x00usb_write_tx_data);