diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2018-08-08 14:05:48 +0200 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2018-08-21 17:02:39 +0000 |
commit | 475e1828195ab12b3e1e8be127995328575edbb4 (patch) | |
tree | d1035daf213046a2c5dc65b03a8cfdaaa8b5a980 | |
parent | da046fe566295a50b00d235843640cf403b1319f (diff) | |
download | ModemManager-475e1828195ab12b3e1e8be127995328575edbb4.tar.gz |
fibocom: support XMM-based devices
-rw-r--r-- | plugins/Makefile.am | 3 | ||||
-rw-r--r-- | plugins/fibocom/mm-plugin-fibocom.c | 21 |
2 files changed, 23 insertions, 1 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index cf6680008..04423d7d8 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -1043,8 +1043,9 @@ libmm_plugin_fibocom_la_SOURCES = \ fibocom/mm-plugin-fibocom.c \ fibocom/mm-plugin-fibocom.h \ $(NULL) -libmm_plugin_fibocom_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) +libmm_plugin_fibocom_la_CPPFLAGS = $(PLUGIN_COMMON_COMPILER_FLAGS) $(XMM_COMMON_COMPILER_FLAGS) libmm_plugin_fibocom_la_LDFLAGS = $(PLUGIN_COMMON_LINKER_FLAGS) +libmm_plugin_fibocom_la_LIBADD = $(XMM_COMMON_LIBADD_FLAGS) ################################################################################ # udev rules tester diff --git a/plugins/fibocom/mm-plugin-fibocom.c b/plugins/fibocom/mm-plugin-fibocom.c index 184dd622e..d41dc6aeb 100644 --- a/plugins/fibocom/mm-plugin-fibocom.c +++ b/plugins/fibocom/mm-plugin-fibocom.c @@ -22,9 +22,11 @@ #include "mm-log.h" #include "mm-plugin-fibocom.h" #include "mm-broadband-modem.h" +#include "mm-broadband-modem-xmm.h" #if defined WITH_MBIM #include "mm-broadband-modem-mbim.h" +#include "mm-broadband-modem-mbim-xmm.h" #endif G_DEFINE_TYPE (MMPluginFibocom, mm_plugin_fibocom, MM_TYPE_PLUGIN) @@ -45,6 +47,14 @@ create_modem (MMPlugin *self, { #if defined WITH_MBIM if (mm_port_probe_list_has_mbim_port (probes)) { + if (mm_port_probe_list_is_xmm (probes)) { + mm_dbg ("MBIM-powered XMM-based Fibocom modem found..."); + return MM_BASE_MODEM (mm_broadband_modem_mbim_xmm_new (uid, + drivers, + mm_plugin_get_name (self), + vendor, + product)); + } mm_dbg ("MBIM-powered Fibocom modem found..."); return MM_BASE_MODEM (mm_broadband_modem_mbim_new (uid, drivers, @@ -54,6 +64,16 @@ create_modem (MMPlugin *self, } #endif + if (mm_port_probe_list_is_xmm (probes)) { + mm_dbg ("XMM-based Fibocom modem found..."); + return MM_BASE_MODEM (mm_broadband_modem_xmm_new (uid, + drivers, + mm_plugin_get_name (self), + vendor, + product)); + } + + mm_dbg ("Fibocom modem found..."); return MM_BASE_MODEM (mm_broadband_modem_new (uid, drivers, mm_plugin_get_name (self), @@ -78,6 +98,7 @@ mm_plugin_create (void) MM_PLUGIN_ALLOWED_DRIVERS, drivers, MM_PLUGIN_ALLOWED_AT, TRUE, MM_PLUGIN_ALLOWED_MBIM, TRUE, + MM_PLUGIN_XMM_PROBE, TRUE, NULL)); } |