summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorOleksij Rempel <linux@rempel-privat.de>2014-11-06 10:53:18 +0300
committerJohn W. Linville <linville@tuxdriver.com>2014-11-12 00:31:12 +0300
commit911ea79f435302fabefa305d3649efd4e205672b (patch)
tree893847c59e1544900c831124d5cff9873d694a83 /drivers/net
parentd7d8b83473e6932cfe9f89e6d839f27abf35b319 (diff)
downloadlinux-911ea79f435302fabefa305d3649efd4e205672b.tar.xz
ath9k: add struct ath_spec_scan_priv
and move rfs_chan_spec_scan to this struct. We will need it for common spectral scan code. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/spectral.c12
-rw-r--r--drivers/net/wireless/ath/ath9k/spectral.h3
3 files changed, 10 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index adb49a9813f1..d6e4eb5f8441 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -1029,9 +1029,9 @@ struct ath_softc {
u64 dfs_prev_pulse_ts;
u32 wow_enabled;
/* relay(fs) channel for spectral scan */
- struct rchan *rfs_chan_spec_scan;
enum spectral_mode spectral_mode;
struct ath_spec_scan spec_config;
+ struct ath_spec_scan_priv spec_priv;
struct ieee80211_vif *tx99_vif;
struct sk_buff *tx99_skb;
diff --git a/drivers/net/wireless/ath/ath9k/spectral.c b/drivers/net/wireless/ath/ath9k/spectral.c
index 8f68426ca653..348dddd38952 100644
--- a/drivers/net/wireless/ath/ath9k/spectral.c
+++ b/drivers/net/wireless/ath/ath9k/spectral.c
@@ -28,12 +28,12 @@ static void ath_debug_send_fft_sample(struct ath_softc *sc,
struct fft_sample_tlv *fft_sample_tlv)
{
int length;
- if (!sc->rfs_chan_spec_scan)
+ if (!sc->spec_priv.rfs_chan_spec_scan)
return;
length = __be16_to_cpu(fft_sample_tlv->length) +
sizeof(*fft_sample_tlv);
- relay_write(sc->rfs_chan_spec_scan, fft_sample_tlv, length);
+ relay_write(sc->spec_priv.rfs_chan_spec_scan, fft_sample_tlv, length);
}
/* returns 1 if this was a spectral frame, even if not handled. */
@@ -508,15 +508,15 @@ static struct rchan_callbacks rfs_spec_scan_cb = {
void ath9k_spectral_deinit_debug(struct ath_softc *sc)
{
- if (config_enabled(CONFIG_ATH9K_DEBUGFS) && sc->rfs_chan_spec_scan) {
- relay_close(sc->rfs_chan_spec_scan);
- sc->rfs_chan_spec_scan = NULL;
+ if (config_enabled(CONFIG_ATH9K_DEBUGFS) && sc->spec_priv.rfs_chan_spec_scan) {
+ relay_close(sc->spec_priv.rfs_chan_spec_scan);
+ sc->spec_priv.rfs_chan_spec_scan = NULL;
}
}
void ath9k_spectral_init_debug(struct ath_softc *sc)
{
- sc->rfs_chan_spec_scan = relay_open("spectral_scan",
+ sc->spec_priv.rfs_chan_spec_scan = relay_open("spectral_scan",
sc->debug.debugfs_phy,
1024, 256, &rfs_spec_scan_cb,
NULL);
diff --git a/drivers/net/wireless/ath/ath9k/spectral.h b/drivers/net/wireless/ath/ath9k/spectral.h
index 7b410c6858b0..533d8a1a8a9d 100644
--- a/drivers/net/wireless/ath/ath9k/spectral.h
+++ b/drivers/net/wireless/ath/ath9k/spectral.h
@@ -92,6 +92,9 @@ struct ath_ht20_40_fft_packet {
struct ath_radar_info radar_info;
} __packed;
+struct ath_spec_scan_priv {
+ struct rchan *rfs_chan_spec_scan;
+};
#define SPECTRAL_HT20_40_TOTAL_DATA_LEN (sizeof(struct ath_ht20_40_fft_packet))