diff options
author | Antara Borwankar <antara.borwankar@intel.com> | 2019-02-12 17:21:35 +0530 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2019-02-13 08:38:18 -0600 |
commit | cefba0c26fc82c643e6d8aff2dd6cfc544a2627a (patch) | |
tree | a11c2915da36aa2555a491608223b537e3996508 /plugins/xmm7xxx.c | |
parent | fae77b52c602f45b891d92c48888c665d1282c42 (diff) | |
download | ofono-cefba0c26fc82c643e6d8aff2dd6cfc544a2627a.tar.gz |
xmm7modem: Change in xmm7mode plugin for multiple PDP
Made changes in xmm7modem plugin to allow mutiple PDP context
activation and to assign correct network interface to the
activated PDP context.
Diffstat (limited to 'plugins/xmm7xxx.c')
-rw-r--r-- | plugins/xmm7xxx.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/plugins/xmm7xxx.c b/plugins/xmm7xxx.c index 237c62cc..90e52fbb 100644 --- a/plugins/xmm7xxx.c +++ b/plugins/xmm7xxx.c @@ -1269,6 +1269,7 @@ static void xmm7xxx_post_online(struct ofono_modem *modem) struct xmm7xxx_data *data = ofono_modem_get_data(modem); struct ofono_gprs *gprs; struct ofono_gprs_context *gc; + const char *interface = NULL; DBG("%p", modem); @@ -1276,11 +1277,39 @@ static void xmm7xxx_post_online(struct ofono_modem *modem) gprs = ofono_gprs_create(modem, OFONO_VENDOR_IFX, "atmodem", data->chat); + + interface = ofono_modem_get_string(modem, "NetworkInterface"); gc = ofono_gprs_context_create(modem, OFONO_VENDOR_XMM, "ifxmodem", data->chat); - if (gprs && gc) + if (gprs && gc) { ofono_gprs_add_context(gprs, gc); + ofono_gprs_context_set_interface(gc, interface); + } + + interface = ofono_modem_get_string(modem, "NetworkInterface2"); + + if (interface) { + gc = ofono_gprs_context_create(modem, OFONO_VENDOR_XMM, + "ifxmodem", data->chat); + + if (gprs && gc) { + ofono_gprs_add_context(gprs, gc); + ofono_gprs_context_set_interface(gc, interface); + } + } + + interface = ofono_modem_get_string(modem, "NetworkInterface3"); + + if (interface) { + gc = ofono_gprs_context_create(modem, OFONO_VENDOR_XMM, + "ifxmodem", data->chat); + + if (gprs && gc) { + ofono_gprs_add_context(gprs, gc); + ofono_gprs_context_set_interface(gc, interface); + } + } ofono_ims_create(modem, "xmm7modem", data->chat); ofono_netmon_create(modem, 0, "xmm7modem", data->chat); |