diff options
author | Freedom Liu <tianyu28658@gmail.com> | 2021-10-15 11:50:52 +0800 |
---|---|---|
committer | Freedom Liu <tianyu28658@gmail.com> | 2021-10-15 14:05:27 +0800 |
commit | f5ab3c4678247e8eade0e8ff0a812d6b1e1c569d (patch) | |
tree | 9f141283cc8bace3b9dbe1ad26dbeec3f70aa42f | |
parent | a1e6f911dd20eeca91a864e42d3458549c4cc36a (diff) |
foxconn: add T99W265 modules, support for QDU.
-rw-r--r-- | plugins/foxconn/mm-broadband-modem-mbim-foxconn.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c b/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c index ee160113..a927a525 100644 --- a/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c +++ b/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c @@ -146,6 +146,8 @@ foxconn_get_firmware_version_ready (QmiClientDms *client, MMFirmwareUpdateSettings *update_settings = NULL; const gchar *str; MMIfaceModemFirmware *self; + guint vendor_id; + guint product_id; output = qmi_client_dms_foxconn_get_firmware_version_finish (client, res, &error); if (!output || !qmi_message_dms_foxconn_get_firmware_version_output_get_result (output, &error)) @@ -153,10 +155,13 @@ foxconn_get_firmware_version_ready (QmiClientDms *client, /* Create update settings now: * 0x105b is the T99W175 module, T99W175 supports QDU, + * T99W265(0x0489:0xe0da ; 0x0489:0xe0db): supports QDU * else support FASTBOOT and QMI PDC. */ self = g_task_get_source_object (task); - if (mm_base_modem_get_vendor_id (MM_BASE_MODEM (self)) == 0x105b) + vendor_id = mm_base_modem_get_vendor_id (MM_BASE_MODEM (self)); + product_id = mm_base_modem_get_product_id (MM_BASE_MODEM (self)); + if (vendor_id == 0x105b || (vendor_id == 0x0489 && (product_id == 0xe0da || product_id == 0xe0db))) update_settings = mm_firmware_update_settings_new (MM_MODEM_FIRMWARE_UPDATE_METHOD_MBIM_QDU); else { update_settings = mm_firmware_update_settings_new (MM_MODEM_FIRMWARE_UPDATE_METHOD_FASTBOOT | @@ -187,6 +192,8 @@ firmware_load_update_settings (MMIfaceModemFirmware *self, GTask *task; QmiMessageDmsFoxconnGetFirmwareVersionInput *input = NULL; QmiClient *client = NULL; + guint vendor_id; + guint product_id; task = g_task_new (self, NULL, callback, user_data); @@ -201,9 +208,11 @@ firmware_load_update_settings (MMIfaceModemFirmware *self, return; } + vendor_id = mm_base_modem_get_vendor_id (MM_BASE_MODEM (self)); + product_id = mm_base_modem_get_product_id (MM_BASE_MODEM (self)); input = qmi_message_dms_foxconn_get_firmware_version_input_new (); - /* 0x105b is the T99W175 module, T99W175 needs to compare the apps version. */ - if (mm_base_modem_get_vendor_id (MM_BASE_MODEM (self)) == 0x105b) + /* 0x105b is the T99W175 module, T99W175/T99W265 need to compare the apps version. */ + if (vendor_id == 0x105b || (vendor_id == 0x0489 && (product_id == 0xe0da || product_id == 0xe0db))) qmi_message_dms_foxconn_get_firmware_version_input_set_version_type ( input, QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS, |