Failed to connect an AP vai WPS on kernel >= 3.11

Jouni Malinen j at w1.fi
Fri Aug 28 05:38:02 EDT 2015


On Wed, Aug 26, 2015 at 02:26:01PM +0000, Vinayak Kamath wrote:
> In this scenario "locally_generated" flag will not be true as NL80211_ATTR_DISCONNECTED_BY_AP is present and hence supplicant thinks it as genuine disconnect from driver.
> 
> wlan driver should  call "cfg80211_disconnected()"in any case  ie. driver calls cfg80211_disconnected() even if AP sends disassoc frame or  even in case disconnect process is initiated by wpa_supplicant.

Sure, but why would the driver indicate that the disconnection was not
locally_generated when handling a case that was initiated by
wpa_supplicant?

Is this specific version of the driver source code available somewhere
or can you at least note what are the exact arguments passed to
cfg80211_disconnected() in the case where disconnection happens due to a
request from wpa_supplicant? I'm particularly interested in what the
locally_generated parameter is in that case since that determines
whether NL80211_ATTR_DISCONNECTED_BY_AP is added..

> Otherwise there will be warning thrown by cfg80211 while unloading wlan driver.  Below is the kernel commit which enforce the wlan driver to do so.
> 
> http://kernel.suse.com/cgit/kernel/commit/?id=f9bef3df52fe61067e4c1c6cfb2037cb6b259a6a

Well.. That is just enforcing proper cleanup, but anyway, yes, the
driver should indicate disconnections regardless of whether this commit
is in place.

> I am attaching fail log to this mail. Please find the attachment.
> Line of interest given below:
> 08-26 11:11:05.211 W/wpa_supplicant( 1755): nl80211: Was expecting local disconnect but got another disconnect event first.

What happened after this? The log ends at that millisecond.. In any
case, there was a wpa_supplicant initiated disconnection request with
reason code 3 at 11:11:05.159, so I'm assuming this
NL80211_CMD_DISCONNECT event at 11:11:05.211 being based on that. If so,
it looks like the driver is reporting this incorrectly in the
cfg80211_disconnected() call unless there was a race condition and the
AP had sent out Deauthentication/Disassociation frame with reason code 3
and that frame happened to be processed prior to the local
NL80211_CMD_DISCONNECT command.

-- 
Jouni Malinen                                            PGP id EFC895FA


More information about the HostAP mailing list