Skip to content

Commit

Permalink
at86rf230: remove hrtimer on 1 usec delay
Browse files Browse the repository at this point in the history
According Documentation/timers/timers-howto.txt the usually case for
setting up a hrtimer takes > ~10us. So we should use udelay in this
case so we are sure that the state change was done, before doing the
state change assert.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
  • Loading branch information
Alexander Aring authored and Marcel Holtmann committed Jul 30, 2015
1 parent 54c9ee3 commit 8b44f0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ieee802154/at86rf230.c
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,9 @@ at86rf230_async_state_delay(void *context)
}

/* Default delay is 1us in the most cases */
tim = ktime_set(0, NSEC_PER_USEC);
udelay(1);
at86rf230_async_state_timer(&ctx->timer);
return;

change:
hrtimer_start(&ctx->timer, tim, HRTIMER_MODE_REL);
Expand Down

0 comments on commit 8b44f0d

Please sign in to comment.