Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Stefano Brivio <stefano.brivio@xxxxxxxxx>
---
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
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux