diff options
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r-- | net/dsa/slave.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 9a88035517a6..75d58229a4bd 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c | |||
@@ -1035,12 +1035,16 @@ static int dsa_slave_setup_tc_block(struct net_device *dev, | |||
1035 | static int dsa_slave_setup_tc(struct net_device *dev, enum tc_setup_type type, | 1035 | static int dsa_slave_setup_tc(struct net_device *dev, enum tc_setup_type type, |
1036 | void *type_data) | 1036 | void *type_data) |
1037 | { | 1037 | { |
1038 | switch (type) { | 1038 | struct dsa_port *dp = dsa_slave_to_port(dev); |
1039 | case TC_SETUP_BLOCK: | 1039 | struct dsa_switch *ds = dp->ds; |
1040 | |||
1041 | if (type == TC_SETUP_BLOCK) | ||
1040 | return dsa_slave_setup_tc_block(dev, type_data); | 1042 | return dsa_slave_setup_tc_block(dev, type_data); |
1041 | default: | 1043 | |
1044 | if (!ds->ops->port_setup_tc) | ||
1042 | return -EOPNOTSUPP; | 1045 | return -EOPNOTSUPP; |
1043 | } | 1046 | |
1047 | return ds->ops->port_setup_tc(ds, dp->index, type, type_data); | ||
1044 | } | 1048 | } |
1045 | 1049 | ||
1046 | static void dsa_slave_get_stats64(struct net_device *dev, | 1050 | static void dsa_slave_get_stats64(struct net_device *dev, |