[PATCH] P2P: Ignore the DEAUTH event from cfg80211 incase of locally generated disconnect
jithu Jance
jithu
Tue May 28 06:41:03 PDT 2013
Hi Jouni,
With the fast association enabled supplicant, I see an additional
disassoc issue while doing a P2P/WPS connection. When EAP-FAILURE
happens, the DEAUTH event from cfg80211 is received after supplicant has
moved to ASSOCIATING state.
The wpa_supplicant_deauthenticate function sends disconnect command down
to the cfg80211/driver, generates the DEAUTH event locally and then
starts the connect process. Since now the supplicant has fast
association enabled, it moves to ASSOCIATING state pretty fast. Hence
the DEAUTH event from cfg80211 stack (as a result of nl80211_disconnect)
is received mostly after the supplicant has moved to ASSOCIATING state.
This results in an ASSOCIATING -> DISCONNECTED state change
unnecessarily.
Is it safe to ignore this DEAUTH event since the
wpa_supplicant_deathenticate function already generated a local DEAUTH
event? I have generated a patch adding an additional arg to
wpa_drv_deauthenticate ignore the deauth event. I haven't changed the
driver_* files other than driver_nl80211.c since I am not sure whether
changing the wpa_driver_ops interface is the right way. If the changes
are fine, I can generate a fresh patch including other driver_* files.
++++++++++++++++++++++++++++++++++++++++++++++ logs ++++++
05-28 09:13:00.915 I/wpa_supplicant(12913): p2p-p2p0-0: Trying to
associate with 0a:d4:2b:11:db:48 (SSID='DIRECT-AA-Android_6a0b'
freq=2437 MHz)
05-28 09:13:01.120 I/wpa_supplicant(12913): p2p-p2p0-0: Associated with
0a:d4:2b:11:db:48
05-28 09:13:01.135 I/wpa_supplicant(12913): p2p-p2p0-0:
CTRL-EVENT-EAP-STARTED EAP authentication started
05-28 09:13:01.145 I/wpa_supplicant(12913): p2p-p2p0-0:
CTRL-EVENT-EAP-PROPOSED-METHOD vendor=14122 method=1
05-28 09:13:01.145 I/wpa_supplicant(12913): p2p-p2p0-0:
CTRL-EVENT-EAP-METHOD EAP vendor 14122 method 1 (WSC) selected
05-28 09:13:01.320 I/wpa_supplicant(12913): p2p-p2p0-0:
WPS-CRED-RECEIVED
05-28 09:13:01.320 I/wpa_supplicant(12913): p2p-p2p0-0: WPS-SUCCESS
05-28 09:13:01.320 I/wpa_supplicant(12913): p2p0:
P2P-GROUP-FORMATION-SUCCESS
05-28 09:13:01.350 I/wpa_supplicant(12913): p2p-p2p0-0:
CTRL-EVENT-EAP-FAILURE EAP authentication failed
05-28 09:13:01.355 I/wpa_supplicant(12913): p2p-p2p0-0:
CTRL-EVENT-DISCONNECTED bssid=0a:d4:2b:11:db:48 reason=3
locally_generated=1 <============ locally generated at
wpa_supplicant_deauthenticate
05-28 09:13:01.360 I/wpa_supplicant(12913): p2p-p2p0-0: Trying to
associate with 0a:d4:2b:11:db:48 (SSID='DIRECT-AA-Android_6a0b'
freq=2437 MHz)
05-28 09:13:01.365 I/wpa_supplicant(12913): p2p-p2p0-0:
CTRL-EVENT-DISCONNECTED bssid=0a:d4:2b:11:db:48 reason=0
locally_generated=1 <============================= Event from cfg80211
stack
05-28 09:13:01.510 I/wpa_supplicant(12913): p2p-p2p0-0: Associated with
0a:d4:2b:11:db:48
05-28 09:13:01.875 I/wpa_supplicant(12913): p2p-p2p0-0: WPA: Key
negotiation completed with 0a:d4:2b:11:db:48 [PTK=CCMP GTK=CCMP]
05-28 09:13:01.875 I/wpa_supplicant(12913): p2p-p2p0-0:
CTRL-EVENT-CONNECTED - Connection to 0a:d4:2b:11:db:48 completed (auth)
[id=0 id_str=]
05-28 09:13:01.880 I/wpa_supplicant(12913): p2p0: P2P-GROUP-STARTED
p2p-p2p0-0 client ssid="DIRECT-AA-Android_6a0b" freq=2437
...
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
More information about the Hostap
mailing list