git: 2a1beace07f1 - main - net80211: convert ieee80211_mesh.c to not require if_private.h
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 04 Jun 2025 03:44:17 UTC
The branch main has been updated by adrian:
URL: https://cgit.FreeBSD.org/src/commit/?id=2a1beace07f150ee4839a6bcf949479986e61861
commit 2a1beace07f150ee4839a6bcf949479986e61861
Author: Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2025-06-02 02:20:02 +0000
Commit: Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2025-06-04 03:35:00 +0000
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
---
sys/net80211/ieee80211_mesh.c | 7 +++----
1 file 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));