[NET_SCHED]: Convert packet schedulers from rtnetlink to new netlink API
[firefly-linux-kernel-4.4.55.git] / net / sched / sch_teql.c
index 421281d9dd1d3f9103b17c71b68b0d927d3807da..1411c7b1fbdc4de0f7103cfb559a78369a4195cc 100644 (file)
@@ -168,7 +168,7 @@ teql_destroy(struct Qdisc* sch)
        }
 }
 
-static int teql_qdisc_init(struct Qdisc *sch, struct rtattr *opt)
+static int teql_qdisc_init(struct Qdisc *sch, struct nlattr *opt)
 {
        struct net_device *dev = sch->dev;
        struct teql_master *m = (struct teql_master*)sch->ops;
@@ -252,6 +252,9 @@ __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *
 static inline int teql_resolve(struct sk_buff *skb,
                               struct sk_buff *skb_res, struct net_device *dev)
 {
+       if (dev->qdisc == &noop_qdisc)
+               return -ENODEV;
+
        if (dev->header_ops == NULL ||
            skb->dst == NULL ||
            skb->dst->neighbour == NULL)