From c2ee73173e77b57108e52a09bfecadef19ae13a8 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 17 Jun 2020 14:26:58 +0200 Subject: cinterion: allow MBIM-powered devices Like the mPLS62-w when setup to be controlled in MBIM mode instead of plain AT commands. --- plugins/cinterion/mm-plugin-cinterion.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'plugins/cinterion/mm-plugin-cinterion.c') diff --git a/plugins/cinterion/mm-plugin-cinterion.c b/plugins/cinterion/mm-plugin-cinterion.c index 5fdd48b5..f2eb5d73 100644 --- a/plugins/cinterion/mm-plugin-cinterion.c +++ b/plugins/cinterion/mm-plugin-cinterion.c @@ -35,6 +35,10 @@ #include "mm-broadband-modem-qmi-cinterion.h" #endif +#if defined WITH_MBIM +#include "mm-broadband-modem-mbim.h" +#endif + G_DEFINE_TYPE (MMPluginCinterion, mm_plugin_cinterion, MM_TYPE_PLUGIN) MM_PLUGIN_DEFINE_MAJOR_VERSION @@ -124,6 +128,17 @@ create_modem (MMPlugin *self, } #endif +#if defined WITH_MBIM + if (mm_port_probe_list_has_mbim_port (probes)) { + mm_obj_dbg (self, "MBIM-powered Cinterion modem found..."); + return MM_BASE_MODEM (mm_broadband_modem_mbim_new (uid, + drivers, + mm_plugin_get_name (self), + vendor, + product)); + } +#endif + return MM_BASE_MODEM (mm_broadband_modem_cinterion_new (uid, drivers, mm_plugin_get_name (self), @@ -182,6 +197,7 @@ mm_plugin_create (void) MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids, MM_PLUGIN_ALLOWED_AT, TRUE, MM_PLUGIN_ALLOWED_QMI, TRUE, + MM_PLUGIN_ALLOWED_MBIM, TRUE, MM_PLUGIN_CUSTOM_INIT, &custom_init, NULL)); } -- cgit v1.2.3-70-g09d2