summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2015-12-27 14:36:11 +0200
committerYves-Alexis Perez <corsac@debian.org>2017-10-16 09:28:41 +0100
commitb2efd56960cc80fc1274b09ed3f4f8c143e2d417 (patch)
treec38dda794a33af8f4adac79df0493661d40cf73e
parent0dacf8be6338cc93f7c83edbc450ae8880950fdd (diff)
nl80211: Don't call linux_iface_up() for a dedicated P2P Device
As a dedicated P2P Device interface does not have a network interface associated with it, trying to call linux_iface_up() on it would always fail so this call can be skipped for such an interface. Getting interface nlmode can be done only after bss->wdev_id is set, so move this call to wpa_driver_nl80211_finish_drv_init(), and do it only in case the nlmode != NL80211_IFTYPE_P2P_DEVICE. Signed-off-by: Ilan Peer <ilan.peer@intel.com> Gbp-Pq: Name nl80211_dont_call_linux_iface_up_for_a_dedicated_p2p_device.patch
-rw-r--r--src/drivers/driver_nl80211.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index d743868..4c195f3 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -1674,9 +1674,6 @@ static void * wpa_driver_nl80211_drv_init(void *ctx, const char *ifname,
os_free(rcfg);
}
- if (linux_iface_up(drv->global->ioctl_sock, ifname) > 0)
- drv->start_iface_up = 1;
-
if (wpa_driver_nl80211_finish_drv_init(drv, set_addr, 1, driver_params))
goto failed;
@@ -2174,6 +2171,11 @@ wpa_driver_nl80211_finish_drv_init(struct wpa_driver_nl80211_data *drv,
if (!bss->if_dynamic && nl80211_get_ifmode(bss) == NL80211_IFTYPE_AP)
bss->static_ap = 1;
+ if (first &&
+ nl80211_get_ifmode(bss) != NL80211_IFTYPE_P2P_DEVICE &&
+ linux_iface_up(drv->global->ioctl_sock, bss->ifname) > 0)
+ drv->start_iface_up = 1;
+
if (wpa_driver_nl80211_capa(drv))
return -1;