Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Feb 2023 17:53:55 GMT
From:      Justin Hibbits <jhibbits@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: a6c0f09aa35d - main - ath(4) IfAPI fixups
Message-ID:  <202302061753.316HrtQt074190@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhibbits:

URL: https://cgit.FreeBSD.org/src/commit/?id=a6c0f09aa35da3700fa600b2913d95759cc36fe1

commit a6c0f09aa35da3700fa600b2913d95759cc36fe1
Author:     Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2023-01-24 20:59:46 +0000
Commit:     Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2023-02-06 17:32:05 +0000

    ath(4) IfAPI fixups
    
    Use the if_getcounter() IfAPI instead of accessing the ifnet directly.
    
    Sponsored by:   Juniper Networks, Inc.
---
 sys/dev/ath/if_ath_ioctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/ath/if_ath_ioctl.c b/sys/dev/ath/if_ath_ioctl.c
index cec769d615d7..a6a0aa35171c 100644
--- a/sys/dev/ath/if_ath_ioctl.c
+++ b/sys/dev/ath/if_ath_ioctl.c
@@ -250,9 +250,9 @@ ath_ioctl(struct ieee80211com *ic, u_long cmd, void *data)
 		sc->sc_stats.ast_rx_packets = 0;
 		TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
 			ifp = vap->iv_ifp;
-			sc->sc_stats.ast_tx_packets += ifp->if_get_counter(ifp,
+			sc->sc_stats.ast_tx_packets += if_getcounter(ifp,
 			    IFCOUNTER_OPACKETS);
-			sc->sc_stats.ast_rx_packets += ifp->if_get_counter(ifp,
+			sc->sc_stats.ast_rx_packets += if_getcounter(ifp,
 			    IFCOUNTER_IPACKETS);
 		}
 		sc->sc_stats.ast_tx_rssi = ATH_RSSI(sc->sc_halstats.ns_avgtxrssi);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302061753.316HrtQt074190>