From 087931c5f287f1a941a5c504a4e4e2d323a4b86b Mon Sep 17 00:00:00 2001 From: Jue Date: Wed, 14 Dec 2022 16:24:44 +0100 Subject: [PATCH] at86rf215: respect ack request option --- drivers/at86rf215/at86rf215.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/at86rf215/at86rf215.c b/drivers/at86rf215/at86rf215.c index 6c5daefd0c..2497c724dd 100644 --- a/drivers/at86rf215/at86rf215.c +++ b/drivers/at86rf215/at86rf215.c @@ -91,8 +91,10 @@ void at86rf215_reset_and_cfg(at86rf215_t *dev) at86rf215_reset(dev); /* default to requesting ACKs, just like at86rf2xx */ - const netopt_enable_t enable = NETOPT_ENABLE; - netdev_ieee802154_set(&dev->netdev, NETOPT_ACK_REQ, &enable, sizeof(enable)); + static const netopt_enable_t ack_req = + IS_ACTIVE(CONFIG_IEEE802154_DEFAULT_ACK_REQ) ? NETOPT_ENABLE : NETOPT_DISABLE; + netdev_ieee802154_set(&dev->netdev, NETOPT_ACK_REQ, + &ack_req, sizeof(ack_req)); /* enable RX start IRQs */ at86rf215_reg_or(dev, dev->BBC->RG_IRQM, BB_IRQ_RXAM);