Do not call driver_init if hostapd interface is not yet configured
authorShan Palanisamy <shanp@qca.qualcomm.com>
Thu, 16 Feb 2012 17:43:48 +0000 (19:43 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 16 Feb 2012 17:43:48 +0000 (19:43 +0200)
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

hostapd/main.c

index b0903cf..2748c61 100644 (file)
@@ -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;