}
rtw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data){	int rc = 0, s;	struct rtw_softc *sc = ifp->if_softc;	struct ieee80211com *ic = &sc->sc_ic;	struct ifreq *ifr = (struct ifreq *)data;	struct ifaddr *ifa = (struct ifaddr *)data;	s = splnet();	switch (cmd) {	case SIOCSIFMTU:		if (ifr->ifr_mtu > ETHERMTU || ifr->ifr_mtu < ETHERMIN) {			rc = EINVAL;		} else if (ifp->if_mtu != ifr->ifr_mtu) {			ifp->if_mtu = ifr->ifr_mtu;		}		break;	case SIOCSIFADDR:		ifp->if_flags |= IFF_UP;#ifdef INET		if (ifa->ifa_addr->sa_family == AF_INET) {			arp_ifinit(&ic->ic_ac, ifa);		}#endif  /* INET */		/* FALLTHROUGH */	case SIOCSIFFLAGS:		if ((ifp->if_flags & IFF_UP) != 0) {			if ((sc->sc_flags & RTW_F_ENABLED) != 0) {				rtw_pktfilt_load(sc);			} else				rc = rtw_init(ifp);#ifdef RTW_DEBUG			rtw_print_regs(&sc->sc_regs, ifp->if_xname, __func__);#endif /* RTW_DEBUG */		} else if ((sc->sc_flags & RTW_F_ENABLED) != 0) {#ifdef RTW_DEBUG			rtw_print_regs(&sc->sc_regs, ifp->if_xname, __func__);#endif /* RTW_DEBUG */			rtw_stop(ifp, 1);		}		break;	case SIOCADDMULTI:	case SIOCDELMULTI:		if (cmd == SIOCADDMULTI)			rc = ether_addmulti(ifr, &sc->sc_ic.ic_ac);		else			rc = ether_delmulti(ifr, &sc->sc_ic.ic_ac);		if (rc != ENETRESET)			break;		if (ifp->if_flags & IFF_RUNNING)			rtw_pktfilt_load(sc);		rc = 0;		break;	default:		if ((rc = ieee80211_ioctl(ifp, cmd, data)) == ENETRESET) {			if ((sc->sc_flags & RTW_F_ENABLED) != 0)				rc = rtw_init(ifp);			else				rc = 0;		}		break;	}	splx(s);	return rc;}