diff options
Diffstat (limited to 'net/sched/sch_netem.c')
-rw-r--r-- | net/sched/sch_netem.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index c9c649b26eaa..24697667247c 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c | |||
@@ -310,28 +310,6 @@ static void netem_reset(struct Qdisc *sch) | |||
310 | qdisc_watchdog_cancel(&q->watchdog); | 310 | qdisc_watchdog_cancel(&q->watchdog); |
311 | } | 311 | } |
312 | 312 | ||
313 | /* Pass size change message down to embedded FIFO */ | ||
314 | static int set_fifo_limit(struct Qdisc *q, int limit) | ||
315 | { | ||
316 | struct nlattr *nla; | ||
317 | int ret = -ENOMEM; | ||
318 | |||
319 | /* Hack to avoid sending change message to non-FIFO */ | ||
320 | if (strncmp(q->ops->id + 1, "fifo", 4) != 0) | ||
321 | return 0; | ||
322 | |||
323 | nla = kmalloc(nla_attr_size(sizeof(struct tc_fifo_qopt)), GFP_KERNEL); | ||
324 | if (nla) { | ||
325 | nla->nla_type = RTM_NEWQDISC; | ||
326 | nla->nla_len = nla_attr_size(sizeof(struct tc_fifo_qopt)); | ||
327 | ((struct tc_fifo_qopt *)nla_data(nla))->limit = limit; | ||
328 | |||
329 | ret = q->ops->change(q, nla); | ||
330 | kfree(nla); | ||
331 | } | ||
332 | return ret; | ||
333 | } | ||
334 | |||
335 | /* | 313 | /* |
336 | * Distribution data is a variable size payload containing | 314 | * Distribution data is a variable size payload containing |
337 | * signed 16 bit values. | 315 | * signed 16 bit values. |
@@ -416,7 +394,7 @@ static int netem_change(struct Qdisc *sch, struct nlattr *opt) | |||
416 | if (ret < 0) | 394 | if (ret < 0) |
417 | return ret; | 395 | return ret; |
418 | 396 | ||
419 | ret = set_fifo_limit(q->qdisc, qopt->limit); | 397 | ret = fifo_set_limit(q->qdisc, qopt->limit); |
420 | if (ret) { | 398 | if (ret) { |
421 | pr_debug("netem: can't set fifo limit\n"); | 399 | pr_debug("netem: can't set fifo limit\n"); |
422 | return ret; | 400 | return ret; |