Age | Commit message (Collapse) | Author |
|
We want to ensure that all errors reported via DBus operations are
normalized to MM-specific errors.
We don't want to return QMI or MBIM specific errors, as those are
protocol specific and we don't want DBus clients to need to rely on
knowing which is the protocol in use by the device.
|
|
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.
|
|
Without setting memory to NULL it is possible that ctx->list
point to an unitialized pointer and trig a segfault when we
free it (for example when the firmware list is not supported)
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
|
|
Skip building the firmware version information with carrier config
information if the plugin already knows that the firmware upgrade
method doesn't implement carrier-specific upgrade paths.
|
|
Instead of assuming that all modules supporting firmware upgrade are
USB based.
|
|
Move the logic out of the base modem, and make it applicable only for
QMI modems.
|
|
Move the logic out of the base modem, and make it applicable only for
MBIM modems.
|
|
==80079== 1,377 (48 direct, 1,329 indirect) bytes in 1 blocks are definitely lost in loss record 5,200 of 5,232
==80079== at 0x483977F: malloc (vg_replace_malloc.c:309)
==80079== by 0x5025AE9: g_malloc (in /usr/lib/libglib-2.0.so.0.6400.2)
==80079== by 0x5006223: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.6400.2)
==80079== by 0x4FEB59B: ??? (in /usr/lib/libglib-2.0.so.0.6400.2)
==80079== by 0x4FEE378: g_variant_builder_end (in /usr/lib/libglib-2.0.so.0.6400.2)
==80079== by 0x48F8314: mm_firmware_properties_get_dictionary (mm-firmware-properties.c:337)
==80079== by 0x1AAF29: load_current_ready (mm-iface-modem-firmware.c:80)
==80079== by 0x4E68653: ??? (in /usr/lib/libgio-2.0.so.0.6400.2)
==80079== by 0x4E68688: ??? (in /usr/lib/libgio-2.0.so.0.6400.2)
==80079== by 0x502B58E: g_main_context_dispatch (in /usr/lib/libglib-2.0.so.0.6400.2)
==80079== by 0x502D530: ??? (in /usr/lib/libglib-2.0.so.0.6400.2)
==80079== by 0x502E542: g_main_loop_run (in /usr/lib/libglib-2.0.so.0.6400.2)
|
|
|
|
mm-iface-modem-firmware.c:438:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
438 | ctx->step++;
| ~~~~~~~~~^~
mm-iface-modem-firmware.c:440:5: note: here
440 | case INITIALIZATION_STEP_UPDATE_SETTINGS:
| ^~~~
...
|
|
mm-iface-modem-firmware.c: In function ‘interface_initialization_step’:
mm-iface-modem-firmware.c:435:5: error: switch missing default case [-Werror=switch-default]
435 | switch (ctx->step) {
| ^~~~~~
|
|
The Firmware policy is always 'auth_admin'.
|
|
g_free is in form of `void (*)(gpointer)`, which matches the
GDestroyNotify signature. An explicit GDestroyNotify cast on g_free is
thus not needed.
|
|
Which reports the version of the currently active carrier
configuration.
We also update the firmware 'version' reported in the firmware
settings so that carrier-specific upgrades can be performed (e.g. when
the firmware stays the same but the MCFG is updated).
|
|
In order to support different per-carrier upgrade paths in fwupd.
|
|
|
|
|
|
Since the Firmware interface now contains more actions and properties
apart from List() and Select(), these two actions are now optional.
Not all modems implementing the Firmware interface must implement
these two methods.
|
|
We no longer "check for support" of this interface, it will always be
available for all modem objects.
The only implementation that used this interface was the QMI one, and
only for a very small subset of devices (those supporting the "QMI DMS
List Stored Images" operation). The logic was changed so that the list
of stored images wasn't preloaded during the support check; it will
now instead be preloaded during the first call to List().
|
|
|
|
ModemManager[2804]: <warn> [1545055222.508649] No valid firmware images listed. Assuming firmware unsupported.
ModemManager[2804]: <debug> [1545055222.508665] firmware list loading failed: unsupported
ModemManager[2804]: <debug> [1545055222.508683] Couldn't load firmware image list: firmware list unknown
ModemManager[2804]: <debug> [1545055222.508728] Couldn't load current firmware image: current firmware unknown
(ModemManager:2804): GLib-CRITICAL **: 15:00:22.508: g_variant_builder_end: assertion '!GVSB(builder)->uniform_item_types || GVSB(builder)->prev_item_type != NULL || g_variant_type_is_definite (GVSB(builder)->type)' failed
Thread 1 "ModemManager" received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff75b39b6 in ?? () from /usr/lib/libglib-2.0.so.0
(gdb) bt
#0 0x00007ffff75b39b6 in () at /usr/lib/libglib-2.0.so.0
#1 0x00007ffff75b4363 in g_logv () at /usr/lib/libglib-2.0.so.0
#2 0x00007ffff75b4560 in g_log () at /usr/lib/libglib-2.0.so.0
#3 0x00007ffff758867d in g_variant_builder_end () at /usr/lib/libglib-2.0.so.0
#4 0x00005555555e4d12 in load_current_ready (self=0x55555579c330, res=0x5555557388e0, ctx=0x5555557d6d80) at mm-iface-modem-firmware.c:84
#5 0x00007ffff778f194 in () at /usr/lib/libgio-2.0.so.0
#6 0x00007ffff778f1c9 in () at /usr/lib/libgio-2.0.so.0
#7 0x00007ffff75c4271 in g_main_context_dispatch () at /usr/lib/libglib-2.0.so.0
#8 0x00007ffff75c5f89 in () at /usr/lib/libglib-2.0.so.0
#9 0x00007ffff75c6f62 in g_main_loop_run () at /usr/lib/libglib-2.0.so.0
#10 0x0000555555597aa0 in main (argc=2, argv=0x7fffffffe488) at main.c:181
|
|
Instead of assuming that NULL is a valid return, make sure we return
an error instead.
This also makes it sure that if the GTask gets cancelled, the result
we set is always a valid GObject, so that the g_object_unref passed as
GDestroyNotify can be safely called always. Not a big deal anyway, as
the GTask cannot be currently cancelled.
|
|
Instead of assuming that NULL is a valid return, make sure we return
an error instead.
|
|
|
|
g_free and g_object_unref are in form of `void (*)(gpointer)`, which
matches the GDestroyNotify signature. An explicit GDestroyNotify cast on
g_free and g_object_unref is thus not needed.
|
|
|
|
The interfaces usually retrieve objects (e.g. skeletons) from the Modem object
using g_object_get(), but we didn't make sure that these objects were actually
valid before using them.
This should clean up errors happening when the modem gets unplugged and still
some actions are ongoing.
Should fix https://bugzilla.gnome.org/show_bug.cgi?id=685933
|
|
|
|
|