From: Mattias Nissler <mattias.nissler@gmx.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "John W. Linville" <linville@tuxdriver.com>,
Stefano Brivio <stefano.brivio@polimi.it>,
linux-wireless@vger.kernel.org
Subject: Re: [patch 1/9] mac80211: Clean up rate selection code
Date: Tue, 18 Dec 2007 20:12:34 +0100 [thread overview]
Message-ID: <1198005154.7553.5.camel@localhost> (raw)
In-Reply-To: <1197983844.4885.128.camel@johannes.berg>
On Tue, 2007-12-18 at 14:17 +0100, Johannes Berg wrote:
> > > > + /* If a forced rate is in effect, select it. */
> > > > + sdata = IEEE80211_DEV_TO_SUB_IF(dev);
> > > > + if (sdata->bss && sdata->bss->force_unicast_rateidx > -1)
> > > > + sel->rate = &mode->rates[sdata->bss->force_unicast_rateidx];
> > > > +
> > > > + /* If we haven't found the rate yet, ask the rate control algo. */
> > > > + if (!sel->rate)
> > > > + ref->ops->get_rate(ref->priv, dev, mode, skb, sel);
> > >
> > > Maybe after this we should insert
> > >
> > > if (unlikely(!sel->rate)) {
> > > WARN_ON(1);
> > > sel->rate = rate_lowest(...);
> > > }
> > >
> > > Not sure though.
> >
> > I don't think we need this. Rate control is supposed to select a rate,
> > if it doesn't know it can assign a fallback rate itself.
>
> Obviously. I just thought we could protect against buggy rate control
> algorithm code that way. Not really necessary though.
If it's buggy, it should be fixed. So it's actually better to fail
dramatically ;-)
Mattias
next prev parent reply other threads:[~2007-12-18 19:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071217012517.882216322@gmx.de>
[not found] ` <20071217012549.932807027@gmx.de>
2007-12-17 11:46 ` [patch 1/9] mac80211: Clean up rate selection code Johannes Berg
2007-12-17 21:07 ` Mattias Nissler
2007-12-18 13:17 ` Johannes Berg
2007-12-18 19:12 ` Mattias Nissler [this message]
[not found] ` <20071217012550.045470580@gmx.de>
2007-12-17 11:48 ` [patch 2/9] iwlwifi: Resync rate control code with mac80211 Johannes Berg
2007-12-17 21:07 ` Mattias Nissler
[not found] ` <20071217012550.127484236@gmx.de>
2007-12-17 11:50 ` [patch 3/9] mac80211: Add PID controller based rate control algorithm Johannes Berg
2007-12-17 21:08 ` Mattias Nissler
2007-12-18 12:50 ` Johannes Berg
[not found] ` <20071217012550.464889334@gmx.de>
2007-12-17 11:57 ` [patch 7/9] mac80211: Dump rc80211_pid events to debugfs Johannes Berg
2007-12-17 21:09 ` Mattias Nissler
[not found] ` <20071217012550.634829179@gmx.de>
2007-12-17 12:02 ` [patch 9/9] mac80211: Publish rc80211_pid parameters in debugfs Johannes Berg
2007-12-17 21:09 ` Mattias Nissler
[not found] ` <20071217012550.213561122@gmx.de>
2007-12-17 11:52 ` [patch 4/9] mac80211: Make PID rate control algorithm the default Johannes Berg
2007-12-17 21:12 ` Mattias Nissler
2007-12-17 15:02 ` John W. Linville
2007-12-17 20:06 ` Stefano Brivio
2007-12-17 20:41 ` John W. Linville
2007-12-17 21:16 ` Stefano Brivio
2007-12-18 12:49 ` Johannes Berg
2007-12-18 20:01 ` Mattias Nissler
2007-12-19 16:05 ` Johannes Berg
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=1198005154.7553.5.camel@localhost \
--to=mattias.nissler@gmx.de \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=stefano.brivio@polimi.it \
/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).