Merge tag 'media/v6.3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[linux-block.git] / drivers / staging / rtl8192u / ieee80211 / rtl819x_Qos.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
8fc8598e
JC
2#ifndef __INC_QOS_TYPE_H
3#define __INC_QOS_TYPE_H
4
ab9a0665
JW
5/*
6 * ACI/AIFSN Field.
7 * Ref: WMM spec 2.2.2: WME Parameter Element, p.12.
8 * Note: 1 Byte Length
9 */
10struct aci_aifsn {
11 u8 aifsn:4;
12 u8 acm:1;
13 u8 aci:2;
14 u8:1;
4116ad1d 15};
8fc8598e 16
84d979bc
JW
17/*
18 * Direction Field Values.
19 * Ref: WMM spec 2.2.11: WME TSPEC Element, p.18.
20 */
489d5cd8 21enum direction_value {
8fc8598e
JC
22 DIR_UP = 0, // 0x00 // UpLink
23 DIR_DOWN = 1, // 0x01 // DownLink
24 DIR_DIRECT = 2, // 0x10 // DirectLink
25 DIR_BI_DIR = 3, // 0x11 // Bi-Direction
489d5cd8 26};
8fc8598e 27
893ce939
JW
28/*
29 * TS Info field in WMM TSPEC Element.
30 * Ref:
31 * 1. WMM spec 2.2.11: WME TSPEC Element, p.18.
32 * 2. 8185 QoS code: QOS_TSINFO [def. in QoS_mp.h]
33 * Note: sizeof 3 Bytes
34 */
35struct qos_tsinfo {
0a679b93
JW
36 u16 uc_traffic_type:1; //WMM is reserved
37 u16 uc_tsid:4;
38 u16 uc_direction:2;
39 u16 uc_access_policy:2; //WMM: bit8=0, bit7=1
40 u16 uc_aggregation:1; //WMM is reserved
41 u16 uc_psb:1; //WMMSA is APSD
42 u16 uc_up:3;
43 u16 uc_ts_info_ack_policy:2; //WMM is reserved
44 u8 uc_schedule:1; //WMM is reserved
45 u8:7;
8e542c48 46};
8fc8598e 47
9365607a
JW
48/*
49 * WMM TSPEC Body.
50 * Ref: WMM spec 2.2.11: WME TSPEC Element, p.16.
51 * Note: sizeof 55 bytes
52 */
53struct tspec_body {
73b068f5 54 struct qos_tsinfo ts_info; //u8 TSInfo[3];
7390ebe9
JW
55 u16 nominal_msd_usize;
56 u16 max_msd_usize;
57 u32 min_service_itv;
58 u32 max_service_itv;
59 u32 inactivity_itv;
60 u32 suspen_itv;
61 u32 service_start_time;
62 u32 min_data_rate;
63 u32 mean_data_rate;
64 u32 peak_data_rate;
65 u32 max_burst_size;
66 u32 delay_bound;
67 u32 min_phy_rate;
68 u16 surplus_bandwidth_allowance;
69 u16 medium_time;
9365607a 70};
8fc8598e 71
84d979bc
JW
72/*
73 * 802.11 Management frame Status Code field
74 */
4f698fc1 75struct octet_string {
4375c036
JW
76 u8 *octet;
77 u16 length;
4f698fc1 78};
b63eaed0 79
0b0251ad 80#define is_ac_valid(ac) (((ac) <= 7) ? true : false)
8fc8598e
JC
81
82#endif // #ifndef __INC_QOS_TYPE_H