From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: Luis Rodriguez <Luis.Rodriguez@Atheros.com>,
"linville@tuxdriver.com" <linville@tuxdriver.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
"stable@kernel.org" <stable@kernel.org>, Jouni Malinen <j@w1.fi>,
Paul Stewart <pstew@google.com>,
Amod Bodas <Amod.Bodas@Atheros.com>,
Vasanth Thiagarajan <Vasanth.Thiagarajan@Atheros.com>
Subject: Re: [PATCH v2 2/3] mac80211: wait until completely disassociated before new association
Date: Mon, 4 Oct 2010 09:36:05 -0700 [thread overview]
Message-ID: <20101004163605.GC2105@tux> (raw)
In-Reply-To: <1286198080.3620.34.camel@jlt3.sipsolutions.net>
On Mon, Oct 04, 2010 at 06:14:40AM -0700, Johannes Berg wrote:
> On Fri, 2010-10-01 at 16:33 -0400, Luis R. Rodriguez wrote:
>
> > @@ -936,7 +936,6 @@ static void ieee80211_set_disassoc(struct ieee80211_sub_if_data *sdata,
> >
> > memcpy(bssid, ifmgd->associated->bssid, ETH_ALEN);
> >
> > - ifmgd->associated = NULL;
> > memset(ifmgd->bssid, 0, ETH_ALEN);
> >
> > /*
>
> You need to read this comment and the one below it :-)
Missed that.. thanks.
> > @@ -513,6 +513,19 @@ ieee80211_associate(struct ieee80211_work *wk)
> > {
> > struct ieee80211_sub_if_data *sdata = wk->sdata;
> > struct ieee80211_local *local = sdata->local;
> > + struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
> > + bool associated;
> > +
> > + mutex_lock(&ifmgd->mtx);
> > + associated = !!ifmgd->associated;
> > + mutex_unlock(&ifmgd->mtx);
> > +
> > + if (associated) {
> > + printk(KERN_DEBUG "%s: delaying association with %pM as "
> > + "we are still associated",
> > + sdata->name, wk->filter_ta);
> > + goto wait;
> > + }
> >
> > wk->assoc.tries++;
> > if (wk->assoc.tries > IEEE80211_ASSOC_MAX_TRIES) {
> > @@ -534,6 +547,7 @@ ieee80211_associate(struct ieee80211_work *wk)
> > sdata->name, wk->filter_ta, wk->assoc.tries);
> > ieee80211_send_assoc(sdata, wk);
> >
> > +wait:
> > wk->timeout = jiffies + IEEE80211_ASSOC_TIMEOUT;
> > run_again(local, wk->timeout);
>
> But you'll be staying off-channel for the wait period, so what does this
> really help?
I totally missed this what locks us offchannel here, I though we just re-arm
the timer, and come back offchannel at a later time. What is it that locks
us offchannel until the timer runs again?
Luis
next prev parent reply other threads:[~2010-10-04 16:36 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-01 20:33 [PATCH v2 0/3] mac80211: fix rate_control_send_low warnings for delbas Luis R. Rodriguez
2010-10-01 20:33 ` [PATCH v2 1/3] mac80211: fix channel assumption for association done work Luis R. Rodriguez
2010-10-04 13:12 ` Johannes Berg
2010-10-01 20:33 ` [PATCH v2 2/3] mac80211: wait until completely disassociated before new association Luis R. Rodriguez
2010-10-04 13:14 ` Johannes Berg
2010-10-04 16:36 ` Luis R. Rodriguez [this message]
2010-10-04 16:39 ` Johannes Berg
2010-10-04 18:04 ` Luis R. Rodriguez
2010-10-04 18:44 ` Johannes Berg
2010-10-04 20:55 ` Luis R. Rodriguez
2010-10-05 7:59 ` Johannes Berg
2010-10-05 19:36 ` Luis R. Rodriguez
2010-10-05 19:43 ` Johannes Berg
2010-10-01 20:33 ` [PATCH v2 3/3] mac80211: move to the home channel for disassociation when roaming Luis R. Rodriguez
2010-10-04 13:15 ` Johannes Berg
2010-10-04 16:38 ` Luis R. Rodriguez
2010-10-04 16:41 ` Johannes Berg
2010-10-04 17:23 ` Luis R. Rodriguez
2010-10-04 18:39 ` Johannes Berg
2010-10-04 21:03 ` Luis R. Rodriguez
2010-10-01 20:50 ` [PATCH v2 0/3] mac80211: fix rate_control_send_low warnings for delbas Luis R. Rodriguez
2010-10-04 13:27 ` Johannes Berg
2010-10-04 16:41 ` Luis R. Rodriguez
2010-10-04 16:42 ` Johannes Berg
2010-10-04 17:25 ` Luis R. Rodriguez
2010-10-04 17:30 ` Johannes Berg
2010-10-04 17:35 ` Luis R. Rodriguez
2010-10-04 18:39 ` Johannes Berg
2010-10-04 20:39 ` Jouni Malinen
2010-10-04 21:07 ` Luis R. Rodriguez
2010-10-04 22:47 ` Jouni Malinen
2010-10-04 23:50 ` Luis R. Rodriguez
2010-10-05 7:57 ` Johannes Berg
2010-10-05 17:03 ` Luis R. Rodriguez
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=20101004163605.GC2105@tux \
--to=lrodriguez@atheros.com \
--cc=Amod.Bodas@Atheros.com \
--cc=Luis.Rodriguez@Atheros.com \
--cc=Vasanth.Thiagarajan@Atheros.com \
--cc=j@w1.fi \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=pstew@google.com \
--cc=stable@kernel.org \
/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).