This email list is read-only. Emails sent to this list will be discarded ---------------------------------- bootstrap-configure | 1 + configure.ac | 4 ++ plugins/Makefile.am | 6 ++++ plugins/wimax.c | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++ src/udev.c | 20 ++++++++++--- 5 files changed, 103 insertions(+), 5 deletions(-)
New commits: commit 46bf753b500e4d4246cfca7626e14e8d0fbfff66 Author: Marcel Holtmann <[email protected]> Date: Sat Jan 3 15:28:20 2009 +0100 Fix detection of common parent device commit 8d21832bcf8cef0708c9d19a771d679140135ea5 Author: Marcel Holtmann <[email protected]> Date: Sat Jan 3 15:01:35 2009 +0100 Add skeleton for future WiMAX plugin Diff in this email is a maximum of 400 lines. diff --git a/bootstrap-configure b/bootstrap-configure index 164c535..340d80b 100755 --- a/bootstrap-configure +++ b/bootstrap-configure @@ -19,6 +19,7 @@ fi --enable-loopback \ --enable-ethernet \ --enable-wifi \ + --enable-wimax \ --enable-bluetooth \ --enable-udhcp \ --enable-dhclient \ diff --git a/configure.ac b/configure.ac index f9f9a8a..393bee6 100644 --- a/configure.ac +++ b/configure.ac @@ -60,6 +60,10 @@ if (test "${enable_wifi}" = "yes"); then fi AM_CONDITIONAL(WIFI, test "${enable_wifi}" = "yes") +AC_ARG_ENABLE(wimax, AC_HELP_STRING([--enable-wimax], + [enable WiMAX support]), [enable_wimax=${enableval}]) +AM_CONDITIONAL(WIMAX, test "${enable_wimax}" = "yes") + AC_ARG_ENABLE(bluetooth, AC_HELP_STRING([--enable-bluetooth], [enable Bluetooth support]), [enable_bluetooth=${enableval}]) AM_CONDITIONAL(BLUETOOTH, test "${enable_bluetooth}" = "yes") diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 9b013ad..71ae0cf 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -22,6 +22,12 @@ wifi_la_SOURCES = wifi.c inet.h inet.c supplicant.h supplicant.c wifi_la_LIBADD = @GDBUS_LIBS@ endif +if WIMAX +plugin_LTLIBRARIES += wimax.la + +wimax_la_SOURCES = wimax.c +endif + if BLUETOOTH plugin_LTLIBRARIES += bluetooth.la diff --git a/plugins/wimax.c b/plugins/wimax.c new file mode 100644 index 0000000..e008dc9 --- /dev/null +++ b/plugins/wimax.c @@ -0,0 +1,77 @@ +/* + * + * 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 + * + */ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#define CONNMAN_API_SUBJECT_TO_CHANGE +#include <connman/plugin.h> +#include <connman/device.h> +#include <connman/log.h> + +static int wimax_probe(struct connman_device *device) +{ + DBG("device %p", device); + + return 0; +} + +static void wimax_remove(struct connman_device *device) +{ + DBG("device %p", device); +} + +static int wimax_enable(struct connman_device *device) +{ + DBG("device %p", device); + + return 0; +} + +static int wimax_disable(struct connman_device *device) +{ + DBG("device %p", device); + + return 0; +} + +static struct connman_device_driver wimax_driver = { + .name = "wimax", + .type = CONNMAN_DEVICE_TYPE_WIMAX, + .probe = wimax_probe, + .remove = wimax_remove, + .enable = wimax_enable, + .disable = wimax_disable, +}; + +static int wimax_init(void) +{ + return connman_device_driver_register(&wimax_driver); +} + +static void wimax_exit(void) +{ + connman_device_driver_unregister(&wimax_driver); +} + +CONNMAN_PLUGIN_DEFINE(wimax, "WiMAX interface plugin", VERSION, + wimax_init, wimax_exit) diff --git a/src/udev.c b/src/udev.c index 4ce3f4e..0109f64 100644 --- a/src/udev.c +++ b/src/udev.c @@ -169,8 +169,10 @@ static void print_properties(struct udev_device *device, const char *prefix) if (g_str_has_prefix(name, "CONNMAN") == TRUE || g_str_has_prefix(name, "ID_MODEM") == TRUE || - g_str_equal(name, "DEVNAME") == TRUE || - g_str_equal(name, "DEVPATH") == TRUE) + g_str_equal(name, "ID_VENDOR") == TRUE || + g_str_equal(name, "ID_MODEL") == TRUE || + g_str_equal(name, "DEVNAME") == TRUE || + g_str_equal(name, "DEVPATH") == TRUE) connman_debug("%s%s = %s", prefix, name, value); entry = udev_list_entry_get_next(entry); @@ -179,15 +181,23 @@ static void print_properties(struct udev_device *device, const char *prefix) static void print_device(struct udev_device *device, const char *action) { - const char *subsystem = udev_device_get_subsystem(device); - const char *devtype = NULL; + const char *subsystem, *devtype = NULL; struct udev_device *parent; connman_debug("=== %s ===", action); print_properties(device, ""); - if (subsystem != NULL && g_str_equal(subsystem, "usb") == TRUE) + parent = udev_device_get_parent(device); + if (parent == NULL) + return; + + subsystem = udev_device_get_subsystem(parent); + + if (subsystem != NULL && + g_str_equal(subsystem, "usb-serial") == TRUE) { + subsystem = "usb"; devtype = "usb_device"; + } parent = udev_device_get_parent_with_subsystem_devtype(device, subsystem, devtype); _______________________________________________ Commits mailing list [email protected] https://lists.moblin.org/mailman/listinfo/commits
