aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac802154
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-11-17 02:20:51 -0500
committerMarcel Holtmann <marcel@holtmann.org>2014-11-17 03:49:16 -0500
commitf3ea5e44231a88eaea69a13410d1b80c19cfa1df (patch)
tree6cc6980d8ccbb0ef4b91d833d73dbbcc91ee7404 /net/mac802154
parent133d3f31729a62908ab98d0b6562cc1a35d3dc39 (diff)
ieee802154: add new interface command
This patch adds a new nl802154 command for adding a new interface according to a wpan phy via nl802154. Signed-off-by: Alexander Aring <alex.aring@gmail.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154')
-rw-r--r--net/mac802154/cfg.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/net/mac802154/cfg.c b/net/mac802154/cfg.c
index 2abe7e5f0974..ae1a9ef2d42c 100644
--- a/net/mac802154/cfg.c
+++ b/net/mac802154/cfg.c
@@ -43,6 +43,20 @@ static void ieee802154_del_iface_deprecated(struct wpan_phy *wpan_phy,
43} 43}
44 44
45static int 45static int
46ieee802154_add_iface(struct wpan_phy *phy, const char *name,
47 enum nl802154_iftype type)
48{
49 struct ieee802154_local *local = wpan_phy_priv(phy);
50 struct net_device *err;
51
52 err = ieee802154_if_add(local, name, type);
53 if (IS_ERR(err))
54 return PTR_ERR(err);
55
56 return 0;
57}
58
59static int
46ieee802154_set_channel(struct wpan_phy *wpan_phy, u8 page, u8 channel) 60ieee802154_set_channel(struct wpan_phy *wpan_phy, u8 page, u8 channel)
47{ 61{
48 struct ieee802154_local *local = wpan_phy_priv(wpan_phy); 62 struct ieee802154_local *local = wpan_phy_priv(wpan_phy);
@@ -175,6 +189,7 @@ ieee802154_set_lbt_mode(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
175const struct cfg802154_ops mac802154_config_ops = { 189const struct cfg802154_ops mac802154_config_ops = {
176 .add_virtual_intf_deprecated = ieee802154_add_iface_deprecated, 190 .add_virtual_intf_deprecated = ieee802154_add_iface_deprecated,
177 .del_virtual_intf_deprecated = ieee802154_del_iface_deprecated, 191 .del_virtual_intf_deprecated = ieee802154_del_iface_deprecated,
192 .add_virtual_intf = ieee802154_add_iface,
178 .set_channel = ieee802154_set_channel, 193 .set_channel = ieee802154_set_channel,
179 .set_pan_id = ieee802154_set_pan_id, 194 .set_pan_id = ieee802154_set_pan_id,
180 .set_short_addr = ieee802154_set_short_addr, 195 .set_short_addr = ieee802154_set_short_addr,