summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2017-05-19 11:30:40 +0000
committerstsp <stsp@openbsd.org>2017-05-19 11:30:40 +0000
commit3396b3ad9fa421a0d79bba850e93dc6a8c73691c (patch)
tree50f7f37adb6153d9e8a3e488efb13ebce8f174bd
parentMake rtwn(4) support fixed transmit rates set with ifconfig(8). (diff)
downloadwireguard-openbsd-3396b3ad9fa421a0d79bba850e93dc6a8c73691c.tar.xz
wireguard-openbsd-3396b3ad9fa421a0d79bba850e93dc6a8c73691c.zip
Make rtwn(4) add frames which failed to transmit to AMRR's transmit counter.
More closely matches what other drivers are doing.
-rw-r--r--sys/dev/pci/if_rtwn.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/pci/if_rtwn.c b/sys/dev/pci/if_rtwn.c
index 38708a34c77..754af774d44 100644
--- a/sys/dev/pci/if_rtwn.c
+++ b/sys/dev/pci/if_rtwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rtwn.c,v 1.27 2017/05/19 10:53:33 stsp Exp $ */
+/* $OpenBSD: if_rtwn.c,v 1.28 2017/05/19 11:30:40 stsp Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -1761,9 +1761,8 @@ rtwn_tx_report(struct rtwn_pci_softc *sc, uint8_t *buf, int len)
over = (rpt->rptb6 & R92C_RPTB6_RETRY_OVER);
if (packets > 0) {
- if (tx_ok)
- sc->amn.amn_txcnt += packets;
- if (tries > 1 || drop || expire || over)
+ sc->amn.amn_txcnt += packets;
+ if (!tx_ok || tries > 1 || drop || expire || over)
sc->amn.amn_retrycnt++;
}
}