Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 377383
b: refs/heads/master
c: 8c8d201
h: refs/heads/master
i:
  377381: 8ec28d8
  377379: 02f2107
  377375: 1fb4f79
v: v3
  • Loading branch information
Stanislaw Gruszka authored and John W. Linville committed Jun 12, 2013
1 parent d87e95a commit 318451e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 541e667e1c0f31a7e11d909eb831cf476814a201
refs/heads/master: 8c8d2017ba25c510ddf093419048460db1109bc4
29 changes: 18 additions & 11 deletions trunk/drivers/net/wireless/rt2x00/rt2800lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -3027,19 +3027,26 @@ static void rt2800_config_txpower(struct rt2x00_dev *rt2x00dev,
* TODO: we do not use +6 dBm option to do not increase power beyond
* regulatory limit, however this could be utilized for devices with
* CAPABILITY_POWER_LIMIT.
*
* TODO: add different temperature compensation code for RT3290 & RT5390
* to allow to use BBP_R1 for those chips.
*/
rt2800_bbp_read(rt2x00dev, 1, &r1);
if (delta <= -12) {
power_ctrl = 2;
delta += 12;
} else if (delta <= -6) {
power_ctrl = 1;
delta += 6;
} else {
power_ctrl = 0;
if (!rt2x00_rt(rt2x00dev, RT3290) &&
!rt2x00_rt(rt2x00dev, RT5390)) {
rt2800_bbp_read(rt2x00dev, 1, &r1);
if (delta <= -12) {
power_ctrl = 2;
delta += 12;
} else if (delta <= -6) {
power_ctrl = 1;
delta += 6;
} else {
power_ctrl = 0;
}
rt2x00_set_field8(&r1, BBP1_TX_POWER_CTRL, power_ctrl);
rt2800_bbp_write(rt2x00dev, 1, r1);
}
rt2x00_set_field8(&r1, BBP1_TX_POWER_CTRL, power_ctrl);
rt2800_bbp_write(rt2x00dev, 1, r1);

offset = TX_PWR_CFG_0;

for (i = 0; i < EEPROM_TXPOWER_BYRATE_SIZE; i += 2) {
Expand Down

0 comments on commit 318451e

Please sign in to comment.