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
This commit is contained in:
Ben Chan
2014-06-10 10:18:28 +02:00
committed by Aleksander Morgado
parent 0b975f2266
commit 235fb874c9
2 changed files with 25 additions and 1 deletions
+1 -1
View File
@@ -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
+24
View File
@@ -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,