From: Johannes Berg <johannes@sipsolutions.net>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: linux-wireless Mailing List <linux-wireless@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
"John W. Linville" <linville@tuxdriver.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH v2] mac80211: add assoc beacon timeout logic
Date: Mon, 11 Nov 2013 18:01:11 +0100 [thread overview]
Message-ID: <1384189271.14334.49.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CAMP44s0Lsd2qMf3a-Vx4=HTd_UxzLVC6q1bAGPr+t6anubNknA@mail.gmail.com> (sfid-20131111_175658_138899_90A747C6)
On Mon, 2013-11-11 at 10:56 -0600, Felipe Contreras wrote:
> On Mon, Nov 11, 2013 at 10:53 AM, Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
> > On Mon, Nov 11, 2013 at 10:41 AM, Johannes Berg
> > <johannes@sipsolutions.net> wrote:
> >> On Mon, 2013-11-11 at 10:23 -0600, Felipe Contreras wrote:
>
> >>> > This isn't really true like I said above - the kernel can only drop the
> >>> > association, if userspace *insists* then it will try again and again.
> >>>
> >>> But it's not doing this:
> >>>
> >>> ieee80211_destroy_assoc_data(sdata, false);
> >>> cfg80211_assoc_timeout(sdata->dev, bss);
> >>>
> >>> Which is what causes the association to stop for me.
> >>>
> >>> So where exactly in the code is the association being "dropped"?
> >>
> >> This does get called in my setup.
> >
> > Yes, because your setup is receiving beacons.
> >
> > Check the code:
> >
> > if ((ifmgd->assoc_data->need_beacon && !ifmgd->have_beacon) ||
> > ieee80211_do_assoc(sdata)) {
> > struct cfg80211_bss *bss = ifmgd->assoc_data->bss;
> >
> > ieee80211_destroy_assoc_data(sdata, false);
> > cfg80211_assoc_timeout(sdata->dev, bss);
> > }
> >
> > If there's no beacon, cfg80211_assoc_timeout() is not called.
> >
> > I'm sure if you don't call ieee80211_rx_mgmt_beacon() at all you will
> > see the same behavior I see.
>
> My bad, actually the code that is not being called is:
>
> cfg80211_unlink_bss(local->hw.wiphy, assoc_data->bss);
>
> In ieee80211_do_assoc().
That's not really interesting though, it just deletes the scan entry. If
it was deleted, then the supplicant would just scan again and probably
retry the connection.
johannes
next prev parent reply other threads:[~2013-11-11 17:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-10 21:45 [PATCH v2] mac80211: add assoc beacon timeout logic Felipe Contreras
2013-11-11 6:41 ` Krishna Chaitanya
2013-11-11 11:01 ` Felipe Contreras
2013-11-11 9:08 ` Johannes Berg
2013-11-11 10:59 ` Felipe Contreras
2013-11-11 15:43 ` Johannes Berg
2013-11-11 16:23 ` Felipe Contreras
2013-11-11 16:41 ` Johannes Berg
2013-11-11 16:53 ` Felipe Contreras
2013-11-11 16:56 ` Felipe Contreras
2013-11-11 17:01 ` Johannes Berg [this message]
2013-11-11 17:00 ` Johannes Berg
2013-11-11 18:06 ` Felipe Contreras
2013-11-13 18:30 ` Johannes Berg
2013-11-14 10:44 ` Felipe Contreras
2013-11-27 6:44 ` Felipe Contreras
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=1384189271.14334.49.camel@jlt4.sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=davem@davemloft.net \
--cc=felipe.contreras@gmail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.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).