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: [PATCH 3/3] mac80211: remove BSS from cfg80211 list when leaving IBSS
Date: Mon, 14 Jun 2010 10:16:45 +0300 [thread overview]
Message-ID: <1276499805.4314.16.camel@paavo-desktop> (raw)
In-Reply-To: <1276497207.3926.9.camel@jlt3.sipsolutions.net>
On Mon, 2010-06-14 at 08:33 +0200, ext Johannes Berg wrote:
> On Mon, 2010-06-14 at 09:15 +0300, Teemu Paasikivi wrote:
> > Remove BSS from cfg80211 BSS list if we are only member in IBSS when
> > leaving it.
> >
> > Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
> > ---
> > net/mac80211/ibss.c | 33 +++++++++++++++++++++++++++++++++
> > 1 files changed, 33 insertions(+), 0 deletions(-)
> >
> > diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
> > index ff91265..6d5489b 100644
> > --- a/net/mac80211/ibss.c
> > +++ b/net/mac80211/ibss.c
> > @@ -969,6 +969,39 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
> > {
> > struct sk_buff *skb;
> >
> > + struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
>
> remove that empty live please
>
> > + struct ieee80211_local *local = sdata->local;
> > + struct cfg80211_bss *cbss;
> > + struct ieee80211_channel *chan = NULL;
> > + const u8 *bssid = NULL;
> > + u16 capability;
> > + int active_ibss = 0;
> > +
> > +
> > + active_ibss = ieee80211_sta_active_ibss(sdata);
> > +
> > + if (!active_ibss) {
> > + capability = WLAN_CAPABILITY_IBSS;
> > + if (ifibss->privacy)
> > + capability |= WLAN_CAPABILITY_PRIVACY;
> > + if (ifibss->fixed_bssid)
> > + bssid = ifibss->bssid;
>
> Don't we update ifibss->bssid even if it's not fixed?
>
> > + if (ifibss->fixed_channel)
> > + chan = ifibss->channel;
>
> > + if (!is_zero_ether_addr(ifibss->bssid))
> > + bssid = ifibss->bssid;
>
> I guess we do, but can it really ever be zeroed? Or does that happen
> when we haven't even joined yet? But in that case you'd pass a NULL
> bssid into get_bss() which would return a random one ... shouldn't you
> rather not do anything in that case? Like making the first condition
>
> if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) {
>
>
> and then never worry about the bssid again?
>
> johannes
>
Valid points. Back to the drawing board. I'll rework this a little bit.
Teemu
next prev parent reply other threads:[~2010-06-14 7:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-14 6:15 [PATCH 0/3] mac80211: Add support for configuring ibss basic rates Teemu Paasikivi
2010-06-14 6:15 ` [PATCH 1/3] mac80211: Set basic rates while joining ibss network Teemu Paasikivi
2010-06-14 6:15 ` [PATCH 2/3] mac80211: Set changed basic rates flag Teemu Paasikivi
2010-06-14 6:15 ` [PATCH 3/3] mac80211: remove BSS from cfg80211 list when leaving IBSS Teemu Paasikivi
2010-06-14 6:33 ` Johannes Berg
2010-06-14 7:16 ` Teemu Paasikivi [this message]
2010-06-14 6:30 ` [PATCH 2/3] mac80211: Set changed basic rates flag Johannes Berg
2010-06-14 6:30 ` [PATCH 1/3] mac80211: Set basic rates while joining ibss network Johannes Berg
2010-06-14 6:48 ` 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=1276499805.4314.16.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