telit: support QMI and MBIM modems
Vendor specific plugins that support QMI or MBIM based devices need to handle the creation of these modems themselves. https://bugs.freedesktop.org/show_bug.cgi?id=100372 Original patch by Aleksander Morgado.
This commit is contained in:

committed by
Aleksander Morgado

parent
eee6896648
commit
6de2d84af1
@@ -28,6 +28,15 @@
|
||||
#include "mm-common-telit.h"
|
||||
#include "mm-broadband-modem-telit.h"
|
||||
|
||||
|
||||
#if defined WITH_QMI
|
||||
# include "mm-broadband-modem-qmi.h"
|
||||
#endif
|
||||
|
||||
#if defined WITH_MBIM
|
||||
# include "mm-broadband-modem-mbim.h"
|
||||
#endif
|
||||
|
||||
G_DEFINE_TYPE (MMPluginTelit, mm_plugin_telit, MM_TYPE_PLUGIN)
|
||||
|
||||
MM_PLUGIN_DEFINE_MAJOR_VERSION
|
||||
@@ -44,6 +53,28 @@ create_modem (MMPlugin *self,
|
||||
GList *probes,
|
||||
GError **error)
|
||||
{
|
||||
#if defined WITH_QMI
|
||||
if (mm_port_probe_list_has_qmi_port (probes)) {
|
||||
mm_dbg ("QMI-powered Telit modem found...");
|
||||
return MM_BASE_MODEM (mm_broadband_modem_qmi_new (uid,
|
||||
drivers,
|
||||
mm_plugin_get_name (self),
|
||||
vendor,
|
||||
product));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined WITH_MBIM
|
||||
if (mm_port_probe_list_has_mbim_port (probes)) {
|
||||
mm_dbg ("MBIM-powered Telit 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_telit_new (uid,
|
||||
drivers,
|
||||
mm_plugin_get_name (self),
|
||||
@@ -56,7 +87,7 @@ create_modem (MMPlugin *self,
|
||||
G_MODULE_EXPORT MMPlugin *
|
||||
mm_plugin_create (void)
|
||||
{
|
||||
static const gchar *subsystems[] = { "tty", NULL };
|
||||
static const gchar *subsystems[] = { "tty", "net", "usb", NULL };
|
||||
/* Vendors: Telit */
|
||||
static const guint16 vendor_ids[] = { 0x1bc7, 0 };
|
||||
static const gchar *vendor_strings[] = { "telit", NULL };
|
||||
@@ -73,6 +104,8 @@ mm_plugin_create (void)
|
||||
MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids,
|
||||
MM_PLUGIN_ALLOWED_VENDOR_STRINGS, vendor_strings,
|
||||
MM_PLUGIN_ALLOWED_AT, TRUE,
|
||||
MM_PLUGIN_ALLOWED_QMI, TRUE,
|
||||
MM_PLUGIN_ALLOWED_MBIM, TRUE,
|
||||
MM_PLUGIN_CUSTOM_INIT, &custom_init,
|
||||
NULL));
|
||||
}
|
||||
|
Reference in New Issue
Block a user