xref: /linux/drivers/net/ieee802154/mac802154_hwsim.h (revision 3d0fe49454652117522f60bfbefb978ba0e5300b)
1 #ifndef __MAC802154_HWSIM_H
2 #define __MAC802154_HWSIM_H
3 
4 /* mac802154 hwsim netlink commands
5  *
6  * @MAC802154_HWSIM_CMD_UNSPEC: unspecified command to catch error
7  * @MAC802154_HWSIM_CMD_GET_RADIO: fetch information about existing radios
8  * @MAC802154_HWSIM_CMD_SET_RADIO: change radio parameters during runtime
9  * @MAC802154_HWSIM_CMD_NEW_RADIO: create a new radio with the given parameters
10  *	returns the radio ID (>= 0) or negative on errors, if successful
11  *	then multicast the result
12  * @MAC802154_HWSIM_CMD_DEL_RADIO: destroy a radio, reply is multicasted
13  * @MAC802154_HWSIM_CMD_GET_EDGE: fetch information about existing edges
14  * @MAC802154_HWSIM_CMD_SET_EDGE: change edge parameters during runtime
15  * @MAC802154_HWSIM_CMD_DEL_EDGE: delete edges between radios
16  * @MAC802154_HWSIM_CMD_NEW_EDGE: create a new edge between two radios
17  * @__MAC802154_HWSIM_CMD_MAX: enum limit
18  */
19 enum {
20 	MAC802154_HWSIM_CMD_UNSPEC,
21 
22 	MAC802154_HWSIM_CMD_GET_RADIO,
23 	MAC802154_HWSIM_CMD_SET_RADIO,
24 	MAC802154_HWSIM_CMD_NEW_RADIO,
25 	MAC802154_HWSIM_CMD_DEL_RADIO,
26 
27 	MAC802154_HWSIM_CMD_GET_EDGE,
28 	MAC802154_HWSIM_CMD_SET_EDGE,
29 	MAC802154_HWSIM_CMD_DEL_EDGE,
30 	MAC802154_HWSIM_CMD_NEW_EDGE,
31 
32 	__MAC802154_HWSIM_CMD_MAX,
33 };
34 
35 #define MAC802154_HWSIM_CMD_MAX (__MAC802154_HWSIM_MAX - 1)
36 
37 /* mac802154 hwsim netlink attributes
38  *
39  * @MAC802154_HWSIM_ATTR_UNSPEC: unspecified attribute to catch error
40  * @MAC802154_HWSIM_ATTR_RADIO_ID: u32 attribute to identify the radio
41  * @MAC802154_HWSIM_ATTR_EDGE: nested attribute of edges
42  * @MAC802154_HWSIM_ATTR_EDGES: list if nested attributes which contains the
43  *	edge information according the radio id
44  * @__MAC802154_HWSIM_ATTR_MAX: enum limit
45  */
46 enum {
47 	MAC802154_HWSIM_ATTR_UNSPEC,
48 	MAC802154_HWSIM_ATTR_RADIO_ID,
49 	MAC802154_HWSIM_ATTR_RADIO_EDGE,
50 	MAC802154_HWSIM_ATTR_RADIO_EDGES,
51 	__MAC802154_HWSIM_ATTR_MAX,
52 };
53 
54 #define MAC802154_HWSIM_ATTR_MAX (__MAC802154_HWSIM_ATTR_MAX - 1)
55 
56 /* mac802154 hwsim edge netlink attributes
57  *
58  * @MAC802154_HWSIM_EDGE_ATTR_UNSPEC: unspecified attribute to catch error
59  * @MAC802154_HWSIM_EDGE_ATTR_ENDPOINT_ID: radio id where the edge points to
60  * @MAC802154_HWSIM_EDGE_ATTR_LQI: LQI value which the endpoint radio will
61  *	receive for this edge
62  * @__MAC802154_HWSIM_ATTR_MAX: enum limit
63  */
64 enum {
65 	MAC802154_HWSIM_EDGE_ATTR_UNSPEC,
66 	MAC802154_HWSIM_EDGE_ATTR_ENDPOINT_ID,
67 	MAC802154_HWSIM_EDGE_ATTR_LQI,
68 	__MAC802154_HWSIM_EDGE_ATTR_MAX,
69 };
70 
71 #define MAC802154_HWSIM_EDGE_ATTR_MAX (__MAC802154_HWSIM_EDGE_ATTR_MAX - 1)
72 
73 #endif /* __MAC802154_HWSIM_H */
74