summaryrefslogtreecommitdiffstats
path: root/sys/dev/ral/rt2661.c
diff options
context:
space:
mode:
authorfjoe <fjoe@FreeBSD.org>2006-06-05 20:06:29 +0000
committerfjoe <fjoe@FreeBSD.org>2006-06-05 20:06:29 +0000
commit952053eb1cbecdd71954971c38b40e8a83a8ad88 (patch)
treee502da66bfe872d1a60a689f9efeb78c9848956c /sys/dev/ral/rt2661.c
parent50ddaeffca19c8e1e167f0c9b2385100686824c5 (diff)
downloadFreeBSD-src-952053eb1cbecdd71954971c38b40e8a83a8ad88.zip
FreeBSD-src-952053eb1cbecdd71954971c38b40e8a83a8ad88.tar.gz
Fix kernel panic in rt2661_tx_intr() if no frames has been sent.
Obtained from: OpenBSD (sys/dev/ic/rt2661.c rev. 1.15)
Diffstat (limited to 'sys/dev/ral/rt2661.c')
-rw-r--r--sys/dev/ral/rt2661.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/ral/rt2661.c b/sys/dev/ral/rt2661.c
index 408a6f2..74b2856 100644
--- a/sys/dev/ral/rt2661.c
+++ b/sys/dev/ral/rt2661.c
@@ -962,6 +962,10 @@ rt2661_tx_intr(struct rt2661_softc *sc)
data = &txq->data[txq->stat];
rn = (struct rt2661_node *)data->ni;
+ /* if no frame has been sent, ignore */
+ if (rn == NULL)
+ continue;
+
switch (RT2661_TX_RESULT(val)) {
case RT2661_TX_SUCCESS:
retrycnt = RT2661_TX_RETRYCNT(val);
OpenPOWER on IntegriCloud