ath9k: use ath_common instead of ieee80211_hw in ath9k_spectral_scan_
authorOleksij Rempel <linux@rempel-privat.de>
Thu, 6 Nov 2014 07:53:27 +0000 (08:53 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 11 Nov 2014 21:31:14 +0000 (16:31 -0500)
we don't have here any ieee80211_hw dependencies any way.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/channel.c
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/spectral.c
drivers/net/wireless/ath/ath9k/spectral.h

index 25a21fa389ff12b907e0c10bed7d48573b8b00a5..814178ad36a77702b6ec60a52e0fa6f299eaa434 100644 (file)
@@ -93,7 +93,7 @@ static int ath_set_channel(struct ath_softc *sc)
                /* perform spectral scan if requested. */
                if (test_bit(ATH_OP_SCANNING, &common->op_flags) &&
                        sc->spec_priv.spectral_mode == SPECTRAL_CHANSCAN)
-                       ath9k_spectral_scan_trigger(hw);
+                       ath9k_spectral_scan_trigger(common);
        }
 
        return 0;
index 412b0a632f26b2638eace4a4631c73e4d5142503..567fb5170d1b8993812d4103c432399cc173186d 100644 (file)
@@ -1337,11 +1337,10 @@ static void ath9k_disable_ps(struct ath_softc *sc)
        ath_dbg(common, PS, "PowerSave disabled\n");
 }
 
-void ath9k_spectral_scan_trigger(struct ieee80211_hw *hw)
+void ath9k_spectral_scan_trigger(struct ath_common *common)
 {
-       struct ath_softc *sc = hw->priv;
+       struct ath_softc *sc = common->priv;
        struct ath_hw *ah = sc->sc_ah;
-       struct ath_common *common = ath9k_hw_common(ah);
        u32 rxfilter;
 
        if (config_enabled(CONFIG_ATH9K_TX99))
@@ -1363,17 +1362,16 @@ void ath9k_spectral_scan_trigger(struct ieee80211_hw *hw)
         * configuration, otherwise the register will have its values reset
         * (on my ar9220 to value 0x01002310)
         */
-       ath9k_spectral_scan_config(hw, sc->spec_priv.spectral_mode);
+       ath9k_spectral_scan_config(common, sc->spec_priv.spectral_mode);
        ath9k_hw_ops(ah)->spectral_scan_trigger(ah);
        ath_ps_ops(common)->restore(common);
 }
 
-int ath9k_spectral_scan_config(struct ieee80211_hw *hw,
+int ath9k_spectral_scan_config(struct ath_common *common,
                               enum spectral_mode spectral_mode)
 {
-       struct ath_softc *sc = hw->priv;
+       struct ath_softc *sc = common->priv;
        struct ath_hw *ah = sc->sc_ah;
-       struct ath_common *common = ath9k_hw_common(ah);
 
        if (!ath9k_hw_ops(ah)->spectral_scan_trigger) {
                ath_err(common, "spectrum analyzer not implemented on this hardware\n");
index 50af6bcf18e518643e2f38f7a28f7edf726728dc..4549dce60c16d59c823367202146ca2c9b4daf6f 100644 (file)
@@ -253,18 +253,18 @@ static ssize_t write_file_spec_scan_ctl(struct file *file,
        buf[len] = '\0';
 
        if (strncmp("trigger", buf, 7) == 0) {
-               ath9k_spectral_scan_trigger(common->hw);
+               ath9k_spectral_scan_trigger(common);
        } else if (strncmp("background", buf, 10) == 0) {
-               ath9k_spectral_scan_config(common->hw, SPECTRAL_BACKGROUND);
+               ath9k_spectral_scan_config(common, SPECTRAL_BACKGROUND);
                ath_dbg(common, CONFIG, "spectral scan: background mode enabled\n");
        } else if (strncmp("chanscan", buf, 8) == 0) {
-               ath9k_spectral_scan_config(common->hw, SPECTRAL_CHANSCAN);
+               ath9k_spectral_scan_config(common, SPECTRAL_CHANSCAN);
                ath_dbg(common, CONFIG, "spectral scan: channel scan mode enabled\n");
        } else if (strncmp("manual", buf, 6) == 0) {
-               ath9k_spectral_scan_config(common->hw, SPECTRAL_MANUAL);
+               ath9k_spectral_scan_config(common, SPECTRAL_MANUAL);
                ath_dbg(common, CONFIG, "spectral scan: manual mode enabled\n");
        } else if (strncmp("disable", buf, 7) == 0) {
-               ath9k_spectral_scan_config(common->hw, SPECTRAL_DISABLED);
+               ath9k_spectral_scan_config(common, SPECTRAL_DISABLED);
                ath_dbg(common, CONFIG, "spectral scan: disabled\n");
        } else {
                return -EINVAL;
index 555fcbbbcddff469f29b6430e5c683b84ca0f286..53660e60dd252e02f7717b8628c23dd95c704630 100644 (file)
@@ -133,8 +133,8 @@ static inline u8 spectral_bitmap_weight(u8 *bins)
 void ath9k_spectral_init_debug(struct ath_spec_scan_priv *spec_priv, struct dentry *debugfs_phy);
 void ath9k_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv);
 
-void ath9k_spectral_scan_trigger(struct ieee80211_hw *hw);
-int ath9k_spectral_scan_config(struct ieee80211_hw *hw,
+void ath9k_spectral_scan_trigger(struct ath_common *common);
+int ath9k_spectral_scan_config(struct ath_common *common,
                               enum spectral_mode spectral_mode);
 
 #ifdef CONFIG_ATH9K_DEBUGFS