foxconn: add T99W265 modules, support for QDU.
This commit is contained in:
@@ -146,6 +146,8 @@ foxconn_get_firmware_version_ready (QmiClientDms *client,
|
|||||||
MMFirmwareUpdateSettings *update_settings = NULL;
|
MMFirmwareUpdateSettings *update_settings = NULL;
|
||||||
const gchar *str;
|
const gchar *str;
|
||||||
MMIfaceModemFirmware *self;
|
MMIfaceModemFirmware *self;
|
||||||
|
guint vendor_id;
|
||||||
|
guint product_id;
|
||||||
|
|
||||||
output = qmi_client_dms_foxconn_get_firmware_version_finish (client, res, &error);
|
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))
|
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:
|
/* Create update settings now:
|
||||||
* 0x105b is the T99W175 module, T99W175 supports QDU,
|
* 0x105b is the T99W175 module, T99W175 supports QDU,
|
||||||
|
* T99W265(0x0489:0xe0da ; 0x0489:0xe0db): supports QDU
|
||||||
* else support FASTBOOT and QMI PDC.
|
* else support FASTBOOT and QMI PDC.
|
||||||
*/
|
*/
|
||||||
self = g_task_get_source_object (task);
|
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);
|
update_settings = mm_firmware_update_settings_new (MM_MODEM_FIRMWARE_UPDATE_METHOD_MBIM_QDU);
|
||||||
else {
|
else {
|
||||||
update_settings = mm_firmware_update_settings_new (MM_MODEM_FIRMWARE_UPDATE_METHOD_FASTBOOT |
|
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;
|
GTask *task;
|
||||||
QmiMessageDmsFoxconnGetFirmwareVersionInput *input = NULL;
|
QmiMessageDmsFoxconnGetFirmwareVersionInput *input = NULL;
|
||||||
QmiClient *client = NULL;
|
QmiClient *client = NULL;
|
||||||
|
guint vendor_id;
|
||||||
|
guint product_id;
|
||||||
|
|
||||||
task = g_task_new (self, NULL, callback, user_data);
|
task = g_task_new (self, NULL, callback, user_data);
|
||||||
|
|
||||||
@@ -201,9 +208,11 @@ firmware_load_update_settings (MMIfaceModemFirmware *self,
|
|||||||
return;
|
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 ();
|
input = qmi_message_dms_foxconn_get_firmware_version_input_new ();
|
||||||
/* 0x105b is the T99W175 module, T99W175 needs to compare the apps version. */
|
/* 0x105b is the T99W175 module, T99W175/T99W265 need to compare the apps version. */
|
||||||
if (mm_base_modem_get_vendor_id (MM_BASE_MODEM (self)) == 0x105b)
|
if (vendor_id == 0x105b || (vendor_id == 0x0489 && (product_id == 0xe0da || product_id == 0xe0db)))
|
||||||
qmi_message_dms_foxconn_get_firmware_version_input_set_version_type (
|
qmi_message_dms_foxconn_get_firmware_version_input_set_version_type (
|
||||||
input,
|
input,
|
||||||
QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS,
|
QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS,
|
||||||
|
Reference in New Issue
Block a user