summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-08-08device: avoid signals sent to the qmi-proxy processqmi-1-12Aleksander Morgado1-1/+8
If e.g. qmi-proxy is started by ModemManager and we send a Ctrl+C to it, the signal would be propagated to the qmi-proxy process and we would kill it right away, while leaving ModemManager still around wondering why the socket to the proxy got a HUP. Avoid this, by making sure the qmi-proxy gets its own process group. (cherry picked from commit 88ca109f9ca29fcff9651e2ac8930e6c3600ac64)
2017-04-18libqmi-glib,device: fix memleak in set_instance_id() logicAleksander Morgado1-0/+1
(cherry picked from commit fed84d99cd5e155be41dc55e599a3f5f5881cc7a)
2017-01-15libqmi-glib,device: fix segfault when cancellable already cancelledAleksander Morgado1-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 (cherry picked from commit e57f062e666b9a0686e38e3722664b4b2ac9658c)
2016-04-05qmicli: avoid redefining shutdown()Aleksander Morgado6-252/+252
(cherry picked from commit f7e2a3c5981e2a743aad4b986355fe1de632e67e)
2016-04-05qmicli,wds: new '--wds-get-current-settings' actionAleksander Morgado1-0/+175
Will print the IPv4 and IPv6 settings when connected. This information can be used to statically set the network interface configuration, instead of relying on a DHCP client. (cherry picked from commit 543cf5c93984139865f919e7348bff2b54c16f39)
2016-03-25libqmi-glib: use ((guint64) 1) << 31 for QMI_*_BAND_CAPABILITY_BC_15Reinhard Speyerer2-2/+2
The current definition of QMI_*_BAND_CAPABILITY_BC_15 gets converted to a negative value (0xffffffff80000000) which causes false positives for BC15 to be returned from dms_add_qmi_bands() and nas_add_qmi_bands() in ModemManager/src/mm-modem-helpers-qmi.c when a matching QMI band (e.g. WCDMA900) is present in qmi_bands like in this example https://lists.freedesktop.org/archives/libqmi-devel/2016-March/001572.html . Replace 1 << 31 with ((guint64) 1) << 31 for QMI_*_BAND_CAPABILITY_BC_15 to avoid incorrect mmcli "Bands | supported: 'cdma-bc15-aws, ...'" output. Signed-off-by: Reinhard Speyerer <rspmn@arcor.de> (cherry picked from commit 0f7849ce05f3e26283652c20e5392161c1cfeeaf)
2016-03-22build: post release version bump to 1.12.11Aleksander Morgado1-1/+1
2016-03-22release: bump version to 1.12.101.12.10Aleksander Morgado1-3/+3
2016-03-22NEWS: update for 1.12.10Aleksander Morgado1-0/+19
2016-03-22libqmi-glib: handle api break introduced in 7ca279e9a42 (released in 1.12.8)Aleksander Morgado4-0/+115
Commit 7ca279e9a42 introduced a couple of method renames that shouldn't have been done, because they were done in the 1.12.x stable series and soname wasn't bumped. We try to recover from that issue, by providing a set of stub methods that keep the old API methods that were available in 1.12.6, while also keeping the new API methods introduced in 1.12.8. Reported by: Michael Biebl <biebl@debian.org>
2016-03-21build: run configure script from builddir rather than srcdirAleksander Morgado1-3/+4
Based on an equivalent patch from Philip Withnall <philip@tecnocode.co.uk> for libmbim; see: https://bugs.freedesktop.org/show_bug.cgi?id=94639 (cherry picked from commit 2b9ed332357d0ddf8a4fc4ffd7a5c0ec8c3126eb)
2016-03-20qmicli: fix --dms-get-band-capabilities output on 32-bit platformsReinhard Speyerer1-1/+1
The @enum_name@_build_string_from_mask template in qmi-flags64-types-template.c uses a local gulong number variable. On platforms where sizeof(gulong) < sizeof(Qmi*BandCapability) this may cause bands to be missing from qmicli output or incorrect bands to be contained in the output. Replace gulong number with guint64 number to fix this. Signed-off-by: Reinhard Speyerer <rspmn@arcor.de> (cherry picked from commit 3df66e941cfd1c14fdcf7dac67c17c6eb0de6ca6)
2016-03-03trivial: whitespace fixesDan Williams12-423/+423
(cherry picked from commit 3465107153e373adfd4e50ac90259ed25d556bed)
2016-02-11build: post release version bump to 1.12.9Aleksander Morgado1-1/+1
2016-02-11release: bump version to 1.12.81.12.8Aleksander Morgado2-1/+15
2016-02-10qmi-codegen: fix too-small transaction id in internal message codeDan Williams1-1/+1
Found by John. https://bugs.freedesktop.org/show_bug.cgi?id=94083 (cherry picked from commit fea234dd1ea6f8d558b32d93e127a5bd73e5ae04)
2016-02-08qmicli: fix PLMN printingBjørn Mork1-2/+6
BCD PLMNs with 2 digit MNCs will have an 'F' digit between the MCC and the MNC. This maps to \0, which would cause a truncated result string with only the MCC. Signed-off-by: Bjørn Mork <bjorn@mork.no> (cherry picked from commit 6f988368fdac492fa4289ae1c633c84d7abc39c6)
2016-01-06libqmi-glib,device: debug-print raw invalid QMI messages tooDan Williams1-0/+14
(cherry picked from commit 43b95747226e34b2b5e66cb60061ed39035d421d)
2015-12-04nas: correct ID for Get RF Band Information result TLVAlbert Diserholt1-1/+1
(cherry picked from commit 2f70d96a022e9c5ce960ecc8e915f814f1303ee6)
2015-08-31dms: avoid using 'new' as a variable nameDan Williams1-2/+2
Reported-by: Tom Schuring (cherry picked from commit 97aaa6855d071f64ec2e28df1b9f816da02a3e07)
2015-02-25build: post release version bump to 1.12.7Aleksander Morgado1-1/+1
2015-02-25release: bump version to 1.12.61.12.6Aleksander Morgado2-1/+7
2015-02-24libqmi-glib,message: fix big-endian handling of tlv->length (debian #778346)Aleksander Morgado1-4/+4
tlv->length is little-endian, so access to it must be protected with GUINT16_FROM_LE/GUINT16_TO_LE. Fixes testcase failures on PPC32. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778346 (cherry picked from commit 33df1d40d02ea453e8b0b31343fc64f185eef479)
2015-02-10build: post release version bump to 1.12.5Aleksander Morgado1-1/+1
2015-02-10release: bump version to 1.12.41.12.4Aleksander Morgado2-1/+10
2015-02-10dms: new 'DMS Set FCC Authentication' messageAleksander Morgado3-0/+57
Dell-branded Sierra modems, like the Dell DW5570 (Sierra Wireless MC8805) need this specific command before they can be put in 'online' mode: $ sudo qmicli -d /dev/cdc-wdm1 --dms-get-operating-mode [/dev/cdc-wdm1] Operating mode retrieved: Mode: 'low-power' HW restricted: 'no' $ sudo qmicli -d /dev/cdc-wdm1 --dms-set-fcc-authentication [/dev/cdc-wdm1] Successfully set FCC authentication $ sudo qmicli -d /dev/cdc-wdm1 --dms-get-operating-mode [/dev/cdc-wdm1] Operating mode retrieved: Mode: 'online' HW restricted: 'no' https://bugzilla.kernel.org/show_bug.cgi?id=92101
2015-02-04wds: last call TX/RX stats in 'Get Packet Statistics' don't have prerequisiteAleksander Morgado1-4/+3
These values may be given along with a QMI error (e.g. out-of-call), so don't assume that a success operation is a prerequisite to read them. [04 Feb 2015, 20:55:07] [Debug] [/dev/cdc-wdm1] Received message... >>>>>> RAW: >>>>>> length = 42 >>>>>> data = 01:29:00:80:01:08:02:0D:00:24:00:1D:00:02:04:00:01:00:0F:00:1C:08:00:2B:17:00:00:00:00:00:00:1B:08:00:87:28:00:00:00:00:00:00 [04 Feb 2015, 20:55:07] [Debug] [/dev/cdc-wdm1] Received message (translated)... >>>>>> QMUX: >>>>>> length = 41 >>>>>> flags = 0x80 >>>>>> service = "wds" >>>>>> client = 8 >>>>>> QMI: >>>>>> flags = "response" >>>>>> transaction = 13 >>>>>> tlv_length = 29 >>>>>> message = "Get Packet Statistics" (0x0024) >>>>>> TLV: >>>>>> type = "Result" (0x02) >>>>>> length = 4 >>>>>> value = 01:00:0F:00 >>>>>> translated = FAILURE: OutOfCall >>>>>> TLV: >>>>>> type = "Last Call Rx Bytes Ok" (0x1c) >>>>>> length = 8 >>>>>> value = 2B:17:00:00:00:00:00:00 >>>>>> translated = 5931 >>>>>> TLV: >>>>>> type = "Last Call Tx Bytes Ok" (0x1b) >>>>>> length = 8 >>>>>> value = 87:28:00:00:00:00:00:00 >>>>>> translated = 10375
2015-01-28build: post release version bump to 1.12.3Aleksander Morgado1-1/+1
2015-01-28release: bump version to 1.12.21.12.2Aleksander Morgado2-1/+11
2015-01-25libqmi-glib,message: add missing services in get_printable() and ↵Aleksander Morgado1-0/+21
get_version_introduced()
2015-01-22libqmi-glib: fix read/write sized uints when the size is not multiple of 2Aleksander Morgado2-10/+4
2015-01-13libqmi-glib,test: fix compilation warnings in 32bit systemsAleksander Morgado1-15/+15
CC test_message-test-message.o cc1: warnings being treated as errors test-message.c: In function 'test_message_tlv_rw_64': test-message.c:702: error: integer constant is too large for 'long' type test-message.c:707: error: integer constant is too large for 'long' type test-message.c:712: error: integer constant is too large for 'long' type test-message.c:717: error: integer constant is too large for 'long' type test-message.c:745: error: integer constant is too large for 'long' type test-message.c:750: error: integer constant is too large for 'long' type test-message.c:755: error: integer constant is too large for 'long' type test-message.c:760: error: integer constant is too large for 'long' type test-message.c: In function 'test_message_tlv_rw_sized': test-message.c:790: error: integer constant is too large for 'long' type test-message.c: In function 'test_message_tlv_rw_mixed': test-message.c:1037: error: integer constant is too large for 'long' type test-message.c:1042: error: integer constant is too large for 'long' type test-message.c:1106: error: integer constant is too large for 'long' type test-message.c:1111: error: integer constant is too large for 'long' type test-message.c: In function 'test_message_tlv_write_overflow': test-message.c:1169: error: integer constant is too large for 'long' type test-message.c:1174: error: integer constant is too large for 'long' type make[4]: *** [test_message-test-message.o] Error 1
2015-01-13build: post release version bump to 1.12.1Aleksander Morgado1-1/+1
2015-01-13release: bump version to 1.12.01.12.0Aleksander Morgado1-4/+4
2015-01-13build: use absolute paths for the ignored files in subdirsAleksander Morgado1-52/+52
2015-01-13build: ignore built device owner rules fileAleksander Morgado1-0/+1
2015-01-13libqmi-glib,proxy: root user always allowedAleksander Morgado1-5/+4
Even if QMI_USERNAME is defined to a non-root user, root should always be able to access the proxy. E.g. ModemManager (run as root) must be able to launch and access the proxy even if QMI_USERNAME was set to a non-root user.
2015-01-11qmi-codegen: update copyright of built filesAleksander Morgado1-0/+1
2015-01-11qmi-codegen: avoid breaking API when defining strings in public structsAleksander Morgado4-11/+53
Commit b9c3701e337198 introduced an API break, where we would change a pointer to a heap allocated string and instead use a fixed size char array. This commit will instead recover the pointer to the string when used in a public struct, so that API isn't broken w.r.t. previous stable libqmi versions. The string is now properly allocated before reading and deallocated as part of the struct deallocation.
2015-01-11qmicli: update copyright datesAleksander Morgado1-2/+2
2015-01-09libqmi-glib,utils: avoid getpwnam() call if --enable-qmi-username not usedRoshan Pius3-7/+24
If --enable-qmi-username isn't explicitly used, we should just check for the root user UID, without using getpwnam(). See e.g. these SELinux warnings: SELinux is preventing /usr/bin/bash from read access on the file /etc/passwd. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that bash should be allowed read access on the passwd file by default. Then you should report this as a bug. You can generate a local policy module to allow this access. Do allow this access for now by executing: # grep qmi-proxy /var/log/audit/audit.log | audit2allow -M mypol # semodule -i mypol.pp
2014-12-30build: update NEWSAleksander Morgado1-5/+40
2014-12-30Fix bashism, as the script uses "sh", not "bash".Marius B. Kotsbak1-2/+2
See downstream bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772328
2014-12-24AUTHORS: updateAleksander Morgado1-3/+21
2014-12-19build: distribute the udev rules template regardless of --enable-qmi-usernameAleksander Morgado1-1/+1
Include the udev rules template in the distribution tarball even if the `--enable-qmi-username' option wasn't specified.
2014-12-19libqmi-glib,proxy: Change ownership of QMI devices to the configured user.Roshan Pius4-9/+49
Adding a udev rule to change ownership of all QMI devices to the configured user specified at compile time using --enable-qmi-username flag.
2014-12-12qmi-codegen: fix printing contents of structs with fixed sized stringsAleksander Morgado1-2/+4
If the fixed sized string contains no characters or is shorter than the explicit size, NUL bytes will be included. If we try to append exactly the size of the string, we'll end up with embedded NULs in our string to print, so the actual output will be cut, even if the string is longer after the embedded NUL bytes. E.g.: >>>>>> TLV: >>>>>> type = "GERAN Info" (0x10) >>>>>> length = 61 >>>>>> value = 00:00:00:00:00:00:00:00:00:00:00:00:FF:FF:FF:FF:28:00:03:7D:6F:00:00:32:F4:51:B3:00:4D:00:11:2A:00:8A:3C:00:00:32:F4:51:B3:00:63:00:30:14:00:89:3C:00:00:32:F4:51:B3:00:59:00:11:0D:00 >>>>>> translated = [ cell_id = '0' plmn = ' With this fix, we avoid this by explicitly finishing ourselves the fixed sized string with a NUL byte, and then adding the C string as the non-fixed sized ones, i.e. until the first NUL byte is found. E.g.: >>>>>> TLV: >>>>>> type = "GERAN Info" (0x10) >>>>>> length = 61 >>>>>> value = 00:00:00:00:00:00:00:00:00:00:00:00:FF:FF:FF:FF:28:00:03:7D:6F:00:00:32:F4:51:B3:00:4D:00:11:2A:00:8A:3C:00:00:32:F4:51:B3:00:63:00:30:14:00:89:3C:00:00:32:F4:51:B3:00:59:00:11:0D:00 >>>>>> translated = [ cell_id = '0' plmn = '' lac = '0' geran_absolute_rf_channel_number = '0' base_station_identity_code = '0' timing_advance = '4294967295' rx_level = '40' cell = '{ [0] = '[ cell_id = '28541' plmn = '2\xf4Q' lac = '179' geran_absolute_rf_channel_number = '77' base_station_identity_code = '17' rx_level = '42' ] ' [1] = '[ cell_id = '15498' plmn = '2\xf4Q' lac = '179' geran_absolute_rf_channel_number = '99' base_station_identity_code = '48' rx_level = '20' ] ' [2] = '[ cell_id = '15497' plmn = '2\xf4Q' lac = '179' geran_absolute_rf_channel_number = '89' base_station_identity_code = '17' rx_level = '13' ] '}' ]
2014-12-12qmi-codegen: fix public struct type generationAleksander Morgado7-16/+17
This change triggers an API break. When building structs to be included in the public header, we were just relying on using the 'public_format' of each variable. This is an error, as the variable may be more complex than just public/private. E.g. could be another struct, or an array, or a fixed sized string, as in the example. In particular, this bug currently affects one public type, where one of its elements changes from being just a pointer to a string to a fixed sized array of 4 bytes. The following type is changed from: typedef struct _QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement { guint32 cell_id; gchar * plmn; guint16 lac; guint16 geran_absolute_rf_channel_number; guint8 base_station_identity_code; guint16 rx_level; } QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement; To: typedef struct _QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement { guint32 cell_id; gchar plmn[4]; guint16 lac; guint16 geran_absolute_rf_channel_number; guint8 base_station_identity_code; guint16 rx_level; } QmiMessageNasGetCellLocationInfoOutputGeranInfoCellElement; Thanks to Joseba Sanjuan <joseba.sanjuan@gmail.com> for finding the bug.
2014-12-12libqmi,test: new test for QMI NAS Get Cell Info with GERANAleksander Morgado1-5/+63
Which currently fails: {*LOG(error):{Qmi-FATAL-CRITICAL: qmi_message_tlv_read_fixed_size_string: assertion 'out != NULL' failed}:LOG*} (/home/aleksander/Development/foss/libqmi/src/libqmi-glib/test/.libs/test-generated:12179): Qmi-CRITICAL **: qmi_message_tlv_read_fixed_size_string: assertion 'out != NULL' failed Program received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff717eae0 in g_logv () from /usr/lib/libglib-2.0.so.0 (gdb) bt #0 0x00007ffff717eae0 in g_logv () from /usr/lib/libglib-2.0.so.0 #1 0x00007ffff717ed1f in g_log () from /usr/lib/libglib-2.0.so.0 #2 0x00007ffff7a5381e in qmi_message_tlv_read_fixed_size_string (self=0x7fffe8007d30, tlv_offset=20, offset=0x7fffffffdcc8, string_length=3, out=0x0, error=0x0) at qmi-message.c:1817 #3 0x00007ffff7acce60 in __qmi_message_nas_get_cell_location_info_response_parse (message=0x7fffe8007d30, error=0x7fffffffded8) at qmi-nas.c:26772 #4 0x00007ffff7af46fa in get_cell_location_info_ready (device=0x64e8b0, res=0x65d990, simple=0x65d920) at qmi-nas.c:47982 #5 0x00007ffff76ff6d7 in g_simple_async_result_complete () from /usr/lib/libgio-2.0.so.0 #6 0x00007ffff76ff739 in ?? () from /usr/lib/libgio-2.0.so.0 #7 0x00007ffff717791d in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0 #8 0x00007ffff7177cf8 in ?? () from /usr/lib/libglib-2.0.so.0 #9 0x00007ffff7178022 in g_main_loop_run () from /usr/lib/libglib-2.0.so.0 #10 0x0000000000403e9b in test_fixture_loop_run (fixture=0x63c800) at test-fixture.c:321 #11 0x0000000000406da4 in test_generated_nas_get_cell_location_info (fixture=0x63c800) at test-generated.c:562 #12 0x00007ffff719d0f3 in ?? () from /usr/lib/libglib-2.0.so.0 #13 0x00007ffff719d2c2 in ?? () from /usr/lib/libglib-2.0.so.0 #14 0x00007ffff719d2c2 in ?? () from /usr/lib/libglib-2.0.so.0 #15 0x00007ffff719d2c2 in ?? () from /usr/lib/libglib-2.0.so.0 #16 0x00007ffff719d62b in g_test_run_suite () from /usr/lib/libglib-2.0.so.0 #17 0x00007ffff719d661 in g_test_run () from /usr/lib/libglib-2.0.so.0 #18 0x0000000000406ef0 in main (argc=1, argv=0x7fffffffe678) at test-generated.c:584 (gdb) fr 3 #3 0x00007ffff7acce60 in __qmi_message_nas_get_cell_location_info_response_parse (message=0x7fffe8007d30, error=0x7fffffffded8) at qmi-nas.c:26772 warning: Source file is more recent than executable. 26772 if (!qmi_message_tlv_read_fixed_size_string (message, init_offset, &offset, 3, &cell_aux.plmn[0], NULL)) (gdb) p cell_aux $1 = {cell_id = 28541, plmn = 0x0, lac = 0, geran_absolute_rf_channel_number = 0, base_station_identity_code = 0 '\000', rx_level = 0}
2014-12-08qmi-network: fix bashismsAleksander Morgado1-2/+2
Equivalent to the fix done in mbim-network, see: https://bugs.freedesktop.org/show_bug.cgi?id=87093