etherswitch_if.m revision 235288
1# $FreeBSD: head/sys/dev/etherswitch/etherswitch_if.m 235288 2012-05-11 20:53:20Z adrian $
2
3#include <sys/bus.h>
4
5# Needed for ifreq/ifmediareq
6#include <sys/socket.h>
7#include <net/if.h>
8
9#include <dev/etherswitch/etherswitch.h>
10
11INTERFACE etherswitch;
12
13#
14# Return device info
15#
16METHOD etherswitch_info_t* getinfo {
17	device_t	dev;
18}
19
20#
21# Read switch register
22#
23METHOD int readreg {
24	device_t	dev;
25	int		reg;
26};
27
28#
29# Write switch register
30#
31METHOD int writereg {
32	device_t	dev;
33	int		reg;
34	int		value;
35};
36
37#
38# Read PHY register
39#
40METHOD int readphyreg {
41	device_t	dev;
42	int		phy;
43	int		reg;
44};
45
46#
47# Write PHY register
48#
49METHOD int writephyreg {
50	device_t	dev;
51	int		phy;
52	int		reg;
53	int		value;
54};
55
56#
57# Get port configuration
58#
59METHOD int getport {
60	device_t	dev;
61	etherswitch_port_t *vg;
62}
63
64#
65# Set port configuration
66#
67METHOD int setport {
68	device_t	dev;
69	etherswitch_port_t *vg;
70}
71
72#
73# Get VLAN group configuration
74#
75METHOD int getvgroup {
76	device_t	dev;
77	etherswitch_vlangroup_t *vg;
78}
79
80#
81# Set VLAN group configuration
82#
83METHOD int setvgroup {
84	device_t	dev;
85	etherswitch_vlangroup_t *vg;
86}
87