halphyrf_ap.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 __HALPHYRF_H__
  16. #define __HALPHYRF_H__
  17. #include "halrf/halrf_powertracking_ap.h"
  18. #include "halrf/halrf_kfree.h"
  19. #if (RTL8814A_SUPPORT == 1)
  20. #include "halrf/rtl8814a/halrf_iqk_8814a.h"
  21. #endif
  22. #if (RTL8822B_SUPPORT == 1)
  23. #include "halrf/rtl8822b/halrf_iqk_8822b.h"
  24. #endif
  25. #if (RTL8821C_SUPPORT == 1)
  26. #include "halrf/rtl8821c/halrf_iqk_8821c.h"
  27. #endif
  28. #if (RTL8195B_SUPPORT == 1)
  29. // #include "halrf/rtl8195b/halrf.h"
  30. #include "halrf/rtl8195b/halrf_iqk_8195b.h"
  31. #include "halrf/rtl8195b/halrf_txgapk_8195b.h"
  32. #include "halrf/rtl8195b/halrf_dpk_8195b.h"
  33. #endif
  34. #if (RTL8198F_SUPPORT == 1)
  35. #include "halrf/rtl8198f/halrf_iqk_8198f.h"
  36. #include "halrf/rtl8198f/halrf_dpk_8198f.h"
  37. #endif
  38. enum pwrtrack_method {
  39. BBSWING,
  40. TXAGC,
  41. MIX_MODE,
  42. TSSI_MODE
  43. };
  44. typedef void (*func_set_pwr)(void *, enum pwrtrack_method, u8, u8);
  45. typedef void(*func_iqk)(void *, u8, u8, u8);
  46. typedef void (*func_lck)(void *);
  47. /* refine by YuChen for 8814A */
  48. typedef void (*func_swing)(void *, u8 **, u8 **, u8 **, u8 **);
  49. typedef void (*func_swing8814only)(void *, u8 **, u8 **, u8 **, u8 **);
  50. typedef void (*func_all_swing)(void *, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **);
  51. typedef void (*func_all_swing_ex)(void *, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **, u8 **);
  52. struct txpwrtrack_cfg {
  53. u8 swing_table_size_cck;
  54. u8 swing_table_size_ofdm;
  55. u8 threshold_iqk;
  56. u8 threshold_dpk;
  57. u8 average_thermal_num;
  58. u8 rf_path_count;
  59. u32 thermal_reg_addr;
  60. func_set_pwr odm_tx_pwr_track_set_pwr;
  61. func_iqk do_iqk;
  62. func_lck phy_lc_calibrate;
  63. func_swing get_delta_swing_table;
  64. func_swing8814only get_delta_swing_table8814only;
  65. func_all_swing get_delta_all_swing_table;
  66. func_all_swing_ex get_delta_all_swing_table_ex;
  67. };
  68. void
  69. configure_txpower_track(
  70. void *dm_void,
  71. struct txpwrtrack_cfg *config
  72. );
  73. void
  74. odm_txpowertracking_callback_thermal_meter(
  75. void *dm_void
  76. );
  77. #if (RTL8192E_SUPPORT == 1)
  78. void
  79. odm_txpowertracking_callback_thermal_meter_92e(
  80. void *dm_void
  81. );
  82. #endif
  83. #if (RTL8814A_SUPPORT == 1)
  84. void
  85. odm_txpowertracking_callback_thermal_meter_jaguar_series2(
  86. void *dm_void
  87. );
  88. #elif ODM_IC_11AC_SERIES_SUPPORT
  89. void
  90. odm_txpowertracking_callback_thermal_meter_jaguar_series(
  91. void *dm_void
  92. );
  93. #elif (RTL8197F_SUPPORT == 1 || RTL8822B_SUPPORT == 1)
  94. void
  95. odm_txpowertracking_callback_thermal_meter_jaguar_series3(
  96. void *dm_void
  97. );
  98. #endif
  99. #define IS_CCK_RATE(_rate) (ODM_MGN_1M == _rate || _rate == ODM_MGN_2M || _rate == ODM_MGN_5_5M || _rate == ODM_MGN_11M)
  100. #define ODM_TARGET_CHNL_NUM_2G_5G 59
  101. void
  102. odm_reset_iqk_result(
  103. void *dm_void
  104. );
  105. u8
  106. odm_get_right_chnl_place_for_iqk(
  107. u8 chnl
  108. );
  109. void phydm_rf_init(void *dm_void);
  110. void phydm_rf_watchdog(void *dm_void);
  111. #endif /*#ifndef __HALPHYRF_H__*/