summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00pci.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-02-10 22:51:21 +0100
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:20 -0500
commit647d0ca905f7d975e0bf41f571de6f443c814913 (patch)
tree61f6552d708eb3cec28b8e0ba828834390db8283 /drivers/net/wireless/rt2x00/rt2x00pci.c
parent417f412f2dfae016e29bb128bece60bf75d94d48 (diff)
downloadblackbird-op-linux-647d0ca905f7d975e0bf41f571de6f443c814913.tar.gz
blackbird-op-linux-647d0ca905f7d975e0bf41f571de6f443c814913.zip
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>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index b8c6a8c9d6d2..8f88ca23c23a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -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;
OpenPOWER on IntegriCloud