diff options
-rw-r--r-- | plugins/modem.conf | 10 | ||||
-rw-r--r-- | plugins/modemconf.c | 17 |
2 files changed, 27 insertions, 0 deletions
diff --git a/plugins/modem.conf b/plugins/modem.conf index b7dfda56..66bf932e 100644 --- a/plugins/modem.conf +++ b/plugins/modem.conf @@ -34,3 +34,13 @@ #[freerunner] #Driver=calypso #Device=/dev/ttySAC0 + +# Nokia N900 with Maemo daemons +#[n900] +#Driver=isimodem +#Interface=phonet0 + +# Nokia N900 without Maemo daemons +#[n900] +#Driver=n900modem +#Interface=phonet0 diff --git a/plugins/modemconf.c b/plugins/modemconf.c index 281a7622..c64cc319 100644 --- a/plugins/modemconf.c +++ b/plugins/modemconf.c @@ -113,6 +113,21 @@ static int set_device(struct ofono_modem *modem, return 0; } +static int set_interface(struct ofono_modem *modem, + GKeyFile *keyfile, const char *group) +{ + char *iface; + + iface = g_key_file_get_string(keyfile, group, "Interface", NULL); + if (!iface) + return -EINVAL; + + ofono_modem_set_string(modem, "Interface", iface); + g_free(iface); + + return 0; +} + static struct { const char *driver; int (*func) (struct ofono_modem *modem, @@ -124,6 +139,8 @@ static struct { { "ste", set_device }, { "calypso", set_device }, { "palmpre", set_device }, + { "isimodem", set_interface }, + { "n900modem", set_interface }, { NULL } }; |