ifx: Use PPP based GPRS context if M-RAW_IP is not available
authorMarcel Holtmann <marcel@holtmann.org>
Sat, 23 Oct 2010 10:57:42 +0000 (12:57 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 23 Oct 2010 10:57:42 +0000 (12:57 +0200)
plugins/ifx.c

index af0dae2..9aa8b0b 100644 (file)
@@ -691,13 +691,20 @@ static void ifx_post_online(struct ofono_modem *modem)
        if (!gprs)
                return;
 
-       gc1 = ofono_gprs_context_create(modem, 0,
+       if (data->mux_ldisc < 0) {
+               gc1 = ofono_gprs_context_create(modem, 0,
+                                       "atmodem", data->dlcs[GPRS1_DLC]);
+               gc2 = ofono_gprs_context_create(modem, 0,
+                                       "atmodem", data->dlcs[GPRS2_DLC]);
+       } else {
+               gc1 = ofono_gprs_context_create(modem, 0,
                                        "ifxmodem", data->dlcs[GPRS1_DLC]);
+               gc2 = ofono_gprs_context_create(modem, 0,
+                                       "ifxmodem", data->dlcs[GPRS2_DLC]);
+       }
+
        if (gc1)
                ofono_gprs_add_context(gprs, gc1);
-
-       gc2 = ofono_gprs_context_create(modem, 0,
-                                       "ifxmodem", data->dlcs[GPRS2_DLC]);
        if (gc2)
                ofono_gprs_add_context(gprs, gc2);
 }