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