aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2012-10-05 07:44:13 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-10-19 15:53:12 -0400
commit146c3b0ccd09dbd21f7dd6c9ed10094cb91f9a2d (patch)
tree6cd91cd70996e9d4a82869a5c14690d0add5078c /drivers/net/wireless/rt2x00
parentd9bceaeb174fe70c62933e1bf608500c614c5130 (diff)
rt2800: pass channel pointer to rt2800_config_txpower
Preparation for use regulatory max channel power in TX power delta calculations. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2800lib.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
index b5e646f70e8b..7110e1f1e49a 100644
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -2566,13 +2566,14 @@ static u8 rt2800_compensate_txpower(struct rt2x00_dev *rt2x00dev, int is_rate_b,
2566} 2566}
2567 2567
2568static void rt2800_config_txpower(struct rt2x00_dev *rt2x00dev, 2568static void rt2800_config_txpower(struct rt2x00_dev *rt2x00dev,
2569 enum ieee80211_band band, 2569 struct ieee80211_channel *chan,
2570 int power_level) 2570 int power_level)
2571{ 2571{
2572 u8 txpower, r1; 2572 u8 txpower, r1;
2573 u16 eeprom; 2573 u16 eeprom;
2574 u32 reg, offset; 2574 u32 reg, offset;
2575 int i, is_rate_b, delta, power_ctrl; 2575 int i, is_rate_b, delta, power_ctrl;
2576 enum ieee80211_band band = chan->band;
2576 2577
2577 /* 2578 /*
2578 * Calculate HT40 compensation delta 2579 * Calculate HT40 compensation delta
@@ -2720,7 +2721,7 @@ static void rt2800_config_txpower(struct rt2x00_dev *rt2x00dev,
2720 2721
2721void rt2800_gain_calibration(struct rt2x00_dev *rt2x00dev) 2722void rt2800_gain_calibration(struct rt2x00_dev *rt2x00dev)
2722{ 2723{
2723 rt2800_config_txpower(rt2x00dev, rt2x00dev->curr_band, 2724 rt2800_config_txpower(rt2x00dev, rt2x00dev->hw->conf.channel,
2724 rt2x00dev->tx_power); 2725 rt2x00dev->tx_power);
2725} 2726}
2726EXPORT_SYMBOL_GPL(rt2800_gain_calibration); 2727EXPORT_SYMBOL_GPL(rt2800_gain_calibration);
@@ -2855,11 +2856,11 @@ void rt2800_config(struct rt2x00_dev *rt2x00dev,
2855 if (flags & IEEE80211_CONF_CHANGE_CHANNEL) { 2856 if (flags & IEEE80211_CONF_CHANGE_CHANNEL) {
2856 rt2800_config_channel(rt2x00dev, libconf->conf, 2857 rt2800_config_channel(rt2x00dev, libconf->conf,
2857 &libconf->rf, &libconf->channel); 2858 &libconf->rf, &libconf->channel);
2858 rt2800_config_txpower(rt2x00dev, libconf->conf->channel->band, 2859 rt2800_config_txpower(rt2x00dev, libconf->conf->channel,
2859 libconf->conf->power_level); 2860 libconf->conf->power_level);
2860 } 2861 }
2861 if (flags & IEEE80211_CONF_CHANGE_POWER) 2862 if (flags & IEEE80211_CONF_CHANGE_POWER)
2862 rt2800_config_txpower(rt2x00dev, libconf->conf->channel->band, 2863 rt2800_config_txpower(rt2x00dev, libconf->conf->channel,
2863 libconf->conf->power_level); 2864 libconf->conf->power_level);
2864 if (flags & IEEE80211_CONF_CHANGE_RETRY_LIMITS) 2865 if (flags & IEEE80211_CONF_CHANGE_RETRY_LIMITS)
2865 rt2800_config_retry_limit(rt2x00dev, libconf); 2866 rt2800_config_retry_limit(rt2x00dev, libconf);