1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /****************************************************************************** 3 * 4 * Copyright(c) 2007 - 2017 Realtek Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify it 7 * under the terms of version 2 of the GNU General Public License as 8 * published by the Free Software Foundation. 9 * 10 * This program is distributed in the hope that it will be useful, but WITHOUT 11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 13 * more details. 14 * 15 *****************************************************************************/ 16 17 18 #ifndef _RTW_QOS_H_ 19 #define _RTW_QOS_H_ 20 21 #define DRV_CFG_UAPSD_VO BIT0 22 #define DRV_CFG_UAPSD_VI BIT1 23 #define DRV_CFG_UAPSD_BK BIT2 24 #define DRV_CFG_UAPSD_BE BIT3 25 26 #define WMM_IE_UAPSD_VO BIT0 27 #define WMM_IE_UAPSD_VI BIT1 28 #define WMM_IE_UAPSD_BK BIT2 29 #define WMM_IE_UAPSD_BE BIT3 30 31 #define WMM_TID0 BIT0 32 #define WMM_TID1 BIT1 33 #define WMM_TID2 BIT2 34 #define WMM_TID3 BIT3 35 #define WMM_TID4 BIT4 36 #define WMM_TID5 BIT5 37 #define WMM_TID6 BIT6 38 #define WMM_TID7 BIT7 39 40 #define AP_SUPPORTED_UAPSD BIT7 41 /* TC = Traffic Category, TID0~7 represents TC */ 42 #define BIT_MASK_TID_TC 0xff 43 /* TS = Traffic Stream, TID8~15 represents TS */ 44 #define BIT_MASK_TID_TS 0xff00 45 #define ALL_TID_TC_SUPPORTED_UAPSD 0xff 46 47 struct qos_priv { 48 49 unsigned int qos_option; /* bit mask option: u-apsd, s-apsd, ts, block ack... */ 50 51 #ifdef CONFIG_WMMPS_STA 52 /* uapsd (unscheduled automatic power-save delivery) = a kind of wmmps */ 53 u8 uapsd_max_sp_len; 54 /* declare uapsd_tid as a bitmap for the uapsd setting of TID 0~15 */ 55 u16 uapsd_tid; 56 /* declare uapsd_tid_delivery_enabled as a bitmap for the delivery-enabled setting of TID 0~7 */ 57 u8 uapsd_tid_delivery_enabled; 58 /* declare uapsd_tid_trigger_enabled as a bitmap for the trigger-enabled setting of TID 0~7 */ 59 u8 uapsd_tid_trigger_enabled; 60 /* declare uapsd_ap_supported to record whether the connected ap supports uapsd or not */ 61 u8 uapsd_ap_supported; 62 #endif /* CONFIG_WMMPS_STA */ 63 64 }; 65 66 67 #endif /* _RTL871X_QOS_H_ */