diff options
author | Alexander Aring <alex.aring@gmail.com> | 2014-11-05 20:51:14 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-11-05 21:53:03 +0100 |
commit | b210b18747cb511bb71f6a49c97e8d38f639b435 (patch) | |
tree | 644fad3528a37d44a6e85e6bdbea3ced09c2ac8b /net/mac802154/iface.c | |
parent | 9f3295b9ea8e54a6c65231d267f069edf420b64f (diff) | |
download | blackbird-op-linux-b210b18747cb511bb71f6a49c97e8d38f639b435.tar.gz blackbird-op-linux-b210b18747cb511bb71f6a49c97e8d38f639b435.zip |
mac802154: move interface del handling in iface
This patch moves and rename the mac802154_del_iface function into
iface.c and rename the function to ieee802154_if_remove which is a similar
naming convention like mac80211.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/mac802154/iface.c')
-rw-r--r-- | net/mac802154/iface.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/mac802154/iface.c b/net/mac802154/iface.c index 0c9d00c83654..9d6012e430de 100644 --- a/net/mac802154/iface.c +++ b/net/mac802154/iface.c @@ -443,3 +443,15 @@ void mac802154_monitor_setup(struct net_device *dev) sdata->promisuous_mode = true; } + +void ieee802154_if_remove(struct ieee802154_sub_if_data *sdata) +{ + ASSERT_RTNL(); + + mutex_lock(&sdata->local->iflist_mtx); + list_del_rcu(&sdata->list); + mutex_unlock(&sdata->local->iflist_mtx); + + synchronize_rcu(); + unregister_netdevice(sdata->dev); +} |