summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/if_ath_sysctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ath/if_ath_sysctl.c')
-rw-r--r--sys/dev/ath/if_ath_sysctl.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sys/dev/ath/if_ath_sysctl.c b/sys/dev/ath/if_ath_sysctl.c
index eeb8d4b..d8c6bac 100644
--- a/sys/dev/ath/if_ath_sysctl.c
+++ b/sys/dev/ath/if_ath_sysctl.c
@@ -367,7 +367,6 @@ static int
ath_sysctl_tpscale(SYSCTL_HANDLER_ARGS)
{
struct ath_softc *sc = arg1;
- struct ifnet *ifp = sc->sc_ifp;
u_int32_t scale;
int error;
@@ -381,8 +380,7 @@ ath_sysctl_tpscale(SYSCTL_HANDLER_ARGS)
goto finish;
error = !ath_hal_settpscale(sc->sc_ah, scale) ? EINVAL :
- (ifp->if_drv_flags & IFF_DRV_RUNNING) ?
- ath_reset(ifp, ATH_RESET_NOLOSS) : 0;
+ (sc->sc_running) ? ath_reset(sc, ATH_RESET_NOLOSS) : 0;
finish:
ATH_LOCK(sc);
@@ -422,7 +420,6 @@ static int
ath_sysctl_rfkill(SYSCTL_HANDLER_ARGS)
{
struct ath_softc *sc = arg1;
- struct ifnet *ifp = sc->sc_ifp;
struct ath_hal *ah = sc->sc_ah;
u_int rfkill;
int error;
@@ -444,8 +441,7 @@ ath_sysctl_rfkill(SYSCTL_HANDLER_ARGS)
error = EINVAL;
goto finish;
}
- error = (ifp->if_drv_flags & IFF_DRV_RUNNING) ?
- ath_reset(ifp, ATH_RESET_FULL) : 0;
+ error = sc->sc_running ? ath_reset(sc, ATH_RESET_FULL) : 0;
finish:
ATH_LOCK(sc);
@@ -671,8 +667,8 @@ ath_sysctl_intmit(SYSCTL_HANDLER_ARGS)
* doesn't reset ANI related registers, so it'll leave
* things in an inconsistent state.
*/
- if (sc->sc_ifp->if_drv_flags & IFF_DRV_RUNNING)
- ath_reset(sc->sc_ifp, ATH_RESET_NOLOSS);
+ if (sc->sc_running)
+ ath_reset(sc, ATH_RESET_NOLOSS);
error = 0;
OpenPOWER on IntegriCloud