mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-25 22:43:50 +01:00
mrf24j40: use netdev reset function
This commit is contained in:
parent
71e5ce9a68
commit
91bd1a38ba
@ -46,9 +46,7 @@ void mrf24j40_reset(mrf24j40_t *dev)
|
||||
|
||||
mrf24j40_init(dev);
|
||||
|
||||
/* reset options and sequence number */
|
||||
dev->netdev.seq = 0;
|
||||
dev->netdev.flags = 0;
|
||||
netdev_ieee802154_reset(&dev->netdev);
|
||||
|
||||
/* get an 8-byte unique ID to use as hardware address */
|
||||
luid_get(addr_long.uint8, IEEE802154_LONG_ADDRESS_LEN);
|
||||
@ -76,13 +74,6 @@ void mrf24j40_reset(mrf24j40_t *dev)
|
||||
mrf24j40_set_option(dev, MRF24J40_OPT_TELL_TX_END, true);
|
||||
#endif
|
||||
|
||||
/* set default protocol */
|
||||
#ifdef MODULE_GNRC_SIXLOWPAN
|
||||
dev->netdev.proto = GNRC_NETTYPE_SIXLOWPAN;
|
||||
#elif MODULE_GNRC
|
||||
dev->netdev.proto = GNRC_NETTYPE_UNDEF;
|
||||
#endif
|
||||
|
||||
/* go into RX state */
|
||||
mrf24j40_reset_tasks(dev);
|
||||
dev->state = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user