1 --- linux-2.4.30/net/sched/sch_api.c 2004-11-17 12:54:22.000000000 +0100
2 +++ linux-2.4.30-wl/net/sched/sch_api.c 2005-04-24 18:56:03.000000000 +0200
7 - list_for_each_entry(q, &dev->qdisc_list, list) {
8 + for (q = dev->qdisc_list; q; q = q->next) {
9 if (q->handle == handle)
16 struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid)
18 unsigned long cl = cops->get(parent, classid);
20 err = cops->graft(parent, cl, new, old);
22 - new->parent = classid;
23 cops->put(parent, cl);
30 - INIT_LIST_HEAD(&sch->list);
31 skb_queue_head_init(&sch->q);
33 if (handle == TC_H_INGRESS)
36 if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) {
37 write_lock(&qdisc_tree_lock);
38 - list_add_tail(&sch->list, &dev->qdisc_list);
39 + sch->next = dev->qdisc_list;
40 + dev->qdisc_list = sch;
41 write_unlock(&qdisc_tree_lock);
42 #ifdef CONFIG_NET_ESTIMATOR
47 read_lock(&qdisc_tree_lock);
49 - list_for_each_entry(q, &dev->qdisc_list, list) {
50 - if (q_idx < s_q_idx) {
54 - if (tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).pid,
55 - cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) {
56 - read_unlock(&qdisc_tree_lock);
61 + for (q = dev->qdisc_list, q_idx = 0; q;
62 + q = q->next, q_idx++) {
63 + if (q_idx < s_q_idx)
65 + if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid,
66 + cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) {
67 + read_unlock(&qdisc_tree_lock);
71 read_unlock(&qdisc_tree_lock);
74 @@ -1033,27 +1029,24 @@
77 read_lock(&qdisc_tree_lock);
78 - list_for_each_entry(q, &dev->qdisc_list, list) {
79 - if (t < s_t || !q->ops->cl_ops ||
81 - TC_H_MAJ(tcm->tcm_parent) != q->handle)) {
86 - memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0]));
87 - arg.w.fn = qdisc_class_dump;
91 - arg.w.skip = cb->args[1];
93 - q->ops->cl_ops->walk(q, &arg.w);
94 - cb->args[1] = arg.w.count;
99 + for (q=dev->qdisc_list, t=0; q; q = q->next, t++) {
100 + if (t < s_t) continue;
101 + if (!q->ops->cl_ops) continue;
102 + if (tcm->tcm_parent && TC_H_MAJ(tcm->tcm_parent) != q->handle)
105 + memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0]));
106 + arg.w.fn = qdisc_class_dump;
110 + arg.w.skip = cb->args[1];
112 + q->ops->cl_ops->walk(q, &arg.w);
113 + cb->args[1] = arg.w.count;
117 read_unlock(&qdisc_tree_lock);