summaryrefslogtreecommitdiffstats
path: root/net/sched/sch_mqprio.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-08-07 10:15:17 +0200
committerDavid S. Miller <davem@davemloft.net>2017-08-07 09:42:35 -0700
commit2572ac53c46f58e500b9d8d0f99785666038c590 (patch)
treead615f1fdda541358540a2d1dd5a385fc39332bc /net/sched/sch_mqprio.c
parent1afec92be0d7b516a79f4c548a81d17460c8ba73 (diff)
downloadlinux-2572ac53c46f58e500b9d8d0f99785666038c590.tar.gz
linux-2572ac53c46f58e500b9d8d0f99785666038c590.tar.bz2
linux-2572ac53c46f58e500b9d8d0f99785666038c590.zip
net: sched: make type an argument for ndo_setup_tc
Since the type is always present, push it to be a separate argument to ndo_setup_tc. On the way, name the type enum and use it for arg type. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Acked-by: Jamal Hadi Salim <jhs@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_mqprio.c')
-rw-r--r--net/sched/sch_mqprio.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/net/sched/sch_mqprio.c b/net/sched/sch_mqprio.c
index e0c02725cd48..329610ce4dfe 100644
--- a/net/sched/sch_mqprio.c
+++ b/net/sched/sch_mqprio.c
@@ -40,10 +40,10 @@ static void mqprio_destroy(struct Qdisc *sch)
if (priv->hw_offload && dev->netdev_ops->ndo_setup_tc) {
struct tc_mqprio_qopt offload = { 0 };
- struct tc_to_netdev tc = { .type = TC_SETUP_MQPRIO,
- { .mqprio = &offload } };
+ struct tc_to_netdev tc = { { .mqprio = &offload } };
- dev->netdev_ops->ndo_setup_tc(dev, sch->handle, 0, 0, &tc);
+ dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_MQPRIO,
+ sch->handle, 0, 0, &tc);
} else {
netdev_set_num_tc(dev, 0);
}
@@ -149,11 +149,10 @@ static int mqprio_init(struct Qdisc *sch, struct nlattr *opt)
*/
if (qopt->hw) {
struct tc_mqprio_qopt offload = *qopt;
- struct tc_to_netdev tc = { .type = TC_SETUP_MQPRIO,
- { .mqprio = &offload } };
+ struct tc_to_netdev tc = { { .mqprio = &offload } };
- err = dev->netdev_ops->ndo_setup_tc(dev, sch->handle,
- 0, 0, &tc);
+ err = dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_MQPRIO,
+ sch->handle, 0, 0, &tc);
if (err)
return err;