Skip to contentSkip to conversation

rc80211-pid: fix adjusted index check

PATCH In review Stefano Brivio 1 participant 2 messages Jan 26, 2008 – Jan 27, 2008 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 rc80211-pid: fix adjusted index check

Compare adjusted indices with real mac80211 indices instead of internal ones while checking them.

---
John, not sure if this fixes the bug Larry reported, but should applied anyway.

net/mac80211/rc80211_pid_algo.c +6 -1
Index: 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;
Signature · 2 lines
Ciao
Stefano
#1 lore raw
Quoted 7 lines · On Sat, 26 Jan 2008 04:02:17 +0100 Stefano Brivio <[email protected]>…

Compare adjusted indices with real mac80211 indices instead of internal ones while checking them.

---
John, not sure if this fixes the bug Larry reported, but should applied anyway.

John, please discard this as well.

Signature · 2 lines
Ciao
Stefano