rtw_qos.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. #ifndef _RTW_QOS_H_
  16. #define _RTW_QOS_H_
  17. #define DRV_CFG_UAPSD_VO BIT0
  18. #define DRV_CFG_UAPSD_VI BIT1
  19. #define DRV_CFG_UAPSD_BK BIT2
  20. #define DRV_CFG_UAPSD_BE BIT3
  21. #define WMM_IE_UAPSD_VO BIT0
  22. #define WMM_IE_UAPSD_VI BIT1
  23. #define WMM_IE_UAPSD_BK BIT2
  24. #define WMM_IE_UAPSD_BE BIT3
  25. #define WMM_TID0 BIT0
  26. #define WMM_TID1 BIT1
  27. #define WMM_TID2 BIT2
  28. #define WMM_TID3 BIT3
  29. #define WMM_TID4 BIT4
  30. #define WMM_TID5 BIT5
  31. #define WMM_TID6 BIT6
  32. #define WMM_TID7 BIT7
  33. #define AP_SUPPORTED_UAPSD BIT7
  34. /* TC = Traffic Category, TID0~7 represents TC */
  35. #define BIT_MASK_TID_TC 0xff
  36. /* TS = Traffic Stream, TID8~15 represents TS */
  37. #define BIT_MASK_TID_TS 0xff00
  38. #define ALL_TID_TC_SUPPORTED_UAPSD 0xff
  39. struct qos_priv {
  40. unsigned int qos_option; /* bit mask option: u-apsd, s-apsd, ts, block ack... */
  41. #ifdef CONFIG_WMMPS_STA
  42. /* uapsd (unscheduled automatic power-save delivery) = a kind of wmmps */
  43. u8 uapsd_max_sp_len;
  44. /* declare uapsd_tid as a bitmap for the uapsd setting of TID 0~15 */
  45. u16 uapsd_tid;
  46. /* declare uapsd_tid_delivery_enabled as a bitmap for the delivery-enabled setting of TID 0~7 */
  47. u8 uapsd_tid_delivery_enabled;
  48. /* declare uapsd_tid_trigger_enabled as a bitmap for the trigger-enabled setting of TID 0~7 */
  49. u8 uapsd_tid_trigger_enabled;
  50. /* declare uapsd_ap_supported to record whether the connected ap supports uapsd or not */
  51. u8 uapsd_ap_supported;
  52. #endif /* CONFIG_WMMPS_STA */
  53. };
  54. #endif /* _RTL871X_QOS_H_ */