net: dhcpv4: Refactor because of timeout overhaul
Convert minimal parts to support k_timeout_t values. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
406bdb1fc6
commit
76d07ccd00
1 changed files with 2 additions and 2 deletions
|
@ -405,7 +405,7 @@ fail:
|
|||
static void dhcpv4_update_timeout_work(u32_t timeout)
|
||||
{
|
||||
if (!k_delayed_work_remaining_get(&timeout_work) ||
|
||||
K_SECONDS(timeout) <
|
||||
(MSEC_PER_SEC * timeout) <
|
||||
k_delayed_work_remaining_get(&timeout_work)) {
|
||||
k_delayed_work_cancel(&timeout_work);
|
||||
k_delayed_work_submit(&timeout_work, K_SECONDS(timeout));
|
||||
|
@ -427,7 +427,7 @@ static void dhcpv4_enter_selecting(struct net_if *iface)
|
|||
|
||||
static bool dhcpv4_check_timeout(s64_t start, u32_t time, s64_t timeout)
|
||||
{
|
||||
start += K_SECONDS(time);
|
||||
start += MSEC_PER_SEC * time;
|
||||
if (start < 0) {
|
||||
start = -start;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue