[PATCH] bearer-mbim: stop trying to reload stats on OperationNotAllowed

Aleksander Morgado aleksander at aleksander.es
Wed Aug 9 10:05:29 UTC 2017


On 07/08/17 17:40, Dan Williams wrote:
> On Sun, 2017-08-06 at 13:21 +0200, Aleksander Morgado wrote:
>> The Sierra Wireless EM7345 reports OperationNotAllowed when trying to
>> load stats, just cancel stats reloading if so.
> 
> LGTM.
> 

Pushed to git master.

>>     ModemManager[8318]: [/dev/cdc-wdm1] Received message
>> (translated)...
>>     >>>>>> Header:
>>     >>>>>>   length      = 48
>>     >>>>>>   type        = command-done (0x80000003)
>>     >>>>>>   transaction = 24
>>     >>>>>> Fragment header:
>>     >>>>>>   total   = 1
>>     >>>>>>   current = 0
>>     >>>>>> Contents:
>>     >>>>>>   status error = 'OperationNotAllowed' (0x0000001c)
>>     >>>>>>   service      = 'basic-connect' (a289cc33-bcbb-8b4f-b6b0-
>> 133ec2aae6df)
>>     >>>>>>   cid          = 'packet-statistics' (0x00000014)
>> ---
>>  src/mm-bearer-mbim.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/src/mm-bearer-mbim.c b/src/mm-bearer-mbim.c
>> index 62f774d4..6d7aea6d 100644
>> --- a/src/mm-bearer-mbim.c
>> +++ b/src/mm-bearer-mbim.c
>> @@ -169,6 +169,9 @@ packet_statistics_query_ready (MbimDevice
>> *device,
>>          stats->rx_bytes = in_octets;
>>          stats->tx_bytes = out_octets;
>>          g_task_return_pointer (task, stats, g_free);
>> +    } else if (g_error_matches (error, MBIM_STATUS_ERROR,
>> MBIM_STATUS_ERROR_OPERATION_NOT_ALLOWED)) {
>> +        g_clear_error (&error);
>> +        g_task_return_new_error (task, MM_CORE_ERROR,
>> MM_CORE_ERROR_UNSUPPORTED, "operation not allowed");
>>      } else
>>          g_task_return_error (task, error);
>>  


-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list