1 #ifndef _BATYPE_H_
2 #define _BATYPE_H_
3 
4 #define		TOTAL_TXBA_NUM	16
5 #define	TOTAL_RXBA_NUM	16
6 
7 #define	BA_SETUP_TIMEOUT	200
8 #define	BA_INACT_TIMEOUT	60000
9 
10 #define	BA_POLICY_DELAYED		0
11 #define	BA_POLICY_IMMEDIATE	1
12 
13 #define	ADDBA_STATUS_SUCCESS			0
14 #define	ADDBA_STATUS_REFUSED		37
15 #define	ADDBA_STATUS_INVALID_PARAM	38
16 
17 #define	DELBA_REASON_QSTA_LEAVING	36
18 #define	DELBA_REASON_END_BA			37
19 #define	DELBA_REASON_UNKNOWN_BA	38
20 #define	DELBA_REASON_TIMEOUT			39
21 /*  whether need define BA Action frames here?
22 struct ieee80211_ADDBA_Req{
23 	struct ieee80211_header_data header;
24 	u8	category;
25 	u8
26 } __attribute__ ((packed));
27 */
28 //Is this need?I put here just to make it easier to define structure BA_RECORD //WB
29 typedef union _SEQUENCE_CONTROL{
30 	u16 ShortData;
31 	struct {
32 		u16	FragNum:4;
33 		u16	SeqNum:12;
34 	}field;
35 }SEQUENCE_CONTROL, *PSEQUENCE_CONTROL;
36 
37 typedef union _BA_PARAM_SET {
38 	u8 charData[2];
39 	u16 shortData;
40 	struct {
41 		u16 AMSDU_Support:1;
42 		u16 BAPolicy:1;
43 		u16 TID:4;
44 		u16 BufferSize:10;
45 	} field;
46 } BA_PARAM_SET, *PBA_PARAM_SET;
47 
48 typedef union _DELBA_PARAM_SET {
49 	u8 charData[2];
50 	u16 shortData;
51 	struct {
52 		u16 Reserved:11;
53 		u16 Initiator:1;
54 		u16 TID:4;
55 	} field;
56 } DELBA_PARAM_SET, *PDELBA_PARAM_SET;
57 
58 typedef struct _BA_RECORD {
59 	struct timer_list		Timer;
60 	u8				bValid;
61 	u8				DialogToken;
62 	BA_PARAM_SET		BaParamSet;
63 	u16				BaTimeoutValue;
64 	SEQUENCE_CONTROL	BaStartSeqCtrl;
65 } BA_RECORD, *PBA_RECORD;
66 
67 #endif //end _BATYPE_H_
68