summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinhard Speyerer <rspmn@arcor.de>2016-03-25 16:40:09 +0100
committerAleksander Morgado <aleksander@aleksander.es>2016-03-25 19:27:09 +0100
commitcf7b2ab6c8af839d73f623c8c86abc07f883313c (patch)
treeaf5b29cd7b0904c933a6778ab08b9937889de719
parent62f4536aaba5cd530c89b4275761e5f3f021daf5 (diff)
libqmi-glib: use ((guint64) 1) << 31 for QMI_*_BAND_CAPABILITY_BC_15
The current definition of QMI_*_BAND_CAPABILITY_BC_15 gets converted to a negative value (0xffffffff80000000) which causes false positives for BC15 to be returned from dms_add_qmi_bands() and nas_add_qmi_bands() in ModemManager/src/mm-modem-helpers-qmi.c when a matching QMI band (e.g. WCDMA900) is present in qmi_bands like in this example https://lists.freedesktop.org/archives/libqmi-devel/2016-March/001572.html . Replace 1 << 31 with ((guint64) 1) << 31 for QMI_*_BAND_CAPABILITY_BC_15 to avoid incorrect mmcli "Bands | supported: 'cdma-bc15-aws, ...'" output. Signed-off-by: Reinhard Speyerer <rspmn@arcor.de> (cherry picked from commit 0f7849ce05f3e26283652c20e5392161c1cfeeaf)
-rw-r--r--src/libqmi-glib/qmi-flags64-dms.h2
-rw-r--r--src/libqmi-glib/qmi-flags64-nas.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libqmi-glib/qmi-flags64-dms.h b/src/libqmi-glib/qmi-flags64-dms.h
index 678b829..b416569 100644
--- a/src/libqmi-glib/qmi-flags64-dms.h
+++ b/src/libqmi-glib/qmi-flags64-dms.h
@@ -111,7 +111,7 @@ typedef enum {
QMI_DMS_BAND_CAPABILITY_BC_12 = 1 << 28,
QMI_DMS_BAND_CAPABILITY_BC_14 = 1 << 29,
/* Bit 30 reserved */
- QMI_DMS_BAND_CAPABILITY_BC_15 = 1 << 31,
+ QMI_DMS_BAND_CAPABILITY_BC_15 = ((guint64) 1) << 31,
/* Bits 32-47 reserved */
QMI_DMS_BAND_CAPABILITY_WCDMA_2600 = ((guint64) 1) << 48,
QMI_DMS_BAND_CAPABILITY_WCDMA_900 = ((guint64) 1) << 49,
diff --git a/src/libqmi-glib/qmi-flags64-nas.h b/src/libqmi-glib/qmi-flags64-nas.h
index b76f8f2..ef0c621 100644
--- a/src/libqmi-glib/qmi-flags64-nas.h
+++ b/src/libqmi-glib/qmi-flags64-nas.h
@@ -108,7 +108,7 @@ typedef enum {
QMI_NAS_BAND_PREFERENCE_BC_12 = 1 << 28,
QMI_NAS_BAND_PREFERENCE_BC_14 = 1 << 29,
/* Bit 30 reserved */
- QMI_NAS_BAND_PREFERENCE_BC_15 = 1 << 31,
+ QMI_NAS_BAND_PREFERENCE_BC_15 = ((guint64) 1) << 31,
/* Bits 32-47 reserved */
QMI_NAS_BAND_PREFERENCE_WCDMA_2600 = ((guint64) 1) << 48,
QMI_NAS_BAND_PREFERENCE_WCDMA_900 = ((guint64) 1) << 49,