Skip to content
Snippets Groups Projects
Unverified Commit 327295a1 authored by Koen Zandberg's avatar Koen Zandberg
Browse files

cc2420: use netdev reset function

parent c04cb23c
No related branches found
No related tags found
No related merge requests found
......@@ -49,9 +49,7 @@ int cc2420_init(cc2420_t *dev)
uint16_t reg;
uint8_t addr[8];
/* reset options and sequence number */
dev->netdev.seq = 0;
dev->netdev.flags = 0;
netdev_ieee802154_reset(&dev->netdev);
/* set default address, channel, PAN ID, and TX power */
luid_get(addr, sizeof(addr));
......@@ -73,12 +71,6 @@ int cc2420_init(cc2420_t *dev)
#ifdef MODULE_NETSTATS_L2
cc2420_set_option(dev, CC2420_OPT_TELL_RX_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
/* change default RX bandpass filter to 1.3uA (as recommended) */
reg = cc2420_reg_read(dev, CC2420_REG_RXCTRL1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment