From: Johannes Berg <johannes@sipsolutions.net>
To: Jesse Sung <jesse.sung@canonical.com>,
Amitkumar Karwar <akarwar@marvell.com>,
Nishant Sarmukadam <nishants@marvell.com>,
Ilan Peer <ilan.peer@intel.com>
Cc: Anthony Wong <anthony.wong@canonical.com>,
Jason Yen <jason.yen@canonical.com>,
Terry.Wey@dell.com, linux-wireless@vger.kernel.org
Subject: Re: Commit 0711d638 breaks mwifiex
Date: Tue, 17 Oct 2017 11:51:30 +0200 [thread overview]
Message-ID: <1508233890.10607.70.camel@sipsolutions.net> (raw)
In-Reply-To: <CAH10aOifYo=g8oLC3D=QcmVw28EqNotxuNRsprJGNP5ceEYLag@mail.gmail.com> (sfid-20171017_110449_063483_9C0F4028)
Hi,
> While working on an issue that marvell module stops connecting to AP,
> bisect reveals that the issue starts to happen from commit 0711d638,
> which uses wdev->ssid_len instead of wdev->current_bss to determine
> if driver's .disconnect() should be called.
>
> It happens because mwifiex_cfg80211_connect() returns -EALREADY
> when it finds wdev->current_bss is valid:
>
> if (priv->wdev.current_bss) {
> [PRINT LOG]
> return -EALREADY;
> }
>
> This would make cfg80211_connect() set wdev->ssid_len to 0, and thus
> mwifiex_cfg80211_disconnect() won't be called by
> cfg80211_disconnect().
Hmm, none of this makes much sense to me right now.
Does mwifiex treat this -EALREADY as *keeping* an old connection, or
tearing it down entirely?
Because right now clearly cfg80211 assumes, on the one hand, that no
connection is kept (resetting ssid_len), but on the other hand it got
here with current_bss set - so perhaps we should reject that before in
cfg80211, rather than in mwifiex?
I think your fix is invalid because we then reset ssid_len and still
keep an old connection (current_bss) which will lead to strange nl80211
behaviour when getting interface data etc.
johannes
next prev parent reply other threads:[~2017-10-17 9:51 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 [this message]
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
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=1508233890.10607.70.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=Terry.Wey@dell.com \
--cc=akarwar@marvell.com \
--cc=anthony.wong@canonical.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).