Skip to content

Commit

Permalink
batman-adv: Drop deprecated sysfs support
Browse files Browse the repository at this point in the history
The sysfs in batman-adv support was marked as deprecated by the commit
42cdd52 ("batman-adv: ABI: Mark sysfs files as deprecated") and
scheduled for removal in 2021.

Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
  • Loading branch information
ecsv authored and simonwunderlich committed Dec 4, 2020
1 parent a5ad457 commit 76e9f27
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 1,634 deletions.
32 changes: 0 additions & 32 deletions Documentation/ABI/obsolete/sysfs-class-net-batman-adv

This file was deleted.

110 changes: 0 additions & 110 deletions Documentation/ABI/obsolete/sysfs-class-net-mesh

This file was deleted.

2 changes: 0 additions & 2 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3120,8 +3120,6 @@ Q: https://patchwork.open-mesh.org/project/batman/list/
B: https://www.open-mesh.org/projects/batman-adv/issues
C: irc://chat.freenode.net/batman
T: git https://git.open-mesh.org/linux-merge.git
F: Documentation/ABI/obsolete/sysfs-class-net-batman-adv
F: Documentation/ABI/obsolete/sysfs-class-net-mesh
F: Documentation/networking/batman-adv.rst
F: include/uapi/linux/batadv_packet.h
F: include/uapi/linux/batman_adv.h
Expand Down
11 changes: 0 additions & 11 deletions net/batman-adv/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -97,17 +97,6 @@ config BATMAN_ADV_DEBUG
buffer. The output is controlled via the batadv netdev specific
log_level setting.

config BATMAN_ADV_SYSFS
bool "batman-adv sysfs entries"
depends on BATMAN_ADV
help
Say Y here if you want to enable batman-adv device configuration and
status interface through sysfs attributes. It is replaced by the
batadv generic netlink family but still used by various userspace
tools and scripts.

If unsure, say Y.

config BATMAN_ADV_TRACING
bool "B.A.T.M.A.N. tracing support"
depends on BATMAN_ADV
Expand Down
1 change: 0 additions & 1 deletion net/batman-adv/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ batman-adv-y += originator.o
batman-adv-y += routing.o
batman-adv-y += send.o
batman-adv-y += soft-interface.o
batman-adv-$(CONFIG_BATMAN_ADV_SYSFS) += sysfs.o
batman-adv-$(CONFIG_BATMAN_ADV_TRACING) += trace.o
batman-adv-y += tp_meter.o
batman-adv-y += translation-table.o
Expand Down
9 changes: 0 additions & 9 deletions net/batman-adv/bat_v.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include <linux/if_ether.h>
#include <linux/init.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/kref.h>
#include <linux/list.h>
#include <linux/minmax.h>
Expand Down Expand Up @@ -686,13 +685,6 @@ static ssize_t batadv_v_store_sel_class(struct batadv_priv *bat_priv,
return count;
}

static ssize_t batadv_v_show_sel_class(struct batadv_priv *bat_priv, char *buff)
{
u32 class = atomic_read(&bat_priv->gw.sel_class);

return sprintf(buff, "%u.%u MBit\n", class / 10, class % 10);
}

/**
* batadv_v_gw_throughput_get() - retrieve the GW-bandwidth for a given GW
* @gw_node: the GW to retrieve the metric for
Expand Down Expand Up @@ -1061,7 +1053,6 @@ static struct batadv_algo_ops batadv_batman_v __read_mostly = {
.gw = {
.init_sel_class = batadv_v_init_sel_class,
.store_sel_class = batadv_v_store_sel_class,
.show_sel_class = batadv_v_show_sel_class,
.get_best_gw_node = batadv_v_gw_get_best_gw_node,
.is_eligible = batadv_v_gw_is_eligible,
#ifdef CONFIG_BATMAN_ADV_DEBUGFS
Expand Down
16 changes: 1 addition & 15 deletions net/batman-adv/hard-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "originator.h"
#include "send.h"
#include "soft-interface.h"
#include "sysfs.h"
#include "translation-table.h"

/**
Expand Down Expand Up @@ -889,13 +888,9 @@ void batadv_hardif_disable_interface(struct batadv_hard_iface *hard_iface,
batadv_hardif_recalc_extra_skbroom(hard_iface->soft_iface);

/* nobody uses this interface anymore */
if (batadv_hardif_cnt(hard_iface->soft_iface) <= 1) {
if (batadv_hardif_cnt(hard_iface->soft_iface) <= 1)
batadv_gw_check_client_stop(bat_priv);

if (autodel == BATADV_IF_CLEANUP_AUTO)
batadv_softif_destroy_sysfs(hard_iface->soft_iface);
}

hard_iface->soft_iface = NULL;
batadv_hardif_put(hard_iface);

Expand All @@ -908,7 +903,6 @@ static struct batadv_hard_iface *
batadv_hardif_add_interface(struct net_device *net_dev)
{
struct batadv_hard_iface *hard_iface;
int ret;

ASSERT_RTNL();

Expand All @@ -921,10 +915,6 @@ batadv_hardif_add_interface(struct net_device *net_dev)
if (!hard_iface)
goto release_dev;

ret = batadv_sysfs_add_hardif(&hard_iface->hardif_obj, net_dev);
if (ret)
goto free_if;

hard_iface->net_dev = net_dev;
hard_iface->soft_iface = NULL;
hard_iface->if_status = BATADV_IF_NOT_IN_USE;
Expand Down Expand Up @@ -954,8 +944,6 @@ batadv_hardif_add_interface(struct net_device *net_dev)

return hard_iface;

free_if:
kfree(hard_iface);
release_dev:
dev_put(net_dev);
out:
Expand All @@ -976,7 +964,6 @@ static void batadv_hardif_remove_interface(struct batadv_hard_iface *hard_iface)

hard_iface->if_status = BATADV_IF_TO_BE_REMOVED;
batadv_debugfs_del_hardif(hard_iface);
batadv_sysfs_del_hardif(&hard_iface->hardif_obj);
batadv_hardif_put(hard_iface);
}

Expand All @@ -994,7 +981,6 @@ static int batadv_hard_if_event_softif(unsigned long event,

switch (event) {
case NETDEV_REGISTER:
batadv_sysfs_add_meshif(net_dev);
bat_priv = netdev_priv(net_dev);
batadv_softif_create_vlan(bat_priv, BATADV_NO_FLAGS);
break;
Expand Down
6 changes: 0 additions & 6 deletions net/batman-adv/hard-interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ enum batadv_hard_if_state {

/** @BATADV_IF_TO_BE_ACTIVATED: interface is getting activated */
BATADV_IF_TO_BE_ACTIVATED,

/**
* @BATADV_IF_I_WANT_YOU: interface is queued up (using sysfs) for being
* added as slave interface of a batman-adv soft interface
*/
BATADV_IF_I_WANT_YOU,
};

/**
Expand Down
Loading

0 comments on commit 76e9f27

Please sign in to comment.