]> git.sur5r.net Git - u-boot/commit
net: Fix netretry condition
authorLeonid Iziumtsev <leonid.iziumtsev@gmail.com>
Fri, 9 Mar 2018 14:29:06 +0000 (15:29 +0100)
committerJoe Hershberger <joe.hershberger@ni.com>
Thu, 22 Mar 2018 20:05:31 +0000 (15:05 -0500)
commit17d413b2531aa4bb2a97514f130bd520deee4ada
tree59742752bef03163035e7f0b5bdd2e7e26120273
parentb321c44ac9e2569fcc07def3e150fcfe4554a1b0
net: Fix netretry condition

The "net_try_count" counter starts from "1".
And the "retrycnt" contains requested amount of retries.

With current logic, that means that the actual retry amount
will be one time less then what we set in "netretry" env.
For example setting "netretry" to "once" will make "retrycnt"
equal "1", so no retries will be triggered at all.

Fix the logic by changing the statement of "if" condition.

Signed-off-by: Leonid Iziumtsev <leonid.iziumtsev@se.atlascopco.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
net/net.c