summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorSimon Wunderlich <simon.wunderlich@s2003.tu-chemnitz.de>2013-01-23 17:38:04 +0100
committerJohn W. Linville <linville@tuxdriver.com>2013-01-30 15:06:40 -0500
commit04ccd4a1a61a2824539e04b5d7f4ee87e8aab0ed (patch)
tree2e7ba34126bd64cd7881a955d7793e62dcbd7400 /drivers/net/wireless/ath/ath9k/main.c
parent6ccea75e701d5d452b674dd5550c0caceccb5d56 (diff)
downloadlinux-04ccd4a1a61a2824539e04b5d7f4ee87e8aab0ed.tar.gz
linux-04ccd4a1a61a2824539e04b5d7f4ee87e8aab0ed.tar.xz
ath9k: add debug parameters for spectral scan
Export the various parameters to userspace. Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 4b72b660f180..5432f1247e2e 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1099,45 +1099,34 @@ int ath9k_spectral_scan_config(struct ieee80211_hw *hw,
struct ath_softc *sc = hw->priv;
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
- struct ath_spec_scan param;
if (!ath9k_hw_ops(ah)->spectral_scan_trigger) {
ath_err(common, "spectrum analyzer not implemented on this hardware\n");
return -1;
}
- /* NOTE: this will generate a few samples ...
- *
- * TODO: review default parameters, and/or define an interface to set
- * them.
- */
- param.enabled = 1;
- param.short_repeat = true;
- param.count = 8;
- param.endless = false;
- param.period = 0xFF;
- param.fft_period = 0xF;
-
switch (spectral_mode) {
case SPECTRAL_DISABLED:
- param.enabled = 0;
+ sc->spec_config.enabled = 0;
break;
case SPECTRAL_BACKGROUND:
/* send endless samples.
* TODO: is this really useful for "background"?
*/
- param.endless = 1;
+ sc->spec_config.endless = 1;
+ sc->spec_config.enabled = 1;
break;
case SPECTRAL_CHANSCAN:
- break;
case SPECTRAL_MANUAL:
+ sc->spec_config.endless = 0;
+ sc->spec_config.enabled = 1;
break;
default:
return -1;
}
ath9k_ps_wakeup(sc);
- ath9k_hw_ops(ah)->spectral_scan_config(ah, &param);
+ ath9k_hw_ops(ah)->spectral_scan_config(ah, &sc->spec_config);
ath9k_ps_restore(sc);
sc->spectral_mode = spectral_mode;