phydm_edcaturbocheck.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  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. * You should have received a copy of the GNU General Public License along with
  15. * this program; if not, write to the Free Software Foundation, Inc.,
  16. * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
  17. *
  18. *
  19. ******************************************************************************/
  20. #ifndef __PHYDMEDCATURBOCHECK_H__
  21. #define __PHYDMEDCATURBOCHECK_H__
  22. #if PHYDM_SUPPORT_EDCA
  23. /*#define EDCATURBO_VERSION "2.1"*/
  24. #define EDCATURBO_VERSION "2.3" /*2015.07.29 by YuChen*/
  25. struct _EDCA_TURBO_ {
  26. boolean is_current_turbo_edca;
  27. boolean is_cur_rdl_state;
  28. #if (DM_ODM_SUPPORT_TYPE == ODM_CE)
  29. u32 prv_traffic_idx; /* edca turbo */
  30. #endif
  31. };
  32. #if (DM_ODM_SUPPORT_TYPE & (ODM_WIN | ODM_CE))
  33. static u32 edca_setting_UL[HT_IOT_PEER_MAX] =
  34. /* UNKNOWN REALTEK_90 REALTEK_92SE BROADCOM RALINK ATHEROS CISCO MERU MARVELL 92U_AP SELF_AP(DownLink/Tx) */
  35. { 0x5e4322, 0xa44f, 0x5e4322, 0x5ea32b, 0x5ea422, 0x5ea322, 0x3ea430, 0x5ea42b, 0x5ea44f, 0x5e4322, 0x5e4322};
  36. static u32 edca_setting_DL[HT_IOT_PEER_MAX] =
  37. /* UNKNOWN REALTEK_90 REALTEK_92SE BROADCOM RALINK ATHEROS CISCO MERU, MARVELL 92U_AP SELF_AP(UpLink/Rx) */
  38. { 0xa44f, 0x5ea44f, 0x5e4322, 0x5ea42b, 0xa44f, 0xa630, 0x5ea630, 0x5ea42b, 0xa44f, 0xa42b, 0xa42b};
  39. static u32 edca_setting_dl_g_mode[HT_IOT_PEER_MAX] =
  40. /* UNKNOWN REALTEK_90 REALTEK_92SE BROADCOM RALINK ATHEROS CISCO MERU, MARVELL 92U_AP SELF_AP */
  41. { 0x4322, 0xa44f, 0x5e4322, 0xa42b, 0x5e4322, 0x4322, 0xa42b, 0x5ea42b, 0xa44f, 0x5e4322, 0x5ea42b};
  42. #endif
  43. void
  44. odm_edca_turbo_check(
  45. void *p_dm_void
  46. );
  47. void
  48. odm_edca_turbo_init(
  49. void *p_dm_void
  50. );
  51. #if (DM_ODM_SUPPORT_TYPE == ODM_WIN)
  52. void
  53. odm_edca_turbo_check_mp(
  54. void *p_dm_void
  55. );
  56. /* check if edca turbo is disabled */
  57. boolean
  58. odm_is_edca_turbo_disable(
  59. void *p_dm_void
  60. );
  61. /* choose edca paramter for special IOT case */
  62. void
  63. odm_edca_para_sel_by_iot(
  64. void *p_dm_void,
  65. u32 *EDCA_BE_UL,
  66. u32 *EDCA_BE_DL
  67. );
  68. /* check if it is UL or DL */
  69. void
  70. odm_edca_choose_traffic_idx(
  71. void *p_dm_void,
  72. u64 cur_tx_bytes,
  73. u64 cur_rx_bytes,
  74. boolean is_bias_on_rx,
  75. boolean *p_is_cur_rdl_state
  76. );
  77. #elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
  78. void
  79. odm_edca_turbo_check_ce(
  80. void *p_dm_void
  81. );
  82. #endif
  83. #endif /*PHYDM_SUPPORT_EDCA*/
  84. #endif