aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index f35377b643e4..d102f6d9abdc 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -2417,8 +2417,7 @@ EXPORT_SYMBOL(neigh_seq_stop);
2417 2417
2418static void *neigh_stat_seq_start(struct seq_file *seq, loff_t *pos) 2418static void *neigh_stat_seq_start(struct seq_file *seq, loff_t *pos)
2419{ 2419{
2420 struct proc_dir_entry *pde = seq->private; 2420 struct neigh_table *tbl = seq->private;
2421 struct neigh_table *tbl = pde->data;
2422 int cpu; 2421 int cpu;
2423 2422
2424 if (*pos == 0) 2423 if (*pos == 0)
@@ -2435,8 +2434,7 @@ static void *neigh_stat_seq_start(struct seq_file *seq, loff_t *pos)
2435 2434
2436static void *neigh_stat_seq_next(struct seq_file *seq, void *v, loff_t *pos) 2435static void *neigh_stat_seq_next(struct seq_file *seq, void *v, loff_t *pos)
2437{ 2436{
2438 struct proc_dir_entry *pde = seq->private; 2437 struct neigh_table *tbl = seq->private;
2439 struct neigh_table *tbl = pde->data;
2440 int cpu; 2438 int cpu;
2441 2439
2442 for (cpu = *pos; cpu < nr_cpu_ids; ++cpu) { 2440 for (cpu = *pos; cpu < nr_cpu_ids; ++cpu) {
@@ -2455,8 +2453,7 @@ static void neigh_stat_seq_stop(struct seq_file *seq, void *v)
2455 2453
2456static int neigh_stat_seq_show(struct seq_file *seq, void *v) 2454static int neigh_stat_seq_show(struct seq_file *seq, void *v)
2457{ 2455{
2458 struct proc_dir_entry *pde = seq->private; 2456 struct neigh_table *tbl = seq->private;
2459 struct neigh_table *tbl = pde->data;
2460 struct neigh_statistics *st = v; 2457 struct neigh_statistics *st = v;
2461 2458
2462 if (v == SEQ_START_TOKEN) { 2459 if (v == SEQ_START_TOKEN) {
@@ -2501,7 +2498,7 @@ static int neigh_stat_seq_open(struct inode *inode, struct file *file)
2501 2498
2502 if (!ret) { 2499 if (!ret) {
2503 struct seq_file *sf = file->private_data; 2500 struct seq_file *sf = file->private_data;
2504 sf->private = PDE(inode); 2501 sf->private = PDE(inode)->data;
2505 } 2502 }
2506 return ret; 2503 return ret;
2507}; 2504};
@@ -2559,9 +2556,11 @@ EXPORT_SYMBOL(neigh_app_ns);
2559 2556
2560#ifdef CONFIG_SYSCTL 2557#ifdef CONFIG_SYSCTL
2561 2558
2559#define NEIGH_VARS_MAX 19
2560
2562static struct neigh_sysctl_table { 2561static struct neigh_sysctl_table {
2563 struct ctl_table_header *sysctl_header; 2562 struct ctl_table_header *sysctl_header;
2564 struct ctl_table neigh_vars[__NET_NEIGH_MAX]; 2563 struct ctl_table neigh_vars[NEIGH_VARS_MAX];
2565 char *dev_name; 2564 char *dev_name;
2566} neigh_sysctl_template __read_mostly = { 2565} neigh_sysctl_template __read_mostly = {
2567 .neigh_vars = { 2566 .neigh_vars = {
@@ -2678,8 +2677,7 @@ static struct neigh_sysctl_table {
2678}; 2677};
2679 2678
2680int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, 2679int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
2681 int p_id, int pdev_id, char *p_name, 2680 char *p_name, proc_handler *handler)
2682 proc_handler *handler)
2683{ 2681{
2684 struct neigh_sysctl_table *t; 2682 struct neigh_sysctl_table *t;
2685 const char *dev_name_source = NULL; 2683 const char *dev_name_source = NULL;