Commit 141293ea authored by Florian Grandel's avatar Florian Grandel Committed by Anas Nashif
Browse files

net: l2: ieee802154: settings: make ACK configurable

Add a network configuration option to configure whether IEEE 802.15.4
packets are expected to be ACKed or not.

Signed-off-by: default avatarFlorian Grandel <fgrandel@code-for-humans.de>
parent c88e5360
Loading
Loading
Loading
Loading
+7 −0
Changes for subsys/net/lib/config/Kconfig: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -176,6 +176,13 @@ config NET_CONFIG_IEEE802154_SECURITY_LEVEL
	  6 encryption/authentication with a 8 bytes length tag
	  7 encryption/authentication with a 16 bytes length tag

config NET_CONFIG_IEEE802154_ACK_REQUIRED
	bool "IEEE 802.15.4 acknowledgment"
	default y
	help
	  Whether or not to request and require IEEE 802.15.4 acknowledgment
	  packets.

endif # NET_L2_IEEE802154 || IEEE802154_RAW_MODE

config NET_CONFIG_BT_NODE
+6 −0
Changes for subsys/net/lib/config/ieee802154_settings.c: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -45,6 +45,12 @@ int z_net_config_ieee802154_setup(struct net_if *iface)
		}
	}

	if (IS_ENABLED(CONFIG_NET_CONFIG_IEEE802154_ACK_REQUIRED)) {
		if (net_mgmt(NET_REQUEST_IEEE802154_SET_ACK, iface, NULL, 0)) {
			return -EIO;
		}
	}

	if (net_mgmt(NET_REQUEST_IEEE802154_SET_PAN_ID,
		     iface, &pan_id, sizeof(uint16_t)) ||
	    net_mgmt(NET_REQUEST_IEEE802154_SET_CHANNEL,