kernel: add support for kernel 5.4
[openwrt/staging/rmilecki.git] / target / linux / generic / hack-5.4 / 661-use_fq_codel_by_default.patch
index 2778377de70da9ff9998e5a102a580afc8675ee8..e8d456dde86418aa602bfec158ba03467351a7d3 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/include/net/sch_generic.h
 +++ b/include/net/sch_generic.h
-@@ -487,12 +487,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
+@@ -569,12 +569,13 @@ extern struct Qdisc_ops noop_qdisc_ops;
  extern struct Qdisc_ops pfifo_fast_ops;
  extern struct Qdisc_ops mq_qdisc_ops;
  extern struct Qdisc_ops noqueue_qdisc_ops;
@@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  struct Qdisc_class_common {
 --- a/net/sched/Kconfig
 +++ b/net/sched/Kconfig
-@@ -3,8 +3,9 @@
+@@ -4,8 +4,9 @@
  #
  
  menuconfig NET_SCHED
@@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
          device, it has to decide which ones to send first, which ones to
 --- a/net/sched/sch_api.c
 +++ b/net/sched/sch_api.c
-@@ -2162,7 +2162,7 @@ static int __init pktsched_init(void)
+@@ -2271,7 +2271,7 @@ static int __init pktsched_init(void)
                return err;
        }
  
@@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        register_qdisc(&pfifo_head_drop_qdisc_ops);
 --- a/net/sched/sch_fq_codel.c
 +++ b/net/sched/sch_fq_codel.c
-@@ -714,7 +714,7 @@ static const struct Qdisc_class_ops fq_c
+@@ -702,7 +702,7 @@ static const struct Qdisc_class_ops fq_c
        .walk           =       fq_codel_walk,
  };
  
@@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        .cl_ops         =       &fq_codel_class_ops,
        .id             =       "fq_codel",
        .priv_size      =       sizeof(struct fq_codel_sched_data),
-@@ -729,6 +729,7 @@ static struct Qdisc_ops fq_codel_qdisc_o
+@@ -717,6 +717,7 @@ static struct Qdisc_ops fq_codel_qdisc_o
        .dump_stats =   fq_codel_dump_stats,
        .owner          =       THIS_MODULE,
  };
@@ -74,7 +74,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  {
 --- a/net/sched/sch_generic.c
 +++ b/net/sched/sch_generic.c
-@@ -35,7 +35,7 @@
+@@ -32,7 +32,7 @@
  #include <net/xfrm.h>
  
  /* Qdisc to use by default */
@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  EXPORT_SYMBOL(default_qdisc_ops);
  
  /* Main transmission queue. */
-@@ -1025,7 +1025,7 @@ static void attach_one_default_qdisc(str
+@@ -1034,12 +1034,12 @@ static void attach_one_default_qdisc(str
                                     void *_unused)
  {
        struct Qdisc *qdisc;
@@ -92,3 +92,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
        if (dev->priv_flags & IFF_NO_QUEUE)
                ops = &noqueue_qdisc_ops;
+       else if(dev->type == ARPHRD_CAN)
+-              ops = &pfifo_fast_ops;
++              ops = &fq_codel_qdisc_ops;
+       qdisc = qdisc_create_dflt(dev_queue, ops, TC_H_ROOT, NULL);
+       if (!qdisc) {