diff options
author | Adrian Chadd <adrian@FreeBSD.org> | 2025-06-02 02:20:02 +0000 |
---|---|---|
committer | Adrian Chadd <adrian@FreeBSD.org> | 2025-06-04 03:35:00 +0000 |
commit | 2a1beace07f150ee4839a6bcf949479986e61861 (patch) | |
tree | 4804b9054661b314517f09aa53a21aaee52e5df9 | |
parent | 674362e27015394e105125598cb1518506ae1efa (diff) |
net80211: convert ieee80211_mesh.c to not require if_private.h
Convert the couple of uses of ifnet structure bits into ifnet
calls and remove the header.
Differential Revision: https://reviews.freebsd.org/D50645
Reviewed by: bz
-rw-r--r-- | sys/net80211/ieee80211_mesh.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/net80211/ieee80211_mesh.c b/sys/net80211/ieee80211_mesh.c index 4a9cd5e66a97..3f0410a69e3c 100644 --- a/sys/net80211/ieee80211_mesh.c +++ b/sys/net80211/ieee80211_mesh.c @@ -54,7 +54,6 @@ #include <net/if_var.h> #include <net/if_media.h> #include <net/if_llc.h> -#include <net/if_private.h> #include <net/ethernet.h> #include <net80211/ieee80211_var.h> @@ -3302,11 +3301,11 @@ mesh_airtime_calc(struct ieee80211_node *ni) /* Time to transmit a frame */ rate = ieee80211_node_get_txrate_dot11rate(ni); overhead = ieee80211_compute_duration(ic->ic_rt, - ifp->if_mtu + IEEE80211_MESH_MAXOVERHEAD, rate, 0) << M_BITS; + if_getmtu(ifp) + IEEE80211_MESH_MAXOVERHEAD, rate, 0) << M_BITS; /* Error rate in percentage */ /* XXX assuming small failures are ok */ - errrate = (((ifp->if_get_counter(ifp, IFCOUNTER_OERRORS) + - ifp->if_get_counter(ifp, IFCOUNTER_IERRORS)) / 100) << M_BITS) + errrate = (((if_getcounter(ifp, IFCOUNTER_OERRORS) + + if_getcounter(ifp, IFCOUNTER_IERRORS)) / 100) << M_BITS) / 100; res = (overhead + (nbits / rate)) * ((1 << S_FACTOR) / ((1 << M_BITS) - errrate)); |