Some u-blox devices present a USB network class device for data and some
just switch to PPP on (one of) the communication channel(s). Whether
the atmodem or ubloxmodem gprs-context driver should be used depends on
whether or not the network interface is present; check this condition
directly when deciding which driver to us.
---
plugins/ublox.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/plugins/ublox.c b/plugins/ublox.c
index 918bd3ec..c6ff7eaa 100644
--- a/plugins/ublox.c
+++ b/plugins/ublox.c
@@ -359,6 +359,7 @@ static void ublox_post_sim(struct ofono_modem *modem)
const char *driver;
/* Toby L2: Create same number of contexts as supported PDP contexts. */
int ncontexts = data->flags & UBLOX_DEVICE_F_HIGH_THROUGHPUT_MODE ? 8 :
1;
+ const char *iface;
int variant;
DBG("%p", modem);
@@ -366,17 +367,10 @@ static void ublox_post_sim(struct ofono_modem *modem)
gprs = ofono_gprs_create(modem, data->vendor_family, "atmodem",
data->aux);
- if (ublox_is_toby_l4(data->model)) {
+ iface = ofono_modem_get_string(modem, "NetworkInterface");
+ if (iface) {
driver = "ubloxmodem";
variant = ublox_model_to_id(data->model);
- } else if (ublox_is_toby_l2(data->model)) {
- if (data->flags & UBLOX_DEVICE_F_HIGH_THROUGHPUT_MODE) {
- driver = "ubloxmodem";
- variant = ublox_model_to_id(data->model);
- } else {
- driver = "atmodem";
- variant = OFONO_VENDOR_UBLOX;
- }
} else {
driver = "atmodem";
variant = OFONO_VENDOR_UBLOX;
--
2.20.1
_______________________________________________
ofono mailing list
[email protected]
https://lists.ofono.org/mailman/listinfo/ofono