1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #ifndef _BATYPE_H_ 3 #define _BATYPE_H_ 4 5 #define BA_SETUP_TIMEOUT 200 6 7 #define BA_POLICY_DELAYED 0 8 #define BA_POLICY_IMMEDIATE 1 9 10 #define ADDBA_STATUS_SUCCESS 0 11 #define ADDBA_STATUS_REFUSED 37 12 #define ADDBA_STATUS_INVALID_PARAM 38 13 14 #define DELBA_REASON_END_BA 37 15 #define DELBA_REASON_UNKNOWN_BA 38 16 #define DELBA_REASON_TIMEOUT 39 17 18 union sequence_control { 19 u16 short_data; 20 struct { 21 u16 frag_num:4; 22 u16 seq_num:12; 23 } field; 24 }; 25 26 union ba_param_set { 27 u16 short_data; 28 struct { 29 u16 amsdu_support:1; 30 u16 ba_policy:1; 31 u16 tid:4; 32 u16 buffer_size:10; 33 } field; 34 }; 35 36 union delba_param_set { 37 u16 short_data; 38 struct { 39 u16 reserved:11; 40 u16 initiator:1; 41 u16 tid:4; 42 } field; 43 }; 44 45 struct ba_record { 46 struct timer_list timer; 47 u8 valid; 48 u8 dialog_token; 49 union ba_param_set param_set; 50 u16 timeout_value; 51 union sequence_control start_seq_ctrl; 52 }; 53 54 #endif //end _BATYPE_H_ 55