s = splimp();
s = splnet();
int ste_ioctl(ifp, command, data)	struct ifnet		*ifp;	u_long			command;	caddr_t			data;{	struct ste_softc	*sc = ifp->if_softc;	struct ifreq		*ifr = (struct ifreq *) data;	struct ifaddr		*ifa = (struct ifaddr *)data;	struct mii_data		*mii;	int			s, error = 0;	s = splimp();	if ((error = ether_ioctl(ifp, &sc->arpcom, command, data)) > 0) {		splx(s);		return error;	}	switch(command) {	case SIOCSIFADDR:		ifp->if_flags |= IFF_UP;		switch (ifa->ifa_addr->sa_family) {		case AF_INET:			ste_init(sc);			arp_ifinit(&sc->arpcom, ifa);			break;		default:			ste_init(sc);			break;		}		break;	case SIOCSIFFLAGS:		if (ifp->if_flags & IFF_UP) {			if (ifp->if_flags & IFF_RUNNING &&			    ifp->if_flags & IFF_PROMISC &&			    !(sc->ste_if_flags & IFF_PROMISC)) {				STE_SETBIT1(sc, STE_RX_MODE,				    STE_RXMODE_PROMISC);			} else if (ifp->if_flags & IFF_RUNNING &&			    !(ifp->if_flags & IFF_PROMISC) &&			    sc->ste_if_flags & IFF_PROMISC) {				STE_CLRBIT1(sc, STE_RX_MODE,				    STE_RXMODE_PROMISC);			}			if (ifp->if_flags & IFF_RUNNING &&			    (ifp->if_flags ^ sc->ste_if_flags) & IFF_ALLMULTI)				ste_setmulti(sc);			if (!(ifp->if_flags & IFF_RUNNING)) {				sc->ste_tx_thresh = STE_TXSTART_THRESH;				ste_init(sc);			}		} else {			if (ifp->if_flags & IFF_RUNNING)				ste_stop(sc);		}		sc->ste_if_flags = ifp->if_flags;		error = 0;		break;	case SIOCADDMULTI:	case SIOCDELMULTI:		error = (command == SIOCADDMULTI) ?		    ether_addmulti(ifr, &sc->arpcom) :		    ether_delmulti(ifr, &sc->arpcom);		if (error == ENETRESET) {			/*			 * Multicast list has changed; set the hardware			 * filter accordingly.			 */			if (ifp->if_flags & IFF_RUNNING)				ste_setmulti(sc);			error = 0;		}		break;	case SIOCGIFMEDIA:	case SIOCSIFMEDIA:		mii = &sc->sc_mii;		error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);		break;	default:		error = EINVAL;		break;	}	splx(s);	return(error);}