1 #ifndef __CFG802154_RDEV_OPS
2 #define __CFG802154_RDEV_OPS
4 #include <net/cfg802154.h>
9 static inline struct net_device
*
10 rdev_add_virtual_intf_deprecated(struct cfg802154_registered_device
*rdev
,
12 unsigned char name_assign_type
,
15 return rdev
->ops
->add_virtual_intf_deprecated(&rdev
->wpan_phy
, name
,
16 name_assign_type
, type
);
20 rdev_del_virtual_intf_deprecated(struct cfg802154_registered_device
*rdev
,
21 struct net_device
*dev
)
23 rdev
->ops
->del_virtual_intf_deprecated(&rdev
->wpan_phy
, dev
);
27 rdev_add_virtual_intf(struct cfg802154_registered_device
*rdev
, char *name
,
28 unsigned char name_assign_type
,
29 enum nl802154_iftype type
, __le64 extended_addr
)
33 trace_802154_rdev_add_virtual_intf(&rdev
->wpan_phy
, name
, type
,
35 ret
= rdev
->ops
->add_virtual_intf(&rdev
->wpan_phy
, name
,
36 name_assign_type
, type
,
38 trace_802154_rdev_return_int(&rdev
->wpan_phy
, ret
);
43 rdev_del_virtual_intf(struct cfg802154_registered_device
*rdev
,
44 struct wpan_dev
*wpan_dev
)
48 trace_802154_rdev_del_virtual_intf(&rdev
->wpan_phy
, wpan_dev
);
49 ret
= rdev
->ops
->del_virtual_intf(&rdev
->wpan_phy
, wpan_dev
);
50 trace_802154_rdev_return_int(&rdev
->wpan_phy
, ret
);
55 rdev_set_channel(struct cfg802154_registered_device
*rdev
, u8 page
, u8 channel
)
59 trace_802154_rdev_set_channel(&rdev
->wpan_phy
, page
, channel
);
60 ret
= rdev
->ops
->set_channel(&rdev
->wpan_phy
, page
, channel
);
61 trace_802154_rdev_return_int(&rdev
->wpan_phy
, ret
);
66 rdev_set_cca_mode(struct cfg802154_registered_device
*rdev
,
67 const struct wpan_phy_cca
*cca
)
71 trace_802154_rdev_set_cca_mode(&rdev
->wpan_phy
, cca
);
72 ret
= rdev
->ops
->set_cca_mode(&rdev
->wpan_phy
, cca
);
73 trace_802154_rdev_return_int(&rdev
->wpan_phy
, ret
);
78 rdev_set_pan_id(struct cfg802154_registered_device
*rdev
,
79 struct wpan_dev
*wpan_dev
, __le16 pan_id
)
83 trace_802154_rdev_set_pan_id(&rdev
->wpan_phy
, wpan_dev
, pan_id
);
84 ret
= rdev
->ops
->set_pan_id(&rdev
->wpan_phy
, wpan_dev
, pan_id
);
85 trace_802154_rdev_return_int(&rdev
->wpan_phy
, ret
);
90 rdev_set_short_addr(struct cfg802154_registered_device
*rdev
,
91 struct wpan_dev
*wpan_dev
, __le16 short_addr
)
95 trace_802154_rdev_set_short_addr(&rdev
->wpan_phy
, wpan_dev
, short_addr
);
96 ret
= rdev
->ops
->set_short_addr(&rdev
->wpan_phy
, wpan_dev
, short_addr
);
97 trace_802154_rdev_return_int(&rdev
->wpan_phy
, ret
);
102 rdev_set_backoff_exponent(struct cfg802154_registered_device
*rdev
,
103 struct wpan_dev
*wpan_dev
, u8 min_be
, u8 max_be
)
107 trace_802154_rdev_set_backoff_exponent(&rdev
->wpan_phy
, wpan_dev
,
109 ret
= rdev
->ops
->set_backoff_exponent(&rdev
->wpan_phy
, wpan_dev
,
111 trace_802154_rdev_return_int(&rdev
->wpan_phy
, ret
);
116 rdev_set_max_csma_backoffs(struct cfg802154_registered_device
*rdev
,
117 struct wpan_dev
*wpan_dev
, u8 max_csma_backoffs
)
121 trace_802154_rdev_set_csma_backoffs(&rdev
->wpan_phy
, wpan_dev
,
123 ret
= rdev
->ops
->set_max_csma_backoffs(&rdev
->wpan_phy
, wpan_dev
,
125 trace_802154_rdev_return_int(&rdev
->wpan_phy
, ret
);
130 rdev_set_max_frame_retries(struct cfg802154_registered_device
*rdev
,
131 struct wpan_dev
*wpan_dev
, s8 max_frame_retries
)
135 trace_802154_rdev_set_max_frame_retries(&rdev
->wpan_phy
, wpan_dev
,
137 ret
= rdev
->ops
->set_max_frame_retries(&rdev
->wpan_phy
, wpan_dev
,
139 trace_802154_rdev_return_int(&rdev
->wpan_phy
, ret
);
144 rdev_set_lbt_mode(struct cfg802154_registered_device
*rdev
,
145 struct wpan_dev
*wpan_dev
, bool mode
)
149 trace_802154_rdev_set_lbt_mode(&rdev
->wpan_phy
, wpan_dev
, mode
);
150 ret
= rdev
->ops
->set_lbt_mode(&rdev
->wpan_phy
, wpan_dev
, mode
);
151 trace_802154_rdev_return_int(&rdev
->wpan_phy
, ret
);
155 #endif /* __CFG802154_RDEV_OPS */