Commit d9bceaeb authored by Stanislaw Gruszka's avatar Stanislaw Gruszka Committed by John W. Linville
Browse files

rt2800: use eeprom OFDM 6M TX power as criterion

Don use TX_PWR_CFG_0 register value of OFDM 6M tx power as criterion
since it can be changed. The same do vendor driver (see
AsicAdjustSingleSkuTxPower and AsicGetTxPowerOffset functions from
Signed-off-by: default avatarStanislaw Gruszka <>
Acked-by: default avatarGertjan van Wingerde <>
Acked-by: default avatarIvo van Doorn <>
Signed-off-by: default avatarJohn W. Linville <>
parent de2493c5
......@@ -2524,7 +2524,6 @@ static u8 rt2800_compensate_txpower(struct rt2x00_dev *rt2x00dev, int is_rate_b,
enum ieee80211_band band, int power_level,
u8 txpower, int delta)
u32 reg;
u16 eeprom;
u8 criterion;
u8 eirp_txpower;
......@@ -2539,11 +2538,13 @@ static u8 rt2800_compensate_txpower(struct rt2x00_dev *rt2x00dev, int is_rate_b,
* .11b data rate need add additional 4dbm
* when calculating eirp txpower.
rt2800_register_read(rt2x00dev, TX_PWR_CFG_0, &reg);
criterion = rt2x00_get_field32(reg, TX_PWR_CFG_0_6MBS);
rt2x00_eeprom_read(rt2x00dev, EEPROM_TXPOWER_BYRATE + 1,
criterion = rt2x00_get_field16(eeprom,
rt2x00_eeprom_read(rt2x00dev, EEPROM_EIRP_MAX_TX_POWER,
if (band == IEEE80211_BAND_2GHZ)
eirp_txpower_criterion = rt2x00_get_field16(eeprom,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment