summaryrefslogtreecommitdiff
path: root/net/mac802154/main.c
diff options
context:
space:
mode:
authorAlexander Aring <alex.aring@gmail.com>2014-10-28 20:21:17 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-10-29 01:19:06 +0300
commit19ec690a431d8ebf3e9d939160dc223ad40d7d63 (patch)
treebff5e0cbad08b472371af553973526393252c42e /net/mac802154/main.c
parentb9ff77e50c6e469db63dfc8fcc62586522649cd3 (diff)
downloadlinux-19ec690a431d8ebf3e9d939160dc223ad40d7d63.tar.xz
mac802154: main: move open and close into iface
These functions can be static inside the iface file, because it's not used anywhere else. This patch moves these functions into iface file. 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.c59
1 files changed, 0 insertions, 59 deletions
diff --git a/net/mac802154/main.c b/net/mac802154/main.c
index ff0de0f990cb..2c6d77259822 100644
--- a/net/mac802154/main.c
+++ b/net/mac802154/main.c
@@ -29,65 +29,6 @@
#include "ieee802154_i.h"
-int mac802154_slave_open(struct net_device *dev)
-{
- struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
- struct ieee802154_sub_if_data *subif;
- struct ieee802154_local *local = sdata->local;
- int res = 0;
-
- ASSERT_RTNL();
-
- if (sdata->type == IEEE802154_DEV_WPAN) {
- mutex_lock(&sdata->local->iflist_mtx);
- list_for_each_entry(subif, &sdata->local->interfaces, list) {
- if (subif != sdata && subif->type == sdata->type &&
- subif->running) {
- mutex_unlock(&sdata->local->iflist_mtx);
- return -EBUSY;
- }
- }
- mutex_unlock(&sdata->local->iflist_mtx);
- }
-
- mutex_lock(&sdata->local->iflist_mtx);
- sdata->running = true;
- mutex_unlock(&sdata->local->iflist_mtx);
-
- if (local->open_count++ == 0) {
- res = local->ops->start(&local->hw);
- WARN_ON(res);
- if (res)
- goto err;
- }
-
- netif_start_queue(dev);
- return 0;
-err:
- sdata->local->open_count--;
-
- return res;
-}
-
-int mac802154_slave_close(struct net_device *dev)
-{
- struct ieee802154_sub_if_data *sdata = IEEE802154_DEV_TO_SUB_IF(dev);
- struct ieee802154_local *local = sdata->local;
-
- ASSERT_RTNL();
-
- netif_stop_queue(dev);
-
- mutex_lock(&sdata->local->iflist_mtx);
- sdata->running = false;
- mutex_unlock(&sdata->local->iflist_mtx);
-
- if (!--local->open_count)
- local->ops->stop(&local->hw);
-
- return 0;
-}
-
static int
mac802154_netdev_register(struct wpan_phy *phy, struct net_device *dev)
{