aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_red.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_red.c')
-rw-r--r--net/sched/sch_red.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/sched/sch_red.c b/net/sched/sch_red.c
index d65cadddea69..ee66c5ca80c6 100644
--- a/net/sched/sch_red.c
+++ b/net/sched/sch_red.c
@@ -175,12 +175,14 @@ static void red_destroy(struct Qdisc *sch)
175 qdisc_destroy(q->qdisc); 175 qdisc_destroy(q->qdisc);
176} 176}
177 177
178static struct Qdisc *red_create_dflt(struct net_device *dev, u32 limit) 178static struct Qdisc *red_create_dflt(struct Qdisc *sch, u32 limit)
179{ 179{
180 struct Qdisc *q = qdisc_create_dflt(dev, &bfifo_qdisc_ops); 180 struct Qdisc *q;
181 struct rtattr *rta; 181 struct rtattr *rta;
182 int ret; 182 int ret;
183 183
184 q = qdisc_create_dflt(sch->dev, &bfifo_qdisc_ops,
185 TC_H_MAKE(sch->handle, 1));
184 if (q) { 186 if (q) {
185 rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)), 187 rta = kmalloc(RTA_LENGTH(sizeof(struct tc_fifo_qopt)),
186 GFP_KERNEL); 188 GFP_KERNEL);
@@ -219,7 +221,7 @@ static int red_change(struct Qdisc *sch, struct rtattr *opt)
219 ctl = RTA_DATA(tb[TCA_RED_PARMS-1]); 221 ctl = RTA_DATA(tb[TCA_RED_PARMS-1]);
220 222
221 if (ctl->limit > 0) { 223 if (ctl->limit > 0) {
222 child = red_create_dflt(sch->dev, ctl->limit); 224 child = red_create_dflt(sch, ctl->limit);
223 if (child == NULL) 225 if (child == NULL)
224 return -ENOMEM; 226 return -ENOMEM;
225 } 227 }