gma500: begin the config based split
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / vt6656 / rndis.h
blobfccf7e98eb68d17e6b7c586b12bb92443f4e0d2f
1 /*
2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3 * All rights reserved.
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,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 * File: rndis.h
22 * Purpose: Interface between firmware and driver
24 * Author: Warren Hsu
26 * Date: Nov 24, 2004
31 #ifndef __RNDIS_H__
32 #define __RNDIS_H__
34 /*--------------------- Export Definitions -------------------------*/
35 #define MESSAGE_TYPE_READ 0x01
36 #define MESSAGE_TYPE_WRITE 0x00
37 #define MESSAGE_TYPE_LOCK_OR 0x02
38 #define MESSAGE_TYPE_LOCK_AND 0x03
39 #define MESSAGE_TYPE_WRITE_MASK 0x04
40 #define MESSAGE_TYPE_CARDINIT 0x05
41 #define MESSAGE_TYPE_INIT_RSP 0x06
42 #define MESSAGE_TYPE_MACSHUTDOWN 0x07
43 #define MESSAGE_TYPE_SETKEY 0x08
44 #define MESSAGE_TYPE_CLRKEYENTRY 0x09
45 #define MESSAGE_TYPE_WRITE_MISCFF 0x0A
46 #define MESSAGE_TYPE_SET_ANTMD 0x0B
47 #define MESSAGE_TYPE_SELECT_CHANNLE 0x0C
48 #define MESSAGE_TYPE_SET_TSFTBTT 0x0D
49 #define MESSAGE_TYPE_SET_SSTIFS 0x0E
50 #define MESSAGE_TYPE_CHANGE_BBTYPE 0x0F
51 #define MESSAGE_TYPE_DISABLE_PS 0x10
52 #define MESSAGE_TYPE_WRITE_IFRF 0x11
54 //used for read/write(index)
55 #define MESSAGE_REQUEST_MEM 0x01
56 #define MESSAGE_REQUEST_BBREG 0x02
57 #define MESSAGE_REQUEST_MACREG 0x03
58 #define MESSAGE_REQUEST_EEPROM 0x04
59 #define MESSAGE_REQUEST_TSF 0x05
60 #define MESSAGE_REQUEST_TBTT 0x06
61 #define MESSAGE_REQUEST_BBAGC 0x07
62 #define MESSAGE_REQUEST_VERSION 0x08
63 #define MESSAGE_REQUEST_RF_INIT 0x09
64 #define MESSAGE_REQUEST_RF_INIT2 0x0A
65 #define MESSAGE_REQUEST_RF_CH0 0x0B
66 #define MESSAGE_REQUEST_RF_CH1 0x0C
67 #define MESSAGE_REQUEST_RF_CH2 0x0D
70 #define VIAUSB20_PACKET_HEADER 0x04
73 /*--------------------- Export Classes ----------------------------*/
75 typedef struct _CMD_MESSAGE
77 BYTE byData[256];
78 } CMD_MESSAGE, *PCMD_MESSAGE;
80 typedef struct _CMD_WRITE_MASK
82 BYTE byData;
83 BYTE byMask;
84 } CMD_WRITE_MASK, *PCMD_WRITE_MASK;
86 typedef struct _CMD_CARD_INIT
88 BYTE byInitClass;
89 BYTE bExistSWNetAddr;
90 BYTE bySWNetAddr[6];
91 BYTE byShortRetryLimit;
92 BYTE byLongRetryLimit;
93 } CMD_CARD_INIT, *PCMD_CARD_INIT;
95 typedef struct _RSP_CARD_INIT
97 BYTE byStatus;
98 BYTE byNetAddr[6];
99 BYTE byRFType;
100 BYTE byMinChannel;
101 BYTE byMaxChannel;
102 } RSP_CARD_INIT, *PRSP_CARD_INIT;
104 typedef struct _CMD_SET_KEY
106 WORD wKCTL;
107 BYTE abyMacAddr[6];
108 BYTE abyKey[16];
109 } CMD_SET_KEY, *PCMD_SET_KEY;
111 typedef struct _CMD_CLRKEY_ENTRY
113 BYTE abyKeyEntry[11];
114 } CMD_CLRKEY_ENTRY, *PCMD_CLRKEY_ENTRY;
116 typedef struct _CMD_WRITE_MISCFF
118 DWORD adwMiscFFData[22][4]; //a key entry has only 22 dwords
119 } CMD_WRITE_MISCFF, *PCMD_WRITE_MISCFF;
121 typedef struct _CMD_SET_TSFTBTT
123 BYTE abyTSF_TBTT[8];
124 } CMD_SET_TSFTBTT, *PCMD_SET_TSFTBTT;
126 typedef struct _CMD_SET_SSTIFS
128 BYTE bySIFS;
129 BYTE byDIFS;
130 BYTE byEIFS;
131 BYTE bySlotTime;
132 BYTE byCwMax_Min;
133 BYTE byBBCR10;
134 } CMD_SET_SSTIFS, *PCMD_SET_SSTIFS;
136 typedef struct _CMD_CHANGE_BBTYPE
138 BYTE bySIFS;
139 BYTE byDIFS;
140 BYTE byEIFS;
141 BYTE bySlotTime;
142 BYTE byCwMax_Min;
143 BYTE byBBCR10;
144 BYTE byBB_BBType; //CR88
145 BYTE byMAC_BBType;
146 DWORD dwRSPINF_b_1;
147 DWORD dwRSPINF_b_2;
148 DWORD dwRSPINF_b_55;
149 DWORD dwRSPINF_b_11;
150 WORD wRSPINF_a[9];
151 } CMD_CHANGE_BBTYPE, *PCMD_CHANGE_BBTYPE;
153 /*--------------------- Export Macros -------------------------*/
155 #define EXCH_WORD(w) ((WORD)((WORD)(w)<<8) | (WORD)((WORD)(w)>>8))
157 /*--------------------- Export Variables --------------------------*/
159 /*--------------------- Export Functions --------------------------*/
161 #endif /* _RNDIS_H_ */