Merge cros/upstream to cros/master

Contains the following commits:
 54c82ad RELEASING: update with meson specific steps (Aleksander Morgado)
 ed37cea libmbim-glib,doc: include MBIM proxy control service in docs (Aleksander Morgado)
 b59eef8 mbim-codegen: add section doc for each service (Aleksander Morgado)
 056df12 libmbim-glib,utils: add missing short description in section (Aleksander Morgado)
 c70d602 libmbim-glib,compat: add missing MbimLteAttachStatus doc (Aleksander Morgado)
 06beb4e libmbim-glib,device: add missing mbim_device_list_links() doc (Aleksander Morgado)
 048f5ac libmbim-glib,device: fix MbimDevice 'device-in-session' property doc (Aleksander Morgado)
 ea34d57 libmbim-glib,version: add missing MBIM_CHECK_VERSION() documentation (Aleksander Morgado)
 3b77dd8 libmbim-glib,device: fix wrong reference to QmiDevice (Aleksander Morgado)
 f7d516c build,meson: fix 'export_packages' in GIR setup (Aleksander Morgado)
 0ac8f8f README: add reference to mbim-network license (Aleksander Morgado)
 39c3f8c README: add link to project documentation (Aleksander Morgado)
 181c60c libmbim-glib,compat: redefine deprecated typedef to avoid gtk-doc warnings (Aleksander Morgado)
 20f37ff libmbim-glib: fix reference to unknown method name (Aleksander Morgado)
 0a59f15 build-aux,doc: add missing references to MS struct array members (Aleksander Morgado)
 1738e76 docs: add missing reference to the private proxy_control_version_notification_parse() (Aleksander Morgado)
 dc6614b docs: add missing reference to mbim_message_get_printable_full() (Aleksander Morgado)
 0786e85 docs,tlv: add missing references to standard MbimTlvType methods (Aleksander Morgado)
 612f7f0 libmbim-glib,compat: use MbimDeprecated prefix for all helper types (Aleksander Morgado)
 8813312 docs: add missing references to MbimAccessMediaType (Aleksander Morgado)
 f8cb71e docs: fix reference to MbimDataSubclass (Aleksander Morgado)
 fb0f104 libmbim-glib,tlv: add missing since tag in tlv type enum (Aleksander Morgado)
 26f5751 mbim-codegen,docs: fix generation of per-mbimex version files (Aleksander Morgado)
 248ed90 mbim-codegen,struct: add dummy description for each struct type (Aleksander Morgado)
 a04d319 mbim-codegen,struct: fix links to public types (Aleksander Morgado)
 f474d51 libmbim-glib,compat: deprecate the MbimLteAttachStatus type (Aleksander Morgado)
 a9dc280 libmbim-glib,tlv: make sure MbimTlv contents are not documented (Aleksander Morgado)
 d5a64f5 libmbim-glib,tlv: add missing arguments documentation (Aleksander Morgado)
 36c9fd9 libmbim-glib,enums: fix missing MbimWakeType documentation (Aleksander Morgado)
 01430bc libmbim-glib,enums: fix missing MBIM_CTRL_CAPS_NONE documentation (Aleksander Morgado)
 f7a2c42 ci: enable gtk-doc in build-release (Aleksander Morgado)
 e8352f9 build: force building doc on normal builds (Aleksander Morgado)
 a46bbfe mbimcli,ms-basic-connect-extensions: use 0 for unknown UMTS RSCP (Aleksander Morgado)
 35d50fc mbimcli,ms-basic-connect-extensions: use Base Stations v3 when available (Aleksander Morgado)
 972b33d docs: add quectel qdu commands (Ivan Mikhanchuk)
 d2bee57 build: version bump to indicate existence of new API (Quectel QDU v2) (Aleksander Morgado)
 858d62a libmbim-glib,qdu: add quectel qdu commands (Ivan Mikhanchuk)

BUG=b:217763964
TEST=emerge-hatch libmbim && cros deploy && run tast

Cq-Depend: chromium:3469499, chromium:3469500
Change-Id: Ie15414c84e9f4e5b1cfeb619a40ad980ddd31cbe
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 657b252..ccc1086 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -71,7 +71,7 @@
     - tags
     - schedules
   script:
-    - meson setup build --buildtype=release --prefix=/usr -Dwerror=true
+    - meson setup build --buildtype=release --prefix=/usr -Dgtk_doc=true -Dwerror=true
     - ninja -C build
     - ninja -C build install
     - ninja -C build dist
diff --git a/README.md b/README.md
index bca8a39..b828a01 100644
--- a/README.md
+++ b/README.md
@@ -9,10 +9,15 @@
 libmbim is a glib-based library for talking to WWAN modems and devices which
 speak the Mobile Broadband Interface Model (MBIM) protocol.
 
+## Documentation
+
+Project documentation is kept in:
+https://modemmanager.org/docs/libmbim/
+
 ## License
 
 * `libmbim-glib` library is released under the LGPL-2.1-or-later license.
-* `mbimcli` tool is released under the GPL-2.0-or-later license.
+* `mbimcli` and `mbim-network` tools are released under the GPL-2.0-or-later license.
 
 License texts can be found under the `LICENSES` folder.
 
diff --git a/RELEASING b/RELEASING
index 7949a70..3648d33 100644
--- a/RELEASING
+++ b/RELEASING
@@ -1,5 +1,5 @@
 
-The libmbim releases are generated using the GNU autotools.
+The libmbim releases are generated using meson.
 
 0.1) For major releases:
      * Increment mbim_minor_version and reset mbim_micro_version.
@@ -9,32 +9,26 @@
 0.2) For stable branch releases:
      * Increment mbim_micro_version.
 
-1) Configure and build the whole project, making sure gtk-doc is enabled:
+1) Add signed tag:
+    $ git tag -s 1.28.0
 
