Added two wireless drivers: atheros5000.device and realtek8180.device.
[AROS.git] / workbench / devs / networks / realtek8180 / aros_device.c
blobe91badce6fcf513db65d716886f77deb8243110b
1 /*
3 Copyright (C) 2011 Neil Cafferkey
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston,
18 MA 02111-1307, USA.
23 #include <exec/types.h>
24 #include <exec/resident.h>
25 #include <aros/libcall.h>
26 #include "initializers.h"
28 #include "device.h"
30 #include "device_protos.h"
32 extern const APTR init_data;
33 extern const struct Resident rom_tag;
34 extern const TEXT device_name[];
35 extern const TEXT version_string[];
38 AROS_LH2(struct DevBase *, DevInit,
39 AROS_LHA(struct DevBase *, dev_base, D0),
40 AROS_LHA(struct DevBase *, seg_list, A0),
41 struct DevBase *, base, 0, S2)
43 AROS_LIBFUNC_INIT
45 return DevInit(dev_base, seg_list, base);
47 AROS_LIBFUNC_EXIT
52 AROS_LH3(BYTE, DevOpen,
53 AROS_LHA(struct IOSana2Req *, request, A1),
54 AROS_LHA(LONG, unit_num, D0),
55 AROS_LHA(ULONG, flags, D1),
56 struct DevBase *, base, 1, S2)
58 AROS_LIBFUNC_INIT
60 return DevOpen(request, unit_num, flags, base);
62 AROS_LIBFUNC_EXIT
67 AROS_LH1(APTR, DevClose,
68 AROS_LHA(struct IOSana2Req *, request, A1),
69 struct DevBase *, base, 2, S2)
71 AROS_LIBFUNC_INIT
73 return DevClose(request, base);
75 AROS_LIBFUNC_EXIT
80 AROS_LH0(APTR, DevExpunge,
81 struct DevBase *, base, 3, S2)
83 AROS_LIBFUNC_INIT
85 return DevExpunge(base);
87 AROS_LIBFUNC_EXIT
92 AROS_LH0(APTR, DevReserved,
93 struct DevBase *, base, 4, S2)
95 AROS_LIBFUNC_INIT
97 return DevReserved(base);
99 AROS_LIBFUNC_EXIT
104 AROS_LH1(VOID, DevBeginIO,
105 AROS_LHA(struct IOSana2Req *, request, A1),
106 struct DevBase *, base, 5, S2)
108 AROS_LIBFUNC_INIT
110 DevBeginIO(request, base);
112 AROS_LIBFUNC_EXIT
117 AROS_LH1(VOID, DevAbortIO,
118 AROS_LHA(struct IOSana2Req *, request, A1),
119 struct DevBase *, base, 6, S2)
121 AROS_LIBFUNC_INIT
123 DevAbortIO(request, base);
125 AROS_LIBFUNC_EXIT
130 static const APTR vectors[] =
132 (APTR)AROS_SLIB_ENTRY(DevOpen, S2, 1),
133 (APTR)AROS_SLIB_ENTRY(DevClose, S2, 2),
134 (APTR)AROS_SLIB_ENTRY(DevExpunge, S2, 3),
135 (APTR)AROS_SLIB_ENTRY(DevReserved, S2, 4),
136 (APTR)AROS_SLIB_ENTRY(DevBeginIO, S2, 5),
137 (APTR)AROS_SLIB_ENTRY(DevAbortIO, S2, 6),
138 (APTR)-1
142 static const APTR init_table[] =
144 (APTR)sizeof(struct DevBase),
145 (APTR)vectors,
146 (APTR)&init_data,
147 (APTR)AROS_SLIB_ENTRY(DevInit, S2, 0),
151 const struct Resident aros_rom_tag =
153 RTC_MATCHWORD,
154 (struct Resident *)&aros_rom_tag,
155 (APTR)(&rom_tag + 1),
156 RTF_AUTOINIT,
157 VERSION,
158 NT_DEVICE,
160 (TEXT *)device_name,
161 (TEXT *)version_string,
162 (APTR)init_table