bearer-mbim: stop trying to reload stats on OperationNotAllowed
The Sierra Wireless EM7345 reports OperationNotAllowed when trying to
load stats, just cancel stats reloading if so.
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)
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user