FreeBSD/sys/dev/ixl/ixl_pf_main.c
/*
** This routine updates vlan filters, called by init
** it scans the filter table and then updates the hw
** after a soft reset.
*/
This routine updates vlan filters, called by init
it scans the filter table and then updates the hw
after a soft reset.
This routine updates vlan filters called by init it scans the filter table and then updates the hw after a soft reset .
void
ixl_setup_vlan_filters(struct ixl_vsi *vsi)
{
	struct ixl_mac_filter	*f;
	int			cnt = 0, flags;
	if (vsi->num_vlans == 0)
		return;
	SLIST_FOREACH(f, &vsi->ftl, next) {
		if (f->flags & IXL_FILTER_VLAN) {
			f->flags |=
			    (IXL_FILTER_ADD |
			    IXL_FILTER_USED);
			cnt++;
		}
	}
	if (cnt == 0) {
		printf("setup vlan: no filters found!\n");
		return;
	}
	flags = IXL_FILTER_VLAN;
	flags |= (IXL_FILTER_ADD | IXL_FILTER_USED);
	ixl_add_hw_filters(vsi, flags, cnt);
	return;
}
void ixl_setup_vlan_filters ( struct ixl_vsi * vsi ) { struct ixl_mac_filter * f ; int cnt = 0 , flags ; if ( vsi -> num_vlans == 0 ) return ; SLIST_FOREACH ( f , & vsi -> ftl , next ) { if ( f -> flags & IXL_FILTER_VLAN ) { f -> flags |= ( IXL_FILTER_ADD | IXL_FILTER_USED ) ; cnt ++ ; } } if ( cnt == 0 ) { printf ( " \n " ) ; return ; } flags = IXL_FILTER_VLAN ; flags |= ( IXL_FILTER_ADD | IXL_FILTER_USED ) ; ixl_add_hw_filters ( vsi , flags , cnt ) ; return ; }
This routine updates vlan filters, called by init
it scans the filter table and then updates the hw
after a soft reset.
This routine updates vlan filters called by init it scans the filter table and then updates the hw after a soft reset .
/*
	** Scan the filter list for vlan entries,
	** mark them for addition and then call
	** for the AQ update.
	*/