if (ifp->if_flags & IFF_RUNNING) bce_set_filter(ifp);
error = (cmd == SIOCADDMULTI) ? ether_addmulti(ifr, &sc->bce_ac) : ether_delmulti(ifr, &sc->bce_ac);  if (error == ENETRESET) {  if (ifp->if_flags & IFF_RUNNING) bce_set_filter(ifp); error = 0; }
bce_ioctl(ifp, cmd, data)	struct ifnet   *ifp;	u_long          cmd;	caddr_t         data;{	struct bce_softc *sc = ifp->if_softc;	struct ifreq   *ifr = (struct ifreq *) data;	struct ifaddr *ifa = (struct ifaddr *)data;	int             s, error = 0;	s = splnet();	if ((error = ether_ioctl(ifp, &sc->bce_ac, cmd, data)) > 0) {		splx(s);		return (error);	}	switch (cmd) {	case SIOCSIFADDR:		ifp->if_flags |= IFF_UP;		switch (ifa->ifa_addr->sa_family) {#ifdef INET		case AF_INET:			bce_init(ifp);			arp_ifinit(&sc->bce_ac, ifa);			break;#endif /* INET */		default:			bce_init(ifp);			break;		}		break;	case SIOCSIFMTU:		ifp->if_mtu = ifr->ifr_mtu;		break;	case SIOCSIFFLAGS:		if(ifp->if_flags & IFF_UP)			if(ifp->if_flags & IFF_RUNNING)				bce_set_filter(ifp);			else				bce_init(ifp);		else if(ifp->if_flags & IFF_RUNNING)			bce_stop(ifp, 0);		break;	case SIOCADDMULTI:	case SIOCDELMULTI:		if (ifp->if_flags & IFF_RUNNING)			bce_set_filter(ifp);		break;	case SIOCSIFMEDIA:	case SIOCGIFMEDIA:		error = ifmedia_ioctl(ifp, ifr, &sc->bce_mii.mii_media, cmd);		break;	default:		error = EINVAL;		break;	}	if (error == 0) {		/* Try to get more packets going. */		bce_start(ifp);	}	splx(s);	return error;}