net: Remove unused neighbour layer ops.
authorDavid S. Miller <davem@davemloft.net>
Tue, 13 Dec 2011 21:44:22 +0000 (16:44 -0500)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Dec 2011 21:44:22 +0000 (16:44 -0500)
It's simpler to just keep these things out until there is a real user
of them, so we can see what the needs actually are, rather than keep
these things around as useless overhead.

Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
include/net/neighbour.h
net/core/neighbour.c

index 603730804da560e8cd9cb0cfd856a4fa2ba13ff3..6b9d4edb7c2685440844006a3278a550202490fd 100644 (file)
@@ -974,7 +974,6 @@ struct net_device_ops {
        int                     (*ndo_set_features)(struct net_device *dev,
                                                    netdev_features_t features);
        int                     (*ndo_neigh_construct)(struct neighbour *n);
-       void                    (*ndo_neigh_destroy)(struct neighbour *n);
 };
 
 /*
index e31f0a86f9b74527026d8fa3d0db035e403c3a4a..6814c4d61c1c02c3507ad00daab520e8d367760c 100644 (file)
@@ -43,7 +43,6 @@ struct neigh_parms {
 #endif
        struct net_device *dev;
        struct neigh_parms *next;
-       int     (*neigh_setup)(struct neighbour *);
        void    (*neigh_cleanup)(struct neighbour *);
        struct neigh_table *tbl;
 
index 4af151e1bf5dbcfd2abffc432e0b57e7a2a21877..d57a40a2598cc027b3899019a5e8b7f90bbc98c9 100644 (file)
@@ -497,13 +497,6 @@ struct neighbour *neigh_create(struct neigh_table *tbl, const void *pkey,
                }
        }
 
-       /* Device specific setup. */
-       if (n->parms->neigh_setup &&
-           (error = n->parms->neigh_setup(n)) < 0) {
-               rc = ERR_PTR(error);
-               goto out_neigh_release;
-       }
-
        n->confirmed = jiffies - (n->parms->base_reachable_time << 1);
 
        write_lock_bh(&tbl->lock);
@@ -717,9 +710,6 @@ void neigh_destroy(struct neighbour *neigh)
        skb_queue_purge(&neigh->arp_queue);
        neigh->arp_queue_len_bytes = 0;
 
-       if (dev->netdev_ops->ndo_neigh_destroy)
-               dev->netdev_ops->ndo_neigh_destroy(neigh);
-
        dev_put(dev);
        neigh_parms_put(neigh->parms);