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
This commit is contained in:
parent
1202a27903
commit
b9fe3c4690
|
@ -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 @@ if_deactivate(struct ifnet *ifp)
|
|||
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 @@ if_link_state_change_process(struct ifnet *ifp, int link_state)
|
|||
/* 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) {
|
||||
|
|
|
@ -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 @@ typedef struct ifnet {
|
|||
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
|
||||
|
|
|
@ -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 @@ ether_snprintf(char *buf, size_t len, const u_char *ap)
|
|||
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 @@ ether_ifattach(struct ifnet *ifp, const uint8_t *lla)
|
|||
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 */
|
||||
|
||||
|
|
Loading…
Reference in New Issue