P2P: Let the driver wrapper know if association is for P2P group

This commit is contained in:
Jouni Malinen 2010-07-18 14:30:25 -07:00 committed by Jouni Malinen
parent 8ccbe415ba
commit 6e3f4b89ea
3 changed files with 15 additions and 0 deletions

View file

@ -290,6 +290,12 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
params.pairwise_suite = cipher_suite2driver(wpa_s->pairwise_cipher);
params.group_suite = params.pairwise_suite;
#ifdef CONFIG_P2P
if (ssid->mode == WPAS_MODE_P2P_GO ||
ssid->mode == WPAS_MODE_P2P_GROUP_FORMATION)
params.p2p = 1;
#endif /* CONFIG_P2P */
if (wpa_drv_associate(wpa_s, &params) < 0) {
wpa_msg(wpa_s, MSG_INFO, "Failed to start AP functionality");
return -1;

View file

@ -365,6 +365,9 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
elems.wpa_ie_len + 2);
else
wpa_sm_set_assoc_wpa_ie(wpa_s->wpa, NULL, 0);
if (elems.p2p &&
(wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_CAPABLE))
params.p2p = 1;
if (wpa_drv_associate(wpa_s, &params) < 0) {
wpa_msg(wpa_s, MSG_INFO, "Association request to the driver "

View file

@ -1244,6 +1244,12 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
}
#endif /* CONFIG_IEEE80211W */
#ifdef CONFIG_P2P
if (wpa_s->global->p2p &&
(wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_CAPABLE))
params.p2p = 1;
#endif /* CONFIG_P2P */
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
ret = ieee80211_sta_associate(wpa_s, &params);
else