diff options
author | 2010-04-07 16:31:16 +0000 | |
---|---|---|
committer | 2010-04-07 16:31:16 +0000 | |
commit | 69fa6efa96a229690a1919c658a13da06a1c727d (patch) | |
tree | d2ba6213c58e3ed6d9e250440e9f5c399c004658 /sys | |
parent | update initvals and TX gains for AR9285 >=1.2 (diff) | |
download | wireguard-openbsd-69fa6efa96a229690a1919c658a13da06a1c727d.tar.xz wireguard-openbsd-69fa6efa96a229690a1919c658a13da06a1c727d.zip |
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); |