Commit | Line | Data |
---|---|---|
d7c43082 | 1 | // SPDX-License-Identifier: GPL-2.0+ |
5449c685 FB |
2 | /* |
3 | * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc. | |
4 | * All rights reserved. | |
5 | * | |
612822f5 | 6 | * File: rxtx.h |
5449c685 FB |
7 | * |
8 | * Purpose: | |
9 | * | |
10 | * Author: Jerry Chen | |
11 | * | |
12 | * Date: Jun. 27, 2002 | |
13 | * | |
14 | */ | |
15 | ||
5449c685 FB |
16 | #ifndef __RXTX_H__ |
17 | #define __RXTX_H__ | |
18 | ||
5449c685 | 19 | #include "device.h" |
5449c685 | 20 | |
1903e6dd MP |
21 | #define DEFAULT_MSDU_LIFETIME_RES_64us 8000 /* 64us */ |
22 | #define DEFAULT_MGN_LIFETIME_RES_64us 125 /* 64us */ | |
23 | ||
24 | ||
5449c685 FB |
25 | /*--------------------- Export Definitions -------------------------*/ |
26 | ||
5449c685 FB |
27 | /*--------------------- Export Variables --------------------------*/ |
28 | ||
29 | /*--------------------- Export Functions --------------------------*/ | |
5449c685 | 30 | |
11a72e5e MP |
31 | /* MIC HDR data header */ |
32 | struct vnt_mic_hdr { | |
33 | u8 id; | |
34 | u8 tx_priority; | |
35 | u8 mic_addr2[ETH_ALEN]; | |
09a903b5 | 36 | u8 ccmp_pn[IEEE80211_CCMP_PN_LEN]; |
11a72e5e MP |
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; | |
47 | ||
a9e6a2dc MP |
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; | |
57 | ||
d66a5a74 MP |
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; | |
64 | ||
f6a634c3 MP |
65 | struct vnt_rrv_time_ab { |
66 | __le16 rts_rrv_time; | |
67 | __le16 rrv_time; | |
68 | } __packed; | |
69 | ||
72edb7ed MP |
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; | |
79 | ||
2dd76679 MP |
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; | |
90 | ||
9ce842ab MP |
91 | struct vnt_tx_datahead_ab { |
92 | struct vnt_phy_field ab; | |
93 | __le16 duration; | |
94 | __le16 time_stamp_off; | |
95 | } __packed; | |
96 | ||
9c62c7ab MP |
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; | |
104 | ||
17434f09 MP |
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; | |
115 | ||
9587b092 MP |
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; | |
129 | ||
e21eb1c8 MP |
130 | struct vnt_rts_ab { |
131 | struct vnt_phy_field ab; | |
132 | __le16 duration; | |
133 | u16 reserved; | |
134 | struct ieee80211_rts data; | |
135 | } __packed; | |
136 | ||
8e44804e MP |
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; | |
145 | ||
f5172b0e MP |
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; | |
154 | ||
db1afd18 MP |
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; | |
164 | ||
01eec153 MP |
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; | |
172 | ||
96417235 MP |
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; | |
180 | ||
656874d3 TR |
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); | |
01eec153 | 186 | |
fce7f393 | 187 | #endif /* __RXTX_H__ */ |