nodist_include_HEADERS = version.h
noinst_HEADERS = driver.h element.h property.h ipv4.h rtnl.h dbus.h \
- resolver.h ipconfig.h service.h
+ resolver.h ipconfig.h service.h option.h
MAINTAINERCLEANFILES = Makefile.in
--- /dev/null
+/*
+ *
+ * Connection Manager
+ *
+ * Copyright (C) 2007-2009 Intel Corporation. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ */
+
+#ifndef __CONNMAN_OPTION_H
+#define __CONNMAN_OPTION_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern const char *connman_option_get_string(const char *key);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __CONNMAN_OPTION_H */
#define CONNMAN_API_SUBJECT_TO_CHANGE
#include <connman/device.h>
+#include <connman/option.h>
#include <connman/dbus.h>
#include <connman/log.h>
static int add_interface(struct supplicant_task *task)
{
- const char *driver = "wext";
+ const char *driver = connman_option_get_string("wifi");
DBusMessage *message;
DBusMessageIter array, dict;
DBusPendingCall *call;
void __connman_toggle_debug(void);
gboolean __connman_debug_enabled(void);
+#include <connman/option.h>
+
#include <connman/plugin.h>
int __connman_plugin_init(const char *pattern, const char *exclude);
static gchar *option_plugin = NULL;
static gchar *option_nodevice = NULL;
static gchar *option_noplugin = NULL;
+static gchar *option_wifi = NULL;
static gboolean option_detach = TRUE;
static gboolean option_compat = FALSE;
static gboolean option_debug = FALSE;
"Specify plugins to load", "NAME" },
{ "noplugin", 'P', 0, G_OPTION_ARG_STRING, &option_noplugin,
"Specify plugins not to load", "NAME" },
+ { "wifi", 'W', 0, G_OPTION_ARG_STRING, &option_wifi,
+ "Specify driver for WiFi/Supplicant", "NAME" },
{ "nodaemon", 'n', G_OPTION_FLAG_REVERSE,
G_OPTION_ARG_NONE, &option_detach,
"Don't fork daemon to background" },
{ NULL },
};
+const char *connman_option_get_string(const char *key)
+{
+ if (g_strcmp0(key, "wifi") == 0) {
+ if (option_wifi == NULL)
+ return "nl80211,wext";
+ else
+ return option_wifi;
+ }
+
+ return NULL;
+}
+
int main(int argc, char *argv[])
{
GOptionContext *context;