aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-04-06 22:58:08 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-04-17 15:19:38 +0200
commitcbee87f2f54b928dafb6a099b3ec2521d8658440 (patch)
tree9ef6ab7ef1b71ef50c92399edb81a09c7e227bd3
parent76ed80e1c98166ffe1f6ae4f49baf335c3e0f8a1 (diff)
iface-modem: let the MBIM port be the primary one
-rw-r--r--src/mm-iface-modem.c10
1 files changed, 6 insertions, 4 deletions
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));