Compile fixes for kernel 2.6.29. The 200-sched_esfq.patch is based on http://cvs...
authorHauke Mehrtens <hauke@hauke-m.de>
Mon, 11 May 2009 20:20:41 +0000 (20:20 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 11 May 2009 20:20:41 +0000 (20:20 +0000)
SVN-Revision: 15775

target/linux/generic-2.6/patches-2.6.29/200-sched_esfq.patch
target/linux/generic-2.6/patches-2.6.29/903-hostap_txpower.patch

index 7c80fbbb54604aad74f8d5c65021f4e747d93380..f72c0e370538a621928464d6bffbb398ca907954 100644 (file)
@@ -90,7 +90,7 @@
  obj-$(CONFIG_NET_SCH_PRIO)    += sch_prio.o
 --- /dev/null
 +++ b/net/sched/sch_esfq.c
-@@ -0,0 +1,702 @@
+@@ -0,0 +1,700 @@
 +/*
 + * net/sched/sch_esfq.c       Extended Stochastic Fairness Queueing discipline.
 + *
 +#include <linux/notifier.h>
 +#include <linux/init.h>
 +#include <net/ip.h>
++#include <net/netlink.h>
 +#include <linux/ipv6.h>
 +#include <net/route.h>
 +#include <linux/skbuff.h>
 +      return NET_XMIT_CN;
 +}
 +
-+
-+static int esfq_requeue(struct sk_buff *skb, struct Qdisc* sch)
++static struct sk_buff *esfq_peek(struct Qdisc* sch)
 +{
 +      struct esfq_sched_data *q = qdisc_priv(sch);
-+      esfq_q_enqueue(skb, q, ESFQ_HEAD);
-+      sch->qstats.backlog += skb->len;
-+      if (++sch->q.qlen < q->limit - 1) {
-+              sch->qstats.requeues++;
-+              return 0;
-+      }
++      esfq_index a;
 +
-+      sch->qstats.drops++;
-+      esfq_drop(sch);
-+      return NET_XMIT_CN;
++      /* No active slots */
++      if (q->tail == q->depth)
++              return NULL;
++
++      a = q->next[q->tail];
++      return skb_peek(&q->qs[a]);
 +}
 +
 +static struct sk_buff *esfq_q_dequeue(struct esfq_sched_data *q)
 +      }
 +}
 +
-+static int esfq_q_init(struct esfq_sched_data *q, struct rtattr *opt)
++static int esfq_q_init(struct esfq_sched_data *q, struct nlattr *opt)
 +{
-+      struct tc_esfq_qopt *ctl = RTA_DATA(opt);
++      struct tc_esfq_qopt *ctl = nla_data(opt);
 +      esfq_index p = ~0U/2;
 +      int i;
 +
-+      if (opt && opt->rta_len < RTA_LENGTH(sizeof(*ctl)))
++      if (opt && opt->nla_len < nla_attr_size(sizeof(*ctl)))
 +              return -EINVAL;
 +
 +      q->perturbation = 0;
 +              q->tail = q->limit = q->depth = 128;
 +
 +      } else {
-+              struct tc_esfq_qopt *ctl = RTA_DATA(opt);
++              struct tc_esfq_qopt *ctl = nla_data(opt);
 +              if (ctl->quantum)
 +                      q->quantum = ctl->quantum;
 +              q->perturb_period = ctl->perturb_period*HZ;
 +      return -ENOBUFS;
 +}
 +
-+static int esfq_init(struct Qdisc *sch, struct rtattr *opt)
++static int esfq_init(struct Qdisc *sch, struct nlattr *opt)
 +{
 +      struct esfq_sched_data *q = qdisc_priv(sch);
 +      int err;
 +      return 0;
 +}
 +
-+static int esfq_change(struct Qdisc *sch, struct rtattr *opt)
++static int esfq_change(struct Qdisc *sch, struct nlattr *opt)
 +{
 +      struct esfq_sched_data *q = qdisc_priv(sch);
 +      struct esfq_sched_data new;
 +static int esfq_dump(struct Qdisc *sch, struct sk_buff *skb)
 +{
 +      struct esfq_sched_data *q = qdisc_priv(sch);
-+      unsigned char *b = skb->tail;
++      unsigned char *b = skb_tail_pointer(skb);
 +      struct tc_esfq_qopt opt;
 +
 +      opt.quantum = q->quantum;
 +      opt.flows = q->depth;
 +      opt.hash_kind = q->hash_kind;
 +
-+      RTA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
++      NLA_PUT(skb, TCA_OPTIONS, sizeof(opt), &opt);
 +
 +      return skb->len;
 +
-+rtattr_failure:
-+      skb_trim(skb, b - skb->data);
++nla_put_failure:
++      nlmsg_trim(skb, b);
 +      return -1;
 +}
 +
 +      .priv_size      =       sizeof(struct esfq_sched_data),
 +      .enqueue        =       esfq_enqueue,
 +      .dequeue        =       esfq_dequeue,
-+      .requeue        =       esfq_requeue,
++      .peek           =       esfq_peek,
 +      .drop           =       esfq_drop,
 +      .init           =       esfq_init,
 +      .reset          =       esfq_reset,
index 09ac7a9c8e81cae384a3a1f4efeeae6c0c8fff2e..5e0abbc5d7f6b30240a45af85878fdf3b4603f05 100644 (file)
 +
 +int hostap_restore_power(struct net_device *dev)
 +{
-+        struct hostap_interface *iface = dev->priv;
++        struct hostap_interface *iface = netdev_priv(dev);
 +       local_info_t *local = iface->local;
 +
 +       u16 val;