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).
This commit is contained in:
Gaël PORTAY 2022-04-01 14:10:23 +02:00 committed by Richard Hughes
parent e22eaf0726
commit 9213a51d4a

View File

@ -934,6 +934,8 @@ fu_genesys_usbhub_device_setup(FuDevice *device, GError **error)
gint bonding = 0; gint bonding = 0;
self->fw_bank_addr[0] = 0x0000; self->fw_bank_addr[0] = 0x0000;
self->fw_bank_addr[1] = 0x8000; self->fw_bank_addr[1] = 0x8000;
if (fu_device_has_private_flag(device, FU_GENESYS_USBHUB_FLAG_HAS_PUBLIC_KEY))
self->extend_size = GL3523_PUBLIC_KEY_LEN + GL3523_SIG_LEN; self->extend_size = GL3523_PUBLIC_KEY_LEN + GL3523_SIG_LEN;
if (self->chip.revision == 50) { if (self->chip.revision == 50) {