diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-06-17 08:29:15 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-06-17 15:48:07 +0200 |
commit | ce84ea510f5213e526917db2d7218d4ca001089d (patch) | |
tree | a9c5762edd1bb6edbeb4065ca71db9f874652044 | |
parent | e65f6ca2afd32d2abf9bdd6b876801676adda655 (diff) |
bearer-mbim: make packet service attach operation optional
Some modems do require it, but some others won't (e.g. CDMA based ones), so
just make the operation optional, but only if the modem replies NoDeviceSupport.
https://bugzilla.gnome.org/show_bug.cgi?id=702419
-rw-r--r-- | src/mm-bearer-mbim.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c index 8b64a4c0..2cfd1cfa 100644 --- a/src/mm-bearer-mbim.c +++ b/src/mm-bearer-mbim.c @@ -548,9 +548,17 @@ packet_service_set_ready (MbimDevice *device, } if (error) { - g_simple_async_result_take_error (ctx->result, error); - connect_context_complete_and_free (ctx); - return; + /* Don't make NoDeviceSupport errors fatal; just try to keep on the + * connection sequence even with this error. */ + if (g_error_matches (error, MBIM_STATUS_ERROR, MBIM_STATUS_ERROR_NO_DEVICE_SUPPORT)) { + mm_dbg ("Device doesn't support packet service attach"); + g_error_free (error); + } else { + /* All other errors are fatal */ + g_simple_async_result_take_error (ctx->result, error); + connect_context_complete_and_free (ctx); + return; + } } /* Keep on */ |