P2P: Fix TDLS and l2_packet init without P2P Device interface
Commit c68f6200a7
made these calls
conditional on !p2p_mgmt, but forced p2p_mgmt=1 for cases where the
driver does not use the dedicated P2P Device. Fix this by making the
!p2p_mgmt condition apply only if the driver does indicate use of a
dedicated P2P Device.
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
9e6a321815
commit
1c42b42f6c
1 changed files with 7 additions and 2 deletions
|
@ -2328,7 +2328,9 @@ int wpa_supplicant_update_mac_addr(struct wpa_supplicant *wpa_s)
|
||||||
const u8 *addr = wpa_drv_get_mac_addr(wpa_s);
|
const u8 *addr = wpa_drv_get_mac_addr(wpa_s);
|
||||||
if (addr)
|
if (addr)
|
||||||
os_memcpy(wpa_s->own_addr, addr, ETH_ALEN);
|
os_memcpy(wpa_s->own_addr, addr, ETH_ALEN);
|
||||||
} else if (!wpa_s->p2p_mgmt &&
|
} else if ((!wpa_s->p2p_mgmt ||
|
||||||
|
!(wpa_s->drv_flags &
|
||||||
|
WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE)) &&
|
||||||
!(wpa_s->drv_flags &
|
!(wpa_s->drv_flags &
|
||||||
WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE)) {
|
WPA_DRIVER_FLAGS_P2P_DEDICATED_INTERFACE)) {
|
||||||
l2_packet_deinit(wpa_s->l2);
|
l2_packet_deinit(wpa_s->l2);
|
||||||
|
@ -2975,7 +2977,10 @@ next_driver:
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
#ifdef CONFIG_TDLS
|
#ifdef CONFIG_TDLS
|
||||||
if (!iface->p2p_mgmt && wpa_tdls_init(wpa_s->wpa))
|
if ((!iface->p2p_mgmt ||
|
||||||
|
!(wpa_s->drv_flags &
|
||||||
|
WPA_DRIVER_FLAGS_DEDICATED_P2P_DEVICE)) &&
|
||||||
|
wpa_tdls_init(wpa_s->wpa))
|
||||||
return -1;
|
return -1;
|
||||||
#endif /* CONFIG_TDLS */
|
#endif /* CONFIG_TDLS */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue