diff --git a/src/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c b/src/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c index c7965133..9e32df3b 100644 --- a/src/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c +++ b/src/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c @@ -88,6 +88,7 @@ needs_qdu_and_mcfg_apps_version (MMIfaceModemFirmware *self) { guint vendor_id; guint product_id; + guint subsystem_vid; /* 0x105b is the T99W175 module, T99W175 supports QDU and requires MCFG+APPS version. * T99W265(0x0489:0xe0da ; 0x0489:0xe0db): supports QDU and requires MCFG+APPS version. @@ -95,7 +96,8 @@ needs_qdu_and_mcfg_apps_version (MMIfaceModemFirmware *self) */ vendor_id = mm_base_modem_get_vendor_id (MM_BASE_MODEM (self)); product_id = mm_base_modem_get_product_id (MM_BASE_MODEM (self)); - return (vendor_id == 0x105b || (vendor_id == 0x0489 && (product_id == 0xe0da || product_id == 0xe0db))); + subsystem_vid = mm_base_modem_get_subsystem_vendor_id (MM_BASE_MODEM (self)); + return (vendor_id == 0x105b || (vendor_id == 0x0489 && (product_id == 0xe0da || product_id == 0xe0db)) || subsystem_vid == 0x105b); } /*****************************************************************************/ @@ -582,7 +584,9 @@ mm_broadband_modem_mbim_foxconn_new (const gchar *device, const gchar **drivers, const gchar *plugin, guint16 vendor_id, - guint16 product_id) + guint16 product_id, + guint16 subsystem_vendor_id, + guint16 subsystem_device_id) { const gchar *carrier_config_mapping = NULL; @@ -598,6 +602,8 @@ mm_broadband_modem_mbim_foxconn_new (const gchar *device, 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, + MM_BASE_MODEM_SUBSYSTEM_DEVICE_ID, subsystem_device_id, /* MBIM bearer supports NET only */ MM_BASE_MODEM_DATA_NET_SUPPORTED, TRUE, MM_BASE_MODEM_DATA_TTY_SUPPORTED, FALSE, diff --git a/src/plugins/foxconn/mm-broadband-modem-mbim-foxconn.h b/src/plugins/foxconn/mm-broadband-modem-mbim-foxconn.h index e9535846..f384e3da 100644 --- a/src/plugins/foxconn/mm-broadband-modem-mbim-foxconn.h +++ b/src/plugins/foxconn/mm-broadband-modem-mbim-foxconn.h @@ -45,6 +45,8 @@ MMBroadbandModemMbimFoxconn *mm_broadband_modem_mbim_foxconn_new (const gchar * const gchar **driver, const gchar *plugin, guint16 vendor_id, - guint16 product_id); + guint16 product_id, + guint16 subsystem_vendor_id, + guint16 subsystem_device_id); #endif /* MM_BROADBAND_MODEM_MBIM_FOXCONN_H */ diff --git a/src/plugins/foxconn/mm-plugin-foxconn.c b/src/plugins/foxconn/mm-plugin-foxconn.c index c8a48c07..5188fcb8 100644 --- a/src/plugins/foxconn/mm-plugin-foxconn.c +++ b/src/plugins/foxconn/mm-plugin-foxconn.c @@ -74,7 +74,9 @@ create_modem (MMPlugin *self, drivers, mm_plugin_get_name (self), vendor, - product)); + product, + subsystem_vendor, + subsystem_device)); } #endif @@ -97,16 +99,22 @@ mm_plugin_create_foxconn (void) 0x0489, /* usb vid */ 0x105b, /* pci vid */ 0 }; + static const mm_uint16_pair subsystem_vendor_ids[] = { + {0x17cb, 0x105b }, /* QC VID, Foxconn Sub-VID*/ + {0x105b, 0x105b }, /* Foxconn VID, Foxconn Sub-VID*/ + {0, 0 } + }; return MM_PLUGIN ( g_object_new (MM_TYPE_PLUGIN_FOXCONN, - MM_PLUGIN_NAME, MM_MODULE_NAME, - MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems, - MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids, - MM_PLUGIN_ALLOWED_AT, TRUE, - MM_PLUGIN_ALLOWED_QCDM, TRUE, - MM_PLUGIN_ALLOWED_QMI, TRUE, - MM_PLUGIN_ALLOWED_MBIM, TRUE, + 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_AT, TRUE, + MM_PLUGIN_ALLOWED_QCDM, TRUE, + MM_PLUGIN_ALLOWED_QMI, TRUE, + MM_PLUGIN_ALLOWED_MBIM, TRUE, NULL)); }