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);