P2P: Do not include P2P IE in association request to non-P2P AP

This was previously fixed for most cases in commit
ffad885837, but the check here for
drivers that implement SME/MLME was missed in that commit.

This removes the P2P IE from (Re)Association Request frame with
drivers that do not use wpa_supplicant SME implementation and are
P2P cabable when associating with a non-P2P AP (i.e., not a GO or
P2P WLAN manager AP).

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
intended-for: hostap-1
This commit is contained in:
Jouni Malinen 2012-02-17 11:34:56 +02:00 committed by Jouni Malinen
parent 0047c047fc
commit b8a8d6774b

View file

@ -1248,11 +1248,10 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
u8 *pos;
size_t len;
int res;
int p2p_group;
p2p_group = wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_CAPABLE;
pos = wpa_ie + wpa_ie_len;
len = sizeof(wpa_ie) - wpa_ie_len;
res = wpas_p2p_assoc_req_ie(wpa_s, bss, pos, len, p2p_group);
res = wpas_p2p_assoc_req_ie(wpa_s, bss, pos, len,
ssid->p2p_group);
if (res >= 0)
wpa_ie_len += res;
}