diff options
Diffstat (limited to 'net/sched/sch_prio.c')
-rw-r--r-- | net/sched/sch_prio.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index 94cecef70145..0f73c412d04b 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c | |||
@@ -262,9 +262,6 @@ static int prio_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new, | |||
262 | struct prio_sched_data *q = qdisc_priv(sch); | 262 | struct prio_sched_data *q = qdisc_priv(sch); |
263 | unsigned long band = arg - 1; | 263 | unsigned long band = arg - 1; |
264 | 264 | ||
265 | if (band >= q->bands) | ||
266 | return -EINVAL; | ||
267 | |||
268 | if (new == NULL) | 265 | if (new == NULL) |
269 | new = &noop_qdisc; | 266 | new = &noop_qdisc; |
270 | 267 | ||
@@ -284,9 +281,6 @@ prio_leaf(struct Qdisc *sch, unsigned long arg) | |||
284 | struct prio_sched_data *q = qdisc_priv(sch); | 281 | struct prio_sched_data *q = qdisc_priv(sch); |
285 | unsigned long band = arg - 1; | 282 | unsigned long band = arg - 1; |
286 | 283 | ||
287 | if (band >= q->bands) | ||
288 | return NULL; | ||
289 | |||
290 | return q->queues[band]; | 284 | return q->queues[band]; |
291 | } | 285 | } |
292 | 286 | ||
@@ -311,35 +305,13 @@ static void prio_put(struct Qdisc *q, unsigned long cl) | |||
311 | return; | 305 | return; |
312 | } | 306 | } |
313 | 307 | ||
314 | static int prio_change(struct Qdisc *sch, u32 handle, u32 parent, struct nlattr **tca, unsigned long *arg) | ||
315 | { | ||
316 | unsigned long cl = *arg; | ||
317 | struct prio_sched_data *q = qdisc_priv(sch); | ||
318 | |||
319 | if (cl - 1 > q->bands) | ||
320 | return -ENOENT; | ||
321 | return 0; | ||
322 | } | ||
323 | |||
324 | static int prio_delete(struct Qdisc *sch, unsigned long cl) | ||
325 | { | ||
326 | struct prio_sched_data *q = qdisc_priv(sch); | ||
327 | if (cl - 1 > q->bands) | ||
328 | return -ENOENT; | ||
329 | return 0; | ||
330 | } | ||
331 | |||
332 | |||
333 | static int prio_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, | 308 | static int prio_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *skb, |
334 | struct tcmsg *tcm) | 309 | struct tcmsg *tcm) |
335 | { | 310 | { |
336 | struct prio_sched_data *q = qdisc_priv(sch); | 311 | struct prio_sched_data *q = qdisc_priv(sch); |
337 | 312 | ||
338 | if (cl - 1 > q->bands) | ||
339 | return -ENOENT; | ||
340 | tcm->tcm_handle |= TC_H_MIN(cl); | 313 | tcm->tcm_handle |= TC_H_MIN(cl); |
341 | if (q->queues[cl-1]) | 314 | tcm->tcm_info = q->queues[cl-1]->handle; |
342 | tcm->tcm_info = q->queues[cl-1]->handle; | ||
343 | return 0; | 315 | return 0; |
344 | } | 316 | } |
345 | 317 | ||
@@ -392,8 +364,6 @@ static const struct Qdisc_class_ops prio_class_ops = { | |||
392 | .leaf = prio_leaf, | 364 | .leaf = prio_leaf, |
393 | .get = prio_get, | 365 | .get = prio_get, |
394 | .put = prio_put, | 366 | .put = prio_put, |
395 | .change = prio_change, | ||
396 | .delete = prio_delete, | ||
397 | .walk = prio_walk, | 367 | .walk = prio_walk, |
398 | .tcf_chain = prio_find_tcf, | 368 | .tcf_chain = prio_find_tcf, |
399 | .bind_tcf = prio_bind, | 369 | .bind_tcf = prio_bind, |