From 9213a51d4a8010989bf46abce35eaca9ee99697c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20PORTAY?= Date: Fri, 1 Apr 2022 14:10:23 +0200 Subject: [PATCH] genesys: usbhub: Set extended size for devices with public-key only This conditionizes the extended size for devices that has public-key support (i.e. has the private flag has-public-key; GL3523 only). --- plugins/genesys/fu-genesys-usbhub-device.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/genesys/fu-genesys-usbhub-device.c b/plugins/genesys/fu-genesys-usbhub-device.c index 1c8a8288a..94f0273be 100644 --- a/plugins/genesys/fu-genesys-usbhub-device.c +++ b/plugins/genesys/fu-genesys-usbhub-device.c @@ -934,7 +934,9 @@ fu_genesys_usbhub_device_setup(FuDevice *device, GError **error) gint bonding = 0; self->fw_bank_addr[0] = 0x0000; self->fw_bank_addr[1] = 0x8000; - self->extend_size = GL3523_PUBLIC_KEY_LEN + GL3523_SIG_LEN; + + if (fu_device_has_private_flag(device, FU_GENESYS_USBHUB_FLAG_HAS_PUBLIC_KEY)) + self->extend_size = GL3523_PUBLIC_KEY_LEN + GL3523_SIG_LEN; if (self->chip.revision == 50) { self->fw_data_total_count = 0x8000;