summaryrefslogtreecommitdiff
path: root/sys/dev/ral/rt2860.c
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2019-08-06 20:21:57 +0000
committerKyle Evans <kevans@FreeBSD.org>2019-08-06 20:21:57 +0000
commit82bac68cdc50dcdfb0a7035c19eb1c9af0daf69c (patch)
treef4a229941159342f31c0b92ced40560c9b2285a0 /sys/dev/ral/rt2860.c
parent9cb069b552b23198fe5a43b25ce50d92b2da0e53 (diff)
Notes
Diffstat (limited to 'sys/dev/ral/rt2860.c')
-rw-r--r--sys/dev/ral/rt2860.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ral/rt2860.c b/sys/dev/ral/rt2860.c
index 4b01c9924a9d2..a4e049b6fe971 100644
--- a/sys/dev/ral/rt2860.c
+++ b/sys/dev/ral/rt2860.c
@@ -1092,10 +1092,12 @@ rt2860_drain_stats_fifo(struct rt2860_softc *sc)
DPRINTFN(4, ("tx stat 0x%08x\n", stat));
wcid = (stat >> RT2860_TXQ_WCID_SHIFT) & 0xff;
+ if (wcid > RT2860_WCID_MAX)
+ continue;
ni = sc->wcid2ni[wcid];
/* if no ACK was requested, no feedback is available */
- if (!(stat & RT2860_TXQ_ACKREQ) || wcid == 0xff || ni == NULL)
+ if (!(stat & RT2860_TXQ_ACKREQ) || ni == NULL)
continue;
/* update per-STA AMRR stats */