diff options
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2400pci.c')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2400pci.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2400pci.c b/drivers/net/wireless/rt2x00/rt2400pci.c index 1eff6ec88457..def3fa45ae7a 100644 --- a/drivers/net/wireless/rt2x00/rt2400pci.c +++ b/drivers/net/wireless/rt2x00/rt2400pci.c | |||
@@ -1006,15 +1006,15 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1006 | { | 1006 | { |
1007 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); | 1007 | struct skb_frame_desc *skbdesc = get_skb_frame_desc(skb); |
1008 | struct queue_entry_priv_pci *entry_priv = skbdesc->entry->priv_data; | 1008 | struct queue_entry_priv_pci *entry_priv = skbdesc->entry->priv_data; |
1009 | __le32 *txd = skbdesc->desc; | 1009 | __le32 *txd = entry_priv->desc; |
1010 | u32 word; | 1010 | u32 word; |
1011 | 1011 | ||
1012 | /* | 1012 | /* |
1013 | * Start writing the descriptor words. | 1013 | * Start writing the descriptor words. |
1014 | */ | 1014 | */ |
1015 | rt2x00_desc_read(entry_priv->desc, 1, &word); | 1015 | rt2x00_desc_read(txd, 1, &word); |
1016 | rt2x00_set_field32(&word, TXD_W1_BUFFER_ADDRESS, skbdesc->skb_dma); | 1016 | rt2x00_set_field32(&word, TXD_W1_BUFFER_ADDRESS, skbdesc->skb_dma); |
1017 | rt2x00_desc_write(entry_priv->desc, 1, word); | 1017 | rt2x00_desc_write(txd, 1, word); |
1018 | 1018 | ||
1019 | rt2x00_desc_read(txd, 2, &word); | 1019 | rt2x00_desc_read(txd, 2, &word); |
1020 | rt2x00_set_field32(&word, TXD_W2_BUFFER_LENGTH, txdesc->length); | 1020 | rt2x00_set_field32(&word, TXD_W2_BUFFER_LENGTH, txdesc->length); |
@@ -1059,6 +1059,12 @@ static void rt2400pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, | |||
1059 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, | 1059 | rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, |
1060 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); | 1060 | test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); |
1061 | rt2x00_desc_write(txd, 0, word); | 1061 | rt2x00_desc_write(txd, 0, word); |
1062 | |||
1063 | /* | ||
1064 | * Register descriptor details in skb frame descriptor. | ||
1065 | */ | ||
1066 | skbdesc->desc = txd; | ||
1067 | skbdesc->desc_len = TXD_DESC_SIZE; | ||
1062 | } | 1068 | } |
1063 | 1069 | ||
1064 | /* | 1070 | /* |
@@ -1081,15 +1087,6 @@ static void rt2400pci_write_beacon(struct queue_entry *entry, | |||
1081 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); | 1087 | rt2x00_set_field32(®, CSR14_BEACON_GEN, 0); |
1082 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); | 1088 | rt2x00pci_register_write(rt2x00dev, CSR14, reg); |
1083 | 1089 | ||
1084 | /* | ||
1085 | * Replace rt2x00lib allocated descriptor with the | ||
1086 | * pointer to the _real_ hardware descriptor. | ||
1087 | * After that, map the beacon to DMA and update the | ||
1088 | * descriptor. | ||
1089 | */ | ||
1090 | memcpy(entry_priv->desc, skbdesc->desc, skbdesc->desc_len); | ||
1091 | skbdesc->desc = entry_priv->desc; | ||
1092 | |||
1093 | rt2x00queue_map_txskb(rt2x00dev, entry->skb); | 1090 | rt2x00queue_map_txskb(rt2x00dev, entry->skb); |
1094 | 1091 | ||
1095 | rt2x00_desc_read(entry_priv->desc, 1, &word); | 1092 | rt2x00_desc_read(entry_priv->desc, 1, &word); |