blob: 4bbee1c2fcacef62a866c7b222605210ee2674ec [file] [log] [blame]
Forest Bond92b96792009-06-13 07:38:31 -04001/*
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
Forest Bond92b96792009-06-13 07:38:31 -040029#ifndef __RXTX_H__
30#define __RXTX_H__
31
Forest Bond92b96792009-06-13 07:38:31 -040032#include "device.h"
Forest Bond92b96792009-06-13 07:38:31 -040033#include "wcmd.h"
Malcolm Priestleyaed387c2013-08-20 22:52:30 +010034#include "baseband.h"
Forest Bond92b96792009-06-13 07:38:31 -040035
Malcolm Priestley5a5d6a82013-08-23 14:33:55 +010036/* 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
Malcolm Priestley6398a592013-08-16 21:26:55 +010054/* RsvTime buffer header */
55struct 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;
63
Malcolm Priestley4f990052013-08-16 23:38:57 +010064struct vnt_rrv_time_cts {
65 u16 wCTSTxRrvTime_ba;
66 u16 wReserved;
67 u16 wTxRrvTime_b;
68 u16 wTxRrvTime_a;
69} __packed;
70
Malcolm Priestley976467d2013-08-16 23:44:04 +010071struct vnt_rrv_time_ab {
72 u16 wRTSTxRrvTime;
73 u16 wTxRrvTime;
74} __packed;
75
Malcolm Priestley7e60a3de2013-08-16 23:48:03 +010076/* TX data header */
77struct vnt_tx_datahead_g {
Malcolm Priestleyaed387c2013-08-20 22:52:30 +010078 struct vnt_phy_field b;
79 struct vnt_phy_field a;
Malcolm Priestley7e60a3de2013-08-16 23:48:03 +010080 u16 wDuration_b;
81 u16 wDuration_a;
82 u16 wTimeStampOff_b;
83 u16 wTimeStampOff_a;
84} __packed;
85
Malcolm Priestley7c05c542013-08-16 23:49:15 +010086struct vnt_tx_datahead_g_fb {
Malcolm Priestleyaed387c2013-08-20 22:52:30 +010087 struct vnt_phy_field b;
88 struct vnt_phy_field a;
Malcolm Priestley7c05c542013-08-16 23:49:15 +010089 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;
96
Malcolm Priestley558becf2013-08-16 23:50:32 +010097struct vnt_tx_datahead_ab {
Malcolm Priestleyaed387c2013-08-20 22:52:30 +010098 struct vnt_phy_field ab;
Malcolm Priestley558becf2013-08-16 23:50:32 +010099 u16 wDuration;
100 u16 wTimeStampOff;
101} __packed;
102
Malcolm Priestley1da4ee22013-08-16 23:51:38 +0100103struct vnt_tx_datahead_a_fb {
Malcolm Priestleyaed387c2013-08-20 22:52:30 +0100104 struct vnt_phy_field a;
Malcolm Priestley1da4ee22013-08-16 23:51:38 +0100105 u16 wDuration;
106 u16 wTimeStampOff;
107 u16 wDuration_f0;
108 u16 wDuration_f1;
109} __packed;
110
Malcolm Priestleyc521cb52013-08-15 21:23:25 +0100111/* RTS buffer header */
112struct vnt_rts_g {
Malcolm Priestleyaed387c2013-08-20 22:52:30 +0100113 struct vnt_phy_field b;
114 struct vnt_phy_field a;
Malcolm Priestleyc521cb52013-08-15 21:23:25 +0100115 u16 wDuration_ba;
116 u16 wDuration_aa;
117 u16 wDuration_bb;
118 u16 wReserved;
119 struct ieee80211_rts data;
120} __packed;
121
122struct vnt_rts_g_fb {
Malcolm Priestleyaed387c2013-08-20 22:52:30 +0100123 struct vnt_phy_field b;
124 struct vnt_phy_field a;
Malcolm Priestleyc521cb52013-08-15 21:23:25 +0100125 u16 wDuration_ba;
126 u16 wDuration_aa;
127 u16 wDuration_bb;
128 u16 wReserved;
129 u16 wRTSDuration_ba_f0;
130 u16 wRTSDuration_aa_f0;
131 u16 wRTSDuration_ba_f1;
132 u16 wRTSDuration_aa_f1;
133 struct ieee80211_rts data;
134} __packed;
135
136struct vnt_rts_ab {
Malcolm Priestleyaed387c2013-08-20 22:52:30 +0100137 struct vnt_phy_field ab;
Malcolm Priestleyc521cb52013-08-15 21:23:25 +0100138 u16 wDuration;
139 u16 wReserved;
140 struct ieee80211_rts data;
141} __packed;
142
143struct vnt_rts_a_fb {
Malcolm Priestleyaed387c2013-08-20 22:52:30 +0100144 struct vnt_phy_field a;
Malcolm Priestleyc521cb52013-08-15 21:23:25 +0100145 u16 wDuration;
146 u16 wReserved;
147 u16 wRTSDuration_f0;
148 u16 wRTSDuration_f1;
149 struct ieee80211_rts data;
150} __packed;
151
Malcolm Priestleyf0c5ba22013-08-15 21:27:22 +0100152/* CTS buffer header */
153struct vnt_cts {
Malcolm Priestleyaed387c2013-08-20 22:52:30 +0100154 struct vnt_phy_field b;
Malcolm Priestleyf0c5ba22013-08-15 21:27:22 +0100155 u16 wDuration_ba;
156 u16 wReserved;
157 struct ieee80211_cts data;
158 u16 reserved2;
159} __packed;
160
161struct vnt_cts_fb {
Malcolm Priestleyaed387c2013-08-20 22:52:30 +0100162 struct vnt_phy_field b;
Malcolm Priestleyf0c5ba22013-08-15 21:27:22 +0100163 u16 wDuration_ba;
164 u16 wReserved;
165 u16 wCTSDuration_ba_f0;
166 u16 wCTSDuration_ba_f1;
167 struct ieee80211_cts data;
168 u16 reserved2;
169} __packed;
170
Malcolm Priestley13fe62a2013-08-26 11:17:52 +0100171union vnt_tx_data_head {
172 /* rts g */
173 struct vnt_rts_g rts_g;
174 struct vnt_rts_g_fb rts_g_fb;
175 /* rts a/b */
176 struct vnt_rts_ab rts_ab;
177 struct vnt_rts_a_fb rts_a_fb;
178 /* cts g */
179 struct vnt_cts cts_g;
180 struct vnt_cts_fb cts_g_fb;
181};
182
Malcolm Priestleyf39c0d82013-08-15 19:34:37 +0100183struct vnt_tx_buffer {
184 u8 byType;
185 u8 byPKTNO;
186 u16 wTxByteCount;
Malcolm Priestleyed743952012-11-11 15:34:51 +0000187 u32 adwTxKey[4];
Malcolm Priestleyf39c0d82013-08-15 19:34:37 +0100188 u16 wFIFOCtl;
189 u16 wTimeStamp;
190 u16 wFragCtl;
191 u16 wReserved;
192} __packed;
Forest Bond92b96792009-06-13 07:38:31 -0400193
Malcolm Priestley01f865b2013-08-15 19:40:08 +0100194struct vnt_beacon_buffer {
195 u8 byType;
196 u8 byPKTNO;
197 u16 wTxByteCount;
198 u16 wFIFOCtl;
199 u16 wTimeStamp;
200} __packed;
Forest Bond92b96792009-06-13 07:38:31 -0400201
Malcolm Priestleyd56131d2013-01-17 23:15:22 +0000202void vDMA0_tx_80211(struct vnt_private *, struct sk_buff *skb);
203int nsDMA_tx_packet(struct vnt_private *, u32 uDMAIdx, struct sk_buff *skb);
204CMD_STATUS csMgmt_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
205CMD_STATUS csBeacon_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
206int bRelayPacketSend(struct vnt_private *, u8 *pbySkbData, u32 uDataLen,
207 u32 uNodeIndex);
Forest Bond92b96792009-06-13 07:38:31 -0400208
Andres Moree7b07d12010-05-01 19:12:26 -0300209#endif /* __RXTX_H__ */