linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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: Mon, 17 Dec 2007 22:07:33 +0100	[thread overview]
Message-ID: <1197925653.7505.13.camel@localhost> (raw)
In-Reply-To: <1197892019.4885.16.camel@johannes.berg>


On Mon, 2007-12-17 at 12:46 +0100, Johannes Berg wrote:
> Looks good, minor comment below.
> 
> > +void rate_control_get_rate(struct net_device *dev,
> > +			   struct ieee80211_hw_mode *mode, struct sk_buff *skb,
> > +			   struct rate_selection *sel)
> 
> > +	fc = le16_to_cpu(hdr->frame_control);
> > +	if ((fc & IEEE80211_FCTL_FTYPE) != IEEE80211_FTYPE_DATA ||
> > +	    (hdr->addr1[0] & 0x01))
> 
> Please use is_multicast_ether_addr()

Sure, we had that before. Seems Stefano gave me an old patch. Sorry
about this.

> 
> > +	/* 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.

Mattas


  reply	other threads:[~2007-12-17 21:07 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 [this message]
2007-12-18 13:17       ` Johannes Berg
2007-12-18 19:12         ` Mattias Nissler
     [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.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
     [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

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=1197925653.7505.13.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).