View | Details | Raw Unified | Return to bug 197143 | Differences between
and this patch

Collapse All | Expand All

(-)sys/dev/wpi/if_wpi.c (-16 / +9 lines)
Lines 2964-2970 Link Here
2964
	struct ieee80211com *ic = ifp->if_l2com;
2964
	struct ieee80211com *ic = ifp->if_l2com;
2965
	struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
2965
	struct ieee80211vap *vap = TAILQ_FIRST(&ic->ic_vaps);
2966
	struct ifreq *ifr = (struct ifreq *) data;
2966
	struct ifreq *ifr = (struct ifreq *) data;
2967
	int error = 0, startall = 0, stop = 0;
2967
	int error = 0;
2968
2968
2969
	switch (cmd) {
2969
	switch (cmd) {
2970
	case SIOCGIFADDR:
2970
	case SIOCGIFADDR:
Lines 2971-2993 Link Here
2971
		error = ether_ioctl(ifp, cmd, data);
2971
		error = ether_ioctl(ifp, cmd, data);
2972
		break;
2972
		break;
2973
	case SIOCSIFFLAGS:
2973
	case SIOCSIFFLAGS:
2974
		WPI_LOCK(sc);
2975
		if (ifp->if_flags & IFF_UP) {
2974
		if (ifp->if_flags & IFF_UP) {
2976
			if (!(ifp->if_drv_flags & IFF_DRV_RUNNING)) {
2975
			if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
2977
				wpi_init_locked(sc);
2976
				wpi_init(sc);
2978
				if (WPI_READ(sc, WPI_GP_CNTRL) &
2977
2979
				    WPI_GP_CNTRL_RFKILL)
2978
				if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 &&
2980
					startall = 1;
2979
				    vap != NULL)
2981
				else
2980
					ieee80211_stop(vap);
2982
					stop = 1;
2983
			}
2981
			}
2984
		} else if (ifp->if_drv_flags & IFF_DRV_RUNNING)
2982
		} else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
2985
			wpi_stop_locked(sc);
2983
			wpi_stop(sc);
2986
		WPI_UNLOCK(sc);
2987
		if (startall)
2988
			ieee80211_start_all(ic);
2989
		else if (vap != NULL && stop)
2990
			ieee80211_stop(vap);
2991
		break;
2984
		break;
2992
	case SIOCGIFMEDIA:
2985
	case SIOCGIFMEDIA:
2993
		error = ifmedia_ioctl(ifp, ifr, &ic->ic_media, cmd);
2986
		error = ifmedia_ioctl(ifp, ifr, &ic->ic_media, cmd);

Return to bug 197143