summaryrefslogtreecommitdiff
path: root/wpa_supplicant/main.c
diff options
context:
space:
mode:
authorRui Paulo <rpaulo@FreeBSD.org>2015-10-14 04:30:17 +0000
committerRui Paulo <rpaulo@FreeBSD.org>2015-10-14 04:30:17 +0000
commitb834757ea3bcd1bba3381ff7cab216458d8f7efb (patch)
treedadb24e00f30aa959ea0981e649b18c668304498 /wpa_supplicant/main.c
parentfbffd80fb2ba16c68f799da68a119d5e69643604 (diff)
Diffstat (limited to 'wpa_supplicant/main.c')
-rw-r--r--wpa_supplicant/main.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/wpa_supplicant/main.c b/wpa_supplicant/main.c
index 22827479c6435..d5d47e1d77b24 100644
--- a/wpa_supplicant/main.c
+++ b/wpa_supplicant/main.c
@@ -12,6 +12,7 @@
#endif /* __linux__ */
#include "common.h"
+#include "fst/fst.h"
#include "wpa_supplicant_i.h"
#include "driver_i.h"
#include "p2p_supplicant.h"
@@ -237,7 +238,7 @@ int main(int argc, char *argv[])
goto out;
#ifdef CONFIG_P2P
case 'm':
- iface->conf_p2p_dev = optarg;
+ params.conf_p2p_dev = optarg;
break;
#endif /* CONFIG_P2P */
case 'o':
@@ -288,7 +289,7 @@ int main(int argc, char *argv[])
if (iface == NULL)
goto out;
ifaces = iface;
- iface = &ifaces[iface_count - 1];
+ iface = &ifaces[iface_count - 1];
os_memset(iface, 0, sizeof(*iface));
break;
default:
@@ -309,6 +310,17 @@ int main(int argc, char *argv[])
"wpa_supplicant");
}
+ if (fst_global_init()) {
+ wpa_printf(MSG_ERROR, "Failed to initialize FST");
+ exitcode = -1;
+ goto out;
+ }
+
+#if defined(CONFIG_FST) && defined(CONFIG_CTRL_IFACE)
+ if (!fst_global_add_ctrl(fst_ctrl_cli))
+ wpa_printf(MSG_WARNING, "Failed to add CLI FST ctrl");
+#endif
+
for (i = 0; exitcode == 0 && i < iface_count; i++) {
struct wpa_supplicant *wpa_s;
@@ -334,6 +346,8 @@ int main(int argc, char *argv[])
wpa_supplicant_deinit(global);
+ fst_global_deinit();
+
out:
wpa_supplicant_fd_workaround(0);
os_free(ifaces);