aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAcesp25 <acesp25@freebsd.org>2026-06-21 01:34:50 +0000
committerKristof Provost <kp@FreeBSD.org>2026-07-07 13:17:02 +0000
commit3e3752ce73b75b8d1089eb09c8b63d4bdde46219 (patch)
tree26d4b865a04e3dd1cd8f2fc4e90624fdfdf23980
parent07f780cb7f8eab1aa6e84d3ed6785144d0d3cc47 (diff)
if_bridge: Remove unused disable parameter in bridge_stop
The ```int disable``` parameter is included in the bridge_stop function signature but is not used in the function body. I had noticed this when tracing the driver's path while learning more about the ifnet library. This parameter originally appeared when importing the driver from NetBSD. However, the FreeBSD ifnet library no longer requires an if_stop function. Meaning that the function signature can be changed to only contain needed parameters for our bridge driver. Discussed with: freebsd-net@ mailing list Signed-off-by: Acesp25 <acesp25@freebsd.org> Reviewed by: kp Pull-Request: https://github.com/freebsd/freebsd-src/pull/2290
-rw-r--r--sys/net/if_bridge.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index de991b8464c0..792b2c952e7a 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -327,7 +327,7 @@ static void bridge_init(void *);
static void bridge_dummynet(struct mbuf *, struct ifnet *);
static bool bridge_same(const void *, const void *);
static void *bridge_get_softc(struct ifnet *);
-static void bridge_stop(struct ifnet *, int);
+static void bridge_stop(struct ifnet *);
static int bridge_transmit(struct ifnet *, struct mbuf *);
#ifdef ALTQ
static void bridge_altq_start(if_t);
@@ -937,7 +937,7 @@ bridge_clone_destroy(struct if_clone *ifc, struct ifnet *ifp, uint32_t flags)
BRIDGE_LOCK(sc);
- bridge_stop(ifp, 1);
+ bridge_stop(ifp);
ifp->if_flags &= ~IFF_UP;
while ((bif = CK_LIST_FIRST(&sc->sc_iflist)) != NULL)
@@ -1068,9 +1068,9 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
/*
* If interface is marked down and it is running,
- * then stop and disable it.
+ * then stop it.
*/
- bridge_stop(ifp, 1);
+ bridge_stop(ifp);
} else if ((ifp->if_flags & IFF_UP) &&
!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
/*
@@ -2346,7 +2346,7 @@ bridge_init(void *xsc)
* Stop the bridge interface.
*/
static void
-bridge_stop(struct ifnet *ifp, int disable)
+bridge_stop(struct ifnet *ifp)
{
struct bridge_softc *sc = ifp->if_softc;