PM / sleep: Asynchronous threads for suspend_noirq
[linux/fpc-iii.git] / drivers / staging / vt6656 / rxtx.h
blobb3ee6d01aa88a2af793b73754849592fe85f3ba9
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.
19 * File: rxtx.h
21 * Purpose:
23 * Author: Jerry Chen
25 * Date: Jun. 27, 2002
29 #ifndef __RXTX_H__
30 #define __RXTX_H__
32 #include "device.h"
33 #include "wcmd.h"
34 #include "baseband.h"
36 /* MIC HDR data header */
37 struct vnt_mic_hdr {
38 u8 id;
39 u8 tx_priority;
40 u8 mic_addr2[6];
41 __be32 tsc_47_16;
42 __be16 tsc_15_0;
43 __be16 payload_len;
44 __be16 hlen;
45 __le16 frame_control;
46 u8 addr1[6];
47 u8 addr2[6];
48 u8 addr3[6];
49 __le16 seq_ctrl;
50 u8 addr4[6];
51 u16 packing; /* packing to 48 bytes */
52 } __packed;
54 /* RsvTime buffer header */
55 struct vnt_rrv_time_rts {
56 u16 wRTSTxRrvTime_ba;
57 u16 wRTSTxRrvTime_aa;
58 u16 wRTSTxRrvTime_bb;
59 u16 wReserved;
60 u16 wTxRrvTime_b;
61 u16 wTxRrvTime_a;
62 } __packed;
64 struct vnt_rrv_time_cts {
65 u16 wCTSTxRrvTime_ba;
66 u16 wReserved;
67 u16 wTxRrvTime_b;
68 u16 wTxRrvTime_a;
69 } __packed;
71 struct vnt_rrv_time_ab {
72 u16 wRTSTxRrvTime;
73 u16 wTxRrvTime;
74 } __packed;
76 /* TX data header */
77 struct vnt_tx_datahead_g {
78 struct vnt_phy_field b;
79 struct vnt_phy_field a;
80 u16 wDuration_b;
81 u16 wDuration_a;
82 u16 wTimeStampOff_b;
83 u16 wTimeStampOff_a;
84 } __packed;
86 struct vnt_tx_datahead_g_fb {
87 struct vnt_phy_field b;
88 struct vnt_phy_field a;
89 u16 wDuration_b;
90 u16 wDuration_a;
91 u16 wDuration_a_f0;
92 u16 wDuration_a_f1;
93 u16 wTimeStampOff_b;
94 u16 wTimeStampOff_a;
95 } __packed;
97 struct vnt_tx_datahead_ab {
98 struct vnt_phy_field ab;
99 u16 wDuration;
100 u16 wTimeStampOff;
101 } __packed;
103 struct vnt_tx_datahead_a_fb {
104 struct vnt_phy_field a;
105 u16 wDuration;
106 u16 wTimeStampOff;
107 u16 wDuration_f0;
108 u16 wDuration_f1;
109 } __packed;
111 /* RTS buffer header */
112 struct vnt_rts_g {
113 struct vnt_phy_field b;
114 struct vnt_phy_field a;
115 u16 wDuration_ba;
116 u16 wDuration_aa;
117 u16 wDuration_bb;
118 u16 wReserved;
119 struct ieee80211_rts data;
120 struct vnt_tx_datahead_g data_head;
121 } __packed;
123 struct vnt_rts_g_fb {
124 struct vnt_phy_field b;
125 struct vnt_phy_field a;
126 u16 wDuration_ba;
127 u16 wDuration_aa;
128 u16 wDuration_bb;
129 u16 wReserved;
130 u16 wRTSDuration_ba_f0;
131 u16 wRTSDuration_aa_f0;
132 u16 wRTSDuration_ba_f1;
133 u16 wRTSDuration_aa_f1;
134 struct ieee80211_rts data;
135 struct vnt_tx_datahead_g_fb data_head;
136 } __packed;
138 struct vnt_rts_ab {
139 struct vnt_phy_field ab;
140 u16 wDuration;
141 u16 wReserved;
142 struct ieee80211_rts data;
143 struct vnt_tx_datahead_ab data_head;
144 } __packed;
146 struct vnt_rts_a_fb {
147 struct vnt_phy_field a;
148 u16 wDuration;
149 u16 wReserved;
150 u16 wRTSDuration_f0;
151 u16 wRTSDuration_f1;
152 struct ieee80211_rts data;
153 struct vnt_tx_datahead_a_fb data_head;
154 } __packed;
156 /* CTS buffer header */
157 struct vnt_cts {
158 struct vnt_phy_field b;
159 u16 wDuration_ba;
160 u16 wReserved;
161 struct ieee80211_cts data;
162 u16 reserved2;
163 struct vnt_tx_datahead_g data_head;
164 } __packed;
166 struct vnt_cts_fb {
167 struct vnt_phy_field b;
168 u16 wDuration_ba;
169 u16 wReserved;
170 u16 wCTSDuration_ba_f0;
171 u16 wCTSDuration_ba_f1;
172 struct ieee80211_cts data;
173 u16 reserved2;
174 struct vnt_tx_datahead_g_fb data_head;
175 } __packed;
177 union vnt_tx_data_head {
178 /* rts g */
179 struct vnt_rts_g rts_g;
180 struct vnt_rts_g_fb rts_g_fb;
181 /* rts a/b */
182 struct vnt_rts_ab rts_ab;
183 struct vnt_rts_a_fb rts_a_fb;
184 /* cts g */
185 struct vnt_cts cts_g;
186 struct vnt_cts_fb cts_g_fb;
187 /* no rts/cts */
188 struct vnt_tx_datahead_a_fb data_head_a_fb;
189 struct vnt_tx_datahead_ab data_head_ab;
192 struct vnt_tx_mic_hdr {
193 struct vnt_mic_hdr hdr;
194 union vnt_tx_data_head head;
195 } __packed;
197 union vnt_tx {
198 struct vnt_tx_mic_hdr mic;
199 union vnt_tx_data_head head;
202 union vnt_tx_head {
203 struct {
204 struct vnt_rrv_time_rts rts;
205 union vnt_tx tx;
206 } __packed tx_rts;
207 struct {
208 struct vnt_rrv_time_cts cts;
209 union vnt_tx tx;
210 } __packed tx_cts;
211 struct {
212 struct vnt_rrv_time_ab ab;
213 union vnt_tx tx;
214 } __packed tx_ab;
217 struct vnt_tx_fifo_head {
218 u32 adwTxKey[4];
219 u16 wFIFOCtl;
220 u16 wTimeStamp;
221 u16 wFragCtl;
222 u16 wReserved;
223 } __packed;
225 struct vnt_tx_buffer {
226 u8 byType;
227 u8 byPKTNO;
228 u16 wTxByteCount;
229 struct vnt_tx_fifo_head fifo_head;
230 union vnt_tx_head tx_head;
231 } __packed;
233 struct vnt_tx_short_buf_head {
234 u16 fifo_ctl;
235 u16 time_stamp;
236 struct vnt_phy_field ab;
237 u16 duration;
238 u16 time_stamp_off;
239 } __packed;
241 struct vnt_beacon_buffer {
242 u8 byType;
243 u8 byPKTNO;
244 u16 wTxByteCount;
245 struct vnt_tx_short_buf_head short_head;
246 struct ieee80211_hdr hdr;
247 } __packed;
249 void vDMA0_tx_80211(struct vnt_private *, struct sk_buff *skb);
250 int nsDMA_tx_packet(struct vnt_private *, u32 uDMAIdx, struct sk_buff *skb);
251 CMD_STATUS csMgmt_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
252 CMD_STATUS csBeacon_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
253 int bRelayPacketSend(struct vnt_private *, u8 *pbySkbData, u32 uDataLen,
254 u32 uNodeIndex);
256 #endif /* __RXTX_H__ */