FreeBSD/sys/dev/e1000/if_em.c
/*
 * This routine is run via an vlan
 * config EVENT
 */
This routine is run via an vlan
config EVENT
This routine is run via an vlan config EVENT
static void
em_register_vlan(void *arg, if_t ifp, u16 vtag)
{
	struct adapter	*adapter = if_getsoftc(ifp);
	u32		index, bit;
	if ((void*)adapter !=  arg)   
		return;
	if ((vtag == 0) || (vtag > 4095))       
                return;
	EM_CORE_LOCK(adapter);
	index = (vtag >> 5) & 0x7F;
	bit = vtag & 0x1F;
	adapter->shadow_vfta[index] |= (1 << bit);
	++adapter->num_vlans;
	if (if_getcapenable(ifp) & IFCAP_VLAN_HWFILTER)
		em_init_locked(adapter);
	EM_CORE_UNLOCK(adapter);
}
static void em_register_vlan ( void * arg , if_t ifp , u16 vtag ) { struct adapter * adapter = if_getsoftc ( ifp ) ; u32 index , bit ; if ( ( void * ) adapter != arg ) return ; if ( ( vtag == 0 ) || ( vtag > 4095 ) ) return ; EM_CORE_LOCK ( adapter ) ; index = ( vtag >> 5 ) & 0x7F ; bit = vtag & 0x1F ; adapter -> shadow_vfta [ index ] |= ( 1 << bit ) ; ++ adapter -> num_vlans ; if ( if_getcapenable ( ifp ) & IFCAP_VLAN_HWFILTER ) em_init_locked ( adapter ) ; EM_CORE_UNLOCK ( adapter ) ; }
This routine is run via an vlan
 config EVENT
This routine is run via an vlan config EVENT
/* Not our event */ /* Invalid ID */ /* Re-init to load the changes */