1 /******************************************************************************
2  * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
3  *
4  * This program is distributed in the hope that it will be useful, but WITHOUT
5  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
7  * more details.
8  *
9  * The full GNU General Public License is included in this distribution in the
10  * file called LICENSE.
11  *
12  * Contact Information:
13  * wlanfae <wlanfae@realtek.com>
14  *****************************************************************************/
15 #ifndef _BATYPE_H_
16 #define _BATYPE_H_
17 
18 #define	BA_SETUP_TIMEOUT	200
19 
20 #define	BA_POLICY_DELAYED		0
21 #define	BA_POLICY_IMMEDIATE	1
22 
23 #define	ADDBA_STATUS_SUCCESS			0
24 #define	ADDBA_STATUS_REFUSED		37
25 #define	ADDBA_STATUS_INVALID_PARAM	38
26 
27 #define	DELBA_REASON_END_BA			37
28 #define	DELBA_REASON_UNKNOWN_BA	38
29 #define	DELBA_REASON_TIMEOUT			39
30 union sequence_control {
31 	u16 ShortData;
32 	struct {
33 		u16	FragNum:4;
34 		u16	SeqNum:12;
35 	} field;
36 };
37 
38 union ba_param_set {
39 	u8 charData[2];
40 	u16 shortData;
41 	struct {
42 		u16 AMSDU_Support:1;
43 		u16 BAPolicy:1;
44 		u16 TID:4;
45 		u16 BufferSize:10;
46 	} field;
47 };
48 
49 union delba_param_set {
50 	u8 charData[2];
51 	u16 shortData;
52 	struct {
53 		u16 Reserved:11;
54 		u16 Initiator:1;
55 		u16 TID:4;
56 	} field;
57 };
58 
59 struct ba_record {
60 	struct timer_list		Timer;
61 	u8				bValid;
62 	u8				DialogToken;
63 	union ba_param_set BaParamSet;
64 	u16				BaTimeoutValue;
65 	union sequence_control BaStartSeqCtrl;
66 };
67 
68 #endif
69