aboutsummaryrefslogtreecommitdiffstats
path: root/src/libqmi-glib
Commit message (Collapse)AuthorAgeFilesLines
* libqmi-glib,device: don't warn on mismatched driver if no_file_checkAleksander Morgado2017-02-101-1/+1
|
* build: update copyright yearsAleksander Morgado2017-02-1025-14/+25
|
* libqmi-glib,wms: fix QmiWmsCdmaCauseCode enumeration valuesAleksander Morgado2017-02-102-59/+366
| | | | | | They all had the WDS prefix instead of WMS, so fix that. We include the old names in -compat to avoid breaking API.
* docs: update enums, flags and errors documentationAleksander Morgado2017-02-1015-99/+1461
|
* docs: update compat symbols documentationAleksander Morgado2017-02-102-48/+62
|
* docs: update QmiProxy documentationAleksander Morgado2017-02-102-35/+65
|
* docs: update utils documentationAleksander Morgado2017-02-102-402/+478
|
* docs: update QmiMessageContext documentationAleksander Morgado2017-02-102-32/+70
|
* docs: update QmiMessage documentationAleksander Morgado2017-02-102-841/+948
|
* docs: update versioning documentationAleksander Morgado2017-02-101-0/+8
|
* docs: update QmiClient documentationAleksander Morgado2017-02-102-93/+193
|
* docs: update QmiDevice documentationAleksander Morgado2017-02-102-470/+610
|
* libqmi-glib,client: qmi_client_process_indication() is privateAleksander Morgado2017-02-093-5/+9
|
* libqmi-glib,device: add version introduced to qmi_device_command_full()Aleksander Morgado2017-02-091-0/+4
|
* libqmi-glib,device: new qmi_device_close_async() operationAleksander Morgado2017-02-092-53/+97
| | | | | | | | | | | | | | | The sync close operation that was implemented was partially useless because the source responsible for I/O was scheduled in the main context, so we were really relying on that main context to be still running to properly finish the operation. i.e. a qmi_device_close() after the default main loop was stopped would always end up with a timeout error, as the response was never read. So, we now modify the sync operation so that it doesn't do any explicit wait for the response, we just issue the MBIM close command. And we provide a new async operation that may be used to wait for the MBIM close response.
* libqmi-glib,device: ignore driver checking when no-file-check is setAleksander Morgado2017-02-081-3/+6
| | | | | E.g. during the test fixtures in the unit tests, where we create QmiDevices for non-existent devices.
* libqmi-glib,device: consolidate iostream removal in a single methodAleksander Morgado2017-02-081-49/+8
|
* libqmi-glib: new 'auto' flag to select automatically QMI or MBIM modeAleksander Morgado2017-02-084-4/+98
|
* build,all: enable -Wtype-limits and fix some comparisonsDan Williams2017-02-061-1/+1
| | | | | -Wtype-limits warns when comparing unsigned variables <= 0, which we shouldn't be doing.
* glib: remove invocations of g_type_init()Ben Chan2017-02-033-3/+0
| | | | | | | g_type_init() has been deprecated (and also marked with the attribute 'deprecated') since glib 2.36 as the type system is automatically initialized. Since the minimum version of glib required by libqmi is 2.36, calling g_type_init() isn't necessarily in the libqmi code.
* libqmi-glib,test: use pid in virtual port namesAleksander Morgado2017-02-021-1/+6
| | | | | So that running the same test at the same time in the same machine (e.g. during the jenkins jobs...) doesn't crash.
* libqmi-glib,device: fix error reporting on MBIM device closeAleksander Morgado2017-02-011-1/+1
|
* dms: disable all HP device modes that we're not so sure aboutAleksander Morgado2017-01-291-11/+1
| | | | We just leave 'fastboot', which is the one required for firmware update.
* libqmi-glib: support vendor-specific request/responsesAleksander Morgado2017-01-299-116/+498
| | | | | | | | | | | | | | We want to support non-standard messages that may be encoded with different TLVs depending on how the vendor implemented them. Anyway, right now this is really just to support the correct translation of TLVs and message contents in the get_printable() methods. The support is only included for QMI request/responses, and not for QMI indications. This is because the library knows in which moment the requests are created (and can apply the same rules to the matched response when it is received). For the indications, though, there is no such context configurable yet.
* dms: renamed DMS 0x5556 to 'HP Change Device Mode'Aleksander Morgado2017-01-291-0/+23
| | | | | | | | Also, define a new QmiDmsHpDeviceMode enumeration with the modes found out of the HPlt4120. Note this command is flagged as 'HP' because it only applies to HP devices, at least only to the HPlt4120.
* libqmi-glib: flag internal method as suchAleksander Morgado2017-01-231-0/+1
|
* dms: implement 'Get/Set Boot Image Download Mode'Aleksander Morgado2017-01-161-0/+15
|
* libqmi-glib,device: fix segfault when cancellable already cancelledAleksander Morgado2017-01-151-0/+8
| | | | | | | | | | | | | | | | Thread 1 received signal SIGSEGV, Segmentation fault. 0x00007ffff79c9105 in transaction_cancelled (cancellable=0x7fffe4009420, ctx=0x669a30) at qmi-device.c:268 268 tr->cancellable_id = 0; The g_cancellable_connect() method will also call the given callback when the input cancellable is already cancelled. This means that the cancellation callback should also handle the case where the transaction hasn't been stored in the tracking table yet. Thanks to Benoît Donnette <benoit.donnette@21net.com> for the report and the suggested fix. https://bugs.freedesktop.org/show_bug.cgi?id=98283
* libqmi-glib,device: always create transactions tracking tableAleksander Morgado2017-01-151-4/+3
| | | | | Just easier; an empty GHashTable in the worst case where the device is not used at all shouldn't be an issue.
* libqmi-glib,device: fix releasing transaction on mbim errorAleksander Morgado2017-01-151-0/+1
| | | | | | | | | | If we don't release the transaction on the MBIM error, we will end up asserting on QmiDevice's finalize() when validating that there aren't pending transactions. [04 Jan 2017, 14:46:22] [Debug] [qfu-updater] error (ignored): couldn't close QMI device: Transaction timed out Qmi:ERROR:qmi-device.c:3262:finalize: assertion failed: (g_hash_table_size (self->priv->transactions) == 0) Aborted
* build: set qmi-pdc.h as nodistAleksander Morgado2016-10-311-0/+1
|
* libqmi-glib,device: make sure transaction ids are uniqueAleksander Morgado2016-10-281-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Otherwise, we may end up with transactions timing out and segfaulting as they aren't found in the tracking table (e.g. if the replacing transaction finishes before the timeout of the replaced transaction is fired off). ==573== Command: /usr/libexec/qmi-proxy --no-exit --verbose ==573== Parent PID: 567 ==573== ==573== Invalid write of size 8 ==573== at 0x4E9A07A: transaction_timed_out (qmi-device.c:248) ==573== by 0x5D24EB2: ??? (in /usr/lib/libglib-2.0.so.0.5000.1) ==573== by 0x5D24439: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.5000.1) ==573== by 0x5D247EF: ??? (in /usr/lib/libglib-2.0.so.0.5000.1) ==573== by 0x5D24B11: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.5000.1) ==573== by 0x40139D: main (qmi-proxy.c:220) ==573== Address 0x10 is not stack'd, malloc'd or (recently) free'd ==573== ==573== ==573== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==573== Access not within mapped region at address 0x10 ==573== at 0x4E9A07A: transaction_timed_out (qmi-device.c:248) ==573== by 0x5D24EB2: ??? (in /usr/lib/libglib-2.0.so.0.5000.1) ==573== by 0x5D24439: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.5000.1) ==573== by 0x5D247EF: ??? (in /usr/lib/libglib-2.0.so.0.5000.1) ==573== by 0x5D24B11: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.5000.1) ==573== by 0x40139D: main (qmi-proxy.c:220) ==573== If you believe this happened as a result of a stack ==573== overflow in your program's main thread (unlikely but ==573== possible), you can try to increase the size of the ==573== main thread stack using the --main-stacksize= flag. ==573== The main thread stack size used in this run was 8388608.
* libqmi-glib,device: make sure transaction is removed from table on early errorsAleksander Morgado2016-10-271-16/+28
|
* libqmi-glib,proxy: fix segfault when trying to use already disposed clientsAleksander Morgado2016-10-271-79/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the client which originated the request exits (e.g. HUP received in its socket) before the actual response from the QmiDevice arrives, we'll end up trying to access the Client info (as kept in request->client) even if it has already been freed. Fix that, by making the Client a ref-counted object, and passing around full references of the Client where needed, e.g.: * In the async callbacks where Client is passed as data. * Inside each Request. Doing this we make sure each operation has a totally valid Client until the operation finishes, even if the client gets disconnected in between. ==311== Invalid read of size 8 ==311== at 0x4E9381C: track_cid (qmi-proxy.c:443) ==311== by 0x4E93A45: device_command_ready (qmi-proxy.c:492) ==311== by 0x52BEC18: g_simple_async_result_complete (gsimpleasyncresult.c:777) ==311== by 0x52BEC4E: complete_in_idle_cb (gsimpleasyncresult.c:789) ==311== by 0x583FA6D: g_idle_dispatch (gmain.c:5250) ==311== by 0x583D47A: g_main_dispatch (gmain.c:3065) ==311== by 0x583E237: g_main_context_dispatch (gmain.c:3641) ==311== by 0x583E463: g_main_context_iterate (gmain.c:3712) ==311== by 0x583E79C: g_main_loop_run (gmain.c:3906) ==311== by 0x401411: main (qmi-proxy.c:220) ==311== Address 0x87c7450 is 48 bytes inside a block of size 64 free'd ==311== at 0x4C2A0C0: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==311== by 0x584519E: g_free (gmem.c:197) ==311== by 0x585BBF6: g_slice_free1 (gslice.c:1124) ==311== by 0x4E92CC5: client_free (qmi-proxy.c:149) ==311== by 0x4E92DD4: connection_close (qmi-proxy.c:177) ==311== by 0x4E93CFF: connection_readable_cb (qmi-proxy.c:586) ==311== by 0x52C2A4D: socket_source_dispatch (gsocket.c:3264) ==311== by 0x583D47A: g_main_dispatch (gmain.c:3065) ==311== by 0x583E237: g_main_context_dispatch (gmain.c:3641) ==311== by 0x583E463: g_main_context_iterate (gmain.c:3712) ==311== by 0x583E79C: g_main_loop_run (gmain.c:3906) ==311== by 0x401411: main (qmi-proxy.c:220) ==311== Block was alloc'd at ==311== at 0x4C2B3D0: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==311== by 0x584502D: g_malloc (gmem.c:104) ==311== by 0x585B990: g_slice_alloc (gslice.c:1016) ==311== by 0x585B9D4: g_slice_alloc0 (gslice.c:1042) ==311== by 0x4E93FC5: incoming_cb (qmi-proxy.c:655) ==311== by 0x60F2A4B: ffi_call_unix64 (unix64.S:75) ==311== by 0x60F24B8: ffi_call (ffi64.c:492) ==311== by 0x55BB773: g_cclosure_marshal_generic (gclosure.c:1454) ==311== by 0x55BA093: g_closure_invoke (gclosure.c:777) ==311== by 0x55D1B45: signal_emit_unlocked_R (gsignal.c:3586) ==311== by 0x55D0F00: g_signal_emit_valist (gsignal.c:3340) ==311== by 0x55D1383: g_signal_emit (gsignal.c:3386) and: ==9308== Invalid read of size 8 ==9308== at 0x4E93641: device_new_ready (qmi-proxy.c:348) ==9308== by 0x52BEC18: g_simple_async_result_complete (gsimpleasyncresult.c:777) ==9308== by 0x52BEC4E: complete_in_idle_cb (gsimpleasyncresult.c:789) ==9308== by 0x583FA6D: g_idle_dispatch (gmain.c:5250) ==9308== by 0x583D47A: g_main_dispatch (gmain.c:3065) ==9308== by 0x583E237: g_main_context_dispatch (gmain.c:3641) ==9308== by 0x583E463: g_main_context_iterate (gmain.c:3712) ==9308== by 0x583E79C: g_main_loop_run (gmain.c:3906) ==9308== by 0x401411: main (qmi-proxy.c:220) ==9308== Address 0x8d04930 is 32 bytes inside a block of size 72 free'd ==9308== at 0x4C2A0C0: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==9308== by 0x584519E: g_free (gmem.c:197) ==9308== by 0x585BBF6: g_slice_free1 (gslice.c:1124) ==9308== by 0x4E92EAB: client_free (qmi-proxy.c:159) ==9308== by 0x4E92FBA: connection_close (qmi-proxy.c:187) ==9308== by 0x4E93FC1: connection_readable_cb (qmi-proxy.c:626) ==9308== by 0x52C2A4D: socket_source_dispatch (gsocket.c:3264) ==9308== by 0x583D47A: g_main_dispatch (gmain.c:3065) ==9308== by 0x583E237: g_main_context_dispatch (gmain.c:3641) ==9308== by 0x583E463: g_main_context_iterate (gmain.c:3712) ==9308== by 0x583E79C: g_main_loop_run (gmain.c:3906) ==9308== by 0x401411: main (qmi-proxy.c:220) ==9308== Block was alloc'd at ==9308== at 0x4C2B3D0: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==9308== by 0x584502D: g_malloc (gmem.c:104) ==9308== by 0x585B990: g_slice_alloc (gslice.c:1016) ==9308== by 0x585B9D4: g_slice_alloc0 (gslice.c:1042) ==9308== by 0x4E94287: incoming_cb (qmi-proxy.c:695) ==9308== by 0x60F2A4B: ffi_call_unix64 (unix64.S:75) ==9308== by 0x60F24B8: ffi_call (ffi64.c:492) ==9308== by 0x55BB773: g_cclosure_marshal_generic (gclosure.c:1454) ==9308== by 0x55BA093: g_closure_invoke (gclosure.c:777) ==9308== by 0x55D1B45: signal_emit_unlocked_R (gsignal.c:3586) ==9308== by 0x55D0F00: g_signal_emit_valist (gsignal.c:3340) ==9308== by 0x55D1383: g_signal_emit (gsignal.c:3386)
* libqmi-glib,proxy: plug memleak on command errorAleksander Morgado2016-10-271-0/+1
|
* libqmi-glib,proxy: print error message on response forwarding error, and ↵Aleksander Morgado2016-10-271-1/+4
| | | | plug memleak
* libqmi-glib,proxy: print error message on proxy open response error, and ↵Aleksander Morgado2016-10-271-0/+2
| | | | plug memleak
* libqmi-glib,proxy: print error message when indication cannot be forwardedAleksander Morgado2016-10-271-1/+1
|
* build: include PDC service enums in distAleksander Morgado2016-10-271-0/+2
| | | | https://bugs.freedesktop.org/show_bug.cgi?id=98459
* pdc: new PDC service implementationAliaksandr Barouski2016-10-265-1/+81
| | | | Added calls for configure hp4120 LTE modem
* wds: add more TLVs and ModifyProfile/DeleteProfile requestsDan Williams2016-10-061-0/+26
|
* wds: add more Profile-related TLVsDan Williams2016-10-061-1/+37
|
* wds: add Set Event Report and Event Report IndicationDan Williams2016-10-061-20/+296
|
* qmi-device: assume reasonable DMS version if WDS is high enoughDan Williams2016-09-301-7/+25
| | | | | Some devices (Quectel EC21) lie about their supported DMS version, so assume a reasonable DMS version if the WDS version is high enough.
* libqmi-glib,device: avoid unref-ing MBIM message if none receivedAleksander Morgado2016-07-071-1/+2
|
* libqmi-glib,device: fix build with mbim-qmux disabledAleksander Morgado2016-07-071-7/+12
|
* libqmi-glib,version: new symbol to flag qmi-over-mbim supportAleksander Morgado2016-07-071-0/+17
|
* libqmi-glib,mbim: run the mbim close operation synchronouslyAleksander Morgado2016-07-071-20/+40
|
* libqmi-glib,mbim: don't create mbim device multiple timesAleksander Morgado2016-07-071-0/+9
|
* libqmi-glib,mbim: rework transaction management on mbim backendAleksander Morgado2016-07-072-56/+159
| | | | | | | | | | | | | | | The lifecycle for transactions going through the MBIM backend is a bit different w.r.t. the default one: * Given that libmbim has its own timeout management for the commands sent, we will rely on it instead of having our own. This means that we always assume that mbim_command() finishes, as it should be. * Instead of using the response QMI message to match a transaction, when using MBIM we use the transaction key given in the context passed to mbim_command() and by doing this we make sure that the transaction is always removed from the tracking table, regardless of whether the QMI message inside matched or not.