]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwboot: Fix sending retry of last header packet
authorPali Rohár <pali@kernel.org>
Wed, 27 Oct 2021 18:56:58 +0000 (20:56 +0200)
committerStefan Roese <sr@denx.de>
Wed, 3 Nov 2021 05:45:27 +0000 (06:45 +0100)
commit7621f82f91dec2a8778b467af2fec0d6b3bab2b1
tree6b1586a3d021aa897e859180bad37c14ca813826
parentec4048274287f533e9141ba54c85bbd0f486cae5
tools: kwboot: Fix sending retry of last header packet

After the trasfer of last header packet, it is possible that baudrate
change pattern is received, and also that NAK byte is received so that
the packet should be sent again.

Thus we should not clear the baudrate change state when sending retry
of that packet.

Move code for initializing state variables from kwboot_xm_recv_reply()
to kwboot_xm_sendblock().

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
tools/kwboot.c