diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2010-04-07 16:31:17 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2010-04-07 16:31:17 +0000 |
commit | 7757e8fe89201ded301c5f28f12dcb1cca106687 (patch) | |
tree | e027182b646e199b5c0d56b0d6531649cd9e7a41 /sys | |
parent | b7f0230b09ce0d8d16620767b90102947f724c07 (diff) |
txq->lastds is only valid when txq is not empty.
Check for emptiness of the TX queue instead of lastds != NULL.
I have a feeling this might fix the "device timeout" issues reported
by Rivo Nurges on his AR5418 unveiled by athn.c r1.28 commit, though
he is not around to confirm.
This is a candidate for -stable.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/athn.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c index aaa1ee14890..6c9a45e97ee 100644 --- a/sys/dev/ic/athn.c +++ b/sys/dev/ic/athn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: athn.c,v 1.32 2010/04/07 16:19:33 damien Exp $ */ +/* $OpenBSD: athn.c,v 1.33 2010/04/07 16:31:16 damien Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -3605,7 +3605,7 @@ athn_tx(struct athn_softc *sc, struct mbuf *m, struct ieee80211_node *ni) lastds->ds_link = bf->bf_daddr + i * sizeof (*ds); lastds = ds; } - if (txq->lastds != NULL) + if (!SIMPLEQ_EMPTY(&txq->head)) txq->lastds->ds_link = bf->bf_daddr; else AR_WRITE(sc, AR_QTXDP(qid), bf->bf_daddr); |