Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 145265
b: refs/heads/master
c: 875690c
h: refs/heads/master
i:
  145263: 1fe1be9
v: v3
  • Loading branch information
Fabio Rossi authored and John W. Linville committed May 20, 2009
1 parent 508ac4b commit 17b958d
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 22 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: fbc9f97bbf5e1eaee562eba93dc60faaff3f3bfa
refs/heads/master: 875690c378d64d9ee2de15cad8206d3f11ae5096
49 changes: 28 additions & 21 deletions trunk/drivers/net/wireless/ath5k/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1487,28 +1487,35 @@ ath5k_get_linear_pcdac_min(const u8 *stepL, const u8 *stepR,
{
s8 tmp;
s16 min_pwrL, min_pwrR;
s16 pwr_i = pwrL[0];

do {
pwr_i--;
tmp = (s8) ath5k_get_interpolated_value(pwr_i,
pwrL[0], pwrL[1],
stepL[0], stepL[1]);

} while (tmp > 1);

min_pwrL = pwr_i;

pwr_i = pwrR[0];
do {
pwr_i--;
tmp = (s8) ath5k_get_interpolated_value(pwr_i,
pwrR[0], pwrR[1],
stepR[0], stepR[1]);

} while (tmp > 1);
s16 pwr_i;

if (pwrL[0] == pwrL[1])
min_pwrL = pwrL[0];
else {
pwr_i = pwrL[0];
do {
pwr_i--;
tmp = (s8) ath5k_get_interpolated_value(pwr_i,
pwrL[0], pwrL[1],
stepL[0], stepL[1]);
} while (tmp > 1);

min_pwrL = pwr_i;
}

min_pwrR = pwr_i;
if (pwrR[0] == pwrR[1])
min_pwrR = pwrR[0];
else {
pwr_i = pwrR[0];
do {
pwr_i--;
tmp = (s8) ath5k_get_interpolated_value(pwr_i,
pwrR[0], pwrR[1],
stepR[0], stepR[1]);
} while (tmp > 1);

min_pwrR = pwr_i;
}

/* Keep the right boundary so that it works for both curves */
return max(min_pwrL, min_pwrR);
Expand Down

0 comments on commit 17b958d

Please sign in to comment.