aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Aring2014-11-12 03:36:57 +0100
committerMarcel Holtmann2014-11-12 05:10:39 +0100
commit702bf371282f5912fe53f0b247fa2d7df9d7951f (patch)
tree123edbe0d9a6f8a361507bff5c7da83e1d0bd88d /include
parent820bd66fb28ce0c47cb024895d8bace58f5be56d (diff)
ieee820154: add pan_id setting support
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>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ieee802154.h2
-rw-r--r--include/net/cfg802154.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/ieee802154.h b/include/linux/ieee802154.h
index d043449a079d..d40379876b84 100644
--- a/include/linux/ieee802154.h
+++ b/include/linux/ieee802154.h
@@ -30,6 +30,8 @@
#define IEEE802154_MTU 127
#define IEEE802154_MIN_PSDU_LEN 5
+#define IEEE802154_PAN_ID_BROADCAST 0xffff
+
#define IEEE802154_EXTENDED_ADDR_LEN 8
#define IEEE802154_FC_TYPE_BEACON 0x0 /* Frame is beacon */
diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
index 391fdb37208d..d07b0726b285 100644
--- a/include/net/cfg802154.h
+++ b/include/net/cfg802154.h
@@ -38,6 +38,8 @@ struct cfg802154_ops {
void (*del_virtual_intf_deprecated)(struct wpan_phy *wpan_phy,
struct net_device *dev);
int (*set_channel)(struct wpan_phy *wpan_phy, u8 page, u8 channel);
+ int (*set_pan_id)(struct wpan_phy *wpan_phy,
+ struct wpan_dev *wpan_dev, u16 pan_id);
};
struct wpan_phy {