File tree Expand file tree Collapse file tree 2 files changed +41
-31
lines changed Expand file tree Collapse file tree 2 files changed +41
-31
lines changed Original file line number Diff line number Diff line change 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
18
#include <net/dsa.h>
18
19
19
20
#include "dsa_loop.h"
20
21
21
- struct dsa_loop_vlan {
22
- u16 members ;
23
- u16 untagged ;
24
- };
25
-
26
- struct dsa_loop_mib_entry {
27
- char name [ETH_GSTRING_LEN ];
28
- unsigned long val ;
29
- };
30
-
31
- enum dsa_loop_mib_counters {
32
- DSA_LOOP_PHY_READ_OK ,
33
- DSA_LOOP_PHY_READ_ERR ,
34
- DSA_LOOP_PHY_WRITE_OK ,
35
- DSA_LOOP_PHY_WRITE_ERR ,
36
- __DSA_LOOP_CNT_MAX ,
37
- };
38
-
39
22
static struct dsa_loop_mib_entry dsa_loop_mibs [] = {
40
23
[DSA_LOOP_PHY_READ_OK ] = { "phy_read_ok" , },
41
24
[DSA_LOOP_PHY_READ_ERR ] = { "phy_read_err" , },
42
25
[DSA_LOOP_PHY_WRITE_OK ] = { "phy_write_ok" , },
43
26
[DSA_LOOP_PHY_WRITE_ERR ] = { "phy_write_err" , },
44
27
};
45
28
46
- struct dsa_loop_port {
47
- struct dsa_loop_mib_entry mib [__DSA_LOOP_CNT_MAX ];
48
- u16 pvid ;
49
- };
50
-
51
- struct dsa_loop_priv {
52
- struct mii_bus * bus ;
53
- unsigned int port_base ;
54
- struct dsa_loop_vlan vlans [VLAN_N_VID ];
55
- struct net_device * netdev ;
56
- struct dsa_loop_port ports [DSA_MAX_PORTS ];
57
- };
58
-
59
29
static struct phy_device * phydevs [PHY_MAX_ADDR ];
60
30
61
31
static enum dsa_tag_protocol dsa_loop_get_protocol (struct dsa_switch * ds ,
Original file line number Diff line number Diff line change
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
+ };
31
+
32
+ struct dsa_loop_priv {
33
+ struct mii_bus * bus ;
34
+ unsigned int port_base ;
35
+ struct dsa_loop_vlan vlans [VLAN_N_VID ];
36
+ struct net_device * netdev ;
37
+ struct dsa_loop_port ports [DSA_MAX_PORTS ];
38
+ };
39
+
40
+ #endif /* DSA_LOOP_H */
You can’t perform that action at this time.
0 commit comments