-    $ NOCONFIGURE=1 ./autogen.sh
-    $ ./configure --enable-gtk-doc
-    $ make -j8
+   The description included in the signed tag could be:
+    Release 1.28.0
 
-2) Run distcheck so that the source distribution tarball is generated, and the
-   project test suite is run on it:
+2) Configure and build the whole project, making sure gtk-doc and introspection
+   are enabled:
+    $ meson setup build \
+        --prefix=/usr \
+        --buildtype=release \
+        -Dintrospection=true \
+        -Dgtk_doc=true
+    $ ninja -C build
 
-    $ make distcheck
+3) Run the test suite and install locally:
+    $ ninja -C build test
+    $ sudo ninja -C build install
 
-3) Compute checksum of the tarball so that it can be referenced in the release
-   email:
-
-    $ sha256sum libmbim-${VERSION}.tar.xz
-
-4) Sign release tarball, and verify it (*):
-
-    $ gpg --detach-sign --armor libmbim-${VERSION}.tar.xz
-    $ gpg --verify libmbim-${VERSION}.tar.xz.asc libmbim-${VERSION}.tar.xz
-
-5) Upload source tarball (.tar.xz) and signature (.tar.xz.asc) to
-   freedesktop.org.
-    $ scp libmbim-${VERSION}.tar.xz* fd.o:${libmbim}/
-
-6) Create directories for the manpages and gtk-doc documentation in
+4) Create directories for the manpages and gtk-doc documentation in
    freedesktop.org, and also update the 'latest' links:
     $ ssh fd.o
     [fd.o] $ cd ${libmbim}/man/
@@ -46,26 +40,31 @@
     [fd.o] $ mkdir -p ${VERSION}
     [fd.o] $ ln -s ${VERSION} latest
 
-7) Generate HTML for the manpages:
+5) Generate HTML for the manpages:
     $ roffit < docs/man/mbimcli.1 > mbimcli.1.html
     $ roffit < docs/man/mbim-network.1 > mbim-network.1.html
 
-8) Upload manpages in HTML to freedesktop.org:
+6) Upload manpages in HTML to freedesktop.org:
     $ scp *.1.html fd.o:${libmbim}/man/${VERSION}/
 
-9) Upload the gtk-doc in HTML available inside the source tarball to
-   freedesktop.org. It must be the one inside the tarball because it contains
-   the correct fixed refs to the online documentation of the dependencies
-   (e.g. the glib/gobject/gio documentation URLs in http://developer.gnome.org)
-    $ tar -Jxvf libmbim-${VERSION}.tar.xz
-    $ scp libmbim-${VERSION}/docs/reference/libmbim-glib/html/* fd.o:${libmbim}/libmbim-glib/${VERSION}/
+7) Copy documentation from /usr/share/gtk-doc and fix online references manually
+    $ mkdir html
+    $ cp -r /usr/share/gtk-doc/html/libmbim-glib/* html/
+    $ for FILE in $(ls html/*.html); do \
+        sed -i 's|<a[^>]* href="\.\./glib/[^"]*|<a href="https://docs.gtk.org/glib/|g' $FILE; \
+        sed -i 's|<a[^>]* href="\.\./gobject/[^"]*|<a href="https://docs.gtk.org/gobject/|g' $FILE; \
+        sed -i 's|<a[^>]* href="\.\./gio/[^"]*|<a href="https://docs.gtk.org/gio/|g' $FILE; \
+      done
 
-10.1) For major releases:
+8) Upload the modified HTML files to freedesktop.org:
+    $ scp html/* fd.o:${libmbim}/libmbim-glib/${VERSION}/
+
+9.1) For major releases:
      * Fork new stable branch (e.g. mbim-${MAJOR}-${MINOR})
      * Post-release version bump in the main branch, increment mbim_minor_version.
      * Post-release version bump in the stable branch, increment mbim_micro_version.
 
-10.2) For stable branch releases:
+9.2) For stable branch releases:
      * Post-release version bump, increment mbim_micro_version.
 
 -------------------------------------------------------------------------------
diff --git a/build-aux/mbim-codegen/ObjectList.py b/build-aux/mbim-codegen/ObjectList.py
index bb3d45a..ffc885e 100644
--- a/build-aux/mbim-codegen/ObjectList.py
+++ b/build-aux/mbim-codegen/ObjectList.py
@@ -59,7 +59,7 @@
                     raise ValueError('Service name not specified before the first command')
                 self.command_list.append(Message(service_iter, mbimex_service_iter, mbimex_version_iter, object_dictionary))
             elif object_dictionary['type'] == 'Struct':
-                self.struct_list.append(Struct(object_dictionary))
+                self.struct_list.append(Struct(service_iter, mbimex_service_iter, mbimex_version_iter, object_dictionary))
             elif object_dictionary['type'] == 'Service':
                 service_iter = object_dictionary['name']
                 self.service_list.append(service_iter)
@@ -260,11 +260,13 @@
 
         # Emit subsection per type
         for struct in self.struct_list:
-            struct.emit_section_content(sfile)
+            if struct.service == service:
+                struct.emit_section_content(sfile)
 
         # Emit subsection per command
         for command in self.command_list:
-            command.emit_section_content(sfile)
+            if command.service == service:
+                command.emit_section_content(sfile)
 
         sfile.write(
             '</SECTION>\n')
diff --git a/build-aux/mbim-codegen/Struct.py b/build-aux/mbim-codegen/Struct.py
index 02037a5..70a96a7 100644
--- a/build-aux/mbim-codegen/Struct.py
+++ b/build-aux/mbim-codegen/Struct.py
@@ -16,7 +16,12 @@
     """
     Constructor
     """
-    def __init__(self, dictionary):
+    def __init__(self, service, mbimex_service, mbimex_version, dictionary):
+        # The message service, e.g. "Basic Connect"
+        self.service = service
+        self.mbimex_service = mbimex_service
+        self.mbimex_version = mbimex_version
+
         self.name = dictionary['name']
         self.contents = dictionary['contents']
         self.since = dictionary['since'] if 'since' in dictionary else None
@@ -79,7 +84,7 @@
                 if 'public-format' in field:
                     translations['public'] = field['public-format']
                     inner_template = (
-                        ' * @${field_name_underscore}: a ${public} given as a #guint16.\n')
+                        ' * @${field_name_underscore}: a #${public} given as a #guint16.\n')
                 else:
                     inner_template = (
                         ' * @${field_name_underscore}: a #guint16.\n')
@@ -87,7 +92,7 @@
                 if 'public-format' in field:
                     translations['public'] = field['public-format']
                     inner_template = (
-                        ' * @${field_name_underscore}: a ${public} given as a #guint32.\n')
+                        ' * @${field_name_underscore}: a #${public} given as a #guint32.\n')
                 else:
                     inner_template = (
                         ' * @${field_name_underscore}: a #guint32.\n')
@@ -101,7 +106,7 @@
                 if 'public-format' in field:
                     translations['public'] = field['public-format']
                     inner_template = (
-                        ' * @${field_name_underscore}: a ${public} given as a #guint64.\n')
+                        ' * @${field_name_underscore}: a #${public} given as a #guint64.\n')
                 else:
                     inner_template = (
                         ' * @${field_name_underscore}: a #guint64.\n')
@@ -129,6 +134,8 @@
 
         template += (
             ' *\n'
+            ' * A ${name} element.\n'
+            ' *\n'
             ' * Since: ${since}\n'
             ' */\n'
             'typedef struct {\n')
