rt2x00: Initialize TX control field in data entries
authorMattias Nissler <mattias.nissler@gmx.de>
Sun, 9 Mar 2008 21:38:54 +0000 (22:38 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 13 Mar 2008 20:02:33 +0000 (16:02 -0400)
In the TX path, the driver didn't copy the TX control data structure. Thus, it
was invalid in the TX done handler, causing serious trouble and misbehaviour.

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>
drivers/net/wireless/rt2x00/rt2x00pci.c
drivers/net/wireless/rt2x00/rt2x00usb.c

index 1960d938d73bf403b2dbe083741287702a6f0297..7867ec64bd2cceda4b25c7a97ddc8ae4ab9a0da1 100644 (file)
@@ -67,6 +67,7 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
        skbdesc->desc_len = queue->desc_size;
        skbdesc->entry = entry;
 
+       memcpy(&priv_tx->control, control, sizeof(priv_tx->control));
        memcpy(priv_tx->data, skb->data, skb->len);
        rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
 
index 512ff3914813e76ac7a4b962a2fb61d5a32c788c..eec91111e7656bffa9b903223af03858aaab86d3 100644 (file)
@@ -206,6 +206,7 @@ int rt2x00usb_write_tx_data(struct rt2x00_dev *rt2x00dev,
        skbdesc->desc_len = queue->desc_size;
        skbdesc->entry = entry;
 
+       memcpy(&priv_tx->control, control, sizeof(priv_tx->control));
        rt2x00lib_write_tx_desc(rt2x00dev, skb, control);
 
        /*