iface-modem: let the MBIM port be the primary one

This commit is contained in:
Aleksander Morgado
2013-04-17 15:19:38 +02:00
parent 76ed80e1c9
commit cbee87f2f5
+6 -4
View File
@@ -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));