summaryrefslogtreecommitdiffstats
path: root/net/mac802154/main.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-11-12 03:36:48 +0100
committerMarcel Holtmann <marcel@holtmann.org>2014-11-12 05:10:35 +0100
commit592dfbfc72f5352437c883aa11ab579d10cdb595 (patch)
tree628e6a9521161d134f98140c15748f7a782035a0 /net/mac802154/main.c
parent4e7902267708e5a389398d9014455b2ed4892912 (diff)
downloadop-kernel-dev-592dfbfc72f5352437c883aa11ab579d10cdb595.zip
op-kernel-dev-592dfbfc72f5352437c883aa11ab579d10cdb595.tar.gz
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>
Diffstat (limited to 'net/mac802154/main.c')
-rw-r--r--net/mac802154/main.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index 234084d..709dcc5 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -165,7 +165,6 @@ EXPORT_SYMBOL(ieee802154_register_hw);
void ieee802154_unregister_hw(struct ieee802154_hw *hw)
{
struct ieee802154_local *local = hw_to_local(hw);
- struct ieee802154_sub_if_data *sdata, *next;
tasklet_kill(&local->tasklet);
flush_workqueue(local->workqueue);
@@ -173,13 +172,7 @@ void ieee802154_unregister_hw(struct ieee802154_hw *hw)
rtnl_lock();
- 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);
- }
+ ieee802154_remove_interfaces(local);
rtnl_unlock();
OpenPOWER on IntegriCloud