ath9k: move ath9k_reload_chainmask_settings to common
authorOleksij Rempel <linux@rempel-privat.de>
Tue, 25 Feb 2014 13:48:55 +0000 (14:48 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 28 Feb 2014 19:33:16 +0000 (14:33 -0500)
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/common-init.c
drivers/net/wireless/ath/ath9k/common-init.h
drivers/net/wireless/ath/ath9k/init.c
drivers/net/wireless/ath/ath9k/main.c

index 8775ab2db2efa34d860d31ffeec4ccc23439911f..a006c1499728b080cd6fdf8f00433efe31809dc9 100644 (file)
@@ -226,3 +226,19 @@ void ath9k_cmn_setup_ht_cap(struct ath_hw *ah,
        ht_info->mcs.tx_params |= IEEE80211_HT_MCS_TX_DEFINED;
 }
 EXPORT_SYMBOL(ath9k_cmn_setup_ht_cap);
+
+void ath9k_cmn_reload_chainmask(struct ath_hw *ah)
+{
+       struct ath_common *common = ath9k_hw_common(ah);
+
+       if (!(ah->caps.hw_caps & ATH9K_HW_CAP_HT))
+               return;
+
+       if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ)
+               ath9k_cmn_setup_ht_cap(ah,
+                       &common->sbands[IEEE80211_BAND_2GHZ].ht_cap);
+       if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
+               ath9k_cmn_setup_ht_cap(ah,
+                       &common->sbands[IEEE80211_BAND_5GHZ].ht_cap);
+}
+EXPORT_SYMBOL(ath9k_cmn_reload_chainmask);
index 6e678ca8149b72052f814a259128e4eca55c0986..ac03fca5ffddfae1ff08dfc6e9e6ddeb69f65e95 100644 (file)
@@ -17,3 +17,4 @@
 int ath9k_cmn_init_channels_rates(struct ath_common *common);
 void ath9k_cmn_setup_ht_cap(struct ath_hw *ah,
                            struct ieee80211_sta_ht_cap *ht_info);
+void ath9k_cmn_reload_chainmask(struct ath_hw *ah);
index 88be85274b40d50a675ddbcc4ab87a7c0abb6a38..c0a4e866edcac9b5325a497d6e7bdedfdadb3b66 100644 (file)
@@ -642,20 +642,6 @@ static void ath9k_init_txpower_limits(struct ath_softc *sc)
        ah->curchan = curchan;
 }
 
-void ath9k_reload_chainmask_settings(struct ath_softc *sc)
-{
-       struct ath_hw *ah = sc->sc_ah;
-       struct ath_common *common = ath9k_hw_common(ah);
-
-       if (!(ah->caps.hw_caps & ATH9K_HW_CAP_HT))
-               return;
-
-       if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ)
-               ath9k_cmn_setup_ht_cap(ah, &common->sbands[IEEE80211_BAND_2GHZ].ht_cap);
-       if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ)
-               ath9k_cmn_setup_ht_cap(ah, &common->sbands[IEEE80211_BAND_5GHZ].ht_cap);
-}
-
 static const struct ieee80211_iface_limit if_limits[] = {
        { .max = 2048,  .types = BIT(NL80211_IFTYPE_STATION) |
                                 BIT(NL80211_IFTYPE_P2P_CLIENT) |
@@ -772,7 +758,7 @@ static void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
                        &common->sbands[IEEE80211_BAND_5GHZ];
 
        ath9k_init_wow(hw);
-       ath9k_reload_chainmask_settings(sc);
+       ath9k_cmn_reload_chainmask(ah);
 
        SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
 }
index 14a7524b4b50f3d358b91a16074ee704548aa449..42a18037004e5463711db4243de3a6ad1eb7b0c2 100644 (file)
@@ -2053,7 +2053,7 @@ static int ath9k_set_antenna(struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant)
                ah->rxchainmask = fill_chainmask(ah->caps.rx_chainmask, rx_ant);
 
        ah->txchainmask = fill_chainmask(ah->caps.tx_chainmask, tx_ant);
-       ath9k_reload_chainmask_settings(sc);
+       ath9k_cmn_reload_chainmask(ah);
 
        return 0;
 }