Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78693
b: refs/heads/master
c: fa44327
h: refs/heads/master
i:
  78691: 60ef460
v: v3
  • Loading branch information
Stefano Brivio authored and David S. Miller committed Jan 28, 2008
1 parent 46fe5a2 commit b6ff7ba
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 19 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: ca5fbca924b845863ab9da00ac90b3384445f497
refs/heads/master: fa44327c06492c9bd625dbc8dbe35e5d5965fec6
34 changes: 16 additions & 18 deletions trunk/net/mac80211/rc80211_pid_algo.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,29 +74,27 @@ static int rate_control_pid_shift_adjust(struct rc_pid_rateinfo *r,
{
int i, j, k, tmp;

if (cur + adj < 0)
return 0;
if (cur + adj >= l)
return l - 1;
j = r[cur].rev_index;
i = j + adj;

i = r[cur + adj].rev_index;
if (i < 0)
return r[0].index;
if (i >= l - 1)
return r[l - 1].index;

j = r[cur].rev_index;
tmp = i;

if (adj < 0) {
tmp = i;
for (k = j; k >= i; k--)
if (r[k].diff <= r[j].diff)
tmp = k;
return r[tmp].index;
} else if (adj > 0) {
tmp = i;
for (k = i + 1; k + i < l; k++)
if (r[k].diff <= r[i].diff)
tmp = k;
return r[tmp].index;
for (k = j; k >= i; k--)
if (r[k].diff <= r[j].diff)
tmp = k;
} else {
for (k = i + 1; k + i < l; k++)
if (r[k].diff <= r[i].diff)
tmp = k;
}
return cur + adj;

return r[tmp].index;
}

static void rate_control_pid_adjust_rate(struct ieee80211_local *local,
Expand Down

0 comments on commit b6ff7ba

Please sign in to comment.