summaryrefslogtreecommitdiff
path: root/net/mac802154/iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac802154/iface.c')
-rw-r--r--net/mac802154/iface.c12
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);
+}