[PATCH] modem-helpers-mbim: map more MbimNwError to MMMobileEquipmentError

Aleksander Morgado aleksander at aleksander.es
Mon Jun 9 14:10:42 PDT 2014


On Mon, Jun 9, 2014 at 11:06 PM, Ben Chan <benchan at chromium.org> wrote:
> 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.
> ---
> Hi Aleksander,
>
> This patch requires libmbim >= 1.9.0, which can be committed after libmbim
> releases a newer stable version. Could you help update the version?
>

Just bump the requirement to 1.9.0 in the configure.ac along with the
patch, and I'll re-bump it to the stable version when we release the
new libmbim. We should likely release libmbim once the proxy patches
are all in, so should be soon.

> Thanks,
> Ben
>
>
>  src/mm-modem-helpers-mbim.c | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>
> diff --git a/src/mm-modem-helpers-mbim.c b/src/mm-modem-helpers-mbim.c
> index 8060ace..b819c29 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,
> --
> 2.0.0.526.g5318336
>



-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list