aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00pci.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.c b/drivers/net/wireless/rt2x00/rt2x00pci.c
index fa7de41be049..70a3d135f64e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -35,8 +35,7 @@
35 * TX data handlers. 35 * TX data handlers.
36 */ 36 */
37int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev, 37int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
38 struct data_queue *queue, struct sk_buff *skb, 38 struct data_queue *queue, struct sk_buff *skb)
39 struct ieee80211_tx_control *control)
40{ 39{
41 struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX); 40 struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX);
42 struct queue_entry_priv_pci *entry_priv = entry->priv_data; 41 struct queue_entry_priv_pci *entry_priv = entry->priv_data;
@@ -64,19 +63,19 @@ int rt2x00pci_write_tx_data(struct rt2x00_dev *rt2x00dev,
64 * for our information. 63 * for our information.
65 */ 64 */
66 entry->skb = skb; 65 entry->skb = skb;
67 rt2x00queue_create_tx_descriptor(entry, &txdesc, control); 66 rt2x00queue_create_tx_descriptor(entry, &txdesc);
68 67
69 /* 68 /*
70 * Fill in skb descriptor 69 * Fill in skb descriptor
71 */ 70 */
72 skbdesc = get_skb_frame_desc(skb); 71 skbdesc = get_skb_frame_desc(skb);
72 memset(skbdesc, 0, sizeof(*skbdesc));
73 skbdesc->data = skb->data; 73 skbdesc->data = skb->data;
74 skbdesc->data_len = skb->len; 74 skbdesc->data_len = skb->len;
75 skbdesc->desc = entry_priv->desc; 75 skbdesc->desc = entry_priv->desc;
76 skbdesc->desc_len = queue->desc_size; 76 skbdesc->desc_len = queue->desc_size;
77 skbdesc->entry = entry; 77 skbdesc->entry = entry;
78 78
79 memcpy(&entry_priv->control, control, sizeof(entry_priv->control));
80 memcpy(entry_priv->data, skb->data, skb->len); 79 memcpy(entry_priv->data, skb->data, skb->len);
81 80
82 rt2x00queue_write_tx_descriptor(entry, &txdesc); 81 rt2x00queue_write_tx_descriptor(entry, &txdesc);
@@ -164,9 +163,9 @@ void rt2x00pci_txdone(struct rt2x00_dev *rt2x00dev, struct queue_entry *entry,
164 struct txdone_entry_desc *txdesc) 163 struct txdone_entry_desc *txdesc)
165{ 164{
166 struct queue_entry_priv_pci *entry_priv = entry->priv_data; 165 struct queue_entry_priv_pci *entry_priv = entry->priv_data;
166 enum data_queue_qid qid = skb_get_queue_mapping(entry->skb);
167 u32 word; 167 u32 word;
168 168
169 txdesc->control = &entry_priv->control;
170 rt2x00lib_txdone(entry, txdesc); 169 rt2x00lib_txdone(entry, txdesc);
171 170
172 /* 171 /*
@@ -187,7 +186,7 @@ void rt2x00pci_txdone(struct rt2x00_dev *rt2x00dev, struct queue_entry *entry,
187 * is reenabled when the txdone handler has finished. 186 * is reenabled when the txdone handler has finished.
188 */ 187 */
189 if (!rt2x00queue_full(entry->queue)) 188 if (!rt2x00queue_full(entry->queue))
190 ieee80211_wake_queue(rt2x00dev->hw, entry_priv->control.queue); 189 ieee80211_wake_queue(rt2x00dev->hw, qid);
191 190
192} 191}
193EXPORT_SYMBOL_GPL(rt2x00pci_txdone); 192EXPORT_SYMBOL_GPL(rt2x00pci_txdone);