Skip to contentSkip to conversation

p54pci: increase ring buffer index counter when skipping

PATCH New Christian Lamparter 1 participant 1 message Aug 31, 2008 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 p54pci: increase ring buffer index counter when skipping

I'm afraid, I forgot to add the following lines to 7262d59366 ("p54pci: rx tasklet refactoring").

These changes are necessary to ensure loop termination.

---
John,

for wireless-next.
---

drivers/net/wireless/p54/p54pci.c +4 -2
diff -Nurp a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c
@@ -301,9 +301,11 @@ static void p54p_check_rx_ring(struct ie
 		len = le16_to_cpu(desc->len);
 		skb = rx_buf[i];
 
-		if (!skb)
+		if (!skb) {
+			i++;
+			i %= ring_limit;
 			continue;
-
+		}
 		skb_put(skb, len);
 
 		if (p54_rx(dev, skb)) {