@@ -1086,13 +1093,13 @@
         template = (
             '<SUBSECTION ${struct_name}>\n'
             '${struct_name}\n')
-        if self.struct_array_member == True or self.ref_struct_array_member == True:
+        if self.struct_array_member == True or self.ref_struct_array_member == True or self.ms_struct_array_member == True:
             template += (
                 '${struct_name}Array\n')
         if self.single_member == True:
             template += (
                 '${name_underscore}_free\n')
-        if self.struct_array_member == True or self.ref_struct_array_member == True:
+        if self.struct_array_member == True or self.ref_struct_array_member == True or self.ms_struct_array_member == True:
             template += (
                 '${name_underscore}_array_free\n')
         sfile.write(string.Template(template).substitute(translations))
diff --git a/build-aux/mbim-codegen/mbim-codegen b/build-aux/mbim-codegen/mbim-codegen
index 4d7c4ad..4431512 100755
--- a/build-aux/mbim-codegen/mbim-codegen
+++ b/build-aux/mbim-codegen/mbim-codegen
@@ -43,6 +43,8 @@
     utils.add_copyright(output_file_h);
     utils.add_header_start(output_file_h, os.path.basename(opts.output))
     utils.add_source_start(output_file_c, os.path.basename(opts.output))
+    for input_file in args:
+        utils.add_header_sections(output_file_h, os.path.splitext(os.path.basename(input_file))[0])
 
     # Emit the message creation/parsing code
     object_list.emit(output_file_h, output_file_c)
diff --git a/build-aux/mbim-codegen/utils.py b/build-aux/mbim-codegen/utils.py
index 6722269..8f39b8b 100644
--- a/build-aux/mbim-codegen/utils.py
+++ b/build-aux/mbim-codegen/utils.py
@@ -36,7 +36,7 @@
 Write the common header start chunk
 """
 def add_header_start(f, output_name):
-    translations = { 'guard'   : build_header_guard(output_name) }
+    translations = { 'guard' : build_header_guard(output_name) }
     template = (
         "\n"
         "#include <glib.h>\n"
@@ -56,6 +56,25 @@
 
 
 """
