1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

kw2xrf: use netdev reset function

This commit is contained in:
Koen Zandberg 2018-07-10 14:29:25 +02:00
parent 327295a1e1
commit 71e5ce9a68
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -90,16 +90,7 @@ int kw2xrf_init(kw2xrf_t *dev, gpio_cb_t cb)
void kw2xrf_reset_phy(kw2xrf_t *dev)
{
/* reset options and sequence number */
dev->netdev.seq = 0;
dev->netdev.flags = 0;
/* set default protocol */
#ifdef MODULE_GNRC_SIXLOWPAN
dev->netdev.proto = GNRC_NETTYPE_SIXLOWPAN;
#elif MODULE_GNRC
dev->netdev.proto = GNRC_NETTYPE_UNDEF;
#endif
netdev_ieee802154_reset(&dev->netdev);
dev->tx_power = KW2XRF_DEFAULT_TX_POWER;
kw2xrf_set_tx_power(dev, dev->tx_power);