FreeBSD/sys/dev/stge/if_stge.c
/*
 * stge_set_filter:
 *
 *	Set up the receive filter.
 */
Set up the receive filter.
Set up the receive filter .
static void
stge_set_filter(struct stge_softc *sc)
{
	struct ifnet *ifp;
	uint16_t mode;
	STGE_LOCK_ASSERT(sc);
	ifp = sc->sc_ifp;
	mode = CSR_READ_2(sc, STGE_ReceiveMode);
	mode |= RM_ReceiveUnicast;
	if ((ifp->if_flags & IFF_BROADCAST) != 0)
		mode |= RM_ReceiveBroadcast;
	else
		mode &= ~RM_ReceiveBroadcast;
	if ((ifp->if_flags & IFF_PROMISC) != 0)
		mode |= RM_ReceiveAllFrames;
	else
		mode &= ~RM_ReceiveAllFrames;
	CSR_WRITE_2(sc, STGE_ReceiveMode, mode);
}
static void stge_set_filter ( struct stge_softc * sc ) { struct ifnet * ifp ; uint16_t mode ; STGE_LOCK_ASSERT ( sc ) ; ifp = sc -> sc_ifp ; mode = CSR_READ_2 ( sc , STGE_ReceiveMode ) ; mode |= RM_ReceiveUnicast ; if ( ( ifp -> if_flags & IFF_BROADCAST ) != 0 ) mode |= RM_ReceiveBroadcast ; else mode &= ~ RM_ReceiveBroadcast ; if ( ( ifp -> if_flags & IFF_PROMISC ) != 0 ) mode |= RM_ReceiveAllFrames ; else mode &= ~ RM_ReceiveAllFrames ; CSR_WRITE_2 ( sc , STGE_ReceiveMode , mode ) ; }
stge_set_filter:
      Set up the receive filter.
stge_set_filter : Set up the receive filter .