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>
This commit is contained in:

committed by
Marcel Holtmann

parent
133d3f3172
commit
f3ea5e4423
@@ -42,6 +42,20 @@ static void ieee802154_del_iface_deprecated(struct wpan_phy *wpan_phy,
|
||||
ieee802154_if_remove(sdata);
|
||||
}
|
||||
|
||||
static int
|
||||
ieee802154_add_iface(struct wpan_phy *phy, const char *name,
|
||||
enum nl802154_iftype type)
|
||||
{
|
||||
struct ieee802154_local *local = wpan_phy_priv(phy);
|
||||
struct net_device *err;
|
||||
|
||||
err = ieee802154_if_add(local, name, type);
|
||||
if (IS_ERR(err))
|
||||
return PTR_ERR(err);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
ieee802154_set_channel(struct wpan_phy *wpan_phy, u8 page, u8 channel)
|
||||
{
|
||||
@@ -175,6 +189,7 @@ ieee802154_set_lbt_mode(struct wpan_phy *wpan_phy, struct wpan_dev *wpan_dev,
|
||||
const struct cfg802154_ops mac802154_config_ops = {
|
||||
.add_virtual_intf_deprecated = ieee802154_add_iface_deprecated,
|
||||
.del_virtual_intf_deprecated = ieee802154_del_iface_deprecated,
|
||||
.add_virtual_intf = ieee802154_add_iface,
|
||||
.set_channel = ieee802154_set_channel,
|
||||
.set_pan_id = ieee802154_set_pan_id,
|
||||
.set_short_addr = ieee802154_set_short_addr,
|
||||
|
Reference in New Issue
Block a user