View | Details | Raw Unified | Return to bug 193953 | Differences between
and this patch

Collapse All | Expand All

(-)b/sys/net/ieee8023ad_lacp.c (+2 lines)
Lines 1049-1054 lacp_update_portmap(struct lacp_softc *lsc) Link Here
1049
		speed = lacp_aggregator_bandwidth(la);
1049
		speed = lacp_aggregator_bandwidth(la);
1050
	}
1050
	}
1051
	sc->sc_ifp->if_baudrate = speed;
1051
	sc->sc_ifp->if_baudrate = speed;
1052
	EVENTHANDLER_INVOKE(ifnet_event, sc->sc_ifp,
1053
	    IFNET_EVENT_UPDATE_BAUDRATE);
1052
1054
1053
	/* switch the active portmap over */
1055
	/* switch the active portmap over */
1054
	atomic_store_rel_int(&lsc->lsc_activemap, newmap);
1056
	atomic_store_rel_int(&lsc->lsc_activemap, newmap);
(-)b/sys/net/if_var.h (+1 lines)
Lines 410-415 EVENTHANDLER_DECLARE(ifnet_link_event, ifnet_link_event_handler_t); Link Here
410
/* Interface up/down event */
410
/* Interface up/down event */
411
#define IFNET_EVENT_UP		0
411
#define IFNET_EVENT_UP		0
412
#define IFNET_EVENT_DOWN	1
412
#define IFNET_EVENT_DOWN	1
413
#define	IFNET_EVENT_UPDATE_BAUDRATE	2
413
typedef void (*ifnet_event_fn)(void *, struct ifnet *ifp, int event);
414
typedef void (*ifnet_event_fn)(void *, struct ifnet *ifp, int event);
414
EVENTHANDLER_DECLARE(ifnet_event, ifnet_event_fn);
415
EVENTHANDLER_DECLARE(ifnet_event, ifnet_event_fn);
415
#endif /* _SYS_EVENTHANDLER_H_ */
416
#endif /* _SYS_EVENTHANDLER_H_ */
(-)b/sys/net/if_vlan.c (+33 lines)
Lines 221-226 static MALLOC_DEFINE(M_VLAN, vlanname, "802.1Q Virtual LAN Interface"); Link Here
221
221
222
static eventhandler_tag ifdetach_tag;
222
static eventhandler_tag ifdetach_tag;
223
static eventhandler_tag iflladdr_tag;
223
static eventhandler_tag iflladdr_tag;
224
static eventhandler_tag ifevent_tag;
224
225
225
/*
226
/*
226
 * if_vlan uses two module-level locks to allow concurrent modification of vlan
227
 * if_vlan uses two module-level locks to allow concurrent modification of vlan
Lines 347-352 static int vlan_clone_destroy(struct if_clone *, struct ifnet *); Link Here
347
348
348
static	void vlan_ifdetach(void *arg, struct ifnet *ifp);
349
static	void vlan_ifdetach(void *arg, struct ifnet *ifp);
349
static  void vlan_iflladdr(void *arg, struct ifnet *ifp);
350
static  void vlan_iflladdr(void *arg, struct ifnet *ifp);
351
static  void vlan_ifevent(void *arg, struct ifnet *ifp, int event);
350
352
351
static  void vlan_lladdr_fn(void *arg, int pending);
353
static  void vlan_lladdr_fn(void *arg, int pending);
352
354
Lines 651-656 vlan_setmulti(struct ifnet *ifp) Link Here
651
	return (0);
653
	return (0);
652
}
654
}
653
655
656
/*
657
 * A handler for interface ifnet events.
658
 */
659
static void
660
vlan_ifevent(void *arg __unused, struct ifnet *ifp, int event)
661
{
662
	VLAN_LOCK_READER;
663
	struct ifvlan *ifv;
664
	struct ifvlantrunk *trunk;
665
666
	if (event != IFNET_EVENT_UPDATE_BAUDRATE)
667
		return;
668
669
	VLAN_RLOCK();
670
	trunk = ifp->if_vlantrunk;
671
	if (trunk == NULL) {
672
		VLAN_RUNLOCK();
673
		return;
674
	}
675
676
	VLAN_FOREACH(ifv, trunk) {
677
		ifv->ifv_ifp->if_baudrate = ifp->if_baudrate;
678
	}
679
	VLAN_RUNLOCK();
680
}
681
654
/*
682
/*
655
 * A handler for parent interface link layer address changes.
683
 * A handler for parent interface link layer address changes.
656
 * If the parent interface link layer address is changed we
684
 * If the parent interface link layer address is changed we
Lines 871-876 vlan_modevent(module_t mod, int type, void *data) Link Here
871
		    vlan_iflladdr, NULL, EVENTHANDLER_PRI_ANY);
899
		    vlan_iflladdr, NULL, EVENTHANDLER_PRI_ANY);
872
		if (iflladdr_tag == NULL)
900
		if (iflladdr_tag == NULL)
873
			return (ENOMEM);
901
			return (ENOMEM);
902
		ifevent_tag = EVENTHANDLER_REGISTER(ifnet_event,
903
		    vlan_ifevent, NULL, EVENTHANDLER_PRI_ANY);
904
		if (ifevent_tag == NULL)
905
			return (ENOMEM);
874
		VLAN_LOCKING_INIT();
906
		VLAN_LOCKING_INIT();
875
		vlan_input_p = vlan_input;
907
		vlan_input_p = vlan_input;
876
		vlan_link_state_p = vlan_link_state;
908
		vlan_link_state_p = vlan_link_state;
Lines 900-905 vlan_modevent(module_t mod, int type, void *data) Link Here
900
#endif
932
#endif
901
		EVENTHANDLER_DEREGISTER(ifnet_departure_event, ifdetach_tag);
933
		EVENTHANDLER_DEREGISTER(ifnet_departure_event, ifdetach_tag);
902
		EVENTHANDLER_DEREGISTER(iflladdr_event, iflladdr_tag);
934
		EVENTHANDLER_DEREGISTER(iflladdr_event, iflladdr_tag);
935
		EVENTHANDLER_DEREGISTER(ifnet_event, ifevent_tag);
903
		vlan_input_p = NULL;
936
		vlan_input_p = NULL;
904
		vlan_link_state_p = NULL;
937
		vlan_link_state_p = NULL;
905
		vlan_trunk_cap_p = NULL;
938
		vlan_trunk_cap_p = NULL;

Return to bug 193953