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

Collapse All | Expand All

(-)b/sys/net/iflib.c (-5 / +17 lines)
Lines 4473-4481 iflib_vlan_register(void *arg, if_t ifp, uint16_t vtag) Link Here
4473
{
4473
{
4474
	if_ctx_t ctx = if_getsoftc(ifp);
4474
	if_ctx_t ctx = if_getsoftc(ifp);
4475
4475
4476
	if ((void *)ctx != arg)
4476
	device_printf(ctx->ifc_dev,"iflib_vlan_register: start\n");
4477
	
4478
	if ((void *)ifp != arg) {
4479
		device_printf(ctx->ifc_dev,"device mismatch: %p, %p\n",
4480
			      ifp, arg);
4477
		return;
4481
		return;
4478
4482
	}
4483
	
4479
	if ((vtag == 0) || (vtag > 4095))
4484
	if ((vtag == 0) || (vtag > 4095))
4480
		return;
4485
		return;
4481
4486
Lines 4498-4505 iflib_vlan_unregister(void *arg, if_t ifp, uint16_t vtag) Link Here
4498
{
4503
{
4499
	if_ctx_t ctx = if_getsoftc(ifp);
4504
	if_ctx_t ctx = if_getsoftc(ifp);
4500
4505
4501
	if ((void *)ctx != arg)
4506
	device_printf(ctx->ifc_dev,"iflib_vlan_unregister: start\n");
4507
4508
	if ((void *)ifp != arg) {
4509
		device_printf(ctx->ifc_dev,"device mismatch: %p, %p\n",
4510
			      ifp, arg);
4502
		return;
4511
		return;
4512
	}
4503
4513
4504
	if ((vtag == 0) || (vtag > 4095))
4514
	if ((vtag == 0) || (vtag > 4095))
4505
		return;
4515
		return;
Lines 5830-5841 iflib_register(if_ctx_t ctx) Link Here
5830
		iflags |= IFF_BROADCAST | IFF_SIMPLEX;
5840
		iflags |= IFF_BROADCAST | IFF_SIMPLEX;
5831
	if_setflags(ifp, iflags);
5841
	if_setflags(ifp, iflags);
5832
	ctx->ifc_vlan_attach_event =
5842
	ctx->ifc_vlan_attach_event =
5833
		EVENTHANDLER_REGISTER(vlan_config, iflib_vlan_register, ctx,
5843
		EVENTHANDLER_REGISTER(vlan_config, iflib_vlan_register, ifp,
5834
							  EVENTHANDLER_PRI_FIRST);
5844
							  EVENTHANDLER_PRI_FIRST);
5835
	ctx->ifc_vlan_detach_event =
5845
	ctx->ifc_vlan_detach_event =
5836
		EVENTHANDLER_REGISTER(vlan_unconfig, iflib_vlan_unregister, ctx,
5846
		EVENTHANDLER_REGISTER(vlan_unconfig, iflib_vlan_unregister, ifp,
5837
							  EVENTHANDLER_PRI_FIRST);
5847
							  EVENTHANDLER_PRI_FIRST);
5838
5848
5849
	device_printf(dev,"event hander:vlan_config:ifp:%p\n",ifp);
5850
	
5839
	if ((sctx->isc_flags & IFLIB_DRIVER_MEDIA) == 0) {
5851
	if ((sctx->isc_flags & IFLIB_DRIVER_MEDIA) == 0) {
5840
		ctx->ifc_mediap = &ctx->ifc_media;
5852
		ctx->ifc_mediap = &ctx->ifc_media;
5841
		ifmedia_init(ctx->ifc_mediap, IFM_IMASK,
5853
		ifmedia_init(ctx->ifc_mediap, IFM_IMASK,

Return to bug 230996