aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/pktgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r--net/core/pktgen.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index a803b442234c..8dca21110493 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3570,15 +3570,14 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
3570 if (err) 3570 if (err)
3571 goto out1; 3571 goto out1;
3572 3572
3573 pkt_dev->entry = proc_create(ifname, 0600, 3573 pkt_dev->entry = proc_create_data(ifname, 0600, pg_proc_dir,
3574 pg_proc_dir, &pktgen_if_fops); 3574 &pktgen_if_fops, pkt_dev);
3575 if (!pkt_dev->entry) { 3575 if (!pkt_dev->entry) {
3576 printk(KERN_ERR "pktgen: cannot create %s/%s procfs entry.\n", 3576 printk(KERN_ERR "pktgen: cannot create %s/%s procfs entry.\n",
3577 PG_PROC_DIR, ifname); 3577 PG_PROC_DIR, ifname);
3578 err = -EINVAL; 3578 err = -EINVAL;
3579 goto out2; 3579 goto out2;
3580 } 3580 }
3581 pkt_dev->entry->data = pkt_dev;
3582#ifdef CONFIG_XFRM 3581#ifdef CONFIG_XFRM
3583 pkt_dev->ipsmode = XFRM_MODE_TRANSPORT; 3582 pkt_dev->ipsmode = XFRM_MODE_TRANSPORT;
3584 pkt_dev->ipsproto = IPPROTO_ESP; 3583 pkt_dev->ipsproto = IPPROTO_ESP;
@@ -3628,7 +3627,8 @@ static int __init pktgen_create_thread(int cpu)
3628 kthread_bind(p, cpu); 3627 kthread_bind(p, cpu);
3629 t->tsk = p; 3628 t->tsk = p;
3630 3629
3631 pe = proc_create(t->tsk->comm, 0600, pg_proc_dir, &pktgen_thread_fops); 3630 pe = proc_create_data(t->tsk->comm, 0600, pg_proc_dir,
3631 &pktgen_thread_fops, t);
3632 if (!pe) { 3632 if (!pe) {
3633 printk(KERN_ERR "pktgen: cannot create %s/%s procfs entry.\n", 3633 printk(KERN_ERR "pktgen: cannot create %s/%s procfs entry.\n",
3634 PG_PROC_DIR, t->tsk->comm); 3634 PG_PROC_DIR, t->tsk->comm);
@@ -3638,8 +3638,6 @@ static int __init pktgen_create_thread(int cpu)
3638 return -EINVAL; 3638 return -EINVAL;
3639 } 3639 }
3640 3640
3641 pe->data = t;
3642
3643 wake_up_process(p); 3641 wake_up_process(p);
3644 3642
3645 return 0; 3643 return 0;
@@ -3716,8 +3714,6 @@ static int __init pg_init(void)
3716 return -EINVAL; 3714 return -EINVAL;
3717 } 3715 }
3718 3716
3719 pe->data = NULL;
3720
3721 /* Register us to receive netdevice events */ 3717 /* Register us to receive netdevice events */
3722 register_netdevice_notifier(&pktgen_notifier_block); 3718 register_netdevice_notifier(&pktgen_notifier_block);
3723 3719