patch-2.3.38 linux/net/sched/sch_prio.c

Next file: linux/net/sched/sch_teql.c
Previous file: linux/net/sched/sch_ingress.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.37/linux/net/sched/sch_prio.c linux/net/sched/sch_prio.c
@@ -7,6 +7,8 @@
  *		2 of the License, or (at your option) any later version.
  *
  * Authors:	Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
+ * Fixes:       19990609: J Hadi Salim <hadi@nortelnetworks.com>: 
+ *              Init --  EINVAL when opt undefined
  */
 
 #include <linux/config.h>
@@ -211,8 +213,6 @@
 
 static int prio_init(struct Qdisc *sch, struct rtattr *opt)
 {
-	static const u8 prio2band[TC_PRIO_MAX+1] =
-	{ 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 };
 	struct prio_sched_data *q = (struct prio_sched_data *)sch->data;
 	int i;
 
@@ -220,14 +220,7 @@
 		q->queues[i] = &noop_qdisc;
 
 	if (opt == NULL) {
-		q->bands = 3;
-		memcpy(q->prio2band, prio2band, sizeof(prio2band));
-		for (i=0; i<3; i++) {
-			struct Qdisc *child;
-			child = qdisc_create_dflt(sch->dev, &pfifo_qdisc_ops);
-			if (child)
-				q->queues[i] = child;
-		}
+		return -EINVAL;
 	} else {
 		int err;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)