diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-12-10 09:33:11 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-12-18 18:19:23 -0500 |
commit | b40d6376ff470572e2fafb20ca06a68f2d7940cb (patch) | |
tree | 968349e60aeab5bef4f091d97c274a9c6009c320 /include/net/nl802154.h | |
parent | 5859223e0c4f69ab36dd931ea7058c3b1b2abb41 (diff) |
nl802154: introduce cca mode enums
This patch adds enums for 802.15.4 specific CCA settings.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/nl802154.h')
-rw-r--r-- | include/net/nl802154.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/include/net/nl802154.h b/include/net/nl802154.h index 6dbd406ca41b..86c1b2f15b57 100644 --- a/include/net/nl802154.h +++ b/include/net/nl802154.h | |||
@@ -119,4 +119,47 @@ enum nl802154_iftype { | |||
119 | NL802154_IFTYPE_MAX = NUM_NL802154_IFTYPES - 1 | 119 | NL802154_IFTYPE_MAX = NUM_NL802154_IFTYPES - 1 |
120 | }; | 120 | }; |
121 | 121 | ||
122 | /** | ||
123 | * enum nl802154_cca_modes - cca modes | ||
124 | * | ||
125 | * @__NL802154_CCA_INVALID: cca mode number 0 is reserved | ||
126 | * @NL802154_CCA_ENERGY: Energy above threshold | ||
127 | * @NL802154_CCA_CARRIER: Carrier sense only | ||
128 | * @NL802154_CCA_ENERGY_CARRIER: Carrier sense with energy above threshold | ||
129 | * @NL802154_CCA_ALOHA: CCA shall always report an idle medium | ||
130 | * @NL802154_CCA_UWB_SHR: UWB preamble sense based on the SHR of a frame | ||
131 | * @NL802154_CCA_UWB_MULTIPEXED: UWB preamble sense based on the packet with | ||
132 | * the multiplexed preamble | ||
133 | * @__NL802154_CCA_ATTR_AFTER_LAST: Internal | ||
134 | * @NL802154_CCA_ATTR_MAX: Maximum CCA attribute number | ||
135 | */ | ||
136 | enum nl802154_cca_modes { | ||
137 | __NL802154_CCA_INVALID, | ||
138 | NL802154_CCA_ENERGY, | ||
139 | NL802154_CCA_CARRIER, | ||
140 | NL802154_CCA_ENERGY_CARRIER, | ||
141 | NL802154_CCA_ALOHA, | ||
142 | NL802154_CCA_UWB_SHR, | ||
143 | NL802154_CCA_UWB_MULTIPEXED, | ||
144 | |||
145 | /* keep last */ | ||
146 | __NL802154_CCA_ATTR_AFTER_LAST, | ||
147 | NL802154_CCA_ATTR_MAX = __NL802154_CCA_ATTR_AFTER_LAST - 1 | ||
148 | }; | ||
149 | |||
150 | /** | ||
151 | * enum nl802154_cca_opts - additional options for cca modes | ||
152 | * | ||
153 | * @NL802154_CCA_OPT_ENERGY_CARRIER_OR: NL802154_CCA_ENERGY_CARRIER with OR | ||
154 | * @NL802154_CCA_OPT_ENERGY_CARRIER_AND: NL802154_CCA_ENERGY_CARRIER with AND | ||
155 | */ | ||
156 | enum nl802154_cca_opts { | ||
157 | NL802154_CCA_OPT_ENERGY_CARRIER_AND, | ||
158 | NL802154_CCA_OPT_ENERGY_CARRIER_OR, | ||
159 | |||
160 | /* keep last */ | ||
161 | __NL802154_CCA_OPT_ATTR_AFTER_LAST, | ||
162 | NL802154_CCA_OPT_ATTR_MAX = __NL802154_CCA_OPT_ATTR_AFTER_LAST - 1 | ||
163 | }; | ||
164 | |||
122 | #endif /* __NL802154_H */ | 165 | #endif /* __NL802154_H */ |