From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ramon Fried Date: Sat, 23 May 2020 20:59:53 +0300 Subject: [PATCH v4] net: tftp: Add client support for RFC 7440 In-Reply-To: References: <20200519192557.18075-1-rfried.dev@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, May 23, 2020 at 8:40 PM Matthias Brugger wrote: ... > > I think it makes more sense to check: > if (tftp_window_size_option > 1 && tftp_state == STATE_SEND_RRQ) > > Because I understand that the tftp_state will change while the > tftp_window_size_option is set or at compile time or through the environment. So > we can save the check of the tftp_state if we have the default value. > > Regards, > Matthias > The tftp_state can be only STATE_SEND_RRQ or STATE_SEND_WRQ and it's checked one time per transfer, it won't change in the middle of transfer. This code is run one time per transfer. Thanks, Ramon