diff options
| author | David S. Miller <davem@davemloft.net> | 2020-08-03 18:19:23 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2020-08-03 18:19:23 -0700 |
| commit | d8f375ea463eca032c02251ded8abb1941f0d9de (patch) | |
| tree | 5f3608439e932d90fc33c92e4ed0fa0f3373a3aa /include/linux/dsa/loop.h | |
| parent | 59b328cf566001fce32c33375ea9bc570625af2f (diff) | |
| parent | 947b6ef9f7aeb2c9ebf63dcd6619068f3cec353a (diff) | |
Merge branch 'net-dsa-loop-Preparatory-changes-for-802-1Q-data-path'
net: dsa: loop: Preparatory changes for 802.1Q data path
Florian Fainelli says:
====================
These patches are all meant to help pave the way for a 802.1Q data path
added to the mockup driver, making it more useful than just testing for
configuration. Sending those out now since there is no real need to
wait.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/dsa/loop.h')
| -rw-r--r-- | include/linux/dsa/loop.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/linux/dsa/loop.h b/include/linux/dsa/loop.h new file mode 100644 index 000000000000..5a3470bcc8a7 --- /dev/null +++ b/include/linux/dsa/loop.h @@ -0,0 +1,41 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef DSA_LOOP_H +#define DSA_LOOP_H + +#include <linux/types.h> +#include <linux/ethtool.h> +#include <net/dsa.h> + +struct dsa_loop_vlan { + u16 members; + u16 untagged; +}; + +struct dsa_loop_mib_entry { + char name[ETH_GSTRING_LEN]; + unsigned long val; +}; + +enum dsa_loop_mib_counters { + DSA_LOOP_PHY_READ_OK, + DSA_LOOP_PHY_READ_ERR, + DSA_LOOP_PHY_WRITE_OK, + DSA_LOOP_PHY_WRITE_ERR, + __DSA_LOOP_CNT_MAX, +}; + +struct dsa_loop_port { + struct dsa_loop_mib_entry mib[__DSA_LOOP_CNT_MAX]; + u16 pvid; + int mtu; +}; + +struct dsa_loop_priv { + struct mii_bus *bus; + unsigned int port_base; + struct dsa_loop_vlan vlans[VLAN_N_VID]; + struct net_device *netdev; + struct dsa_loop_port ports[DSA_MAX_PORTS]; +}; + +#endif /* DSA_LOOP_H */ |
