summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-02-09 08:28:01 -0600
committerTom Rini <[email protected]>2026-02-09 08:28:01 -0600
commitd395ea73dc2814a2ec5b309e90df8c618d89ede0 (patch)
tree76a16705818b2e5ae7bae3e7cc4010f96a32a100 /common
parent42b3ee7fa5248ad89467aaf2585f4a08aedd4731 (diff)
parente7b83e64d6bc9f2366669118cb596d75f811eb89 (diff)
Merge tag 'net-20260209' of https://source.denx.de/u-boot/custodians/u-boot-net
Pull request net-20260209. net: - airoha: mdio support for the switch - phy: mscc: allow RGMII with internal delay for the VSC8541 - dwc_eth_qos: Update tail pointer handling net-legacy: - Stop conflating return value with file size in net_loop() net-lwip: - wget: rework the '#' printing - tftp: add support of tsize option to client
Diffstat (limited to 'common')
-rw-r--r--common/update.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/update.c b/common/update.c
index 6801b49479d..0bafffede9e 100644
--- a/common/update.c
+++ b/common/update.c
@@ -32,7 +32,7 @@ static uchar *saved_prot_info;
#endif
static int update_load(char *filename, ulong msec_max, int cnt_max, ulong addr)
{
- int size, rv;
+ int rv;
ulong saved_timeout_msecs;
int saved_timeout_count;
char *saved_netretry, *saved_bootfile;
@@ -54,12 +54,12 @@ static int update_load(char *filename, ulong msec_max, int cnt_max, ulong addr)
/* download the update file */
image_load_addr = addr;
copy_filename(net_boot_file_name, filename, sizeof(net_boot_file_name));
- size = net_loop(TFTPGET);
+ rv = net_loop(TFTPGET);
- if (size < 0)
+ if (rv < 0)
rv = 1;
- else if (size > 0)
- flush_cache(addr, size);
+ else
+ flush_cache(addr, net_boot_file_size);
/* restore changed globals and env variable */
tftp_timeout_ms = saved_timeout_msecs;