diff options
author | wbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-04-28 09:01:53 +0000 |
---|---|---|
committer | wbx <wbx@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-04-28 09:01:53 +0000 |
commit | fde73fe7147fbd8f1d45503cc02809099a92dc86 (patch) | |
tree | 7ad0ae7c285b28ffd37dd53176cf1d404856a53b /openwrt/package/linux/kernel-patches/204-net_sched_sched_api_c.patch | |
parent | 85c563208a38440793caba1c33d928e9ad193cb8 (diff) |
add new wl integration patches, fixes tc issues
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@743 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'openwrt/package/linux/kernel-patches/204-net_sched_sched_api_c.patch')
-rw-r--r-- | openwrt/package/linux/kernel-patches/204-net_sched_sched_api_c.patch | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/openwrt/package/linux/kernel-patches/204-net_sched_sched_api_c.patch b/openwrt/package/linux/kernel-patches/204-net_sched_sched_api_c.patch new file mode 100644 index 000000000..1f2371e50 --- /dev/null +++ b/openwrt/package/linux/kernel-patches/204-net_sched_sched_api_c.patch @@ -0,0 +1,119 @@ +--- linux-2.4.30/net/sched/sch_api.c 2004-11-17 12:54:22.000000000 +0100 ++++ linux-2.4.30-wl/net/sched/sch_api.c 2005-04-24 18:56:03.000000000 +0200 +@@ -194,11 +194,12 @@ + { + struct Qdisc *q; + +- list_for_each_entry(q, &dev->qdisc_list, list) { ++ for (q = dev->qdisc_list; q; q = q->next) { + if (q->handle == handle) + return q; + } + return NULL; ++ + } + + struct Qdisc *qdisc_leaf(struct Qdisc *p, u32 classid) +@@ -371,8 +372,6 @@ + unsigned long cl = cops->get(parent, classid); + if (cl) { + err = cops->graft(parent, cl, new, old); +- if (new) +- new->parent = classid; + cops->put(parent, cl); + } + } +@@ -427,7 +426,6 @@ + + memset(sch, 0, size); + +- INIT_LIST_HEAD(&sch->list); + skb_queue_head_init(&sch->q); + + if (handle == TC_H_INGRESS) +@@ -453,7 +451,8 @@ + + if (!ops->init || (err = ops->init(sch, tca[TCA_OPTIONS-1])) == 0) { + write_lock(&qdisc_tree_lock); +- list_add_tail(&sch->list, &dev->qdisc_list); ++ sch->next = dev->qdisc_list; ++ dev->qdisc_list = sch; + write_unlock(&qdisc_tree_lock); + #ifdef CONFIG_NET_ESTIMATOR + if (tca[TCA_RATE-1]) +@@ -808,19 +807,16 @@ + if (idx > s_idx) + s_q_idx = 0; + read_lock(&qdisc_tree_lock); +- q_idx = 0; +- list_for_each_entry(q, &dev->qdisc_list, list) { +- if (q_idx < s_q_idx) { +- q_idx++; +- continue; +- } +- if (tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).pid, +- cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) { +- read_unlock(&qdisc_tree_lock); +- goto done; +- } +- q_idx++; +- } ++ for (q = dev->qdisc_list, q_idx = 0; q; ++ q = q->next, q_idx++) { ++ if (q_idx < s_q_idx) ++ continue; ++ if (tc_fill_qdisc(skb, q, 0, NETLINK_CB(cb->skb).pid, ++ cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) { ++ read_unlock(&qdisc_tree_lock); ++ goto done; ++ } ++ } + read_unlock(&qdisc_tree_lock); + } + +@@ -1033,27 +1029,24 @@ + t = 0; + + read_lock(&qdisc_tree_lock); +- list_for_each_entry(q, &dev->qdisc_list, list) { +- if (t < s_t || !q->ops->cl_ops || +- (tcm->tcm_parent && +- TC_H_MAJ(tcm->tcm_parent) != q->handle)) { +- t++; +- continue; +- } +- if (t > s_t) +- memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0])); +- arg.w.fn = qdisc_class_dump; +- arg.skb = skb; +- arg.cb = cb; +- arg.w.stop = 0; +- arg.w.skip = cb->args[1]; +- arg.w.count = 0; +- q->ops->cl_ops->walk(q, &arg.w); +- cb->args[1] = arg.w.count; +- if (arg.w.stop) +- break; +- t++; +- } ++ for (q=dev->qdisc_list, t=0; q; q = q->next, t++) { ++ if (t < s_t) continue; ++ if (!q->ops->cl_ops) continue; ++ if (tcm->tcm_parent && TC_H_MAJ(tcm->tcm_parent) != q->handle) ++ continue; ++ if (t > s_t) ++ memset(&cb->args[1], 0, sizeof(cb->args)-sizeof(cb->args[0])); ++ arg.w.fn = qdisc_class_dump; ++ arg.skb = skb; ++ arg.cb = cb; ++ arg.w.stop = 0; ++ arg.w.skip = cb->args[1]; ++ arg.w.count = 0; ++ q->ops->cl_ops->walk(q, &arg.w); ++ cb->args[1] = arg.w.count; ++ if (arg.w.stop) ++ break; ++ } + read_unlock(&qdisc_tree_lock); + + cb->args[0] = t; |