diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-06-11 06:47:50 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-19 15:49:16 -0400 |
commit | bc7e1be70c9f1c6de622aa14baa62003342034bb (patch) | |
tree | c8de885ee9b323c460c31f1fb14ebf59ecd927af /drivers/net/wireless/ath/ath9k/init.c | |
parent | fbbcd14690d3c42b664740d58a22af50a77d5689 (diff) |
ath9k: Move txpower limit to channel context
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Rajkumar Manoharan <rmanohar@qti.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.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 32d954275d47..ffd42bfb74b4 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -169,9 +169,9 @@ static void ath9k_reg_notifier(struct wiphy *wiphy, | |||
169 | 169 | ||
170 | /* Set tx power */ | 170 | /* Set tx power */ |
171 | if (ah->curchan) { | 171 | if (ah->curchan) { |
172 | sc->config.txpowlimit = 2 * ah->curchan->chan->max_power; | 172 | sc->cur_chan->txpower = 2 * ah->curchan->chan->max_power; |
173 | ath9k_ps_wakeup(sc); | 173 | ath9k_ps_wakeup(sc); |
174 | ath9k_hw_set_txpowerlimit(ah, sc->config.txpowlimit, false); | 174 | ath9k_hw_set_txpowerlimit(ah, sc->cur_chan->txpower, false); |
175 | sc->curtxpow = ath9k_hw_regulatory(ah)->power_limit; | 175 | sc->curtxpow = ath9k_hw_regulatory(ah)->power_limit; |
176 | /* synchronize DFS detector if regulatory domain changed */ | 176 | /* synchronize DFS detector if regulatory domain changed */ |
177 | if (sc->dfs_detector != NULL) | 177 | if (sc->dfs_detector != NULL) |
@@ -335,7 +335,6 @@ static void ath9k_init_misc(struct ath_softc *sc) | |||
335 | setup_timer(&common->ani.timer, ath_ani_calibrate, (unsigned long)sc); | 335 | setup_timer(&common->ani.timer, ath_ani_calibrate, (unsigned long)sc); |
336 | 336 | ||
337 | common->last_rssi = ATH_RSSI_DUMMY_MARKER; | 337 | common->last_rssi = ATH_RSSI_DUMMY_MARKER; |
338 | sc->config.txpowlimit = ATH_TXPOWER_MAX; | ||
339 | memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN); | 338 | memcpy(common->bssidmask, ath_bcast_mac, ETH_ALEN); |
340 | sc->beacon.slottime = ATH9K_SLOT_TIME_9; | 339 | sc->beacon.slottime = ATH9K_SLOT_TIME_9; |
341 | 340 | ||