Skip to content

Commit

Permalink
batman-adv: remove old bridge loop avoidance code
Browse files Browse the repository at this point in the history
The functionality is to be replaced by an improved implementation,
so first clean up.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
  • Loading branch information
Simon Wunderlich authored and Antonio Quartulli committed Apr 11, 2012
1 parent 8681a1c commit a7f6ee9
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 517 deletions.
8 changes: 0 additions & 8 deletions net/batman-adv/bat_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,12 +238,6 @@ static int gateways_open(struct inode *inode, struct file *file)
return single_open(file, gw_client_seq_print_text, net_dev);
}

static int softif_neigh_open(struct inode *inode, struct file *file)
{
struct net_device *net_dev = (struct net_device *)inode->i_private;
return single_open(file, softif_neigh_seq_print_text, net_dev);
}

static int transtable_global_open(struct inode *inode, struct file *file)
{
struct net_device *net_dev = (struct net_device *)inode->i_private;
Expand Down Expand Up @@ -282,15 +276,13 @@ struct bat_debuginfo bat_debuginfo_##_name = { \
static BAT_DEBUGINFO(routing_algos, S_IRUGO, bat_algorithms_open);
static BAT_DEBUGINFO(originators, S_IRUGO, originators_open);
static BAT_DEBUGINFO(gateways, S_IRUGO, gateways_open);
static BAT_DEBUGINFO(softif_neigh, S_IRUGO, softif_neigh_open);
static BAT_DEBUGINFO(transtable_global, S_IRUGO, transtable_global_open);
static BAT_DEBUGINFO(transtable_local, S_IRUGO, transtable_local_open);
static BAT_DEBUGINFO(vis_data, S_IRUGO, vis_data_open);

static struct bat_debuginfo *mesh_debuginfos[] = {
&bat_debuginfo_originators,
&bat_debuginfo_gateways,
&bat_debuginfo_softif_neigh,
&bat_debuginfo_transtable_global,
&bat_debuginfo_transtable_local,
&bat_debuginfo_vis_data,
Expand Down
5 changes: 0 additions & 5 deletions net/batman-adv/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,10 @@ int mesh_init(struct net_device *soft_iface)
spin_lock_init(&bat_priv->gw_list_lock);
spin_lock_init(&bat_priv->vis_hash_lock);
spin_lock_init(&bat_priv->vis_list_lock);
spin_lock_init(&bat_priv->softif_neigh_lock);
spin_lock_init(&bat_priv->softif_neigh_vid_lock);

INIT_HLIST_HEAD(&bat_priv->forw_bat_list);
INIT_HLIST_HEAD(&bat_priv->forw_bcast_list);
INIT_HLIST_HEAD(&bat_priv->gw_list);
INIT_HLIST_HEAD(&bat_priv->softif_neigh_vids);
INIT_LIST_HEAD(&bat_priv->tt_changes_list);
INIT_LIST_HEAD(&bat_priv->tt_req_list);
INIT_LIST_HEAD(&bat_priv->tt_roam_list);
Expand Down Expand Up @@ -145,8 +142,6 @@ void mesh_free(struct net_device *soft_iface)

tt_free(bat_priv);

softif_neigh_purge(bat_priv);

atomic_set(&bat_priv->mesh_state, MESH_INACTIVE);
}

Expand Down
2 changes: 0 additions & 2 deletions net/batman-adv/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@
#define MAX_AGGREGATION_BYTES 512
#define MAX_AGGREGATION_MS 100

#define SOFTIF_NEIGH_TIMEOUT 180000 /* 3 minutes */

/* don't reset again within 30 seconds */
#define RESET_PROTECTION_MS 30000
#define EXPECTED_SEQNO_RANGE 65536
Expand Down
2 changes: 0 additions & 2 deletions net/batman-adv/originator.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,6 @@ static void _purge_orig(struct bat_priv *bat_priv)

gw_node_purge(bat_priv);
gw_election(bat_priv);

softif_neigh_purge(bat_priv);
}

static void purge_orig(struct work_struct *work)
Expand Down
5 changes: 4 additions & 1 deletion net/batman-adv/routing.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
#include "vis.h"
#include "unicast.h"

static int route_unicast_packet(struct sk_buff *skb,
struct hard_iface *recv_if);

void slide_own_bcast_window(struct hard_iface *hard_iface)
{
struct bat_priv *bat_priv = netdev_priv(hard_iface->soft_iface);
Expand Down Expand Up @@ -798,7 +801,7 @@ static int check_unicast_packet(struct sk_buff *skb, int hdr_size)
return 0;
}

int route_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if)
static int route_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if)
{
struct bat_priv *bat_priv = netdev_priv(recv_if->soft_iface);
struct orig_node *orig_node = NULL;
Expand Down
1 change: 0 additions & 1 deletion net/batman-adv/routing.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
void slide_own_bcast_window(struct hard_iface *hard_iface);
void update_route(struct bat_priv *bat_priv, struct orig_node *orig_node,
struct neigh_node *neigh_node);
int route_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if);
int recv_icmp_packet(struct sk_buff *skb, struct hard_iface *recv_if);
int recv_unicast_packet(struct sk_buff *skb, struct hard_iface *recv_if);
int recv_ucast_frag_packet(struct sk_buff *skb, struct hard_iface *recv_if);
Expand Down
Loading

0 comments on commit a7f6ee9

Please sign in to comment.