Merge branch 'serge-next-1' of git://git.kernel.org/pub/scm/linux/kernel/git/sergeh...
[deliverable/linux.git] / drivers / staging / vt6656 / rxtx.h
CommitLineData
92b96797
FB
1/*
2 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
3 * All rights reserved.
4 *
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.
9 *
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.
14 *
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.
18 *
19 * File: rxtx.h
20 *
21 * Purpose:
22 *
23 * Author: Jerry Chen
24 *
25 * Date: Jun. 27, 2002
26 *
27 */
28
92b96797
FB
29#ifndef __RXTX_H__
30#define __RXTX_H__
31
92b96797 32#include "device.h"
92b96797 33#include "wcmd.h"
aed387c7 34#include "baseband.h"
92b96797 35
5a5d6a80
MP
36/* MIC HDR data header */
37struct 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;
53
6398a59b
MP
54/* RsvTime buffer header */
55struct vnt_rrv_time_rts {
85417bf0
MP
56 __le16 rts_rrv_time_ba;
57 __le16 rts_rrv_time_aa;
58 __le16 rts_rrv_time_bb;
6398a59b 59 u16 wReserved;
5ff627ae
MP
60 __le16 rrv_time_b;
61 __le16 rrv_time_a;
6398a59b
MP
62} __packed;
63
4f990057 64struct vnt_rrv_time_cts {
372108e7 65 __le16 cts_rrv_time_ba;
4f990057 66 u16 wReserved;
5ff627ae
MP
67 __le16 rrv_time_b;
68 __le16 rrv_time_a;
4f990057
MP
69} __packed;
70
976467d3 71struct vnt_rrv_time_ab {
85417bf0 72 __le16 rts_rrv_time;
5ff627ae 73 __le16 rrv_time;
976467d3
MP
74} __packed;
75
7e60a3de
MP
76/* TX data header */
77struct vnt_tx_datahead_g {
aed387c7
MP
78 struct vnt_phy_field b;
79 struct vnt_phy_field a;
4e01117c
MP
80 __le16 duration_b;
81 __le16 duration_a;
10bb39a0
MP
82 __le16 time_stamp_off_b;
83 __le16 time_stamp_off_a;
7e60a3de
MP
84} __packed;
85
7c05c545 86struct vnt_tx_datahead_g_fb {
aed387c7
MP
87 struct vnt_phy_field b;
88 struct vnt_phy_field a;
4e01117c
MP
89 __le16 duration_b;
90 __le16 duration_a;
91 __le16 duration_a_f0;
92 __le16 duration_a_f1;
10bb39a0
MP
93 __le16 time_stamp_off_b;
94 __le16 time_stamp_off_a;
7c05c545
MP
95} __packed;
96
558becf1 97struct vnt_tx_datahead_ab {
aed387c7 98 struct vnt_phy_field ab;
4e01117c 99 __le16 duration;
10bb39a0 100 __le16 time_stamp_off;
558becf1
MP
101} __packed;
102
1da4ee20 103struct vnt_tx_datahead_a_fb {
aed387c7 104 struct vnt_phy_field a;
4e01117c 105 __le16 duration;
10bb39a0 106 __le16 time_stamp_off;
4e01117c
MP
107 __le16 duration_f0;
108 __le16 duration_f1;
1da4ee20
MP
109} __packed;
110
c521cb58
MP
111/* RTS buffer header */
112struct vnt_rts_g {
aed387c7
MP
113 struct vnt_phy_field b;
114 struct vnt_phy_field a;
4e01117c
MP
115 __le16 duration_ba;
116 __le16 duration_aa;
117 __le16 duration_bb;
c521cb58
MP
118 u16 wReserved;
119 struct ieee80211_rts data;
78363fd1 120 struct vnt_tx_datahead_g data_head;
c521cb58
MP
121} __packed;
122
123struct vnt_rts_g_fb {
aed387c7
MP
124 struct vnt_phy_field b;
125 struct vnt_phy_field a;
4e01117c
MP
126 __le16 duration_ba;
127 __le16 duration_aa;
128 __le16 duration_bb;
c521cb58 129 u16 wReserved;
fadc3bdf
MP
130 __le16 rts_duration_ba_f0;
131 __le16 rts_duration_aa_f0;
132 __le16 rts_duration_ba_f1;
133 __le16 rts_duration_aa_f1;
c521cb58 134 struct ieee80211_rts data;
5b852f53 135 struct vnt_tx_datahead_g_fb data_head;
c521cb58
MP
136} __packed;
137
138struct vnt_rts_ab {
aed387c7 139 struct vnt_phy_field ab;
4e01117c 140 __le16 duration;
c521cb58
MP
141 u16 wReserved;
142 struct ieee80211_rts data;
5634a5ab 143 struct vnt_tx_datahead_ab data_head;
c521cb58
MP
144} __packed;
145
146struct vnt_rts_a_fb {
aed387c7 147 struct vnt_phy_field a;
4e01117c 148 __le16 duration;
c521cb58 149 u16 wReserved;
fadc3bdf
MP
150 __le16 rts_duration_f0;
151 __le16 rts_duration_f1;
c521cb58 152 struct ieee80211_rts data;
bd3f51f1 153 struct vnt_tx_datahead_a_fb data_head;
c521cb58
MP
154} __packed;
155
f0c5ba28
MP
156/* CTS buffer header */
157struct vnt_cts {
aed387c7 158 struct vnt_phy_field b;
4e01117c 159 __le16 duration_ba;
f0c5ba28
MP
160 u16 wReserved;
161 struct ieee80211_cts data;
162 u16 reserved2;
78363fd1 163 struct vnt_tx_datahead_g data_head;
f0c5ba28
MP
164} __packed;
165
166struct vnt_cts_fb {
aed387c7 167 struct vnt_phy_field b;
4e01117c 168 __le16 duration_ba;
f0c5ba28 169 u16 wReserved;
7fd5747f
MP
170 __le16 cts_duration_ba_f0;
171 __le16 cts_duration_ba_f1;
f0c5ba28
MP
172 struct ieee80211_cts data;
173 u16 reserved2;
5b852f53 174 struct vnt_tx_datahead_g_fb data_head;
f0c5ba28
MP
175} __packed;
176
13fe62ae
MP
177union 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;
a90186e4
MP
187 /* no rts/cts */
188 struct vnt_tx_datahead_a_fb data_head_a_fb;
c12dca09 189 struct vnt_tx_datahead_ab data_head_ab;
13fe62ae
MP
190};
191
56c60e4f
MP
192struct vnt_tx_mic_hdr {
193 struct vnt_mic_hdr hdr;
194 union vnt_tx_data_head head;
195} __packed;
196
197union vnt_tx {
198 struct vnt_tx_mic_hdr mic;
199 union vnt_tx_data_head head;
200};
201
9e38a5c1 202union vnt_tx_head {
56c60e4f
MP
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;
9e38a5c1
MP
215};
216
d66caada 217struct vnt_tx_fifo_head {
ed74395c 218 u32 adwTxKey[4];
f39c0d8e 219 u16 wFIFOCtl;
5846251d 220 __le16 time_stamp;
f39c0d8e 221 u16 wFragCtl;
03a9cf34 222 __le16 current_rate;
f39c0d8e 223} __packed;
92b96797 224
d66caada
MP
225struct vnt_tx_buffer {
226 u8 byType;
227 u8 byPKTNO;
ca347596 228 __le16 tx_byte_count;
d66caada 229 struct vnt_tx_fifo_head fifo_head;
9e38a5c1 230 union vnt_tx_head tx_head;
d66caada
MP
231} __packed;
232
c7c57b24
MP
233struct vnt_tx_short_buf_head {
234 u16 fifo_ctl;
235 u16 time_stamp;
236 struct vnt_phy_field ab;
533f9d3a
MP
237 __le16 duration;
238 __le16 time_stamp_off;
c7c57b24
MP
239} __packed;
240
01f865ba
MP
241struct vnt_beacon_buffer {
242 u8 byType;
243 u8 byPKTNO;
fad8e4ae 244 __le16 tx_byte_count;
c7c57b24 245 struct vnt_tx_short_buf_head short_head;
0b71fe36 246 struct ieee80211_hdr hdr;
01f865ba 247} __packed;
92b96797 248
d56131de 249void vDMA0_tx_80211(struct vnt_private *, struct sk_buff *skb);
05cc617b 250int nsDMA_tx_packet(struct vnt_private *, struct sk_buff *skb);
d56131de
MP
251CMD_STATUS csMgmt_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
252CMD_STATUS csBeacon_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
92b96797 253
e7b07d1d 254#endif /* __RXTX_H__ */
This page took 0.532342 seconds and 5 git commands to generate.