[PATCH] libqmi-glib: use ((guint64) 1) << 31 for QMI_*_LTE_BAND_*_EUTRAN_32
Reinhard Speyerer
rspmn at arcor.de
Tue Aug 20 20:19:10 UTC 2019
The current definitions of QMI_*_LTE_BAND_*_EUTRAN_32 get converted to a
negative value (0xffffffff80000000) which causes side effects like the
incorrect ModemManager to QMI band mapping in
https://lists.freedesktop.org/archives/modemmanager-devel/2019-August/007371.html
.
Replace 1 << 31 with ((guint64) 1) << 31 for QMI_*_LTE_BAND_*_EUTRAN_32
to avoid this.
Reported-by: Nick <mips171 at icloud.com>
Signed-off-by: Reinhard Speyerer <rspmn at arcor.de>
---
diff --git a/src/libqmi-glib/qmi-flags64-dms.h b/src/libqmi-glib/qmi-flags64-dms.h
index d74e61f..644789a 100644
--- a/src/libqmi-glib/qmi-flags64-dms.h
+++ b/src/libqmi-glib/qmi-flags64-dms.h
@@ -206,7 +206,7 @@ typedef enum {
QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_29 = 1 << 28,
QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_30 = 1 << 29,
QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_31 = 1 << 30,
- QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_32 = 1 << 31,
+ QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_32 = ((guint64) 1) << 31,
QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_33 = ((guint64) 1) << 32,
QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_34 = ((guint64) 1) << 33,
QMI_DMS_LTE_BAND_CAPABILITY_EUTRAN_35 = ((guint64) 1) << 34,
diff --git a/src/libqmi-glib/qmi-flags64-nas.h b/src/libqmi-glib/qmi-flags64-nas.h
index c3541cd..7f57df2 100644
--- a/src/libqmi-glib/qmi-flags64-nas.h
+++ b/src/libqmi-glib/qmi-flags64-nas.h
@@ -210,7 +210,7 @@ typedef enum {
QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_29 = 1 << 28,
QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_30 = 1 << 29,
QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_31 = 1 << 30,
- QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_32 = 1 << 31,
+ QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_32 = ((guint64) 1) << 31,
QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_33 = ((guint64) 1) << 32,
QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_34 = ((guint64) 1) << 33,
QMI_NAS_LTE_BAND_PREFERENCE_EUTRAN_35 = ((guint64) 1) << 34,
More information about the libqmi-devel
mailing list