aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h6
-rw-r--r--drivers/net/wireless/ath/ath9k/channel.c1
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c5
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c6
-rw-r--r--drivers/net/wireless/ath/ath9k/mci.c2
5 files changed, 8 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 8c87eb7fb6de..b6f6444d109e 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -36,10 +36,6 @@ extern int ath9k_modparam_nohwcrypt;
36extern int led_blink; 36extern int led_blink;
37extern bool is_ath9k_unloaded; 37extern bool is_ath9k_unloaded;
38 38
39struct ath_config {
40 u16 txpowlimit;
41};
42
43/*************************/ 39/*************************/
44/* Descriptor Management */ 40/* Descriptor Management */
45/*************************/ 41/*************************/
@@ -328,6 +324,7 @@ struct ath_rx {
328struct ath_chanctx { 324struct ath_chanctx {
329 struct cfg80211_chan_def chandef; 325 struct cfg80211_chan_def chandef;
330 struct list_head vifs; 326 struct list_head vifs;
327 u16 txpower;
331 bool offchannel; 328 bool offchannel;
332}; 329};
333 330
@@ -753,7 +750,6 @@ struct ath_softc {
753 short nvifs; 750 short nvifs;
754 unsigned long ps_usecount; 751 unsigned long ps_usecount;
755 752
756 struct ath_config config;
757 struct ath_rx rx; 753 struct ath_rx rx;
758 struct ath_tx tx; 754 struct ath_tx tx;
759 struct ath_beacon beacon; 755 struct ath_beacon beacon;
diff --git a/drivers/net/wireless/ath/ath9k/channel.c b/drivers/net/wireless/ath/ath9k/channel.c
index aee6cdb4975b..1b40cf5aa955 100644
--- a/drivers/net/wireless/ath/ath9k/channel.c
+++ b/drivers/net/wireless/ath/ath9k/channel.c
@@ -118,6 +118,7 @@ void ath_chanctx_init(struct ath_softc *sc)
118 ctx = &sc->chanctx[i]; 118 ctx = &sc->chanctx[i];
119 cfg80211_chandef_create(&ctx->chandef, chan, NL80211_CHAN_HT20); 119 cfg80211_chandef_create(&ctx->chandef, chan, NL80211_CHAN_HT20);
120 INIT_LIST_HEAD(&ctx->vifs); 120 INIT_LIST_HEAD(&ctx->vifs);
121 ctx->txpower = ATH_TXPOWER_MAX;
121 } 122 }
122 sc->cur_chan = &sc->chanctx[0]; 123 sc->cur_chan = &sc->chanctx[0];
123} 124}
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
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 2e7cce7b1238..5a9cee4a8935 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -227,7 +227,7 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
227 } 227 }
228 228
229 ath9k_cmn_update_txpow(ah, sc->curtxpow, 229 ath9k_cmn_update_txpow(ah, sc->curtxpow,
230 sc->config.txpowlimit, &sc->curtxpow); 230 sc->cur_chan->txpower, &sc->curtxpow);
231 231
232 clear_bit(ATH_OP_HW_RESET, &common->op_flags); 232 clear_bit(ATH_OP_HW_RESET, &common->op_flags);
233 ath9k_hw_set_interrupts(ah); 233 ath9k_hw_set_interrupts(ah);
@@ -1315,9 +1315,9 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
1315 1315
1316 if (changed & IEEE80211_CONF_CHANGE_POWER) { 1316 if (changed & IEEE80211_CONF_CHANGE_POWER) {
1317 ath_dbg(common, CONFIG, "Set power: %d\n", conf->power_level); 1317 ath_dbg(common, CONFIG, "Set power: %d\n", conf->power_level);
1318 sc->config.txpowlimit = 2 * conf->power_level; 1318 sc->cur_chan->txpower = 2 * conf->power_level;
1319 ath9k_cmn_update_txpow(ah, sc->curtxpow, 1319 ath9k_cmn_update_txpow(ah, sc->curtxpow,
1320 sc->config.txpowlimit, &sc->curtxpow); 1320 sc->cur_chan->txpower, &sc->curtxpow);
1321 } 1321 }
1322 1322
1323 mutex_unlock(&sc->mutex); 1323 mutex_unlock(&sc->mutex);
diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
index a0dbcc412384..313ed995585a 100644
--- a/drivers/net/wireless/ath/ath9k/mci.c
+++ b/drivers/net/wireless/ath/ath9k/mci.c
@@ -720,7 +720,7 @@ void ath9k_mci_set_txpower(struct ath_softc *sc, bool setchannel,
720 mci_hw->concur_tx = concur_tx; 720 mci_hw->concur_tx = concur_tx;
721 721
722 if (old_concur_tx != mci_hw->concur_tx) 722 if (old_concur_tx != mci_hw->concur_tx)
723 ath9k_hw_set_txpowerlimit(ah, sc->config.txpowlimit, false); 723 ath9k_hw_set_txpowerlimit(ah, sc->cur_chan->txpower, false);
724} 724}
725 725
726static void ath9k_mci_stomp_audio(struct ath_softc *sc) 726static void ath9k_mci_stomp_audio(struct ath_softc *sc)