diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-09-25 13:12:36 +0900 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-09-25 13:12:36 +0900 |
commit | d0adc058c41539c45798b884785cdb3bb2a2da6b (patch) | |
tree | 4371d05093f07e22753b67912fc315da7bf815d2 | |
parent | 2a62e28659c047b06e3874d8d21bdc2ac091bf37 (diff) | |
download | ofono-d0adc058c41539c45798b884785cdb3bb2a2da6b.tar.bz2 |
udev: Add support for setting IFX multiplexer line discipline
The IFX modem plugin uses a kernel based multiplexer. And to support
different line discipline numbers on different target platforms, allow
them to be specified as option:
KERNEL=="ttyIFX[0-9]*", ENV{OFONO_DRIVER}="ifx", ENV{OFONO_IFX_LDISC}="23"
The extra OFONO_IFX_LDISC option specifies to use line discipline 23
for the multiplexer setup. The number is just an example here and the
correct one will be different.
-rw-r--r-- | plugins/udev.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/plugins/udev.c b/plugins/udev.c index 51366a69..c53c2bc7 100644 --- a/plugins/udev.c +++ b/plugins/udev.c @@ -213,6 +213,7 @@ static void add_hso(struct ofono_modem *modem, static void add_ifx(struct ofono_modem *modem, struct udev_device *udev_device) { + struct udev_list_entry *entry; const char *devnode; DBG("modem %p", modem); @@ -220,6 +221,19 @@ static void add_ifx(struct ofono_modem *modem, devnode = udev_device_get_devnode(udev_device); ofono_modem_set_string(modem, "Device", devnode); + entry = udev_device_get_properties_list_entry(udev_device); + while (entry) { + const char *name = udev_list_entry_get_name(entry); + const char *value; + + if (g_str_equal(name, "OFONO_IFX_LDISC") == TRUE) { + value = udev_list_entry_get_value(entry); + ofono_modem_set_string(modem, "LineDiscipline", value); + } + + entry = udev_list_entry_get_next(entry); + } + ofono_modem_register(modem); } |