wme.c (a8bdf29c6cd117644d27677962fe832b33036c77) | wme.c (1e90474c377e92db7262a8968a45c1dd980ca9e5) |
---|---|
1/* 2 * Copyright 2004, Instant802 Networks, Inc. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 */ 8 --- 283 unchanged lines hidden (view full) --- 292 skb_queue_purge(&q->requeued[queue]); 293 qdisc_destroy(q->queues[queue]); 294 q->queues[queue] = &noop_qdisc; 295 } 296} 297 298 299/* called whenever parameters are updated on existing qdisc */ | 1/* 2 * Copyright 2004, Instant802 Networks, Inc. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License version 2 as 6 * published by the Free Software Foundation. 7 */ 8 --- 283 unchanged lines hidden (view full) --- 292 skb_queue_purge(&q->requeued[queue]); 293 qdisc_destroy(q->queues[queue]); 294 q->queues[queue] = &noop_qdisc; 295 } 296} 297 298 299/* called whenever parameters are updated on existing qdisc */ |
300static int wme_qdiscop_tune(struct Qdisc *qd, struct rtattr *opt) | 300static int wme_qdiscop_tune(struct Qdisc *qd, struct nlattr *opt) |
301{ 302/* struct ieee80211_sched_data *q = qdisc_priv(qd); 303*/ 304 /* check our options block is the right size */ 305 /* copy any options to our local structure */ 306/* Ignore options block for now - always use static mapping | 301{ 302/* struct ieee80211_sched_data *q = qdisc_priv(qd); 303*/ 304 /* check our options block is the right size */ 305 /* copy any options to our local structure */ 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; 311 memcpy(q->tag2queue, qopt->tag2queue, sizeof(qopt->tag2queue)); 312*/ 313 return 0; 314} 315 316 317/* called during initial creation of qdisc on device */ | 310 return -EINVAL; 311 memcpy(q->tag2queue, qopt->tag2queue, sizeof(qopt->tag2queue)); 312*/ 313 return 0; 314} 315 316 317/* called during initial creation of qdisc on device */ |
318static int wme_qdiscop_init(struct Qdisc *qd, struct rtattr *opt) | 318static int wme_qdiscop_init(struct Qdisc *qd, struct nlattr *opt) |
319{ 320 struct ieee80211_sched_data *q = qdisc_priv(qd); 321 struct net_device *dev = qd->dev; 322 struct ieee80211_local *local; 323 int queues; 324 int err = 0, i; 325 326 /* check that device is a mac80211 device */ --- 38 unchanged lines hidden (view full) --- 365 366static int wme_qdiscop_dump(struct Qdisc *qd, struct sk_buff *skb) 367{ 368/* struct ieee80211_sched_data *q = qdisc_priv(qd); 369 unsigned char *p = skb->tail; 370 struct tc_ieee80211_qopt opt; 371 372 memcpy(&opt.tag2queue, q->tag2queue, TC_80211_MAX_TAG + 1); | 319{ 320 struct ieee80211_sched_data *q = qdisc_priv(qd); 321 struct net_device *dev = qd->dev; 322 struct ieee80211_local *local; 323 int queues; 324 int err = 0, i; 325 326 /* check that device is a mac80211 device */ --- 38 unchanged lines hidden (view full) --- 365 366static int wme_qdiscop_dump(struct Qdisc *qd, struct sk_buff *skb) 367{ 368/* struct ieee80211_sched_data *q = qdisc_priv(qd); 369 unsigned char *p = skb->tail; 370 struct tc_ieee80211_qopt opt; 371 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; 375/* | 374*/ return skb->len; 375/* |
376rtattr_failure: | 376nla_put_failure: |
377 skb_trim(skb, p - skb->data);*/ 378 return -1; 379} 380 381 382static int wme_classop_graft(struct Qdisc *qd, unsigned long arg, 383 struct Qdisc *new, struct Qdisc **old) 384{ --- 54 unchanged lines hidden (view full) --- 439 440 441static void wme_classop_put(struct Qdisc *q, unsigned long cl) 442{ 443} 444 445 446static int wme_classop_change(struct Qdisc *qd, u32 handle, u32 parent, | 377 skb_trim(skb, p - skb->data);*/ 378 return -1; 379} 380 381 382static int wme_classop_graft(struct Qdisc *qd, unsigned long arg, 383 struct Qdisc *new, struct Qdisc **old) 384{ --- 54 unchanged lines hidden (view full) --- 439 440 441static void wme_classop_put(struct Qdisc *q, unsigned long cl) 442{ 443} 444 445 446static 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{ 449 unsigned long cl = *arg; 450 struct ieee80211_local *local = wdev_priv(qd->dev->ieee80211_ptr); 451 struct ieee80211_hw *hw = &local->hw; 452 453 if (cl - 1 > hw->queues) 454 return -ENOENT; 455 --- 152 unchanged lines hidden --- | 448{ 449 unsigned long cl = *arg; 450 struct ieee80211_local *local = wdev_priv(qd->dev->ieee80211_ptr); 451 struct ieee80211_hw *hw = &local->hw; 452 453 if (cl - 1 > hw->queues) 454 return -ENOENT; 455 --- 152 unchanged lines hidden --- |