Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ath/if_ath_sysctl.c
Context not available. | |||||
ath_sysctl_tpscale(SYSCTL_HANDLER_ARGS) | ath_sysctl_tpscale(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
struct ath_softc *sc = arg1; | struct ath_softc *sc = arg1; | ||||
struct ifnet *ifp = sc->sc_ifp; | |||||
u_int32_t scale; | u_int32_t scale; | ||||
int error; | int error; | ||||
Context not available. | |||||
goto finish; | goto finish; | ||||
error = !ath_hal_settpscale(sc->sc_ah, scale) ? EINVAL : | error = !ath_hal_settpscale(sc->sc_ah, scale) ? EINVAL : | ||||
(ifp->if_drv_flags & IFF_DRV_RUNNING) ? | (sc->sc_running) ? ath_reset(sc, ATH_RESET_NOLOSS) : 0; | ||||
ath_reset(ifp, ATH_RESET_NOLOSS) : 0; | |||||
finish: | finish: | ||||
ATH_LOCK(sc); | ATH_LOCK(sc); | ||||
Context not available. | |||||
ath_sysctl_rfkill(SYSCTL_HANDLER_ARGS) | ath_sysctl_rfkill(SYSCTL_HANDLER_ARGS) | ||||
{ | { | ||||
struct ath_softc *sc = arg1; | struct ath_softc *sc = arg1; | ||||
struct ifnet *ifp = sc->sc_ifp; | |||||
struct ath_hal *ah = sc->sc_ah; | struct ath_hal *ah = sc->sc_ah; | ||||
u_int rfkill; | u_int rfkill; | ||||
int error; | int error; | ||||
Context not available. | |||||
error = EINVAL; | error = EINVAL; | ||||
goto finish; | goto finish; | ||||
} | } | ||||
error = (ifp->if_drv_flags & IFF_DRV_RUNNING) ? | error = sc->sc_running ? ath_reset(sc, ATH_RESET_FULL) : 0; | ||||
ath_reset(ifp, ATH_RESET_FULL) : 0; | |||||
finish: | finish: | ||||
ATH_LOCK(sc); | ATH_LOCK(sc); | ||||
Context not available. | |||||
* doesn't reset ANI related registers, so it'll leave | * doesn't reset ANI related registers, so it'll leave | ||||
* things in an inconsistent state. | * things in an inconsistent state. | ||||
*/ | */ | ||||
if (sc->sc_ifp->if_drv_flags & IFF_DRV_RUNNING) | if (sc->sc_running) | ||||
ath_reset(sc->sc_ifp, ATH_RESET_NOLOSS); | ath_reset(sc, ATH_RESET_NOLOSS); | ||||
error = 0; | error = 0; | ||||
Context not available. |