bluetooth: cyw43xxx: support newer PatchRAM files

The CYW43xxx for Infineon Controllers stops after the first LauncRAM
command. Newer Controllers like the CYW5557x update the firmware in
multiple stages, which is supported by this commit.

Signed-off-by: Matthias Ringwald <matthias@ringwald.ch>
This commit is contained in:
Matthias Ringwald 2024-03-29 12:51:43 +01:00 committed by Dan Kalowsky
commit b67b5c5dc1

View file

@ -189,6 +189,7 @@ static int bt_firmware_download(const uint8_t *firmware_image, uint32_t size)
switch (op_code) {
case BT_HCI_VND_OP_WRITE_RAM:
case BT_HCI_VND_OP_LAUNCH_RAM:
/* Update remaining length and data pointer:
* content of data length + 2 bytes of opcode and 1 byte of data length.
*/
@ -196,10 +197,6 @@ static int bt_firmware_download(const uint8_t *firmware_image, uint32_t size)
remaining_length -= data_length + 3;
break;
case BT_HCI_VND_OP_LAUNCH_RAM:
remaining_length = 0;
break;
default:
return -ENOMEM;
}