aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2500pci.c
diff options
context:
space:
mode:
authorGertjan van Wingerde <gwingerde@gmail.com>2010-05-11 17:51:39 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-05-12 16:41:44 -0400
commite01f1ec35ff91c8a3f4a3e48a0c8ab476124b973 (patch)
tree495949f825157e5dc00694856e35eaa83afe0bb0 /drivers/net/wireless/rt2x00/rt2500pci.c
parent6b97cb04f2766513c57b57f8ac4b44915296230f (diff)
rt2x00: Re-order tx descriptor writing code in drivers.
Where possible, write the tx descriptor words from start to end, to follow a logical ordering of words. Where this is not possible (in rt2400pci, rt2500pci and rt61pci) add a comment as to why word 0 needs to be written last. Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2500pci.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index d876c6d87591..8d3e95e0dcfe 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1193,6 +1193,11 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1193 test_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags)); 1193 test_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags));
1194 rt2x00_desc_write(txd, 10, word); 1194 rt2x00_desc_write(txd, 10, word);
1195 1195
1196 /*
1197 * Writing TXD word 0 must the last to prevent a race condition with
1198 * the device, whereby the device may take hold of the TXD before we
1199 * finished updating it.
1200 */
1196 rt2x00_desc_read(txd, 0, &word); 1201 rt2x00_desc_read(txd, 0, &word);
1197 rt2x00_set_field32(&word, TXD_W0_OWNER_NIC, 1); 1202 rt2x00_set_field32(&word, TXD_W0_OWNER_NIC, 1);
1198 rt2x00_set_field32(&word, TXD_W0_VALID, 1); 1203 rt2x00_set_field32(&word, TXD_W0_VALID, 1);