Merge tag 'acpi-5.15-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6-microblaze.git] / 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/types.h>
6 #include <linux/ethtool.h>
7 #include <net/dsa.h>
8
9 struct dsa_loop_vlan {
10         u16 members;
11         u16 untagged;
12 };
13
14 struct dsa_loop_mib_entry {
15         char name[ETH_GSTRING_LEN];
16         unsigned long val;
17 };
18
19 enum dsa_loop_mib_counters {
20         DSA_LOOP_PHY_READ_OK,
21         DSA_LOOP_PHY_READ_ERR,
22         DSA_LOOP_PHY_WRITE_OK,
23         DSA_LOOP_PHY_WRITE_ERR,
24         __DSA_LOOP_CNT_MAX,
25 };
26
27 struct dsa_loop_port {
28         struct dsa_loop_mib_entry mib[__DSA_LOOP_CNT_MAX];
29         u16 pvid;
30         int mtu;
31 };
32
33 struct dsa_loop_priv {
34         struct mii_bus  *bus;
35         unsigned int    port_base;
36         struct dsa_loop_vlan vlans[VLAN_N_VID];
37         struct net_device *netdev;
38         struct dsa_loop_port ports[DSA_MAX_PORTS];
39 };
40
41 #endif /* DSA_LOOP_H */