Skip to contentSkip to conversation

p54pci: fix bugs in p54p_check_tx_ring

PATCH New Christian Lamparter 1 participant 1 message Apr 22, 2010 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 p54pci: fix bugs in p54p_check_tx_ring

From: Hans de Goede <[email protected]>

Hans de Goede identified a bug in p54p_check_tx_ring:

there are two ring indices. 1 => tx data and 3 => tx management. But the old code had a constant "1" and this resulted in spurious dma unmapping failures.

Cc: [email protected]
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=583623

---

drivers/net/wireless/p54/p54pci.c +1 -1
index 679da7e..cffe2f2 100644
@@ -246,7 +246,7 @@ static void p54p_check_tx_ring(struct ieee80211_hw *dev, u32 *index,
 	u32 idx, i;
 
 	i = (*index) % ring_limit;
-	(*index) = idx = le32_to_cpu(ring_control->device_idx[1]);
+	(*index) = idx = le32_to_cpu(ring_control->device_idx[ring_index]);
 	idx %= ring_limit;
 
 	while (i != idx) {