Linux wireless drivers development
 help / color / mirror / Atom feed
From: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
To: ext Johannes Berg <johannes@sipsolutions.net>
Cc: "linville@tuxdriver.com" <linville@tuxdriver.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: Re: [RFC 3/3] mac80211: Store basic rates for bss when joining ibss network
Date: Wed, 09 Jun 2010 07:45:14 +0300	[thread overview]
Message-ID: <1276058714.495.35.camel@paavo-desktop> (raw)
In-Reply-To: <1276001318.3706.130.camel@jlt3.sipsolutions.net>

On Tue, 2010-06-08 at 14:48 +0200, ext Johannes Berg wrote:
> On Tue, 2010-06-08 at 15:34 +0300, Teemu Paasikivi wrote:
> > When joinig a ibss network, basic rates for bss were not stored. When
> > network was self created, leaving and (re)joining same network has
> > caused basic rates to be left unset. With this patch stored values are
> > used.
> 
> >  	bss = cfg80211_inform_bss_frame(local->hw.wiphy, local->hw.conf.channel,
> >  					mgmt, skb->len, 0, GFP_KERNEL);
> > +
> > +	ibss = (struct ieee80211_bss *)(bss->priv);
> 
> Watch out -- bss can be NULL here if memory allocation fails. It's just
> that put_bss(NULL) is valid.
> 

That's correct. My fault, how could I miss that? Obviously easily.


> > +	for (i = 0; i < sband->n_bitrates; i++) {
> > +		u8 basic = 0x00;
> > +		if (basic_rates & BIT(i))
> > +			basic = 0x80;
> > +
> > +		ibss->supp_rates[i] = supp_rates[i] | basic;
> > +	}
> > +
> > +	ibss->supp_rates_len = i;
> > +
> >  	cfg80211_put_bss(bss);
> 
> 
> However this kinda confuses me.
> 
> We had a long-standing TODO item on our list at
> http://wireless.kernel.org/en/developers/todo-list
> 
> "when leaving an IBSS and we were the only member, remove it from
> cfg80211's BSS list"
> 
> Maybe that would help here too?
> 

Yes, I think that would propably solve that issue where IBSS was
recreated and requested basic rates are changed.

> However I don't understand the scenario anyway. If you create an IBSS,
> you start beaconing and tell cfg80211 about it with a frame that
> includes the supported and basic rates. Then you leave, but the BSS
> stays around in cfg80211 for 15 seconds. If you re-join within those 15
> seconds, the scan results will pick up the old IBSS that no longer
> exists, and we "join" it rather than creating it.
> 
> However -- joining it will take the basic rates from it. So wouldn't you
> get the old basic rates which is fine? What do you mean by "left unset"?
> 

By "left unset" I mean that in the sniffer logs there's no rates marked
as basic rates in the beacons. No old ones or new ones.

> What happens if you join an IBSS that already exists?
> 

It works, but I haven't captured what's in the air. That's one reason
why I sent these patches as RFC.



Teemu



  reply	other threads:[~2010-06-09  4:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08 12:34 [RFC 0/3] mac80211: Add support for configuring ibss basic rates Teemu Paasikivi
2010-06-08 12:34 ` [RFC 1/3] mac80211: Set basic rates while joining ibss network Teemu Paasikivi
2010-06-08 12:34   ` [RFC 2/3] mac80211: Set changed basic rates flag Teemu Paasikivi
2010-06-08 12:34     ` [RFC 3/3] mac80211: Store basic rates for bss when joining ibss network Teemu Paasikivi
2010-06-08 12:48       ` Johannes Berg
2010-06-09  4:45         ` Teemu Paasikivi [this message]
2010-06-09  7:36           ` Johannes Berg
2010-06-10 11:37             ` Teemu Paasikivi

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=1276058714.495.35.camel@paavo-desktop \
    --to=ext-teemu.3.paasikivi@nokia.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /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