提交 17d413b2 编写于 作者: L Leonid Iziumtsev 提交者: Joe Hershberger

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: NLeonid Iziumtsev <leonid.iziumtsev@se.atlascopco.com>
Acked-by: NJoe Hershberger <joe.hershberger@ni.com>
上级 b321c44a
......@@ -683,7 +683,7 @@ int net_start_again(void)
retry_forever = 0;
}
if ((!retry_forever) && (net_try_count >= retrycnt)) {
if ((!retry_forever) && (net_try_count > retrycnt)) {
eth_halt();
net_set_state(NETLOOP_FAIL);
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册