mac820154: move interface unregistration into iface
This patch move the iface unregistration into iface.c file to have a behaviour which is similar like mac80211. Also iface handling should be inside iface.c file only. 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
4e79022677
commit
592dfbfc72
@@ -535,3 +535,16 @@ void ieee802154_if_remove(struct ieee802154_sub_if_data *sdata)
|
||||
synchronize_rcu();
|
||||
unregister_netdevice(sdata->dev);
|
||||
}
|
||||
|
||||
void ieee802154_remove_interfaces(struct ieee802154_local *local)
|
||||
{
|
||||
struct ieee802154_sub_if_data *sdata, *next;
|
||||
|
||||
list_for_each_entry_safe(sdata, next, &local->interfaces, list) {
|
||||
mutex_lock(&sdata->local->iflist_mtx);
|
||||
list_del(&sdata->list);
|
||||
mutex_unlock(&sdata->local->iflist_mtx);
|
||||
|
||||
unregister_netdevice(sdata->dev);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user