iface-modem: let the MBIM port be the primary one
This commit is contained in:
@@ -3728,15 +3728,17 @@ interface_initialization_step (InitializationContext *ctx)
|
||||
}
|
||||
/* Load primary port if not done before */
|
||||
if (!mm_gdbus_modem_get_primary_port (ctx->skeleton)) {
|
||||
MMPort *primary;
|
||||
MMPort *primary = NULL;
|
||||
|
||||
#if defined WITH_QMI
|
||||
primary = MM_PORT (mm_base_modem_peek_port_qmi (MM_BASE_MODEM (ctx->self)));
|
||||
#endif
|
||||
#if defined WITH_MBIM
|
||||
if (!primary)
|
||||
primary = MM_PORT (mm_base_modem_peek_port_mbim (MM_BASE_MODEM (ctx->self)));
|
||||
#endif
|
||||
if (!primary)
|
||||
primary = MM_PORT (mm_base_modem_peek_port_primary (MM_BASE_MODEM (ctx->self)));
|
||||
#else
|
||||
primary = MM_PORT (mm_base_modem_peek_port_primary (MM_BASE_MODEM (ctx->self)));
|
||||
#endif
|
||||
|
||||
g_assert (primary != NULL);
|
||||
mm_gdbus_modem_set_primary_port (ctx->skeleton, mm_port_get_device (primary));
|
||||
|
||||
Reference in New Issue
Block a user