aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index 8d3e95e0dcfe..070c23ed4013 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1164,15 +1164,15 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1164{ 1164{
1165 struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); 1165 struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb);
1166 struct queue_entry_priv_pci *entry_priv = skbdesc->entry->priv_data; 1166 struct queue_entry_priv_pci *entry_priv = skbdesc->entry->priv_data;
1167 __le32 *txd = skbdesc->desc; 1167 __le32 *txd = entry_priv->desc;
1168 u32 word; 1168 u32 word;
1169 1169
1170 /* 1170 /*
1171 * Start writing the descriptor words. 1171 * Start writing the descriptor words.
1172 */ 1172 */
1173 rt2x00_desc_read(entry_priv->desc, 1, &word); 1173 rt2x00_desc_read(txd, 1, &word);
1174 rt2x00_set_field32(&word, TXD_W1_BUFFER_ADDRESS, skbdesc->skb_dma); 1174 rt2x00_set_field32(&word, TXD_W1_BUFFER_ADDRESS, skbdesc->skb_dma);
1175 rt2x00_desc_write(entry_priv->desc, 1, word); 1175 rt2x00_desc_write(txd, 1, word);
1176 1176
1177 rt2x00_desc_read(txd, 2, &word); 1177 rt2x00_desc_read(txd, 2, &word);
1178 rt2x00_set_field32(&word, TXD_W2_IV_OFFSET, IEEE80211_HEADER); 1178 rt2x00_set_field32(&word, TXD_W2_IV_OFFSET, IEEE80211_HEADER);
@@ -1216,6 +1216,12 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1216 rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length); 1216 rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length);
1217 rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE); 1217 rt2x00_set_field32(&word, TXD_W0_CIPHER_ALG, CIPHER_NONE);
1218 rt2x00_desc_write(txd, 0, word); 1218 rt2x00_desc_write(txd, 0, word);
1219
1220 /*
1221 * Register descriptor details in skb frame descriptor.
1222 */
1223 skbdesc->desc = txd;
1224 skbdesc->desc_len = TXD_DESC_SIZE;
1219} 1225}
1220 1226
1221/* 1227/*
@@ -1238,15 +1244,6 @@ static void rt2500pci_write_beacon(struct queue_entry *entry,
1238 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 0); 1244 rt2x00_set_field32(&reg, CSR14_BEACON_GEN, 0);
1239 rt2x00pci_register_write(rt2x00dev, CSR14, reg); 1245 rt2x00pci_register_write(rt2x00dev, CSR14, reg);
1240 1246
1241 /*
1242 * Replace rt2x00lib allocated descriptor with the
1243 * pointer to the _real_ hardware descriptor.
1244 * After that, map the beacon to DMA and update the
1245 * descriptor.
1246 */
1247 memcpy(entry_priv->desc, skbdesc->desc, skbdesc->desc_len);
1248 skbdesc->desc = entry_priv->desc;
1249
1250 rt2x00queue_map_txskb(rt2x00dev, entry->skb); 1247 rt2x00queue_map_txskb(rt2x00dev, entry->skb);
1251 1248
1252 rt2x00_desc_read(entry_priv->desc, 1, &word); 1249 rt2x00_desc_read(entry_priv->desc, 1, &word);