telit: add wwan support

This commit is contained in:
Daniele Palmas
2022-05-04 14:26:53 +02:00
parent ce71b580fc
commit 1642c5e00f
3 changed files with 26 additions and 17 deletions

View File

@@ -136,14 +136,16 @@ mm_broadband_modem_mbim_telit_new (const gchar *device,
const gchar **drivers,
const gchar *plugin,
guint16 vendor_id,
guint16 product_id)
guint16 product_id,
guint16 subsystem_vendor_id)
{
return g_object_new (MM_TYPE_BROADBAND_MODEM_MBIM_TELIT,
MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id,
MM_BASE_MODEM_DEVICE, device,
MM_BASE_MODEM_DRIVERS, drivers,
MM_BASE_MODEM_PLUGIN, plugin,
MM_BASE_MODEM_VENDOR_ID, vendor_id,
MM_BASE_MODEM_PRODUCT_ID, product_id,
MM_BASE_MODEM_SUBSYSTEM_VENDOR_ID, subsystem_vendor_id,
/* MBIM bearer supports NET only */
MM_BASE_MODEM_DATA_NET_SUPPORTED, TRUE,
MM_BASE_MODEM_DATA_TTY_SUPPORTED, FALSE,

View File

@@ -42,6 +42,7 @@ MMBroadbandModemMbimTelit *mm_broadband_modem_mbim_telit_new (const gchar *devi
const gchar **drivers,
const gchar *plugin,
guint16 vendor_id,
guint16 product_id);
guint16 product_id,
guint16 subsystem_vendor_id);
#endif /* MM_BROADBAND_MODEM_TELIT_H */

View File

@@ -71,7 +71,8 @@ create_modem (MMPlugin *self,
drivers,
mm_plugin_get_name (self),
vendor,
product));
product,
subsystem_vendor));
}
#endif
@@ -87,9 +88,13 @@ create_modem (MMPlugin *self,
G_MODULE_EXPORT MMPlugin *
mm_plugin_create (void)
{
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
static const gchar *subsystems[] = { "tty", "net", "usbmisc", "wwan", NULL };
/* Vendors: Telit */
static const guint16 vendor_ids[] = { 0x1bc7, 0 };
static const mm_uint16_pair subsystem_vendor_ids[] = {
{ 0x17cb, 0x1c5d }, /* FN990 */
{ 0, 0 }
};
static const gchar *vendor_strings[] = { "telit", NULL };
/* Custom init for port identification */
static const MMAsyncMethod custom_init = {
@@ -99,14 +104,15 @@ mm_plugin_create (void)
return MM_PLUGIN (
g_object_new (MM_TYPE_PLUGIN_TELIT,
MM_PLUGIN_NAME, MM_MODULE_NAME,
MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
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,
MM_PLUGIN_NAME, MM_MODULE_NAME,
MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids,
MM_PLUGIN_ALLOWED_SUBSYSTEM_VENDOR_IDS, subsystem_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));
}