xref: /openbmc/linux/include/net/nl802154.h (revision 236bdb88)
1 #ifndef __NL802154_H
2 #define __NL802154_H
3 /*
4  * 802.15.4 netlink interface public header
5  *
6  * Copyright 2014 Alexander Aring <aar@pengutronix.de>
7  *
8  * Permission to use, copy, modify, and/or distribute this software for any
9  * purpose with or without fee is hereby granted, provided that the above
10  * copyright notice and this permission notice appear in all copies.
11  *
12  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19  *
20  */
21 
22 #include <linux/types.h>
23 
24 #define NL802154_GENL_NAME "nl802154"
25 
26 enum nl802154_commands {
27 /* don't change the order or add anything between, this is ABI! */
28 /* currently we don't shipping this file via uapi, ignore the above one */
29 	NL802154_CMD_UNSPEC,
30 
31 	NL802154_CMD_GET_WPAN_PHY,		/* can dump */
32 	NL802154_CMD_SET_WPAN_PHY,
33 	NL802154_CMD_NEW_WPAN_PHY,
34 	NL802154_CMD_DEL_WPAN_PHY,
35 
36 	NL802154_CMD_GET_INTERFACE,		/* can dump */
37 	NL802154_CMD_SET_INTERFACE,
38 	NL802154_CMD_NEW_INTERFACE,
39 	NL802154_CMD_DEL_INTERFACE,
40 
41 	NL802154_CMD_SET_CHANNEL,
42 
43 	NL802154_CMD_SET_PAN_ID,
44 	NL802154_CMD_SET_SHORT_ADDR,
45 
46 	NL802154_CMD_SET_TX_POWER,
47 	NL802154_CMD_SET_CCA_MODE,
48 	NL802154_CMD_SET_CCA_ED_LEVEL,
49 
50 	NL802154_CMD_SET_MAX_FRAME_RETRIES,
51 
52 	NL802154_CMD_SET_BACKOFF_EXPONENT,
53 	NL802154_CMD_SET_MAX_CSMA_BACKOFFS,
54 
55 	NL802154_CMD_SET_LBT_MODE,
56 
57 	NL802154_CMD_SET_ACKREQ_DEFAULT,
58 
59 	NL802154_CMD_SET_WPAN_PHY_NETNS,
60 
61 	NL802154_CMD_SET_SEC_PARAMS,
62 	NL802154_CMD_GET_SEC_KEY,		/* can dump */
63 	NL802154_CMD_NEW_SEC_KEY,
64 	NL802154_CMD_DEL_SEC_KEY,
65 	NL802154_CMD_GET_SEC_DEV,		/* can dump */
66 	NL802154_CMD_NEW_SEC_DEV,
67 	NL802154_CMD_DEL_SEC_DEV,
68 	NL802154_CMD_GET_SEC_DEVKEY,		/* can dump */
69 	NL802154_CMD_NEW_SEC_DEVKEY,
70 	NL802154_CMD_DEL_SEC_DEVKEY,
71 	NL802154_CMD_GET_SEC_LEVEL,		/* can dump */
72 	NL802154_CMD_NEW_SEC_LEVEL,
73 	NL802154_CMD_DEL_SEC_LEVEL,
74 
75 	NL802154_CMD_SCAN_EVENT,
76 	NL802154_CMD_TRIGGER_SCAN,
77 	NL802154_CMD_ABORT_SCAN,
78 	NL802154_CMD_SCAN_DONE,
79 	NL802154_CMD_SEND_BEACONS,
80 	NL802154_CMD_STOP_BEACONS,
81 
82 	/* add new commands above here */
83 
84 	/* used to define NL802154_CMD_MAX below */
85 	__NL802154_CMD_AFTER_LAST,
86 	NL802154_CMD_MAX = __NL802154_CMD_AFTER_LAST - 1
87 };
88 
89 enum nl802154_attrs {
90 /* don't change the order or add anything between, this is ABI! */
91 /* currently we don't shipping this file via uapi, ignore the above one */
92 	NL802154_ATTR_UNSPEC,
93 
94 	NL802154_ATTR_WPAN_PHY,
95 	NL802154_ATTR_WPAN_PHY_NAME,
96 
97 	NL802154_ATTR_IFINDEX,
98 	NL802154_ATTR_IFNAME,
99 	NL802154_ATTR_IFTYPE,
100 
101 	NL802154_ATTR_WPAN_DEV,
102 
103 	NL802154_ATTR_PAGE,
104 	NL802154_ATTR_CHANNEL,
105 
106 	NL802154_ATTR_PAN_ID,
107 	NL802154_ATTR_SHORT_ADDR,
108 
109 	NL802154_ATTR_TX_POWER,
110 
111 	NL802154_ATTR_CCA_MODE,
112 	NL802154_ATTR_CCA_OPT,
113 	NL802154_ATTR_CCA_ED_LEVEL,
114 
115 	NL802154_ATTR_MAX_FRAME_RETRIES,
116 
117 	NL802154_ATTR_MAX_BE,
118 	NL802154_ATTR_MIN_BE,
119 	NL802154_ATTR_MAX_CSMA_BACKOFFS,
120 
121 	NL802154_ATTR_LBT_MODE,
122 
123 	NL802154_ATTR_GENERATION,
124 
125 	NL802154_ATTR_CHANNELS_SUPPORTED,
126 	NL802154_ATTR_SUPPORTED_CHANNEL,
127 
128 	NL802154_ATTR_EXTENDED_ADDR,
129 
130 	NL802154_ATTR_WPAN_PHY_CAPS,
131 
132 	NL802154_ATTR_SUPPORTED_COMMANDS,
133 
134 	NL802154_ATTR_ACKREQ_DEFAULT,
135 
136 	NL802154_ATTR_PAD,
137 
138 	NL802154_ATTR_PID,
139 	NL802154_ATTR_NETNS_FD,
140 
141 	NL802154_ATTR_COORDINATOR,
142 	NL802154_ATTR_SCAN_TYPE,
143 	NL802154_ATTR_SCAN_FLAGS,
144 	NL802154_ATTR_SCAN_CHANNELS,
145 	NL802154_ATTR_SCAN_PREAMBLE_CODES,
146 	NL802154_ATTR_SCAN_MEAN_PRF,
147 	NL802154_ATTR_SCAN_DURATION,
148 	NL802154_ATTR_SCAN_DONE_REASON,
149 	NL802154_ATTR_BEACON_INTERVAL,
150 
151 	/* add attributes here, update the policy in nl802154.c */
152 
153 #ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL
154 	NL802154_ATTR_SEC_ENABLED,
155 	NL802154_ATTR_SEC_OUT_LEVEL,
156 	NL802154_ATTR_SEC_OUT_KEY_ID,
157 	NL802154_ATTR_SEC_FRAME_COUNTER,
158 
159 	NL802154_ATTR_SEC_LEVEL,
160 	NL802154_ATTR_SEC_DEVICE,
161 	NL802154_ATTR_SEC_DEVKEY,
162 	NL802154_ATTR_SEC_KEY,
163 #endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */
164 
165 	__NL802154_ATTR_AFTER_LAST,
166 	NL802154_ATTR_MAX = __NL802154_ATTR_AFTER_LAST - 1
167 };
168 
169 enum nl802154_iftype {
170 	NL802154_IFTYPE_UNSPEC = (~(__u32)0),
171 
172 	NL802154_IFTYPE_NODE = 0,
173 	NL802154_IFTYPE_MONITOR,
174 	NL802154_IFTYPE_COORD,
175 
176 	/* keep last */
177 	NUM_NL802154_IFTYPES,
178 	NL802154_IFTYPE_MAX = NUM_NL802154_IFTYPES - 1
179 };
180 
181 /**
182  * enum nl802154_wpan_phy_capability_attr - wpan phy capability attributes
183  *
184  * @__NL802154_CAP_ATTR_INVALID: attribute number 0 is reserved
185  * @NL802154_CAP_ATTR_CHANNELS: a nested attribute for nl802154_channel_attr
186  * @NL802154_CAP_ATTR_TX_POWERS: a nested attribute for
187  *	nl802154_wpan_phy_tx_power
188  * @NL802154_CAP_ATTR_MIN_CCA_ED_LEVEL: minimum value for cca_ed_level
189  * @NL802154_CAP_ATTR_MAX_CCA_ED_LEVEL: maxmimum value for cca_ed_level
190  * @NL802154_CAP_ATTR_CCA_MODES: nl802154_cca_modes flags
191  * @NL802154_CAP_ATTR_CCA_OPTS: nl802154_cca_opts flags
192  * @NL802154_CAP_ATTR_MIN_MINBE: minimum of minbe value
193  * @NL802154_CAP_ATTR_MAX_MINBE: maximum of minbe value
194  * @NL802154_CAP_ATTR_MIN_MAXBE: minimum of maxbe value
195  * @NL802154_CAP_ATTR_MAX_MINBE: maximum of maxbe value
196  * @NL802154_CAP_ATTR_MIN_CSMA_BACKOFFS: minimum of csma backoff value
197  * @NL802154_CAP_ATTR_MAX_CSMA_BACKOFFS: maximum of csma backoffs value
198  * @NL802154_CAP_ATTR_MIN_FRAME_RETRIES: minimum of frame retries value
199  * @NL802154_CAP_ATTR_MAX_FRAME_RETRIES: maximum of frame retries value
200  * @NL802154_CAP_ATTR_IFTYPES: nl802154_iftype flags
201  * @NL802154_CAP_ATTR_LBT: nl802154_supported_bool_states flags
202  * @NL802154_CAP_ATTR_MAX: highest cap attribute currently defined
203  * @__NL802154_CAP_ATTR_AFTER_LAST: internal use
204  */
205 enum nl802154_wpan_phy_capability_attr {
206 	__NL802154_CAP_ATTR_INVALID,
207 
208 	NL802154_CAP_ATTR_IFTYPES,
209 
210 	NL802154_CAP_ATTR_CHANNELS,
211 	NL802154_CAP_ATTR_TX_POWERS,
212 
213 	NL802154_CAP_ATTR_CCA_ED_LEVELS,
214 	NL802154_CAP_ATTR_CCA_MODES,
215 	NL802154_CAP_ATTR_CCA_OPTS,
216 
217 	NL802154_CAP_ATTR_MIN_MINBE,
218 	NL802154_CAP_ATTR_MAX_MINBE,
219 
220 	NL802154_CAP_ATTR_MIN_MAXBE,
221 	NL802154_CAP_ATTR_MAX_MAXBE,
222 
223 	NL802154_CAP_ATTR_MIN_CSMA_BACKOFFS,
224 	NL802154_CAP_ATTR_MAX_CSMA_BACKOFFS,
225 
226 	NL802154_CAP_ATTR_MIN_FRAME_RETRIES,
227 	NL802154_CAP_ATTR_MAX_FRAME_RETRIES,
228 
229 	NL802154_CAP_ATTR_LBT,
230 
231 	/* keep last */
232 	__NL802154_CAP_ATTR_AFTER_LAST,
233 	NL802154_CAP_ATTR_MAX = __NL802154_CAP_ATTR_AFTER_LAST - 1
234 };
235 
236 /**
237  * enum nl802154_coord - Netlink attributes for a coord
238  *
239  * @__NL802154_COORD_INVALID: invalid
240  * @NL802154_COORD_PANID: PANID of the coordinator (2 bytes)
241  * @NL802154_COORD_ADDR: coordinator address, (8 bytes or 2 bytes)
242  * @NL802154_COORD_CHANNEL: channel number, related to @NL802154_COORD_PAGE (u8)
243  * @NL802154_COORD_PAGE: channel page, related to @NL802154_COORD_CHANNEL (u8)
244  * @NL802154_COORD_PREAMBLE_CODE: Preamble code used when the beacon was received,
245  *	this is PHY dependent and optional (u8)
246  * @NL802154_COORD_MEAN_PRF: Mean PRF used when the beacon was received,
247  *     this is PHY dependent and optional (u8)
248  * @NL802154_COORD_SUPERFRAME_SPEC: superframe specification of the PAN (u16)
249  * @NL802154_COORD_LINK_QUALITY: signal quality of beacon in unspecified units,
250  *	scaled to 0..255 (u8)
251  * @NL802154_COORD_GTS_PERMIT: set to true if GTS is permitted on this PAN
252  * @NL802154_COORD_PAYLOAD_DATA: binary data containing the raw data from the
253  *	frame payload, (only if beacon or probe response had data)
254  * @NL802154_COORD_PAD: attribute used for padding for 64-bit alignment
255  * @NL802154_COORD_MAX: highest coordinator attribute
256  */
257 enum nl802154_coord {
258 	__NL802154_COORD_INVALID,
259 	NL802154_COORD_PANID,
260 	NL802154_COORD_ADDR,
261 	NL802154_COORD_CHANNEL,
262 	NL802154_COORD_PAGE,
263 	NL802154_COORD_PREAMBLE_CODE,
264 	NL802154_COORD_MEAN_PRF,
265 	NL802154_COORD_SUPERFRAME_SPEC,
266 	NL802154_COORD_LINK_QUALITY,
267 	NL802154_COORD_GTS_PERMIT,
268 	NL802154_COORD_PAYLOAD_DATA,
269 	NL802154_COORD_PAD,
270 
271 	/* keep last */
272 	NL802154_COORD_MAX,
273 };
274 
275 /**
276  * enum nl802154_scan_types - Scan types
277  *
278  * @__NL802154_SCAN_INVALID: scan type number 0 is reserved
279  * @NL802154_SCAN_ED: An ED scan allows a device to obtain a measure of the peak
280  *	energy in each requested channel
281  * @NL802154_SCAN_ACTIVE: Locate any coordinator transmitting Beacon frames using
282  *	a Beacon Request command
283  * @NL802154_SCAN_PASSIVE: Locate any coordinator transmitting Beacon frames
284  * @NL802154_SCAN_ORPHAN: Relocate coordinator following a loss of synchronisation
285  * @NL802154_SCAN_ENHANCED_ACTIVE: Same as Active using Enhanced Beacon Request
286  *	command instead of Beacon Request command
287  * @NL802154_SCAN_RIT_PASSIVE: Passive scan for RIT Data Request command frames
288  *	instead of Beacon frames
289  * @NL802154_SCAN_ATTR_MAX: Maximum SCAN attribute number
290  */
291 enum nl802154_scan_types {
292 	__NL802154_SCAN_INVALID,
293 	NL802154_SCAN_ED,
294 	NL802154_SCAN_ACTIVE,
295 	NL802154_SCAN_PASSIVE,
296 	NL802154_SCAN_ORPHAN,
297 	NL802154_SCAN_ENHANCED_ACTIVE,
298 	NL802154_SCAN_RIT_PASSIVE,
299 
300 	/* keep last */
301 	NL802154_SCAN_ATTR_MAX,
302 };
303 
304 /**
305  * enum nl802154_scan_done_reasons - End of scan reasons
306  *
307  * @__NL802154_SCAN_DONE_REASON_INVALID: scan done reason number 0 is reserved.
308  * @NL802154_SCAN_DONE_REASON_FINISHED: The scan just finished naturally after
309  *	going through all the requested and possible (complex) channels.
310  * @NL802154_SCAN_DONE_REASON_ABORTED: The scan was aborted upon user request.
311  *	a Beacon Request command
312  * @NL802154_SCAN_DONE_REASON_MAX: Maximum scan done reason attribute number.
313  */
314 enum nl802154_scan_done_reasons {
315 	__NL802154_SCAN_DONE_REASON_INVALID,
316 	NL802154_SCAN_DONE_REASON_FINISHED,
317 	NL802154_SCAN_DONE_REASON_ABORTED,
318 
319 	/* keep last */
320 	NL802154_SCAN_DONE_REASON_MAX,
321 };
322 
323 /**
324  * enum nl802154_cca_modes - cca modes
325  *
326  * @__NL802154_CCA_INVALID: cca mode number 0 is reserved
327  * @NL802154_CCA_ENERGY: Energy above threshold
328  * @NL802154_CCA_CARRIER: Carrier sense only
329  * @NL802154_CCA_ENERGY_CARRIER: Carrier sense with energy above threshold
330  * @NL802154_CCA_ALOHA: CCA shall always report an idle medium
331  * @NL802154_CCA_UWB_SHR: UWB preamble sense based on the SHR of a frame
332  * @NL802154_CCA_UWB_MULTIPLEXED: UWB preamble sense based on the packet with
333  *	the multiplexed preamble
334  * @__NL802154_CCA_ATTR_AFTER_LAST: Internal
335  * @NL802154_CCA_ATTR_MAX: Maximum CCA attribute number
336  */
337 enum nl802154_cca_modes {
338 	__NL802154_CCA_INVALID,
339 	NL802154_CCA_ENERGY,
340 	NL802154_CCA_CARRIER,
341 	NL802154_CCA_ENERGY_CARRIER,
342 	NL802154_CCA_ALOHA,
343 	NL802154_CCA_UWB_SHR,
344 	NL802154_CCA_UWB_MULTIPLEXED,
345 
346 	/* keep last */
347 	__NL802154_CCA_ATTR_AFTER_LAST,
348 	NL802154_CCA_ATTR_MAX = __NL802154_CCA_ATTR_AFTER_LAST - 1
349 };
350 
351 /**
352  * enum nl802154_cca_opts - additional options for cca modes
353  *
354  * @NL802154_CCA_OPT_ENERGY_CARRIER_OR: NL802154_CCA_ENERGY_CARRIER with OR
355  * @NL802154_CCA_OPT_ENERGY_CARRIER_AND: NL802154_CCA_ENERGY_CARRIER with AND
356  */
357 enum nl802154_cca_opts {
358 	NL802154_CCA_OPT_ENERGY_CARRIER_AND,
359 	NL802154_CCA_OPT_ENERGY_CARRIER_OR,
360 
361 	/* keep last */
362 	__NL802154_CCA_OPT_ATTR_AFTER_LAST,
363 	NL802154_CCA_OPT_ATTR_MAX = __NL802154_CCA_OPT_ATTR_AFTER_LAST - 1
364 };
365 
366 /**
367  * enum nl802154_supported_bool_states - bool states for bool capability entry
368  *
369  * @NL802154_SUPPORTED_BOOL_FALSE: indicates to set false
370  * @NL802154_SUPPORTED_BOOL_TRUE: indicates to set true
371  * @__NL802154_SUPPORTED_BOOL_INVALD: reserved
372  * @NL802154_SUPPORTED_BOOL_BOTH: indicates to set true and false
373  * @__NL802154_SUPPORTED_BOOL_AFTER_LAST: Internal
374  * @NL802154_SUPPORTED_BOOL_MAX: highest value for bool states
375  */
376 enum nl802154_supported_bool_states {
377 	NL802154_SUPPORTED_BOOL_FALSE,
378 	NL802154_SUPPORTED_BOOL_TRUE,
379 	/* to handle them in a mask */
380 	__NL802154_SUPPORTED_BOOL_INVALD,
381 	NL802154_SUPPORTED_BOOL_BOTH,
382 
383 	/* keep last */
384 	__NL802154_SUPPORTED_BOOL_AFTER_LAST,
385 	NL802154_SUPPORTED_BOOL_MAX = __NL802154_SUPPORTED_BOOL_AFTER_LAST - 1
386 };
387 
388 #ifdef CONFIG_IEEE802154_NL802154_EXPERIMENTAL
389 
390 enum nl802154_dev_addr_modes {
391 	NL802154_DEV_ADDR_NONE,
392 	__NL802154_DEV_ADDR_INVALID,
393 	NL802154_DEV_ADDR_SHORT,
394 	NL802154_DEV_ADDR_EXTENDED,
395 
396 	/* keep last */
397 	__NL802154_DEV_ADDR_AFTER_LAST,
398 	NL802154_DEV_ADDR_MAX = __NL802154_DEV_ADDR_AFTER_LAST - 1
399 };
400 
401 enum nl802154_dev_addr_attrs {
402 	NL802154_DEV_ADDR_ATTR_UNSPEC,
403 
404 	NL802154_DEV_ADDR_ATTR_PAN_ID,
405 	NL802154_DEV_ADDR_ATTR_MODE,
406 	NL802154_DEV_ADDR_ATTR_SHORT,
407 	NL802154_DEV_ADDR_ATTR_EXTENDED,
408 	NL802154_DEV_ADDR_ATTR_PAD,
409 
410 	/* keep last */
411 	__NL802154_DEV_ADDR_ATTR_AFTER_LAST,
412 	NL802154_DEV_ADDR_ATTR_MAX = __NL802154_DEV_ADDR_ATTR_AFTER_LAST - 1
413 };
414 
415 enum nl802154_key_id_modes {
416 	NL802154_KEY_ID_MODE_IMPLICIT,
417 	NL802154_KEY_ID_MODE_INDEX,
418 	NL802154_KEY_ID_MODE_INDEX_SHORT,
419 	NL802154_KEY_ID_MODE_INDEX_EXTENDED,
420 
421 	/* keep last */
422 	__NL802154_KEY_ID_MODE_AFTER_LAST,
423 	NL802154_KEY_ID_MODE_MAX = __NL802154_KEY_ID_MODE_AFTER_LAST - 1
424 };
425 
426 enum nl802154_key_id_attrs {
427 	NL802154_KEY_ID_ATTR_UNSPEC,
428 
429 	NL802154_KEY_ID_ATTR_MODE,
430 	NL802154_KEY_ID_ATTR_INDEX,
431 	NL802154_KEY_ID_ATTR_IMPLICIT,
432 	NL802154_KEY_ID_ATTR_SOURCE_SHORT,
433 	NL802154_KEY_ID_ATTR_SOURCE_EXTENDED,
434 	NL802154_KEY_ID_ATTR_PAD,
435 
436 	/* keep last */
437 	__NL802154_KEY_ID_ATTR_AFTER_LAST,
438 	NL802154_KEY_ID_ATTR_MAX = __NL802154_KEY_ID_ATTR_AFTER_LAST - 1
439 };
440 
441 enum nl802154_seclevels {
442 	NL802154_SECLEVEL_NONE,
443 	NL802154_SECLEVEL_MIC32,
444 	NL802154_SECLEVEL_MIC64,
445 	NL802154_SECLEVEL_MIC128,
446 	NL802154_SECLEVEL_ENC,
447 	NL802154_SECLEVEL_ENC_MIC32,
448 	NL802154_SECLEVEL_ENC_MIC64,
449 	NL802154_SECLEVEL_ENC_MIC128,
450 
451 	/* keep last */
452 	__NL802154_SECLEVEL_AFTER_LAST,
453 	NL802154_SECLEVEL_MAX = __NL802154_SECLEVEL_AFTER_LAST - 1
454 };
455 
456 enum nl802154_frames {
457 	NL802154_FRAME_BEACON,
458 	NL802154_FRAME_DATA,
459 	NL802154_FRAME_ACK,
460 	NL802154_FRAME_CMD,
461 
462 	/* keep last */
463 	__NL802154_FRAME_AFTER_LAST,
464 	NL802154_FRAME_MAX = __NL802154_FRAME_AFTER_LAST - 1
465 };
466 
467 enum nl802154_cmd_frames {
468 	__NL802154_CMD_FRAME_INVALID,
469 	NL802154_CMD_FRAME_ASSOC_REQUEST,
470 	NL802154_CMD_FRAME_ASSOC_RESPONSE,
471 	NL802154_CMD_FRAME_DISASSOC_NOTIFY,
472 	NL802154_CMD_FRAME_DATA_REQUEST,
473 	NL802154_CMD_FRAME_PAN_ID_CONFLICT_NOTIFY,
474 	NL802154_CMD_FRAME_ORPHAN_NOTIFY,
475 	NL802154_CMD_FRAME_BEACON_REQUEST,
476 	NL802154_CMD_FRAME_COORD_REALIGNMENT,
477 	NL802154_CMD_FRAME_GTS_REQUEST,
478 
479 	/* keep last */
480 	__NL802154_CMD_FRAME_AFTER_LAST,
481 	NL802154_CMD_FRAME_MAX = __NL802154_CMD_FRAME_AFTER_LAST - 1
482 };
483 
484 enum nl802154_seclevel_attrs {
485 	NL802154_SECLEVEL_ATTR_UNSPEC,
486 
487 	NL802154_SECLEVEL_ATTR_LEVELS,
488 	NL802154_SECLEVEL_ATTR_FRAME,
489 	NL802154_SECLEVEL_ATTR_CMD_FRAME,
490 	NL802154_SECLEVEL_ATTR_DEV_OVERRIDE,
491 
492 	/* keep last */
493 	__NL802154_SECLEVEL_ATTR_AFTER_LAST,
494 	NL802154_SECLEVEL_ATTR_MAX = __NL802154_SECLEVEL_ATTR_AFTER_LAST - 1
495 };
496 
497 /* TODO what is this? couldn't find in mib */
498 enum {
499 	NL802154_DEVKEY_IGNORE,
500 	NL802154_DEVKEY_RESTRICT,
501 	NL802154_DEVKEY_RECORD,
502 
503 	/* keep last */
504 	__NL802154_DEVKEY_AFTER_LAST,
505 	NL802154_DEVKEY_MAX = __NL802154_DEVKEY_AFTER_LAST - 1
506 };
507 
508 enum nl802154_dev {
509 	NL802154_DEV_ATTR_UNSPEC,
510 
511 	NL802154_DEV_ATTR_FRAME_COUNTER,
512 	NL802154_DEV_ATTR_PAN_ID,
513 	NL802154_DEV_ATTR_SHORT_ADDR,
514 	NL802154_DEV_ATTR_EXTENDED_ADDR,
515 	NL802154_DEV_ATTR_SECLEVEL_EXEMPT,
516 	NL802154_DEV_ATTR_KEY_MODE,
517 	NL802154_DEV_ATTR_PAD,
518 
519 	/* keep last */
520 	__NL802154_DEV_ATTR_AFTER_LAST,
521 	NL802154_DEV_ATTR_MAX = __NL802154_DEV_ATTR_AFTER_LAST - 1
522 };
523 
524 enum nl802154_devkey {
525 	NL802154_DEVKEY_ATTR_UNSPEC,
526 
527 	NL802154_DEVKEY_ATTR_FRAME_COUNTER,
528 	NL802154_DEVKEY_ATTR_EXTENDED_ADDR,
529 	NL802154_DEVKEY_ATTR_ID,
530 	NL802154_DEVKEY_ATTR_PAD,
531 
532 	/* keep last */
533 	__NL802154_DEVKEY_ATTR_AFTER_LAST,
534 	NL802154_DEVKEY_ATTR_MAX = __NL802154_DEVKEY_ATTR_AFTER_LAST - 1
535 };
536 
537 enum nl802154_key {
538 	NL802154_KEY_ATTR_UNSPEC,
539 
540 	NL802154_KEY_ATTR_ID,
541 	NL802154_KEY_ATTR_USAGE_FRAMES,
542 	NL802154_KEY_ATTR_USAGE_CMDS,
543 	NL802154_KEY_ATTR_BYTES,
544 
545 	/* keep last */
546 	__NL802154_KEY_ATTR_AFTER_LAST,
547 	NL802154_KEY_ATTR_MAX = __NL802154_KEY_ATTR_AFTER_LAST - 1
548 };
549 
550 #define NL802154_KEY_SIZE		16
551 #define NL802154_CMD_FRAME_NR_IDS	256
552 
553 #endif /* CONFIG_IEEE802154_NL802154_EXPERIMENTAL */
554 
555 #endif /* __NL802154_H */
556