Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drivers/at86rf2xx: move CSMA/CA seed init to netdev init
Browse files Browse the repository at this point in the history
jia200x committed Nov 28, 2022
1 parent 49032cd commit 19dcb76
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion drivers/at86rf2xx/at86rf2xx_getset.c
Original file line number Diff line number Diff line change
@@ -363,7 +363,6 @@ void at86rf2xx_set_option(at86rf2xx_t *dev, uint16_t option, bool state)
DEBUG("[at86rf2xx] opt: enabling CSMA mode" \
"(4 retries, min BE: 3 max BE: 5)\n");
/* Initialize CSMA seed with hardware address */
at86rf2xx_set_csma_seed(dev, dev->netdev.long_addr);
at86rf2xx_set_csma_max_retries(dev, 4);
at86rf2xx_set_csma_backoff_exp(dev, 3, 5);
}
1 change: 1 addition & 0 deletions drivers/at86rf2xx/at86rf2xx_netdev.c
Original file line number Diff line number Diff line change
@@ -183,6 +183,7 @@ static int _init(netdev_t *netdev)
#endif

at86rf2xx_reset(dev);
at86rf2xx_set_csma_seed(dev, dev->netdev.long_addr);

/* signal link UP */
netdev->event_callback(netdev, NETDEV_EVENT_LINK_UP);

0 comments on commit 19dcb76

Please sign in to comment.