1# Copyright (c) 2016 Intel Corporation.
2# SPDX-License-Identifier: Apache-2.0
3
4menu "IEEE 802.15.4 Radio"
5
6config NET_L2_IEEE802154_RADIO_DFLT_TX_POWER
7	int "Default radio transmission power"
8	default 0
9	help
10	  TX power in dbm. Valid setting are: -18, -7, -4, -2, 0, 1, 2, 3, 5
11	  If wrongly set, it will silently fail.
12
13config NET_L2_IEEE802154_RADIO_TX_RETRIES
14	int "Radio Retransmission attempts"
15	default 3
16	range 0 7
17	help
18	  Number of re-transmission attempts radio driver should do, before
19	  replying it could not send the packet (MAC PIB attribute:
20	  macMaxFrameRetries).
21
22choice
23	prompt "Radio channel access protocol"
24	default NET_L2_IEEE802154_RADIO_CSMA_CA
25	help
26	  Select which medium access protocol to use.
27
28config NET_L2_IEEE802154_RADIO_CSMA_CA
29	bool "IEEE 802.15.4 unslotted CSMA-CA medium access protocol"
30	help
31	  Use CSMA-CA mechanism (listen-before-talk with exponential backoff)
32	  to transmit packets. This is the most common way of mediating radio
33	  channel access and fits most usage scenarios (see IEEE 802.15.4-2020,
34	  sections 6.2.5.1 and 10.2.8).
35
36config NET_L2_IEEE802154_RADIO_ALOHA
37	bool "IEEE 802.15.4 Aloha medium access protocol (CCA mode 4)"
38	help
39	  Use Aloha mechanism (send without any clear channel assessment) to
40	  transmit packets. This is a simplistic way of transmitting packets
41	  and fits low duty-cycle contexts where the radio spectrum is not
42	  too heavily loaded (see IEEE 802.15.4-2020, section 10.2.8). The
43	  current implementation does not randomize channel access.
44
45endchoice
46
47if NET_L2_IEEE802154_RADIO_CSMA_CA
48
49config NET_L2_IEEE802154_RADIO_CSMA_CA_MAX_BO
50	int "CSMA maximum backoffs"
51	default 4
52	range 0 5
53	help
54	  The maximum number of backoffs the CSMA-CA algorithm will attempt
55	  before declaring a channel access failure (MAC PIB attribute:
56	  macMaxCSMABackoffs).
57
58config NET_L2_IEEE802154_RADIO_CSMA_CA_MIN_BE
59	int "CSMA MAC minimum backoff exponent"
60	default 3
61	range 0 8
62	help
63	  The minimum value of the backoff exponent (BE) in the CSMA-CA
64	  algorithm (MAC PIB attribute: macMinBe). This setting must be less
65	  than or equal NET_L2_IEEE802154_RADIO_CSMA_CA_MAX_BE.
66
67config NET_L2_IEEE802154_RADIO_CSMA_CA_MAX_BE
68	int "CSMA MAC maximum backoff exponent"
69	default 5
70	range 3 8
71	help
72	  The maximum value of the backoff exponent (BE) in the CSMA-CA
73	  algorithm (MAC PIB attribute: macMaxBe).
74
75endif # NET_L2_IEEE802154_RADIO_CSMA_CA
76
77endmenu
78