forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/staging/fsl-dpaa2/ethsw/ethsw.h
....@@ -1,4 +1,4 @@
1
-// SPDX-License-Identifier: GPL-2.0
1
+/* SPDX-License-Identifier: GPL-2.0 */
22 /*
33 * DPAA2 Ethernet Switch declarations
44 *
....@@ -23,9 +23,13 @@
2323 /* Number of IRQs supported */
2424 #define DPSW_IRQ_NUM 2
2525
26
+/* Port is member of VLAN */
2627 #define ETHSW_VLAN_MEMBER 1
28
+/* VLAN to be treated as untagged on egress */
2729 #define ETHSW_VLAN_UNTAGGED 2
30
+/* Untagged frames will be assigned to this VLAN */
2831 #define ETHSW_VLAN_PVID 4
32
+/* VLAN configured on the switch */
2933 #define ETHSW_VLAN_GLOBAL 8
3034
3135 /* Maximum Frame Length supported by HW (currently 10k) */
....@@ -33,7 +37,9 @@
3337 #define ETHSW_MAX_FRAME_LENGTH (DPAA2_MFL - VLAN_ETH_HLEN - ETH_FCS_LEN)
3438 #define ETHSW_L2_MAX_FRM(mtu) ((mtu) + VLAN_ETH_HLEN + ETH_FCS_LEN)
3539
36
-extern const struct ethtool_ops ethsw_port_ethtool_ops;
40
+#define ETHSW_FEATURE_MAC_ADDR BIT(0)
41
+
42
+extern const struct ethtool_ops dpaa2_switch_port_ethtool_ops;
3743
3844 struct ethsw_core;
3945
....@@ -57,11 +63,18 @@
5763 struct fsl_mc_io *mc_io;
5864 u16 dpsw_handle;
5965 struct dpsw_attr sw_attr;
66
+ u16 major, minor;
67
+ unsigned long features;
6068 int dev_id;
6169 struct ethsw_port_priv **ports;
6270
6371 u8 vlans[VLAN_VID_MASK + 1];
6472 bool learning;
73
+
74
+ struct notifier_block port_nb;
75
+ struct notifier_block port_switchdev_nb;
76
+ struct notifier_block port_switchdevb_nb;
77
+ struct workqueue_struct *workqueue;
6578 };
6679
6780 #endif /* __ETHSW_H */