* [PATCH 1/2] rc80211-pid: fix adjusted index check
@ 2008-01-26 3:02 Stefano Brivio
2008-01-27 19:37 ` Stefano Brivio
0 siblings, 1 reply; 2+ messages in thread
From: Stefano Brivio @ 2008-01-26 3:02 UTC (permalink / raw)
To: John W. Linville, Larry Finger
Cc: linux-wireless@vger.kernel.org, Mattias Nissler
Compare adjusted indices with real mac80211 indices instead of internal ones
while checking them.
Signed-off-by: Stefano Brivio <stefano.brivio@polimi.it>
---
John, not sure if this fixes the bug Larry reported, but should applied
anyway.
Index: wireless-2.6/net/mac80211/rc80211_pid_algo.c
===================================================================
--- wireless-2.6.orig/net/mac80211/rc80211_pid_algo.c
+++ wireless-2.6/net/mac80211/rc80211_pid_algo.c
@@ -78,8 +78,13 @@ static int rate_control_pid_shift_adjust
i = j + adj;
if (i < 0)
+ i = r[0].rev_index;
+ if (i > l - 1)
+ i = r[l - 1].rev_index;
+
+ if (r[i].index <= 0)
return r[0].index;
- if (i >= l - 1)
+ if (r[i].index >= l - 1)
return r[l - 1].index;
tmp = i;
--
Ciao
Stefano
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-27 19:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-26 3:02 [PATCH 1/2] rc80211-pid: fix adjusted index check Stefano Brivio
2008-01-27 19:37 ` Stefano Brivio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).