Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/pci/if_iwn.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/pci/if_iwn.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.92 retrieving revision 1.92.2.1 diff -u -p -r1.92 -r1.92.2.1 --- src/sys/dev/pci/if_iwn.c 2019/10/10 22:34:42 1.92 +++ src/sys/dev/pci/if_iwn.c 2020/02/29 20:19:10 1.92.2.1 @@ -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.92.2.1 2020/02/29 20:19:10 ad Exp $ */ /* $OpenBSD: if_iwn.c,v 1.135 2014/09/10 07:22:09 dcoppa Exp $ */ /*- @@ -22,7 +22,7 @@ * adapters. */ #include -__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.92.2.1 2020/02/29 20:19:10 ad Exp $"); #define IWN_USE_RBUF /* Use local storage for RX */ #undef IWN_HWCRYPTO /* XXX does not even compile yet */ @@ -2075,21 +2075,21 @@ iwn_rx_done(struct iwn_softc *sc, struct /* 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. */ if (len < sizeof (*wh)) { DPRINTF(("frame too short: %d\n", len)); ic->ic_stats.is_rx_tooshort++; - ifp->if_ierrors++; + if_statinc(ifp, if_ierrors); return; } m1 = MCLGETIalt(sc, M_DONTWAIT, NULL, IWN_RBUF_SIZE); if (m1 == NULL) { ic->ic_stats.is_rx_nobuf++; - ifp->if_ierrors++; + if_statinc(ifp, if_ierrors); return; } bus_dmamap_unload(sc->sc_dmat, data->map); @@ -2113,7 +2113,7 @@ iwn_rx_done(struct iwn_softc *sc, struct bus_dmamap_sync(sc->sc_dmat, ring->desc_dma.map, ring->cur * sizeof (uint32_t), sizeof (uint32_t), BUS_DMASYNC_PREWRITE); - ifp->if_ierrors++; + if_statinc(ifp, if_ierrors); return; } @@ -2400,9 +2400,9 @@ iwn_tx_done(struct iwn_softc *sc, struct wn->amn.amn_retrycnt++; if (status != 1 && status != 2) - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); else - ifp->if_opackets++; + if_statinc(ifp, if_opackets); /* Unmap and free mbuf. */ bus_dmamap_sync(sc->sc_dmat, data->map, 0, data->map->dm_mapsize, @@ -3212,21 +3212,21 @@ iwn_start(struct ifnet *ifp) break; if (m->m_len < sizeof (*eh) && (m = m_pullup(m, sizeof (*eh))) == NULL) { - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); continue; } eh = mtod(m, struct ether_header *); ni = ieee80211_find_txnode(ic, eh->ether_dhost); if (ni == NULL) { m_freem(m); - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); continue; } /* classify mbuf so we can find which tx ring to use */ if (ieee80211_classify(ic, m, ni) != 0) { m_freem(m); ieee80211_free_node(ni); - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); continue; } @@ -3239,7 +3239,7 @@ iwn_start(struct ifnet *ifp) if ((m = ieee80211_encap(ic, m, ni)) == NULL) { ieee80211_free_node(ni); - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); continue; } sendit: @@ -3250,7 +3250,7 @@ sendit: if (iwn_tx(sc, m, ni, ac) != 0) { ieee80211_free_node(ni); - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); continue; } @@ -3275,7 +3275,7 @@ iwn_watchdog(struct ifnet *ifp) "device timeout\n"); ifp->if_flags &= ~IFF_UP; iwn_stop(ifp, 1); - ifp->if_oerrors++; + if_statinc(ifp, if_oerrors); return; } ifp->if_timer = 1;