Properly reset the RX ring by clearing RX buffer status exposed to hardware.
Found by Matthew Dillon while porting FreeBSD's iwm(4) to Dragonfly.
ok?
Index: if_iwm.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_iwm.c,v
retrieving revision 1.46
diff -u -p -r1.46 if_iwm.c
--- if_iwm.c 19 Jul 2015 21:40:00 -0000 1.46
+++ if_iwm.c 22 Sep 2015 16:52:10 -0000
@@ -1046,6 +1046,7 @@ iwm_reset_rx_ring(struct iwm_softc *sc,
iwm_nic_unlock(sc);
}
ring->cur = 0;
+ memset(ring->stat, 0, sizeof(*ring->stat));
}
void