xref: /openbmc/linux/include/net/nl802154.h (revision 3ae75e02c34b5b8d521b0470522e540512ce24e3)
1*3ae75e02SAlexander Aring #ifndef __NL802154_H
2*3ae75e02SAlexander Aring #define __NL802154_H
3*3ae75e02SAlexander Aring /*
4*3ae75e02SAlexander Aring  * 802.15.4 netlink interface public header
5*3ae75e02SAlexander Aring  *
6*3ae75e02SAlexander Aring  * Copyright 2014 Alexander Aring <aar@pengutronix.de>
7*3ae75e02SAlexander Aring  *
8*3ae75e02SAlexander Aring  * Permission to use, copy, modify, and/or distribute this software for any
9*3ae75e02SAlexander Aring  * purpose with or without fee is hereby granted, provided that the above
10*3ae75e02SAlexander Aring  * copyright notice and this permission notice appear in all copies.
11*3ae75e02SAlexander Aring  *
12*3ae75e02SAlexander Aring  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13*3ae75e02SAlexander Aring  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14*3ae75e02SAlexander Aring  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15*3ae75e02SAlexander Aring  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16*3ae75e02SAlexander Aring  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17*3ae75e02SAlexander Aring  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18*3ae75e02SAlexander Aring  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19*3ae75e02SAlexander Aring  *
20*3ae75e02SAlexander Aring  */
21*3ae75e02SAlexander Aring 
22*3ae75e02SAlexander Aring #define NL802154_GENL_NAME "nl802154"
23*3ae75e02SAlexander Aring 
24*3ae75e02SAlexander Aring enum nl802154_commands {
25*3ae75e02SAlexander Aring /* don't change the order or add anything between, this is ABI! */
26*3ae75e02SAlexander Aring /* currently we don't shipping this file via uapi, ignore the above one */
27*3ae75e02SAlexander Aring 	NL802154_CMD_UNSPEC,
28*3ae75e02SAlexander Aring 
29*3ae75e02SAlexander Aring 	NL802154_CMD_GET_WPAN_PHY,		/* can dump */
30*3ae75e02SAlexander Aring 	NL802154_CMD_SET_WPAN_PHY,
31*3ae75e02SAlexander Aring 	NL802154_CMD_NEW_WPAN_PHY,
32*3ae75e02SAlexander Aring 	NL802154_CMD_DEL_WPAN_PHY,
33*3ae75e02SAlexander Aring 
34*3ae75e02SAlexander Aring 	NL802154_CMD_GET_INTERFACE,		/* can dump */
35*3ae75e02SAlexander Aring 	NL802154_CMD_SET_INTERFACE,
36*3ae75e02SAlexander Aring 	NL802154_CMD_NEW_INTERFACE,
37*3ae75e02SAlexander Aring 	NL802154_CMD_DEL_INTERFACE,
38*3ae75e02SAlexander Aring 
39*3ae75e02SAlexander Aring 	NL802154_CMD_SET_CHANNEL,
40*3ae75e02SAlexander Aring 
41*3ae75e02SAlexander Aring 	NL802154_CMD_SET_PAN_ID,
42*3ae75e02SAlexander Aring 	NL802154_CMD_SET_SHORT_ADDR,
43*3ae75e02SAlexander Aring 
44*3ae75e02SAlexander Aring 	NL802154_CMD_SET_TX_POWER,
45*3ae75e02SAlexander Aring 	NL802154_CMD_SET_CCA_MODE,
46*3ae75e02SAlexander Aring 	NL802154_CMD_SET_CCA_ED_LEVEL,
47*3ae75e02SAlexander Aring 
48*3ae75e02SAlexander Aring 	NL802154_CMD_SET_MAX_FRAME_RETRIES,
49*3ae75e02SAlexander Aring 
50*3ae75e02SAlexander Aring 	NL802154_CMD_SET_BACKOFF_EXPONENT,
51*3ae75e02SAlexander Aring 	NL802154_CMD_SET_MAX_CSMA_BACKOFFS,
52*3ae75e02SAlexander Aring 
53*3ae75e02SAlexander Aring 	NL802154_CMD_SET_LBT_MODE,
54*3ae75e02SAlexander Aring 
55*3ae75e02SAlexander Aring 	/* add new commands above here */
56*3ae75e02SAlexander Aring 
57*3ae75e02SAlexander Aring 	/* used to define NL802154_CMD_MAX below */
58*3ae75e02SAlexander Aring 	__NL802154_CMD_AFTER_LAST,
59*3ae75e02SAlexander Aring 	NL802154_CMD_MAX = __NL802154_CMD_AFTER_LAST - 1
60*3ae75e02SAlexander Aring };
61*3ae75e02SAlexander Aring 
62*3ae75e02SAlexander Aring enum nl802154_attrs {
63*3ae75e02SAlexander Aring /* don't change the order or add anything between, this is ABI! */
64*3ae75e02SAlexander Aring /* currently we don't shipping this file via uapi, ignore the above one */
65*3ae75e02SAlexander Aring 	NL802154_ATTR_UNSPEC,
66*3ae75e02SAlexander Aring 
67*3ae75e02SAlexander Aring 	NL802154_ATTR_WPAN_PHY,
68*3ae75e02SAlexander Aring 	NL802154_ATTR_WPAN_PHY_NAME,
69*3ae75e02SAlexander Aring 
70*3ae75e02SAlexander Aring 	NL802154_ATTR_IFINDEX,
71*3ae75e02SAlexander Aring 	NL802154_ATTR_IFNAME,
72*3ae75e02SAlexander Aring 	NL802154_ATTR_IFTYPE,
73*3ae75e02SAlexander Aring 
74*3ae75e02SAlexander Aring 	NL802154_ATTR_WPAN_DEV,
75*3ae75e02SAlexander Aring 
76*3ae75e02SAlexander Aring 	NL802154_ATTR_PAGE,
77*3ae75e02SAlexander Aring 	NL802154_ATTR_CHANNEL,
78*3ae75e02SAlexander Aring 
79*3ae75e02SAlexander Aring 	NL802154_ATTR_PAN_ID,
80*3ae75e02SAlexander Aring 	NL802154_ATTR_SHORT_ADDR,
81*3ae75e02SAlexander Aring 
82*3ae75e02SAlexander Aring 	NL802154_ATTR_TX_POWER,
83*3ae75e02SAlexander Aring 
84*3ae75e02SAlexander Aring 	NL802154_ATTR_CCA_MODE,
85*3ae75e02SAlexander Aring 	NL802154_ATTR_CCA_MODE3_AND,
86*3ae75e02SAlexander Aring 	NL802154_ATTR_CCA_ED_LEVEL,
87*3ae75e02SAlexander Aring 
88*3ae75e02SAlexander Aring 	NL802154_ATTR_MAX_FRAME_RETRIES,
89*3ae75e02SAlexander Aring 
90*3ae75e02SAlexander Aring 	NL802154_ATTR_MAX_BE,
91*3ae75e02SAlexander Aring 	NL802154_ATTR_MIN_BE,
92*3ae75e02SAlexander Aring 	NL802154_ATTR_MAX_CSMA_BACKOFFS,
93*3ae75e02SAlexander Aring 
94*3ae75e02SAlexander Aring 	NL802154_ATTR_LBT_MODE,
95*3ae75e02SAlexander Aring 
96*3ae75e02SAlexander Aring 	NL802154_ATTR_GENERATION,
97*3ae75e02SAlexander Aring 
98*3ae75e02SAlexander Aring 	NL802154_ATTR_CHANNELS_SUPPORTED,
99*3ae75e02SAlexander Aring 	NL802154_ATTR_SUPPORTED_CHANNEL,
100*3ae75e02SAlexander Aring 
101*3ae75e02SAlexander Aring 	NL802154_ATTR_EXTENDED_ADDR,
102*3ae75e02SAlexander Aring 
103*3ae75e02SAlexander Aring 	/* add attributes here, update the policy in nl802154.c */
104*3ae75e02SAlexander Aring 
105*3ae75e02SAlexander Aring 	__NL802154_ATTR_AFTER_LAST,
106*3ae75e02SAlexander Aring 	NL802154_ATTR_MAX = __NL802154_ATTR_AFTER_LAST - 1
107*3ae75e02SAlexander Aring };
108*3ae75e02SAlexander Aring 
109*3ae75e02SAlexander Aring enum nl802154_iftype {
110*3ae75e02SAlexander Aring 	/* for backwards compatibility TODO */
111*3ae75e02SAlexander Aring 	NL802154_IFTYPE_UNSPEC = -1,
112*3ae75e02SAlexander Aring 
113*3ae75e02SAlexander Aring 	NL802154_IFTYPE_NODE,
114*3ae75e02SAlexander Aring 	NL802154_IFTYPE_MONITOR,
115*3ae75e02SAlexander Aring 	NL802154_IFTYPE_COORD,
116*3ae75e02SAlexander Aring 
117*3ae75e02SAlexander Aring 	/* keep last */
118*3ae75e02SAlexander Aring 	NUM_NL802154_IFTYPES,
119*3ae75e02SAlexander Aring 	NL802154_IFTYPE_MAX = NUM_NL802154_IFTYPES - 1
120*3ae75e02SAlexander Aring };
121*3ae75e02SAlexander Aring 
122*3ae75e02SAlexander Aring #endif /* __NL802154_H */
123