Merge pull request #15210 from benpicco/ieee802154_submac-ack_req

netdev/ieee802154_submac: enable ACK_REQ by default
This commit is contained in:
José Alamos 2020-10-12 16:46:48 +02:00 committed by GitHub
commit 2de78a9862
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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