Module Name: src
Committed By: riastradh
Date: Fri Dec 31 14:24:38 UTC 2021
Modified Files:
src/sys/arch/arm/xscale: ixp425_if_npe.c
src/sys/net: if_bridge.c if_ethersubr.c if_wg.c
src/sys/net/lagg: if_lagg.c
Log Message:
sys: Use if_stop wrapper function.
Exception: Not in kern_pmf.c, for the kind of silly reason that it
avoids having kern_pmf.c refer to symbols defined only in net; this
avoids a pain in the rump.
To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/arm/xscale/ixp425_if_npe.c
cvs rdiff -u -r1.183 -r1.184 src/sys/net/if_bridge.c
cvs rdiff -u -r1.307 -r1.308 src/sys/net/if_ethersubr.c
cvs rdiff -u -r1.65 -r1.66 src/sys/net/if_wg.c
cvs rdiff -u -r1.26 -r1.27 src/sys/net/lagg/if_lagg.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/xscale/ixp425_if_npe.c
diff -u src/sys/arch/arm/xscale/ixp425_if_npe.c:1.48 src/sys/arch/arm/xscale/ixp425_if_npe.c:1.49
--- src/sys/arch/arm/xscale/ixp425_if_npe.c:1.48 Sun Sep 19 10:34:08 2021
+++ src/sys/arch/arm/xscale/ixp425_if_npe.c Fri Dec 31 14:24:38 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ixp425_if_npe.c,v 1.48 2021/09/19 10:34:08 andvar Exp $ */
+/* $NetBSD: ixp425_if_npe.c,v 1.49 2021/12/31 14:24:38 riastradh Exp $ */
/*-
* Copyright (c) 2006 Sam Leffler. All rights reserved.
@@ -28,7 +28,7 @@
#if 0
__FBSDID("$FreeBSD: src/sys/arm/xscale/ixp425/if_npe.c,v 1.1 2006/11/19 23:55:23 sam Exp $");
#endif
-__KERNEL_RCSID(0, "$NetBSD: ixp425_if_npe.c,v 1.48 2021/09/19 10:34:08 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixp425_if_npe.c,v 1.49 2021/12/31 14:24:38 riastradh Exp $");
/*
* Intel XScale NPE Ethernet driver.
@@ -1429,7 +1429,7 @@ npeioctl(struct ifnet *ifp, u_long cmd,
* If interface is marked down and it is running,
* then stop and disable it.
*/
- (*ifp->if_stop)(ifp, 1);
+ if_stop(ifp, 1);
} else if ((ifp->if_flags & (IFF_UP |IFF_RUNNING)) == IFF_UP) {
/*
* If interface is marked up and it is stopped, then
Index: src/sys/net/if_bridge.c
diff -u src/sys/net/if_bridge.c:1.183 src/sys/net/if_bridge.c:1.184
--- src/sys/net/if_bridge.c:1.183 Thu Sep 30 03:57:48 2021
+++ src/sys/net/if_bridge.c Fri Dec 31 14:24:38 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bridge.c,v 1.183 2021/09/30 03:57:48 yamaguchi Exp $ */
+/* $NetBSD: if_bridge.c,v 1.184 2021/12/31 14:24:38 riastradh Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.183 2021/09/30 03:57:48 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.184 2021/12/31 14:24:38 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -611,7 +611,7 @@ bridge_ioctl(struct ifnet *ifp, u_long c
* If interface is marked down and it is running,
* then stop and disable it.
*/
- (*ifp->if_stop)(ifp, 1);
+ if_stop(ifp, 1);
break;
case IFF_UP:
/*
Index: src/sys/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.307 src/sys/net/if_ethersubr.c:1.308
--- src/sys/net/if_ethersubr.c:1.307 Fri Dec 10 01:18:29 2021
+++ src/sys/net/if_ethersubr.c Fri Dec 31 14:24:38 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ethersubr.c,v 1.307 2021/12/10 01:18:29 msaitoh Exp $ */
+/* $NetBSD: if_ethersubr.c,v 1.308 2021/12/31 14:24:38 riastradh Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.307 2021/12/10 01:18:29 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.308 2021/12/31 14:24:38 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1461,7 +1461,7 @@ ether_ioctl_reinit(struct ethercom *ec)
* If interface is marked down and it is running,
* then stop and disable it.
*/
- (*ifp->if_stop)(ifp, 1);
+ if_stop(ifp, 1);
break;
case IFF_UP:
/*
Index: src/sys/net/if_wg.c
diff -u src/sys/net/if_wg.c:1.65 src/sys/net/if_wg.c:1.66
--- src/sys/net/if_wg.c:1.65 Tue Aug 17 17:31:13 2021
+++ src/sys/net/if_wg.c Fri Dec 31 14:24:38 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wg.c,v 1.65 2021/08/17 17:31:13 christos Exp $ */
+/* $NetBSD: if_wg.c,v 1.66 2021/12/31 14:24:38 riastradh Exp $ */
/*
* Copyright (C) Ryota Ozaki <[email protected]>
@@ -41,7 +41,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.65 2021/08/17 17:31:13 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.66 2021/12/31 14:24:38 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_altq_enabled.h"
@@ -4666,7 +4666,7 @@ wg_ioctl(struct ifnet *ifp, u_long cmd,
* If interface is marked down and it is running,
* then stop and disable it.
*/
- (*ifp->if_stop)(ifp, 1);
+ if_stop(ifp, 1);
break;
case IFF_UP:
/*
Index: src/sys/net/lagg/if_lagg.c
diff -u src/sys/net/lagg/if_lagg.c:1.26 src/sys/net/lagg/if_lagg.c:1.27
--- src/sys/net/lagg/if_lagg.c:1.26 Mon Nov 15 07:07:05 2021
+++ src/sys/net/lagg/if_lagg.c Fri Dec 31 14:24:38 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: if_lagg.c,v 1.26 2021/11/15 07:07:05 yamaguchi Exp $ */
+/* $NetBSD: if_lagg.c,v 1.27 2021/12/31 14:24:38 riastradh Exp $ */
/*
* Copyright (c) 2005, 2006 Reyk Floeter <[email protected]>
@@ -20,7 +20,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_lagg.c,v 1.26 2021/11/15 07:07:05 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_lagg.c,v 1.27 2021/12/31 14:24:38 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -721,7 +721,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd
switch (ifp->if_flags & (IFF_UP | IFF_RUNNING)) {
case IFF_RUNNING:
- ifp->if_stop(ifp, 1);
+ if_stop(ifp, 1);
break;
case IFF_UP:
case IFF_UP | IFF_RUNNING:
@@ -2354,7 +2354,7 @@ lagg_port_setup(struct lagg_softc *sc,
if (ISSET(ifp_port->if_flags, IFF_RUNNING) &&
ifp_port->if_init != NULL) {
- ifp_port->if_stop(ifp_port, 0);
+ if_stop(ifp_port, 0);
stopped = true;
}
@@ -2475,7 +2475,7 @@ lagg_port_teardown(struct lagg_softc *sc
IFNET_LOCK(ifp_port);
if (ISSET(ifp_port->if_flags, IFF_RUNNING) &&
ifp_port->if_init != NULL) {
- ifp_port->if_stop(ifp_port, 0);
+ if_stop(ifp_port, 0);
stopped = true;
}