aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2014-06-09 14:15:05 -0700
committerAleksander Morgado <aleksander@aleksander.es>2014-06-10 10:18:28 +0200
commit235fb874c993d95bd128f28d75beabad4d83baf7 (patch)
tree3f4fec3ff6de94a13a5fbeebf4d64d25b3e3be29
parent0b975f226627b4a3197a46734c11c8d83fbff884 (diff)
modem-helpers-mbim: map more MbimNwError to MMMobileEquipmentError
Commit b1ae81a in libmim ("libmbim-glib: add additional GMM cause codes to MbimNwError") added additional GMM cause codes to MbimNwError. This patch maps some of those MbimNwError to MMMobileEquipmentError. This patch requires libmbim >= 1.9.0
-rw-r--r--configure.ac2
-rw-r--r--src/mm-modem-helpers-mbim.c24
2 files changed, 25 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 34b8dbf9..f7ec3a41 100644
--- a/configure.ac
+++ b/configure.ac
@@ -201,7 +201,7 @@ AC_ARG_WITH(mbim, AS_HELP_STRING([--without-mbim], [Build without MBIM support])
AM_CONDITIONAL(WITH_MBIM, test "x$with_mbim" = "xyes")
case $with_mbim in
yes)
- PKG_CHECK_MODULES(MBIM, [mbim-glib >= 1.8], [have_mbim=yes],[have_mbim=no])
+ PKG_CHECK_MODULES(MBIM, [mbim-glib >= 1.9], [have_mbim=yes],[have_mbim=no])
if test "x$have_mbim" = "xno"; then
AC_MSG_ERROR([Couldn't find libmbim-glib. Install it, or otherwise configure using --without-mbim to disable MBIM support.])
else
diff --git a/src/mm-modem-helpers-mbim.c b/src/mm-modem-helpers-mbim.c
index 8060ace1..b819c298 100644
--- a/src/mm-modem-helpers-mbim.c
+++ b/src/mm-modem-helpers-mbim.c
@@ -183,6 +183,10 @@ mm_mobile_equipment_error_from_mbim_nw_error (MbimNwError nw_error)
return g_error_new (MM_MOBILE_EQUIPMENT_ERROR,
MM_MOBILE_EQUIPMENT_ERROR_GPRS_IMSI_UNKNOWN_IN_HLR,
"IMSI unknown in HLR");
+ case MBIM_NW_ERROR_ILLEGAL_MS:
+ return g_error_new (MM_MOBILE_EQUIPMENT_ERROR,
+ MM_MOBILE_EQUIPMENT_ERROR_GPRS_ILLEGAL_MS,
+ "Illegal MS");
case MBIM_NW_ERROR_IMSI_UNKNOWN_IN_VLR:
return g_error_new (MM_MOBILE_EQUIPMENT_ERROR,
MM_MOBILE_EQUIPMENT_ERROR_GPRS_IMSI_UNKNOWN_IN_VLR,
@@ -227,6 +231,26 @@ mm_mobile_equipment_error_from_mbim_nw_error (MbimNwError nw_error)
return g_error_new (MM_MOBILE_EQUIPMENT_ERROR,
MM_MOBILE_EQUIPMENT_ERROR_GPRS_CONGESTION,
"Congestion");
+ case MBIM_NW_ERROR_GSM_AUTHENTICATION_UNACCEPTABLE:
+ return g_error_new (MM_MOBILE_EQUIPMENT_ERROR,
+ MM_MOBILE_EQUIPMENT_ERROR_GPRS_USER_AUTHENTICATION_FAILED,
+ "GSM authentication unacceptable");
+ case MBIM_NW_ERROR_NOT_AUTHORIZED_FOR_CSG:
+ return g_error_new (MM_MOBILE_EQUIPMENT_ERROR,
+ MM_MOBILE_EQUIPMENT_ERROR_GPRS_USER_AUTHENTICATION_FAILED,
+ "Not authorized for this CSG");
+ case MBIM_NW_ERROR_SERVICE_OPTION_NOT_SUPPORTED:
+ return g_error_new (MM_MOBILE_EQUIPMENT_ERROR,
+ MM_MOBILE_EQUIPMENT_ERROR_GPRS_SERVICE_OPTION_NOT_SUPPORTED,
+ "Service option not supported");
+ case MBIM_NW_ERROR_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED:
+ return g_error_new (MM_MOBILE_EQUIPMENT_ERROR,
+ MM_MOBILE_EQUIPMENT_ERROR_GPRS_SERVICE_OPTION_NOT_SUBSCRIBED,
+ "Requested service option not subscribed");
+ case MBIM_NW_ERROR_SERVICE_OPTION_TEMPORARILY_OUT_OF_ORDER:
+ return g_error_new (MM_MOBILE_EQUIPMENT_ERROR,
+ MM_MOBILE_EQUIPMENT_ERROR_GPRS_SERVICE_OPTION_OUT_OF_ORDER,
+ "Service option temporarily out of order");
default:
return g_error_new (MM_MOBILE_EQUIPMENT_ERROR,
MM_MOBILE_EQUIPMENT_ERROR_GPRS_UNKNOWN,