提交 d9bceaeb 编写于 作者: S Stanislaw Gruszka 提交者: John W. Linville

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
2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO).
Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: NGertjan van Wingerde <gwingerde@gmail.com>
Acked-by: NIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 de2493c5
...@@ -2524,7 +2524,6 @@ static u8 rt2800_compensate_txpower(struct rt2x00_dev *rt2x00dev, int is_rate_b, ...@@ -2524,7 +2524,6 @@ static u8 rt2800_compensate_txpower(struct rt2x00_dev *rt2x00dev, int is_rate_b,
enum ieee80211_band band, int power_level, enum ieee80211_band band, int power_level,
u8 txpower, int delta) u8 txpower, int delta)
{ {
u32 reg;
u16 eeprom; u16 eeprom;
u8 criterion; u8 criterion;
u8 eirp_txpower; u8 eirp_txpower;
...@@ -2539,11 +2538,13 @@ static u8 rt2800_compensate_txpower(struct rt2x00_dev *rt2x00dev, int is_rate_b, ...@@ -2539,11 +2538,13 @@ static u8 rt2800_compensate_txpower(struct rt2x00_dev *rt2x00dev, int is_rate_b,
* .11b data rate need add additional 4dbm * .11b data rate need add additional 4dbm
* when calculating eirp txpower. * when calculating eirp txpower.
*/ */
rt2800_register_read(rt2x00dev, TX_PWR_CFG_0, &reg); rt2x00_eeprom_read(rt2x00dev, EEPROM_TXPOWER_BYRATE + 1,
criterion = rt2x00_get_field32(reg, TX_PWR_CFG_0_6MBS); &eeprom);
criterion = rt2x00_get_field16(eeprom,
EEPROM_TXPOWER_BYRATE_RATE0);
rt2x00_eeprom_read(rt2x00dev, rt2x00_eeprom_read(rt2x00dev, EEPROM_EIRP_MAX_TX_POWER,
EEPROM_EIRP_MAX_TX_POWER, &eeprom); &eeprom);
if (band == IEEE80211_BAND_2GHZ) if (band == IEEE80211_BAND_2GHZ)
eirp_txpower_criterion = rt2x00_get_field16(eeprom, eirp_txpower_criterion = rt2x00_get_field16(eeprom,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册