aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_multiq.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_multiq.c')
-rw-r--r--net/sched/sch_multiq.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/net/sched/sch_multiq.c b/net/sched/sch_multiq.c
index 912731203047..069f81c97277 100644
--- a/net/sched/sch_multiq.c
+++ b/net/sched/sch_multiq.c
@@ -298,9 +298,6 @@ static int multiq_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
298 struct multiq_sched_data *q = qdisc_priv(sch); 298 struct multiq_sched_data *q = qdisc_priv(sch);
299 unsigned long band = arg - 1; 299 unsigned long band = arg - 1;
300 300
301 if (band >= q->bands)
302 return -EINVAL;
303
304 if (new == NULL) 301 if (new == NULL)
305 new = &noop_qdisc; 302 new = &noop_qdisc;
306 303
@@ -320,9 +317,6 @@ multiq_leaf(struct Qdisc *sch, unsigned long arg)
320 struct multiq_sched_data *q = qdisc_priv(sch); 317 struct multiq_sched_data *q = qdisc_priv(sch);
321 unsigned long band = arg - 1; 318 unsigned long band = arg - 1;
322 319
323 if (band >= q->bands)
324 return NULL;
325
326 return q->queues[band]; 320 return q->queues[band];
327} 321}
328 322
@@ -348,36 +342,13 @@ static void multiq_put(struct Qdisc *q, unsigned long cl)
348 return; 342 return;
349} 343}
350 344
351static int multiq_change(struct Qdisc *sch, u32 handle, u32 parent,
352 struct nlattr **tca, unsigned long *arg)
353{
354 unsigned long cl = *arg;
355 struct multiq_sched_data *q = qdisc_priv(sch);
356
357 if (cl - 1 > q->bands)
358 return -ENOENT;
359 return 0;
360}
361
362static int multiq_delete(struct Qdisc *sch, unsigned long cl)
363{
364 struct multiq_sched_data *q = qdisc_priv(sch);
365 if (cl - 1 > q->bands)
366 return -ENOENT;
367 return 0;
368}
369
370
371static int multiq_dump_class(struct Qdisc *sch, unsigned long cl, 345static int multiq_dump_class(struct Qdisc *sch, unsigned long cl,
372 struct sk_buff *skb, struct tcmsg *tcm) 346 struct sk_buff *skb, struct tcmsg *tcm)
373{ 347{
374 struct multiq_sched_data *q = qdisc_priv(sch); 348 struct multiq_sched_data *q = qdisc_priv(sch);
375 349
376 if (cl - 1 > q->bands)
377 return -ENOENT;
378 tcm->tcm_handle |= TC_H_MIN(cl); 350 tcm->tcm_handle |= TC_H_MIN(cl);
379 if (q->queues[cl-1]) 351 tcm->tcm_info = q->queues[cl-1]->handle;
380 tcm->tcm_info = q->queues[cl-1]->handle;
381 return 0; 352 return 0;
382} 353}
383 354
@@ -430,8 +401,6 @@ static const struct Qdisc_class_ops multiq_class_ops = {
430 .leaf = multiq_leaf, 401 .leaf = multiq_leaf,
431 .get = multiq_get, 402 .get = multiq_get,
432 .put = multiq_put, 403 .put = multiq_put,
433 .change = multiq_change,
434 .delete = multiq_delete,
435 .walk = multiq_walk, 404 .walk = multiq_walk,
436 .tcf_chain = multiq_find_tcf, 405 .tcf_chain = multiq_find_tcf,
437 .bind_tcf = multiq_bind, 406 .bind_tcf = multiq_bind,