From bb546835a1bb006c104f098dffad807073fd7f41 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Mon, 12 Oct 2020 15:21:22 +0200 Subject: [PATCH] netdev/ieee802154_submac: enable ACK_REQ One of the features of the sub-MAC is to allow for ACK-handling in software. So enable the use of ACKs by default, just like the netdev drivers do that support this feature in hardware. --- drivers/netdev_ieee802154_submac/netdev_ieee802154_submac.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/netdev_ieee802154_submac/netdev_ieee802154_submac.c b/drivers/netdev_ieee802154_submac/netdev_ieee802154_submac.c index 5c231403e0..351e843f8f 100644 --- a/drivers/netdev_ieee802154_submac/netdev_ieee802154_submac.c +++ b/drivers/netdev_ieee802154_submac/netdev_ieee802154_submac.c @@ -279,6 +279,7 @@ static int _init(netdev_t *netdev) uint16_t chan = CONFIG_IEEE802154_DEFAULT_CHANNEL; int16_t tx_power = CONFIG_IEEE802154_DEFAULT_TXPOWER; + netopt_enable_t enable = NETOPT_ENABLE; /* Initialise netdev_ieee802154_t struct */ netdev_ieee802154_set(netdev_ieee802154, NETOPT_CHANNEL, @@ -287,6 +288,8 @@ static int _init(netdev_t *netdev) &submac->short_addr, sizeof(submac->short_addr)); netdev_ieee802154_set(netdev_ieee802154, NETOPT_ADDRESS_LONG, &submac->ext_addr, sizeof(submac->ext_addr)); + netdev_ieee802154_set(netdev_ieee802154, NETOPT_ACK_REQ, + &enable, sizeof(enable)); netdev_submac->dev.txpower = tx_power;