All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mattias Nissler <mattias.nissler@gmx.de>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Stefano Brivio <stefano.brivio@polimi.it>,
	"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH 1/4] mac80211: Clean up rate selection
Date: Sat, 08 Dec 2007 12:33:35 +0100	[thread overview]
Message-ID: <1197113615.7472.56.camel@localhost> (raw)
In-Reply-To: <1197113375.4171.50.camel@johannes.berg>


On Sat, 2007-12-08 at 12:29 +0100, Johannes Berg wrote:
> > +	/* Send management frames and broadcast/multicast data using lowest
> > +	 * rate. */
> > +	fc = le16_to_cpu(hdr->frame_control);
> > +	if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA ||
> > +	    (hdr->addr1[0] & 0x01))
> > +		sel->rate = rate_lowest(local, mode, sta);
> 
> I'm not sure but I don't think we want this. And you should use
> is_multicast_addr() or whatever it's called.

This piece comes directly from the old "simple" algo. You're right about
is_multicast_addr. I agree this is something we might to get rid of, but
I leave that decision to you.

> 
> > +	/* 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];
> 
> That's good.
> 
> > +	/* 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);
> 
> > +	/* Select a non-ERP backup rate. */
> > +	if (!sel->nonerp) {
> > +		for (i = 0; i < mode->num_rates - 1; i++) {
> > +			struct ieee80211_rate *rate = &mode->rates[i];
> > +			if (sel->rate->rate < rate->rate)
> > +				break;
> > +
> > +			if (rate_supported(sta, mode, i) &&
> > +			    !(rate->flags & IEEE80211_RATE_ERP))
> > +				sel->nonerp = rate;
> > +		}
> > +	}
> 
> That I'm not sure about. This is the fallback rate?

Yes. It's after the get_rate() call so the algorithm can override it.
But if it doesn't we compute it ourselves.

Mattias


  reply	other threads:[~2007-12-08 11:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1197112439.7472.34.camel@localhost>
2007-12-08 11:21 ` [PATCH 1/4] mac80211: Clean up rate selection Mattias Nissler
2007-12-08 11:29   ` Johannes Berg
2007-12-08 11:33     ` Mattias Nissler [this message]
2007-12-08 11:36       ` Mattias Nissler
2007-12-08 11:36       ` Johannes Berg
2007-12-08 11:45         ` Mattias Nissler
2007-12-08 11:56           ` Johannes Berg
2007-12-08 11:21 ` [PATCH 2/4] iwlwifi: Update to changed mac80211 rate control interface Mattias Nissler
2007-12-08 13:19   ` Stefano Brivio
2007-12-11 21:10     ` mohamed salim abbas
2007-12-11 21:19       ` Michael Buesch
2007-12-11 21:48       ` Stefano Brivio
2007-12-11 21:54       ` Mattias Nissler
2007-12-08 11:21 ` [PATCH 3/4] mac80211: Add PID TX rate control algorithm Mattias Nissler
2007-12-08 11:21 ` [PATCH 4/4] mac80211: Make PID rate control the default and remove rc80211_simple Mattias Nissler

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=1197113615.7472.56.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.