From cbee87f2f54b928dafb6a099b3ec2521d8658440 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Sat, 6 Apr 2013 22:58:08 +0200 Subject: iface-modem: let the MBIM port be the primary one --- src/mm-iface-modem.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index 83c184d0..cc12ef34 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -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_primary (MM_BASE_MODEM (ctx->self))); -#else - primary = MM_PORT (mm_base_modem_peek_port_primary (MM_BASE_MODEM (ctx->self))); + 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))); g_assert (primary != NULL); mm_gdbus_modem_set_primary_port (ctx->skeleton, mm_port_get_device (primary)); -- cgit v1.2.3-70-g09d2