ath9k: move spec_config to ath_spec_scan_priv
authorOleksij Rempel <linux@rempel-privat.de>
Thu, 6 Nov 2014 07:53:20 +0000 (08:53 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 11 Nov 2014 21:31:13 +0000 (16:31 -0500)
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/init.c
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/spectral.c
drivers/net/wireless/ath/ath9k/spectral.h

index 859f93e9900e54fe358ce0d8a389c4fe800f24b3..dee1f2a585383918bbef959df73cde04ab3cf74d 100644 (file)
@@ -1028,8 +1028,7 @@ struct ath_softc {
        struct dfs_pattern_detector *dfs_detector;
        u64 dfs_prev_pulse_ts;
        u32 wow_enabled;
-       /* relay(fs) channel for spectral scan */
-       struct ath_spec_scan spec_config;
+
        struct ath_spec_scan_priv spec_priv;
 
        struct ieee80211_vif *tx99_vif;
index 8d3c3364326a1f94f5e836a83e9ebf5e616002f1..aebafaa28dce60b7bc825e46e0978b16d818117d 100644 (file)
@@ -351,12 +351,12 @@ static void ath9k_init_misc(struct ath_softc *sc)
        if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB)
                sc->ant_comb.count = ATH_ANT_DIV_COMB_INIT_COUNT;
 
-       sc->spec_config.enabled = 0;
-       sc->spec_config.short_repeat = true;
-       sc->spec_config.count = 8;
-       sc->spec_config.endless = false;
-       sc->spec_config.period = 0xFF;
-       sc->spec_config.fft_period = 0xF;
+       sc->spec_priv.spec_config.enabled = 0;
+       sc->spec_priv.spec_config.short_repeat = true;
+       sc->spec_priv.spec_config.count = 8;
+       sc->spec_priv.spec_config.endless = false;
+       sc->spec_priv.spec_config.period = 0xFF;
+       sc->spec_priv.spec_config.fft_period = 0xF;
 }
 
 static void ath9k_init_pcoem_platform(struct ath_softc *sc)
index c074658dbf5490dae7bcc479c79fca49fc017172..f9641ee6aeb61adf973eaa87b880b731f85eb861 100644 (file)
@@ -1382,26 +1382,26 @@ int ath9k_spectral_scan_config(struct ieee80211_hw *hw,
 
        switch (spectral_mode) {
        case SPECTRAL_DISABLED:
-               sc->spec_config.enabled = 0;
+               sc->spec_priv.spec_config.enabled = 0;
                break;
        case SPECTRAL_BACKGROUND:
                /* send endless samples.
                 * TODO: is this really useful for "background"?
                 */
-               sc->spec_config.endless = 1;
-               sc->spec_config.enabled = 1;
+               sc->spec_priv.spec_config.endless = 1;
+               sc->spec_priv.spec_config.enabled = 1;
                break;
        case SPECTRAL_CHANSCAN:
        case SPECTRAL_MANUAL:
-               sc->spec_config.endless = 0;
-               sc->spec_config.enabled = 1;
+               sc->spec_priv.spec_config.endless = 0;
+               sc->spec_priv.spec_config.enabled = 1;
                break;
        default:
                return -1;
        }
 
        ath9k_ps_wakeup(sc);
-       ath9k_hw_ops(ah)->spectral_scan_config(ah, &sc->spec_config);
+       ath9k_hw_ops(ah)->spectral_scan_config(ah, &sc->spec_priv.spec_config);
        ath9k_ps_restore(sc);
 
        sc->spec_priv.spectral_mode = spectral_mode;
index 3a394e1fefdc94078c8a08ba659428d333099cee..555fc2a6851e5a1eb9e11cd5e1815e2619369971 100644 (file)
@@ -292,7 +292,7 @@ static ssize_t read_file_spectral_short_repeat(struct file *file,
        char buf[32];
        unsigned int len;
 
-       len = sprintf(buf, "%d\n", sc->spec_config.short_repeat);
+       len = sprintf(buf, "%d\n", sc->spec_priv.spec_config.short_repeat);
        return simple_read_from_buffer(user_buf, count, ppos, buf, len);
 }
 
@@ -316,7 +316,7 @@ static ssize_t write_file_spectral_short_repeat(struct file *file,
        if (val > 1)
                return -EINVAL;
 
-       sc->spec_config.short_repeat = val;
+       sc->spec_priv.spec_config.short_repeat = val;
        return count;
 }
 
@@ -340,7 +340,7 @@ static ssize_t read_file_spectral_count(struct file *file,
        char buf[32];
        unsigned int len;
 
-       len = sprintf(buf, "%d\n", sc->spec_config.count);
+       len = sprintf(buf, "%d\n", sc->spec_priv.spec_config.count);
        return simple_read_from_buffer(user_buf, count, ppos, buf, len);
 }
 
@@ -364,7 +364,7 @@ static ssize_t write_file_spectral_count(struct file *file,
        if (val > 255)
                return -EINVAL;
 
-       sc->spec_config.count = val;
+       sc->spec_priv.spec_config.count = val;
        return count;
 }
 
@@ -388,7 +388,7 @@ static ssize_t read_file_spectral_period(struct file *file,
        char buf[32];
        unsigned int len;
 
-       len = sprintf(buf, "%d\n", sc->spec_config.period);
+       len = sprintf(buf, "%d\n", sc->spec_priv.spec_config.period);
        return simple_read_from_buffer(user_buf, count, ppos, buf, len);
 }
 
@@ -412,7 +412,7 @@ static ssize_t write_file_spectral_period(struct file *file,
        if (val > 255)
                return -EINVAL;
 
-       sc->spec_config.period = val;
+       sc->spec_priv.spec_config.period = val;
        return count;
 }
 
@@ -436,7 +436,7 @@ static ssize_t read_file_spectral_fft_period(struct file *file,
        char buf[32];
        unsigned int len;
 
-       len = sprintf(buf, "%d\n", sc->spec_config.fft_period);
+       len = sprintf(buf, "%d\n", sc->spec_priv.spec_config.fft_period);
        return simple_read_from_buffer(user_buf, count, ppos, buf, len);
 }
 
@@ -460,7 +460,7 @@ static ssize_t write_file_spectral_fft_period(struct file *file,
        if (val > 15)
                return -EINVAL;
 
-       sc->spec_config.fft_period = val;
+       sc->spec_priv.spec_config.fft_period = val;
        return count;
 }
 
index 0acdc432c77116b27a8079f26209056f97ef0f58..dfe6f68cf5a3addff7e58101be873ec7c8bbef04 100644 (file)
@@ -93,8 +93,10 @@ struct ath_ht20_40_fft_packet {
 } __packed;
 
 struct ath_spec_scan_priv {
+       /* relay(fs) channel for spectral scan */
        struct rchan *rfs_chan_spec_scan;
        enum spectral_mode spectral_mode;
+       struct ath_spec_scan spec_config;
 };
 
 #define SPECTRAL_HT20_40_TOTAL_DATA_LEN        (sizeof(struct ath_ht20_40_fft_packet))