wpas_p2p_group_delete: Removing STA connection in case of group formation failure

Krishna Chaitanya chaitanya.mgit
Mon Jun 15 08:39:56 PDT 2015


Hi Jouni,

When we are doing concurrent p2p connection (STA + P2P-GO) using
dynamic interface, after some trails the GO-NEG fails which is causing
the STA connection to be deauthenticated.

The reason for GO-NEG fail is that "add_iface" is failing, so
"p2p_group_interface" is not set, but in
wpas_p2p_group_delete based on the below condition we are deleting the
STA managed interface.
        if (wpa_s->p2p_group_interface == P2P_GROUP_INTERFACE_GO)
                gtype = "GO";
        else if (wpa_s->p2p_group_interface == P2P_GROUP_INTERFACE_CLIENT ||
                 (ssid && ssid->mode == WPAS_MODE_INFRA)) {
                wpa_s->reassociate = 0;
                wpa_s->disconnected = 1;
                gtype = "client";
        } else
                gtype = "GO";

        if (removal_reason != P2P_GROUP_REMOVAL_SILENT && ssid)
                wpas_notify_p2p_group_removed(wpa_s, ssid, gtype);

        if (os_strcmp(gtype, "client") == 0)
                wpa_supplicant_deauthenticate(wpa_s,
WLAN_REASON_DEAUTH_LEAVING);

Is there any reason for checking INFRA mode in p2p module? Snippet of
logs is below:

00:22:cf:e7:b4:06 ==> AP BSSID
4a:5a:3f:35:cb:7e ==> P2P Peer

=============LOG==============
P2P-GO-NEG-SUCCESS role=GO freq=5180 ht40=0 peer_dev=4a:5a:3f:35:4b:7e
peer_iface=4a:5a:3f:35:cb:7e wps_method=PBC
CTRL_IFACE monitor sent successfully to /tmp/wpa_ctrl_2283-2\x00
Initializing interface 'p2p-wlan0-71' conf 'N/A' driver 'nl80211'
ctrl_interface '/var/run/wpa_supplicant' bridge 'N/A'
rfkill: Cannot open RFKILL control device
nl80211: RFKILL status not available
nl80211: TDLS supported
nl80211: TDLS external setup
nl80211: Supported cipher 00-0f-ac:1
nl80211: Supported cipher 00-0f-ac:5
nl80211: Supported cipher 00-0f-ac:2
nl80211: Supported cipher 00-0f-ac:4
nl80211: Supported cipher 00-0f-ac:6
nl80211: Using driver-based off-channel TX
nl80211: Use separate P2P group interface (driver advertised support)
nl80211: interface p2p-wlan0-71 in phy phy1
nl80211: Set mode ifindex 76 iftype 9 (P2P_GO)
nl80211: Set TX rates failed: ret=-100 (Network is down)
nl80211: Setup AP(p2p-wlan0-71) - device_ap_sme=0 use_monitor=0
nl80211: Subscribe to mgmt frames with AP handle 0x1562e0
nl80211: Register frame type=0xb0 (WLAN_FC_STYPE_AUTH) nl_handle=0x1562e0 match=
nl80211: Register frame type=0x0 (WLAN_FC_STYPE_ASSOC_REQ)
nl_handle=0x1562e0 match=
nl80211: Register frame type=0x20 (WLAN_FC_STYPE_REASSOC_REQ)
nl_handle=0x1562e0 match=
nl80211: Register frame type=0xa0 (WLAN_FC_STYPE_DISASSOC)
nl_handle=0x1562e0 match=
nl80211: Register frame type=0xc0 (WLAN_FC_STYPE_DEAUTH)
nl_handle=0x1562e0 match=
nl80211: Register frame type=0xd0 (WLAN_FC_STYPE_ACTION)
nl_handle=0x1562e0 match=
nl80211: Register frame type=0x40 (WLAN_FC_STYPE_PROBE_REQ)
nl_handle=0x1562e0 match=
Could not set interface p2p-wlan0-71 flags (UP): Device or resource busy
nl80211: Could not set interface 'p2p-wlan0-71' UP
nl80211: Remove monitor interface: refcount=0
nl80211: Remove beacon (ifindex=76)
netlink: Operstate: ifindex=76 linkmode=0 (kernel-control),
operstate=6 (IF_OPER_UP)
nl80211: Set mode ifindex 76 iftype 2 (STATION)
nl80211: Teardown AP(p2p-wlan0-71) - device_ap_sme=0 use_monitor=0
nl80211: Unsubscribe mgmt frames handle 0x889dea69 (AP teardown)
p2p-wlan0-71: Failed to initialize driver interface
Failed to add interface p2p-wlan0-71
p2p-wlan0-71: Cancelling scan request
p2p-wlan0-71: Cancelling authentication timeout
P2P: Failed to create new wpa_supplicant interface
P2P: Removing pending group interface p2p-wlan0-71
nl80211: wpa_driver_nl80211_if_remove(type=3 ifname=p2p-wlan0-71)
ifindex=76 added_if=0
nl80211: Remove interface ifindex=76
nl80211: if_indices[16]:
nl80211: if_indices[16]:
P2P: Group Formation failed with 4a:5a:3f:35:cb:7e
P2P: Clear timeout (state=PROVISIONING)
P2P: State PROVISIONING -> IDLE
P2P-GROUP-FORMATION-FAILURE
CTRL_IFACE monitor sent successfully to /tmp/wpa_ctrl_2283-2\x00
wlan0: Request to deauthenticate - bssid=00:22:cf:e7:b4:06
pending_bssid=00:00:00:00:00:00 reason=3 state=COMPLETED
TDLS: Tear down peers
wpa_driver_nl80211_deauthenticate(addr=00:22:cf:e7:b4:06 reason_code=3)
wlan0: Event DEAUTH (12) received
wlan0: Deauthentication notification
wlan0:  * reason 3 (locally generated)
Deauthentication frame IE(s) - hexdump(len=0): [NULL]
wlan0: CTRL-EVENT-DISCONNECTED bssid=00:22:cf:e7:b4:06 reason=3
locally_generated=1

-- 
Thanks,
Regards,
Chaitanya T K.



More information about the Hostap mailing list