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:
Franco Saworski <franco.saworski@blik.io>
Loading
Please sign in to comment