Re: [PATCH 1/1] broadband-modem-qmi: add QMI_PROTOCOL_ERROR_NOT_SUPPORTED case for pin status checking

2016-10-25 Thread Aleksander Morgado
On 25/10/16 14:50, Daniele Palmas wrote:
> Telit LE922A does not like the legacy way for checking pin status, but
> instead of returning QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND, it returns
> QMI_PROTOCOL_ERROR_NOT_SUPPORTED, making the modem not to be fully
> initialized.
> 
> This patch adds QMI_PROTOCOL_ERROR_NOT_SUPPORTED as another error for
> which the new pin checking status way is tried.
> ---

Pushed to git master and mm-1-6; thanks!


>  src/mm-broadband-modem-qmi.c | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
> index 1a13791..44c346a 100644
> --- a/src/mm-broadband-modem-qmi.c
> +++ b/src/mm-broadband-modem-qmi.c
> @@ -1740,7 +1740,10 @@ dms_uim_get_pin_status_ready (QmiClientDms *client,
>  /* We get InvalidQmiCommand on newer devices which don't like the 
> legacy way */
>  if (g_error_matches (error,
>   QMI_PROTOCOL_ERROR,
> - QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND)) {
> + QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND) ||
> +g_error_matches (error,
> + QMI_PROTOCOL_ERROR,
> + QMI_PROTOCOL_ERROR_NOT_SUPPORTED)) {
>  g_error_free (error);
>  qmi_message_dms_uim_get_pin_status_output_unref (output);
>  /* Flag that the command is unsupported, and try with the new 
> way */
> 


-- 
Aleksander
https://aleksander.es
___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel


[PATCH 1/1] broadband-modem-qmi: add QMI_PROTOCOL_ERROR_NOT_SUPPORTED case for pin status checking

2016-10-25 Thread Daniele Palmas
Telit LE922A does not like the legacy way for checking pin status, but
instead of returning QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND, it returns
QMI_PROTOCOL_ERROR_NOT_SUPPORTED, making the modem not to be fully
initialized.

This patch adds QMI_PROTOCOL_ERROR_NOT_SUPPORTED as another error for
which the new pin checking status way is tried.
---
 src/mm-broadband-modem-qmi.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
index 1a13791..44c346a 100644
--- a/src/mm-broadband-modem-qmi.c
+++ b/src/mm-broadband-modem-qmi.c
@@ -1740,7 +1740,10 @@ dms_uim_get_pin_status_ready (QmiClientDms *client,
 /* We get InvalidQmiCommand on newer devices which don't like the 
legacy way */
 if (g_error_matches (error,
  QMI_PROTOCOL_ERROR,
- QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND)) {
+ QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND) ||
+g_error_matches (error,
+ QMI_PROTOCOL_ERROR,
+ QMI_PROTOCOL_ERROR_NOT_SUPPORTED)) {
 g_error_free (error);
 qmi_message_dms_uim_get_pin_status_output_unref (output);
 /* Flag that the command is unsupported, and try with the new way 
*/
-- 
2.7.4

___
ModemManager-devel mailing list
ModemManager-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel