diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-02-05 20:03:05 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-02-05 20:03:05 +0000 |
| commit | f9edb08480901b8c7d85837d72f8702008b0a773 (patch) | |
| tree | c04feb833accf3797a2818bf289559ef157195a4 /sys/dev/ath/if_ath_spectral.c | |
| parent | 899ca3d65f2b5e1cdf4d563783c61ebcff0862cf (diff) | |
| parent | 9ad221a558f813645e352036ee2445903d9a9b6f (diff) | |
Notes
Diffstat (limited to 'sys/dev/ath/if_ath_spectral.c')
| -rw-r--r-- | sys/dev/ath/if_ath_spectral.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath_spectral.c b/sys/dev/ath/if_ath_spectral.c index e4afdaefbbb8..acbd5218eff5 100644 --- a/sys/dev/ath/if_ath_spectral.c +++ b/sys/dev/ath/if_ath_spectral.c @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include <dev/ath/if_athvar.h> #include <dev/ath/if_ath_spectral.h> +#include <dev/ath/if_ath_misc.h> #include <dev/ath/ath_hal/ah_desc.h> @@ -191,6 +192,10 @@ ath_ioctl_spectral(struct ath_softc *sc, struct ath_diag *ad) if (! ath_hal_spectral_supported(sc->sc_ah)) return (EINVAL); + ATH_LOCK(sc); + ath_power_set_power_state(sc, HAL_PM_AWAKE); + ATH_UNLOCK(sc); + if (ad->ad_id & ATH_DIAG_IN) { /* * Copy in data. @@ -285,6 +290,10 @@ bad: free(indata, M_TEMP); if ((ad->ad_id & ATH_DIAG_DYN) && outdata != NULL) free(outdata, M_TEMP); + ATH_LOCK(sc); + ath_power_restore_power_state(sc); + ATH_UNLOCK(sc); + return (error); } |
