From 81482c3ba7ade63f53204b2588bd197c5b779cc6 Mon Sep 17 00:00:00 2001 From: Jason Gerecke Date: Thu, 17 Jun 2021 09:02:01 -0700 Subject: [PATCH] wacom-usb: Legacy Bluetooth module reports version numbers in little-endian While the modern firmware interfaces report their version numbers in big-endian form, reading the legacy Bluetooth module version via the FU_WAC_REPORT_ID_GET_FIRMWARE_VERSION_BLUETOOTH report requires us to actually parse a little-endian value. This difference was overlooked when making changes to the version parsing code in commit 50a4ec70e6a8. This commit restores the proper interpretation. Fixes: 50a4ec70e6a8 (wacom_usb: Firmware versions are packed BCD, not "decimal") --- plugins/wacom-usb/fu-wac-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wacom-usb/fu-wac-device.c b/plugins/wacom-usb/fu-wac-device.c index a397753e7..30680b295 100644 --- a/plugins/wacom-usb/fu-wac-device.c +++ b/plugins/wacom-usb/fu-wac-device.c @@ -654,7 +654,7 @@ fu_wac_device_add_modules_bluetooth (FuWacDevice *self, GError **error) } if (!fu_common_read_uint16_safe (buf, sizeof(buf), 1, &fw_ver, - G_BIG_ENDIAN, error)) + G_LITTLE_ENDIAN, error)) return FALSE; version = fu_common_version_from_uint16 (fw_ver, FWUPD_VERSION_FORMAT_BCD);