]>
Commit | Line | Data |
---|---|---|
4a9a816a AA |
1 | #ifndef __CFG802154_RDEV_OPS |
2 | #define __CFG802154_RDEV_OPS | |
3 | ||
4 | #include <net/cfg802154.h> | |
5 | ||
6 | #include "core.h" | |
7 | ||
8 | static inline struct net_device * | |
9 | rdev_add_virtual_intf_deprecated(struct cfg802154_registered_device *rdev, | |
10 | const char *name, int type) | |
11 | { | |
12 | return rdev->ops->add_virtual_intf_deprecated(&rdev->wpan_phy, name, | |
13 | type); | |
14 | } | |
15 | ||
16 | static inline void | |
17 | rdev_del_virtual_intf_deprecated(struct cfg802154_registered_device *rdev, | |
18 | struct net_device *dev) | |
19 | { | |
20 | rdev->ops->del_virtual_intf_deprecated(&rdev->wpan_phy, dev); | |
21 | } | |
22 | ||
f3ea5e44 AA |
23 | static inline int |
24 | rdev_add_virtual_intf(struct cfg802154_registered_device *rdev, char *name, | |
0e57547e | 25 | enum nl802154_iftype type, __le64 extended_addr) |
f3ea5e44 | 26 | { |
0e57547e AA |
27 | return rdev->ops->add_virtual_intf(&rdev->wpan_phy, name, type, |
28 | extended_addr); | |
f3ea5e44 AA |
29 | } |
30 | ||
b821ecd4 AA |
31 | static inline int |
32 | rdev_del_virtual_intf(struct cfg802154_registered_device *rdev, | |
33 | struct wpan_dev *wpan_dev) | |
34 | { | |
35 | return rdev->ops->del_virtual_intf(&rdev->wpan_phy, wpan_dev); | |
36 | } | |
37 | ||
ab0bd561 | 38 | static inline int |
628b1e11 | 39 | rdev_set_channel(struct cfg802154_registered_device *rdev, u8 page, u8 channel) |
ab0bd561 AA |
40 | { |
41 | return rdev->ops->set_channel(&rdev->wpan_phy, page, channel); | |
42 | } | |
43 | ||
ba2a9506 AA |
44 | static inline int |
45 | rdev_set_cca_mode(struct cfg802154_registered_device *rdev, | |
46 | const struct wpan_phy_cca *cca) | |
47 | { | |
48 | return rdev->ops->set_cca_mode(&rdev->wpan_phy, cca); | |
49 | } | |
50 | ||
702bf371 AA |
51 | static inline int |
52 | rdev_set_pan_id(struct cfg802154_registered_device *rdev, | |
ee7b9053 | 53 | struct wpan_dev *wpan_dev, __le16 pan_id) |
702bf371 AA |
54 | { |
55 | return rdev->ops->set_pan_id(&rdev->wpan_phy, wpan_dev, pan_id); | |
56 | } | |
57 | ||
9830c62a AA |
58 | static inline int |
59 | rdev_set_short_addr(struct cfg802154_registered_device *rdev, | |
ee7b9053 | 60 | struct wpan_dev *wpan_dev, __le16 short_addr) |
9830c62a AA |
61 | { |
62 | return rdev->ops->set_short_addr(&rdev->wpan_phy, wpan_dev, short_addr); | |
63 | } | |
64 | ||
656a999e AA |
65 | static inline int |
66 | rdev_set_backoff_exponent(struct cfg802154_registered_device *rdev, | |
628b1e11 | 67 | struct wpan_dev *wpan_dev, u8 min_be, u8 max_be) |
656a999e AA |
68 | { |
69 | return rdev->ops->set_backoff_exponent(&rdev->wpan_phy, wpan_dev, | |
70 | min_be, max_be); | |
71 | } | |
72 | ||
a01ba765 AA |
73 | static inline int |
74 | rdev_set_max_csma_backoffs(struct cfg802154_registered_device *rdev, | |
628b1e11 | 75 | struct wpan_dev *wpan_dev, u8 max_csma_backoffs) |
a01ba765 AA |
76 | { |
77 | return rdev->ops->set_max_csma_backoffs(&rdev->wpan_phy, wpan_dev, | |
78 | max_csma_backoffs); | |
79 | } | |
80 | ||
17a3a46b AA |
81 | static inline int |
82 | rdev_set_max_frame_retries(struct cfg802154_registered_device *rdev, | |
628b1e11 | 83 | struct wpan_dev *wpan_dev, s8 max_frame_retries) |
17a3a46b AA |
84 | { |
85 | return rdev->ops->set_max_frame_retries(&rdev->wpan_phy, wpan_dev, | |
86 | max_frame_retries); | |
87 | } | |
88 | ||
c8937a1d AA |
89 | static inline int |
90 | rdev_set_lbt_mode(struct cfg802154_registered_device *rdev, | |
628b1e11 | 91 | struct wpan_dev *wpan_dev, bool mode) |
c8937a1d AA |
92 | { |
93 | return rdev->ops->set_lbt_mode(&rdev->wpan_phy, wpan_dev, mode); | |
94 | } | |
95 | ||
4a9a816a | 96 | #endif /* __CFG802154_RDEV_OPS */ |