diff options
Diffstat (limited to 'net/sched/cls_basic.c')
-rw-r--r-- | net/sched/cls_basic.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c index 7b9b4602b5b7..b6552035d1f4 100644 --- a/net/sched/cls_basic.c +++ b/net/sched/cls_basic.c | |||
@@ -34,11 +34,6 @@ struct basic_filter { | |||
34 | struct list_head link; | 34 | struct list_head link; |
35 | }; | 35 | }; |
36 | 36 | ||
37 | static const struct tcf_ext_map basic_ext_map = { | ||
38 | .action = TCA_BASIC_ACT, | ||
39 | .police = TCA_BASIC_POLICE | ||
40 | }; | ||
41 | |||
42 | static int basic_classify(struct sk_buff *skb, const struct tcf_proto *tp, | 37 | static int basic_classify(struct sk_buff *skb, const struct tcf_proto *tp, |
43 | struct tcf_result *res) | 38 | struct tcf_result *res) |
44 | { | 39 | { |
@@ -141,7 +136,8 @@ static int basic_set_parms(struct net *net, struct tcf_proto *tp, | |||
141 | struct tcf_exts e; | 136 | struct tcf_exts e; |
142 | struct tcf_ematch_tree t; | 137 | struct tcf_ematch_tree t; |
143 | 138 | ||
144 | err = tcf_exts_validate(net, tp, tb, est, &e, &basic_ext_map); | 139 | tcf_exts_init(&e, TCA_BASIC_ACT, TCA_BASIC_POLICE); |
140 | err = tcf_exts_validate(net, tp, tb, est, &e); | ||
145 | if (err < 0) | 141 | if (err < 0) |
146 | return err; | 142 | return err; |
147 | 143 | ||
@@ -191,7 +187,7 @@ static int basic_change(struct net *net, struct sk_buff *in_skb, | |||
191 | if (f == NULL) | 187 | if (f == NULL) |
192 | goto errout; | 188 | goto errout; |
193 | 189 | ||
194 | tcf_exts_init(&f->exts); | 190 | tcf_exts_init(&f->exts, TCA_BASIC_ACT, TCA_BASIC_POLICE); |
195 | err = -EINVAL; | 191 | err = -EINVAL; |
196 | if (handle) | 192 | if (handle) |
197 | f->handle = handle; | 193 | f->handle = handle; |
@@ -264,13 +260,13 @@ static int basic_dump(struct tcf_proto *tp, unsigned long fh, | |||
264 | nla_put_u32(skb, TCA_BASIC_CLASSID, f->res.classid)) | 260 | nla_put_u32(skb, TCA_BASIC_CLASSID, f->res.classid)) |
265 | goto nla_put_failure; | 261 | goto nla_put_failure; |
266 | 262 | ||
267 | if (tcf_exts_dump(skb, &f->exts, &basic_ext_map) < 0 || | 263 | if (tcf_exts_dump(skb, &f->exts) < 0 || |
268 | tcf_em_tree_dump(skb, &f->ematches, TCA_BASIC_EMATCHES) < 0) | 264 | tcf_em_tree_dump(skb, &f->ematches, TCA_BASIC_EMATCHES) < 0) |
269 | goto nla_put_failure; | 265 | goto nla_put_failure; |
270 | 266 | ||
271 | nla_nest_end(skb, nest); | 267 | nla_nest_end(skb, nest); |
272 | 268 | ||
273 | if (tcf_exts_dump_stats(skb, &f->exts, &basic_ext_map) < 0) | 269 | if (tcf_exts_dump_stats(skb, &f->exts) < 0) |
274 | goto nla_put_failure; | 270 | goto nla_put_failure; |
275 | 271 | ||
276 | return skb->len; | 272 | return skb->len; |