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.
|
|
|
|
mm-iface-modem-cdma.c: In function ‘registration_check_step’:
mm-iface-modem-cdma.c:846:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
846 | ctx->step++;
| ~~~~~~~~~^~
mm-iface-modem-cdma.c:848:5: note: here
848 | case REGISTRATION_CHECK_STEP_SETUP_REGISTRATION_CHECKS:
| ^~~~
...
|
|
mm-iface-modem-cdma.c: In function ‘handle_activate_auth_ready’:
mm-iface-modem-cdma.c:198:5: error: switch missing default case [-Werror=switch-default]
198 | switch (modem_state) {
| ^~~~~~
...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Given that the Location interface requires 3GPP info reported by the 3GPP
interface, we should only trigger registration checks once the Location
interface has been already enabled and ready to be used. If we don't do this,
we'll end up e.g. getting initial MCCMNC values but never reaching the Location
interface properly.
So, fix this by triggering all registration checks (CDMA and 3GPP) only after
having enabled all interfaces.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
hybrid mode is the first parameter, not the third. Caused EVDO
to look like it wasn't registered.
|
|
|
|
Setting access technologies from registration state as part of the
registration checking in the CDMA Interface code fights with
custom implementations in each modem subclass, which causes the
access technologies to ping-pong between more specific (custom
implementation) and less specific (generated from registration state
during registration checking). If the modem class has more
specific access technology knowledge, we should use that and not
override it on the next registration state poll.
So instead, implement the generic access technology update from
registration state in the broadband modem base class'
load_access_technologies() hook. Thus, modem classes with more
specific checking (which override MMBroadbandModem's implementation)
will never fight with generic checking, while modems that don't
(and thus actually need the generic checking) still get some basic
access technology handling.
|
|
We want the SID/NID even when AT Serving System checks are disabled,
otherwise the SID/NID don't get filled at all. QCDM doesn't need the
SID/NID to determine registration, so the values are informational
only and don't affect registration state. But we still want to
export them via the API.
|
|
|
|
RegistrationCheckContext
This patch fixes a crash in periodic_registration_checks_ready() due to
access of an already deallocated RegistrationCheckContext.
Thread 0 *CRASHED* ( SIGSEGV @ 0x00000000 )
0x7fc344d355cd [ModemManager] - mm-iface-modem-cdma.c:1112 periodic_registration_checks_ready
0x7fc3449ea266 [libgio-2.0.so.0.3200.4] - gsimpleasyncresult.c:767 g_simple_async_result_complete
0x7fc3449ea368 [libgio-2.0.so.0.3200.4] - gsimpleasyncresult.c:779 complete_in_idle_cb
0x7fc344851dc4 [libglib-2.0.so.0.3200.4] - gmain.c:2539 g_main_context_dispatch
0x7fc344852147 [libglib-2.0.so.0.3200.4] - gmain.c:3146 g_main_context_iterate
0x7fc3448525a1 [libglib-2.0.so.0.3200.4] - gmain.c:3340 g_main_loop_run
0x7fc344d0f154 [ModemManager] - main.c:158 main
0x7fc34426a474 [libc-2.15.so] - libc-start.c:234 __libc_start_main
0x7fc344d0eb68 [ModemManager] + 0x0001bb68
|
|
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
|
|
Both the ModemManager daemon and the mmcli will now include `libmm-glib.h' only.
We also handle two new special `_LIBMM_INSIDE_MM' and `LIBMM_INSIDE_MMCLI'
symbols, which if included before the `libmm-glib.h' library allow us to:
* Don't include the libmm-glib high level API in the ModemManager daemon, as
the object names would clash with those in the core.
* Define some of the methods of helper objects to be included only if compiling
ModemManager daemon or the mmcli.
|
|
|
|
Implementations of the CDMA interface can either:
* Implement run_registration_checks()
or,
* Implement the sub-steps of the generic registration checks sequence
|
|
|
|
|
|
|
|
|
|
|
|
Following the same logic as in commit 9ddcf92a, those contexts in the interface
which contain the setup of a timeout are cleared before removing the DBus
skeleton objects, so that we make sure they are not fired out once these have
been disposed.
|
|
Modems which end up being found unusable (e.g. no SIM, fatal SIM error, no
capabilities) will be exposed in DBus, but just with the Modem interface and
in a FAILED state which allows no actions.
|
|
|
|
We need to define a state to be used while the modem is being initialized, so
that we forbid any operation on the modem on already exported interfaces, while
there are interfaces pending to get exported.
This Initializing state will also cover the state between having the SIM
unlocked (which launches re-initialization) and being completely initialized.
|
|
* mm_base_modem_peek_port_* () will return either a port object (no new
reference), or NULL if none available.
You would usually peek() a port if you're going to use it just in the current
method, as there is no way to that reference to get invalid (we're single
threaded).
* mm_base_modem_get_port_* () will return either NEW references to valid
port objects, or NULL if none available.
And, you would usually get() a port, whenever you want the port object to be
valid even out of the current method, for example when keeping it in the
context of an async operation.
Also, we need to consider that the primary AT port MAY BE NULL when you
peek() or get() it. This is due to the fact that we may be releasing ports
(due to device disconnection) in the middle of async operations.
|
|
Renamed `MMCommonSimpleProperties' to `MMSimpleStatus', and removed the
`MMSimpleStatusProperties' provided in libmm-glib. We'll just use the original
one from libmm-common always.
|
|
Use `MMModemStateChangeReason' instead.
|
|
|
|
They will all get it themselves.
|
|
|
|
|
|
Seems like an unnecessary complication, as the client anyway needs to handle
asynchronously reported errors.
|
|
|
|
|
|
This will really not be like the 3GPP method. In 3GPP we can request to do
auto-registration, or request to lock to a specific Operator. Once that done,
we wait for unsolicited registration messages and also perform peridic
registration checks.
In the case of the CDMA network, the registration seems to be always automatic.
Therefore, this method to register in the CDMA network will just make sure that
we got registered, by waiting up to N seconds while doing periodic registration
checks.
|
|
|