ixgbe: set the correct DCB bit for pg tx settings
[safe/jmp/linux-2.6] / net / sched / sch_prio.c
index 209a4ca..93285ce 100644 (file)
@@ -262,9 +262,6 @@ static int prio_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
        struct prio_sched_data *q = qdisc_priv(sch);
        unsigned long band = arg - 1;
 
-       if (band >= q->bands)
-               return -EINVAL;
-
        if (new == NULL)
                new = &noop_qdisc;
 
@@ -284,9 +281,6 @@ prio_leaf(struct Qdisc *sch, unsigned long arg)
        struct prio_sched_data *q = qdisc_priv(sch);
        unsigned long band = arg - 1;
 
-       if (band >= q->bands)
-               return NULL;
-
        return q->queues[band];
 }
 
@@ -316,11 +310,8 @@ static int prio_dump_class(struct Qdisc *sch, unsigned long cl, struct sk_buff *
 {
        struct prio_sched_data *q = qdisc_priv(sch);
 
-       if (cl - 1 > q->bands)
-               return -ENOENT;
        tcm->tcm_handle |= TC_H_MIN(cl);
-       if (q->queues[cl-1])
-               tcm->tcm_info = q->queues[cl-1]->handle;
+       tcm->tcm_info = q->queues[cl-1]->handle;
        return 0;
 }
 
@@ -331,6 +322,7 @@ static int prio_dump_class_stats(struct Qdisc *sch, unsigned long cl,
        struct Qdisc *cl_q;
 
        cl_q = q->queues[cl - 1];
+       cl_q->qstats.qlen = cl_q->q.qlen;
        if (gnet_stats_copy_basic(d, &cl_q->bstats) < 0 ||
            gnet_stats_copy_queue(d, &cl_q->qstats) < 0)
                return -1;