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