Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci Adopt <net/if_stats.h>.
details: https://anonhg.NetBSD.org/src/rev/382141c31bad
branches: trunk
changeset: 968856:382141c31bad
user: thorpej <thorpej%NetBSD.org@localhost>
date: Thu Jan 30 06:03:34 2020 +0000
description:
Adopt <net/if_stats.h>.
diffstat:
sys/dev/pci/if_ipw.c | 16 ++++++++--------
sys/dev/pci/if_iwi.c | 26 +++++++++++++-------------
sys/dev/pci/if_iwm.c | 20 ++++++++++----------
sys/dev/pci/if_iwn.c | 28 ++++++++++++++--------------
sys/dev/pci/if_rtwn.c | 28 ++++++++++++++--------------
sys/dev/pci/if_sk.c | 12 ++++++------
sys/dev/pci/if_txp.c | 25 ++++++++++++++-----------
sys/dev/pci/if_wpi.c | 34 +++++++++++++++++-----------------
sys/dev/pci/if_xge.c | 8 ++++----
9 files changed, 100 insertions(+), 97 deletions(-)
diffs (truncated from 799 to 300 lines):
diff -r 4dd02f7b69c3 -r 382141c31bad sys/dev/pci/if_ipw.c
--- a/sys/dev/pci/if_ipw.c Thu Jan 30 04:56:11 2020 +0000
+++ b/sys/dev/pci/if_ipw.c Thu Jan 30 06:03:34 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ipw.c,v 1.72 2019/02/03 03:19:27 mrg Exp $ */
+/* $NetBSD: if_ipw.c,v 1.73 2020/01/30 06:03:34 thorpej Exp $ */
/* FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.15 2005/11/13 17:17:40 damien Exp */
/*-
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.72 2019/02/03 03:19:27 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.73 2020/01/30 06:03:34 thorpej Exp $");
/*-
* Intel(R) PRO/Wireless 2100 MiniPCI driver
@@ -1035,7 +1035,7 @@
MGETHDR(mnew, M_DONTWAIT, MT_DATA);
if (mnew == NULL) {
aprint_error_dev(sc->sc_dev, "could not allocate rx mbuf\n");
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
return;
}
@@ -1043,7 +1043,7 @@
if (!(mnew->m_flags & M_EXT)) {
aprint_error_dev(sc->sc_dev, "could not allocate rx mbuf cluster\n");
m_freem(mnew);
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
return;
}
@@ -1067,7 +1067,7 @@
panic("%s: unable to remap rx buf",
device_xname(sc->sc_dev));
}
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
return;
}
@@ -1237,7 +1237,7 @@
sbd = &sc->stbd_list[i];
if (sbd->type == IPW_SBD_TYPE_DATA)
- ifp->if_opackets++;
+ if_statinc(ifp, if_opackets);
ipw_release_sbd(sc, sbd);
sc->txfree++;
@@ -1559,7 +1559,7 @@
if (ipw_tx_start(ifp, m0, ni) != 0) {
ieee80211_free_node(ni);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
break;
}
@@ -1579,7 +1579,7 @@
if (sc->sc_tx_timer > 0) {
if (--sc->sc_tx_timer == 0) {
aprint_error_dev(sc->sc_dev, "device timeout\n");
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
ifp->if_flags &= ~IFF_UP;
ipw_stop(ifp, 1);
return;
diff -r 4dd02f7b69c3 -r 382141c31bad sys/dev/pci/if_iwi.c
--- a/sys/dev/pci/if_iwi.c Thu Jan 30 04:56:11 2020 +0000
+++ b/sys/dev/pci/if_iwi.c Thu Jan 30 06:03:34 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwi.c,v 1.112 2019/11/10 21:16:36 chs Exp $ */
+/* $NetBSD: if_iwi.c,v 1.113 2020/01/30 06:03:34 thorpej Exp $ */
/* $OpenBSD: if_iwi.c,v 1.111 2010/11/15 19:11:57 damien Exp $ */
/*-
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.112 2019/11/10 21:16:36 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwi.c,v 1.113 2020/01/30 06:03:34 thorpej Exp $");
/*-
* Intel(R) PRO/Wireless 2200BG/2225BG/2915ABG driver
@@ -1156,7 +1156,7 @@
if (le16toh(frame->len) < sizeof (struct ieee80211_frame) ||
le16toh(frame->len) > MCLBYTES) {
DPRINTF(("%s: bad frame length\n", device_xname(sc->sc_dev)));
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
return;
}
@@ -1171,7 +1171,7 @@
* end of the ring to the front instead of dropping.
*/
if ((m_new = iwi_alloc_rx_buf(sc)) == NULL) {
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
return;
}
@@ -1183,7 +1183,7 @@
aprint_error_dev(sc->sc_dev,
"could not load rx buf DMA map\n");
m_freem(m_new);
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
error = bus_dmamap_load_mbuf(sc->sc_dmat, data->map,
data->m, BUS_DMA_READ | BUS_DMA_NOWAIT);
if (error)
@@ -1455,7 +1455,7 @@
DPRINTFN(15, ("tx done idx=%u\n", txq->next));
- ifp->if_opackets++;
+ if_statinc(ifp, if_opackets);
txq->queued--;
txq->next = (txq->next + 1) % txq->count;
@@ -1629,7 +1629,7 @@
if (in->in_station == -1) { /* h/w table is full */
m_freem(m0);
ieee80211_free_node(ni);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
return 0;
}
iwi_write_ibssnode(sc, in);
@@ -1782,7 +1782,7 @@
if (m0->m_len < sizeof (struct ether_header) &&
(m0 = m_pullup(m0, sizeof (struct ether_header))) == NULL) {
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
continue;
}
@@ -1790,7 +1790,7 @@
ni = ieee80211_find_txnode(ic, eh->ether_dhost);
if (ni == NULL) {
m_freem(m0);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
continue;
}
@@ -1798,7 +1798,7 @@
if (ieee80211_classify(ic, m0, ni) != 0) {
m_freem(m0);
ieee80211_free_node(ni);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
continue;
}
@@ -1820,7 +1820,7 @@
m0 = ieee80211_encap(ic, m0, ni);
if (m0 == NULL) {
ieee80211_free_node(ni);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
continue;
}
@@ -1828,7 +1828,7 @@
if (iwi_tx_start(ifp, m0, ni, ac) != 0) {
ieee80211_free_node(ni);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
break;
}
@@ -1848,7 +1848,7 @@
if (sc->sc_tx_timer > 0) {
if (--sc->sc_tx_timer == 0) {
aprint_error_dev(sc->sc_dev, "device timeout\n");
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
ifp->if_flags &= ~IFF_UP;
iwi_stop(ifp, 1);
return;
diff -r 4dd02f7b69c3 -r 382141c31bad sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c Thu Jan 30 04:56:11 2020 +0000
+++ b/sys/dev/pci/if_iwm.c Thu Jan 30 06:03:34 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwm.c,v 1.83 2018/06/26 06:48:01 msaitoh Exp $ */
+/* $NetBSD: if_iwm.c,v 1.84 2020/01/30 06:03:34 thorpej Exp $ */
/* OpenBSD: if_iwm.c,v 1.148 2016/11/19 21:07:08 stsp Exp */
#define IEEE80211_NO_HT
/*
@@ -106,7 +106,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.83 2018/06/26 06:48:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwm.c,v 1.84 2020/01/30 06:03:34 thorpej Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -4031,9 +4031,9 @@
if (status != IWM_TX_STATUS_SUCCESS &&
status != IWM_TX_STATUS_DIRECT_DONE)
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
else
- ifp->if_opackets++;
+ if_statinc(ifp, if_opackets);
}
static void
@@ -6824,7 +6824,7 @@
if (m->m_len < sizeof (*eh) &&
(m = m_pullup(m, sizeof (*eh))) == NULL) {
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
continue;
}
@@ -6832,7 +6832,7 @@
ni = ieee80211_find_txnode(ic, eh->ether_dhost);
if (ni == NULL) {
m_freem(m);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
continue;
}
@@ -6840,7 +6840,7 @@
if (ieee80211_classify(ic, m, ni) != 0) {
m_freem(m);
ieee80211_free_node(ni);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
continue;
}
@@ -6852,7 +6852,7 @@
if ((m = ieee80211_encap(ic, m, ni)) == NULL) {
ieee80211_free_node(ni);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
continue;
}
@@ -6861,7 +6861,7 @@
if (iwm_tx(sc, m, ni, ac) != 0) {
ieee80211_free_node(ni);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
continue;
}
@@ -6910,7 +6910,7 @@
#endif
ifp->if_flags &= ~IFF_UP;
iwm_stop(ifp, 1);
- ifp->if_oerrors++;
+ if_statinc(ifp, if_oerrors);
return;
}
ifp->if_timer = 1;
diff -r 4dd02f7b69c3 -r 382141c31bad sys/dev/pci/if_iwn.c
--- a/sys/dev/pci/if_iwn.c Thu Jan 30 04:56:11 2020 +0000
+++ b/sys/dev/pci/if_iwn.c Thu Jan 30 06:03:34 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_iwn.c,v 1.92 2019/10/10 22:34:42 bad Exp $ */
+/* $NetBSD: if_iwn.c,v 1.93 2020/01/30 06:03:34 thorpej Exp $ */
/* $OpenBSD: if_iwn.c,v 1.135 2014/09/10 07:22:09 dcoppa Exp $ */
/*-
@@ -22,7 +22,7 @@
* adapters.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.92 2019/10/10 22:34:42 bad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.93 2020/01/30 06:03:34 thorpej Exp $");
#define IWN_USE_RBUF /* Use local storage for RX */
#undef IWN_HWCRYPTO /* XXX does not even compile yet */
@@ -2075,21 +2075,21 @@
/* Discard frames with a bad FCS early. */
if ((flags & IWN_RX_NOERROR) != IWN_RX_NOERROR) {
DPRINTFN(2, ("RX flags error %x\n", flags));
- ifp->if_ierrors++;
+ if_statinc(ifp, if_ierrors);
return;
}
/* Discard frames that are too short. */
Home |
Main Index |
Thread Index |
Old Index