linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Brian Norris <briannorris@chromium.org>
Cc: Jesse Sung <jesse.sung@canonical.com>,
	Amitkumar Karwar <akarwar@marvell.com>,
	Nishant Sarmukadam <nishants@marvell.com>,
	Ilan Peer <ilan.peer@intel.com>,
	Anthony Wong <anthony.wong@canonical.com>,
	Jason Yen <jason.yen@canonical.com>,
	Terry.Wey@dell.com, linux-wireless@vger.kernel.org,
	Ganapathi Bhat <gbhat@marvell.com>
Subject: Re: Commit 0711d638 breaks mwifiex
Date: Fri, 27 Oct 2017 22:10:34 +0200	[thread overview]
Message-ID: <1509135034.2283.8.camel@sipsolutions.net> (raw)
In-Reply-To: <20171026211313.GA46251@google.com> (sfid-20171026_231319_253350_7EC09DC5)

Hi,

> IIUC, mwifiex hasn't told the firmware to do anything at this point --
> the -EALREADY check is practically the first thing it does within
> connect(). So it just quits the connect() request and tries to carry on
> as usual. It will only do something different if the upper layers tell
> it to do so afterward (e.g., calling disconnect()).

Yeah, that makes sense.

> Yes, that's definitely what's happening. And it's explicitly called out
> in the supplicant's nl80211 driver that this is intentional:
> 
> [...]

Right.

> This is the main code path for supplicant commands like "Reattach",
> which boil down to (for non SME drivers):
> 
> wpas_request_connection()
>   ...
>  -> wpa_supplicant_connect()
>    -> wpa_supplicant_associate()
>      -> wpas_start_assoc_cb()
>        -> wpa_drv_associate()
>          -> wpa_driver_nl80211_associate()
>            -> wpa_driver_nl80211_connect()
> 
> Now for the part I'm not so familiar with: is this really the *expected*
> flow for full-MAC drivers in reattach, reassociate, and roaming flows?
> All of those seem to boil down to this same connect() (and fallback to
> disconnect()+connect() if -EALREADY) flow.

We never implemented a "ROAM" command, so there's not all that much
choice.

> But it doesn't seem like all full-MAC drivers do the same thing. Some
> seem to just blaze ahead with a connect attempt (maybe some firmwares
> automatically interpret this for us?) and never return -EALREADY at all.

Agree, some seem to just do some form of roaming on this, which really
just means they disconnect internally - or perhaps they even try to
roam if it's the same network?

> Sorry if this is slightly off-topic, but I'm trying to understand what
> the general expectations are here, based on my relatively narrow
> experience with a few drivers.

I don't really know either! There aren't that many direct cfg80211
drivers that don't use mac80211, so there's not that much experience.

You're probably well positioned to say what the behaviour _should_ be
though? :-)

I tend to think we should actually do the EALREADY from cfg80211, so
that wpa_s will always be forced to go through this roundabout code
path, but also finally implement a ROAM command, to let drivers have
that option?

Note also that we've always sort of envisioned that drivers
implementing CONNECT would do BSS selection themselves, but I think
there's no automatic way of doing that with wpa_s, and it may not even
be desirable in many cases (unless you really need the power saving
advantage) since it gets us into a situation where we have all these
different algorithms etc.

johannes

  reply	other threads:[~2017-10-27 20:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17  9:04 Commit 0711d638 breaks mwifiex Jesse Sung
2017-10-17  9:51 ` Johannes Berg
2017-10-17 10:18   ` Jesse Sung
2017-10-17 10:48     ` Johannes Berg
2017-10-17 13:07       ` Jesse Sung
2017-10-17 13:13         ` Johannes Berg
2017-10-17 14:08           ` Jesse Sung
2017-10-17 14:10             ` Jesse Sung
2017-10-17 15:10               ` Johannes Berg
2017-10-17 15:25                 ` Jesse Sung
2017-10-26 21:13       ` Brian Norris
2017-10-27 20:10         ` Johannes Berg [this message]
2017-10-28 21:32           ` Arend van Spriel

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=1509135034.2283.8.camel@sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=Terry.Wey@dell.com \
    --cc=akarwar@marvell.com \
    --cc=anthony.wong@canonical.com \
    --cc=briannorris@chromium.org \
    --cc=gbhat@marvell.com \
    --cc=ilan.peer@intel.com \
    --cc=jason.yen@canonical.com \
    --cc=jesse.sung@canonical.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nishants@marvell.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;
as well as URLs for NNTP newsgroup(s).