1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
|
/************************************************************************************
* Copyright(c) Realtek Semiconductor Corp. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 59
* Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* The full GNU General Public License is included in this distribution in the
* file called LICENSE.
***********************************************************************************/
/************************************************************************************
* This product is covered by one or more of the following patents:
* US5,307,459, US5,434,872, US5,732,094, US6,570,884, US6,115,776, and US6,327,625.
***********************************************************************************/
#define SIOCDEVPRIVATE_RTLASF SIOCDEVPRIVATE
#define FUNCTION_ENABLE 1
#define FUNCTION_DISABLE 0
#define ASFCONFIG 0
#define ASFCAPABILITY 1
#define ASFCOMMULEN 0
#define ASFHBPERIOD 0
#define ASFWD16RST 0
#define ASFCAPMASK 0
#define ASFALERTRESND 0
#define ASFLSNRPOLLCYC 0
#define ASFSNRPOLLCYC 0
#define ASFWD8RESET 0
#define ASFRWHEXNUM 0
#define FMW_CAP_MASK 0x0000F867
#define SPC_CMD_MASK 0x1F00
#define SYS_CAP_MASK 0xFF
#define DISABLE_MASK 0x00
#define MAX_DATA_LEN 200
#define MAX_STR_LEN 200
#define COMMU_STR_MAX_LEN 23
#define KEY_LEN 20
#define UUID_LEN 16
#define SYSID_LEN 2
#define RW_ONE_BYTE 1
#define RW_TWO_BYTES 2
#define RW_FOUR_BYTES 4
enum asf_registers {
HBPeriod = 0x0000,
WD8Rst = 0x0002,
WD8Timer = 0x0003,
WD16Rst = 0x0004,
LSnsrPollCycle = 0x0006,
ASFSnsrPollPrd = 0x0007,
AlertReSendCnt = 0x0008,
AlertReSendItvl = 0x0009,
SMBAddr = 0x000A,
SMBCap = 0x000B,
ASFConfigR0 = 0x000C,
ASFConfigR1 = 0x000D,
WD16Timer = 0x000E,
ConsoleMA = 0x0010,
ConsoleIP = 0x0016,
IPAddr = 0x001A,
UUID = 0x0020,
IANA = 0x0030,
SysID = 0x0034,
Community = 0x0036,
StringLength = 0x004D,
LC = 0x004E,
EntityInst = 0x004F,
FmCapMsk = 0x0050,
SpCMDMsk = 0x0054,
SysCapMsk = 0x0056,
WDSysSt = 0x0057,
RxMsgType = 0x0058,
RxSpCMD = 0x0059,
RxSpCMDPa = 0x005A,
RxBtOpMsk = 0x005C,
RmtRstAddr = 0x005E,
RmtRstCmd = 0x005F,
RmtRstData = 0x0060,
RmtPwrOffAddr = 0x0061,
RmtPwrOffCmd = 0x0062,
RmtPwrOffData = 0x0063,
RmtPwrOnAddr = 0x0064,
RmtPwrOnCmd = 0x0065,
RmtPwrOnData = 0x0066,
RmtPCRAddr = 0x0067,
RmtPCRCmd = 0x0068,
RmtPCRData = 0x0069,
RMCP_IANA = 0x006A,
RMCP_OEM = 0x006E,
ASFSnsr0Addr = 0x0070,
ASFSnsrEvSt = 0x0073,
ASFSnsrEvAlert = 0x0081,
LSnsrNo = 0x00AD,
AssrtEvntMsk = 0x00AE,
DeAssrtEvntMsk = 0x00AF,
LSnsrAddr0 = 0x00B0,
LAlertCMD0 = 0x00B1,
LAlertDataMsk0 = 0x00B2,
LAlertCmp0 = 0x00B3,
LAlertESnsrT0 = 0x00B4,
LAlertET0 = 0x00B5,
LAlertEOffset0 = 0x00B6,
LAlertES0 = 0x00B7,
LAlertSN0 = 0x00B8,
LAlertEntity0 = 0x00B9,
LAlertEI0 = 0x00BA,
LSnsrState0 = 0x00BB,
LSnsrAddr1 = 0x00BD,
LAlertCMD1 = 0x00BE,
LAlertDataMsk1 = 0x00BF,
LAlertCmp1 = 0x00C0,
LAlertESnsrT1 = 0x00C1,
LAlertET1 = 0x00C2,
LAlertEOffset1 = 0x00C3,
LAlertES1 = 0x00C4,
LAlertSN1 = 0x00C5,
LAlertEntity1 = 0x00C6,
LAlertEI1 = 0x00C7,
LSnsrState1 = 0x00C8,
LSnsrAddr2 = 0x00CA,
LAlertCMD2 = 0x00CB,
LAlertDataMsk2 = 0x00CC,
LAlertCmp2 = 0x00CD,
LAlertESnsrT2 = 0x00CE,
LAlertET2 = 0x00CF,
LAlertEOffset2 = 0x00D0,
LAlertES2 = 0x00D1,
LAlertSN2 = 0x00D2,
LAlertEntity2 = 0x00D3,
LAlertEI2 = 0x00D4,
LSnsrState2 = 0x00D5,
LSnsrAddr3 = 0x00D7,
LAlertCMD3 = 0x00D8,
LAlertDataMsk3 = 0x00D9,
LAlertCmp3 = 0x00DA,
LAlertESnsrT3 = 0x00DB,
LAlertET3 = 0x00DC,
LAlertEOffset3 = 0x00DD,
LAlertES3 = 0x00DE,
LAlertSN3 = 0x00DF,
LAlertEntity3 = 0x00E0,
LAlertEI3 = 0x00E1,
LSnsrState3 = 0x00E2,
LSnsrAddr4 = 0x00E4,
LAlertCMD4 = 0x00E5,
LAlertDataMsk4 = 0x00E6,
LAlertCmp4 = 0x00E7,
LAlertESnsrT4 = 0x00E8,
LAlertET4 = 0x00E9,
LAlertEOffset4 = 0x00EA,
LAlertES4 = 0x00EB,
LAlertSN4 = 0x00EC,
LAlertEntity4 = 0x00ED,
LAlertEI4 = 0x00EE,
LSnsrState4 = 0x00EF,
LSnsrAddr5 = 0x00F1,
LAlertCMD5 = 0x00F2,
LAlertDataMsk5 = 0x00F3,
LAlertCmp5 = 0x00F4,
LAlertESnsrT5 = 0x00F5,
LAlertET5 = 0x00F6,
LAlertEOffset5 = 0x00F7,
LAlertES5 = 0x00F8,
LAlertSN5 = 0x00F9,
LAlertEntity5 = 0x00FA,
LAlertEI5 = 0x00FB,
LSnsrState5 = 0x00FC,
LSnsrAddr6 = 0x00FE,
LAlertCMD6 = 0x00FF,
LAlertDataMsk6 = 0x0100,
LAlertCmp6 = 0x0101,
LAlertESnsrT6 = 0x0102,
LAlertET6 = 0x0103,
LAlertEOffset6 = 0x0104,
LAlertES6 = 0x0105,
LAlertSN6 = 0x0106,
LAlertEntity6 = 0x0107,
LAlertEI6 = 0x0108,
LSnsrState6 = 0x0109,
LSnsrAddr7 = 0x010B,
LAlertCMD7 = 0x010C,
LAlertDataMsk7 = 0x010D,
LAlertCmp7 = 0x010E,
LAlertESnsrT7 = 0x010F,
LAlertET7 = 0x0110,
LAlertEOffset7 = 0x0111,
LAlertES7 = 0x0112,
LAlertSN7 = 0x0113,
LAlertEntity7 = 0x0114,
LAlertEI7 = 0x0115,
LSnsrState7 = 0x0116,
LAssert = 0x0117,
LDAssert = 0x0118,
IPServiceType = 0x0119,
IPIdfr = 0x011A,
FlagFOffset = 0x011C,
TTL = 0x011E,
HbtEI = 0x011F,
MgtConSID1 = 0x0120,
MgtConSID2 = 0x0124,
MgdCltSID = 0x0128,
StCd = 0x012C,
MgtConUR = 0x012D,
MgtConUNL = 0x012E,
AuthPd = 0x0130,
IntyPd = 0x0138,
MgtConRN = 0x0140,
MgdCtlRN = 0x0150,
MgtConUN = 0x0160,
Rakp2IntCk = 0x0170,
KO = 0x017C,
KA = 0x0190,
KG = 0x01A4,
KR = 0x01B8,
CP = 0x01CC,
CQ = 0x01D0,
KC = 0x01D4,
ConsoleSid = 0x01E8,
SIK1 = 0x01FC,
SIK2 = 0x0210,
Udpsrc_port = 0x0224,
Udpdes_port = 0x0226,
Asf_debug_mux = 0x0228
};
enum asf_cmdln_opt {
ASF_GET,
ASF_SET,
ASF_HELP
};
struct asf_ioctl_struct {
unsigned int arg;
unsigned int offset;
union {
unsigned int data[MAX_DATA_LEN];
char string[MAX_STR_LEN];
} u;
};
int rtl8198_asf_ioctl(struct net_device *dev, struct ifreq *ifr);
void rtl8198_asf_hbperiod(void __iomem *ioaddr, int arg, unsigned int *data);
void rtl8198_asf_wd16rst(void __iomem *ioaddr, int arg, unsigned int *data);
void rtl8198_asf_console_mac(void __iomem *ioaddr, int arg, unsigned int *data);
void rtl8198_asf_ip_address(void __iomem *ioaddr, int arg, int offset, unsigned int *data);
void rtl8198_asf_config_regs(void __iomem *ioaddr, int arg, int offset, unsigned int *data);
void rtl8198_asf_capability_masks(void __iomem *ioaddr, int arg, int offset, unsigned int *data);
void rtl8198_asf_community_string(void __iomem *ioaddr, int arg, char *string);
void rtl8198_asf_community_string_len(void __iomem *ioaddr, int arg, unsigned int *data);
void rtl8198_asf_alert_resend_interval(void __iomem *ioaddr, int arg, unsigned int *data);
void rtl8198_asf_time_period(void __iomem *ioaddr, int arg, int offset, unsigned int *data);
void rtl8198_asf_key_access(void __iomem *ioaddr, int arg, int offset, unsigned int *data);
void rtl8198_asf_rw_hexadecimal(void __iomem *ioaddr, int arg, int offset, int len, unsigned int *data);
void rtl8198_asf_rw_iana(void __iomem *ioaddr, int arg, unsigned int *data);
void rtl8198_asf_rw_uuid(void __iomem *ioaddr, int arg, unsigned int *data);
void rtl8198_asf_rw_systemid(void __iomem *ioaddr, int arg, unsigned int *data);
|