Skip to content
Commit e6a746ea authored by Franco Saworski's avatar Franco Saworski Committed by Anas Nashif
Browse files

net: ieee802154: fix csma-ca backoff



This patch changes the backoff factor to be random between zero and
2^be-1, as defined by the standard.

The previous implementation generated either a power-of-two number or
zero for bo_n, because it only overlaps a single bit with the random
number. The overlap is very rare, as in random, and results in the
backoff time being zero most of the time.

Signed-off-by: default avatarFranco Saworski <franco.saworski@blik.io>
parent 934a4d2b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment