Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: dsa: eliminate <linux/dsa/loop.h>

There is no reason at all to export these data types to the global
include directory.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://patch.msgid.link/20260406212158.721806-5-vladimir.oltean@nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Vladimir Oltean and committed by
Jakub Kicinski
da900867 c3b09190

+34 -43
+34 -1
drivers/net/dsa/dsa_loop.c
··· 14 14 #include <linux/workqueue.h> 15 15 #include <linux/module.h> 16 16 #include <linux/if_bridge.h> 17 - #include <linux/dsa/loop.h> 17 + #include <linux/if_vlan.h> 18 + #include <linux/types.h> 18 19 #include <net/dsa.h> 19 20 20 21 #define DSA_LOOP_NUM_PORTS 6 21 22 #define DSA_LOOP_CPU_PORT (DSA_LOOP_NUM_PORTS - 1) 22 23 #define NUM_FIXED_PHYS (DSA_LOOP_NUM_PORTS - 2) 24 + 25 + struct dsa_loop_vlan { 26 + u16 members; 27 + u16 untagged; 28 + }; 29 + 30 + struct dsa_loop_mib_entry { 31 + char name[ETH_GSTRING_LEN]; 32 + unsigned long val; 33 + }; 34 + 35 + enum dsa_loop_mib_counters { 36 + DSA_LOOP_PHY_READ_OK, 37 + DSA_LOOP_PHY_READ_ERR, 38 + DSA_LOOP_PHY_WRITE_OK, 39 + DSA_LOOP_PHY_WRITE_ERR, 40 + __DSA_LOOP_CNT_MAX, 41 + }; 42 + 43 + struct dsa_loop_port { 44 + struct dsa_loop_mib_entry mib[__DSA_LOOP_CNT_MAX]; 45 + u16 pvid; 46 + int mtu; 47 + }; 48 + 49 + struct dsa_loop_priv { 50 + struct mii_bus *bus; 51 + unsigned int port_base; 52 + struct dsa_loop_vlan vlans[VLAN_N_VID]; 53 + struct net_device *netdev; 54 + struct dsa_loop_port ports[DSA_MAX_PORTS]; 55 + }; 23 56 24 57 struct dsa_loop_pdata { 25 58 /* Must be first, such that dsa_register_switch() can access this
-42
include/linux/dsa/loop.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 */ 2 - #ifndef DSA_LOOP_H 3 - #define DSA_LOOP_H 4 - 5 - #include <linux/if_vlan.h> 6 - #include <linux/types.h> 7 - #include <linux/ethtool.h> 8 - #include <net/dsa.h> 9 - 10 - struct dsa_loop_vlan { 11 - u16 members; 12 - u16 untagged; 13 - }; 14 - 15 - struct dsa_loop_mib_entry { 16 - char name[ETH_GSTRING_LEN]; 17 - unsigned long val; 18 - }; 19 - 20 - enum dsa_loop_mib_counters { 21 - DSA_LOOP_PHY_READ_OK, 22 - DSA_LOOP_PHY_READ_ERR, 23 - DSA_LOOP_PHY_WRITE_OK, 24 - DSA_LOOP_PHY_WRITE_ERR, 25 - __DSA_LOOP_CNT_MAX, 26 - }; 27 - 28 - struct dsa_loop_port { 29 - struct dsa_loop_mib_entry mib[__DSA_LOOP_CNT_MAX]; 30 - u16 pvid; 31 - int mtu; 32 - }; 33 - 34 - struct dsa_loop_priv { 35 - struct mii_bus *bus; 36 - unsigned int port_base; 37 - struct dsa_loop_vlan vlans[VLAN_N_VID]; 38 - struct net_device *netdev; 39 - struct dsa_loop_port ports[DSA_MAX_PORTS]; 40 - }; 41 - 42 - #endif /* DSA_LOOP_H */