diff options
author | Pekka Pessi <Pekka.Pessi@nokia.com> | 2010-04-19 20:41:04 +0300 |
---|---|---|
committer | Aki Niemi <aki.niemi@nokia.com> | 2010-04-20 17:47:16 +0300 |
commit | 793710d8006d56b2d046ce869f26665d67e15b41 (patch) | |
tree | 6f6916908e773fabc2a1da93eda81f356d5ef65c | |
parent | 2dd6923dfa756e4f8fa08df61656470cd8a37c7e (diff) | |
download | ofono-793710d8006d56b2d046ce869f26665d67e15b41.tar.bz2 |
Parse Interface key for isimodem and n900modem
-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 } }; |