diff options
Diffstat (limited to 'openwrt/package/linux/kernel-patches/205-net_sched_sched_generic_c.patch')
-rw-r--r-- | openwrt/package/linux/kernel-patches/205-net_sched_sched_generic_c.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/openwrt/package/linux/kernel-patches/205-net_sched_sched_generic_c.patch b/openwrt/package/linux/kernel-patches/205-net_sched_sched_generic_c.patch new file mode 100644 index 0000000000..9de11d38ed --- /dev/null +++ b/openwrt/package/linux/kernel-patches/205-net_sched_sched_generic_c.patch @@ -0,0 +1,64 @@ +--- linux-2.4.30/net/sched/sch_generic.c 2004-11-17 12:54:22.000000000 +0100 ++++ linux-2.4.30-wl/net/sched/sch_generic.c 2005-04-24 18:09:38.000000000 +0200 +@@ -392,7 +392,6 @@ + return NULL; + memset(sch, 0, size); + +- INIT_LIST_HEAD(&sch->list); + skb_queue_head_init(&sch->q); + sch->ops = ops; + sch->enqueue = ops->enqueue; +@@ -422,11 +421,22 @@ + void qdisc_destroy(struct Qdisc *qdisc) + { + struct Qdisc_ops *ops = qdisc->ops; ++ struct net_device *dev; + + if (qdisc->flags&TCQ_F_BUILTIN || + !atomic_dec_and_test(&qdisc->refcnt)) + return; +- list_del(&qdisc->list); ++ ++ dev = qdisc->dev; ++ if (dev) { ++ struct Qdisc *q, **qp; ++ for (qp = &qdisc->dev->qdisc_list; (q=*qp) != NULL; qp = &q->next) { ++ if (q == qdisc) { ++ *qp = q->next; ++ break; ++ } ++ } ++ } + #ifdef CONFIG_NET_ESTIMATOR + qdisc_kill_estimator(&qdisc->stats); + #endif +@@ -455,9 +465,9 @@ + return; + } + write_lock(&qdisc_tree_lock); +- list_add_tail(&qdisc->list, &dev->qdisc_list); ++ qdisc->next = dev->qdisc_list; ++ dev->qdisc_list = qdisc; + write_unlock(&qdisc_tree_lock); +- + } else { + qdisc = &noqueue_qdisc; + } +@@ -501,7 +511,7 @@ + dev->qdisc = &noop_qdisc; + spin_unlock_bh(&dev->queue_lock); + dev->qdisc_sleeping = &noop_qdisc; +- INIT_LIST_HEAD(&dev->qdisc_list); ++ dev->qdisc_list = NULL; + write_unlock(&qdisc_tree_lock); + + dev_watchdog_init(dev); +@@ -523,7 +533,7 @@ + qdisc_destroy(qdisc); + } + #endif +- BUG_TRAP(list_empty(&dev->qdisc_list)); ++ BUG_TRAP(dev->qdisc_list == NULL); + BUG_TRAP(!timer_pending(&dev->watchdog_timer)); + spin_unlock_bh(&dev->queue_lock); + write_unlock(&qdisc_tree_lock); |