Stop decrementing ring->queued inside the if-statement which guards
maintenance of the OACTIVE flag. This is wrong and resulted in a negative
counter value (visible in firmware error traces). The counter is already
decremented in the loop above where frames are taken off the ring.
-/* $OpenBSD: if_iwx.c,v 1.70 2021/07/20 14:44:09 stsp Exp $ */
+/* $OpenBSD: if_iwx.c,v 1.71 2021/07/26 14:15:40 stsp Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
ring->tail = (ring->tail + 1) % IWX_TX_RING_COUNT;
}
- if (--ring->queued < IWX_TX_RING_LOMARK) {
+ if (ring->queued < IWX_TX_RING_LOMARK) {
sc->qfullmsk &= ~(1 << ring->qid);
if (sc->qfullmsk == 0 && ifq_is_oactive(&ifp->if_snd)) {
ifq_clr_oactive(&ifp->if_snd);