Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Oleksij Rempel and committed by
John W. Linville
b57ba3b2 91884fad

+19 -16
+16
drivers/net/wireless/ath/ath9k/common-init.c
··· 226 226 ht_info->mcs.tx_params |= IEEE80211_HT_MCS_TX_DEFINED; 227 227 } 228 228 EXPORT_SYMBOL(ath9k_cmn_setup_ht_cap); 229 + 230 + void ath9k_cmn_reload_chainmask(struct ath_hw *ah) 231 + { 232 + struct ath_common *common = ath9k_hw_common(ah); 233 + 234 + if (!(ah->caps.hw_caps & ATH9K_HW_CAP_HT)) 235 + return; 236 + 237 + if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) 238 + ath9k_cmn_setup_ht_cap(ah, 239 + &common->sbands[IEEE80211_BAND_2GHZ].ht_cap); 240 + if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) 241 + ath9k_cmn_setup_ht_cap(ah, 242 + &common->sbands[IEEE80211_BAND_5GHZ].ht_cap); 243 + } 244 + EXPORT_SYMBOL(ath9k_cmn_reload_chainmask);
+1
drivers/net/wireless/ath/ath9k/common-init.h
··· 17 17 int ath9k_cmn_init_channels_rates(struct ath_common *common); 18 18 void ath9k_cmn_setup_ht_cap(struct ath_hw *ah, 19 19 struct ieee80211_sta_ht_cap *ht_info); 20 + void ath9k_cmn_reload_chainmask(struct ath_hw *ah);
+1 -15
drivers/net/wireless/ath/ath9k/init.c
··· 642 642 ah->curchan = curchan; 643 643 } 644 644 645 - void ath9k_reload_chainmask_settings(struct ath_softc *sc) 646 - { 647 - struct ath_hw *ah = sc->sc_ah; 648 - struct ath_common *common = ath9k_hw_common(ah); 649 - 650 - if (!(ah->caps.hw_caps & ATH9K_HW_CAP_HT)) 651 - return; 652 - 653 - if (ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) 654 - ath9k_cmn_setup_ht_cap(ah, &common->sbands[IEEE80211_BAND_2GHZ].ht_cap); 655 - if (ah->caps.hw_caps & ATH9K_HW_CAP_5GHZ) 656 - ath9k_cmn_setup_ht_cap(ah, &common->sbands[IEEE80211_BAND_5GHZ].ht_cap); 657 - } 658 - 659 645 static const struct ieee80211_iface_limit if_limits[] = { 660 646 { .max = 2048, .types = BIT(NL80211_IFTYPE_STATION) | 661 647 BIT(NL80211_IFTYPE_P2P_CLIENT) | ··· 758 772 &common->sbands[IEEE80211_BAND_5GHZ]; 759 773 760 774 ath9k_init_wow(hw); 761 - ath9k_reload_chainmask_settings(sc); 775 + ath9k_cmn_reload_chainmask(ah); 762 776 763 777 SET_IEEE80211_PERM_ADDR(hw, common->macaddr); 764 778 }
+1 -1
drivers/net/wireless/ath/ath9k/main.c
··· 2053 2053 ah->rxchainmask = fill_chainmask(ah->caps.rx_chainmask, rx_ant); 2054 2054 2055 2055 ah->txchainmask = fill_chainmask(ah->caps.tx_chainmask, tx_ant); 2056 - ath9k_reload_chainmask_settings(sc); 2056 + ath9k_cmn_reload_chainmask(ah); 2057 2057 2058 2058 return 0; 2059 2059 }