Skip to contentSkip to conversation

rt2x00 : fix txdone implementation

PATCH In review Alban Browaeys 2 participants 3 messages Feb 25, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 rt2x00 : fix txdone implementation

Properly move to the headroom position in dma mapped skb. The hw extra headroom is now taken into account.

---
 drivers/net/wireless/rt2x00/rt2800pci.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/rt2x00/rt2800pci.c +3 -3
index 3ac1df0..4e62e84 100644
@@ -718,8 +718,8 @@ static void rt2800pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
 	rt2x00_desc_write(txd, 1, word);
 
 	rt2x00_desc_read(txd, 2, &word);
-	rt2x00_set_field32(&word, TXD_W2_SD_PTR1,
-			   skbdesc->skb_dma + rt2x00dev->ops->extra_tx_headroom);
+	rt2x00_set_field32(&word, TXD_W2_SD_PTR1, skbdesc->skb_dma
+			   + rt2x00dev->ops->extra_tx_headroom);
 	rt2x00_desc_write(txd, 2, word);
 
 	rt2x00_desc_read(txd, 3, &word);
@@ -966,7 +966,7 @@ static void rt2800pci_txdone(struct rt2x00_dev *rt2x00dev)
 		/* Check if we got a match by looking at WCID/ACK/PID
 		 * fields */
 		txwi = (__le32 *)(entry->skb->data -
-				  rt2x00dev->hw->extra_tx_headroom);
+				  rt2x00dev->ops->extra_tx_headroom);
 
 		rt2x00_desc_read(txwi, 1, &word);
 		tx_wcid = rt2x00_get_field32(word, TXWI_W1_WIRELESS_CLI_ID);
Signature · 1 line
1.7.0
#1 lore raw

Quoting Alban Browaeys <[email protected]>:

Quoted 4 lines

Properly move to the headroom position in dma mapped skb. The hw extra headroom is now taken into account.

...

drivers/net/wireless/rt2x00/rt2800pci.c static void rt2800pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, · line 722

Quoted 4 lines
drivers/net/wireless/rt2x00/rt2800pci.c +2 -2
-	rt2x00_set_field32(&word, TXD_W2_SD_PTR1,
-			   skbdesc->skb_dma + rt2x00dev->ops->extra_tx_headroom);
+	rt2x00_set_field32(&word, TXD_W2_SD_PTR1, skbdesc->skb_dma
+			   + rt2x00dev->ops->extra_tx_headroom);

I think it's just a formatting change. I would not mix formatting changes with the real fixes. I can understand reformatting code that is also modified in some other way, but that's even a separate function.

drivers/net/wireless/rt2x00/rt2800pci.c static void rt2800pci_txdone(struct rt2x00_dev *rt2x00dev) · line 969

Quoted 3 lines
drivers/net/wireless/rt2x00/rt2800pci.c +1 -1
 		txwi = (__le32 *)(entry->skb->data -
-				  rt2x00dev->hw->extra_tx_headroom);
+				  rt2x00dev->ops->extra_tx_headroom);

Now that's a real change.

Signature · 2 lines
Regards,
Pavel Roskin
#2 lore raw
Quoted 5 lines · Pavel Roskin

Quoting Alban Browaeys <[email protected]>:

Quoted 3 lines

Properly move to the headroom position in dma mapped skb. The hw extra headroom is now taken into account.

Quoted 9 lines
Quoted 1 line

...

drivers/net/wireless/rt2x00/rt2800pci.c static void rt2800pci_write_tx_desc(struct rt2x00_dev *rt2x00dev, · line 722

Quoted 4 lines
drivers/net/wireless/rt2x00/rt2800pci.c +2 -2
-    rt2x00_set_field32(&word, TXD_W2_SD_PTR1,
-               skbdesc->skb_dma + rt2x00dev->ops->extra_tx_headroom);
+    rt2x00_set_field32(&word, TXD_W2_SD_PTR1, skbdesc->skb_dma
+               + rt2x00dev->ops->extra_tx_headroom);

I think it's just a formatting change. I would not mix formatting changes with the real fixes. I can understand reformatting code that is also modified in some other way, but that's even a separate function.

Thank you. There was a real change (I did not meant for to reformat this line) but it got merged and I did not saw it. I sent a new version of the patch without the first now uneeded change.

Best regards,
Alban