diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-23 01:11:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:11:10 -0500 |
commit | 1e90474c377e92db7262a8968a45c1dd980ca9e5 (patch) | |
tree | 645af56dcb17cf1a76fd3b7f1a8b833a3fffc3d7 /net/mac80211 | |
parent | 01480e1cf5e2118eba8a8968239f3242072f9563 (diff) |
[NET_SCHED]: Convert packet schedulers from rtnetlink to new netlink API
Convert packet schedulers to use the netlink API. Unfortunately a gradual
conversion is not possible without breaking compilation in the middle or
adding lots of casts, so this patch converts them all in one step. The
patch has been mostly generated automatically with some minor edits to
at least allow seperate conversion of classifiers and actions.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/wme.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/mac80211/wme.c b/net/mac80211/wme.c index 024519522d37..4e236599dd31 100644 --- a/net/mac80211/wme.c +++ b/net/mac80211/wme.c | |||
@@ -297,16 +297,16 @@ static void wme_qdiscop_destroy(struct Qdisc* qd) | |||
297 | 297 | ||
298 | 298 | ||
299 | /* called whenever parameters are updated on existing qdisc */ | 299 | /* called whenever parameters are updated on existing qdisc */ |
300 | static int wme_qdiscop_tune(struct Qdisc *qd, struct rtattr *opt) | 300 | static int wme_qdiscop_tune(struct Qdisc *qd, struct nlattr *opt) |
301 | { | 301 | { |
302 | /* struct ieee80211_sched_data *q = qdisc_priv(qd); | 302 | /* struct ieee80211_sched_data *q = qdisc_priv(qd); |
303 | */ | 303 | */ |
304 | /* check our options block is the right size */ | 304 | /* check our options block is the right size */ |
305 | /* copy any options to our local structure */ | 305 | /* copy any options to our local structure */ |
306 | /* Ignore options block for now - always use static mapping | 306 | /* Ignore options block for now - always use static mapping |
307 | struct tc_ieee80211_qopt *qopt = RTA_DATA(opt); | 307 | struct tc_ieee80211_qopt *qopt = nla_data(opt); |
308 | 308 | ||
309 | if (opt->rta_len < RTA_LENGTH(sizeof(*qopt))) | 309 | if (opt->nla_len < nla_attr_size(sizeof(*qopt))) |
310 | return -EINVAL; | 310 | return -EINVAL; |
311 | memcpy(q->tag2queue, qopt->tag2queue, sizeof(qopt->tag2queue)); | 311 | memcpy(q->tag2queue, qopt->tag2queue, sizeof(qopt->tag2queue)); |
312 | */ | 312 | */ |
@@ -315,7 +315,7 @@ static int wme_qdiscop_tune(struct Qdisc *qd, struct rtattr *opt) | |||
315 | 315 | ||
316 | 316 | ||
317 | /* called during initial creation of qdisc on device */ | 317 | /* called during initial creation of qdisc on device */ |
318 | static int wme_qdiscop_init(struct Qdisc *qd, struct rtattr *opt) | 318 | static int wme_qdiscop_init(struct Qdisc *qd, struct nlattr *opt) |
319 | { | 319 | { |
320 | struct ieee80211_sched_data *q = qdisc_priv(qd); | 320 | struct ieee80211_sched_data *q = qdisc_priv(qd); |
321 | struct net_device *dev = qd->dev; | 321 | struct net_device *dev = qd->dev; |
@@ -370,10 +370,10 @@ static int wme_qdiscop_dump(struct Qdisc *qd, struct sk_buff *skb) | |||
370 | struct tc_ieee80211_qopt opt; | 370 | struct tc_ieee80211_qopt opt; |
371 | 371 | ||
372 | memcpy(&opt.tag2queue, q->tag2queue, TC_80211_MAX_TAG + 1); | 372 | memcpy(&opt.tag2queue, q->tag2queue, TC_80211_MAX_TAG + 1); |
373 | RTA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt); | 373 | NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt); |
374 | */ return skb->len; | 374 | */ return skb->len; |
375 | /* | 375 | /* |
376 | rtattr_failure: | 376 | nla_put_failure: |
377 | skb_trim(skb, p - skb->data);*/ | 377 | skb_trim(skb, p - skb->data);*/ |
378 | return -1; | 378 | return -1; |
379 | } | 379 | } |
@@ -444,7 +444,7 @@ static void wme_classop_put(struct Qdisc *q, unsigned long cl) | |||
444 | 444 | ||
445 | 445 | ||
446 | static int wme_classop_change(struct Qdisc *qd, u32 handle, u32 parent, | 446 | static int wme_classop_change(struct Qdisc *qd, u32 handle, u32 parent, |
447 | struct rtattr **tca, unsigned long *arg) | 447 | struct nlattr **tca, unsigned long *arg) |
448 | { | 448 | { |
449 | unsigned long cl = *arg; | 449 | unsigned long cl = *arg; |
450 | struct ieee80211_local *local = wdev_priv(qd->dev->ieee80211_ptr); | 450 | struct ieee80211_local *local = wdev_priv(qd->dev->ieee80211_ptr); |