xref: /openbmc/linux/net/ieee802154/rdev-ops.h (revision 702bf371)
14a9a816aSAlexander Aring #ifndef __CFG802154_RDEV_OPS
24a9a816aSAlexander Aring #define __CFG802154_RDEV_OPS
34a9a816aSAlexander Aring 
44a9a816aSAlexander Aring #include <net/cfg802154.h>
54a9a816aSAlexander Aring 
64a9a816aSAlexander Aring #include "core.h"
74a9a816aSAlexander Aring 
84a9a816aSAlexander Aring static inline struct net_device *
94a9a816aSAlexander Aring rdev_add_virtual_intf_deprecated(struct cfg802154_registered_device *rdev,
104a9a816aSAlexander Aring 				 const char *name, int type)
114a9a816aSAlexander Aring {
124a9a816aSAlexander Aring 	return rdev->ops->add_virtual_intf_deprecated(&rdev->wpan_phy, name,
134a9a816aSAlexander Aring 						      type);
144a9a816aSAlexander Aring }
154a9a816aSAlexander Aring 
164a9a816aSAlexander Aring static inline void
174a9a816aSAlexander Aring rdev_del_virtual_intf_deprecated(struct cfg802154_registered_device *rdev,
184a9a816aSAlexander Aring 				 struct net_device *dev)
194a9a816aSAlexander Aring {
204a9a816aSAlexander Aring 	rdev->ops->del_virtual_intf_deprecated(&rdev->wpan_phy, dev);
214a9a816aSAlexander Aring }
224a9a816aSAlexander Aring 
23ab0bd561SAlexander Aring static inline int
24ab0bd561SAlexander Aring rdev_set_channel(struct cfg802154_registered_device *rdev, const u8 page,
25ab0bd561SAlexander Aring 		 const u8 channel)
26ab0bd561SAlexander Aring {
27ab0bd561SAlexander Aring 	return rdev->ops->set_channel(&rdev->wpan_phy, page, channel);
28ab0bd561SAlexander Aring }
29ab0bd561SAlexander Aring 
30702bf371SAlexander Aring static inline int
31702bf371SAlexander Aring rdev_set_pan_id(struct cfg802154_registered_device *rdev,
32702bf371SAlexander Aring 		struct wpan_dev *wpan_dev, u16 pan_id)
33702bf371SAlexander Aring {
34702bf371SAlexander Aring 	return rdev->ops->set_pan_id(&rdev->wpan_phy, wpan_dev, pan_id);
35702bf371SAlexander Aring }
36702bf371SAlexander Aring 
374a9a816aSAlexander Aring #endif /* __CFG802154_RDEV_OPS */
38