diff options
author | Fanice.luo <1494617953@qq.com> | 2022-10-11 10:03:52 +0800 |
---|---|---|
committer | Aleksander Morgado <aleksandermj@chromium.org> | 2022-10-17 10:03:31 +0000 |
commit | 908ab3332856cbf3e60f0e3936c008f2028ead0d (patch) | |
tree | d2a321d37e79a55edeb81da477d38e8fa59374f0 | |
parent | 1ef46a68866743636883e710f856941058fda282 (diff) |
foxconn: updating the T77W968 requires MCFG+APPS version
updating T77W968(0x413c:0x81d7 ; 0x413c:0x81e0 ; 0x413c:0x81e4 ;
0x413c:0x81e6): supports FASTBOOT and QMI PDC, and requires MCFG+APPS
version.
-rw-r--r-- | plugins/foxconn/mm-broadband-modem-mbim-foxconn.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c b/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c index f2b875c2..cec1c617 100644 --- a/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c +++ b/plugins/foxconn/mm-broadband-modem-mbim-foxconn.c @@ -97,6 +97,31 @@ needs_qdu_and_mcfg_apps_version (MMIfaceModemFirmware *self) return (vendor_id == 0x105b || (vendor_id == 0x0489 && (product_id == 0xe0da || product_id == 0xe0db))); } +/*****************************************************************************/ +/* Need APPS version for the development of different functions when T77W968 support FASTBOOT and QMI PDC. + * Such as: T77W968.F1.0.0.5.2.GC.013.037 and T77W968.F1.0.0.5.2.GC.013.049, the MCFG version(T77W968.F1.0.0.5.2.GC.013) is same, + * but the APPS version(037 and 049) is different. + * + * For T77W968.F1.0.0.5.2.GC.013.049, before the change, "fwupdmgr get-devices" can obtain Current version is T77W968.F1.0.0.5.2.GC.013, + * it only include the MCFG version. + * After add need APPS version, it shows Current version is T77W968.F1.0.0.5.2.GC.013.049, including the MCFG+APPS version. + */ + +static gboolean +needs_fastboot_and_qmi_pdc_mcfg_apps_version (MMIfaceModemFirmware *self) +{ + guint vendor_id; + guint product_id; + + /* T77W968(0x413c:0x81d7 ; 0x413c:0x81e0 ; 0x413c:0x81e4 ; 0x413c:0x81e6): supports FASTBOOT and QMI PDC, + * and requires MCFG+APPS version. + * else support FASTBOOT and QMI PDC, and require only MCFG version. + */ + 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 == 0x413c && (product_id == 0x81d7 || product_id == 0x81e0 || product_id == 0x81e4 || product_id == 0x81e6)); +} + static MMFirmwareUpdateSettings * create_update_settings (MMIfaceModemFirmware *self, const gchar *version_str) @@ -214,7 +239,7 @@ mbim_port_allocate_qmi_client_ready (MMPortMbim *mbim, input = qmi_message_dms_foxconn_get_firmware_version_input_new (); qmi_message_dms_foxconn_get_firmware_version_input_set_version_type (input, - (needs_qdu_and_mcfg_apps_version (self) ? + ((needs_qdu_and_mcfg_apps_version (self) || needs_fastboot_and_qmi_pdc_mcfg_apps_version (self)) ? QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG_APPS: QMI_DMS_FOXCONN_FIRMWARE_VERSION_TYPE_FIRMWARE_MCFG), NULL); |