diff -Nru modemmanager-1.18.4/aclocal.m4 modemmanager-1.18.6/aclocal.m4 --- modemmanager-1.18.4/aclocal.m4 2021-11-26 09:23:51.000000000 +0000 +++ modemmanager-1.18.6/aclocal.m4 2022-02-11 10:33:19.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.3 -*- Autoconf -*- +# generated automatically by aclocal 1.16.5 -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -364,7 +364,7 @@ [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) ])dnl PKG_HAVE_DEFINE_WITH_MODULES -# Copyright (C) 2002-2020 Free Software Foundation, Inc. +# Copyright (C) 2002-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -379,7 +379,7 @@ [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.3], [], +m4_if([$1], [1.16.5], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -395,14 +395,14 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.3])dnl +[AM_AUTOMAKE_VERSION([1.16.5])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -454,7 +454,7 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -485,7 +485,7 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -676,7 +676,7 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -744,7 +744,7 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -772,6 +772,10 @@ # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl +m4_ifdef([_$0_ALREADY_INIT], + [m4_fatal([$0 expanded multiple times +]m4_defn([_$0_ALREADY_INIT]))], + [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -808,7 +812,7 @@ [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl @@ -860,6 +864,20 @@ [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi +AC_SUBST([CTAGS]) +if test -z "$ETAGS"; then + ETAGS=etags +fi +AC_SUBST([ETAGS]) +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi +AC_SUBST([CSCOPE]) + AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This @@ -941,7 +959,7 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -962,7 +980,7 @@ fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2020 Free Software Foundation, Inc. +# Copyright (C) 2003-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -984,7 +1002,7 @@ # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1019,7 +1037,7 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1062,7 +1080,7 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2020 Free Software Foundation, Inc. +# Copyright (C) 1997-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1096,7 +1114,7 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1125,7 +1143,7 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1172,7 +1190,7 @@ # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1191,7 +1209,7 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1272,7 +1290,7 @@ rm -f conftest.file ]) -# Copyright (C) 2009-2020 Free Software Foundation, Inc. +# Copyright (C) 2009-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1332,7 +1350,7 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2020 Free Software Foundation, Inc. +# Copyright (C) 2001-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1360,7 +1378,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2020 Free Software Foundation, Inc. +# Copyright (C) 2006-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1379,7 +1397,7 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2020 Free Software Foundation, Inc. +# Copyright (C) 2004-2021 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff -Nru modemmanager-1.18.4/build-aux/Makefile.in modemmanager-1.18.6/build-aux/Makefile.in --- modemmanager-1.18.4/build-aux/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/build-aux/Makefile.in 2022-02-11 10:33:20.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -156,6 +156,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -167,6 +169,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -397,7 +400,6 @@ cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/ChangeLog modemmanager-1.18.6/ChangeLog --- modemmanager-1.18.4/ChangeLog 2021-11-26 09:26:14.000000000 +0000 +++ modemmanager-1.18.6/ChangeLog 2022-02-11 10:34:43.000000000 +0000 @@ -1,3 +1,677 @@ +commit a7bcf2036b34d5043dbc33fee7d98bae5859c4d3 +Author: Aleksander Morgado +Date: Fri Feb 11 11:31:48 2022 +0100 + + release: bump version to 1.18.6 + + configure.ac | 2 +- + meson.build | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 3eb3e3d63710087836848de5278496826ab940dc +Author: Aleksander Morgado +Date: Fri Feb 11 11:31:14 2022 +0100 + + NEWS: update for 1.18.6 + + NEWS | 43 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 43 insertions(+) + +commit be9b04a03382dc78ba927899eab700e8476e8723 +Author: Xeonacid +Date: Wed Dec 22 12:17:22 2021 +0000 + + build,meson: Remove incorrect args for i18n.merge_file + + `i18n.merge_file` has been ignoring positional arguments for a time + and explicitly rejects with error since meson 0.60.0. + + (cherry picked from commit 922bc2df5f9242c8052abbab08ceddeef9e20de9) + + data/meson.build | 1 - + 1 file changed, 1 deletion(-) + +commit 030372d990d103ae12e8fda1562290693ee9138d +Author: Dylan Van Assche +Date: Sun Feb 6 18:49:16 2022 +0100 + + quectel: add name to device IDs + + fwupd expects device IDs which are unique for each device and its + variants. However, Quectel re-uses the same USB VID & PID among + different variants such as EG25, EC25, EC20, etc. Moreover, each + variant may have subvariants such as EG25GGB, EG25GGC, EG25AFF, + EG25AFX, etc. + + Add the name of the modem to the device IDs to build more unique + device + IDs such as USB\VID_2C7C&PID_0125&REV_0001&NAME_EC25GGB. + + (cherry picked from commit b70fd64417d8fbed10aa1eb5e5c720fcf1074782) + + plugins/quectel/mm-shared-quectel.c | 87 + +++++++++++++++++++++++++++++++------ + 1 file changed, 74 insertions(+), 13 deletions(-) + +commit 1a9b7d2ee0a7902715c6db95dd9892647a5c6784 +Author: Dylan Van Assche +Date: Sun Feb 6 18:47:24 2022 +0100 + + iface-modem-firmware: expose device id builder + + Expose the generic device id method as a public API for plugins. + Plugins can call this method first and then add their own device + ids on + top in case the generic ones aren't specific enough like in the + case of + Quectel modems. + + (cherry picked from commit 90397fa1bbae2297aca169f8fbfa981fa0f5d4e6) + + src/mm-iface-modem-firmware.c | 39 + +++++++++++++++++++++------------------ + src/mm-iface-modem-firmware.h | 4 ++++ + 2 files changed, 25 insertions(+), 18 deletions(-) + +commit 8b901058dd5723d54d2b045ae672e1c6dd24e47e +Author: Dylan Van Assche +Date: Sun Feb 6 18:44:12 2022 +0100 + + libmm-glib,firmware-update-settings: setter for method + + Allow to set the firmware update method even after + initialization of the MMFirmwareUpdateSettings object. + + (cherry picked from commit bdf4d898f6a490ce2c1c9dc41871c4baced1e37b) + + docs/reference/libmm-glib/libmm-glib-sections.txt | 1 + + libmm-glib/mm-firmware-update-settings.c | 12 ++++++++++++ + libmm-glib/mm-firmware-update-settings.h | 10 ++++++---- + 3 files changed, 19 insertions(+), 4 deletions(-) + +commit 4805251f2d374f54f18c73b3526ee29342a0d03e +Author: Aleksander Morgado +Date: Mon Jan 31 23:11:11 2022 +0100 + + broadband-modem-mbim: minor alignment fix + + (cherry picked from commit 8ae31be1beffec3c7642dfa4bad5fbb447c763b8) + + src/mm-broadband-modem-mbim.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 3265f184bcd05c5ceb79573a64592a2bd290dbd0 +Author: Aleksander Morgado +Date: Mon Jan 31 22:42:48 2022 +0100 + + shared-qmi: filter out modes not currently available + + Do not build the mask of "all" modes based only on the supported radio + interfaces, also filter out those modes that would not be available + based on the current capabilities enabled. + + (cherry picked from commit 9c08e54fb9d2f0b9341c2c98291551d8c9917c78) + + src/mm-shared-qmi.c | 8 ++++++++ + src/tests/test-modem-helpers-qmi.c | 2 +- + 2 files changed, 9 insertions(+), 1 deletion(-) + +commit 7d5a8db27339bff91b5f0b0320ae714c890c6344 +Author: Aleksander Morgado +Date: Mon Jan 31 22:34:56 2022 +0100 + + modem-helpers-qmi: multimode devices shouldn't always have 4G/5G + only modes + + In GSM/UMTS+CDMA/EVDO multimode devices, the 4G and 5G mode switching + operations are exclusively limited to the capability selection that + has LTE+5GNR exclusively. + + We cannot allow switching to 4G-only, 5G-only or 4G+5G if the current + capabilities have GSM/UMTS or CDMA/EVDO. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/503 + + (cherry picked from commit c7ff014e07ee5bfcfa4ba7e235c1c234ad77245a) + + src/mm-modem-helpers-qmi.c | 65 + +++++++++++++++++++------------------- + src/mm-modem-helpers-qmi.h | 8 +++++ + src/mm-shared-qmi.c | 9 ++++++ + src/tests/test-modem-helpers-qmi.c | 51 ++++++++++++++++++++++++++++++ + 4 files changed, 101 insertions(+), 32 deletions(-) + +commit 0b0362054a004e6313bdbdd4a544b5004275d336 +Author: Aleksander Morgado +Date: Sun Jan 30 23:04:15 2022 +0100 + + tests,modem-helpers-qmi: add tests for supported modes loading + + (cherry picked from commit ccf0b7eba2bf2abc2c81e5d68dc5872a15b515c2) + + src/tests/test-modem-helpers-qmi.c | 473 + +++++++++++++++++++++++++++++++++++++ + 1 file changed, 473 insertions(+) + +commit 53b0095cbfd96131e706365465804eb0bf7b56b0 +Author: Aleksander Morgado +Date: Sun Jan 30 21:33:38 2022 +0100 + + modem-helpers-qmi: new helper to build array of supported modes + + (cherry picked from commit b323a731370be607f2529b1df976ec64a4f7c2e8) + + src/mm-modem-helpers-qmi.c | 96 +++++++++++++++++++++++++++++++++++++++ + src/mm-modem-helpers-qmi.h | 17 +++++++ + src/mm-shared-qmi.c | 110 + +++++---------------------------------------- + 3 files changed, 125 insertions(+), 98 deletions(-) + +commit 8270de785debce715e194cfe41df4e66618cf8be +Author: Aleksander Morgado +Date: Sun Jan 30 17:48:50 2022 +0100 + + tests,modem-helpers-qmi: add additional tests for supported + capabilities loading + + Including tests for 5G-only and non-multimode 5G+4G and 5G+4G+3G + devices. + + (cherry picked from commit 6efde107142692996a5b9f44f323710baa8f40bc) + + src/tests/test-modem-helpers-qmi.c | 270 + ++++++++++++++++++++++++++++++++++--- + 1 file changed, 250 insertions(+), 20 deletions(-) + +commit 888da10d8f0ba5b0d58c4ab4966d1e7be828a1a4 +Author: Aleksander Morgado +Date: Sun Jan 30 17:43:34 2022 +0100 + + tests,modem-helpers-qmi: add tests for supported capabilities loading + + (cherry picked from commit ff51fe637d8a87b265f9cf4558987d2e698e9e62) + + src/tests/test-modem-helpers-qmi.c | 217 + +++++++++++++++++++++++++++++++++++-- + 1 file changed, 207 insertions(+), 10 deletions(-) + +commit 680edfa2253c92d46f24455f741ee20fe8b2a931 +Author: Aleksander Morgado +Date: Sun Jan 30 17:11:31 2022 +0100 + + modem-helpers-qmi: new helper to build array of supported capabilities + + (cherry picked from commit d0c87c5877b247ee34fb133604904404581e7814) + + src/mm-modem-helpers-qmi.c | 45 + +++++++++++++++++++++++++++++++++++++++++- + src/mm-modem-helpers-qmi.h | 15 ++++++++++++++ + src/mm-shared-qmi.c | 49 + +++++++++++----------------------------------- + 3 files changed, 70 insertions(+), 39 deletions(-) + +commit dcd0b5826add3f0086ce2cbb9e944cce4ee0a7d4 +Author: Aleksander Morgado +Date: Sun Jan 30 16:51:07 2022 +0100 + + modem-helpers-qmi: refer explicitly to current capabilities in + helper method + + The helper method for which we have unit tests available refers + exclusively to the current capabilities loading, so rename it to + clarify that. + + (cherry picked from commit f370c096ec53c35e9b28a4ba966eade42c07f375) + + src/mm-modem-helpers-qmi.c | 4 +- + src/mm-modem-helpers-qmi.h | 6 +- + src/mm-shared-qmi.c | 10 +-- + src/tests/test-modem-helpers-qmi.c | 179 + ++++++++++++++++++------------------- + 4 files changed, 98 insertions(+), 101 deletions(-) + +commit 5aed9da9858bc6b78170df5d00ecc310801944a8 +Author: Prakash Pabba +Date: Fri Jan 21 16:45:14 2022 +0530 + + test-modem-helpers-qmi: add unit test for generic 5g modem + + (cherry picked from commit 23229888553fd453797da89c12605aa40f3ba378) + + src/tests/test-modem-helpers-qmi.c | 135 + ++++++++++++++++++++++++++++++++++--- + 1 file changed, 126 insertions(+), 9 deletions(-) + +commit 39a527f9912af7bfa47b2e63d1b2cc4a38295296 +Author: Prakash Pabba +Date: Thu Dec 16 14:02:01 2021 +0530 + + test-modem-helpers-qmi: Fix tests for UML290 + + Change due to update in current capabilities loading logic. + + (cherry picked from commit 3a1390f1dda4acf73dc8bec8d2ccf9dcddfcf5c4) + + src/tests/test-modem-helpers-qmi.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit 2ca9c262c746bfa83e9086b69045d190c21d637c +Author: Prakash Pabba +Date: Tue Dec 14 14:25:45 2021 +0530 + + mm-shared-qmi,mm-modem-helpers: Fix supported capabilities and modes + for multimode device + + We use capability switching logic exclusively for configuring + GSM/UMTS+CDMA/EVDO devices + (regardless of whether it has LTE/5GNR or not) to add or remove the + GSM/UMTS and CDMA/EVDO + capabilities. + + Based on the same logic, we will allow 4 combinations for + GSM/UMTS+CDMA/EVDO+LTE+5GNR device: + "GSM/UMTS+CDMA/EVDO+LTE+5GNR", "GSM/UMTS+LTE+5GNR", + "CDMA/EVDO+LTE+5GNR" and "LTE+5GNR" + + Similarly, we will allow 4 combinations for GSM/UMTS+CDMA/EVDO+LTE + device: + "GSM/UMTS+CDMA/EVDO+LTE", "GSM/UMTS+LTE", "CDMA/EVDO+LTE" and "LTE" + + And, we will allow 3 combinations for GSM/UMTS+CDMA/EVDO device: + "GSM/UMTS+CDMA/EVDO", "GSM/UMTS" and "CDMA/EVDO" + + Also, supported combination modes should be based on current + capabilities and not entirely + upon supported radio interfaces. + + 1) If current capability has "gsm-umts" or "cdma-evdo" or both, do not + support 4G only, 5G only, or 4G+5G combination modes + 2) If current capability neither has "gsm-umts" nor "cdma-evdo", + only support + combination modes involving 4G and 5G. + + (cherry picked from commit 38f067c4e44d7f994c3fd75e29d36ee199002ff4) + + src/mm-modem-helpers.c | 10 +----- + src/mm-shared-qmi.c | 84 + ++++++++++++++++++++++++-------------------------- + 2 files changed, 41 insertions(+), 53 deletions(-) + +commit 8d737cc6482a9d6e409d9d80936b448dd1af0b7b +Author: Prakash Pabba +Date: Thu Dec 9 16:54:54 2021 +0530 + + mm-modem-helpers-qmi: Fix current capabilities for multimode device + + Keep LTE or 5GNR always in current capabilities if supported by + device. + + Since capability switching logic is exclusively used for configuring + GSM/UMTS+CDMA/EVDO devices, decide if to have GSM/UMTS or CDMA/EVDO + or both + or none when loading current capabilities. + + (cherry picked from commit f05258e757558b93559b4d36087e89ec926c5423) + + src/mm-modem-helpers-qmi.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit ec3eb3283541ad73cd0f99c29c451911399a360e +Author: Michal Mazur +Date: Thu Jan 27 16:07:07 2022 +0100 + + iface-modem: make update_unlock_retries method static + + (cherry picked from commit 9843546a490c34bf0f8adb1bcce9503eccbb3115) + + src/mm-iface-modem.c | 8 ++++---- + src/mm-iface-modem.h | 3 --- + 2 files changed, 4 insertions(+), 7 deletions(-) + +commit cf7533caa854b1ff12226261f64e2fb27206edfb +Author: Michal Mazur +Date: Wed Dec 15 16:07:36 2021 +0100 + + sim-mbim,broadband-modem-mbim: store number of remaining attempts + + On MBIM modems the type of PIN cannot be specified in MBIM_CID_PIN + query + command and the modem responds only remaining attempts for the + currently + active lock. + If PIN1 is unlocked and user tries to disable (or enable) it, MM won't + get an update of remaining attempts in response to PIN Query. This + value + is returned only after the Set command and MM need to store it in + all (pin/puk)_set_(enter/enable/change)_ready functions. + + Previous solution was to call the mm_iface_modem_update_unlock_retries + directly from these functions but it caused the notification to + be send + too early and invalid number was displayed to user sometimes. + Instead of this MM will store numbers of remaining attempts and send + them in a single notification from modem_load_unlock_retries. + + (cherry picked from commit 5d4957935ba17c7c24ae92b82fc3fb90851f3235) + + src/mm-broadband-modem-mbim.c | 67 + +++++++++++++++++-------------------------- + src/mm-broadband-modem-mbim.h | 4 +++ + src/mm-sim-mbim.c | 11 ++----- + 3 files changed, 33 insertions(+), 49 deletions(-) + +commit 5788f52e50fd2325e072717bd63b063f156b19f2 +Author: Michal Mazur +Date: Thu Dec 16 14:11:23 2021 +0100 + + Revert "mm-sim-mbim: Remove update of remaining attempts" + + This reverts commit 46c5cd8b7279e6139466664f87d744a0553fa1c3. + + (cherry picked from commit ee87a6853228e0b4b5e6c132f0c90e8d094af441) + + src/mm-sim-mbim.c | 53 + +++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 53 insertions(+) + +commit 08ad95ce9872957a9e4c0956ff2f756d963f4018 +Author: Nagi Marupaka +Date: Tue Jan 25 17:32:48 2022 +0000 + + mm-kernel-device-helpers: fix memory leak + + Newly refactored string manipulation function is leaking memory as per + our tests. This submission fixes that memory leak. + + (cherry picked from commit 73e3da3a1035deb8a748d162c52281f94a537904) + + src/kerneldevice/mm-kernel-device-helpers.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +commit 85becf883be55639c8725d29095269f9cfbd96d4 +Author: Iñigo Martínez +Date: Wed Jan 26 16:37:57 2022 +0100 + + build,meson: Fix gdbus code generation + + Changes on meson 0.61 makes the build to fail due to empty + annotations in some gdbus code generation[0]. + + Taking advantage of `kwargs` support, it has been changed to avoid + the issue. + + Fixes #499 + + [0] + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/499 + + (cherry picked from commit 0ab9fc343fdc21235bc24c80c78a13b1ea078208) + + libmm-glib/generated/meson.build | 24 +++++++++++------------- + 1 file changed, 11 insertions(+), 13 deletions(-) + +commit 259f2eedd62a6895f5282b3e1666ca8480a38c7c +Author: Aleksander Morgado +Date: Sat Jan 22 14:38:22 2022 +0100 + + plugin-manager: longer extra probing time when not using udev + + When using udev, we rely on the kernel to timely report port additions + in the same device. + + When not using udev, e.g. when using hotplug scripts in openwrt, we + use mmcli --report-kernel-event operations to report the port + additions, which may end up requiring much more time to process, + especially during bootup as we would be reporting a lot of port + addition events one after the other. + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/493 + + (cherry picked from commit 86496bd326f2ec139101049fb19a10b255ee8ad5) + + src/mm-plugin-manager.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +commit 5d28712d2cc5c17d784f658cdfad73490ff818da +Author: Daniele +Date: Fri Jan 21 17:52:38 2022 +0100 + + telit: add port hints for Telit LE910C1-EUX + + (cherry picked from commit 9bc084c94a797bf9fd364087cf8d2b838120cd18) + + plugins/telit/77-mm-telit-port-types.rules | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +commit 279d41f7459d4eae51284b090b2728082f8d5a26 +Author: Aleksander Morgado +Date: Thu Jan 20 13:46:23 2022 +0100 + + foxconn: firmware info loading only if MBIM-QMUX enabled in libqmi + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/477 + + (cherry picked from commit 6ec97a29ae79636f3bf63e616e0b3904befa1dbd) + + plugins/foxconn/mm-broadband-modem-mbim-foxconn.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit c40382dbe238e73452abf78581783e662c71afcf +Author: Aleksander Morgado +Date: Tue Jan 18 10:29:45 2022 +0100 + + quectel: fix reference cycle + + The 'update_settings' object must be referenced before the task + is completed. + + (cherry picked from commit c9ffa2c9e5bb1168210f9b6b1acdace778ee175a) + + plugins/quectel/mm-shared-quectel.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 2bea70a78c54a616072dd637e42f17dfe1f9b159 +Author: Dylan Van Assche +Date: Mon Dec 27 17:59:53 2021 +0100 + + plugins/quectel/mm-shared-quectel: use QGMR to set version + + Quectel modems report only their major firmware version through + AT+GMR, use AT+QGMR instead to report the full firmware version. + + (cherry picked from commit 07d7f596d381ae1bc823c1a3b3b2707d17a0ad61) + + plugins/quectel/mm-shared-quectel.c | 31 +++++++++++++++++++++++++++++-- + 1 file changed, 29 insertions(+), 2 deletions(-) + +commit 59c46dcc92666e556e71bb62552bbaadd1cc2eb1 +Author: Dylan Van Assche +Date: Sun Dec 26 11:35:55 2021 +0100 + + plugins/quectel/mm-broadband-modem-qmi-quectel: ignore carrier + revision + + Quectel EG25-G QMI modem firmware revisions are not matched with + carrier configs. + Different VoLTE profiles might be selected by the user causing + the carrier config revision to change. + + Since fwupd uses this string for firmware updates, it gets confused + and + thinks the user has an update available. + + (cherry picked from commit 3f76b3b7d1abe10d2809c80891789cde81de5fa2) + + plugins/quectel/mm-broadband-modem-qmi-quectel.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit c4a18113027b69ca31ea611105b479c798309653 +Author: Aleksander Morgado +Date: Fri Jan 7 21:30:57 2022 +0100 + + libmm-glib,modem-3gpp: fix leak when processing scan results + + (cherry picked from commit 4515b00020bdf173ca3ae7434a3abc0d287f93d6) + + libmm-glib/mm-modem-3gpp.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit d177d54d5d579a960abd66c03f64fc17483483a7 +Author: Aleksander Morgado +Date: Fri Jan 7 16:26:27 2022 +0100 + + iface-modem-3gpp: fix variant ref handling in scan output + + (cherry picked from commit fb0dfb875172225d3bb82906a49118ceb7f938ba) + + src/mm-iface-modem-3gpp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 714ce29110a478806cc9ba18ec81a2b67f53d3f6 +Author: Aleksander Morgado +Date: Wed Nov 3 14:02:33 2021 +0100 + + docs,libmm-glib: add missing references to + object_{peek|get}_modem_ssr() + + (cherry picked from commit 61266a4e848d2ac0acd170b3756aced44a26af1b) + + docs/reference/libmm-glib/libmm-glib-sections.txt | 2 ++ + 1 file changed, 2 insertions(+) + +commit c143f8eefc3049d5420cf6752d2d4fc9f553ef93 +Author: Aleksander Morgado +Date: Fri Dec 17 10:08:07 2021 +0100 + + iface-modem: minor coding style changes + + (cherry picked from commit 59c79b07ae602d3664fb5098cc42f998bc644193) + + src/mm-iface-modem.c | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +commit d872ddc92f9d544b5ffb04dcb1bf431ce3ef7d00 +Author: Aleksander Morgado +Date: Fri Dec 17 11:20:57 2021 +0100 + + cli: fix 3GPP location mcc/mnc field names + + (cherry picked from commit 791fb38417566b3cbde2450000049bd62c356305) + + cli/mmcli-output.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 3a505f802fd314510fc2b5a97844dd879d09e6d4 +Author: Jakob Hauser +Date: Mon Dec 20 05:10:14 2021 +0100 + + broadband-modem-qmi: Introduce udev flag for reduced facility + lock query + + The udev flag "ID_MM_QMI_FACILITY_LOCK_QUERY_REDUCED" allows to skip + facility lock state query "get_ck_status" on the DMS path for devices + where this isn't implemented properly. + + On devices that have enabled "device locks", this flag won't work + well. + Skipping the query doesn't disable the locks. + + Fixes #448 + + (cherry picked from commit db228b28597c002174145c4a06b94a24f5dbdf9b) + + src/mm-broadband-modem-qmi.c | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +commit 508495966068b02daec93d8191f6f7469619b7a2 +Author: Mingjie Zhang +Date: Thu Dec 9 20:48:50 2021 +0800 + + fibocom: update FM101 port type hints to final layout + + The port type hints for the FM101 were updated to be in line with + the final product layout, + where USB interface #2 is now used as an AT port (not ignored) + and USB interface #4 is now + used as debug port. USB interface #6 is removed as it no longer + exists. + + (cherry picked from commit 2bad8f5a0dc56b82cacc0982a15c2a32016f7975) + + plugins/fibocom/77-mm-fibocom-port-types.rules | 12 +++++------- + 1 file changed, 5 insertions(+), 7 deletions(-) + +commit a470b02f12f95679705eec28f2d7d5f0e2224f35 +Author: ZhangMingjie +Date: Wed Nov 10 20:19:47 2021 +0800 + + plugins: add fibocom FM101 to fibocom port types rules file + + This patch add fibocom FM101 to 77-mm-fibocom-port-types.rules file. + which contains two sets of vid and pid pairs, "2cb7:01a2" and + "2cb7:01a4". + + (cherry picked from commit 3a880fd832a2826f812aef451e40c8f1241dccff) + + plugins/fibocom/77-mm-fibocom-port-types.rules | 24 + ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +commit 3e28b6829d3860f24f3acdc498e3670a47af8076 +Author: Aleksander Morgado +Date: Wed Dec 8 14:30:08 2021 +0100 + + filter: allow 'option' string in the TTY driver filter list + + Fixes + https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/475 + + (cherry picked from commit 559df16debd03d0ba00a68633f43cbda32f4aa8a) + + src/mm-filter.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 74f0caaaec000860d7c7ce1e795da67441ee6009 +Author: Aleksander Morgado +Date: Wed Dec 1 21:40:00 2021 +0100 + + udev: avoid [0-9]* as shell globbing patterns + + The udev rules expect matches based on shell globbing pattern, not + based on regex. This means that "[0-9]*" doesn't mean "zero or more + digits", it actually means "one digit and zero or more other + characters". + + So, avoid the regex like match, even if it worked for us, because it + didn't mean what we thought it meant, plus, it breaks our custom udev + rules processing logic, in which we convert the input patterns into + real regex expressions. + + See https://bbs.archlinux.org/viewtopic.php?pid=1415916#p1415916 + + While at it, also make sure that the wildcard matching is done + exclusively for prefix and suffix matches, never in the middle of + a string, or our custom rules parser would not match correctly. + + (cherry picked from commit e9f254ba3f923248efffe4fd458dc5e5469e0f73) + + plugins/qcom-soc/77-mm-qcom-soc.rules | 8 ++++---- + src/80-mm-candidate.rules | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +commit 2a6b6b22bfc351479e4692508924dcee3a9c0a23 +Author: Aleksander Morgado +Date: Fri Nov 26 10:43:38 2021 +0100 + + build: post-release version bump to 1.18.5 + + configure.ac | 2 +- + meson.build | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + commit ac6d31e463168e894269d2a7c949de4577026eea Author: Aleksander Morgado Date: Fri Nov 26 10:17:53 2021 +0100 diff -Nru modemmanager-1.18.4/cli/Makefile.in modemmanager-1.18.6/cli/Makefile.in --- modemmanager-1.18.4/cli/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/cli/Makefile.in 2022-02-11 10:33:20.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -227,8 +227,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -247,6 +245,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -258,6 +258,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -969,7 +970,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/cli/mmcli-output.c modemmanager-1.18.6/cli/mmcli-output.c --- modemmanager-1.18.4/cli/mmcli-output.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/cli/mmcli-output.c 2022-02-11 10:12:22.000000000 +0000 @@ -189,8 +189,8 @@ [MMC_F_LOCATION_GPS_SUPL_SERVER] = { "modem.location.gps.supl-server", "a-gps supl server", MMC_S_MODEM_LOCATION_GPS, }, [MMC_F_LOCATION_GPS_ASSISTANCE] = { "modem.location.gps.assistance", "supported assistance", MMC_S_MODEM_LOCATION_GPS, }, [MMC_F_LOCATION_GPS_ASSISTANCE_SERVERS] = { "modem.location.gps.assistance-servers", "assistance servers", MMC_S_MODEM_LOCATION_GPS, }, - [MMC_F_LOCATION_3GPP_MCC] = { "modem.location.3gpp.mcc", "operator code", MMC_S_MODEM_LOCATION_3GPP, }, - [MMC_F_LOCATION_3GPP_MNC] = { "modem.location.3gpp.mnc", "operator name", MMC_S_MODEM_LOCATION_3GPP, }, + [MMC_F_LOCATION_3GPP_MCC] = { "modem.location.3gpp.mcc", "operator mcc", MMC_S_MODEM_LOCATION_3GPP, }, + [MMC_F_LOCATION_3GPP_MNC] = { "modem.location.3gpp.mnc", "operator mnc", MMC_S_MODEM_LOCATION_3GPP, }, [MMC_F_LOCATION_3GPP_LAC] = { "modem.location.3gpp.lac", "location area code", MMC_S_MODEM_LOCATION_3GPP, }, [MMC_F_LOCATION_3GPP_TAC] = { "modem.location.3gpp.tac", "tracking area code", MMC_S_MODEM_LOCATION_3GPP, }, [MMC_F_LOCATION_3GPP_CID] = { "modem.location.3gpp.cid", "cell id", MMC_S_MODEM_LOCATION_3GPP, }, diff -Nru modemmanager-1.18.4/compile modemmanager-1.18.6/compile --- modemmanager-1.18.4/compile 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/compile 2022-02-11 10:33:20.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify diff -Nru modemmanager-1.18.4/config.guess modemmanager-1.18.6/config.guess --- modemmanager-1.18.4/config.guess 2021-11-26 09:23:54.000000000 +0000 +++ modemmanager-1.18.6/config.guess 2022-02-11 10:33:20.000000000 +0000 @@ -2,7 +2,9 @@ # Attempt to guess a canonical system name. # Copyright 1992-2021 Free Software Foundation, Inc. -timestamp='2021-01-25' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2021-06-03' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -32,7 +34,15 @@ # Please send patches to . -me=$(echo "$0" | sed -e 's,.*/,,') +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + + +me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] @@ -84,6 +94,9 @@ exit 1 fi +# Just in case it came from the environment. +GUESS= + # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a @@ -102,8 +115,8 @@ # prevent multiple calls if $tmp is already set test "$tmp" && return 0 : "${TMPDIR=/tmp}" - # shellcheck disable=SC2039 - { tmp=$( (umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null) && test -n "$tmp" && test -d "$tmp" ; } || + # shellcheck disable=SC2039,SC3028 + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } @@ -112,7 +125,7 @@ ,,) echo "int x;" > "$dummy.c" for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then - CC_FOR_BUILD="$driver" + CC_FOR_BUILD=$driver break fi done @@ -131,12 +144,12 @@ PATH=$PATH:/.attbin ; export PATH fi -UNAME_MACHINE=$( (uname -m) 2>/dev/null) || UNAME_MACHINE=unknown -UNAME_RELEASE=$( (uname -r) 2>/dev/null) || UNAME_RELEASE=unknown -UNAME_SYSTEM=$( (uname -s) 2>/dev/null) || UNAME_SYSTEM=unknown -UNAME_VERSION=$( (uname -v) 2>/dev/null) || UNAME_VERSION=unknown +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "$UNAME_SYSTEM" in +case $UNAME_SYSTEM in Linux|GNU|GNU/*) LIBC=unknown @@ -157,7 +170,8 @@ #endif #endif EOF - eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g')" + cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + eval "$cc_set_libc" # Second heuristic to detect musl libc. if [ "$LIBC" = unknown ] && @@ -176,7 +190,7 @@ # Note: order is significant - the case branches are not exclusive. -case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in +case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, @@ -188,11 +202,11 @@ # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". - UNAME_MACHINE_ARCH=$( (uname -p 2>/dev/null || \ + UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/sysctl -n hw.machine_arch 2>/dev/null || \ /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \ - echo unknown)) - case "$UNAME_MACHINE_ARCH" in + echo unknown)` + case $UNAME_MACHINE_ARCH in aarch64eb) machine=aarch64_be-unknown ;; armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; @@ -200,15 +214,15 @@ sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) - arch=$(echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,') - endian=$(echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p') - machine="${arch}${endian}"-unknown + arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` + endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` + machine=${arch}${endian}-unknown ;; - *) machine="$UNAME_MACHINE_ARCH"-unknown ;; + *) machine=$UNAME_MACHINE_ARCH-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) os=netbsdelf ;; @@ -229,10 +243,10 @@ ;; esac # Determine ABI tags. - case "$UNAME_MACHINE_ARCH" in + case $UNAME_MACHINE_ARCH in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' - abi=$(echo "$UNAME_MACHINE_ARCH" | sed -e "$expr") + abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release @@ -240,76 +254,82 @@ # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. - case "$UNAME_VERSION" in + case $UNAME_VERSION in Debian*) release='-gnu' ;; *) - release=$(echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2) + release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "$machine-${os}${release}${abi-}" - exit ;; + GUESS=$machine-${os}${release}${abi-} + ;; *:Bitrig:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/Bitrig.//') - echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE + ;; *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/OpenBSD.//') - echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE + ;; + *:SecBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE + ;; *:LibertyBSD:*:*) - UNAME_MACHINE_ARCH=$(arch | sed 's/^.*BSD\.//') - echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" - exit ;; + UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` + GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE + ;; *:MidnightBSD:*:*) - echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE + ;; *:ekkoBSD:*:*) - echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE + ;; *:SolidBSD:*:*) - echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE + ;; *:OS108:*:*) - echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE + ;; macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE + ;; *:MirBSD:*:*) - echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE + ;; *:Sortix:*:*) - echo "$UNAME_MACHINE"-unknown-sortix - exit ;; + GUESS=$UNAME_MACHINE-unknown-sortix + ;; *:Twizzler:*:*) - echo "$UNAME_MACHINE"-unknown-twizzler - exit ;; + GUESS=$UNAME_MACHINE-unknown-twizzler + ;; *:Redox:*:*) - echo "$UNAME_MACHINE"-unknown-redox - exit ;; + GUESS=$UNAME_MACHINE-unknown-redox + ;; mips:OSF1:*.*) - echo mips-dec-osf1 - exit ;; + GUESS=mips-dec-osf1 + ;; alpha:OSF1:*:*) + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + trap '' 0 case $UNAME_RELEASE in *4.0) - UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $3}') + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=$(/usr/sbin/sizer -v | awk '{print $4}') + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=$(/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1) - case "$ALPHA_CPU_TYPE" in + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case $ALPHA_CPU_TYPE in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") @@ -346,68 +366,69 @@ # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo "$UNAME_MACHINE"-dec-osf"$(echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz)" - # Reset EXIT trap before exiting to avoid spurious non-zero exit code. - exitcode=$? - trap '' 0 - exit $exitcode ;; + OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + GUESS=$UNAME_MACHINE-dec-osf$OSF_REL + ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; + GUESS=m68k-unknown-sysv4 + ;; *:[Aa]miga[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-amigaos - exit ;; + GUESS=$UNAME_MACHINE-unknown-amigaos + ;; *:[Mm]orph[Oo][Ss]:*:*) - echo "$UNAME_MACHINE"-unknown-morphos - exit ;; + GUESS=$UNAME_MACHINE-unknown-morphos + ;; *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; + GUESS=i370-ibm-openedition + ;; *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; + GUESS=s390-ibm-zvmoe + ;; *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; + GUESS=powerpc-ibm-os400 + ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix"$UNAME_RELEASE" - exit ;; + GUESS=arm-acorn-riscix$UNAME_RELEASE + ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; + GUESS=arm-unknown-riscos + ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; + GUESS=hppa1.1-hitachi-hiuxmpp + ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "$( (/bin/universe) 2>/dev/null)" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; + case `(/bin/universe) 2>/dev/null` in + att) GUESS=pyramid-pyramid-sysv3 ;; + *) GUESS=pyramid-pyramid-bsd ;; + esac + ;; NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; + GUESS=pyramid-pyramid-svr4 + ;; DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; + GUESS=sparc-icl-nx6 + ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case $(/usr/bin/uname -p) in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; + case `/usr/bin/uname -p` in + sparc) GUESS=sparc-icl-nx7 ;; + esac + ;; s390x:SunOS:*:*) - echo "$UNAME_MACHINE"-ibm-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL + ;; sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-hal-solaris2$SUN_REL + ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2"$(echo "$UNAME_RELEASE" | sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris2$SUN_REL + ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) - echo i386-pc-auroraux"$UNAME_RELEASE" - exit ;; + GUESS=i386-pc-auroraux$UNAME_RELEASE + ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) set_cc_for_build SUN_ARCH=i386 @@ -422,41 +443,44 @@ SUN_ARCH=x86_64 fi fi - echo "$SUN_ARCH"-pc-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=$SUN_ARCH-pc-solaris2$SUN_REL + ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=sparc-sun-solaris3$SUN_REL + ;; sun4*:SunOS:*:*) - case "$(/usr/bin/arch -k)" in + case `/usr/bin/arch -k` in Series*|S4*) - UNAME_RELEASE=$(uname -v) + UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'` + GUESS=sparc-sun-sunos$SUN_REL + ;; sun3*:SunOS:*:*) - echo m68k-sun-sunos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-sun-sunos$UNAME_RELEASE + ;; sun*:*:4.2BSD:*) - UNAME_RELEASE=$( (sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 - case "$(/bin/arch)" in + case `/bin/arch` in sun3) - echo m68k-sun-sunos"$UNAME_RELEASE" + GUESS=m68k-sun-sunos$UNAME_RELEASE ;; sun4) - echo sparc-sun-sunos"$UNAME_RELEASE" + GUESS=sparc-sun-sunos$UNAME_RELEASE ;; esac - exit ;; + ;; aushp:SunOS:*:*) - echo sparc-auspex-sunos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-auspex-sunos$UNAME_RELEASE + ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -466,41 +490,41 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-atari-mint$UNAME_RELEASE + ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-milan-mint$UNAME_RELEASE + ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-hades-mint$UNAME_RELEASE + ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-mint$UNAME_RELEASE + ;; m68k:machten:*:*) - echo m68k-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-machten$UNAME_RELEASE + ;; powerpc:machten:*:*) - echo powerpc-apple-machten"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-machten$UNAME_RELEASE + ;; RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; + GUESS=mips-dec-mach_bsd4.3 + ;; RISC*:ULTRIX:*:*) - echo mips-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=mips-dec-ultrix$UNAME_RELEASE + ;; VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix"$UNAME_RELEASE" - exit ;; + GUESS=vax-dec-ultrix$UNAME_RELEASE + ;; 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix"$UNAME_RELEASE" - exit ;; + GUESS=clipper-intergraph-clix$UNAME_RELEASE + ;; mips:*:*:UMIPS | mips:*:*:RISCos) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -525,78 +549,79 @@ } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && - dummyarg=$(echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p') && - SYSTEM_NAME=$("$dummy" "$dummyarg") && + dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos"$UNAME_RELEASE" - exit ;; + GUESS=mips-mips-riscos$UNAME_RELEASE + ;; Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; + GUESS=powerpc-motorola-powermax + ;; Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; + GUESS=powerpc-harris-powermax + ;; Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; + GUESS=powerpc-harris-powerunix + ;; m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; + GUESS=m88k-harris-cxux7 + ;; m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; + GUESS=m88k-motorola-sysv4 + ;; m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=$(/usr/bin/uname -p) + UNAME_PROCESSOR=`/usr/bin/uname -p` if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110 then if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \ test "$TARGET_BINARY_INTERFACE"x = x then - echo m88k-dg-dgux"$UNAME_RELEASE" + GUESS=m88k-dg-dgux$UNAME_RELEASE else - echo m88k-dg-dguxbcs"$UNAME_RELEASE" + GUESS=m88k-dg-dguxbcs$UNAME_RELEASE fi else - echo i586-dg-dgux"$UNAME_RELEASE" + GUESS=i586-dg-dgux$UNAME_RELEASE fi - exit ;; + ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; + GUESS=m88k-dolphin-sysv3 + ;; M88*:*:R3*:*) # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; + GUESS=m88k-motorola-sysv3 + ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; + GUESS=m88k-tektronix-sysv3 + ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; + GUESS=m68k-tektronix-bsd + ;; *:IRIX*:*:*) - echo mips-sgi-irix"$(echo "$UNAME_RELEASE"|sed -e 's/-/_/g')" - exit ;; + IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'` + GUESS=mips-sgi-irix$IRIX_REL + ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'$(uname -s)'" gives 'AIX ' + GUESS=romp-ibm-aix # uname -m gives an 8 hex-code CPU id + ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; + GUESS=i386-ibm-aix + ;; ia64:AIX:*:*) if test -x /usr/bin/oslevel ; then - IBM_REV=$(/usr/bin/oslevel) + IBM_REV=`/usr/bin/oslevel` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV + ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then set_cc_for_build @@ -611,68 +636,68 @@ exit(0); } EOF - if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") + if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then - echo "$SYSTEM_NAME" + GUESS=$SYSTEM_NAME else - echo rs6000-ibm-aix3.2.5 + GUESS=rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 + GUESS=rs6000-ibm-aix3.2.4 else - echo rs6000-ibm-aix3.2 + GUESS=rs6000-ibm-aix3.2 fi - exit ;; + ;; *:AIX:*:[4567]) - IBM_CPU_ID=$(/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }') + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if test -x /usr/bin/lslpp ; then - IBM_REV=$(/usr/bin/lslpp -Lqc bos.rte.libc | - awk -F: '{ print $3 }' | sed s/[0-9]*$/0/) + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \ + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else - IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" + IBM_REV=$UNAME_VERSION.$UNAME_RELEASE fi - echo "$IBM_ARCH"-ibm-aix"$IBM_REV" - exit ;; + GUESS=$IBM_ARCH-ibm-aix$IBM_REV + ;; *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; + GUESS=rs6000-ibm-aix + ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) - echo romp-ibm-bsd4.4 - exit ;; + GUESS=romp-ibm-bsd4.4 + ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 + GUESS=romp-ibm-bsd$UNAME_RELEASE # 4.3 with uname added to + ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; + GUESS=rs6000-bull-bosx + ;; DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; + GUESS=m68k-bull-sysv3 + ;; 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; + GUESS=m68k-hp-bsd + ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; + GUESS=m68k-hp-bsd4.4 + ;; 9000/[34678]??:HP-UX:*:*) - HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') - case "$UNAME_MACHINE" in + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + case $UNAME_MACHINE in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if test -x /usr/bin/getconf; then - sc_cpu_version=$(/usr/bin/getconf SC_CPU_VERSION 2>/dev/null) - sc_kernel_bits=$(/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null) - case "$sc_cpu_version" in + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case $sc_cpu_version in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 - case "$sc_kernel_bits" in + case $sc_kernel_bits in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 @@ -714,7 +739,7 @@ exit (0); } EOF - (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=$("$dummy") + (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac @@ -739,12 +764,12 @@ HP_ARCH=hppa64 fi fi - echo "$HP_ARCH"-hp-hpux"$HPUX_REV" - exit ;; + GUESS=$HP_ARCH-hp-hpux$HPUX_REV + ;; ia64:HP-UX:*:*) - HPUX_REV=$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//') - echo ia64-hp-hpux"$HPUX_REV" - exit ;; + HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'` + GUESS=ia64-hp-hpux$HPUX_REV + ;; 3050*:HI-UX:*:*) set_cc_for_build sed 's/^ //' << EOF > "$dummy.c" @@ -772,38 +797,38 @@ exit (0); } EOF - $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=$("$dummy") && + $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; + GUESS=unknown-hitachi-hiuxwe2 + ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) - echo hppa1.1-hp-bsd - exit ;; + GUESS=hppa1.1-hp-bsd + ;; 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; + GUESS=hppa1.0-hp-bsd + ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; + GUESS=hppa1.0-hp-mpeix + ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) - echo hppa1.1-hp-osf - exit ;; + GUESS=hppa1.1-hp-osf + ;; hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; + GUESS=hppa1.0-hp-osf + ;; i*86:OSF1:*:*) if test -x /usr/sbin/sysversion ; then - echo "$UNAME_MACHINE"-unknown-osf1mk + GUESS=$UNAME_MACHINE-unknown-osf1mk else - echo "$UNAME_MACHINE"-unknown-osf1 + GUESS=$UNAME_MACHINE-unknown-osf1 fi - exit ;; + ;; parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; + GUESS=hppa1.1-hp-lites + ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; + GUESS=c1-convex-bsd + ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd @@ -811,17 +836,18 @@ fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; + GUESS=c34-convex-bsd + ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; + GUESS=c38-convex-bsd + ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; + GUESS=c4-convex-bsd + ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=ymp-cray-unicos$CRAY_REL + ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ @@ -829,114 +855,126 @@ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) - echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=t90-cray-unicos$CRAY_REL + ;; CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=alphaev5-cray-unicosmk$CRAY_REL + ;; CRAY*SV1:*:*:*) - echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=sv1-cray-unicos$CRAY_REL + ;; *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' - exit ;; + CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'` + GUESS=craynv-cray-unicosmp$CRAY_REL + ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=$(uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz) - FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') - FUJITSU_REL=$(echo "$UNAME_RELEASE" | sed -e 's/ /_/') - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` + GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=$(uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///') - FUJITSU_REL=$(echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/') - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` + FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` + GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} + ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE + ;; sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-bsdi$UNAME_RELEASE + ;; *:BSD/OS:*:*) - echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE + ;; arm:FreeBSD:*:*) - UNAME_PROCESSOR=$(uname -p) + UNAME_PROCESSOR=`uname -p` set_cc_for_build if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabi + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi else - echo "${UNAME_PROCESSOR}"-unknown-freebsd"$(echo ${UNAME_RELEASE}|sed -e 's/[-(].*//')"-gnueabihf + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf fi - exit ;; + ;; *:FreeBSD:*:*) - UNAME_PROCESSOR=$(/usr/bin/uname -p) - case "$UNAME_PROCESSOR" in + UNAME_PROCESSOR=`/usr/bin/uname -p` + case $UNAME_PROCESSOR in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac - echo "$UNAME_PROCESSOR"-unknown-freebsd"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" - exit ;; + FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL + ;; i*:CYGWIN*:*) - echo "$UNAME_MACHINE"-pc-cygwin - exit ;; + GUESS=$UNAME_MACHINE-pc-cygwin + ;; *:MINGW64*:*) - echo "$UNAME_MACHINE"-pc-mingw64 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw64 + ;; *:MINGW*:*) - echo "$UNAME_MACHINE"-pc-mingw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-mingw32 + ;; *:MSYS*:*) - echo "$UNAME_MACHINE"-pc-msys - exit ;; + GUESS=$UNAME_MACHINE-pc-msys + ;; i*:PW*:*) - echo "$UNAME_MACHINE"-pc-pw32 - exit ;; + GUESS=$UNAME_MACHINE-pc-pw32 + ;; *:Interix*:*) - case "$UNAME_MACHINE" in + case $UNAME_MACHINE in x86) - echo i586-pc-interix"$UNAME_RELEASE" - exit ;; + GUESS=i586-pc-interix$UNAME_RELEASE + ;; authenticamd | genuineintel | EM64T) - echo x86_64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=x86_64-unknown-interix$UNAME_RELEASE + ;; IA64) - echo ia64-unknown-interix"$UNAME_RELEASE" - exit ;; + GUESS=ia64-unknown-interix$UNAME_RELEASE + ;; esac ;; i*:UWIN*:*) - echo "$UNAME_MACHINE"-pc-uwin - exit ;; + GUESS=$UNAME_MACHINE-pc-uwin + ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-pc-cygwin - exit ;; + GUESS=x86_64-pc-cygwin + ;; prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')" - exit ;; + SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'` + GUESS=powerpcle-unknown-solaris2$SUN_REL + ;; *:GNU:*:*) # the GNU system - echo "$(echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,')-unknown-$LIBC$(echo "$UNAME_RELEASE"|sed -e 's,/.*$,,')" - exit ;; + GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'` + GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL + ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo "$UNAME_MACHINE-unknown-$(echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]")$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')-$LIBC" - exit ;; + GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"` + GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC + ;; *:Minix:*:*) - echo "$UNAME_MACHINE"-unknown-minix - exit ;; + GUESS=$UNAME_MACHINE-unknown-minix + ;; aarch64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; alpha:Linux:*:*) - case $(sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null) in + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; @@ -947,63 +985,63 @@ esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; + arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*) + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; arm*:Linux:*:*) set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi else - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf + GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf fi fi - exit ;; + ;; avr32*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; cris:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; crisv32:Linux:*:*) - echo "$UNAME_MACHINE"-axis-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-axis-linux-$LIBC + ;; e2k:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; frv:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; hexagon:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:Linux:*:*) - echo "$UNAME_MACHINE"-pc-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBC + ;; ia64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; k1om:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m32r*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; m68*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; mips:Linux:*:* | mips64:Linux:*:*) set_cc_for_build IS_GLIBC=0 @@ -1048,65 +1086,66 @@ #endif #endif EOF - eval "$($CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI')" + cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'` + eval "$cc_set_vars" test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; } ;; mips64el:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; openrisc*:Linux:*:*) - echo or1k-unknown-linux-"$LIBC" - exit ;; + GUESS=or1k-unknown-linux-$LIBC + ;; or32:Linux:*:* | or1k*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; padre:Linux:*:*) - echo sparc-unknown-linux-"$LIBC" - exit ;; + GUESS=sparc-unknown-linux-$LIBC + ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-"$LIBC" - exit ;; + GUESS=hppa64-unknown-linux-$LIBC + ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level - case $(grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2) in - PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; - PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; - *) echo hppa-unknown-linux-"$LIBC" ;; + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;; + PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;; + *) GUESS=hppa-unknown-linux-$LIBC ;; esac - exit ;; + ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64-unknown-linux-$LIBC + ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc-unknown-linux-$LIBC + ;; ppc64le:Linux:*:*) - echo powerpc64le-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpc64le-unknown-linux-$LIBC + ;; ppcle:Linux:*:*) - echo powerpcle-unknown-linux-"$LIBC" - exit ;; + GUESS=powerpcle-unknown-linux-$LIBC + ;; riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; s390:Linux:*:* | s390x:Linux:*:*) - echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-ibm-linux-$LIBC + ;; sh64*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sh*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; tile*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; vax:Linux:*:*) - echo "$UNAME_MACHINE"-dec-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-dec-linux-$LIBC + ;; x86_64:Linux:*:*) set_cc_for_build LIBCABI=$LIBC @@ -1115,71 +1154,71 @@ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_X32 >/dev/null then - LIBCABI="$LIBC"x32 + LIBCABI=${LIBC}x32 fi fi - echo "$UNAME_MACHINE"-pc-linux-"$LIBCABI" - exit ;; + GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI + ;; xtensa*:Linux:*:*) - echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" - exit ;; + GUESS=$UNAME_MACHINE-unknown-linux-$LIBC + ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; + GUESS=i386-sequent-sysv4 + ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. - echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" - exit ;; + GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION + ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. - echo "$UNAME_MACHINE"-pc-os2-emx - exit ;; + GUESS=$UNAME_MACHINE-pc-os2-emx + ;; i*86:XTS-300:*:STOP) - echo "$UNAME_MACHINE"-unknown-stop - exit ;; + GUESS=$UNAME_MACHINE-unknown-stop + ;; i*86:atheos:*:*) - echo "$UNAME_MACHINE"-unknown-atheos - exit ;; + GUESS=$UNAME_MACHINE-unknown-atheos + ;; i*86:syllable:*:*) - echo "$UNAME_MACHINE"-pc-syllable - exit ;; + GUESS=$UNAME_MACHINE-pc-syllable + ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=i386-unknown-lynxos$UNAME_RELEASE + ;; i*86:*DOS:*:*) - echo "$UNAME_MACHINE"-pc-msdosdjgpp - exit ;; + GUESS=$UNAME_MACHINE-pc-msdosdjgpp + ;; i*86:*:4.*:*) - UNAME_REL=$(echo "$UNAME_RELEASE" | sed 's/\/MP$//') + UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL fi - exit ;; + ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. - case $(/bin/uname -X | grep "^Machine") in + case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}" - exit ;; + GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then - UNAME_REL=$(sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=$( (/bin/uname -X|grep Release|sed -e 's/.*= //')) + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 @@ -1187,11 +1226,11 @@ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 - echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" + GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL else - echo "$UNAME_MACHINE"-pc-sysv32 + GUESS=$UNAME_MACHINE-pc-sysv32 fi - exit ;; + ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about @@ -1199,37 +1238,37 @@ # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; + GUESS=i586-pc-msdosdjgpp + ;; Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; + GUESS=i386-pc-mach3 + ;; paragon:*:*:*) - echo i860-intel-osf1 - exit ;; + GUESS=i860-intel-osf1 + ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 + GUESS=i860-stardent-sysv$UNAME_RELEASE # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 + GUESS=i860-unknown-sysv$UNAME_RELEASE # Unknown i860-SVR4 fi - exit ;; + ;; mini*:CTIX:SYS*5:*) # "miniframe" - echo m68010-convergent-sysv - exit ;; + GUESS=m68010-convergent-sysv + ;; mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; + GUESS=m68k-convergent-sysv + ;; M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; + GUESS=m68k-diab-dnix + ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ - && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1240,7 +1279,7 @@ NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ - && OS_REL=.$(sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid) + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ @@ -1248,118 +1287,118 @@ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=m68k-unknown-lynxos$UNAME_RELEASE + ;; mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; + GUESS=m68k-atari-sysv4 + ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=sparc-unknown-lynxos$UNAME_RELEASE + ;; rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=rs6000-unknown-lynxos$UNAME_RELEASE + ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-unknown-lynxos$UNAME_RELEASE + ;; SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv"$UNAME_RELEASE" - exit ;; + GUESS=mips-dde-sysv$UNAME_RELEASE + ;; RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; + GUESS=mips-sni-sysv4 + ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=$( (uname -p) 2>/dev/null) - echo "$UNAME_MACHINE"-sni-sysv4 + UNAME_MACHINE=`(uname -p) 2>/dev/null` + GUESS=$UNAME_MACHINE-sni-sysv4 else - echo ns32k-sni-sysv + GUESS=ns32k-sni-sysv fi - exit ;; + ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says - echo i586-unisys-sysv4 - exit ;; + GUESS=i586-unisys-sysv4 + ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; + GUESS=hppa1.1-stratus-sysv4 + ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; + GUESS=i860-stratus-sysv4 + ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. - echo "$UNAME_MACHINE"-stratus-vos - exit ;; + GUESS=$UNAME_MACHINE-stratus-vos + ;; *:VOS:*:*) # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; + GUESS=hppa1.1-stratus-vos + ;; mc68*:A/UX:*:*) - echo m68k-apple-aux"$UNAME_RELEASE" - exit ;; + GUESS=m68k-apple-aux$UNAME_RELEASE + ;; news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; + GUESS=mips-sony-newsos6 + ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if test -d /usr/nec; then - echo mips-nec-sysv"$UNAME_RELEASE" + GUESS=mips-nec-sysv$UNAME_RELEASE else - echo mips-unknown-sysv"$UNAME_RELEASE" + GUESS=mips-unknown-sysv$UNAME_RELEASE fi - exit ;; + ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; + GUESS=powerpc-be-beos + ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; + GUESS=powerpc-apple-beos + ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; + GUESS=i586-pc-beos + ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; + GUESS=i586-pc-haiku + ;; x86_64:Haiku:*:*) - echo x86_64-unknown-haiku - exit ;; + GUESS=x86_64-unknown-haiku + ;; SX-4:SUPER-UX:*:*) - echo sx4-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx4-nec-superux$UNAME_RELEASE + ;; SX-5:SUPER-UX:*:*) - echo sx5-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx5-nec-superux$UNAME_RELEASE + ;; SX-6:SUPER-UX:*:*) - echo sx6-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx6-nec-superux$UNAME_RELEASE + ;; SX-7:SUPER-UX:*:*) - echo sx7-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx7-nec-superux$UNAME_RELEASE + ;; SX-8:SUPER-UX:*:*) - echo sx8-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8-nec-superux$UNAME_RELEASE + ;; SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sx8r-nec-superux$UNAME_RELEASE + ;; SX-ACE:SUPER-UX:*:*) - echo sxace-nec-superux"$UNAME_RELEASE" - exit ;; + GUESS=sxace-nec-superux$UNAME_RELEASE + ;; Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=powerpc-apple-rhapsody$UNAME_RELEASE + ;; *:Rhapsody:*:*) - echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE + ;; arm64:Darwin:*:*) - echo aarch64-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=aarch64-apple-darwin$UNAME_RELEASE + ;; *:Darwin:*:*) - UNAME_PROCESSOR=$(uname -p) + UNAME_PROCESSOR=`uname -p` case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac @@ -1393,109 +1432,116 @@ # uname -m returns i386 or x86_64 UNAME_PROCESSOR=$UNAME_MACHINE fi - echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE + ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=$(uname -p) + UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi - echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE + ;; *:QNX:*:4*) - echo i386-pc-qnx - exit ;; + GUESS=i386-pc-qnx + ;; NEO-*:NONSTOP_KERNEL:*:*) - echo neo-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=neo-tandem-nsk$UNAME_RELEASE + ;; NSE-*:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nse-tandem-nsk$UNAME_RELEASE + ;; NSR-*:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsr-tandem-nsk$UNAME_RELEASE + ;; NSV-*:NONSTOP_KERNEL:*:*) - echo nsv-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsv-tandem-nsk$UNAME_RELEASE + ;; NSX-*:NONSTOP_KERNEL:*:*) - echo nsx-tandem-nsk"$UNAME_RELEASE" - exit ;; + GUESS=nsx-tandem-nsk$UNAME_RELEASE + ;; *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; + GUESS=mips-compaq-nonstopux + ;; BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; + GUESS=bs2000-siemens-sysv + ;; DS/*:UNIX_System_V:*:*) - echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE + ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. - # shellcheck disable=SC2154 - if test "$cputype" = 386; then + if test "${cputype-}" = 386; then UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" + elif test "x${cputype-}" != x; then + UNAME_MACHINE=$cputype fi - echo "$UNAME_MACHINE"-unknown-plan9 - exit ;; + GUESS=$UNAME_MACHINE-unknown-plan9 + ;; *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; + GUESS=pdp10-unknown-tops10 + ;; *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; + GUESS=pdp10-unknown-tenex + ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; + GUESS=pdp10-dec-tops20 + ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; + GUESS=pdp10-xkl-tops20 + ;; *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; + GUESS=pdp10-unknown-tops20 + ;; *:ITS:*:*) - echo pdp10-unknown-its - exit ;; + GUESS=pdp10-unknown-its + ;; SEI:*:*:SEIUX) - echo mips-sei-seiux"$UNAME_RELEASE" - exit ;; + GUESS=mips-sei-seiux$UNAME_RELEASE + ;; *:DragonFly:*:*) - echo "$UNAME_MACHINE"-unknown-dragonfly"$(echo "$UNAME_RELEASE"|sed -e 's/[-(].*//')" - exit ;; + DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'` + GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL + ;; *:*VMS:*:*) - UNAME_MACHINE=$( (uname -p) 2>/dev/null) - case "$UNAME_MACHINE" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case $UNAME_MACHINE in + A*) GUESS=alpha-dec-vms ;; + I*) GUESS=ia64-dec-vms ;; + V*) GUESS=vax-dec-vms ;; esac ;; *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; + GUESS=i386-pc-xenix + ;; i*86:skyos:*:*) - echo "$UNAME_MACHINE"-pc-skyos"$(echo "$UNAME_RELEASE" | sed -e 's/ .*$//')" - exit ;; + SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'` + GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL + ;; i*86:rdos:*:*) - echo "$UNAME_MACHINE"-pc-rdos - exit ;; + GUESS=$UNAME_MACHINE-pc-rdos + ;; *:AROS:*:*) - echo "$UNAME_MACHINE"-unknown-aros - exit ;; + GUESS=$UNAME_MACHINE-unknown-aros + ;; x86_64:VMkernel:*:*) - echo "$UNAME_MACHINE"-unknown-esx - exit ;; + GUESS=$UNAME_MACHINE-unknown-esx + ;; amd64:Isilon\ OneFS:*:*) - echo x86_64-unknown-onefs - exit ;; + GUESS=x86_64-unknown-onefs + ;; *:Unleashed:*:*) - echo "$UNAME_MACHINE"-unknown-unleashed"$UNAME_RELEASE" - exit ;; + GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE + ;; esac +# Do we have a guess based on uname results? +if test "x$GUESS" != x; then + echo "$GUESS" + exit +fi + # No uname command or uname output not recognized. set_cc_for_build cat > "$dummy.c" </dev/null); + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else @@ -1627,7 +1673,7 @@ } EOF -$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=$($dummy) && +$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. @@ -1635,7 +1681,7 @@ echo "$0: unable to guess system type" >&2 -case "$UNAME_MACHINE:$UNAME_SYSTEM" in +case $UNAME_MACHINE:$UNAME_SYSTEM in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 </dev/null || echo unknown) -uname -r = $( (uname -r) 2>/dev/null || echo unknown) -uname -s = $( (uname -s) 2>/dev/null || echo unknown) -uname -v = $( (uname -v) 2>/dev/null || echo unknown) - -/usr/bin/uname -p = $( (/usr/bin/uname -p) 2>/dev/null) -/bin/uname -X = $( (/bin/uname -X) 2>/dev/null) - -hostinfo = $( (hostinfo) 2>/dev/null) -/bin/universe = $( (/bin/universe) 2>/dev/null) -/usr/bin/arch -k = $( (/usr/bin/arch -k) 2>/dev/null) -/bin/arch = $( (/bin/arch) 2>/dev/null) -/usr/bin/oslevel = $( (/usr/bin/oslevel) 2>/dev/null) -/usr/convex/getsysinfo = $( (/usr/convex/getsysinfo) 2>/dev/null) +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" diff -Nru modemmanager-1.18.4/config.sub modemmanager-1.18.6/config.sub --- modemmanager-1.18.4/config.sub 2021-11-26 09:23:54.000000000 +0000 +++ modemmanager-1.18.6/config.sub 2022-02-11 10:33:20.000000000 +0000 @@ -2,7 +2,9 @@ # Configuration validation subroutine script. # Copyright 1992-2021 Free Software Foundation, Inc. -timestamp='2021-01-08' +# shellcheck disable=SC2006,SC2268 # see below for rationale + +timestamp='2021-08-14' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -50,7 +52,14 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -me=$(echo "$0" | sed -e 's,.*/,,') +# The "shellcheck disable" line above the timestamp inhibits complaints +# about features and limitations of the classic Bourne shell that were +# superseded or lifted in POSIX. However, this script identifies a wide +# variety of pre-POSIX systems that do not have POSIX shells at all, and +# even some reasonably current systems (Solaris 10 as case-in-point) still +# have a pre-POSIX /bin/sh. + +me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS @@ -112,9 +121,11 @@ # Split fields of configuration type # shellcheck disable=SC2162 +saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <&2 diff -Nru modemmanager-1.18.4/configure modemmanager-1.18.6/configure --- modemmanager-1.18.4/configure 2021-11-26 09:23:52.000000000 +0000 +++ modemmanager-1.18.6/configure 2022-02-11 10:33:19.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for ModemManager 1.18.4. +# Generated by GNU Autoconf 2.71 for ModemManager 1.18.6. # # Report bugs to . # @@ -622,8 +622,8 @@ # Identity of this package. PACKAGE_NAME='ModemManager' PACKAGE_TARNAME='ModemManager' -PACKAGE_VERSION='1.18.4' -PACKAGE_STRING='ModemManager 1.18.4' +PACKAGE_VERSION='1.18.6' +PACKAGE_STRING='ModemManager 1.18.6' PACKAGE_BUGREPORT='https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues' PACKAGE_URL='' @@ -935,6 +935,9 @@ AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V +CSCOPE +ETAGS +CTAGS am__untar am__tar AMTAR @@ -1664,7 +1667,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ModemManager 1.18.4 to adapt to many kinds of systems. +\`configure' configures ModemManager 1.18.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1735,7 +1738,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ModemManager 1.18.4:";; + short | recursive ) echo "Configuration of ModemManager 1.18.6:";; esac cat <<\_ACEOF @@ -1982,7 +1985,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ModemManager configure 1.18.4 +ModemManager configure 1.18.6 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -2281,7 +2284,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ModemManager $as_me 1.18.4, which was +It was created by ModemManager $as_me 1.18.6, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3553,7 +3556,7 @@ # Define the identity of the package. PACKAGE='ModemManager' - VERSION='1.18.4' + VERSION='1.18.6' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -3716,6 +3719,20 @@ +# Variables for tags utilities; see am/tags.am +if test -z "$CTAGS"; then + CTAGS=ctags +fi + +if test -z "$ETAGS"; then + ETAGS=etags +fi + +if test -z "$CSCOPE"; then + CSCOPE=cscope +fi + + # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile @@ -16612,8 +16629,8 @@ MM_MAJOR_VERSION=1 MM_MINOR_VERSION=18 -MM_MICRO_VERSION=4 -MM_VERSION=1.18.4 +MM_MICRO_VERSION=6 +MM_VERSION=1.18.6 @@ -23451,7 +23468,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ModemManager $as_me 1.18.4, which was +This file was extended by ModemManager $as_me 1.18.6, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23519,7 +23536,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -ModemManager config.status 1.18.4 +ModemManager config.status 1.18.6 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -Nru modemmanager-1.18.4/configure.ac modemmanager-1.18.6/configure.ac --- modemmanager-1.18.4/configure.ac 2021-11-26 09:21:05.000000000 +0000 +++ modemmanager-1.18.6/configure.ac 2022-02-11 10:31:45.000000000 +0000 @@ -6,7 +6,7 @@ m4_define([mm_major_version], [1]) m4_define([mm_minor_version], [18]) -m4_define([mm_micro_version], [4]) +m4_define([mm_micro_version], [6]) m4_define([mm_version], [mm_major_version.mm_minor_version.mm_micro_version]) diff -Nru modemmanager-1.18.4/data/fcc-unlock/Makefile.in modemmanager-1.18.6/data/fcc-unlock/Makefile.in --- modemmanager-1.18.4/data/fcc-unlock/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/data/fcc-unlock/Makefile.in 2022-02-11 10:33:20.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -186,6 +186,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -197,6 +199,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -470,7 +473,6 @@ cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/data/Makefile.in modemmanager-1.18.6/data/Makefile.in --- modemmanager-1.18.4/data/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/data/Makefile.in 2022-02-11 10:33:20.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -206,8 +206,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/ModemManager.pc.in \ $(srcdir)/mm-glib.pc.in @@ -253,6 +251,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -264,6 +264,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -777,7 +778,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/data/tests/Makefile.in modemmanager-1.18.6/data/tests/Makefile.in --- modemmanager-1.18.4/data/tests/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/data/tests/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -157,6 +157,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -168,6 +170,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -393,7 +396,6 @@ cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/debian/changelog modemmanager-1.18.6/debian/changelog --- modemmanager-1.18.4/debian/changelog 2021-12-14 09:09:29.000000000 +0000 +++ modemmanager-1.18.6/debian/changelog 2022-02-16 16:00:52.000000000 +0000 @@ -1,3 +1,19 @@ +modemmanager (1.18.6-1) unstable; urgency=medium + + [ Bjørn Bürger ] + * Add README.Debian. + * Added upgrade notice regarding changed fcc-unlock.d defaults: + https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1004447 + + [ Guido Günther ] + * Mention FCC unlock in NEWS.Debian + + [ Arnaud Ferraris ] + * New upstream version 1.18.6 + * d/libmm-glib0: update symbols file for new version. + + -- Arnaud Ferraris Wed, 16 Feb 2022 17:00:52 +0100 + modemmanager (1.18.4-1) unstable; urgency=medium [ Cyril Brulebois ] @@ -444,7 +460,7 @@ version 1.4. * debian/control: build-depends on libmbim-glib-dev 1.4 * debian/rules: run the local autogen.sh rather than gnome-autogen.sh. - * debian/rules: drop --with-tests. + * debian/rules: drop --with-tests. * debian/rules: clean up after gtk-doc files left around. * debian/patches/glib_fixes.patch: link against glib explicitly for the huawei modem helper tests. @@ -636,7 +652,7 @@ 32. However, since 2007 the default limit has been 8192, so this is actually a reduction. (Closes: #678964) - -- Michael Biebl Thu, 06 Sep 2012 17:07:18 +0200 + -- Michael Biebl Thu, 06 Sep 2012 17:07:18 +0200 modemmanager (0.6~git201206221719.8289a64-0ubuntu1) quantal; urgency=low @@ -785,7 +801,7 @@ modemmanager (0.4.997-0ubuntu1) oneiric; urgency=low * New upstream release 0.4.997. - + switch to git branch MM_05. + + switch to git branch MM_05. -- Mathieu Trudel-Lapierre Thu, 09 Jun 2011 09:41:20 -0400 @@ -967,9 +983,9 @@ - cdma: handle interim enabling/disabling states better - cdma: update for new modem states and make connect actually work - mbm: update state after enabling the device - - core: schedule enabled/disabled callbacks to avoid infinite recursion + - core: schedule enabled/disabled callbacks to avoid infinite recursion - cdma: set correct modem state on connect failure - - build: require glib-2.0 >= 2.6.18 for g_set_error_literal() + - build: require glib-2.0 >= 2.6.18 for g_set_error_literal() - zte: add missing ZTE device aux port tags - gsm: more complete parsing of PIN responses - gsm: fix unsolicited registration segfaults @@ -1048,7 +1064,7 @@ New upstream snapshot: 2009-10-03 06:33:18 (GMT) + aa78b5f5e5319e04f5b57f928bfab69dd4b93d88 * fixes - - LP: #430576 - refuse to connect over Nokia N85, turns off the handset + - LP: #430576 - refuse to connect over Nokia N85, turns off the handset - LP: #416126 - various unsolicited messages for mbm cause fail on connect -- Alexander Sack Tue, 06 Oct 2009 01:02:12 +0200 @@ -1132,7 +1148,7 @@ modemmanager (0.2.git.20090806t105932.354a4cb-0ubuntu2) karmic; urgency=low - * fix LP: #409943 - modemmanager debian/copyright has LGPL, + * fix LP: #409943 - modemmanager debian/copyright has LGPL, but upstream source is GPL - update debian/copyright diff -Nru modemmanager-1.18.4/debian/libmm-glib0.symbols modemmanager-1.18.6/debian/libmm-glib0.symbols --- modemmanager-1.18.4/debian/libmm-glib0.symbols 2021-12-14 09:09:29.000000000 +0000 +++ modemmanager-1.18.6/debian/libmm-glib0.symbols 2022-02-16 16:00:52.000000000 +0000 @@ -308,6 +308,7 @@ mm_firmware_update_settings_new_from_variant@Base 1.10.0 mm_firmware_update_settings_set_device_ids@Base 1.10.0 mm_firmware_update_settings_set_fastboot_at@Base 1.10.0 + mm_firmware_update_settings_set_method@Base 1.18.6 mm_firmware_update_settings_set_version@Base 1.10.0 mm_gdbus_bearer_call_connect@Base 0.7.991 mm_gdbus_bearer_call_connect_finish@Base 0.7.991 diff -Nru modemmanager-1.18.4/debian/modemmanager.NEWS modemmanager-1.18.6/debian/modemmanager.NEWS --- modemmanager-1.18.4/debian/modemmanager.NEWS 1970-01-01 00:00:00.000000000 +0000 +++ modemmanager-1.18.6/debian/modemmanager.NEWS 2022-02-16 16:00:52.000000000 +0000 @@ -0,0 +1,7 @@ +modemmanager (1.18.6-1) unstable; urgency=medium + + Starting with release 1.18.4, ModemManager does no longer perform the FCC + unlock procedure automatically. If your modem requires FCC unlock see + /usr/share/doc/modemmanager/README.Debian for details. + + -- Guido Günther Tue, 01 Feb 2022 09:05:48 +0100 diff -Nru modemmanager-1.18.4/debian/README.Debian modemmanager-1.18.6/debian/README.Debian --- modemmanager-1.18.4/debian/README.Debian 1970-01-01 00:00:00.000000000 +0000 +++ modemmanager-1.18.6/debian/README.Debian 2022-02-16 14:22:44.000000000 +0000 @@ -0,0 +1,30 @@ +ModemManager +============ + + +Important notice +---------------- + +If you are using a mobile device with integrated WWAN module, a manual +configuration step is needed after installing or upgrading modemmanager, +otherwise the module might NOT be useable anymore. + +Unfortunately, the logged error message will be slightly misleading. +So, if you see a message like + + [modem0] couldn't enable interface: 'Invalid transition' + +in your system logs or ModemManager keeps enabling and disabling the +module every second, you are probably affected by this change: + +Starting with release 1.18.4, ModemManager does no longer enable the +automatic FCC unlock for certain types of modems by default. + + THIS MAY BREAK EXISTING SETUPS + +You can restore the old behaviour AT YOUR OWN RISK by creating symlinks +in /etc/ModemManager/fcc-unlock.d: + + sudo ln -sft /etc/ModemManager/fcc-unlock.d /usr/share/ModemManager/fcc-unlock.available.d/* + +See https://modemmanager.org/docs/modemmanager/fcc-unlock/ for details. diff -Nru modemmanager-1.18.4/depcomp modemmanager-1.18.6/depcomp --- modemmanager-1.18.4/depcomp 2021-11-26 09:23:54.000000000 +0000 +++ modemmanager-1.18.6/depcomp 2022-02-11 10:33:21.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2020 Free Software Foundation, Inc. +# Copyright (C) 1999-2021 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff -Nru modemmanager-1.18.4/docs/Makefile.in modemmanager-1.18.6/docs/Makefile.in --- modemmanager-1.18.4/docs/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/docs/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,8 +170,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -216,6 +214,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -227,6 +227,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -543,7 +544,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/docs/man/Makefile.in modemmanager-1.18.6/docs/man/Makefile.in --- modemmanager-1.18.4/docs/man/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/docs/man/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -188,6 +188,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -199,6 +201,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -509,7 +512,6 @@ cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/docs/reference/api/html/ch04s04.html modemmanager-1.18.6/docs/reference/api/html/ch04s04.html --- modemmanager-1.18.4/docs/reference/api/html/ch04s04.html 2021-11-26 09:26:21.000000000 +0000 +++ modemmanager-1.18.6/docs/reference/api/html/ch04s04.html 2022-02-11 10:34:49.000000000 +0000 @@ -53,31 +53,31 @@ 23 24 25 -
G_MODULE_EXPORT MMPlugin *
-mm_plugin_create (void)
-{
-    static const gchar *subsystems[] = { "tty", NULL };
-    static const guint16 vendor_ids[] = { 0xabcd, 0 };
-    static const mm_uint16_pair product_ids[] = {
-        { 0x1234, 0xffff }
-    };
-    static const gchar *vendor_strings[] = { "vendor", NULL };
-
-    return MM_PLUGIN (
-        g_object_new (MM_TYPE_PLUGIN_IRIDIUM,
-                      MM_PLUGIN_NAME, "Example",
-
-                      /* Next items are pre-probing filters */
-                      MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
-                      MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids,
-                      MM_PLUGIN_ALLOWED_PRODUCT_IDS, product_ids,
-
-                      /* Next items are probing sequence setup */
-                      MM_PLUGIN_ALLOWED_AT, TRUE,
-
-                      /* No post-probing filters */
-                      NULL));
-}
+
G_MODULE_EXPORT MMPlugin *
+mm_plugin_create (void)
+{
+    static const gchar *subsystems[] = { "tty", NULL };
+    static const guint16 vendor_ids[] = { 0xabcd, 0 };
+    static const mm_uint16_pair product_ids[] = {
+        { 0x1234, 0xffff }
+    };
+    static const gchar *vendor_strings[] = { "vendor", NULL };
+
+    return MM_PLUGIN (
+        g_object_new (MM_TYPE_PLUGIN_IRIDIUM,
+                      MM_PLUGIN_NAME, "Example",
+
+                      /* Next items are pre-probing filters */
+                      MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
+                      MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids,
+                      MM_PLUGIN_ALLOWED_PRODUCT_IDS, product_ids,
+
+                      /* Next items are probing sequence setup */
+                      MM_PLUGIN_ALLOWED_AT, TRUE,
+
+                      /* No post-probing filters */
+                      NULL));
+}
@@ -112,28 +112,28 @@ 20 21 22 -
G_MODULE_EXPORT MMPlugin *
-mm_plugin_create (void)
-{
-    static const gchar *subsystems[] = { "tty", NULL };
-    static const gchar *vendor_strings[] = { "vendor", NULL };
-    static const mm_str_pair product_strings[] = { "another-vendor", "product xyz" };
-
-    return MM_PLUGIN (
-        g_object_new (MM_TYPE_PLUGIN_IRIDIUM,
-                      MM_PLUGIN_NAME, "Example",
-
-                      /* Next items are pre-probing filters */
-                      MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
-
-                      /* Next items are probing sequence setup */
-                      MM_PLUGIN_ALLOWED_AT, TRUE,
-
-                      /* Next items are post-probing filters */
-                      MM_PLUGIN_VENDOR_STRINGS, vendor_strings,
-                      MM_PLUGIN_PRODUCT_STRINGS, product_strings,
-                      NULL));
-}
+
G_MODULE_EXPORT MMPlugin *
+mm_plugin_create (void)
+{
+    static const gchar *subsystems[] = { "tty", NULL };
+    static const gchar *vendor_strings[] = { "vendor", NULL };
+    static const mm_str_pair product_strings[] = { "another-vendor", "product xyz" };
+
+    return MM_PLUGIN (
+        g_object_new (MM_TYPE_PLUGIN_IRIDIUM,
+                      MM_PLUGIN_NAME, "Example",
+
+                      /* Next items are pre-probing filters */
+                      MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
+
+                      /* Next items are probing sequence setup */
+                      MM_PLUGIN_ALLOWED_AT, TRUE,
+
+                      /* Next items are post-probing filters */
+                      MM_PLUGIN_VENDOR_STRINGS, vendor_strings,
+                      MM_PLUGIN_PRODUCT_STRINGS, product_strings,
+                      NULL));
+}
@@ -189,49 +189,49 @@ 41 42 43 -
static gboolean
-parse_custom_at (const gchar *response,
-                 const GError *error,
-                 GValue *result,
-                 GError **result_error)
-{
-    if (error) {
-        *result_error = g_error_copy (error);
-        return FALSE;
-    }
-
-    /* Otherwise, done. And also report that it's an AT port. */
-    g_value_init (result, G_TYPE_BOOLEAN);
-    g_value_set_boolean (result, TRUE);
-    return TRUE;
-}
-
-static const MMPortProbeAtCommand custom_at_probe[] = {
-    { "AT+SOMETHING", parse_custom_at },
-    { NULL }
-};
-
-G_MODULE_EXPORT MMPlugin *
-mm_plugin_create (void)
-{
-    static const gchar *subsystems[] = { "tty", NULL };
-    static const guint16 vendor_ids[] = { 0xabcd, 0 };
-
-    return MM_PLUGIN (
-        g_object_new (MM_TYPE_PLUGIN_EXAMPLE,
-                      MM_PLUGIN_NAME, "Example",
-
-                      /* Next items are pre-probing filters */
-                      MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
-                      MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids,
-
-                      /* Next items are probing sequence setup */
-                      MM_PLUGIN_CUSTOM_AT_PROBE, custom_at_probe,
-                      MM_PLUGIN_ALLOWED_AT,      TRUE,
-
-                      /* No post-probing filters */
-                      NULL));
-}
+
static gboolean
+parse_custom_at (const gchar *response,
+                 const GError *error,
+                 GValue *result,
+                 GError **result_error)
+{
+    if (error) {
+        *result_error = g_error_copy (error);
+        return FALSE;
+    }
+
+    /* Otherwise, done. And also report that it's an AT port. */
+    g_value_init (result, G_TYPE_BOOLEAN);
+    g_value_set_boolean (result, TRUE);
+    return TRUE;
+}
+
+static const MMPortProbeAtCommand custom_at_probe[] = {
+    { "AT+SOMETHING", parse_custom_at },
+    { NULL }
+};
+
+G_MODULE_EXPORT MMPlugin *
+mm_plugin_create (void)
+{
+    static const gchar *subsystems[] = { "tty", NULL };
+    static const guint16 vendor_ids[] = { 0xabcd, 0 };
+
+    return MM_PLUGIN (
+        g_object_new (MM_TYPE_PLUGIN_EXAMPLE,
+                      MM_PLUGIN_NAME, "Example",
+
+                      /* Next items are pre-probing filters */
+                      MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
+                      MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids,
+
+                      /* Next items are probing sequence setup */
+                      MM_PLUGIN_CUSTOM_AT_PROBE, custom_at_probe,
+                      MM_PLUGIN_ALLOWED_AT,      TRUE,
+
+                      /* No post-probing filters */
+                      NULL));
+}
diff -Nru modemmanager-1.18.4/docs/reference/api/html/index.html modemmanager-1.18.6/docs/reference/api/html/index.html --- modemmanager-1.18.4/docs/reference/api/html/index.html 2021-11-26 09:26:21.000000000 +0000 +++ modemmanager-1.18.6/docs/reference/api/html/index.html 2022-02-11 10:34:49.000000000 +0000 @@ -36,7 +36,7 @@

