P2P disconnect problem
Fri Jul 31 01:19:05 PDT 2015
I have the problem, that ending a P2P connection does not work correctly
under certain circumstances.
- wpa_supplicant (2.4 or git master)
- wlan hardware: "Intel Corporation Wireless 7260"
- P2P connection to a tablet
- the tablet is the GO
- the tablet triggers the disconnect
With my Android tablet everything works as expected:
- a new (empty) list of groups for the peer is announced via D-Bus
- the group and group-interface are removed immediately
With a Windows Tablet, it does not work as expected:
- the group interface is disconnected but not removed
- after the Group idle timeout is reached, the group and interface are
- The changes to the peer group list are never announced
I did not understand everything but what happens is this:
The Android tablet sends a unicast 'deauthentication' frame with a reason
code 3 ( STA is leaving), At least that's what wireshark on a monitor
interface tells me.
The Windows tablet sends a unicast 'deauthentication' frame with a reason
code 0 (unknown) followed by a broadcast 'deauthentication' frame with a
reason code 3 ( STA is leaving).
I don't think the second reaches wpa_supplicant.
It seems the reason code is checked in various places, e.g. in
wpas_event_disconnect() and for reason code == 0 some steps are skipped.
This is where I got lost. I don't know enough about the internals of
wpa_supplicant to understand what happens vs. what is supposed to happen.
One side effect is, that wpa_supplicant_mark_disassoc() is called before
wpas_dbus_unregister_p2p_group(). wpa_supplicant_mark_disassoc() clears
wpa_s->go_dev_addr and as a result, in signal_peer_groups_changed()
wpas_get_p2p_client_iface() returns NULL and
wpas_dbus_signal_peer_groups_changed() is never called.
If I hack mlme_event_deauth_disassoc() to provide the 'correct' reason
reason_code = WLAN_REASON_DEAUTH_LEAVING;
Then the disconnect works as expected so this is the cause of my problem.
I'm guessing the reason code is checked for a reason. So what is really
supposed to happen in this case?
I tired so attach the logfiles for both cases. However, the mail got stuck
in moderation. If someone thinks they could be usefull, then I can try to
send them again. May in multiple mails or compressed.
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the Hostap