From owner-svn-src-head@FreeBSD.ORG Thu Sep 18 20:18:56 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02BF58A1; Thu, 18 Sep 2014 20:18:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7A2EDDA; Thu, 18 Sep 2014 20:18:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8IKItHa039054; Thu, 18 Sep 2014 20:18:55 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8IKIt4Y039053; Thu, 18 Sep 2014 20:18:55 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201409182018.s8IKIt4Y039053@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 18 Sep 2014 20:18:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271810 - head/sys/dev/mwl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Sep 2014 20:18:56 -0000 Author: glebius Date: Thu Sep 18 20:18:55 2014 New Revision: 271810 URL: http://svnweb.freebsd.org/changeset/base/271810 Log: Mechanically convert to if_inc_counter(). Modified: head/sys/dev/mwl/if_mwl.c Modified: head/sys/dev/mwl/if_mwl.c ============================================================================== --- head/sys/dev/mwl/if_mwl.c Thu Sep 18 20:17:42 2014 (r271809) +++ head/sys/dev/mwl/if_mwl.c Thu Sep 18 20:18:55 2014 (r271810) @@ -1434,7 +1434,7 @@ mwl_start(struct ifnet *ifp) * Pass the frame to the h/w for transmission. */ if (mwl_tx_start(sc, ni, bf, m)) { - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); mwl_puttxbuf_head(txq, bf); ieee80211_free_node(ni); continue; @@ -1504,7 +1504,7 @@ mwl_raw_xmit(struct ieee80211_node *ni, * Pass the frame to the h/w for transmission. */ if (mwl_tx_start(sc, ni, bf, m)) { - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); mwl_puttxbuf_head(txq, bf); ieee80211_free_node(ni); @@ -2741,7 +2741,7 @@ mwl_rx_proc(void *arg, int npending) #endif status = ds->Status; if (status & EAGLE_RXD_STATUS_DECRYPT_ERR_MASK) { - ifp->if_ierrors++; + if_inc_counter(ifp, IFCOUNTER_IERRORS, 1); sc->sc_stats.mst_rx_crypto++; /* * NB: Check EAGLE_RXD_STATUS_GENERAL_DECRYPT_ERR @@ -2887,7 +2887,7 @@ mwl_rx_proc(void *arg, int npending) ieee80211_dump_pkt(ic, mtod(m, caddr_t), len, ds->Rate, rssi); } - ifp->if_ipackets++; + if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1); /* dispatch */ ni = ieee80211_find_rxnode(ic, @@ -3405,7 +3405,7 @@ mwl_tx_start(struct mwl_softc *sc, struc STAILQ_INSERT_TAIL(&txq->active, bf, bf_list); MWL_TXDESC_SYNC(txq, ds, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); - ifp->if_opackets++; + if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); sc->sc_tx_timer = 5; MWL_TXQ_UNLOCK(txq); @@ -4785,7 +4785,7 @@ mwl_watchdog(void *arg) mwl_reset(ifp); mwl_txq_dump(&sc->sc_txq[0]);/*XXX*/ #endif - ifp->if_oerrors++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); sc->sc_stats.mst_watchdog++; } } @@ -4928,8 +4928,10 @@ mwl_ioctl(struct ifnet *ifp, u_long cmd, case SIOCGMVSTATS: mwl_hal_gethwstats(sc->sc_mh, &sc->sc_stats.hw_stats); /* NB: embed these numbers to get a consistent view */ - sc->sc_stats.mst_tx_packets = ifp->if_opackets; - sc->sc_stats.mst_rx_packets = ifp->if_ipackets; + sc->sc_stats.mst_tx_packets = + ifp->if_get_counter(ifp, IFCOUNTER_OPACKETS); + sc->sc_stats.mst_rx_packets = + ifp->if_get_counter(ifp, IFCOUNTER_IPACKETS); /* * NB: Drop the softc lock in case of a page fault; * we'll accept any potential inconsisentcy in the