[PATCH 2/3] net: tftp: Fix store_block offset calculation
Tom Rini
trini at konsulko.com
Thu Oct 1 16:09:52 CEST 2020
On Tue, Aug 25, 2020 at 10:26:36AM +0800, Ley Foon Tan wrote:
> tftp_cur_block start with 1 for first block, but tftp_cur_block counter is
> start with zero when block number is rollover. The existing code
> "tftp_cur_block - 1" will cause the block number become -1 in store_block()
> when tftp_cur_block is 0 when tftp_cur_block is rollover.
>
> The fix pass in tftp_cur_block to store_block() and minus the
> tftp_block_size when do the offset calculation.
>
> Signed-off-by: Ley Foon Tan <ley.foon.tan at intel.com>
> Reviewed-By: Ramon Fried <rfried.dev at gmail.com>
Applied to u-boot/next, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20201001/d1f3d5dc/attachment.sig>
More information about the U-Boot
mailing list