- For ModemManager version 1.18.4 + For ModemManager version 1.18.6 The latest version of this documentation can be found on-line at https://www.freedesktop.org/software/ModemManager/doc/latest/ModemManager/. diff -Nru modemmanager-1.18.4/docs/reference/api/html/ModemManager-Version-checks.html modemmanager-1.18.6/docs/reference/api/html/ModemManager-Version-checks.html --- modemmanager-1.18.4/docs/reference/api/html/ModemManager-Version-checks.html 2021-11-26 09:26:21.000000000 +0000 +++ modemmanager-1.18.6/docs/reference/api/html/ModemManager-Version-checks.html 2022-02-11 10:34:49.000000000 +0000 @@ -136,7 +136,7 @@


MM_MICRO_VERSION

-
#define MM_MICRO_VERSION (4)
+
#define MM_MICRO_VERSION (6)
 

Evaluates to the micro version number of ModemManager which this source compiled against.

diff -Nru modemmanager-1.18.4/docs/reference/api/html/style.css modemmanager-1.18.6/docs/reference/api/html/style.css --- modemmanager-1.18.4/docs/reference/api/html/style.css 2021-11-26 09:26:20.000000000 +0000 +++ modemmanager-1.18.6/docs/reference/api/html/style.css 2022-02-11 10:34:49.000000000 +0000 @@ -461,22 +461,22 @@ td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .hll { background-color: #ffffcc } -.c { color: #408080; font-style: italic } /* Comment */ +.c { color: #3D7B7B; font-style: italic } /* Comment */ .err { border: 1px solid #FF0000 } /* Error */ .k { color: #008000; font-weight: bold } /* Keyword */ .o { color: #666666 } /* Operator */ -.ch { color: #408080; font-style: italic } /* Comment.Hashbang */ -.cm { color: #408080; font-style: italic } /* Comment.Multiline */ -.cp { color: #BC7A00 } /* Comment.Preproc */ -.cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ -.c1 { color: #408080; font-style: italic } /* Comment.Single */ -.cs { color: #408080; font-style: italic } /* Comment.Special */ +.ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.cp { color: #9C6500 } /* Comment.Preproc */ +.cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ .gd { color: #A00000 } /* Generic.Deleted */ .ge { font-style: italic } /* Generic.Emph */ -.gr { color: #FF0000 } /* Generic.Error */ +.gr { color: #E40000 } /* Generic.Error */ .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.gi { color: #00A000 } /* Generic.Inserted */ -.go { color: #888888 } /* Generic.Output */ +.gi { color: #008400 } /* Generic.Inserted */ +.go { color: #717171 } /* Generic.Output */ .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ .gs { font-weight: bold } /* Generic.Strong */ .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ @@ -489,15 +489,15 @@ .kt { color: #B00040 } /* Keyword.Type */ .m { color: #666666 } /* Literal.Number */ .s { color: #BA2121 } /* Literal.String */ -.na { color: #7D9029 } /* Name.Attribute */ +.na { color: #687822 } /* Name.Attribute */ .nb { color: #008000 } /* Name.Builtin */ .nc { color: #0000FF; font-weight: bold } /* Name.Class */ .no { color: #880000 } /* Name.Constant */ .nd { color: #AA22FF } /* Name.Decorator */ -.ni { color: #999999; font-weight: bold } /* Name.Entity */ -.ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.ni { color: #717171; font-weight: bold } /* Name.Entity */ +.ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ .nf { color: #0000FF } /* Name.Function */ -.nl { color: #A0A000 } /* Name.Label */ +.nl { color: #767600 } /* Name.Label */ .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ .nt { color: #008000; font-weight: bold } /* Name.Tag */ .nv { color: #19177C } /* Name.Variable */ @@ -514,11 +514,11 @@ .dl { color: #BA2121 } /* Literal.String.Delimiter */ .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ .s2 { color: #BA2121 } /* Literal.String.Double */ -.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ .sh { color: #BA2121 } /* Literal.String.Heredoc */ -.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ .sx { color: #008000 } /* Literal.String.Other */ -.sr { color: #BB6688 } /* Literal.String.Regex */ +.sr { color: #A45A77 } /* Literal.String.Regex */ .s1 { color: #BA2121 } /* Literal.String.Single */ .ss { color: #19177C } /* Literal.String.Symbol */ .bp { color: #008000 } /* Name.Builtin.Pseudo */ diff -Nru modemmanager-1.18.4/docs/reference/api/Makefile.in modemmanager-1.18.6/docs/reference/api/Makefile.in --- modemmanager-1.18.4/docs/reference/api/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/docs/reference/api/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -181,6 +181,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -192,6 +194,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -612,7 +615,6 @@ cscope cscopelist: @ENABLE_GTK_DOC_FALSE@dist-hook: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -685,11 +687,11 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@ENABLE_GTK_DOC_FALSE@uninstall-local: @ENABLE_GTK_DOC_FALSE@clean-local: -@ENABLE_GTK_DOC_FALSE@maintainer-clean-local: -@ENABLE_GTK_DOC_FALSE@install-data-local: @ENABLE_GTK_DOC_FALSE@distclean-local: +@ENABLE_GTK_DOC_FALSE@install-data-local: +@ENABLE_GTK_DOC_FALSE@maintainer-clean-local: +@ENABLE_GTK_DOC_FALSE@uninstall-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am diff -Nru modemmanager-1.18.4/docs/reference/libmm-glib/html/index.html modemmanager-1.18.6/docs/reference/libmm-glib/html/index.html --- modemmanager-1.18.4/docs/reference/libmm-glib/html/index.html 2021-11-26 09:26:21.000000000 +0000 +++ modemmanager-1.18.6/docs/reference/libmm-glib/html/index.html 2022-02-11 10:34:49.000000000 +0000 @@ -26,7 +26,7 @@           

- For libmm-glib version 1.18.4 + For libmm-glib version 1.18.6 The latest version of this documentation can be found on-line at https://www.freedesktop.org/software/ModemManager/doc/latest/libmm-glib/. diff -Nru modemmanager-1.18.4/docs/reference/libmm-glib/html/style.css modemmanager-1.18.6/docs/reference/libmm-glib/html/style.css --- modemmanager-1.18.4/docs/reference/libmm-glib/html/style.css 2021-11-26 09:26:21.000000000 +0000 +++ modemmanager-1.18.6/docs/reference/libmm-glib/html/style.css 2022-02-11 10:34:49.000000000 +0000 @@ -461,22 +461,22 @@ td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .hll { background-color: #ffffcc } -.c { color: #408080; font-style: italic } /* Comment */ +.c { color: #3D7B7B; font-style: italic } /* Comment */ .err { border: 1px solid #FF0000 } /* Error */ .k { color: #008000; font-weight: bold } /* Keyword */ .o { color: #666666 } /* Operator */ -.ch { color: #408080; font-style: italic } /* Comment.Hashbang */ -.cm { color: #408080; font-style: italic } /* Comment.Multiline */ -.cp { color: #BC7A00 } /* Comment.Preproc */ -.cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ -.c1 { color: #408080; font-style: italic } /* Comment.Single */ -.cs { color: #408080; font-style: italic } /* Comment.Special */ +.ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */ +.cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */ +.cp { color: #9C6500 } /* Comment.Preproc */ +.cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */ +.c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */ +.cs { color: #3D7B7B; font-style: italic } /* Comment.Special */ .gd { color: #A00000 } /* Generic.Deleted */ .ge { font-style: italic } /* Generic.Emph */ -.gr { color: #FF0000 } /* Generic.Error */ +.gr { color: #E40000 } /* Generic.Error */ .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -.gi { color: #00A000 } /* Generic.Inserted */ -.go { color: #888888 } /* Generic.Output */ +.gi { color: #008400 } /* Generic.Inserted */ +.go { color: #717171 } /* Generic.Output */ .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ .gs { font-weight: bold } /* Generic.Strong */ .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ @@ -489,15 +489,15 @@ .kt { color: #B00040 } /* Keyword.Type */ .m { color: #666666 } /* Literal.Number */ .s { color: #BA2121 } /* Literal.String */ -.na { color: #7D9029 } /* Name.Attribute */ +.na { color: #687822 } /* Name.Attribute */ .nb { color: #008000 } /* Name.Builtin */ .nc { color: #0000FF; font-weight: bold } /* Name.Class */ .no { color: #880000 } /* Name.Constant */ .nd { color: #AA22FF } /* Name.Decorator */ -.ni { color: #999999; font-weight: bold } /* Name.Entity */ -.ne { color: #D2413A; font-weight: bold } /* Name.Exception */ +.ni { color: #717171; font-weight: bold } /* Name.Entity */ +.ne { color: #CB3F38; font-weight: bold } /* Name.Exception */ .nf { color: #0000FF } /* Name.Function */ -.nl { color: #A0A000 } /* Name.Label */ +.nl { color: #767600 } /* Name.Label */ .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ .nt { color: #008000; font-weight: bold } /* Name.Tag */ .nv { color: #19177C } /* Name.Variable */ @@ -514,11 +514,11 @@ .dl { color: #BA2121 } /* Literal.String.Delimiter */ .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ .s2 { color: #BA2121 } /* Literal.String.Double */ -.se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ +.se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */ .sh { color: #BA2121 } /* Literal.String.Heredoc */ -.si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ +.si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */ .sx { color: #008000 } /* Literal.String.Other */ -.sr { color: #BB6688 } /* Literal.String.Regex */ +.sr { color: #A45A77 } /* Literal.String.Regex */ .s1 { color: #BA2121 } /* Literal.String.Single */ .ss { color: #19177C } /* Literal.String.Symbol */ .bp { color: #008000 } /* Name.Builtin.Pseudo */ diff -Nru modemmanager-1.18.4/docs/reference/libmm-glib/libmm-glib-sections.txt modemmanager-1.18.6/docs/reference/libmm-glib/libmm-glib-sections.txt --- modemmanager-1.18.4/docs/reference/libmm-glib/libmm-glib-sections.txt 2021-11-26 09:26:21.000000000 +0000 +++ modemmanager-1.18.6/docs/reference/libmm-glib/libmm-glib-sections.txt 2022-02-11 10:34:49.000000000 +0000 @@ -107,6 +107,8 @@ mm_object_get_modem_signal mm_object_peek_modem_voice mm_object_get_modem_voice +mm_object_peek_modem_sar +mm_object_get_modem_sar MMObjectClass MM_IS_OBJECT @@ -780,6 +782,7 @@ mm_firmware_update_settings_new mm_firmware_update_settings_new_from_variant mm_firmware_update_settings_set_fastboot_at +mm_firmware_update_settings_set_method mm_firmware_update_settings_set_device_ids mm_firmware_update_settings_set_version diff -Nru modemmanager-1.18.4/docs/reference/libmm-glib/Makefile.in modemmanager-1.18.6/docs/reference/libmm-glib/Makefile.in --- modemmanager-1.18.4/docs/reference/libmm-glib/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/docs/reference/libmm-glib/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -181,6 +181,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -192,6 +194,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -591,7 +594,6 @@ cscope cscopelist: @ENABLE_GTK_DOC_FALSE@dist-hook: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am @@ -664,11 +666,11 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -@ENABLE_GTK_DOC_FALSE@install-data-local: +@ENABLE_GTK_DOC_FALSE@clean-local: @ENABLE_GTK_DOC_FALSE@distclean-local: -@ENABLE_GTK_DOC_FALSE@uninstall-local: +@ENABLE_GTK_DOC_FALSE@install-data-local: @ENABLE_GTK_DOC_FALSE@maintainer-clean-local: -@ENABLE_GTK_DOC_FALSE@clean-local: +@ENABLE_GTK_DOC_FALSE@uninstall-local: clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am diff -Nru modemmanager-1.18.4/docs/reference/Makefile.in modemmanager-1.18.6/docs/reference/Makefile.in --- modemmanager-1.18.4/docs/reference/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/docs/reference/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,8 +170,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -216,6 +214,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -227,6 +227,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -543,7 +544,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/examples/Makefile.in modemmanager-1.18.6/examples/Makefile.in --- modemmanager-1.18.4/examples/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/examples/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,8 +170,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -216,6 +214,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -227,6 +227,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -550,7 +551,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/examples/modem-watcher-javascript/Makefile.in modemmanager-1.18.6/examples/modem-watcher-javascript/Makefile.in --- modemmanager-1.18.4/examples/modem-watcher-javascript/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/examples/modem-watcher-javascript/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -156,6 +156,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -167,6 +169,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -394,7 +397,6 @@ cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/examples/modem-watcher-python/Makefile.in modemmanager-1.18.6/examples/modem-watcher-python/Makefile.in --- modemmanager-1.18.4/examples/modem-watcher-python/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/examples/modem-watcher-python/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -156,6 +156,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -167,6 +169,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -393,7 +396,6 @@ cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/examples/network-scan-python/Makefile.in modemmanager-1.18.6/examples/network-scan-python/Makefile.in --- modemmanager-1.18.4/examples/network-scan-python/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/examples/network-scan-python/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -156,6 +156,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -167,6 +169,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -393,7 +396,6 @@ cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/examples/sms-c/Makefile.in modemmanager-1.18.6/examples/sms-c/Makefile.in --- modemmanager-1.18.4/examples/sms-c/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/examples/sms-c/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -197,8 +197,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -217,6 +215,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -228,6 +228,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -629,7 +630,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/examples/sms-python/Makefile.in modemmanager-1.18.6/examples/sms-python/Makefile.in --- modemmanager-1.18.4/examples/sms-python/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/examples/sms-python/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -156,6 +156,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -167,6 +169,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -393,7 +396,6 @@ cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/include/Makefile.in modemmanager-1.18.6/include/Makefile.in --- modemmanager-1.18.4/include/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/include/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -185,8 +185,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in \ $(srcdir)/ModemManager-version.h.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -206,6 +204,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -217,6 +217,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -525,7 +526,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/include/ModemManager-version.h modemmanager-1.18.6/include/ModemManager-version.h --- modemmanager-1.18.4/include/ModemManager-version.h 2021-11-26 09:24:03.000000000 +0000 +++ modemmanager-1.18.6/include/ModemManager-version.h 2022-02-11 10:33:31.000000000 +0000 @@ -56,7 +56,7 @@ * * Since: 1.0 */ -#define MM_MICRO_VERSION (4) +#define MM_MICRO_VERSION (6) /** * MM_CHECK_VERSION: diff -Nru modemmanager-1.18.4/INSTALL modemmanager-1.18.6/INSTALL --- modemmanager-1.18.4/INSTALL 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/INSTALL 2022-02-11 10:33:20.000000000 +0000 @@ -1,8 +1,8 @@ Installation Instructions ************************* - Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software -Foundation, Inc. + Copyright (C) 1994-1996, 1999-2002, 2004-2017, 2020-2021 Free +Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright @@ -225,7 +225,7 @@ and if that doesn't work, install pre-built binaries of GCC for HP-UX. - HP-UX 'make' updates targets which have the same time stamps as their + HP-UX 'make' updates targets which have the same timestamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. diff -Nru modemmanager-1.18.4/introspection/Makefile.in modemmanager-1.18.6/introspection/Makefile.in --- modemmanager-1.18.4/introspection/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/introspection/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -200,8 +200,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -246,6 +244,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -257,6 +257,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -623,7 +624,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/introspection/tests/Makefile.in modemmanager-1.18.6/introspection/tests/Makefile.in --- modemmanager-1.18.4/introspection/tests/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/introspection/tests/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -156,6 +156,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -167,6 +169,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -392,7 +395,6 @@ cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/libmm-glib/generated/Makefile.in modemmanager-1.18.6/libmm-glib/generated/Makefile.in --- modemmanager-1.18.4/libmm-glib/generated/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/libmm-glib/generated/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -255,8 +255,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -301,6 +299,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -312,6 +312,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -940,7 +941,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/libmm-glib/generated/tests/Makefile.in modemmanager-1.18.6/libmm-glib/generated/tests/Makefile.in --- modemmanager-1.18.4/libmm-glib/generated/tests/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/libmm-glib/generated/tests/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -192,8 +192,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -212,6 +210,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -223,6 +223,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -581,7 +582,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/libmm-glib/Makefile.in modemmanager-1.18.6/libmm-glib/Makefile.in --- modemmanager-1.18.4/libmm-glib/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/libmm-glib/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -319,8 +319,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -365,6 +363,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -376,6 +376,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -1412,7 +1413,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/libmm-glib/mm-firmware-update-settings.c modemmanager-1.18.6/libmm-glib/mm-firmware-update-settings.c --- modemmanager-1.18.4/libmm-glib/mm-firmware-update-settings.c 2021-11-22 13:01:56.000000000 +0000 +++ modemmanager-1.18.6/libmm-glib/mm-firmware-update-settings.c 2022-02-11 10:12:26.000000000 +0000 @@ -70,6 +70,18 @@ return self->priv->method; } +/** + * mm_firmware_update_settings_set_method: (skip) + */ +void +mm_firmware_update_settings_set_method (MMFirmwareUpdateSettings *self, + MMModemFirmwareUpdateMethod method) +{ + g_return_if_fail (MM_IS_FIRMWARE_UPDATE_SETTINGS (self)); + + self->priv->method = method; +} + /*****************************************************************************/ /** diff -Nru modemmanager-1.18.4/libmm-glib/mm-firmware-update-settings.h modemmanager-1.18.6/libmm-glib/mm-firmware-update-settings.h --- modemmanager-1.18.4/libmm-glib/mm-firmware-update-settings.h 2021-11-22 13:01:56.000000000 +0000 +++ modemmanager-1.18.6/libmm-glib/mm-firmware-update-settings.h 2022-02-11 10:12:26.000000000 +0000 @@ -87,10 +87,12 @@ GVariant *mm_firmware_update_settings_get_variant (MMFirmwareUpdateSettings *self); /* Generic */ -void mm_firmware_update_settings_set_device_ids (MMFirmwareUpdateSettings *self, - const gchar **device_ids); -void mm_firmware_update_settings_set_version (MMFirmwareUpdateSettings *self, - const gchar *version); +void mm_firmware_update_settings_set_device_ids (MMFirmwareUpdateSettings *self, + const gchar **device_ids); +void mm_firmware_update_settings_set_version (MMFirmwareUpdateSettings *self, + const gchar *version); +void mm_firmware_update_settings_set_method (MMFirmwareUpdateSettings *self, + MMModemFirmwareUpdateMethod method); /* Fastboot specific */ void mm_firmware_update_settings_set_fastboot_at (MMFirmwareUpdateSettings *self, diff -Nru modemmanager-1.18.4/libmm-glib/mm-modem-3gpp.c modemmanager-1.18.6/libmm-glib/mm-modem-3gpp.c --- modemmanager-1.18.4/libmm-glib/mm-modem-3gpp.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/libmm-glib/mm-modem-3gpp.c 2022-02-11 10:12:22.000000000 +0000 @@ -718,6 +718,8 @@ g_variant_unref (dict); } + g_variant_unref (variant); + return list; } diff -Nru modemmanager-1.18.4/libmm-glib/tests/Makefile.in modemmanager-1.18.6/libmm-glib/tests/Makefile.in --- modemmanager-1.18.4/libmm-glib/tests/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/libmm-glib/tests/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -196,8 +196,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/gtester.make DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -217,6 +215,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -228,6 +228,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -611,7 +612,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/libqcdm/Makefile.in modemmanager-1.18.6/libqcdm/Makefile.in --- modemmanager-1.18.4/libqcdm/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/libqcdm/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,8 +170,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in AUTHORS ChangeLog NEWS README DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -216,6 +214,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -227,6 +227,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -543,7 +544,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/libqcdm/src/Makefile.in modemmanager-1.18.6/libqcdm/src/Makefile.in --- modemmanager-1.18.4/libqcdm/src/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/libqcdm/src/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -198,8 +198,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -218,6 +216,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -229,6 +229,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -657,7 +658,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/libqcdm/tests/Makefile.in modemmanager-1.18.6/libqcdm/tests/Makefile.in --- modemmanager-1.18.4/libqcdm/tests/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/libqcdm/tests/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -224,8 +224,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/gtester.make DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -245,6 +243,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -256,6 +256,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -779,7 +780,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/Makefile.in modemmanager-1.18.6/Makefile.in --- modemmanager-1.18.4/Makefile.in 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/Makefile.in 2022-02-11 10:33:20.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -175,9 +175,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags -CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/tools/tests/services/org.freedesktop.ModemManager1.service.in \ @@ -244,6 +241,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -255,6 +254,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -634,7 +634,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/missing modemmanager-1.18.6/missing --- modemmanager-1.18.4/missing 2021-11-26 09:23:53.000000000 +0000 +++ modemmanager-1.18.6/missing 2022-02-11 10:33:20.000000000 +0000 @@ -3,7 +3,7 @@ scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2020 Free Software Foundation, Inc. +# Copyright (C) 1996-2021 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify diff -Nru modemmanager-1.18.4/NEWS modemmanager-1.18.6/NEWS --- modemmanager-1.18.4/NEWS 2021-11-26 09:21:05.000000000 +0000 +++ modemmanager-1.18.6/NEWS 2022-02-11 10:31:11.000000000 +0000 @@ -1,4 +1,47 @@ +ModemManager 1.18.6 +------------------------------------------- + + * Build: + ** meson: fix gdbus code generation with meson 0.61. + ** meson: fix i18n.merge_file() call with meson 0.60. + + * Core: + ** plugin-manager: longer extra probing time when not using udev. + ** filter: added 'option' driver name to the TTY driver filter list. + ** udev: avoid wrong [0-9]* as shell globbing patterns. + + * QMI: + ** Added new ID_MM_QMI_FACILITY_LOCK_QUERY_REDUCED udev flag to reduce the + facility lock querying operations on devices that don't support it + properly. + ** Fixed capabilities and modes loading in multimode devices. + ** Improved capabilities and modes handling for devices with 5G capabilities. + + * MBIM: + ** Fixed logic reporting the number of remaining unlock attempts. + + * 3GPP interface: + ** Fix memleak in network scan result building. + + * libmm-glib: + ** Fix memleak when processing network scan results. + + * mmcli: + ** Fixed operator mcc/mnc field names in human output of location info. + + * Plugins: + ** telit: added port type hints for LE910C1-EUX. + ** fibocom: added port type hints for FM101. + ** foxconn: firmware info loading only of MBIM-QMUX is enabled in libqmi. + ** quectel: ignore carrier revision. + ** quectel: use +QGMR to set version. + ** quectel: add new 'NAME' tag in device ids, so that firmware updates can be + performed differently depending on the device name. + + * Several other improvements and fixes. + + ModemManager 1.18.4 ------------------------------------------- diff -Nru modemmanager-1.18.4/plugins/fibocom/77-mm-fibocom-port-types.rules modemmanager-1.18.6/plugins/fibocom/77-mm-fibocom-port-types.rules --- modemmanager-1.18.4/plugins/fibocom/77-mm-fibocom-port-types.rules 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/plugins/fibocom/77-mm-fibocom-port-types.rules 2022-02-11 10:12:22.000000000 +0000 @@ -31,4 +31,26 @@ ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="0104", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="0104", ENV{.MM_USBIFNUM}=="03", ENV{ID_MM_PORT_IGNORE}="1" +# Fibocom FM101-GL (MBIM) +# ttyUSB0 (if #2): AT port +# ttyUSB1 (if #3): AT port +# ttyUSB2 (if #4): debug port (ignore) +# ttyUSB3 (if #5): debug port (ignore) +ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1" +ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="03", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" +ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1" +ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a2", ENV{.MM_USBIFNUM}=="05", ENV{ID_MM_PORT_IGNORE}="1" + +# Fibocom FM101-GL (ADB) +# ttyUSB0 (if #2): debug port (ignore) +# ttyUSB1 (if #3): AT port +# ttyUSB2 (if #4): debug port (ignore) +# ttyUSB3 (if #5): debug port (ignore) +# ttyUSB4 (if #6): debug port (ignore) +ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a4", ENV{.MM_USBIFNUM}=="02", ENV{ID_MM_PORT_IGNORE}="1" +ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a4", ENV{.MM_USBIFNUM}=="03", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1" +ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a4", ENV{.MM_USBIFNUM}=="04", ENV{ID_MM_PORT_IGNORE}="1" +ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a4", ENV{.MM_USBIFNUM}=="05", ENV{ID_MM_PORT_IGNORE}="1" +ATTRS{idVendor}=="2cb7", ATTRS{idProduct}=="01a4", ENV{.MM_USBIFNUM}=="06", ENV{ID_MM_PORT_IGNORE}="1" + LABEL="mm_fibocom_port_types_end" diff -Nru modemmanager-1.18.4/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c modemmanager-1.18.6/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c --- modemmanager-1.18.4/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c 2022-02-11 10:12:22.000000000 +0000 @@ -33,21 +33,21 @@ #include "mm-iface-modem-location.h" #include "mm-broadband-modem-mbim-foxconn.h" -#if defined WITH_QMI +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED # include "mm-iface-modem-firmware.h" # include "mm-shared-qmi.h" #endif static void iface_modem_location_init (MMIfaceModemLocation *iface); -#if defined WITH_QMI +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED static void iface_modem_firmware_init (MMIfaceModemFirmware *iface); #endif static MMIfaceModemLocation *iface_modem_location_parent; G_DEFINE_TYPE_EXTENDED (MMBroadbandModemMbimFoxconn, mm_broadband_modem_mbim_foxconn, MM_TYPE_BROADBAND_MODEM_MBIM, 0, -#if defined WITH_QMI +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM_FIRMWARE, iface_modem_firmware_init) #endif G_IMPLEMENT_INTERFACE (MM_TYPE_IFACE_MODEM_LOCATION, iface_modem_location_init)) @@ -63,7 +63,7 @@ }; -#if defined WITH_QMI +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED /*****************************************************************************/ /* Firmware update settings @@ -500,7 +500,7 @@ iface->disable_location_gathering_finish = disable_location_gathering_finish; } -#if defined WITH_QMI +#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED static void iface_modem_firmware_init (MMIfaceModemFirmware *iface) diff -Nru modemmanager-1.18.4/plugins/Makefile.in modemmanager-1.18.6/plugins/Makefile.in --- modemmanager-1.18.4/plugins/Makefile.in 2021-11-26 09:23:54.000000000 +0000 +++ modemmanager-1.18.6/plugins/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1885,8 +1885,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/gtester.make DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -1906,6 +1904,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -1917,6 +1917,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -5782,7 +5783,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/plugins/qcom-soc/77-mm-qcom-soc.rules modemmanager-1.18.6/plugins/qcom-soc/77-mm-qcom-soc.rules --- modemmanager-1.18.4/plugins/qcom-soc/77-mm-qcom-soc.rules 2021-11-22 14:04:31.000000000 +0000 +++ modemmanager-1.18.6/plugins/qcom-soc/77-mm-qcom-soc.rules 2022-01-07 10:14:39.000000000 +0000 @@ -24,17 +24,17 @@ ENV{ID_MM_PHYSDEV_UID}="qcom-soc" # port type hints for the rpmsgexport-ed ports -SUBSYSTEM=="rpmsg", ATTR{name}=="DATA[0-9]*_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" -SUBSYSTEM=="rpmsg", ATTR{name}=="DATA[0-9]", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA*", ATTR{name}=="*_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA*", ATTR{name}!="*_CNTL", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" # ignore every other port without explicit hints SUBSYSTEM=="rpmsg", ENV{ID_MM_PORT_TYPE_QMI}!="1", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}!="1", ENV{ID_MM_PORT_IGNORE}="1" # explicitly ignore ports intended for USB tethering (DATA40, DATA40_CNTL) SUBSYSTEM=="rpmsg", ATTR{name}=="DATA40*", ENV{ID_MM_PORT_IGNORE}="1" -KERNEL=="rmnet_usb[0-9]*", ENV{ID_MM_PORT_IGNORE}="1" +KERNEL=="rmnet_usb*", ENV{ID_MM_PORT_IGNORE}="1" # flag all rpmsg ports under this plugin as candidate -KERNEL=="rpmsg[0-9]*", SUBSYSTEM=="rpmsg", ENV{ID_MM_CANDIDATE}="1" +KERNEL=="rpmsg*", SUBSYSTEM=="rpmsg", ENV{ID_MM_CANDIDATE}="1" LABEL="mm_qcom_soc_end" diff -Nru modemmanager-1.18.4/plugins/quectel/mm-broadband-modem-qmi-quectel.c modemmanager-1.18.6/plugins/quectel/mm-broadband-modem-qmi-quectel.c --- modemmanager-1.18.4/plugins/quectel/mm-broadband-modem-qmi-quectel.c 2021-10-28 12:15:48.000000000 +0000 +++ modemmanager-1.18.6/plugins/quectel/mm-broadband-modem-qmi-quectel.c 2022-01-22 09:30:15.000000000 +0000 @@ -52,6 +52,8 @@ MM_BASE_MODEM_PLUGIN, plugin, MM_BASE_MODEM_VENDOR_ID, vendor_id, MM_BASE_MODEM_PRODUCT_ID, product_id, + /* exclude carrier information */ + MM_IFACE_MODEM_FIRMWARE_IGNORE_CARRIER, TRUE, /* QMI bearer supports NET only */ MM_BASE_MODEM_DATA_NET_SUPPORTED, TRUE, MM_BASE_MODEM_DATA_TTY_SUPPORTED, FALSE, diff -Nru modemmanager-1.18.4/plugins/quectel/mm-shared-quectel.c modemmanager-1.18.6/plugins/quectel/mm-shared-quectel.c --- modemmanager-1.18.4/plugins/quectel/mm-shared-quectel.c 2021-10-28 12:15:48.000000000 +0000 +++ modemmanager-1.18.6/plugins/quectel/mm-shared-quectel.c 2022-02-11 10:12:26.000000000 +0000 @@ -144,21 +144,90 @@ } static void +quectel_get_firmware_version_ready (MMBaseModem *modem, + GAsyncResult *res, + GTask *task) +{ + MMFirmwareUpdateSettings *update_settings; + const gchar *version; + + update_settings = g_task_get_task_data (task); + + /* Set full firmware version */ + version = mm_base_modem_at_command_finish (modem, res, NULL); + if (version) + mm_firmware_update_settings_set_version (update_settings, version); + + g_task_return_pointer (task, g_object_ref (update_settings), g_object_unref); + g_object_unref (task); +} + +static void qfastboot_test_ready (MMBaseModem *self, GAsyncResult *res, GTask *task) { MMFirmwareUpdateSettings *update_settings; - if (!mm_base_modem_at_command_finish (self, res, NULL)) - update_settings = mm_firmware_update_settings_new (MM_MODEM_FIRMWARE_UPDATE_METHOD_NONE); - else { - update_settings = mm_firmware_update_settings_new (MM_MODEM_FIRMWARE_UPDATE_METHOD_FASTBOOT); + update_settings = g_task_get_task_data (task); + + /* Set update method */ + if (mm_base_modem_at_command_finish (self, res, NULL)) { + mm_firmware_update_settings_set_method (update_settings, MM_MODEM_FIRMWARE_UPDATE_METHOD_FASTBOOT); mm_firmware_update_settings_set_fastboot_at (update_settings, "AT+QFASTBOOT"); + } else + mm_firmware_update_settings_set_method (update_settings, MM_MODEM_FIRMWARE_UPDATE_METHOD_NONE); + + /* Fetch full firmware info */ + mm_base_modem_at_command (MM_BASE_MODEM (self), + "+QGMR?", + 3, + FALSE, + (GAsyncReadyCallback) quectel_get_firmware_version_ready, + task); +} + +static void +quectel_at_port_get_firmware_revision_ready (MMBaseModem *self, + GAsyncResult *res, + GTask *task) +{ + MMFirmwareUpdateSettings *update_settings; + const gchar *revision; + const gchar *name; + const gchar *id; + g_autoptr(GPtrArray) ids = NULL; + GError *error = NULL; + + update_settings = g_task_get_task_data (task); + + /* Set device ids */ + ids = mm_iface_firmware_build_generic_device_ids (MM_IFACE_MODEM_FIRMWARE (self), &error); + if (error) { + mm_obj_warn (self, "failed to build generic device ids: %s", error->message); + g_task_return_error (task, error); + g_object_unref (task); + return; } - g_task_return_pointer (task, update_settings, g_object_unref); - g_object_unref (task); + /* Add device id based on modem name */ + revision = mm_base_modem_at_command_finish (self, res, NULL); + if (revision && g_utf8_validate (revision, -1, NULL)) { + name = g_strndup (revision, 7); + mm_obj_dbg (self, "revision %s converted to modem name %s", revision, name); + id = (const gchar *) g_ptr_array_index (ids, 0); + g_ptr_array_insert (ids, 0, g_strdup_printf ("%s&NAME_%s", id, name)); + } + + mm_firmware_update_settings_set_device_ids (update_settings, (const gchar **)ids->pdata); + + /* Check fastboot support */ + mm_base_modem_at_command (self, + "AT+QFASTBOOT=?", + 3, + TRUE, + (GAsyncReadyCallback) qfastboot_test_ready, + task); } void @@ -167,14 +236,32 @@ gpointer user_data) { GTask *task; + MMPortSerialAt *at_port; + MMFirmwareUpdateSettings *update_settings; task = g_task_new (self, NULL, callback, user_data); - mm_base_modem_at_command (MM_BASE_MODEM (self), - "AT+QFASTBOOT=?", - 3, - TRUE, - (GAsyncReadyCallback)qfastboot_test_ready, - task); + + at_port = mm_base_modem_peek_best_at_port (MM_BASE_MODEM (self), NULL); + if (at_port) { + update_settings = mm_firmware_update_settings_new (MM_MODEM_FIRMWARE_UPDATE_METHOD_NONE); + g_task_set_task_data (task, update_settings, g_object_unref); + + /* Fetch modem name */ + mm_base_modem_at_command (MM_BASE_MODEM (self), + "+CGMR", + 3, + TRUE, + (GAsyncReadyCallback) quectel_at_port_get_firmware_revision_ready, + task); + + return; + } + + g_task_return_new_error (task, + MM_CORE_ERROR, + MM_CORE_ERROR_FAILED, + "Couldn't find a port to fetch firmware info"); + g_object_unref (task); } /*****************************************************************************/ diff -Nru modemmanager-1.18.4/plugins/telit/77-mm-telit-port-types.rules modemmanager-1.18.6/plugins/telit/77-mm-telit-port-types.rules --- modemmanager-1.18.4/plugins/telit/77-mm-telit-port-types.rules 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/plugins/telit/77-mm-telit-port-types.rules 2022-02-11 10:12:22.000000000 +0000 @@ -34,6 +34,18 @@ # CE910-DUAL ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1011", ENV{.MM_USBIFNUM}=="01", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1" +# LE910C1-EUX +# The following port is ignored since it's a diagnostic port +ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1031", ENV{.MM_USBIFNUM}=="00", ENV{ID_MM_PORT_IGNORE}="1" +ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1031", ENV{.MM_USBIFNUM}=="01", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1" +ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1031", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" + +# LE910C1-EUX (ECM composition) +# The following port is ignored since it's a diagnostic port +ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1033", ENV{.MM_USBIFNUM}=="00", ENV{ID_MM_PORT_IGNORE}="1" +ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1033", ENV{.MM_USBIFNUM}=="01", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1" +ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1033", ENV{.MM_USBIFNUM}=="02", SUBSYSTEM=="tty", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" + # LE922, LM9x0 ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1040", ENV{.MM_USBIFNUM}=="00", ENV{ID_MM_PORT_IGNORE}="1" ATTRS{idVendor}=="1bc7", ATTRS{idProduct}=="1040", ENV{.MM_USBIFNUM}=="03", ENV{ID_MM_PORT_IGNORE}="1" diff -Nru modemmanager-1.18.4/po/ModemManager.pot modemmanager-1.18.6/po/ModemManager.pot --- modemmanager-1.18.4/po/ModemManager.pot 2021-11-26 09:24:06.000000000 +0000 +++ modemmanager-1.18.6/po/ModemManager.pot 2022-02-11 10:33:34.000000000 +0000 @@ -6,10 +6,10 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: ModemManager 1.18.4\n" +"Project-Id-Version: ModemManager 1.18.6\n" "Report-Msgid-Bugs-To: https://gitlab.freedesktop.org/mobile-broadband/" "ModemManager/issues\n" -"POT-Creation-Date: 2021-11-26 10:24+0100\n" +"POT-Creation-Date: 2022-02-11 11:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff -Nru modemmanager-1.18.4/src/80-mm-candidate.rules modemmanager-1.18.6/src/80-mm-candidate.rules --- modemmanager-1.18.4/src/80-mm-candidate.rules 2021-09-17 13:11:50.000000000 +0000 +++ modemmanager-1.18.6/src/80-mm-candidate.rules 2022-01-07 10:14:39.000000000 +0000 @@ -15,7 +15,7 @@ SUBSYSTEM=="tty", ENV{ID_MM_CANDIDATE}="1" SUBSYSTEM=="net", ENV{ID_MM_CANDIDATE}="1" -KERNEL=="cdc-wdm[0-9]*", SUBSYSTEM=="usbmisc", ENV{ID_MM_CANDIDATE}="1" +KERNEL=="cdc-wdm*", SUBSYSTEM=="usbmisc", ENV{ID_MM_CANDIDATE}="1" # WWAN subsystem port handling # - All USB devices ignored for now, only PCI devices expected diff -Nru modemmanager-1.18.4/src/kerneldevice/mm-kernel-device-helpers.c modemmanager-1.18.6/src/kerneldevice/mm-kernel-device-helpers.c --- modemmanager-1.18.4/src/kerneldevice/mm-kernel-device-helpers.c 2021-11-22 14:04:31.000000000 +0000 +++ modemmanager-1.18.6/src/kerneldevice/mm-kernel-device-helpers.c 2022-02-01 09:40:53.000000000 +0000 @@ -68,12 +68,12 @@ static gchar * build_string_match_pattern (const gchar *str) { - GString *regex_pattern; - const gchar *str_start; - gsize len; - gchar *aux; - gboolean prefix_match = FALSE; - gboolean suffix_match = FALSE; + GString *regex_pattern; + const gchar *str_start; + gsize len; + g_autofree gchar *aux = NULL; + gboolean prefix_match = FALSE; + gboolean suffix_match = FALSE; /* We allow prefix and suffix matches given as input, by means of the * single '*' character given either at the beginning or the end of the diff -Nru modemmanager-1.18.4/src/Makefile.in modemmanager-1.18.6/src/Makefile.in --- modemmanager-1.18.4/src/Makefile.in 2021-11-26 09:23:54.000000000 +0000 +++ modemmanager-1.18.6/src/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -544,8 +544,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -590,6 +588,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -601,6 +601,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -2039,7 +2040,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/src/mm-broadband-modem-mbim.c modemmanager-1.18.6/src/mm-broadband-modem-mbim.c --- modemmanager-1.18.4/src/mm-broadband-modem-mbim.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/src/mm-broadband-modem-mbim.c 2022-02-11 10:12:22.000000000 +0000 @@ -155,6 +155,8 @@ /* Multi-SIM support */ guint32 executor_index; guint active_slot_index; + + MMUnlockRetries *unlock_retries; }; /*****************************************************************************/ @@ -1325,51 +1327,14 @@ NULL, &remaining_attempts, &error)) { - MMIfaceModem *self; + MMBroadbandModemMbim *self; MMModemLock lock; - MMUnlockRetries *retries; - self = g_task_get_source_object (task); + self = MM_BROADBAND_MODEM_MBIM (g_task_get_source_object (task)); lock = mm_modem_lock_from_mbim_pin_type (pin_type); - retries = mm_unlock_retries_new (); - - /* If PIN1 is disabled and we have tried to enable it with a wrong PIN, - * the modem would have indicated the number of remaining attempts for - * PIN1 (unless PUK1 is engaged) in the response to the failed - * MBIM_CID_PIN set operation. Thus, MMSimMbim would have updated - * MMIfaceModem's MMUnlockRetries with information about PIN1. - * - * However, a MBIM_CID_PIN query may be issued (e.g. MMBaseSim calls - * mm_iface_modem_update_lock_info()) after the MBIM_CID_PIN set - * operation to query the number of remaining attempts for a PIN type. - * Unfortunately, we can't specify a particular PIN type in a - * MBIM_CID_PIN query. The modem may not reply with information about - * PIN1 if PIN1 is disabled. When that happens, we would like to - * preserve our knowledge about the number of remaining attempts for - * PIN1. Here we thus carry over any existing information on PIN1 from - * MMIfaceModem's MMUnlockRetries if the MBIM_CID_PIN query reports - * something other than PIN1. */ - if (lock != MM_MODEM_LOCK_SIM_PIN) { - MMUnlockRetries *previous_retries; - guint previous_sim_pin_retries; - - previous_retries = mm_iface_modem_get_unlock_retries (self); - previous_sim_pin_retries = mm_unlock_retries_get (previous_retries, - MM_MODEM_LOCK_SIM_PIN); - if (previous_sim_pin_retries != MM_UNLOCK_RETRIES_UNKNOWN) { - mm_unlock_retries_set (retries, - MM_MODEM_LOCK_SIM_PIN, - previous_sim_pin_retries); - } - g_object_unref (previous_retries); - } - - /* According to the MBIM specification, RemainingAttempts is set to - * 0xffffffff if the device does not support this information. */ - if (remaining_attempts != G_MAXUINT32) - mm_unlock_retries_set (retries, lock, remaining_attempts); - g_task_return_pointer (task, retries, g_object_unref); + mm_broadband_modem_mbim_set_unlock_retries (self, lock, remaining_attempts); + g_task_return_pointer (task, g_object_ref (self->priv->unlock_retries), g_object_unref); } else g_task_return_error (task, error); @@ -1403,6 +1368,24 @@ mbim_message_unref (message); } +void +mm_broadband_modem_mbim_set_unlock_retries (MMBroadbandModemMbim *self, + MMModemLock lock_type, + guint32 remaining_attempts) +{ + g_assert (MM_IS_BROADBAND_MODEM_MBIM (self)); + + if (!self->priv->unlock_retries) + self->priv->unlock_retries = mm_unlock_retries_new (); + + /* According to the MBIM specification, RemainingAttempts is set to + * 0xffffffff if the device does not support this information. */ + if (remaining_attempts != G_MAXUINT32) + mm_unlock_retries_set (self->priv->unlock_retries, + lock_type, + remaining_attempts); +} + /*****************************************************************************/ /* Own numbers loading */ @@ -3406,7 +3389,7 @@ if ((self->priv->last_ready_state != MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED && ready_state == MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED) || (self->priv->last_ready_state == MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED && - ready_state != MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED)) { + ready_state != MBIM_SUBSCRIBER_READY_STATE_SIM_NOT_INSERTED)) { /* SIM has been removed or reinserted, re-probe to ensure correct interfaces are exposed */ mm_obj_dbg (self, "SIM hot swap detected"); mm_broadband_modem_sim_hot_swap_detected (MM_BROADBAND_MODEM (self)); @@ -6830,6 +6813,8 @@ mm_port_mbim_close (mbim, NULL, NULL); } + g_clear_object (&self->priv->unlock_retries); + G_OBJECT_CLASS (mm_broadband_modem_mbim_parent_class)->dispose (object); } diff -Nru modemmanager-1.18.4/src/mm-broadband-modem-mbim.h modemmanager-1.18.6/src/mm-broadband-modem-mbim.h --- modemmanager-1.18.4/src/mm-broadband-modem-mbim.h 2021-10-28 12:15:48.000000000 +0000 +++ modemmanager-1.18.6/src/mm-broadband-modem-mbim.h 2022-02-01 09:43:11.000000000 +0000 @@ -62,4 +62,8 @@ MMPortMbim *mm_broadband_modem_mbim_get_port_mbim_for_data (MMBroadbandModemMbim *self, MMPort *data, GError **error); + +void mm_broadband_modem_mbim_set_unlock_retries (MMBroadbandModemMbim *self, + MMModemLock lock_type, + guint32 remaining_attempts); #endif /* MM_BROADBAND_MODEM_MBIM_H */ diff -Nru modemmanager-1.18.4/src/mm-broadband-modem-qmi.c modemmanager-1.18.6/src/mm-broadband-modem-qmi.c --- modemmanager-1.18.4/src/mm-broadband-modem-qmi.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/src/mm-broadband-modem-qmi.c 2022-02-11 10:12:22.000000000 +0000 @@ -2244,6 +2244,7 @@ LoadEnabledFacilityLocksContext *ctx; GTask *task; QmiClient *client = NULL; + MMPort *port; if (!MM_BROADBAND_MODEM_QMI (self)->priv->dms_uim_deprecated) { if (!mm_shared_qmi_ensure_client (MM_SHARED_QMI (self), @@ -2272,8 +2273,20 @@ task = g_task_new (self, NULL, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)load_enabled_facility_locks_context_free); - /* DMS uses get_ck_status and get_pin_status to probe facilities - * UIM uses get_card_status and get_configuration + /* If tagged by udev, perform a reduced facility lock query via DMS + * by skipping get_ck_status and process get_pin_status only + */ + port = MM_PORT (mm_broadband_modem_qmi_peek_port_qmi (MM_BROADBAND_MODEM_QMI (self))); + if (mm_kernel_device_get_global_property_as_boolean (mm_port_peek_kernel_device (port), + "ID_MM_QMI_FACILITY_LOCK_QUERY_REDUCED")) { + mm_obj_dbg (self, "performing reduced facility lock query (DMS)"); + get_sim_lock_status_via_pin_status (task); + return; + } + + /* Regular facility lock query + * DMS uses get_ck_status and get_pin_status to probe facilities + * UIM uses get_configuration and get_card_status */ if (!MM_BROADBAND_MODEM_QMI (self)->priv->dms_uim_deprecated) get_next_facility_lock_status_via_dms (task); diff -Nru modemmanager-1.18.4/src/mm-filter.c modemmanager-1.18.6/src/mm-filter.c --- modemmanager-1.18.4/src/mm-filter.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/src/mm-filter.c 2022-02-11 10:12:22.000000000 +0000 @@ -246,7 +246,8 @@ /* If the TTY kernel driver is one expected modem kernel driver, allow it */ driver = mm_kernel_device_get_driver (port); if ((self->priv->enabled_rules & MM_FILTER_RULE_TTY_DRIVER) && - (!g_strcmp0 (driver, "option1") || + (!g_strcmp0 (driver, "option") || + !g_strcmp0 (driver, "option1") || !g_strcmp0 (driver, "qcserial") || !g_strcmp0 (driver, "qcaux") || !g_strcmp0 (driver, "nozomi") || diff -Nru modemmanager-1.18.4/src/mm-iface-modem-3gpp.c modemmanager-1.18.6/src/mm-iface-modem-3gpp.c --- modemmanager-1.18.4/src/mm-iface-modem-3gpp.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/src/mm-iface-modem-3gpp.c 2022-02-11 10:12:22.000000000 +0000 @@ -710,7 +710,7 @@ g_variant_builder_close (&builder); } - return g_variant_ref (g_variant_builder_end (&builder)); + return g_variant_ref_sink (g_variant_builder_end (&builder)); } static void diff -Nru modemmanager-1.18.4/src/mm-iface-modem.c modemmanager-1.18.6/src/mm-iface-modem.c --- modemmanager-1.18.4/src/mm-iface-modem.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/src/mm-iface-modem.c 2022-02-11 10:12:22.000000000 +0000 @@ -1762,10 +1762,10 @@ } static void -__iface_modem_update_state_internal (MMIfaceModem *self, - MMModemState new_state, - MMModemStateChangeReason reason, - MMModemStateFailedReason failed_reason) +update_state_internal (MMIfaceModem *self, + MMModemState new_state, + MMModemStateChangeReason reason, + MMModemStateFailedReason failed_reason) { MMModemState old_state = MM_MODEM_STATE_UNKNOWN; MmGdbusModem *skeleton = NULL; @@ -1851,23 +1851,23 @@ } void -mm_iface_modem_update_state (MMIfaceModem *self, - MMModemState new_state, - MMModemStateChangeReason reason) +mm_iface_modem_update_state (MMIfaceModem *self, + MMModemState new_state, + MMModemStateChangeReason reason) { if (new_state == MM_MODEM_STATE_FAILED) { mm_iface_modem_update_failed_state (self, MM_MODEM_STATE_FAILED_REASON_UNKNOWN); return; } - __iface_modem_update_state_internal (self, new_state, reason, MM_MODEM_STATE_FAILED_REASON_NONE); + update_state_internal (self, new_state, reason, MM_MODEM_STATE_FAILED_REASON_NONE); } void -mm_iface_modem_update_failed_state (MMIfaceModem *self, - MMModemStateFailedReason failed_reason) +mm_iface_modem_update_failed_state (MMIfaceModem *self, + MMModemStateFailedReason failed_reason) { - __iface_modem_update_state_internal (self, MM_MODEM_STATE_FAILED, MM_MODEM_STATE_CHANGE_REASON_FAILURE, failed_reason); + update_state_internal (self, MM_MODEM_STATE_FAILED, MM_MODEM_STATE_CHANGE_REASON_FAILURE, failed_reason); } /*****************************************************************************/ @@ -3476,9 +3476,9 @@ return unlock_retries; } -void -mm_iface_modem_update_unlock_retries (MMIfaceModem *self, - MMUnlockRetries *unlock_retries) +static void +update_unlock_retries (MMIfaceModem *self, + MMUnlockRetries *unlock_retries) { MmGdbusModem *skeleton = NULL; GVariant *previous_dictionary; @@ -3564,7 +3564,7 @@ g_error_free (error); } else { /* Update the dictionary in the DBus interface */ - mm_iface_modem_update_unlock_retries (self, unlock_retries); + update_unlock_retries (self, unlock_retries); g_object_unref (unlock_retries); } diff -Nru modemmanager-1.18.4/src/mm-iface-modem-firmware.c modemmanager-1.18.6/src/mm-iface-modem-firmware.c --- modemmanager-1.18.4/src/mm-iface-modem-firmware.c 2021-11-22 14:04:31.000000000 +0000 +++ modemmanager-1.18.6/src/mm-iface-modem-firmware.c 2022-02-11 10:12:26.000000000 +0000 @@ -325,10 +325,9 @@ return TRUE; } -static gboolean -add_generic_device_ids (MMBaseModem *self, - MMFirmwareUpdateSettings *update_settings, - GError **error) +GPtrArray * +mm_iface_firmware_build_generic_device_ids (MMIfaceModemFirmware *self, + GError **error) { static const gchar *supported_subsystems[] = { "USB", "PCI" }; guint16 vid; @@ -341,8 +340,8 @@ guint i; gboolean ignore_carrier = FALSE; - vid = mm_base_modem_get_vendor_id (self); - pid = mm_base_modem_get_product_id (self); + vid = mm_base_modem_get_vendor_id (MM_BASE_MODEM (self)); + pid = mm_base_modem_get_product_id (MM_BASE_MODEM (self)); #if defined WITH_QMI if (MM_IS_BROADBAND_MODEM_QMI (self)) @@ -353,16 +352,15 @@ primary = MM_PORT (mm_broadband_modem_mbim_peek_port_mbim (MM_BROADBAND_MODEM_MBIM (self))); #endif if (!primary) - primary = MM_PORT (mm_base_modem_peek_port_primary (self)); + primary = MM_PORT (mm_base_modem_peek_port_primary (MM_BASE_MODEM (self))); g_assert (primary != NULL); rid = mm_kernel_device_get_physdev_revision (mm_port_peek_kernel_device (primary)); - subsystem = mm_kernel_device_get_physdev_subsystem (mm_port_peek_kernel_device (primary)); if (!subsystem) { g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Unknown device subsystem"); - return FALSE; + return NULL; } for (i = 0; i < G_N_ELEMENTS (supported_subsystems); i++) { @@ -372,7 +370,7 @@ if (i == G_N_ELEMENTS (supported_subsystems)) { g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_FAILED, "Unsupported subsystem: %s", subsystem); - return FALSE; + return NULL; } g_object_get (self, @@ -398,8 +396,7 @@ supported_subsystems[i], vid)); g_ptr_array_add (ids, NULL); - mm_firmware_update_settings_set_device_ids (update_settings, (const gchar **)ids->pdata); - return TRUE; + return g_steal_pointer (&ids); } static void @@ -411,6 +408,7 @@ MMFirmwareUpdateSettings *update_settings; GError *error = NULL; GVariant *variant = NULL; + g_autoptr(GPtrArray) ids = NULL; ctx = g_task_get_task_data (task); @@ -422,12 +420,17 @@ } /* If the plugin didn't specify custom device ids, add the default ones ourselves */ - if (!mm_firmware_update_settings_get_device_ids (update_settings) && - !add_generic_device_ids (MM_BASE_MODEM (self), update_settings, &error)) { - mm_obj_warn (self, "couldn't build device ids: %s", error->message); - g_error_free (error); - g_clear_object (&update_settings); - goto out; + if (!mm_firmware_update_settings_get_device_ids (update_settings)) { + mm_obj_dbg (self, "No device ids set by plugin, adding generic ids"); + ids = mm_iface_firmware_build_generic_device_ids (self, &error); + if (error) { + mm_obj_warn (self, "couldn't build device ids: %s", error->message); + g_error_free (error); + g_clear_object (&update_settings); + goto out; + } + + mm_firmware_update_settings_set_device_ids (update_settings, (const gchar **)ids->pdata); } /* If the plugin didn't specify custom version, add the default one ourselves */ diff -Nru modemmanager-1.18.4/src/mm-iface-modem-firmware.h modemmanager-1.18.6/src/mm-iface-modem-firmware.h --- modemmanager-1.18.4/src/mm-iface-modem-firmware.h 2021-09-17 13:11:50.000000000 +0000 +++ modemmanager-1.18.6/src/mm-iface-modem-firmware.h 2022-02-11 10:12:26.000000000 +0000 @@ -72,6 +72,10 @@ GType mm_iface_modem_firmware_get_type (void); G_DEFINE_AUTOPTR_CLEANUP_FUNC (MMIfaceModemFirmware, g_object_unref) +/* Get generic device ids */ +GPtrArray *mm_iface_firmware_build_generic_device_ids (MMIfaceModemFirmware *self, + GError **error); + /* Initialize Firmware interface (async) */ void mm_iface_modem_firmware_initialize (MMIfaceModemFirmware *self, GCancellable *cancellable, diff -Nru modemmanager-1.18.4/src/mm-iface-modem.h modemmanager-1.18.6/src/mm-iface-modem.h --- modemmanager-1.18.4/src/mm-iface-modem.h 2021-11-22 14:04:31.000000000 +0000 +++ modemmanager-1.18.6/src/mm-iface-modem.h 2022-02-11 10:12:22.000000000 +0000 @@ -510,9 +510,6 @@ MMModemLock mm_iface_modem_get_unlock_required (MMIfaceModem *self); MMUnlockRetries *mm_iface_modem_get_unlock_retries (MMIfaceModem *self); -void mm_iface_modem_update_unlock_retries (MMIfaceModem *self, - MMUnlockRetries *unlock_retries); - /* Request signal quality check update. * It will not only return the signal quality status, but also set the property * values in the DBus interface. */ diff -Nru modemmanager-1.18.4/src/mm-modem-helpers.c modemmanager-1.18.6/src/mm-modem-helpers.c --- modemmanager-1.18.4/src/mm-modem-helpers.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/src/mm-modem-helpers.c 2022-02-11 10:12:22.000000000 +0000 @@ -13,6 +13,7 @@ * Copyright (C) 2008 - 2009 Novell, Inc. * Copyright (C) 2009 - 2012 Red Hat, Inc. * Copyright (C) 2012 Google, Inc. + * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -424,7 +425,6 @@ MMModemModeCombination all_item; guint i; GArray *filtered_combinations; - gboolean all_item_added = FALSE; g_return_val_if_fail (all != NULL, NULL); g_return_val_if_fail (all->len == 1, NULL); @@ -447,8 +447,6 @@ * containing all supported modes, we're already good to go. This allows us to have a * default with preferred != NONE (e.g. Wavecom 2G modem with allowed=CS+2G and * preferred=2G */ - if (all_item.allowed == mode->allowed) - all_item_added = TRUE; g_array_append_val (filtered_combinations, *mode); } } @@ -456,12 +454,6 @@ if (filtered_combinations->len == 0) mm_obj_warn (log_object, "all supported mode combinations were filtered out"); - /* Add default entry with the generic mask including all items */ - if (!all_item_added) { - mm_obj_dbg (log_object, "adding an explicit item with all supported modes allowed"); - g_array_append_val (filtered_combinations, all_item); - } - mm_obj_dbg (log_object, "device supports %u different mode combinations", filtered_combinations->len); diff -Nru modemmanager-1.18.4/src/mm-modem-helpers-qmi.c modemmanager-1.18.6/src/mm-modem-helpers-qmi.c --- modemmanager-1.18.4/src/mm-modem-helpers-qmi.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/src/mm-modem-helpers-qmi.c 2022-02-11 10:12:22.000000000 +0000 @@ -1730,8 +1730,8 @@ * as there would be no capability switching support. */ MMModemCapability -mm_modem_capability_from_qmi_capabilities_context (MMQmiCapabilitiesContext *ctx, - gpointer log_object) +mm_current_capability_from_qmi_current_capabilities_context (MMQmiCurrentCapabilitiesContext *ctx, + gpointer log_object) { MMModemCapability tmp = MM_MODEM_CAPABILITY_NONE; g_autofree gchar *nas_ssp_mode_preference_str = NULL; @@ -1740,8 +1740,7 @@ g_autofree gchar *tmp_str = NULL; /* If not a multimode device, we're done */ -#define MULTIMODE (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO) - if ((ctx->dms_capabilities & MULTIMODE) != MULTIMODE) + if (!ctx->multimode) tmp = ctx->dms_capabilities; else { /* We have a multimode CDMA/EVDO+GSM/UMTS device, check SSP and TP */ @@ -1754,15 +1753,15 @@ else if (ctx->nas_tp_mask != QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO) tmp = mm_modem_capability_from_qmi_radio_technology_preference (ctx->nas_tp_mask); - /* Final capabilities are the intersection between the Technology - * Preference or SSP and the device's capabilities. + /* Final capabilities are the union of the active multimode capability + * (GSM/UMTS or CDMA/EVDO or both or none) in TP or SSP and other supported device's capabilities. * If the Technology Preference was "auto" or unknown we just fall back * to the Get Capabilities response. */ if (tmp == MM_MODEM_CAPABILITY_NONE) tmp = ctx->dms_capabilities; else - tmp &= ctx->dms_capabilities; + tmp = (tmp & MM_MODEM_CAPABILITY_MULTIMODE) | (MM_MODEM_CAPABILITY_MULTIMODE ^ ctx->dms_capabilities); } /* Log about the logic applied */ @@ -1784,6 +1783,147 @@ } /*****************************************************************************/ +/* Utility to build list of supported capabilities */ + +GArray * +mm_supported_capabilities_from_qmi_supported_capabilities_context (MMQmiSupportedCapabilitiesContext *ctx, + gpointer log_object) +{ + GArray *supported_combinations; + + supported_combinations = g_array_sized_new (FALSE, FALSE, sizeof (MMModemCapability), 4); + + /* Add all possible supported capability combinations. + * In order to avoid unnecessary modem reboots, we will only implement capabilities + * switching only when switching GSM/UMTS+CDMA/EVDO multimode devices, and only if + * we have support for the commands doing it. + */ + if ((ctx->nas_tp_supported || ctx->nas_ssp_supported) && ctx->multimode) { + MMModemCapability single; + + /* Multimode GSM/UMTS+CDMA/EVDO+(LTE/5GNR) device switched to GSM/UMTS+(LTE/5GNR) device */ + single = MM_MODEM_CAPABILITY_GSM_UMTS | (MM_MODEM_CAPABILITY_MULTIMODE ^ ctx->dms_capabilities); + g_array_append_val (supported_combinations, single); + /* Multimode GSM/UMTS+CDMA/EVDO+(LTE/5GNR) device switched to CDMA/EVDO+(LTE/5GNR) device */ + single = MM_MODEM_CAPABILITY_CDMA_EVDO | (MM_MODEM_CAPABILITY_MULTIMODE ^ ctx->dms_capabilities); + g_array_append_val (supported_combinations, single); + /* + * Multimode GSM/UMTS+CDMA/EVDO+(LTE/5GNR) device switched to (LTE/5GNR) device + * + * This case is required because we use the same methods and operations to + * switch capabilities and modes. + */ + if ((single = (MM_MODEM_CAPABILITY_MULTIMODE ^ ctx->dms_capabilities))) + g_array_append_val (supported_combinations, single); + } + + /* Add the full mask itself */ + g_array_append_val (supported_combinations, ctx->dms_capabilities); + + return supported_combinations; +} + +/*****************************************************************************/ +/* Utility to build list of supported modes */ + +GArray * +mm_supported_modes_from_qmi_supported_modes_context (MMQmiSupportedModesContext *ctx, + gpointer log_object) +{ + g_autoptr(GArray) combinations = NULL; + g_autoptr(GArray) all = NULL; + MMModemModeCombination mode; + + /* Start with a mode including ALL */ + mode.allowed = ctx->all; + mode.preferred = MM_MODEM_MODE_NONE; + all = g_array_sized_new (FALSE, FALSE, sizeof (MMModemModeCombination), 1); + g_array_append_val (all, mode); + + /* If SSP and TP are not supported, ignore supported mode management */ + if (!ctx->nas_ssp_supported && !ctx->nas_tp_supported) + return g_steal_pointer (&all); + + combinations = g_array_new (FALSE, FALSE, sizeof (MMModemModeCombination)); + +#define ADD_MODE_PREFERENCE(MODE1, MODE2, MODE3, MODE4) do { \ + mode.allowed = MODE1; \ + if (MODE2 != MM_MODEM_MODE_NONE) { \ + mode.allowed |= MODE2; \ + if (MODE3 != MM_MODEM_MODE_NONE) { \ + mode.allowed |= MODE3; \ + if (MODE4 != MM_MODEM_MODE_NONE) \ + mode.allowed |= MODE4; \ + } \ + if (ctx->nas_ssp_supported) { \ + if (MODE3 != MM_MODEM_MODE_NONE) { \ + if (MODE4 != MM_MODEM_MODE_NONE) { \ + mode.preferred = MODE4; \ + g_array_append_val (combinations, mode); \ + } \ + mode.preferred = MODE3; \ + g_array_append_val (combinations, mode); \ + } \ + mode.preferred = MODE2; \ + g_array_append_val (combinations, mode); \ + mode.preferred = MODE1; \ + g_array_append_val (combinations, mode); \ + } else { \ + mode.preferred = MM_MODEM_MODE_NONE; \ + g_array_append_val (combinations, mode); \ + } \ + } else { \ + mode.allowed = MODE1; \ + mode.preferred = MM_MODEM_MODE_NONE; \ + g_array_append_val (combinations, mode); \ + } \ + } while (0) + + /* 2G-only, 3G-only */ + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + + /* + * This case is required because we use the same methods and operations to + * switch capabilities and modes. For the LTE capability there is a direct + * related 4G mode, and so we cannot select a '4G only' mode in this device + * because we wouldn't be able to know the full list of current capabilities + * if the device was rebooted, as we would only see LTE capability. So, + * handle this special case so that the LTE/4G-only mode can exclusively be + * selected as capability switching in this kind of devices. + */ + if (!ctx->multimode || !(ctx->current_capabilities & MM_MODEM_CAPABILITY_MULTIMODE)) { + /* 4G-only */ + ADD_MODE_PREFERENCE (MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + } + + /* 2G, 3G, 4G combinations */ + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_3G, MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE); + + /* 5G related mode combinations are only supported when NAS SSP is supported, + * as there is no 5G support in NAS TP. */ + if (ctx->nas_ssp_supported) { + /* Same reasoning as for the special 4G-only case above */ + if (!ctx->multimode || !(ctx->current_capabilities & MM_MODEM_CAPABILITY_MULTIMODE)) { + ADD_MODE_PREFERENCE (MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_4G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + } + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_3G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_4G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_4G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE); + ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_3G, MM_MODEM_MODE_4G, MM_MODEM_MODE_5G); + } + + /* Filter out unsupported modes */ + return mm_filter_supported_modes (all, combinations, log_object); +} + +/*****************************************************************************/ MMOmaSessionType mm_oma_session_type_from_qmi_oma_session_type (QmiOmaSessionType qmi_session_type) diff -Nru modemmanager-1.18.4/src/mm-modem-helpers-qmi.h modemmanager-1.18.6/src/mm-modem-helpers-qmi.h --- modemmanager-1.18.4/src/mm-modem-helpers-qmi.h 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/src/mm-modem-helpers-qmi.h 2022-02-11 10:12:22.000000000 +0000 @@ -23,6 +23,8 @@ #include "mm-port.h" +#define MM_MODEM_CAPABILITY_MULTIMODE (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO) + /*****************************************************************************/ /* QMI/DMS to MM translations */ @@ -154,16 +156,54 @@ /* Utility to gather current capabilities from various sources */ typedef struct { + /* Whether this is a multimode device or not */ + gboolean multimode; /* NAS System Selection Preference */ QmiNasRatModePreference nas_ssp_mode_preference_mask; /* NAS Technology Preference */ QmiNasRadioTechnologyPreference nas_tp_mask; /* DMS Capabilities */ MMModemCapability dms_capabilities; -} MMQmiCapabilitiesContext; +} MMQmiCurrentCapabilitiesContext; + +MMModemCapability mm_current_capability_from_qmi_current_capabilities_context (MMQmiCurrentCapabilitiesContext *ctx, + gpointer log_object); + +/*****************************************************************************/ +/* Utility to build list of supported capabilities from various sources */ + +typedef struct { + /* Whether this is a multimode device or not */ + gboolean multimode; + /* NAS System Selection Preference */ + gboolean nas_ssp_supported; + /* NAS Technology Preference */ + gboolean nas_tp_supported; + /* DMS Capabilities */ + MMModemCapability dms_capabilities; +} MMQmiSupportedCapabilitiesContext; + +GArray *mm_supported_capabilities_from_qmi_supported_capabilities_context (MMQmiSupportedCapabilitiesContext *ctx, + gpointer log_object); + +/*****************************************************************************/ +/* Utility to build list of supported modes from various sources */ + +typedef struct { + /* Whether this is a multimode device or not */ + gboolean multimode; + /* NAS System Selection Preference */ + gboolean nas_ssp_supported; + /* NAS Technology Preference */ + gboolean nas_tp_supported; + /* Mask with all supported modes */ + MMModemMode all; + /* Current Capabilities */ + MMModemCapability current_capabilities; +} MMQmiSupportedModesContext; -MMModemCapability mm_modem_capability_from_qmi_capabilities_context (MMQmiCapabilitiesContext *ctx, - gpointer log_object); +GArray *mm_supported_modes_from_qmi_supported_modes_context (MMQmiSupportedModesContext *ctx, + gpointer log_object); /*****************************************************************************/ /* QMI unique id manipulation */ diff -Nru modemmanager-1.18.4/src/mm-plugin-manager.c modemmanager-1.18.6/src/mm-plugin-manager.c --- modemmanager-1.18.4/src/mm-plugin-manager.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/src/mm-plugin-manager.c 2022-02-11 10:12:22.000000000 +0000 @@ -22,6 +22,8 @@ #include #include +#include + #include #include @@ -713,8 +715,14 @@ #define MIN_PROBING_TIME_MSECS 2500 /* Additional time to wait for other ports to appear after the last port is - * exposed in the system. */ -#define EXTRA_PROBING_TIME_MSECS 1500 + * exposed in the system. Longer time when not using udev, as we rely on + * mmcli --report-kernel-event events to report new port additions, e.g. + * via openwrt hotplug scripts. */ +#if defined WITH_UDEV +# define EXTRA_PROBING_TIME_MSECS 1500 +#else +# define EXTRA_PROBING_TIME_MSECS 3000 +#endif /* The wait time we define must always be less than the probing time */ G_STATIC_ASSERT (MIN_WAIT_TIME_MSECS < MIN_PROBING_TIME_MSECS); diff -Nru modemmanager-1.18.4/src/mm-shared-qmi.c modemmanager-1.18.6/src/mm-shared-qmi.c --- modemmanager-1.18.4/src/mm-shared-qmi.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/src/mm-shared-qmi.c 2022-02-11 10:12:22.000000000 +0000 @@ -69,6 +69,7 @@ typedef struct { /* Capabilities & modes helpers */ + gboolean multimode; MMModemCapability current_capabilities; GArray *supported_radio_interfaces; Feature feature_nas_tp; @@ -76,7 +77,6 @@ Feature feature_nas_ssp_extended_lte_band_preference; Feature feature_nas_ssp_acquisition_order_preference; GArray *feature_nas_ssp_acquisition_order_preference_array; - gboolean disable_4g_only_mode; GArray *supported_bands; /* Location helpers */ @@ -798,10 +798,10 @@ } LoadCurrentCapabilitiesStep; typedef struct { - QmiClientNas *nas_client; - QmiClientDms *dms_client; - LoadCurrentCapabilitiesStep step; - MMQmiCapabilitiesContext capabilities_context; + QmiClientNas *nas_client; + QmiClientDms *dms_client; + LoadCurrentCapabilitiesStep step; + MMQmiCurrentCapabilitiesContext capabilities_context; } LoadCurrentCapabilitiesContext; MMModemCapability @@ -1023,7 +1023,13 @@ case LOAD_CURRENT_CAPABILITIES_STEP_LAST: g_assert (priv->feature_nas_tp != FEATURE_UNKNOWN); g_assert (priv->feature_nas_ssp != FEATURE_UNKNOWN); - priv->current_capabilities = mm_modem_capability_from_qmi_capabilities_context (&ctx->capabilities_context, self); + + /* At this point we can already know if this is a multimode device or not */ + if ((ctx->capabilities_context.dms_capabilities & MM_MODEM_CAPABILITY_MULTIMODE) == MM_MODEM_CAPABILITY_MULTIMODE) + priv->multimode = ctx->capabilities_context.multimode = TRUE; + + priv->current_capabilities = mm_current_capability_from_qmi_current_capabilities_context (&ctx->capabilities_context, self); + g_task_return_int (task, priv->current_capabilities); g_object_unref (task); return; @@ -1102,12 +1108,11 @@ GAsyncReadyCallback callback, gpointer user_data) { - GTask *task; - Private *priv; - MMModemCapability mask; - MMModemCapability single; - GArray *supported_combinations; - guint i; + GTask *task; + Private *priv; + GArray *supported_combinations; + guint i; + MMQmiSupportedCapabilitiesContext ctx = { 0 }; task = g_task_new (self, NULL, callback, user_data); @@ -1121,53 +1126,16 @@ } /* Build mask with all supported capabilities */ - mask = MM_MODEM_CAPABILITY_NONE; + ctx.dms_capabilities = MM_MODEM_CAPABILITY_NONE; for (i = 0; i < priv->supported_radio_interfaces->len; i++) - mask |= mm_modem_capability_from_qmi_radio_interface (g_array_index (priv->supported_radio_interfaces, QmiDmsRadioInterface, i), self); - - supported_combinations = g_array_sized_new (FALSE, FALSE, sizeof (MMModemCapability), 3); - - /* Add all possible supported capability combinations. - * In order to avoid unnecessary modem reboots, we will only implement capabilities - * switching only when switching GSM/UMTS+CDMA/EVDO multimode devices, and only if - * we have support for the commands doing it. - */ - if (priv->feature_nas_tp == FEATURE_SUPPORTED || priv->feature_nas_ssp == FEATURE_SUPPORTED) { - if (mask == (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO)) { - /* Multimode GSM/UMTS+CDMA/EVDO device switched to GSM/UMTS only */ - single = MM_MODEM_CAPABILITY_GSM_UMTS; - g_array_append_val (supported_combinations, single); - /* Multimode GSM/UMTS+CDMA/EVDO device switched to CDMA/EVDO only */ - single = MM_MODEM_CAPABILITY_CDMA_EVDO; - g_array_append_val (supported_combinations, single); - } else if (mask == (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE)) { - /* Multimode GSM/UMTS+CDMA/EVDO+LTE device switched to GSM/UMTS+LTE only */ - single = MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_LTE; - g_array_append_val (supported_combinations, single); - /* Multimode GSM/UMTS+CDMA/EVDO+LTE device switched to CDMA/EVDO+LTE only */ - single = MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE; - g_array_append_val (supported_combinations, single); - /* - * Multimode GSM/UMTS+CDMA/EVDO+LTE device switched to LTE only. - * - * This case is required because we use the same methods and operations to - * switch capabilities and modes. For the LTE capability there is a direct - * related 4G mode, and so we cannot select a '4G only' mode in this device - * because we wouldn't be able to know the full list of current capabilities - * if the device was rebooted, as we would only see LTE capability. So, - * handle this special case so that the LTE/4G-only mode can exclusively be - * selected as capability switching in this kind of devices. - */ - priv->disable_4g_only_mode = TRUE; - single = MM_MODEM_CAPABILITY_LTE; - g_array_append_val (supported_combinations, single); - } - } + ctx.dms_capabilities |= mm_modem_capability_from_qmi_radio_interface (g_array_index (priv->supported_radio_interfaces, QmiDmsRadioInterface, i), self); - /* Add the full mask itself */ - single = mask; - g_array_append_val (supported_combinations, single); + ctx.nas_tp_supported = (priv->feature_nas_tp == FEATURE_SUPPORTED); + ctx.nas_ssp_supported = (priv->feature_nas_ssp == FEATURE_SUPPORTED); + ctx.multimode = priv->multimode; + /* Build list of supported combinations */ + supported_combinations = mm_supported_capabilities_from_qmi_supported_capabilities_context (&ctx, self); g_task_return_pointer (task, supported_combinations, (GDestroyNotify) g_array_unref); g_object_unref (task); } @@ -1715,106 +1683,38 @@ GAsyncReadyCallback callback, gpointer user_data) { - GTask *task; - GArray *combinations; - MMModemModeCombination mode; - Private *priv; - MMModemMode mask_all; - guint i; - GArray *all; - GArray *filtered; + GTask *task; + Private *priv; + MMQmiSupportedModesContext ctx = { 0 }; + guint i; + GArray *combinations; task = g_task_new (self, NULL, callback, user_data); priv = get_private (MM_SHARED_QMI (self)); g_assert (priv->supported_radio_interfaces); + g_assert (priv->current_capabilities); /* Build all, based on the supported radio interfaces */ - mask_all = MM_MODEM_MODE_NONE; + ctx.all = MM_MODEM_MODE_NONE; for (i = 0; i < priv->supported_radio_interfaces->len; i++) - mask_all |= mm_modem_mode_from_qmi_radio_interface (g_array_index (priv->supported_radio_interfaces, QmiDmsRadioInterface, i), self); - mode.allowed = mask_all; - mode.preferred = MM_MODEM_MODE_NONE; - all = g_array_sized_new (FALSE, FALSE, sizeof (MMModemModeCombination), 1); - g_array_append_val (all, mode); - - /* If SSP and TP are not supported, ignore supported mode management */ - if (priv->feature_nas_ssp == FEATURE_UNSUPPORTED && priv->feature_nas_tp == FEATURE_UNSUPPORTED) { - g_task_return_pointer (task, all, (GDestroyNotify) g_array_unref); - g_object_unref (task); - return; - } - - combinations = g_array_new (FALSE, FALSE, sizeof (MMModemModeCombination)); + ctx.all |= mm_modem_mode_from_qmi_radio_interface (g_array_index (priv->supported_radio_interfaces, QmiDmsRadioInterface, i), self); -#define ADD_MODE_PREFERENCE(MODE1, MODE2, MODE3, MODE4) do { \ - mode.allowed = MODE1; \ - if (MODE2 != MM_MODEM_MODE_NONE) { \ - mode.allowed |= MODE2; \ - if (MODE3 != MM_MODEM_MODE_NONE) { \ - mode.allowed |= MODE3; \ - if (MODE4 != MM_MODEM_MODE_NONE) \ - mode.allowed |= MODE4; \ - } \ - if (priv->feature_nas_ssp != FEATURE_UNSUPPORTED) { \ - if (MODE3 != MM_MODEM_MODE_NONE) { \ - if (MODE4 != MM_MODEM_MODE_NONE) { \ - mode.preferred = MODE4; \ - g_array_append_val (combinations, mode); \ - } \ - mode.preferred = MODE3; \ - g_array_append_val (combinations, mode); \ - } \ - mode.preferred = MODE2; \ - g_array_append_val (combinations, mode); \ - mode.preferred = MODE1; \ - g_array_append_val (combinations, mode); \ - } else { \ - mode.preferred = MM_MODEM_MODE_NONE; \ - g_array_append_val (combinations, mode); \ - } \ - } else { \ - mode.allowed = MODE1; \ - mode.preferred = MM_MODEM_MODE_NONE; \ - g_array_append_val (combinations, mode); \ - } \ - } while (0) - - /* 2G-only, 3G-only */ - ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); - ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); - - /* 4G-only mode is not possible in multimode GSM/UMTS+CDMA/EVDO+LTE - * devices. This configuration may be selected as "LTE only" capability - * instead. */ - if (!priv->disable_4g_only_mode) - ADD_MODE_PREFERENCE (MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); - - /* 2G, 3G, 4G combinations */ - ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_3G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); - ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); - ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); - ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_3G, MM_MODEM_MODE_4G, MM_MODEM_MODE_NONE); - - /* 5G related mode combinations are only supported when NAS SSP is supported, - * as there is no 5G support in NAS TP. */ - if (priv->feature_nas_ssp != FEATURE_UNSUPPORTED) { - ADD_MODE_PREFERENCE (MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); - ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); - ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); - ADD_MODE_PREFERENCE (MM_MODEM_MODE_4G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE, MM_MODEM_MODE_NONE); - ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_3G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE); - ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_4G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE); - ADD_MODE_PREFERENCE (MM_MODEM_MODE_3G, MM_MODEM_MODE_4G, MM_MODEM_MODE_5G, MM_MODEM_MODE_NONE); - ADD_MODE_PREFERENCE (MM_MODEM_MODE_2G, MM_MODEM_MODE_3G, MM_MODEM_MODE_4G, MM_MODEM_MODE_5G); - } - - /* Filter out unsupported modes */ - filtered = mm_filter_supported_modes (all, combinations, self); - g_array_unref (all); - g_array_unref (combinations); + /* Filter out those unsupported by the current capabilities */ + if (!(priv->current_capabilities & (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO))) + ctx.all &= ~(MM_MODEM_MODE_2G | MM_MODEM_MODE_3G); + else if (!(priv->current_capabilities & MM_MODEM_CAPABILITY_LTE)) + ctx.all &= ~MM_MODEM_MODE_4G; + else if (!(priv->current_capabilities & MM_MODEM_CAPABILITY_5GNR)) + ctx.all &= ~MM_MODEM_MODE_5G; + + ctx.nas_ssp_supported = (priv->feature_nas_ssp == FEATURE_SUPPORTED); + ctx.nas_tp_supported = (priv->feature_nas_tp == FEATURE_SUPPORTED); + ctx.current_capabilities = priv->current_capabilities; + ctx.multimode = priv->multimode; - g_task_return_pointer (task, filtered, (GDestroyNotify) g_array_unref); + combinations = mm_supported_modes_from_qmi_supported_modes_context (&ctx, self); + g_task_return_pointer (task, combinations, (GDestroyNotify) g_array_unref); g_object_unref (task); } diff -Nru modemmanager-1.18.4/src/mm-sim-mbim.c modemmanager-1.18.6/src/mm-sim-mbim.c --- modemmanager-1.18.4/src/mm-sim-mbim.c 2021-11-26 08:38:54.000000000 +0000 +++ modemmanager-1.18.6/src/mm-sim-mbim.c 2022-02-11 10:12:22.000000000 +0000 @@ -67,6 +67,24 @@ return TRUE; } +static void +update_modem_unlock_retries (MMSimMbim *self, + MbimPinType pin_type, + guint32 remaining_attempts) +{ + MMBaseModem *modem = NULL; + + g_object_get (G_OBJECT (self), + MM_BASE_SIM_MODEM, &modem, + NULL); + g_assert (MM_IS_BASE_MODEM (modem)); + + mm_broadband_modem_mbim_set_unlock_retries (MM_BROADBAND_MODEM_MBIM (modem), + mm_modem_lock_from_mbim_pin_type (pin_type), + remaining_attempts); + g_object_unref (modem); +} + /*****************************************************************************/ /* Load SIM identifier */ @@ -359,6 +377,8 @@ &pin_state, &remaining_attempts, NULL)) { + update_modem_unlock_retries (self, pin_type, remaining_attempts); + if (!success) { /* Sending PIN failed, build a better error to report */ if (pin_type == MBIM_PIN_TYPE_PIN1 && pin_state == MBIM_PIN_STATE_LOCKED) { @@ -454,6 +474,8 @@ &pin_state, &remaining_attempts, NULL)) { + update_modem_unlock_retries (self, pin_type, remaining_attempts); + if (!success) { /* Sending PUK failed, build a better error to report */ if (pin_type == MBIM_PIN_TYPE_PUK1 && pin_state == MBIM_PIN_STATE_LOCKED) { @@ -531,12 +553,25 @@ GAsyncResult *res, GTask *task) { + MMSimMbim *self; GError *error = NULL; MbimMessage *response; + MbimPinType pin_type; + guint32 remaining_attempts; + + self = g_task_get_source_object (task); response = mbim_device_command_finish (device, res, &error); if (response) { mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error); + + if (mbim_message_pin_response_parse (response, + &pin_type, + NULL, + &remaining_attempts, + NULL)) + update_modem_unlock_retries (self, pin_type, remaining_attempts); + mbim_message_unref (response); } @@ -609,12 +644,25 @@ GAsyncResult *res, GTask *task) { + MMSimMbim *self; GError *error = NULL; MbimMessage *response; + MbimPinType pin_type; + guint32 remaining_attempts; + + self = g_task_get_source_object (task); response = mbim_device_command_finish (device, res, &error); if (response) { mbim_message_response_get_result (response, MBIM_MESSAGE_TYPE_COMMAND_DONE, &error); + + if (mbim_message_pin_response_parse (response, + &pin_type, + NULL, + &remaining_attempts, + NULL)) + update_modem_unlock_retries (self, pin_type, remaining_attempts); + mbim_message_unref (response); } diff -Nru modemmanager-1.18.4/src/tests/Makefile.in modemmanager-1.18.6/src/tests/Makefile.in --- modemmanager-1.18.4/src/tests/Makefile.in 2021-11-26 09:23:54.000000000 +0000 +++ modemmanager-1.18.6/src/tests/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -273,8 +273,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/gtester.make DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -294,6 +292,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -305,6 +305,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -697,7 +698,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/src/tests/test-modem-helpers-qmi.c modemmanager-1.18.6/src/tests/test-modem-helpers-qmi.c --- modemmanager-1.18.4/src/tests/test-modem-helpers-qmi.c 2020-10-14 09:43:20.000000000 +0000 +++ modemmanager-1.18.6/src/tests/test-modem-helpers-qmi.c 2022-02-01 09:45:03.000000000 +0000 @@ -11,6 +11,7 @@ * GNU General Public License for more details: * * Copyright (C) 2012 Lanedo GmbH. + * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -19,28 +20,65 @@ #include #include +#include +#define _LIBMM_INSIDE_MM +#include + #include "mm-enums-types.h" #include "mm-modem-helpers-qmi.h" #include "mm-log-test.h" static void -test_capabilities_expected (MMQmiCapabilitiesContext *ctx, - MMModemCapability expected) +test_current_capabilities_expected (MMQmiCurrentCapabilitiesContext *ctx, + MMModemCapability expected) { - MMModemCapability built; - gchar *expected_str; - gchar *built_str; + MMModemCapability built; + g_autofree gchar *expected_str = NULL; + g_autofree gchar *built_str = NULL; - built = mm_modem_capability_from_qmi_capabilities_context (ctx, NULL); + built = mm_current_capability_from_qmi_current_capabilities_context (ctx, NULL); expected_str = mm_modem_capability_build_string_from_mask (expected); built_str = mm_modem_capability_build_string_from_mask (built); /* compare strings, so that the error shows the string values as well */ g_assert_cmpstr (built_str, ==, expected_str); +} + +static void +test_supported_capabilities_expected (MMQmiSupportedCapabilitiesContext *ctx, + const MMModemCapability *expected_capabilities, + guint n_expected_capabilities) +{ + g_autoptr(GArray) built = NULL; + g_autofree gchar *expected_str = NULL; + g_autofree gchar *built_str = NULL; + + built = mm_supported_capabilities_from_qmi_supported_capabilities_context (ctx, NULL); + + expected_str = mm_common_build_capabilities_string (expected_capabilities, n_expected_capabilities); + built_str = mm_common_build_capabilities_string ((MMModemCapability *)built->data, built->len); + + /* compare strings, so that the error shows the string values as well */ + g_assert_cmpstr (built_str, ==, expected_str); +} + +static void +test_supported_modes_expected (MMQmiSupportedModesContext *ctx, + const MMModemModeCombination *expected_modes, + guint n_expected_modes) +{ + g_autoptr(GArray) built = NULL; + g_autofree gchar *expected_str = NULL; + g_autofree gchar *built_str = NULL; + + built = mm_supported_modes_from_qmi_supported_modes_context (ctx, NULL); + + expected_str = mm_common_build_mode_combinations_string (expected_modes, n_expected_modes); + built_str = mm_common_build_mode_combinations_string ((MMModemModeCombination *)built->data, built->len); - g_free (expected_str); - g_free (built_str); + /* compare strings, so that the error shows the string values as well */ + g_assert_cmpstr (built_str, ==, expected_str); } /*****************************************************************************/ @@ -57,9 +95,11 @@ */ static void -test_uml290 (void) +test_current_capabilities_uml290 (void) { - MMQmiCapabilitiesContext ctx; + MMQmiCurrentCapabilitiesContext ctx; + + ctx.multimode = TRUE; /* QCDM -> CDMA/EVDO */ ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X | @@ -68,7 +108,9 @@ ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE); - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE)); /* QCDM -> GSM/UMTS */ ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_GSM | @@ -77,7 +119,9 @@ ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE); - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE)); /* QCDM -> Automatic */ ctx.nas_ssp_mode_preference_mask = 0; @@ -85,10 +129,147 @@ ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE); - test_capabilities_expected (&ctx, - (MM_MODEM_CAPABILITY_GSM_UMTS | - MM_MODEM_CAPABILITY_CDMA_EVDO | - MM_MODEM_CAPABILITY_LTE)); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE)); +} + +static void +test_supported_capabilities_uml290 (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_LTE, + MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE, + MM_MODEM_CAPABILITY_LTE, + MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE, + }; + + ctx.multimode = TRUE; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = FALSE; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE); + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_uml290_cdma_evdo_gsm_umts_lte (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + /* we MUST not have 4G-only in multimode devices */ + { .allowed = MM_MODEM_MODE_2G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_2G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_2G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_2G }, + }; + + ctx.multimode = TRUE; + ctx.all = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = FALSE; + ctx.current_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE); + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); +} + +static void +test_supported_modes_uml290_cdma_evdo_lte (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + /* we MUST not have 4G-only in multimode devices */ + { .allowed = MM_MODEM_MODE_2G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_2G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_2G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_2G }, + }; + + ctx.multimode = TRUE; + ctx.all = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = FALSE; + ctx.current_capabilities = (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE); + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); +} + +static void +test_supported_modes_uml290_gsm_umts_lte (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + /* we MUST not have 4G-only in multimode devices */ + { .allowed = MM_MODEM_MODE_2G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_2G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_2G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_2G }, + }; + + ctx.multimode = TRUE; + ctx.all = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = FALSE; + ctx.current_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE); + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); +} + +static void +test_supported_modes_uml290_lte (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + /* we MUST only have 4G-only in a multimode device with only LTE capability */ + { .allowed = MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_NONE }, + }; + + ctx.multimode = TRUE; + ctx.all = MM_MODEM_MODE_4G; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = FALSE; + ctx.current_capabilities = MM_MODEM_CAPABILITY_LTE; + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); } /*****************************************************************************/ @@ -102,19 +283,60 @@ */ static void -test_adu960s (void) +test_current_capabilities_adu960s (void) { - MMQmiCapabilitiesContext ctx; + MMQmiCurrentCapabilitiesContext ctx; - ctx.nas_ssp_mode_preference_mask = 0; + ctx.multimode = TRUE; + ctx.nas_ssp_mode_preference_mask = 0; /* Unsupported */ ctx.nas_tp_mask = 0; /* Unsupported */ ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE); - test_capabilities_expected (&ctx, - (MM_MODEM_CAPABILITY_GSM_UMTS | - MM_MODEM_CAPABILITY_CDMA_EVDO | - MM_MODEM_CAPABILITY_LTE)); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE)); +} + +static void +test_supported_capabilities_adu960s (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE, + }; + + ctx.multimode = TRUE; + ctx.nas_ssp_supported = FALSE; + ctx.nas_tp_supported = FALSE; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE); + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_adu960s (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_NONE }, + }; + + ctx.multimode = TRUE; + ctx.all = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G; + ctx.nas_ssp_supported = FALSE; + ctx.nas_tp_supported = FALSE; + ctx.current_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE); + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); } /*****************************************************************************/ @@ -127,14 +349,54 @@ */ static void -test_gobi1k_gsm (void) +test_current_capabilities_gobi1k_gsm (void) { - MMQmiCapabilitiesContext ctx; + MMQmiCurrentCapabilitiesContext ctx; + ctx.multimode = FALSE; ctx.nas_ssp_mode_preference_mask = 0; /* Unsupported */ ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; ctx.dms_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); +} + +static void +test_supported_capabilities_gobi1k_gsm (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_GSM_UMTS, + }; + + ctx.multimode = FALSE; + ctx.nas_ssp_supported = FALSE; + ctx.nas_tp_supported = TRUE; + ctx.dms_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_gobi1k_gsm (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + { .allowed = MM_MODEM_MODE_2G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + }; + + ctx.multimode = FALSE; + ctx.all = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G; + ctx.nas_ssp_supported = FALSE; + ctx.nas_tp_supported = TRUE; + ctx.current_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); } /*****************************************************************************/ @@ -147,14 +409,54 @@ */ static void -test_gobi1k_cdma (void) +test_current_capabilities_gobi1k_cdma (void) { - MMQmiCapabilitiesContext ctx; + MMQmiCurrentCapabilitiesContext ctx; + ctx.multimode = FALSE; ctx.nas_ssp_mode_preference_mask = 0; /* Unsupported */ ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; ctx.dms_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); +} + +static void +test_supported_capabilities_gobi1k_cdma (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_CDMA_EVDO, + }; + + ctx.multimode = FALSE; + ctx.nas_ssp_supported = FALSE; + ctx.nas_tp_supported = TRUE; + ctx.dms_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_gobi1k_cdma (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + { .allowed = MM_MODEM_MODE_2G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + }; + + ctx.multimode = FALSE; + ctx.all = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G; + ctx.nas_ssp_supported = FALSE; + ctx.nas_tp_supported = TRUE; + ctx.current_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); } /*****************************************************************************/ @@ -169,27 +471,68 @@ */ static void -test_gobi2k_gsm (void) +test_current_capabilities_gobi2k_gsm (void) { - MMQmiCapabilitiesContext ctx; + MMQmiCurrentCapabilitiesContext ctx; + + ctx.multimode = FALSE; /* QCDM -> Automatic */ ctx.nas_ssp_mode_preference_mask = 0; /* Unsupported */ ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; ctx.dms_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); /* QCDM -> UMTS only */ ctx.nas_ssp_mode_preference_mask = 0; /* Unsupported */ ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA); ctx.dms_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); /* QCDM -> GPRS only */ ctx.nas_ssp_mode_preference_mask = 0; /* Unsupported */ ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AMPS_OR_GSM); ctx.dms_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); +} + +static void +test_supported_capabilities_gobi2k_gsm (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_GSM_UMTS, + }; + + ctx.multimode = FALSE; + ctx.nas_ssp_supported = FALSE; + ctx.nas_tp_supported = TRUE; + ctx.dms_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_gobi2k_gsm (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + { .allowed = MM_MODEM_MODE_2G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + }; + + ctx.multimode = FALSE; + ctx.all = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G; + ctx.nas_ssp_supported = FALSE; + ctx.nas_tp_supported = TRUE; + ctx.current_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); } /*****************************************************************************/ @@ -204,27 +547,68 @@ */ static void -test_gobi2k_cdma (void) +test_current_capabilities_gobi2k_cdma (void) { - MMQmiCapabilitiesContext ctx; + MMQmiCurrentCapabilitiesContext ctx; + + ctx.multimode = FALSE; /* QCDM -> Automatic */ ctx.nas_ssp_mode_preference_mask = 0; /* Unsupported */ ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; ctx.dms_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); /* QCDM -> CDMA only */ ctx.nas_ssp_mode_preference_mask = 0; /* Unsupported */ ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2 | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA); ctx.dms_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); /* QCDM -> EVDO only */ ctx.nas_ssp_mode_preference_mask = 0; /* Unsupported */ ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2 | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_HDR); ctx.dms_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); +} + +static void +test_supported_capabilities_gobi2k_cdma (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_CDMA_EVDO, + }; + + ctx.multimode = FALSE; + ctx.nas_ssp_supported = FALSE; + ctx.nas_tp_supported = TRUE; + ctx.dms_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_gobi2k_cdma (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + { .allowed = MM_MODEM_MODE_2G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + }; + + ctx.multimode = FALSE; + ctx.all = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G; + ctx.nas_ssp_supported = FALSE; + ctx.nas_tp_supported = TRUE; + ctx.current_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); } /*****************************************************************************/ @@ -241,9 +625,11 @@ */ static void -test_gobi3k_gsm (void) +test_current_capabilities_gobi3k_gsm (void) { - MMQmiCapabilitiesContext ctx; + MMQmiCurrentCapabilitiesContext ctx; + + ctx.multimode = FALSE; /* QCDM -> Automatic */ ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X | @@ -252,19 +638,59 @@ QMI_NAS_RAT_MODE_PREFERENCE_UMTS); ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; ctx.dms_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); /* QCDM -> GSM only */ ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_GSM); ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AMPS_OR_GSM); ctx.dms_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); /* QCDM -> UMTS only */ ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_UMTS); ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA); ctx.dms_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_GSM_UMTS); +} + +static void +test_supported_capabilities_gobi3k_gsm (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_GSM_UMTS, + }; + + ctx.multimode = FALSE; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.dms_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_gobi3k_gsm (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + { .allowed = MM_MODEM_MODE_2G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_2G }, + }; + + ctx.multimode = FALSE; + ctx.all = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.current_capabilities = MM_MODEM_CAPABILITY_GSM_UMTS; + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); } /*****************************************************************************/ @@ -281,9 +707,11 @@ */ static void -test_gobi3k_cdma (void) +test_current_capabilities_gobi3k_cdma (void) { - MMQmiCapabilitiesContext ctx; + MMQmiCurrentCapabilitiesContext ctx; + + ctx.multimode = FALSE; /* QCDM -> Automatic */ ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X | @@ -292,19 +720,615 @@ QMI_NAS_RAT_MODE_PREFERENCE_UMTS); ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; ctx.dms_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); /* QCDM -> CDMA only */ ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X); ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2 | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA); ctx.dms_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); /* QCDM -> EVDO only */ ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO); ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2 | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_HDR); ctx.dms_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; - test_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_CDMA_EVDO); +} + +static void +test_supported_capabilities_gobi3k_cdma (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_CDMA_EVDO, + }; + + ctx.multimode = FALSE; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.dms_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_gobi3k_cdma (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + { .allowed = MM_MODEM_MODE_2G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_2G }, + }; + + ctx.multimode = FALSE; + ctx.all = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.current_capabilities = MM_MODEM_CAPABILITY_CDMA_EVDO; + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); +} + +/*****************************************************************************/ +/* Generic with NR5G: + * ∘ +GCAP: +CGSM + * ∘ +WS46: (12,22,25,28,29,30,31) + * ∘ DMS GetCapa: Networks: 'cdma20001x, evdo, gsm, umts, lte, 5gnr' + * ∘ QMI -> Automatic = NAS TP: Active: 'auto', duration: 'permanent' + * NAS SSP: Mode preference: 'cdma-1x, cdma-1xevdo, gsm, umts, lte, td-scdma, 5gnr' + * ∘ QMI -> GSM only = NAS TP: Active: '3gpp, amps-or-gsm', duration: 'permanent' + * NAS SSP: Mode preference: 'gsm' + * ∘ QMI -> UMTS only = NAS TP: Active: '3gpp, cdma-or-wcdma', duration: 'permanent' + * NAS SSP: Mode preference: 'umts' + * ∘ QMI -> EVDO only = NAS TP: Active: '3gpp2, hdr', duration: 'permanent' + * NAS SSP: Mode preference: 'cdma-1xevdo' + * ∘ QMI -> CDMA only = NAS TP: Active: '3gpp2, cdma-or-wcdma', duration: 'permanent' + * NAS SSP: Mode preference: 'cdma-1x' + * ∘ QMI -> LTE only = NAS TP: Active: '3gpp, lte', duration: 'permanent' + * NAS SSP: Mode preference: 'lte' + * ∘ QMI -> 5GNR only = NAS TP: Active: 'auto', duration: 'permanent' + * NAS SSP: Mode preference: '5gnr' + */ + +static void +test_current_capabilities_generic_nr5g_multimode (void) +{ + MMQmiCurrentCapabilitiesContext ctx; + + ctx.multimode = TRUE; + + /* QMI -> Automatic */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X | + QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO | + QMI_NAS_RAT_MODE_PREFERENCE_GSM | + QMI_NAS_RAT_MODE_PREFERENCE_UMTS | + QMI_NAS_RAT_MODE_PREFERENCE_LTE | + QMI_NAS_RAT_MODE_PREFERENCE_TD_SCDMA | + QMI_NAS_RAT_MODE_PREFERENCE_5GNR); + ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> GSM only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_GSM); + ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AMPS_OR_GSM); + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> UMTS only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_UMTS); + ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA); + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> EVDO only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO); + ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2 | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_HDR); + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> CDMA only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1X); + ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2 | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA); + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> LTE only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_LTE); + ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_LTE); + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> 5GNR only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_5GNR); + ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); +} + +static void +test_supported_capabilities_generic_nr5g_multimode (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_LTE | MM_MODEM_CAPABILITY_5GNR, + MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE | MM_MODEM_CAPABILITY_5GNR, + MM_MODEM_CAPABILITY_LTE | MM_MODEM_CAPABILITY_5GNR, + MM_MODEM_CAPABILITY_GSM_UMTS | MM_MODEM_CAPABILITY_CDMA_EVDO | MM_MODEM_CAPABILITY_LTE | MM_MODEM_CAPABILITY_5GNR, + }; + + ctx.multimode = TRUE; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_generic_nr5g_multimode (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + /* we MUST not have 4G-only in multimode devices */ + /* we MUST not have 5G-only in multimode devices */ + /* we MUST not have 4G+5G in multimode devices */ + { .allowed = MM_MODEM_MODE_2G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_2G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_2G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_3G }, + + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_2G }, + + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_2G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_3G }, + + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_2G }, + + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_2G }, + + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_3G }, + + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_3G }, + { .allowed = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_2G }, + }; + + ctx.multimode = TRUE; + ctx.all = MM_MODEM_MODE_2G | MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.current_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); +} + +static void +test_current_capabilities_generic_nr5g_only (void) +{ + MMQmiCurrentCapabilitiesContext ctx; + + ctx.multimode = FALSE; + ctx.nas_ssp_mode_preference_mask = QMI_NAS_RAT_MODE_PREFERENCE_5GNR; + ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; + ctx.dms_capabilities = MM_MODEM_CAPABILITY_5GNR; + test_current_capabilities_expected (&ctx, MM_MODEM_CAPABILITY_5GNR); +} + +static void +test_supported_capabilities_generic_nr5g_only (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_5GNR, + }; + + ctx.multimode = FALSE; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.dms_capabilities = MM_MODEM_CAPABILITY_5GNR; + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_generic_nr5g_only (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + { .allowed = MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_NONE }, + }; + + ctx.multimode = FALSE; + ctx.all = MM_MODEM_MODE_5G; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.current_capabilities = MM_MODEM_CAPABILITY_5GNR; + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); +} + +static void +test_current_capabilities_generic_nr5g_lte (void) +{ + MMQmiCurrentCapabilitiesContext ctx; + + ctx.multimode = FALSE; + + /* QMI -> Automatic */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_LTE | + QMI_NAS_RAT_MODE_PREFERENCE_5GNR); + ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> LTE only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_LTE); + ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_LTE); + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> 5GNR only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_5GNR); + ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); +} + +static void +test_supported_capabilities_generic_nr5g_lte (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_LTE | MM_MODEM_CAPABILITY_5GNR, + }; + + ctx.multimode = FALSE; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_generic_nr5g_lte (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + { .allowed = MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_NONE }, + { .allowed = MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_4G }, + }; + + ctx.multimode = FALSE; + ctx.all = MM_MODEM_MODE_4G | MM_MODEM_MODE_5G; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.current_capabilities = (MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); +} + +static void +test_current_capabilities_generic_nr5g_lte_umts (void) +{ + MMQmiCurrentCapabilitiesContext ctx; + + ctx.multimode = FALSE; + + /* QMI -> Automatic */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_UMTS | + QMI_NAS_RAT_MODE_PREFERENCE_LTE | + QMI_NAS_RAT_MODE_PREFERENCE_5GNR); + ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> UMTS only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_UMTS); + ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_CDMA_OR_WCDMA); + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> LTE only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_LTE); + ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_LTE); + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> 5GNR only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_5GNR); + ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); +} + +static void +test_supported_capabilities_generic_nr5g_lte_umts (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_GSM_UMTS |MM_MODEM_CAPABILITY_LTE | MM_MODEM_CAPABILITY_5GNR, + }; + + ctx.multimode = FALSE; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_generic_nr5g_lte_umts (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + { .allowed = MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + /* we MUST have 4G-only in non-multimode devices */ + { .allowed = MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_NONE }, + + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_3G }, + + /* we MUST have 5G-only in non-multimode devices */ + { .allowed = MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_NONE }, + + /* we MUST have 4G+5G in non-multimode devices */ + { .allowed = MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_4G }, + + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_3G }, + + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_3G }, + }; + + ctx.multimode = FALSE; + ctx.all = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.current_capabilities = (MM_MODEM_CAPABILITY_GSM_UMTS | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); +} + +static void +test_current_capabilities_generic_nr5g_lte_evdo (void) +{ + MMQmiCurrentCapabilitiesContext ctx; + + ctx.multimode = FALSE; + + /* QMI -> Automatic */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO | + QMI_NAS_RAT_MODE_PREFERENCE_LTE | + QMI_NAS_RAT_MODE_PREFERENCE_5GNR); + ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> EVDO only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_CDMA_1XEVDO); + ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP2 | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_HDR); + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> LTE only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_LTE); + ctx.nas_tp_mask = (QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_3GPP | QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_LTE); + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); + + /* QMI -> 5GNR only */ + ctx.nas_ssp_mode_preference_mask = (QMI_NAS_RAT_MODE_PREFERENCE_5GNR); + ctx.nas_tp_mask = QMI_NAS_RADIO_TECHNOLOGY_PREFERENCE_AUTO; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + test_current_capabilities_expected (&ctx, + (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR)); +} + +static void +test_supported_capabilities_generic_nr5g_lte_evdo (void) +{ + MMQmiSupportedCapabilitiesContext ctx; + static const MMModemCapability expected_capabilities[] = { + MM_MODEM_CAPABILITY_CDMA_EVDO |MM_MODEM_CAPABILITY_LTE | MM_MODEM_CAPABILITY_5GNR, + }; + + ctx.multimode = FALSE; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.dms_capabilities = (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + + test_supported_capabilities_expected (&ctx, + expected_capabilities, + G_N_ELEMENTS (expected_capabilities)); +} + +static void +test_supported_modes_generic_nr5g_lte_evdo (void) +{ + MMQmiSupportedModesContext ctx; + static const MMModemModeCombination expected_modes[] = { + { .allowed = MM_MODEM_MODE_3G, .preferred = MM_MODEM_MODE_NONE }, + /* we MUST have 4G-only in non-multimode devices */ + { .allowed = MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_NONE }, + + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G, .preferred = MM_MODEM_MODE_3G }, + + /* we MUST have 5G-only in non-multimode devices */ + { .allowed = MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_NONE }, + + /* we MUST have 4G+5G in non-multimode devices */ + { .allowed = MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_4G }, + + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_3G }, + + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_5G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_4G }, + { .allowed = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G, .preferred = MM_MODEM_MODE_3G }, + }; + + ctx.multimode = FALSE; + ctx.all = MM_MODEM_MODE_3G | MM_MODEM_MODE_4G | MM_MODEM_MODE_5G; + ctx.nas_ssp_supported = TRUE; + ctx.nas_tp_supported = TRUE; + ctx.current_capabilities = (MM_MODEM_CAPABILITY_CDMA_EVDO | + MM_MODEM_CAPABILITY_LTE | + MM_MODEM_CAPABILITY_5GNR); + + test_supported_modes_expected (&ctx, + expected_modes, + G_N_ELEMENTS (expected_modes)); } /*****************************************************************************/ @@ -315,14 +1339,60 @@ g_test_init (&argc, &argv, NULL); - g_test_add_func ("/MM/QMI/Current-Capabilities/UML290", test_uml290); - g_test_add_func ("/MM/QMI/Current-Capabilities/ADU960S", test_adu960s); - g_test_add_func ("/MM/QMI/Current-Capabilities/Gobi1k/GSM", test_gobi1k_gsm); - g_test_add_func ("/MM/QMI/Current-Capabilities/Gobi1k/CDMA", test_gobi1k_cdma); - g_test_add_func ("/MM/QMI/Current-Capabilities/Gobi2k/GSM", test_gobi2k_gsm); - g_test_add_func ("/MM/QMI/Current-Capabilities/Gobi2k/CDMA", test_gobi2k_cdma); - g_test_add_func ("/MM/QMI/Current-Capabilities/Gobi3k/GSM", test_gobi3k_gsm); - g_test_add_func ("/MM/QMI/Current-Capabilities/Gobi3k/CDMA", test_gobi3k_cdma); + g_test_add_func ("/MM/qmi/current-capabilities/UML290", test_current_capabilities_uml290); + g_test_add_func ("/MM/qmi/supported-capabilities/UML290", test_supported_capabilities_uml290); + g_test_add_func ("/MM/qmi/supported-modes/UML290/cdma-evdo-gsm-umts-lte", test_supported_modes_uml290_cdma_evdo_gsm_umts_lte); + g_test_add_func ("/MM/qmi/supported-modes/UML290/cdma-evdo-lte", test_supported_modes_uml290_cdma_evdo_lte); + g_test_add_func ("/MM/qmi/supported-modes/UML290/gsm-umts-lte", test_supported_modes_uml290_gsm_umts_lte); + g_test_add_func ("/MM/qmi/supported-modes/UML290/lte", test_supported_modes_uml290_lte); + + g_test_add_func ("/MM/qmi/current-capabilities/ADU960S", test_current_capabilities_adu960s); + g_test_add_func ("/MM/qmi/supported-capabilities/ADU960S", test_supported_capabilities_adu960s); + g_test_add_func ("/MM/qmi/supported-modes/ADU960S", test_supported_modes_adu960s); + + g_test_add_func ("/MM/qmi/current-capabilities/Gobi1k/GSM", test_current_capabilities_gobi1k_gsm); + g_test_add_func ("/MM/qmi/supported-capabilities/Gobi1k/GSM", test_supported_capabilities_gobi1k_gsm); + g_test_add_func ("/MM/qmi/supported-modes/Gobi1k/GSM", test_supported_modes_gobi1k_gsm); + + g_test_add_func ("/MM/qmi/current-capabilities/Gobi1k/CDMA", test_current_capabilities_gobi1k_cdma); + g_test_add_func ("/MM/qmi/supported-capabilities/Gobi1k/CDMA", test_supported_capabilities_gobi1k_cdma); + g_test_add_func ("/MM/qmi/supported-modes/Gobi1k/CDMA", test_supported_modes_gobi1k_cdma); + + g_test_add_func ("/MM/qmi/current-capabilities/Gobi2k/GSM", test_current_capabilities_gobi2k_gsm); + g_test_add_func ("/MM/qmi/supported-capabilities/Gobi2k/GSM", test_supported_capabilities_gobi2k_gsm); + g_test_add_func ("/MM/qmi/supported-modes/Gobi2k/GSM", test_supported_modes_gobi2k_gsm); + + g_test_add_func ("/MM/qmi/current-capabilities/Gobi2k/CDMA", test_current_capabilities_gobi2k_cdma); + g_test_add_func ("/MM/qmi/supported-capabilities/Gobi2k/CDMA", test_supported_capabilities_gobi2k_cdma); + g_test_add_func ("/MM/qmi/supported-modes/Gobi2k/CDMA", test_supported_modes_gobi2k_cdma); + + g_test_add_func ("/MM/qmi/current-capabilities/Gobi3k/GSM", test_current_capabilities_gobi3k_gsm); + g_test_add_func ("/MM/qmi/supported-capabilities/Gobi3k/GSM", test_supported_capabilities_gobi3k_gsm); + g_test_add_func ("/MM/qmi/supported-modes/Gobi3k/GSM", test_supported_modes_gobi3k_gsm); + + g_test_add_func ("/MM/qmi/current-capabilities/Gobi3k/CDMA", test_current_capabilities_gobi3k_cdma); + g_test_add_func ("/MM/qmi/supported-capabilities/Gobi3k/CDMA", test_supported_capabilities_gobi3k_cdma); + g_test_add_func ("/MM/qmi/supported-modes/Gobi3k/CDMA", test_supported_modes_gobi3k_cdma); + + g_test_add_func ("/MM/qmi/current-capabilities/generic/nr5g-multimode", test_current_capabilities_generic_nr5g_multimode); + g_test_add_func ("/MM/qmi/supported-capabilities/generic/nr5g-multimode", test_supported_capabilities_generic_nr5g_multimode); + g_test_add_func ("/MM/qmi/supported-modes/generic/nr5g-multimode", test_supported_modes_generic_nr5g_multimode); + + g_test_add_func ("/MM/qmi/current-capabilities/generic/nr5g-only", test_current_capabilities_generic_nr5g_only); + g_test_add_func ("/MM/qmi/supported-capabilities/generic/nr5g-only", test_supported_capabilities_generic_nr5g_only); + g_test_add_func ("/MM/qmi/supported-modes/generic/nr5g-only", test_supported_modes_generic_nr5g_only); + + g_test_add_func ("/MM/qmi/current-capabilities/generic/nr5g-lte", test_current_capabilities_generic_nr5g_lte); + g_test_add_func ("/MM/qmi/supported-capabilities/generic/nr5g-lte", test_supported_capabilities_generic_nr5g_lte); + g_test_add_func ("/MM/qmi/supported-modes/generic/nr5g-lte", test_supported_modes_generic_nr5g_lte); + + g_test_add_func ("/MM/qmi/current-capabilities/generic/nr5g-lte-umts", test_current_capabilities_generic_nr5g_lte_umts); + g_test_add_func ("/MM/qmi/supported-capabilities/generic/nr5g-lte-umts", test_supported_capabilities_generic_nr5g_lte_umts); + g_test_add_func ("/MM/qmi/supported-modes/generic/nr5g-lte-umts", test_supported_modes_generic_nr5g_lte_umts); + + g_test_add_func ("/MM/qmi/current-capabilities/generic/nr5g-lte-evdo", test_current_capabilities_generic_nr5g_lte_evdo); + g_test_add_func ("/MM/qmi/supported-capabilities/generic/nr5g-lte-evdo", test_supported_capabilities_generic_nr5g_lte_evdo); + g_test_add_func ("/MM/qmi/supported-modes/generic/nr5g-lte-evdo", test_supported_modes_generic_nr5g_lte_evdo); return g_test_run (); } diff -Nru modemmanager-1.18.4/test/Makefile.in modemmanager-1.18.6/test/Makefile.in --- modemmanager-1.18.4/test/Makefile.in 2021-11-26 09:23:54.000000000 +0000 +++ modemmanager-1.18.6/test/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -219,8 +219,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ @@ -239,6 +237,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -250,6 +250,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -744,7 +745,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/tools/Makefile.in modemmanager-1.18.6/tools/Makefile.in --- modemmanager-1.18.4/tools/Makefile.in 2021-11-26 09:23:54.000000000 +0000 +++ modemmanager-1.18.6/tools/Makefile.in 2022-02-11 10:33:21.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -170,8 +170,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -216,6 +214,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -227,6 +227,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -544,7 +545,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/tools/tests/Makefile.in modemmanager-1.18.6/tools/tests/Makefile.in --- modemmanager-1.18.4/tools/tests/Makefile.in 2021-11-26 09:23:54.000000000 +0000 +++ modemmanager-1.18.6/tools/tests/Makefile.in 2022-02-11 10:33:22.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -191,8 +191,6 @@ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` -ETAGS = etags -CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp \ $(top_srcdir)/gtester.make DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -212,6 +210,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -223,6 +223,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -598,7 +599,6 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am diff -Nru modemmanager-1.18.4/vapi/Makefile.in modemmanager-1.18.6/vapi/Makefile.in --- modemmanager-1.18.4/vapi/Makefile.in 2021-11-26 09:23:54.000000000 +0000 +++ modemmanager-1.18.6/vapi/Makefile.in 2022-02-11 10:33:22.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.16.3 from Makefile.am. +# Makefile.in generated by automake 1.16.5 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2020 Free Software Foundation, Inc. +# Copyright (C) 1994-2021 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -186,6 +186,8 @@ CODE_COVERAGE_LDFLAGS = @CODE_COVERAGE_LDFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CSCOPE = @CSCOPE@ +CTAGS = @CTAGS@ CYGPATH_W = @CYGPATH_W@ DBUS_SYS_DIR = @DBUS_SYS_DIR@ DEFS = @DEFS@ @@ -197,6 +199,7 @@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ETAGS = @ETAGS@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCOV = @GCOV@ @@ -452,7 +455,6 @@ cscope cscopelist: - distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am