aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/init.c
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2011-12-08 13:29:25 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-12-13 15:31:01 -0500
commit687f545ecf5600cf43717f937d94d859e105574c (patch)
tree4774114dc86106108b167ffa4434aea1c8611cb6 /drivers/net/wireless/ath/ath9k/init.c
parentde1c732b1891a25f3f2f52ef7211a3d567bbd588 (diff)
ath9k: Reconfigure tx power on regulatory update
Whenever the regulatory got updated by country IE for the world roaming cards, need to reconfigure the tx power immediately to increase the power level. Reviewed-by: Sam Leffler <sleffler@google.com> Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/init.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 41b72faca77f..c5df98139c4d 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -297,9 +297,22 @@ static int ath9k_reg_notifier(struct wiphy *wiphy,
297{ 297{
298 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); 298 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
299 struct ath_softc *sc = hw->priv; 299 struct ath_softc *sc = hw->priv;
300 struct ath_regulatory *reg = ath9k_hw_regulatory(sc->sc_ah); 300 struct ath_hw *ah = sc->sc_ah;
301 struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
302 int ret;
303
304 ret = ath_reg_notifier_apply(wiphy, request, reg);
305
306 /* Set tx power */
307 if (ah->curchan) {
308 sc->config.txpowlimit = 2 * ah->curchan->chan->max_power;
309 ath9k_ps_wakeup(sc);
310 ath9k_hw_set_txpowerlimit(ah, sc->config.txpowlimit, false);
311 sc->curtxpow = ath9k_hw_regulatory(ah)->power_limit;
312 ath9k_ps_restore(sc);
313 }
301 314
302 return ath_reg_notifier_apply(wiphy, request, reg); 315 return ret;
303} 316}
304 317
305/* 318/*