diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-11-09 02:36:52 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-11-09 13:50:28 -0500 |
commit | 3ae75e02c34b5b8d521b0470522e540512ce24e3 (patch) | |
tree | e9b57adc482995804b2a41a7f63dfcdfc153fd2b | |
parent | a6fd693f6b862cd73fc90849353492406cfba5f6 (diff) |
ieee802154: add new nl802154 header
This patch adds the new userspace header for nl802154. We don't place
this header in include/uapi now. This header could be modified in the
next time.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | include/net/nl802154.h | 122 |
2 files changed, 123 insertions, 0 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index b42eb50b7426..7ec37a396ffe 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -4699,6 +4699,7 @@ F: net/mac802154/ | |||
4699 | F: drivers/net/ieee802154/ | 4699 | F: drivers/net/ieee802154/ |
4700 | F: include/linux/nl802154.h | 4700 | F: include/linux/nl802154.h |
4701 | F: include/linux/ieee802154.h | 4701 | F: include/linux/ieee802154.h |
4702 | F: include/net/nl802154.h | ||
4702 | F: include/net/mac802154.h | 4703 | F: include/net/mac802154.h |
4703 | F: include/net/af_ieee802154.h | 4704 | F: include/net/af_ieee802154.h |
4704 | F: include/net/cfg802154.h | 4705 | F: include/net/cfg802154.h |
diff --git a/include/net/nl802154.h b/include/net/nl802154.h new file mode 100644 index 000000000000..6dbd406ca41b --- /dev/null +++ b/include/net/nl802154.h | |||
@@ -0,0 +1,122 @@ | |||
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 | #define NL802154_GENL_NAME "nl802154" | ||
23 | |||
24 | enum nl802154_commands { | ||
25 | /* don't change the order or add anything between, this is ABI! */ | ||
26 | /* currently we don't shipping this file via uapi, ignore the above one */ | ||
27 | NL802154_CMD_UNSPEC, | ||
28 | |||
29 | NL802154_CMD_GET_WPAN_PHY, /* can dump */ | ||
30 | NL802154_CMD_SET_WPAN_PHY, | ||
31 | NL802154_CMD_NEW_WPAN_PHY, | ||
32 | NL802154_CMD_DEL_WPAN_PHY, | ||
33 | |||
34 | NL802154_CMD_GET_INTERFACE, /* can dump */ | ||
35 | NL802154_CMD_SET_INTERFACE, | ||
36 | NL802154_CMD_NEW_INTERFACE, | ||
37 | NL802154_CMD_DEL_INTERFACE, | ||
38 | |||
39 | NL802154_CMD_SET_CHANNEL, | ||
40 | |||
41 | NL802154_CMD_SET_PAN_ID, | ||
42 | NL802154_CMD_SET_SHORT_ADDR, | ||
43 | |||
44 | NL802154_CMD_SET_TX_POWER, | ||
45 | NL802154_CMD_SET_CCA_MODE, | ||
46 | NL802154_CMD_SET_CCA_ED_LEVEL, | ||
47 | |||
48 | NL802154_CMD_SET_MAX_FRAME_RETRIES, | ||
49 | |||
50 | NL802154_CMD_SET_BACKOFF_EXPONENT, | ||
51 | NL802154_CMD_SET_MAX_CSMA_BACKOFFS, | ||
52 | |||
53 | NL802154_CMD_SET_LBT_MODE, | ||
54 | |||
55 | /* add new commands above here */ | ||
56 | |||
57 | /* used to define NL802154_CMD_MAX below */ | ||
58 | __NL802154_CMD_AFTER_LAST, | ||
59 | NL802154_CMD_MAX = __NL802154_CMD_AFTER_LAST - 1 | ||
60 | }; | ||
61 | |||
62 | enum nl802154_attrs { | ||
63 | /* don't change the order or add anything between, this is ABI! */ | ||
64 | /* currently we don't shipping this file via uapi, ignore the above one */ | ||
65 | NL802154_ATTR_UNSPEC, | ||
66 | |||
67 | NL802154_ATTR_WPAN_PHY, | ||
68 | NL802154_ATTR_WPAN_PHY_NAME, | ||
69 | |||
70 | NL802154_ATTR_IFINDEX, | ||
71 | NL802154_ATTR_IFNAME, | ||
72 | NL802154_ATTR_IFTYPE, | ||
73 | |||
74 | NL802154_ATTR_WPAN_DEV, | ||
75 | |||
76 | NL802154_ATTR_PAGE, | ||
77 | NL802154_ATTR_CHANNEL, | ||
78 | |||
79 | NL802154_ATTR_PAN_ID, | ||
80 | NL802154_ATTR_SHORT_ADDR, | ||
81 | |||
82 | NL802154_ATTR_TX_POWER, | ||
83 | |||
84 | NL802154_ATTR_CCA_MODE, | ||
85 | NL802154_ATTR_CCA_MODE3_AND, | ||
86 | NL802154_ATTR_CCA_ED_LEVEL, | ||
87 | |||
88 | NL802154_ATTR_MAX_FRAME_RETRIES, | ||
89 | |||
90 | NL802154_ATTR_MAX_BE, | ||
91 | NL802154_ATTR_MIN_BE, | ||
92 | NL802154_ATTR_MAX_CSMA_BACKOFFS, | ||
93 | |||
94 | NL802154_ATTR_LBT_MODE, | ||
95 | |||
96 | NL802154_ATTR_GENERATION, | ||
97 | |||
98 | NL802154_ATTR_CHANNELS_SUPPORTED, | ||
99 | NL802154_ATTR_SUPPORTED_CHANNEL, | ||
100 | |||
101 | NL802154_ATTR_EXTENDED_ADDR, | ||
102 | |||
103 | /* add attributes here, update the policy in nl802154.c */ | ||
104 | |||
105 | __NL802154_ATTR_AFTER_LAST, | ||
106 | NL802154_ATTR_MAX = __NL802154_ATTR_AFTER_LAST - 1 | ||
107 | }; | ||
108 | |||
109 | enum nl802154_iftype { | ||
110 | /* for backwards compatibility TODO */ | ||
111 | NL802154_IFTYPE_UNSPEC = -1, | ||
112 | |||
113 | NL802154_IFTYPE_NODE, | ||
114 | NL802154_IFTYPE_MONITOR, | ||
115 | NL802154_IFTYPE_COORD, | ||
116 | |||
117 | /* keep last */ | ||
118 | NUM_NL802154_IFTYPES, | ||
119 | NL802154_IFTYPE_MAX = NUM_NL802154_IFTYPES - 1 | ||
120 | }; | ||
121 | |||
122 | #endif /* __NL802154_H */ | ||