meta-digi-dey: Added libqmi patch to DMS version miss match.
This commit fixes an issue with the Quectel EC21/EC25 due to a wrong reported DMS version which will cause ModemManager not to read the SIM card. Signed-off-by: Mike Engel <Mike.Engel@digi.com> https://jira.digi.com/browse/DEL-3748
This commit is contained in:
parent
3877b2a59f
commit
a48e66c618
|
|
@ -0,0 +1,74 @@
|
||||||
|
From: Mike Engel <Mike.Engel@digi.com>
|
||||||
|
Date: Wed, 15 Mar 2017 18:20:25 +0100
|
||||||
|
Subject: [PATCH] meta-digi-dey: Added libqmi patch to DMS version miss match.
|
||||||
|
|
||||||
|
Signed-off-by: Mike Engel <Mike.Engel@digi.com>
|
||||||
|
---
|
||||||
|
.../src/libqmi-glib/qmi-device.c | 32 +++++++++++++++++-----
|
||||||
|
1 file changed, 25 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/libqmi-glib/qmi-device.c b/src/libqmi-glib/qmi-device.c
|
||||||
|
index 5cee156..ef636f0 100644
|
||||||
|
--- a/src/libqmi-glib/qmi-device.c
|
||||||
|
+++ b/src/libqmi-glib/qmi-device.c
|
||||||
|
@@ -485,8 +485,10 @@ check_message_supported (QmiDevice *self,
|
||||||
|
GError **error)
|
||||||
|
{
|
||||||
|
const QmiMessageCtlGetVersionInfoOutputServiceListService *info;
|
||||||
|
- guint major = 0;
|
||||||
|
- guint minor = 0;
|
||||||
|
+ guint message_major = 0;
|
||||||
|
+ guint message_minor = 0;
|
||||||
|
+ guint device_major = 0;
|
||||||
|
+ guint device_minor = 0;
|
||||||
|
|
||||||
|
/* If we didn't check supported services, just assume it is supported */
|
||||||
|
if (!self->priv->supported_services)
|
||||||
|
@@ -498,7 +500,7 @@ check_message_supported (QmiDevice *self,
|
||||||
|
|
||||||
|
/* If we cannot get in which version this message was introduced, we'll just
|
||||||
|
* assume it's supported */
|
||||||
|
- if (!qmi_message_get_version_introduced (message, &major, &minor))
|
||||||
|
+ if (!qmi_message_get_version_introduced (message, &message_major, &message_minor))
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
/* Get version info. It MUST exist because we allowed creating a client
|
||||||
|
@@ -506,18 +508,34 @@ check_message_supported (QmiDevice *self,
|
||||||
|
info = find_service_version_info (self, qmi_message_get_service (message));
|
||||||
|
g_assert (info != NULL);
|
||||||
|
g_assert (info->service == qmi_message_get_service (message));
|
||||||
|
+ device_major = info->major_version;
|
||||||
|
+ device_minor = info->minor_version;
|
||||||
|
+
|
||||||
|
+ /* Some device firmware versions (Quectel EC21) lie about their supported
|
||||||
|
+ * DMS version, so assume a reasonable DMS version if the WDS version is
|
||||||
|
+ * high enough */
|
||||||
|
+ if (info->service == QMI_SERVICE_DMS && device_major == 1 && device_minor == 0) {
|
||||||
|
+ const QmiMessageCtlGetVersionInfoOutputServiceListService *wds;
|
||||||
|
+
|
||||||
|
+ wds = find_service_version_info (self, QMI_SERVICE_WDS);
|
||||||
|
+ g_assert (wds != NULL);
|
||||||
|
+ if (wds->major_version >= 1 && wds->minor_version >= 9) {
|
||||||
|
+ device_major = 1;
|
||||||
|
+ device_minor = 3;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/* If the version of the message is greater than the version of the service,
|
||||||
|
* report unsupported */
|
||||||
|
- if (major > info->major_version ||
|
||||||
|
- (major == info->major_version &&
|
||||||
|
- minor > info->minor_version)) {
|
||||||
|
+ if (message_major > device_major ||
|
||||||
|
+ (message_major == device_major &&
|
||||||
|
+ message_minor > device_minor)) {
|
||||||
|
g_set_error (error,
|
||||||
|
QMI_CORE_ERROR,
|
||||||
|
QMI_CORE_ERROR_UNSUPPORTED,
|
||||||
|
"QMI service '%s' version '%u.%u' required, got version '%u.%u'",
|
||||||
|
qmi_service_get_string (qmi_message_get_service (message)),
|
||||||
|
- major, minor,
|
||||||
|
+ message_major, message_minor,
|
||||||
|
info->major_version,
|
||||||
|
info->minor_version);
|
||||||
|
return FALSE;
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Copyright (C) 2017 Digi International Inc.
|
||||||
|
|
||||||
|
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
|
||||||
|
|
||||||
|
SRC_URI += " \
|
||||||
|
file://0001-meta-digi-dey-Added-libqmi-patch-to-DMS-version-miss-match.patch \
|
||||||
|
"
|
||||||
|
|
||||||
Loading…
Reference in New Issue