WIP FPC-III support
[linux/fpc-iii.git] / drivers / staging / vt6655 / rxtx.h
blob464dd89078b2bc7508a775c080a4f4ca306c7555
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
4 * All rights reserved.
6 * File: rxtx.h
8 * Purpose:
10 * Author: Jerry Chen
12 * Date: Jun. 27, 2002
16 #ifndef __RXTX_H__
17 #define __RXTX_H__
19 #include "device.h"
21 #define DEFAULT_MSDU_LIFETIME_RES_64us 8000 /* 64us */
22 #define DEFAULT_MGN_LIFETIME_RES_64us 125 /* 64us */
25 /*--------------------- Export Definitions -------------------------*/
27 /*--------------------- Export Variables --------------------------*/
29 /*--------------------- Export Functions --------------------------*/
31 /* MIC HDR data header */
32 struct vnt_mic_hdr {
33 u8 id;
34 u8 tx_priority;
35 u8 mic_addr2[ETH_ALEN];
36 u8 ccmp_pn[IEEE80211_CCMP_PN_LEN];
37 __be16 payload_len;
38 __be16 hlen;
39 __le16 frame_control;
40 u8 addr1[ETH_ALEN];
41 u8 addr2[ETH_ALEN];
42 u8 addr3[ETH_ALEN];
43 __le16 seq_ctrl;
44 u8 addr4[ETH_ALEN];
45 u16 packing; /* packing to 48 bytes */
46 } __packed;
48 /* RsvTime buffer header */
49 struct vnt_rrv_time_rts {
50 __le16 rts_rrv_time_ba;
51 __le16 rts_rrv_time_aa;
52 __le16 rts_rrv_time_bb;
53 u16 reserved;
54 __le16 rrv_time_b;
55 __le16 rrv_time_a;
56 } __packed;
58 struct vnt_rrv_time_cts {
59 __le16 cts_rrv_time_ba;
60 u16 reserved;
61 __le16 rrv_time_b;
62 __le16 rrv_time_a;
63 } __packed;
65 struct vnt_rrv_time_ab {
66 __le16 rts_rrv_time;
67 __le16 rrv_time;
68 } __packed;
70 /* TX data header */
71 struct vnt_tx_datahead_g {
72 struct vnt_phy_field b;
73 struct vnt_phy_field a;
74 __le16 duration_b;
75 __le16 duration_a;
76 __le16 time_stamp_off_b;
77 __le16 time_stamp_off_a;
78 } __packed;
80 struct vnt_tx_datahead_g_fb {
81 struct vnt_phy_field b;
82 struct vnt_phy_field a;
83 __le16 duration_b;
84 __le16 duration_a;
85 __le16 duration_a_f0;
86 __le16 duration_a_f1;
87 __le16 time_stamp_off_b;
88 __le16 time_stamp_off_a;
89 } __packed;
91 struct vnt_tx_datahead_ab {
92 struct vnt_phy_field ab;
93 __le16 duration;
94 __le16 time_stamp_off;
95 } __packed;
97 struct vnt_tx_datahead_a_fb {
98 struct vnt_phy_field a;
99 __le16 duration;
100 __le16 time_stamp_off;
101 __le16 duration_f0;
102 __le16 duration_f1;
103 } __packed;
105 /* RTS buffer header */
106 struct vnt_rts_g {
107 struct vnt_phy_field b;
108 struct vnt_phy_field a;
109 __le16 duration_ba;
110 __le16 duration_aa;
111 __le16 duration_bb;
112 u16 reserved;
113 struct ieee80211_rts data;
114 } __packed;
116 struct vnt_rts_g_fb {
117 struct vnt_phy_field b;
118 struct vnt_phy_field a;
119 __le16 duration_ba;
120 __le16 duration_aa;
121 __le16 duration_bb;
122 u16 wReserved;
123 __le16 rts_duration_ba_f0;
124 __le16 rts_duration_aa_f0;
125 __le16 rts_duration_ba_f1;
126 __le16 rts_duration_aa_f1;
127 struct ieee80211_rts data;
128 } __packed;
130 struct vnt_rts_ab {
131 struct vnt_phy_field ab;
132 __le16 duration;
133 u16 reserved;
134 struct ieee80211_rts data;
135 } __packed;
137 struct vnt_rts_a_fb {
138 struct vnt_phy_field a;
139 __le16 duration;
140 u16 reserved;
141 __le16 rts_duration_f0;
142 __le16 rts_duration_f1;
143 struct ieee80211_rts data;
144 } __packed;
146 /* CTS buffer header */
147 struct vnt_cts {
148 struct vnt_phy_field b;
149 __le16 duration_ba;
150 u16 reserved;
151 struct ieee80211_cts data;
152 u16 reserved2;
153 } __packed;
155 struct vnt_cts_fb {
156 struct vnt_phy_field b;
157 __le16 duration_ba;
158 u16 reserved;
159 __le16 cts_duration_ba_f0;
160 __le16 cts_duration_ba_f1;
161 struct ieee80211_cts data;
162 u16 reserved2;
163 } __packed;
165 struct vnt_tx_fifo_head {
166 u8 tx_key[WLAN_KEY_LEN_CCMP];
167 __le16 fifo_ctl;
168 __le16 time_stamp;
169 __le16 frag_ctl;
170 __le16 current_rate;
171 } __packed;
173 struct vnt_tx_short_buf_head {
174 __le16 fifo_ctl;
175 u16 time_stamp;
176 struct vnt_phy_field ab;
177 __le16 duration;
178 __le16 time_stamp_off;
179 } __packed;
181 int vnt_generate_fifo_header(struct vnt_private *priv, u32 dma_idx,
182 struct vnt_tx_desc *head_td, struct sk_buff *skb);
183 int vnt_beacon_make(struct vnt_private *priv, struct ieee80211_vif *vif);
184 int vnt_beacon_enable(struct vnt_private *priv, struct ieee80211_vif *vif,
185 struct ieee80211_bss_conf *conf);
187 #endif /* __RXTX_H__ */