mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-06 20:24:06 -05:00
P2P: Let the driver wrapper know if association is for P2P group
This commit is contained in:
parent
8ccbe415ba
commit
6e3f4b89ea
@ -290,6 +290,12 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
|
|||||||
params.pairwise_suite = cipher_suite2driver(wpa_s->pairwise_cipher);
|
params.pairwise_suite = cipher_suite2driver(wpa_s->pairwise_cipher);
|
||||||
params.group_suite = params.pairwise_suite;
|
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, ¶ms) < 0) {
|
if (wpa_drv_associate(wpa_s, ¶ms) < 0) {
|
||||||
wpa_msg(wpa_s, MSG_INFO, "Failed to start AP functionality");
|
wpa_msg(wpa_s, MSG_INFO, "Failed to start AP functionality");
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -365,6 +365,9 @@ void sme_associate(struct wpa_supplicant *wpa_s, enum wpas_mode mode,
|
|||||||
elems.wpa_ie_len + 2);
|
elems.wpa_ie_len + 2);
|
||||||
else
|
else
|
||||||
wpa_sm_set_assoc_wpa_ie(wpa_s->wpa, NULL, 0);
|
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, ¶ms) < 0) {
|
if (wpa_drv_associate(wpa_s, ¶ms) < 0) {
|
||||||
wpa_msg(wpa_s, MSG_INFO, "Association request to the driver "
|
wpa_msg(wpa_s, MSG_INFO, "Association request to the driver "
|
||||||
|
@ -1244,6 +1244,12 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
|
|||||||
}
|
}
|
||||||
#endif /* CONFIG_IEEE80211W */
|
#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)
|
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
|
||||||
ret = ieee80211_sta_associate(wpa_s, ¶ms);
|
ret = ieee80211_sta_associate(wpa_s, ¶ms);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user