aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt73usb.c
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2010-08-23 13:56:07 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-08-25 14:34:55 -0400
commit8d1331b37d5b656a7a8e561f8e9d7661dd00c910 (patch)
tree2fd13c84b703b7dcf54b0f8293aeda8eec72228a /drivers/net/wireless/rt2x00/rt73usb.c
parent46323e112ce2a0fdaf2dd5389f95b248576b8fda (diff)
rt2x00: Fix max TX power settings
During initialization each driver reads the default TX power for each individual channel. However mac80211 only accepts the maximum value (which is also handled as default value). As a result, the TX power of the device was being limited to the default value, which is often quite low compared to the real maximum acceptable value. This patch allows each driver to set the maximum value on a per-channel basis which is forwarded to mac80211. The default value will be preserved for now, in case we want to update mac80211 to differentiate between the maximum and default txpower. This fixes bug complaining about limited TX power values like: https://bugzilla.kernel.org/show_bug.cgi?id=16358 Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt73usb.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index ab9389439d75..ee2c52fd0d73 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -2090,13 +2090,17 @@ static int rt73usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
2090 spec->channels_info = info; 2090 spec->channels_info = info;
2091 2091
2092 tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_G_START); 2092 tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_G_START);
2093 for (i = 0; i < 14; i++) 2093 for (i = 0; i < 14; i++) {
2094 info[i].tx_power1 = TXPOWER_FROM_DEV(tx_power[i]); 2094 info[i].max_power = MAX_TXPOWER;
2095 info[i].default_power1 = TXPOWER_FROM_DEV(tx_power[i]);
2096 }
2095 2097
2096 if (spec->num_channels > 14) { 2098 if (spec->num_channels > 14) {
2097 tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START); 2099 tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_A_START);
2098 for (i = 14; i < spec->num_channels; i++) 2100 for (i = 14; i < spec->num_channels; i++) {
2099 info[i].tx_power1 = TXPOWER_FROM_DEV(tx_power[i]); 2101 info[i].max_power = MAX_TXPOWER;
2102 info[i].default_power1 = TXPOWER_FROM_DEV(tx_power[i]);
2103 }
2100 } 2104 }
2101 2105
2102 return 0; 2106 return 0;