summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/common-init.c
diff options
context:
space:
mode:
authorOleksij Rempel <linux@rempel-privat.de>2014-02-25 14:48:55 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-02-28 14:33:16 -0500
commitb57ba3b2f7b00e1241c2ebabb0906321a4e64414 (patch)
treeb6839290ecfe1d48cf304af43eefffc166dad8f7 /drivers/net/wireless/ath/ath9k/common-init.c
parent91884fad852da4d00b1a5f5d57203e08884a3c1d (diff)
downloadlinux-b57ba3b2f7b00e1241c2ebabb0906321a4e64414.tar.gz
linux-b57ba3b2f7b00e1241c2ebabb0906321a4e64414.tar.bz2
linux-b57ba3b2f7b00e1241c2ebabb0906321a4e64414.zip
ath9k: move ath9k_reload_chainmask_settings to common
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/common-init.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/common-init.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common-init.c b/drivers/net/wireless/ath/ath9k/common-init.c
index 8775ab2db2ef..a006c1499728 100644
--- a/drivers/net/wireless/ath/ath9k/common-init.c
+++ b/drivers/net/wireless/ath/ath9k/common-init.c
@@ -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);