foxconn: add support for the T99W175 module

0x0489 is the vendor ID of T77W968, 0x105b is the vendor ID of T99W175.
{0x105b, 0xe0b0},{0x105b, 0xe0b1} is T99W175 PCI device, used by Dell.
{0x105b, 0xe0ab} is T99W175 PCI device, used by Lenovo.

If the modem has an mbim port, create a MbimFoxconn object, regardless
of what the product ID is.

The firmware version format in the T99W175 was selected to have
firmware version + carrier config version + apps version.
This commit is contained in:
Freedom Liu
2021-04-29 00:58:35 +00:00
parent c31488608a
commit 47ea5c98f4
2 changed files with 22 additions and 22 deletions
@@ -137,10 +137,17 @@ firmware_load_update_settings (MMIfaceModemFirmware *self,
}
input = qmi_message_dms_foxconn_get_firmware_version_input_new ();
qmi_message_dms_foxconn_get_firmware_version_input_set_version_type (
input,
QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG,
NULL);
/* 0x105b is the T99W175 module, T99W175 needs to compare the apps version. */
if (mm_base_modem_get_vendor_id (MM_BASE_MODEM (self)) == 0x105b)
qmi_message_dms_foxconn_get_firmware_version_input_set_version_type (
input,
QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS,
NULL);
else
qmi_message_dms_foxconn_get_firmware_version_input_set_version_type (
input,
QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG,
NULL);
qmi_client_dms_foxconn_get_firmware_version (
QMI_CLIENT_DMS (client),
input,
+11 -18
View File
@@ -66,22 +66,12 @@ create_modem (MMPlugin *self,
#if defined WITH_MBIM
if (mm_port_probe_list_has_mbim_port (probes)) {
/* Specific implementation for the T77W968 */
if (product == 0xe0b4 || product == 0xe0b5) {
mm_obj_dbg (self, "MBIM-powered T77W968 modem found...");
return MM_BASE_MODEM (mm_broadband_modem_mbim_foxconn_new (uid,
drivers,
mm_plugin_get_name (self),
vendor,
product));
}
mm_obj_dbg (self, "MBIM-powered Foxconn-branded modem found...");
return MM_BASE_MODEM (mm_broadband_modem_mbim_new (uid,
drivers,
mm_plugin_get_name (self),
vendor,
product));
return MM_BASE_MODEM (mm_broadband_modem_mbim_foxconn_new (uid,
drivers,
mm_plugin_get_name (self),
vendor,
product));
}
#endif
@@ -98,14 +88,17 @@ create_modem (MMPlugin *self,
G_MODULE_EXPORT MMPlugin *
mm_plugin_create (void)
{
static const gchar *subsystems[] = { "tty", "net", "usbmisc", NULL };
static const guint16 vendors[] = { 0x0489, 0 };
static const gchar *subsystems[] = { "tty", "net", "usbmisc", "wwan", NULL };
static const guint16 vendor_ids[] = {
0x0489, /* usb vid */
0x105b, /* pci vid */
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, vendors,
MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids,
MM_PLUGIN_ALLOWED_AT, TRUE,
MM_PLUGIN_ALLOWED_QCDM, TRUE,
MM_PLUGIN_ALLOWED_QMI, TRUE,