]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/staging/vt6655/rxtx.h
Merge tag 'arc-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc
[mirror_ubuntu-artful-kernel.git] / drivers / staging / vt6655 / rxtx.h
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
29 #ifndef __RXTX_H__
30 #define __RXTX_H__
31
32 #include "device.h"
33
34 #define DEFAULT_MSDU_LIFETIME_RES_64us 8000 /* 64us */
35 #define DEFAULT_MGN_LIFETIME_RES_64us 125 /* 64us */
36
37
38 /*--------------------- Export Definitions -------------------------*/
39
40 /*--------------------- Export Variables --------------------------*/
41
42 /*--------------------- Export Functions --------------------------*/
43
44 /* MIC HDR data header */
45 struct vnt_mic_hdr {
46 u8 id;
47 u8 tx_priority;
48 u8 mic_addr2[ETH_ALEN];
49 u8 ccmp_pn[IEEE80211_CCMP_PN_LEN];
50 __be16 payload_len;
51 __be16 hlen;
52 __le16 frame_control;
53 u8 addr1[ETH_ALEN];
54 u8 addr2[ETH_ALEN];
55 u8 addr3[ETH_ALEN];
56 __le16 seq_ctrl;
57 u8 addr4[ETH_ALEN];
58 u16 packing; /* packing to 48 bytes */
59 } __packed;
60
61 /* RsvTime buffer header */
62 struct vnt_rrv_time_rts {
63 __le16 rts_rrv_time_ba;
64 __le16 rts_rrv_time_aa;
65 __le16 rts_rrv_time_bb;
66 u16 reserved;
67 __le16 rrv_time_b;
68 __le16 rrv_time_a;
69 } __packed;
70
71 struct vnt_rrv_time_cts {
72 __le16 cts_rrv_time_ba;
73 u16 reserved;
74 __le16 rrv_time_b;
75 __le16 rrv_time_a;
76 } __packed;
77
78 struct vnt_rrv_time_ab {
79 __le16 rts_rrv_time;
80 __le16 rrv_time;
81 } __packed;
82
83 /* TX data header */
84 struct vnt_tx_datahead_g {
85 struct vnt_phy_field b;
86 struct vnt_phy_field a;
87 __le16 duration_b;
88 __le16 duration_a;
89 __le16 time_stamp_off_b;
90 __le16 time_stamp_off_a;
91 } __packed;
92
93 struct vnt_tx_datahead_g_fb {
94 struct vnt_phy_field b;
95 struct vnt_phy_field a;
96 __le16 duration_b;
97 __le16 duration_a;
98 __le16 duration_a_f0;
99 __le16 duration_a_f1;
100 __le16 time_stamp_off_b;
101 __le16 time_stamp_off_a;
102 } __packed;
103
104 struct vnt_tx_datahead_ab {
105 struct vnt_phy_field ab;
106 __le16 duration;
107 __le16 time_stamp_off;
108 } __packed;
109
110 struct vnt_tx_datahead_a_fb {
111 struct vnt_phy_field a;
112 __le16 duration;
113 __le16 time_stamp_off;
114 __le16 duration_f0;
115 __le16 duration_f1;
116 } __packed;
117
118 /* RTS buffer header */
119 struct vnt_rts_g {
120 struct vnt_phy_field b;
121 struct vnt_phy_field a;
122 __le16 duration_ba;
123 __le16 duration_aa;
124 __le16 duration_bb;
125 u16 reserved;
126 struct ieee80211_rts data;
127 } __packed;
128
129 struct vnt_rts_g_fb {
130 struct vnt_phy_field b;
131 struct vnt_phy_field a;
132 __le16 duration_ba;
133 __le16 duration_aa;
134 __le16 duration_bb;
135 u16 wReserved;
136 __le16 rts_duration_ba_f0;
137 __le16 rts_duration_aa_f0;
138 __le16 rts_duration_ba_f1;
139 __le16 rts_duration_aa_f1;
140 struct ieee80211_rts data;
141 } __packed;
142
143 struct vnt_rts_ab {
144 struct vnt_phy_field ab;
145 __le16 duration;
146 u16 reserved;
147 struct ieee80211_rts data;
148 } __packed;
149
150 struct vnt_rts_a_fb {
151 struct vnt_phy_field a;
152 __le16 duration;
153 u16 reserved;
154 __le16 rts_duration_f0;
155 __le16 rts_duration_f1;
156 struct ieee80211_rts data;
157 } __packed;
158
159 /* CTS buffer header */
160 struct vnt_cts {
161 struct vnt_phy_field b;
162 __le16 duration_ba;
163 u16 reserved;
164 struct ieee80211_cts data;
165 u16 reserved2;
166 } __packed;
167
168 struct vnt_cts_fb {
169 struct vnt_phy_field b;
170 __le16 duration_ba;
171 u16 reserved;
172 __le16 cts_duration_ba_f0;
173 __le16 cts_duration_ba_f1;
174 struct ieee80211_cts data;
175 u16 reserved2;
176 } __packed;
177
178 struct vnt_tx_fifo_head {
179 u8 tx_key[WLAN_KEY_LEN_CCMP];
180 __le16 fifo_ctl;
181 __le16 time_stamp;
182 __le16 frag_ctl;
183 __le16 current_rate;
184 } __packed;
185
186 struct vnt_tx_short_buf_head {
187 __le16 fifo_ctl;
188 u16 time_stamp;
189 struct vnt_phy_field ab;
190 __le16 duration;
191 __le16 time_stamp_off;
192 } __packed;
193
194 int vnt_generate_fifo_header(struct vnt_private *, u32,
195 PSTxDesc head_td, struct sk_buff *);
196 int vnt_beacon_make(struct vnt_private *, struct ieee80211_vif *);
197 int vnt_beacon_enable(struct vnt_private *, struct ieee80211_vif *,
198 struct ieee80211_bss_conf *);
199
200 #endif // __RXTX_H__