diff options
author | Steven Hartland <smh@FreeBSD.org> | 2015-12-17 14:41:30 +0000 |
---|---|---|
committer | Steven Hartland <smh@FreeBSD.org> | 2015-12-17 14:41:30 +0000 |
commit | d6e82913c12d0302bf64b432cc286d3d446a2ddf (patch) | |
tree | d5286aaab1a7faa0613aa42f51b270bccb17fab2 /sys/net/if.c | |
parent | 2a952cf258d6f13f6f6b4005e9635ae09896bf3b (diff) | |
download | src-d6e82913c12d0302bf64b432cc286d3d446a2ddf.tar.gz src-d6e82913c12d0302bf64b432cc286d3d446a2ddf.zip |
Notes
Diffstat (limited to 'sys/net/if.c')
-rw-r--r-- | sys/net/if.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 177f3568d5de..b88c05e765a2 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -126,7 +126,7 @@ SX_SYSINIT(ifdescr_sx, &ifdescr_sx, "ifnet descr"); void (*bridge_linkstate_p)(struct ifnet *ifp); void (*ng_ether_link_state_p)(struct ifnet *ifp, int state); -void (*lagg_linkstate_p)(struct ifnet *ifp); +void (*lagg_linkstate_p)(struct ifnet *ifp, int state); /* These are external hooks for CARP. */ void (*carp_linkstate_p)(struct ifnet *ifp); void (*carp_demote_adj_p)(int, char *); @@ -1984,8 +1984,6 @@ if_unroute(struct ifnet *ifp, int flag, int fam) if (ifp->if_carp) (*carp_linkstate_p)(ifp); - if (ifp->if_lagg) - (*lagg_linkstate_p)(ifp); rt_ifmsg(ifp); } @@ -2007,8 +2005,6 @@ if_route(struct ifnet *ifp, int flag, int fam) pfctlinput(PRC_IFUP, ifa->ifa_addr); if (ifp->if_carp) (*carp_linkstate_p)(ifp); - if (ifp->if_lagg) - (*lagg_linkstate_p)(ifp); rt_ifmsg(ifp); #ifdef INET6 in6_if_up(ifp); @@ -2023,27 +2019,17 @@ int (*vlan_tag_p)(struct ifnet *, uint16_t *); int (*vlan_setcookie_p)(struct ifnet *, void *); void *(*vlan_cookie_p)(struct ifnet *); -void -if_link_state_change(struct ifnet *ifp, int link_state) -{ - - return if_link_state_change_cond(ifp, link_state, 0); -} - /* * Handle a change in the interface link state. To avoid LORs * between driver lock and upper layer locks, as well as possible * recursions, we post event to taskqueue, and all job * is done in static do_link_state_change(). - * - * If the current link state matches link_state and force isn't - * specified no action is taken. */ void -if_link_state_change_cond(struct ifnet *ifp, int link_state, int force) +if_link_state_change(struct ifnet *ifp, int link_state) { - - if (ifp->if_link_state == link_state && !force) + /* Return if state hasn't changed. */ + if (ifp->if_link_state == link_state) return; ifp->if_link_state = link_state; @@ -2071,7 +2057,7 @@ do_link_state_change(void *arg, int pending) if (ifp->if_bridge) (*bridge_linkstate_p)(ifp); if (ifp->if_lagg) - (*lagg_linkstate_p)(ifp); + (*lagg_linkstate_p)(ifp, link_state); if (IS_DEFAULT_VNET(curvnet)) devctl_notify("IFNET", ifp->if_xname, |