+Write the header documentation sections
+"""
+def add_header_sections(f, input_name):
+    translations = { 'section_name' : "mbim-" + remove_prefix(input_name,"mbim-service-"),
+                     'service_name' : string.capwords(remove_prefix(input_name,"mbim-service-").replace('-', ' ')) }
+    template = (
+        "\n"
+        "/**\n"
+        " * SECTION:${section_name}\n"
+        " * @title: ${service_name} service\n"
+        " * @short_description: Support for the ${service_name} service.\n"
+        " *\n"
+        " * This section implements support for requests, responses and notifications in the\n"
+        " * ${service_name} service.\n"
+        " */\n")
+    f.write(string.Template(template).substitute(translations))
+
+
+"""
 Write the common header stop chunk
 """
 def add_header_stop(f, output_name):
diff --git a/data/mbim-service-qdu.json b/data/mbim-service-qdu.json
index e2ee9da..e94ceb0 100644
--- a/data/mbim-service-qdu.json
+++ b/data/mbim-service-qdu.json
@@ -52,5 +52,27 @@
     "since"    : "1.26",
     "set"      : [ { "name"   : "DataBuffer",
                      "format" : "unsized-byte-array" } ],
-    "response" : []}
+    "response" : []},
+
+  // *********************************************************************************
+  { "name"     : "Quectel Reboot",
+    "type"     : "Command",
+    "since"    : "1.28",
+    "set"      : [ { "name"          : "RebootType",
+                     "format"        : "guint16",
+                     "public-format" : "MbimQduQuectelRebootType" } ],
+    "response" : []},
+
+  // *********************************************************************************
+  { "name"     : "Quectel Read Version",
+    "type"     : "Command",
+    "since"    : "1.28",
+    "set"      : [ { "name"   : "VersionType",
+                     "format" : "guint16",
+                     "public-format" : "MbimQduQuectelVersionType" } ],
+    "response" : [ { "name"   : "VersionId",
+                     "format" : "guint32" },
+                   { "name"   : "Version",
+                     "format" : "string",
+                     "max-size" : "120" } ] }
 ]
diff --git a/docs/reference/libmbim-glib/libmbim-glib-common.sections b/docs/reference/libmbim-glib/libmbim-glib-common.sections
index 047b4c3..ef30df7 100755
--- a/docs/reference/libmbim-glib/libmbim-glib-common.sections
+++ b/docs/reference/libmbim-glib/libmbim-glib-common.sections
@@ -165,6 +165,7 @@
 mbim_message_ref
 mbim_message_unref
 mbim_message_get_printable
+mbim_message_get_printable_full
 mbim_message_get_raw
 mbim_message_get_message_type
 mbim_message_get_message_length
@@ -215,6 +216,7 @@
 mbim_message_close_done_new
 mbim_message_proxy_control_configuration_response_parse
 mbim_message_proxy_control_configuration_set_new
+mbim_message_proxy_control_version_notification_parse
 mbim_message_type_build_string_from_mask
 mbim_message_command_type_build_string_from_mask
 <SUBSECTION Standard>
@@ -359,6 +361,8 @@
 MbimQduSessionType
 MbimQduSessionStatus
 MbimQduSessionResult
+MbimQduQuectelRebootType
+MbimQduQuectelVersionType
 MbimPcoType
 MbimContextSource
 MbimLteAttachContextOperation
@@ -385,10 +389,11 @@
 MbimDrxCycle
 MbimSubscriberReadyStatusFlag
 MbimDataClassV3
-MbimDataSublass
+MbimDataSubclass
 MbimModemConfigurationStatus
 MbimWakeType
 MbimQuectelRadioSwitchState
+MbimAccessMediaType
 <SUBSECTION Methods>
 mbim_device_type_get_string
 mbim_cellular_class_build_string_from_mask
@@ -455,6 +460,8 @@
 mbim_qdu_session_result_get_string
 mbim_qdu_session_status_get_string
 mbim_qdu_session_type_get_string
+mbim_qdu_quectel_reboot_type_get_string
+mbim_qdu_quectel_version_type_get_string
 mbim_uicc_slot_state_get_string
 mbim_uicc_secure_messaging_get_string
 mbim_uicc_class_byte_type_get_string
@@ -475,6 +482,7 @@
 mbim_modem_configuration_status_get_string
 mbim_wake_type_get_string
 mbim_quectel_radio_switch_state_get_string
+mbim_access_media_type_get_string
 <SUBSECTION Private>
 mbim_device_type_build_string_from_mask
 mbim_cellular_class_get_string
@@ -543,6 +551,8 @@
 mbim_qdu_session_result_build_string_from_mask
 mbim_qdu_session_status_build_string_from_mask
 mbim_qdu_session_type_build_string_from_mask
+mbim_qdu_quectel_reboot_type_build_string_from_mask
+mbim_qdu_quectel_version_type_build_string_from_mask
 mbim_uicc_slot_state_build_string_from_mask
 mbim_uicc_secure_messaging_build_string_from_mask
 mbim_uicc_class_byte_type_build_string_from_mask
@@ -563,6 +573,7 @@
 mbim_modem_configuration_status_build_string_from_mask
 mbim_wake_type_build_string_from_mask
 mbim_quectel_radio_switch_state_build_string_from_mask
+mbim_access_media_type_build_string_from_mask
 <SUBSECTION Standard>
 MBIM_TYPE_ACTIVATION_COMMAND
 MBIM_TYPE_ACTIVATION_STATE
@@ -634,6 +645,8 @@
 MBIM_TYPE_QDU_SESSION_RESULT
 MBIM_TYPE_QDU_SESSION_STATUS
 MBIM_TYPE_QDU_SESSION_TYPE
+MBIM_TYPE_QDU_QUECTEL_REBOOT_TYPE
+MBIM_TYPE_QDU_QUECTEL_VERSION_TYPE
 MBIM_TYPE_UICC_SLOT_STATE
 MBIM_TYPE_UICC_SECURE_MESSAGING
 MBIM_TYPE_UICC_CLASS_BYTE_TYPE
@@ -654,6 +667,7 @@
 MBIM_TYPE_MODEM_CONFIGURATION_STATUS
 MBIM_TYPE_WAKE_TYPE
 MBIM_TYPE_QUECTEL_RADIO_SWITCH_STATE
+MBIM_TYPE_ACCESS_MEDIA_TYPE
 mbim_activation_command_get_type
 mbim_activation_state_get_type
 mbim_auth_protocol_get_type
@@ -724,6 +738,8 @@
 mbim_qdu_session_result_get_type
 mbim_qdu_session_status_get_type
 mbim_qdu_session_type_get_type
+mbim_qdu_quectel_reboot_type_get_type
+mbim_qdu_quectel_version_type_get_type
 mbim_uicc_slot_state_get_type
 mbim_uicc_class_byte_type_get_type
 mbim_uicc_secure_messaging_get_type
@@ -744,6 +760,7 @@
 mbim_modem_configuration_status_get_type
 mbim_wake_type_get_type
 mbim_quectel_radio_switch_state_get_type
+mbim_access_media_type_get_type
 </SECTION>
 
 <SECTION>
@@ -807,7 +824,9 @@
 mbim_tlv_type_build_string_from_mask
 <SUBSECTION Standard>
 MBIM_TYPE_TLV
+MBIM_TYPE_TLV_TYPE
 mbim_tlv_get_type
+mbim_tlv_type_get_type
 </SECTION>
 
 <SECTION>
@@ -832,4 +851,6 @@
 MbimDeprecatedCidBasicConnect
 MbimDeprecatedRegistrationFlag
 MbimDeprecatedCidMsBasicConnectExtensions
+MbimDeprecatedLteAttachStatus
+MbimDeprecatedNwError
 </SECTION>
diff --git a/docs/reference/libmbim-glib/libmbim-glib-docs.xml b/docs/reference/libmbim-glib/libmbim-glib-docs.xml
index 7607675..2e7a58b 100644
--- a/docs/reference/libmbim-glib/libmbim-glib-docs.xml
+++ b/docs/reference/libmbim-glib/libmbim-glib-docs.xml
@@ -75,7 +75,11 @@
 
   <chapter>
     <title>Microsoft-defined services</title>
+    <xi:include href="xml/mbim-ms-basic-connect-v2.xml"/>
+    <xi:include href="xml/mbim-ms-basic-connect-v3.xml"/>
     <xi:include href="xml/mbim-ms-basic-connect-extensions.xml"/>
+    <xi:include href="xml/mbim-ms-basic-connect-extensions-v2.xml"/>
+    <xi:include href="xml/mbim-ms-basic-connect-extensions-v3.xml"/>
     <xi:include href="xml/mbim-ms-uicc-low-level-access.xml"/>
     <xi:include href="xml/mbim-ms-firmware-id.xml"/>
     <xi:include href="xml/mbim-ms-host-shutdown.xml"/>
@@ -104,6 +108,11 @@
   </chapter>
 
   <chapter>
+    <title>libmbim-defined Services</title>
+    <xi:include href="xml/mbim-proxy-control.xml"/>
+  </chapter>
+
+  <chapter>
     <title>Compatibility</title>
     <xi:include href="xml/mbim-compat.xml"/>
   </chapter>
diff --git a/docs/reference/libmbim-glib/meson.build b/docs/reference/libmbim-glib/meson.build
index a2795ed..3dcc67e 100644
--- a/docs/reference/libmbim-glib/meson.build
+++ b/docs/reference/libmbim-glib/meson.build
@@ -65,4 +65,5 @@
   fixxref_args: fixxref_args,
   content_files: [sections_txt, version_xml],
   install: true,
+  check: true,
 )
diff --git a/meson.build b/meson.build
index 69160be..5619d01 100644
--- a/meson.build
+++ b/meson.build
@@ -3,7 +3,7 @@
 
 project(
   'libmbim', 'c',
-  version: '1.27.4',
+  version: '1.27.5',
   license: ['GPL-2.0-or-later', 'LGPL-2.1-or-later'],
   default_options: [
     'buildtype=debugoptimized',
diff --git a/src/libmbim-glib/generated/meson.build b/src/libmbim-glib/generated/meson.build
index 920b6bb..c635a17 100644
--- a/src/libmbim-glib/generated/meson.build
+++ b/src/libmbim-glib/generated/meson.build
@@ -88,32 +88,32 @@
 )
 
 services_data = [
-  [['atds'], true],
-  [['auth'], true],
-  [['basic-connect', 'ms-basic-connect-v2', 'ms-basic-connect-v3'], true],
-  [['dss'], true],
-  [['intel-firmware-update'], true],
-  [['ms-basic-connect-extensions', 'ms-basic-connect-extensions-v2', 'ms-basic-connect-extensions-v3'], true],
-  [['ms-uicc-low-level-access'], true],
-  [['ms-firmware-id'], true],
-  [['ms-host-shutdown'], true],
-  [['ms-sar'], true],
-  [['phonebook'], true],
-  [['proxy-control'], false],
-  [['qdu'], true],
-  [['quectel'], true],
-  [['qmi'], true],
-  [['sms'], true],
-  [['stk'], true],
-  [['ussd'], true],
+  ['atds'],
+  ['auth'],
+  ['basic-connect', 'ms-basic-connect-v2', 'ms-basic-connect-v3'],
+  ['dss'],
+  ['intel-firmware-update'],
+  ['ms-basic-connect-extensions', 'ms-basic-connect-extensions-v2', 'ms-basic-connect-extensions-v3'],
+  ['ms-uicc-low-level-access'],
+  ['ms-firmware-id'],
+  ['ms-host-shutdown'],
+  ['ms-sar'],
+  ['phonebook'],
+  ['proxy-control'],
+  ['qdu'],
+  ['quectel'],
+  ['qmi'],
+  ['sms'],
+  ['stk'],
+  ['ussd'],
 ]
 
 foreach service_data: services_data
-  service = service_data[0][0]
+  service = service_data[0]
   name = 'mbim-' + service
 
   input = []
-  foreach service_file: service_data[0]
+  foreach service_file: service_data
     input += data_dir / 'mbim-service-@0@.json'.format(service_file)
   endforeach
 
@@ -129,14 +129,12 @@
   gen_sources += generated[0]
   gen_headers += generated[1]
 
-  if service_data[1]
-    # FIXME: the third target generated by custom target can't by used because is not a known
-    #        source file, to the path has to be used. the first workaround is to use the
-    #        build paths to point to the files, and the second workaround is to use
-    #        custom target objects to force its building.
-    gen_sections += [meson.current_build_dir() / name + '.sections']
-    gen_sections_deps += [generated]
-  endif
+  # FIXME: the third target generated by custom target can't by used because is not a known
+  #        source file, to the path has to be used. the first workaround is to use the
+  #        build paths to point to the files, and the second workaround is to use
+  #        custom target objects to force its building.
+  gen_sections += [meson.current_build_dir() / name + '.sections']
+  gen_sections_deps += [generated]
 endforeach
 
 c_flags = [
diff --git a/src/libmbim-glib/mbim-cid.h b/src/libmbim-glib/mbim-cid.h
index 5181b10..6322e96 100644
--- a/src/libmbim-glib/mbim-cid.h
+++ b/src/libmbim-glib/mbim-cid.h
@@ -306,6 +306,8 @@
  * @MBIM_CID_QDU_UPDATE_SESSION: Update session command.
  * @MBIM_CID_QDU_FILE_OPEN: Open QDU file for firmware update.
  * @MBIM_CID_QDU_FILE_WRITE: Write QDU file for firmware update.
+ * @MBIM_CID_QDU_QUECTEL_REBOOT: Reboot to Emergency Download (Quectel specific). Since 1.28.
+ * @MBIM_CID_QDU_QUECTEL_READ_VERSION: Read firmware version (Quectel specific). Since 1.28.
  *
  * MBIM commands in the %MBIM_SERVICE_QDU service.
  *
@@ -316,6 +318,8 @@
     MBIM_CID_QDU_UPDATE_SESSION      = 1,
     MBIM_CID_QDU_FILE_OPEN           = 2,
     MBIM_CID_QDU_FILE_WRITE          = 3,
+    MBIM_CID_QDU_QUECTEL_REBOOT      = 4,
+    MBIM_CID_QDU_QUECTEL_READ_VERSION = 7
 } MbimCidQdu;
 
 /**
diff --git a/src/libmbim-glib/mbim-compat.c b/src/libmbim-glib/mbim-compat.c
index 012cff6..9fef35c 100644
--- a/src/libmbim-glib/mbim-compat.c
+++ b/src/libmbim-glib/mbim-compat.c
@@ -42,7 +42,7 @@
  * MbimLteAttachStatus struct */
 
 void
-mbim_lte_attach_status_free (MbimLteAttachStatus *var)
+mbim_lte_attach_status_free (MbimDeprecatedLteAttachStatus *var)
 {
     if (!var)
         return;
@@ -62,12 +62,12 @@
 gboolean
 mbim_message_ms_basic_connect_extensions_lte_attach_status_response_parse (
     const MbimMessage *message,
-    MbimLteAttachStatus **out_lte_attach_status,
+    MbimDeprecatedLteAttachStatus **out_lte_attach_status,
     GError **error)
 {
     g_autoptr(MbimLteAttachStatus) var = NULL;
 
-    var = g_new0 (MbimLteAttachStatus, 1);
+    var = g_new0 (MbimDeprecatedLteAttachStatus, 1);
     if (!mbim_message_ms_basic_connect_extensions_lte_attach_info_response_parse (
             message,
             &var->lte_attach_state,
@@ -87,12 +87,12 @@
 gboolean
 mbim_message_ms_basic_connect_extensions_lte_attach_status_notification_parse (
     const MbimMessage *message,
-    MbimLteAttachStatus **out_lte_attach_status,
+    MbimDeprecatedLteAttachStatus **out_lte_attach_status,
     GError **error)
 {
     g_autoptr(MbimLteAttachStatus) var = NULL;
 
-    var = g_new0 (MbimLteAttachStatus, 1);
+    var = g_new0 (MbimDeprecatedLteAttachStatus, 1);
     if (!mbim_message_ms_basic_connect_extensions_lte_attach_info_notification_parse (
             message,
             &var->lte_attach_state,
diff --git a/src/libmbim-glib/mbim-compat.h b/src/libmbim-glib/mbim-compat.h
index 58ac6ae..a06a0e3 100644
--- a/src/libmbim-glib/mbim-compat.h
+++ b/src/libmbim-glib/mbim-compat.h
@@ -131,9 +131,14 @@
  * @compression: a #guint32.
  * @auth_protocol: a #guint32.
  *
+ * LTE attach status information.
+ *
  * Since: 1.18
  * Deprecated: 1.26
  */
+
+/* The following type exists just so that we don't getdeprecation warnings on
+ * our own methods */
 typedef struct {
     guint32 lte_attach_state;
     guint32 ip_type;
@@ -142,7 +147,10 @@
     gchar *password;
     guint32 compression;
     guint32 auth_protocol;
-} MbimLteAttachStatus;
+} MbimDeprecatedLteAttachStatus;
+
+G_DEPRECATED
+typedef MbimDeprecatedLteAttachStatus MbimLteAttachStatus;
 
 /**
  * mbim_lte_attach_status_free:
@@ -154,8 +162,21 @@
  * Deprecated: 1.26
  */
 G_DEPRECATED
-void mbim_lte_attach_status_free (MbimLteAttachStatus *var);
+void mbim_lte_attach_status_free (MbimDeprecatedLteAttachStatus *var);
+
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#elif defined(__GNUC__)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
 G_DEFINE_AUTOPTR_CLEANUP_FUNC (MbimLteAttachStatus, mbim_lte_attach_status_free)
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#elif defined(__GNUC__)
+# pragma GCC diagnostic pop
+#endif
 
 /**
  * mbim_message_ms_basic_connect_extensions_lte_attach_status_query_new:
@@ -188,7 +209,7 @@
 G_DEPRECATED_FOR (mbim_message_ms_basic_connect_extensions_lte_attach_info_response_parse)
 gboolean mbim_message_ms_basic_connect_extensions_lte_attach_status_response_parse (
     const MbimMessage *message,
-    MbimLteAttachStatus **out_lte_attach_status,
+    MbimDeprecatedLteAttachStatus **out_lte_attach_status,
     GError **error);
 
 /**
@@ -207,7 +228,7 @@
 G_DEPRECATED_FOR (mbim_message_ms_basic_connect_extensions_lte_attach_info_notification_parse)
 gboolean mbim_message_ms_basic_connect_extensions_lte_attach_status_notification_parse (
     const MbimMessage *message,
-    MbimLteAttachStatus **out_lte_attach_status,
+    MbimDeprecatedLteAttachStatus **out_lte_attach_status,
     GError **error);
 
 /*****************************************************************************/
@@ -215,7 +236,7 @@
 
 /* The following type exists just so that we can get deprecation warnings */
 G_DEPRECATED
-typedef int MbimNwErrorDeprecated;
+typedef int MbimDeprecatedNwError;
 
 /**
  * MBIM_NW_ERROR_UNKNOWN:
@@ -225,11 +246,15 @@
  * Since: 1.0
  * Deprecated: 1.28: Use %MBIM_NW_ERROR_NONE instead.
  */
-#define MBIM_NW_ERROR_UNKNOWN (MbimNwErrorDeprecated) MBIM_NW_ERROR_NONE
+#define MBIM_NW_ERROR_UNKNOWN (MbimDeprecatedNwError) MBIM_NW_ERROR_NONE
 
 /*****************************************************************************/
 /* Rename blacklist to denylist */
 
+/* The following type exists just so that we can get deprecation warnings */
+G_DEPRECATED
+typedef int MbimDeprecatedCidMsBasicConnectExtensions;
+
 /**
  * MBIM_CID_MS_BASIC_CONNECT_EXTENSIONS_NETWORK_BLACKLIST:
  *
diff --git a/src/libmbim-glib/mbim-device.c b/src/libmbim-glib/mbim-device.c
index 133ecb0..6ba58ea 100644
--- a/src/libmbim-glib/mbim-device.c
+++ b/src/libmbim-glib/mbim-device.c
@@ -2819,7 +2819,7 @@
     g_object_class_install_property (object_class, PROP_TRANSACTION_ID, properties[PROP_TRANSACTION_ID]);
 
     /**
-     * MbimDevice:in-session
+     * MbimDevice:device-in-session
      *
      * Since: 1.4
      */
diff --git a/src/libmbim-glib/mbim-device.h b/src/libmbim-glib/mbim-device.h
index d6b1406..078bd6b 100644
--- a/src/libmbim-glib/mbim-device.h
+++ b/src/libmbim-glib/mbim-device.h
@@ -561,7 +561,7 @@
 
 /**
  * mbim_device_add_link_finish:
- * @self: a #QmiDevice.
+ * @self: a #MbimDevice.
  * @res: a #GAsyncResult.
  * @session_id: the session ID for the link created.
  * @error: Return location for error or %NULL.
@@ -671,6 +671,9 @@
  *   output #GPtrArray of link names.
  * @error: Return location for error or %NULL.
  *
+ * Synchronously lists all virtual network interfaces that have been previously
+ * created with mbim_device_add_link() in @base_ifname.
+ *
  * Returns: %TRUE if successful, %FALSE if @error is set.
  *
  * Since: 1.26
diff --git a/src/libmbim-glib/mbim-enums.h b/src/libmbim-glib/mbim-enums.h
index 02e88f5..234b22e 100644
--- a/src/libmbim-glib/mbim-enums.h
+++ b/src/libmbim-glib/mbim-enums.h
@@ -161,7 +161,7 @@
 
 /**
  * MbimCtrlCaps:
- * MBIM_CTRL_CAPS_NONE: None. Since 1.28.
+ * @MBIM_CTRL_CAPS_NONE: None. Since 1.28.
  * @MBIM_CTRL_CAPS_REG_MANUAL: Device allows manual network selection.
  * @MBIM_CTRL_CAPS_HW_RADIO_SWITCH: Device has a hardware radio power switch.
  * @MBIM_CTRL_CAPS_CDMA_MOBILE_IP: The CDMA function supports Mobile IP.
@@ -605,7 +605,7 @@
 /*****************************************************************************/
 /* 'Wake Reason' enums */
 /**
- * MbimWaketype:
+ * MbimWakeType:
  * @MBIM_WAKE_TYPE_CID_RESPONSE: A CID response wakes device.
  * @MBIM_WAKE_TYPE_CID_INDICATION: A CID indication wakes device.
  * @MBIM_WAKE_TYPE_PACKET: An incoming packet wakes device.
@@ -1218,6 +1218,36 @@
 } MbimQduFileType;
 
 /*****************************************************************************/
+/* 'QDU Quectel Reboot' enums */
+
+/**
+ * MbimQduQuectelRebootType:
+ * @MBIM_QDU_QUECTEL_REBOOT_TYPE_EDL: Reboot to Emergency Download mode
+ *
+ * QDU Quectel Reboot session type.
+ *
+ * Since: 1.28
+ */
+typedef enum { /*< since=1.28 >*/
+    MBIM_QDU_QUECTEL_REBOOT_TYPE_EDL = 17,
+} MbimQduQuectelRebootType;
+
+/*****************************************************************************/
+/* 'QDU Quectel Version' enums */
+
+/**
+ * MbimQduQuectelVersionType:
+ * @MBIM_QDU_QUECTEL_VERSION_TYPE_FW_BUILD_ID: Firmware Build ID
+ *
+ * QDU Quectel Read Version session type.
+ *
+ * Since: 1.28
+ */
+typedef enum { /*< since=1.28 >*/
+    MBIM_QDU_QUECTEL_VERSION_TYPE_FW_BUILD_ID = 256,
+} MbimQduQuectelVersionType;
+
+/*****************************************************************************/
 /* 'ATDS RAT' enums */
 
 /**
diff --git a/src/libmbim-glib/mbim-tlv-private.h b/src/libmbim-glib/mbim-tlv-private.h
index 7dc2d8f..c2f634c 100644
--- a/src/libmbim-glib/mbim-tlv-private.h
+++ b/src/libmbim-glib/mbim-tlv-private.h
@@ -27,6 +27,7 @@
 
 /* Defined in the same way as GByteArray */
 struct _MbimTlv {
+  /*< private >*/
   guint8 *data;
   guint   len;
 };
diff --git a/src/libmbim-glib/mbim-tlv.h b/src/libmbim-glib/mbim-tlv.h
index 64b9c8b..6b2fd4f 100644
--- a/src/libmbim-glib/mbim-tlv.h
+++ b/src/libmbim-glib/mbim-tlv.h
@@ -75,7 +75,7 @@
  *
  * Since: 1.28
  */
-typedef enum {
+typedef enum { /*< since=1.28 >*/
     MBIM_TLV_TYPE_INVALID                     = 0,
     MBIM_TLV_TYPE_UE_POLICITES                = 1,
     MBIM_TLV_TYPE_SINGLE_NSSAI                = 2,
@@ -264,6 +264,7 @@
  * @payload: (out)(optional)(transfer full)(type guint8): return location for a
  *  newly allocated array of #guint8 values, or %NULL if the field is not
  *  needed. Free the returned value with g_free().
+ * @error: return location for error or %NULL.
  *
  * Get the contents of a wake command TLV.
  *
@@ -296,6 +297,7 @@
  * @packet: (out)(optional)(transfer full)(type guint8): return location for a
  *  newly allocated array of #guint8 values, or %NULL if the field is not
  *  needed. Free the returned value with g_free().
+ * @error: return location for error or %NULL.
  *
  * Get the contents of a wake packet TLV.
  *
diff --git a/src/libmbim-glib/mbim-utils.c b/src/libmbim-glib/mbim-utils.c
index b2a040b..1e78a51 100644
--- a/src/libmbim-glib/mbim-utils.c
+++ b/src/libmbim-glib/mbim-utils.c
@@ -11,9 +11,10 @@
 /**
  * SECTION:mbim-utils
  * @title: Common utilities
+ * @short_description: Common utilities in the libmbim-glib library.
  *
  * This section exposes a set of common utilities that may be used to work
- * with the MBIM library.
+ * with the libmbim-glib library.
  */
 
 static volatile gint __traces_enabled = FALSE;
diff --git a/src/libmbim-glib/mbim-version.h.in b/src/libmbim-glib/mbim-version.h.in
index 106e328..08d3cf9 100644
--- a/src/libmbim-glib/mbim-version.h.in
+++ b/src/libmbim-glib/mbim-version.h.in
@@ -51,6 +51,8 @@
  * @minor: minor version (e.g. 2 for version 1.2.5)
  * @micro: micro version (e.g. 5 for version 1.2.5)
  *
+ * Checks the version of the library that is being compiled against.
+ *
  * Returns: %TRUE if the version of the libmbim-glib header files
  * is the same as or newer than the passed-in version.
  *
diff --git a/src/libmbim-glib/meson.build b/src/libmbim-glib/meson.build
index 7574f5b..dee6368 100644
--- a/src/libmbim-glib/meson.build
+++ b/src/libmbim-glib/meson.build
@@ -131,7 +131,7 @@
     symbol_prefix: ns.to_lower() + '_',
     extra_args: common_c_flags + ['--identifier-prefix=' + ns.to_upper()],
     header: 'libmbim-glib.h',
-    export_packages: 'libmbim-glib',
+    export_packages: libname,
     install: true,
   )
 endif
diff --git a/src/mbimcli/mbimcli-ms-basic-connect-extensions.c b/src/mbimcli/mbimcli-ms-basic-connect-extensions.c
index 3149b70..b5cd013 100644
--- a/src/mbimcli/mbimcli-ms-basic-connect-extensions.c
+++ b/src/mbimcli/mbimcli-ms-basic-connect-extensions.c
@@ -1186,9 +1186,7 @@
         PRINT_VALIDATED_UINT (umts_serving_cell->frequency_info_nt,       0xFFFFFFFF, "\t     Frequency info TDD", NULL);
         PRINT_VALIDATED_UINT (umts_serving_cell->uarfcn,                  0xFFFFFFFF, "\t                 UARFCN", NULL);
         PRINT_VALIDATED_UINT (umts_serving_cell->primary_scrambling_code, 0xFFFFFFFF, "\tPrimary Scrambling Code", NULL);
-        /* note: docs say unknown value in this case is 0
-         * https://github.com/MicrosoftDocs/windows-driver-docs/issues/2932 */
-        PRINT_VALIDATED_INT  (umts_serving_cell->rscp,                    0xFFFFFFFF, "\t                   RSCP", " dBm");
+        PRINT_VALIDATED_INT  (umts_serving_cell->rscp,                    0,          "\t                   RSCP", " dBm");
         PRINT_VALIDATED_INT  (umts_serving_cell->ecno,                    1,          "\t                   ECNO", " dBm");
         PRINT_VALIDATED_UINT (umts_serving_cell->path_loss,               0xFFFFFFFF, "\t              Path loss", NULL);
     } else
@@ -1207,7 +1205,7 @@
             PRINT_VALIDATED_UINT (umts_neighboring_cells[i]->cell_id,                 0xFFFFFFFF, "\t\t                Cell id", NULL);
             PRINT_VALIDATED_UINT (umts_neighboring_cells[i]->uarfcn,                  0xFFFFFFFF, "\t\t                 UARFCN", NULL);
             PRINT_VALIDATED_UINT (umts_neighboring_cells[i]->primary_scrambling_code, 0xFFFFFFFF, "\t\tPrimary Scrambling Code", NULL);
-            PRINT_VALIDATED_INT  (umts_neighboring_cells[i]->rscp,                    0xFFFFFFFF, "\t\t                   RSCP", " dBm");
+            PRINT_VALIDATED_INT  (umts_neighboring_cells[i]->rscp,                    0,          "\t\t                   RSCP", " dBm");
             PRINT_VALIDATED_INT  (umts_neighboring_cells[i]->ecno,                    1,          "\t\t                   ECNO", " dBm");
             PRINT_VALIDATED_UINT (umts_neighboring_cells[i]->path_loss,               0xFFFFFFFF, "\t\t              Path loss", NULL);
         }
@@ -1880,7 +1878,10 @@
     if (query_base_stations_flag) {
         g_debug ("Asynchronously querying base stations...");
         /* default capacity is 15, so use that value when querying */
-        request = mbim_message_ms_basic_connect_extensions_base_stations_info_query_new (15, 15, 15, 15, 15, NULL);
+        if (mbim_device_check_ms_mbimex_version (ctx->device, 3, 0))
+            request = mbim_message_ms_basic_connect_extensions_v3_base_stations_info_query_new (15, 15, 15, 15, 15, 15, NULL);
+        else
+            request = mbim_message_ms_basic_connect_extensions_base_stations_info_query_new (15, 15, 15, 15, 15, NULL);
         mbim_device_command (ctx->device,
                              request,
                              10,