Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=be577ddc2b4aca0849f701222f5bc13cf1b79c9a
Commit:     be577ddc2b4aca0849f701222f5bc13cf1b79c9a
Parent:     63f3444fb9a54c024d55f1205f8b94e7d2786595
Author:     Thomas Graf <[EMAIL PROTECTED]>
AuthorDate: Thu Mar 22 11:55:50 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Apr 25 22:27:09 2007 -0700

    [PKT_SCHED] qdisc: Use rtnl registration interface
    
    Signed-off-by: Thomas Graf <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 include/net/sch_generic.h |    2 +-
 net/sched/sch_api.c       |   27 +++++++--------------------
 2 files changed, 8 insertions(+), 21 deletions(-)

diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 8208639..a3f4ddd 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -5,10 +5,10 @@
 #include <linux/types.h>
 #include <linux/rcupdate.h>
 #include <linux/module.h>
-#include <linux/rtnetlink.h>
 #include <linux/pkt_sched.h>
 #include <linux/pkt_cls.h>
 #include <net/gen_stats.h>
+#include <net/rtnetlink.h>
 
 struct Qdisc_ops;
 struct qdisc_walker;
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index 0b9abea..b06f202 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -27,7 +27,6 @@
 #include <linux/interrupt.h>
 #include <linux/netdevice.h>
 #include <linux/skbuff.h>
-#include <linux/rtnetlink.h>
 #include <linux/init.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
@@ -1239,29 +1238,17 @@ static const struct file_operations psched_fops = {
 
 static int __init pktsched_init(void)
 {
-       struct rtnetlink_link *link_p;
-
-       link_p = rtnetlink_links[PF_UNSPEC];
-
-       /* Setup rtnetlink links. It is made here to avoid
-          exporting large number of public symbols.
-        */
-
-       if (link_p) {
-               link_p[RTM_NEWQDISC-RTM_BASE].doit = tc_modify_qdisc;
-               link_p[RTM_DELQDISC-RTM_BASE].doit = tc_get_qdisc;
-               link_p[RTM_GETQDISC-RTM_BASE].doit = tc_get_qdisc;
-               link_p[RTM_GETQDISC-RTM_BASE].dumpit = tc_dump_qdisc;
-               link_p[RTM_NEWTCLASS-RTM_BASE].doit = tc_ctl_tclass;
-               link_p[RTM_DELTCLASS-RTM_BASE].doit = tc_ctl_tclass;
-               link_p[RTM_GETTCLASS-RTM_BASE].doit = tc_ctl_tclass;
-               link_p[RTM_GETTCLASS-RTM_BASE].dumpit = tc_dump_tclass;
-       }
-
        register_qdisc(&pfifo_qdisc_ops);
        register_qdisc(&bfifo_qdisc_ops);
        proc_net_fops_create("psched", 0, &psched_fops);
 
+       rtnl_register(PF_UNSPEC, RTM_NEWQDISC, tc_modify_qdisc, NULL);
+       rtnl_register(PF_UNSPEC, RTM_DELQDISC, tc_get_qdisc, NULL);
+       rtnl_register(PF_UNSPEC, RTM_GETQDISC, tc_get_qdisc, tc_dump_qdisc);
+       rtnl_register(PF_UNSPEC, RTM_NEWTCLASS, tc_ctl_tclass, NULL);
+       rtnl_register(PF_UNSPEC, RTM_DELTCLASS, tc_ctl_tclass, NULL);
+       rtnl_register(PF_UNSPEC, RTM_GETTCLASS, tc_ctl_tclass, tc_dump_tclass);
+
        return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to