![Alexander Aring](/assets/img/avatar_default.png)
This patch adds support for setting pan_id via nl802154 framework. Adding a comment because setting 0xffff as pan_id seems to be valid setting. The pan_id 0xffff as source pan is invalid. I am not sure now about this setting but for the current netlink interface this is an invalid setting, so we do the same now. Maybe we need to change that when we have coordinator support and association support. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
38 lines
937 B
C
38 lines
937 B
C
#ifndef __CFG802154_RDEV_OPS
|
|
#define __CFG802154_RDEV_OPS
|
|
|
|
#include <net/cfg802154.h>
|
|
|
|
#include "core.h"
|
|
|
|
static inline struct net_device *
|
|
rdev_add_virtual_intf_deprecated(struct cfg802154_registered_device *rdev,
|
|
const char *name, int type)
|
|
{
|
|
return rdev->ops->add_virtual_intf_deprecated(&rdev->wpan_phy, name,
|
|
type);
|
|
}
|
|
|
|
static inline void
|
|
rdev_del_virtual_intf_deprecated(struct cfg802154_registered_device *rdev,
|
|
struct net_device *dev)
|
|
{
|
|
rdev->ops->del_virtual_intf_deprecated(&rdev->wpan_phy, dev);
|
|
}
|
|
|
|
static inline int
|
|
rdev_set_channel(struct cfg802154_registered_device *rdev, const u8 page,
|
|
const u8 channel)
|
|
{
|
|
return rdev->ops->set_channel(&rdev->wpan_phy, page, channel);
|
|
}
|
|
|
|
static inline int
|
|
rdev_set_pan_id(struct cfg802154_registered_device *rdev,
|
|
struct wpan_dev *wpan_dev, u16 pan_id)
|
|
{
|
|
return rdev->ops->set_pan_id(&rdev->wpan_phy, wpan_dev, pan_id);
|
|
}
|
|
|
|
#endif /* __CFG802154_RDEV_OPS */
|