Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net net: obsolete ifnet::if_link_state_chenged



details:   https://anonhg.NetBSD.org/src/rev/f53bff92275c
branches:  trunk
changeset: 1023872:f53bff92275c
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Thu Sep 30 03:51:05 2021 +0000

description:
net: obsolete ifnet::if_link_state_chenged
that was used for updating link-state of vlan I/F

The obsoleted function is replaced with
ifnet::if_linkstate_hooks

diffstat:

 sys/net/if.c           |   9 ++-------
 sys/net/if.h           |   3 +--
 sys/net/if_ethersubr.c |  11 ++---------
 3 files changed, 5 insertions(+), 18 deletions(-)

diffs (93 lines):

diff -r 5ba75b5b463e -r f53bff92275c sys/net/if.c
--- a/sys/net/if.c      Thu Sep 30 03:47:27 2021 +0000
+++ b/sys/net/if.c      Thu Sep 30 03:51:05 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.c,v 1.495 2021/09/30 03:43:25 yamaguchi Exp $       */
+/*     $NetBSD: if.c,v 1.496 2021/09/30 03:51:05 yamaguchi Exp $       */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.495 2021/09/30 03:43:25 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.496 2021/09/30 03:51:05 yamaguchi Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -1199,8 +1199,6 @@
        ifp->if_slowtimo = if_nullslowtimo;
        ifp->if_drain    = if_nulldrain;
 
-       ifp->if_link_state_changed = NULL;
-
        /* No more packets may be enqueued. */
        ifp->if_snd.ifq_maxlen = 0;
 
@@ -2397,9 +2395,6 @@
        /* Notify that the link state has changed. */
        rt_ifmsg(ifp);
 
-       if (ifp->if_link_state_changed != NULL)
-               ifp->if_link_state_changed(ifp, link_state);
-
        simplehook_dohooks(ifp->if_linkstate_hooks);
 
        DOMAIN_FOREACH(dp) {
diff -r 5ba75b5b463e -r f53bff92275c sys/net/if.h
--- a/sys/net/if.h      Thu Sep 30 03:47:27 2021 +0000
+++ b/sys/net/if.h      Thu Sep 30 03:51:05 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if.h,v 1.294 2021/09/30 03:23:48 yamaguchi Exp $       */
+/*     $NetBSD: if.h,v 1.295 2021/09/30 03:51:05 yamaguchi Exp $       */
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -420,7 +420,6 @@
        uint16_t        if_link_queue;  /* q: masked link state change queue */
                                        /* q: is link state work scheduled? */
        bool            if_link_scheduled;
-       void            (*if_link_state_changed)(struct ifnet *, int);
        struct pslist_entry
                        if_pslist_entry;/* i: */
        struct psref_target
diff -r 5ba75b5b463e -r f53bff92275c sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c    Thu Sep 30 03:47:27 2021 +0000
+++ b/sys/net/if_ethersubr.c    Thu Sep 30 03:51:05 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ethersubr.c,v 1.295 2021/09/30 03:47:27 yamaguchi Exp $     */
+/*     $NetBSD: if_ethersubr.c,v 1.296 2021/09/30 03:51:05 yamaguchi 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.295 2021/09/30 03:47:27 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.296 2021/09/30 03:51:05 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1005,12 +1005,6 @@
        return buf;
 }
 
-static void
-ether_link_state_changed(struct ifnet *ifp, int link_state)
-{
-
-}
-
 /*
  * Perform common duties while attaching to interface list
  */
@@ -1025,7 +1019,6 @@
        ifp->if_mtu = ETHERMTU;
        ifp->if_output = ether_output;
        ifp->_if_input = ether_input;
-       ifp->if_link_state_changed = ether_link_state_changed;
        if (ifp->if_baudrate == 0)
                ifp->if_baudrate = IF_Mbps(10);         /* just a default */
 



Home | Main Index | Thread Index | Old Index