mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
P2P: Add new driver option for interface allocation
WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P flag can now be used to indicate that the initial interface (e.g., wlan0) is used for P2P management operations and potentially non-P2P connections. This is otherwise identical to WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE, but the possibility of non-P2P connections makes some operations differ.
This commit is contained in:
parent
a1eca5cfd8
commit
971e357f19
@ -540,13 +540,19 @@ struct wpa_driver_capa {
|
|||||||
#define WPA_DRIVER_FLAGS_P2P_CONCURRENT 0x00000200
|
#define WPA_DRIVER_FLAGS_P2P_CONCURRENT 0x00000200
|
||||||
/*
|
/*
|
||||||
* Driver uses the initial interface as a dedicated management interface, i.e.,
|
* Driver uses the initial interface as a dedicated management interface, i.e.,
|
||||||
* it cannot be used for P2P group operations.
|
* it cannot be used for P2P group operations or non-P2P purposes.
|
||||||
*/
|
*/
|
||||||
#define WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE 0x00000400
|
#define WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE 0x00000400
|
||||||
/* This interface is P2P capable (P2P Device, GO, or P2P Client */
|
/* This interface is P2P capable (P2P Device, GO, or P2P Client */
|
||||||
#define WPA_DRIVER_FLAGS_P2P_CAPABLE 0x00000800
|
#define WPA_DRIVER_FLAGS_P2P_CAPABLE 0x00000800
|
||||||
/* Driver supports concurrent operations on multiple channels */
|
/* Driver supports concurrent operations on multiple channels */
|
||||||
#define WPA_DRIVER_FLAGS_MULTI_CHANNEL_CONCURRENT 0x00001000
|
#define WPA_DRIVER_FLAGS_MULTI_CHANNEL_CONCURRENT 0x00001000
|
||||||
|
/*
|
||||||
|
* Driver uses the initial interface for P2P management interface and non-P2P
|
||||||
|
* purposes (e.g., connect to infra AP), but this interface cannot be used for
|
||||||
|
* P2P group operations.
|
||||||
|
*/
|
||||||
|
#define WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P 0x00002000
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
|
|
||||||
int max_scan_ssids;
|
int max_scan_ssids;
|
||||||
|
@ -2427,7 +2427,9 @@ void wpas_p2p_deinit_global(struct wpa_global *global)
|
|||||||
|
|
||||||
static int wpas_p2p_create_iface(struct wpa_supplicant *wpa_s)
|
static int wpas_p2p_create_iface(struct wpa_supplicant *wpa_s)
|
||||||
{
|
{
|
||||||
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE)
|
if (wpa_s->drv_flags &
|
||||||
|
(WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE |
|
||||||
|
WPA_DRIVER_FLAGS_P2P_MGMT_AND_NON_P2P))
|
||||||
return 1; /* P2P group requires a new interface in every case
|
return 1; /* P2P group requires a new interface in every case
|
||||||
*/
|
*/
|
||||||
if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_CONCURRENT))
|
if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_CONCURRENT))
|
||||||
|
Loading…
Reference in New Issue
Block a user