Lines 263-269
Link Here
|
263 |
static void wpi_hw_stop(struct wpi_softc *); |
263 |
static void wpi_hw_stop(struct wpi_softc *); |
264 |
static void wpi_radio_on(void *, int); |
264 |
static void wpi_radio_on(void *, int); |
265 |
static void wpi_radio_off(void *, int); |
265 |
static void wpi_radio_off(void *, int); |
266 |
static void wpi_init_locked(struct wpi_softc *); |
|
|
267 |
static void wpi_init(void *); |
266 |
static void wpi_init(void *); |
268 |
static void wpi_stop_locked(struct wpi_softc *); |
267 |
static void wpi_stop_locked(struct wpi_softc *); |
269 |
static void wpi_stop(struct wpi_softc *); |
268 |
static void wpi_stop(struct wpi_softc *); |
Lines 2972-2984
Link Here
|
2972 |
break; |
2971 |
break; |
2973 |
case SIOCSIFFLAGS: |
2972 |
case SIOCSIFFLAGS: |
2974 |
if (ifp->if_flags & IFF_UP) { |
2973 |
if (ifp->if_flags & IFF_UP) { |
2975 |
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) { |
2974 |
wpi_init(sc); |
2976 |
wpi_init(sc); |
|
|
2977 |
|
2975 |
|
2978 |
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 && |
2976 |
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 && |
2979 |
vap != NULL) |
2977 |
vap != NULL) |
2980 |
ieee80211_stop(vap); |
2978 |
ieee80211_stop(vap); |
2981 |
} |
|
|
2982 |
} else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) |
2979 |
} else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) |
2983 |
wpi_stop(sc); |
2980 |
wpi_stop(sc); |
2984 |
break; |
2981 |
break; |
Lines 5175-5188
Link Here
|
5175 |
} |
5172 |
} |
5176 |
|
5173 |
|
5177 |
static void |
5174 |
static void |
5178 |
wpi_init_locked(struct wpi_softc *sc) |
5175 |
wpi_init(void *arg) |
5179 |
{ |
5176 |
{ |
|
|
5177 |
struct wpi_softc *sc = arg; |
5180 |
struct ifnet *ifp = sc->sc_ifp; |
5178 |
struct ifnet *ifp = sc->sc_ifp; |
|
|
5179 |
struct ieee80211com *ic = ifp->if_l2com; |
5181 |
int error; |
5180 |
int error; |
5182 |
|
5181 |
|
|
|
5182 |
WPI_LOCK(sc); |
5183 |
|
5183 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); |
5184 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_BEGIN, __func__); |
5184 |
|
5185 |
|
5185 |
WPI_LOCK_ASSERT(sc); |
5186 |
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) |
|
|
5187 |
goto end; |
5186 |
|
5188 |
|
5187 |
/* Check that the radio is not disabled by hardware switch. */ |
5189 |
/* Check that the radio is not disabled by hardware switch. */ |
5188 |
if (!(WPI_READ(sc, WPI_GP_CNTRL) & WPI_GP_CNTRL_RFKILL)) { |
5190 |
if (!(WPI_READ(sc, WPI_GP_CNTRL) & WPI_GP_CNTRL_RFKILL)) { |
Lines 5190-5196
Link Here
|
5190 |
"RF switch: radio disabled (%s)\n", __func__); |
5192 |
"RF switch: radio disabled (%s)\n", __func__); |
5191 |
callout_reset(&sc->watchdog_rfkill, hz, wpi_watchdog_rfkill, |
5193 |
callout_reset(&sc->watchdog_rfkill, hz, wpi_watchdog_rfkill, |
5192 |
sc); |
5194 |
sc); |
5193 |
return; |
5195 |
goto end; |
5194 |
} |
5196 |
} |
5195 |
|
5197 |
|
5196 |
/* Read firmware images from the filesystem. */ |
5198 |
/* Read firmware images from the filesystem. */ |
Lines 5227-5251
Link Here
|
5227 |
|
5229 |
|
5228 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); |
5230 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END, __func__); |
5229 |
|
5231 |
|
|
|
5232 |
WPI_UNLOCK(sc); |
5233 |
|
5234 |
ieee80211_start_all(ic); |
5235 |
|
5230 |
return; |
5236 |
return; |
5231 |
|
5237 |
|
5232 |
fail: wpi_stop_locked(sc); |
5238 |
fail: wpi_stop_locked(sc); |
5233 |
DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); |
5239 |
end: DPRINTF(sc, WPI_DEBUG_TRACE, TRACE_STR_END_ERR, __func__); |
5234 |
} |
|
|
5235 |
|
5236 |
static void |
5237 |
wpi_init(void *arg) |
5238 |
{ |
5239 |
struct wpi_softc *sc = arg; |
5240 |
struct ifnet *ifp = sc->sc_ifp; |
5241 |
struct ieee80211com *ic = ifp->if_l2com; |
5242 |
|
5243 |
WPI_LOCK(sc); |
5244 |
wpi_init_locked(sc); |
5245 |
WPI_UNLOCK(sc); |
5240 |
WPI_UNLOCK(sc); |
5246 |
|
|
|
5247 |
if (ifp->if_drv_flags & IFF_DRV_RUNNING) |
5248 |
ieee80211_start_all(ic); |
5249 |
} |
5241 |
} |
5250 |
|
5242 |
|
5251 |
static void |
5243 |
static void |