Loading drivers/net/ethernet/microchip/sparx5/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -8,4 +8,4 @@ obj-$(CONFIG_SPARX5_SWITCH) += sparx5-switch.o sparx5-switch-objs := sparx5_main.o sparx5_packet.o \ sparx5_netdev.o sparx5_phylink.o sparx5_port.o sparx5_mactable.o sparx5_vlan.o \ sparx5_switchdev.o sparx5_calendar.o sparx5_ethtool.o sparx5_fdma.o \ sparx5_ptp.o sparx5_pgid.o sparx5_ptp.o sparx5_pgid.o sparx5_tc.o drivers/net/ethernet/microchip/sparx5/sparx5_netdev.c +2 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ #include "sparx5_main_regs.h" #include "sparx5_main.h" #include "sparx5_port.h" #include "sparx5_tc.h" /* The IFH bit position of the first VSTAX bit. This is because the * VSTAX bit positions in Data sheet is starting from zero. Loading Loading @@ -228,6 +229,7 @@ static const struct net_device_ops sparx5_port_netdev_ops = { .ndo_get_stats64 = sparx5_get_stats64, .ndo_get_port_parent_id = sparx5_get_port_parent_id, .ndo_eth_ioctl = sparx5_port_ioctl, .ndo_setup_tc = sparx5_port_setup_tc, }; bool sparx5_netdevice_check(const struct net_device *dev) Loading drivers/net/ethernet/microchip/sparx5/sparx5_tc.c 0 → 100644 +19 −0 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0+ /* Microchip Sparx5 Switch driver * * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries. */ #include "sparx5_tc.h" #include "sparx5_main.h" int sparx5_port_setup_tc(struct net_device *ndev, enum tc_setup_type type, void *type_data) { switch (type) { default: return -EOPNOTSUPP; } return 0; } drivers/net/ethernet/microchip/sparx5/sparx5_tc.h 0 → 100644 +15 −0 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0+ */ /* Microchip Sparx5 Switch driver * * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries. */ #ifndef __SPARX5_TC_H__ #define __SPARX5_TC_H__ #include <linux/netdevice.h> int sparx5_port_setup_tc(struct net_device *ndev, enum tc_setup_type type, void *type_data); #endif /* __SPARX5_TC_H__ */ Loading
drivers/net/ethernet/microchip/sparx5/Makefile +1 −1 Original line number Diff line number Diff line Loading @@ -8,4 +8,4 @@ obj-$(CONFIG_SPARX5_SWITCH) += sparx5-switch.o sparx5-switch-objs := sparx5_main.o sparx5_packet.o \ sparx5_netdev.o sparx5_phylink.o sparx5_port.o sparx5_mactable.o sparx5_vlan.o \ sparx5_switchdev.o sparx5_calendar.o sparx5_ethtool.o sparx5_fdma.o \ sparx5_ptp.o sparx5_pgid.o sparx5_ptp.o sparx5_pgid.o sparx5_tc.o
drivers/net/ethernet/microchip/sparx5/sparx5_netdev.c +2 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ #include "sparx5_main_regs.h" #include "sparx5_main.h" #include "sparx5_port.h" #include "sparx5_tc.h" /* The IFH bit position of the first VSTAX bit. This is because the * VSTAX bit positions in Data sheet is starting from zero. Loading Loading @@ -228,6 +229,7 @@ static const struct net_device_ops sparx5_port_netdev_ops = { .ndo_get_stats64 = sparx5_get_stats64, .ndo_get_port_parent_id = sparx5_get_port_parent_id, .ndo_eth_ioctl = sparx5_port_ioctl, .ndo_setup_tc = sparx5_port_setup_tc, }; bool sparx5_netdevice_check(const struct net_device *dev) Loading
drivers/net/ethernet/microchip/sparx5/sparx5_tc.c 0 → 100644 +19 −0 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0+ /* Microchip Sparx5 Switch driver * * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries. */ #include "sparx5_tc.h" #include "sparx5_main.h" int sparx5_port_setup_tc(struct net_device *ndev, enum tc_setup_type type, void *type_data) { switch (type) { default: return -EOPNOTSUPP; } return 0; }
drivers/net/ethernet/microchip/sparx5/sparx5_tc.h 0 → 100644 +15 −0 Original line number Diff line number Diff line /* SPDX-License-Identifier: GPL-2.0+ */ /* Microchip Sparx5 Switch driver * * Copyright (c) 2022 Microchip Technology Inc. and its subsidiaries. */ #ifndef __SPARX5_TC_H__ #define __SPARX5_TC_H__ #include <linux/netdevice.h> int sparx5_port_setup_tc(struct net_device *ndev, enum tc_setup_type type, void *type_data); #endif /* __SPARX5_TC_H__ */