From: Stefano Brivio <stefano.brivio@polimi.it>
To: "John W. Linville" <linville@tuxdriver.com>,
Larry Finger <larry.finger@lwfinger.net>
Cc: "linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
Mattias Nissler <mattias.nissler@gmx.de>
Subject: [PATCH 1/2] rc80211-pid: fix adjusted index check
Date: Sat, 26 Jan 2008 04:02:17 +0100 [thread overview]
Message-ID: <20080126040217.7c5d2928@morte> (raw)
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
next reply other threads:[~2008-01-26 3:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-26 3:02 Stefano Brivio [this message]
2008-01-27 19:37 ` [PATCH 1/2] rc80211-pid: fix adjusted index check Stefano Brivio
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080126040217.7c5d2928@morte \
--to=stefano.brivio@polimi.it \
--cc=larry.finger@lwfinger.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mattias.nissler@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).