From 0dcc4dc4b31d48ed32940b9adb0b9fcdcab32dc3 Mon Sep 17 00:00:00 2001 From: Shan Palanisamy Date: Thu, 16 Feb 2012 19:43:48 +0200 Subject: [PATCH] Do not call driver_init if hostapd interface is not yet configured Signed-hostap: Jouni Malinen --- hostapd/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hostapd/main.c b/hostapd/main.c index b0903cfc3..2748c61f1 100644 --- a/hostapd/main.c +++ b/hostapd/main.c @@ -339,10 +339,12 @@ hostapd_interface_init(struct hapd_interfaces *interfaces, iface->bss[0]->conf->logger_stdout_level--; } - if (hostapd_driver_init(iface) || - hostapd_setup_interface(iface)) { - hostapd_interface_deinit_free(iface); - return NULL; + if (iface->conf->bss[0].iface[0] != 0) { + if (hostapd_driver_init(iface) || + hostapd_setup_interface(iface)) { + hostapd_interface_deinit_free(iface); + return NULL; + } } return iface;