rt2x00: Fix skbdesc->data_len initialization
skbdesc->data_len was not initialized correctly in rt2x00pci, rt2x00usb, rt2500usb and rt73usb. The value was set to queue->data_size which means that the incorrect frame size was pased to the upper layers. Correctly base the value on either the skb->len, or the rx frame size passed to the driver by the device. Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
Родитель
417f412f2d
Коммит
647d0ca905
|
@ -1149,7 +1149,7 @@ static void rt2500usb_fill_rxdone(struct queue_entry *entry,
|
|||
* Set descriptor pointer.
|
||||
*/
|
||||
skbdesc->data = entry->skb->data;
|
||||
skbdesc->data_len = entry->queue->data_size;
|
||||
skbdesc->data_len = rxdesc->size;
|
||||
skbdesc->desc = entry->skb->data + rxdesc->size;
|
||||
skbdesc->desc_len = entry->queue->desc_size;
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
|
|||
skbdesc = get_skb_frame_desc(skb);
|
||||
memset(skbdesc, 0, sizeof(*skbdesc));
|
||||
skbdesc->data = skb->data;
|
||||
skbdesc->data_len = queue->data_size;
|
||||
skbdesc->data_len = skb->len;
|
||||
skbdesc->desc = priv_tx->desc;
|
||||
skbdesc->desc_len = queue->desc_size;
|
||||
skbdesc->entry = entry;
|
||||
|
@ -131,7 +131,7 @@ void rt2x00pci_rxdone(struct rt2x00_dev *rt2x00dev)
|
|||
skbdesc = get_skb_frame_desc(entry->skb);
|
||||
memset(skbdesc, 0, sizeof(*skbdesc));
|
||||
skbdesc->data = entry->skb->data;
|
||||
skbdesc->data_len = queue->data_size;
|
||||
skbdesc->data_len = entry->skb->len;
|
||||
skbdesc->desc = priv_rx->desc;
|
||||
skbdesc->desc_len = queue->desc_size;
|
||||
skbdesc->entry = entry;
|
||||
|
|
|
@ -254,7 +254,7 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev,
|
|||
skbdesc = get_skb_frame_desc(skb);
|
||||
memset(skbdesc, 0, sizeof(*skbdesc));
|
||||
skbdesc->data = skb->data + queue->desc_size;
|
||||
skbdesc->data_len = queue->data_size;
|
||||
skbdesc->data_len = skb->len - queue->desc_size;
|
||||
skbdesc->desc = skb->data;
|
||||
skbdesc->desc_len = queue->desc_size;
|
||||
skbdesc->entry = entry;
|
||||
|
|
|
@ -1399,7 +1399,7 @@ static void rt73usb_fill_rxdone(struct queue_entry *entry,
|
|||
* Set descriptor and data pointer.
|
||||
*/
|
||||
skbdesc->data = entry->skb->data + entry->queue->desc_size;
|
||||
skbdesc->data_len = entry->queue->data_size;
|
||||
skbdesc->data_len = rxdesc->size;
|
||||
skbdesc->desc = entry->skb->data;
|
||||
skbdesc->desc_len = entry->queue->desc_size;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче