diff options
author | Patrick McHardy <kaber@trash.net> | 2009-09-04 02:41:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-06 05:06:12 -0400 |
commit | 71ebe5e91947392bc276af713827eab12b6db8e4 (patch) | |
tree | 198ff02e23f8606ff2a3bec51c7044ec408e19c4 /net/sched/sch_tbf.c | |
parent | c9f1d0389b962521af1e2b699c8ee5e299d77b85 (diff) |
net_sched: make cls_ops->tcf_chain() optional
Some qdiscs don't support attaching filters. Handle this centrally in
cls_api and return a proper errno code (EOPNOTSUPP) instead of EINVAL.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_tbf.c')
-rw-r--r-- | net/sched/sch_tbf.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index e22dfe85e43e..28909699d24d 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c | |||
@@ -433,11 +433,6 @@ static void tbf_walk(struct Qdisc *sch, struct qdisc_walker *walker) | |||
433 | } | 433 | } |
434 | } | 434 | } |
435 | 435 | ||
436 | static struct tcf_proto **tbf_find_tcf(struct Qdisc *sch, unsigned long cl) | ||
437 | { | ||
438 | return NULL; | ||
439 | } | ||
440 | |||
441 | static const struct Qdisc_class_ops tbf_class_ops = | 436 | static const struct Qdisc_class_ops tbf_class_ops = |
442 | { | 437 | { |
443 | .graft = tbf_graft, | 438 | .graft = tbf_graft, |
@@ -447,7 +442,6 @@ static const struct Qdisc_class_ops tbf_class_ops = | |||
447 | .change = tbf_change_class, | 442 | .change = tbf_change_class, |
448 | .delete = tbf_delete, | 443 | .delete = tbf_delete, |
449 | .walk = tbf_walk, | 444 | .walk = tbf_walk, |
450 | .tcf_chain = tbf_find_tcf, | ||
451 | .dump = tbf_dump_class, | 445 | .dump = tbf_dump_class, |
452 | }; | 446 | }; |
453 | 447 | ||