halphyrf_ce.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 __HAL_PHY_RF_H__
  21. #define __HAL_PHY_RF_H__
  22. #include "phydm_kfree.h"
  23. #if (RTL8814A_SUPPORT == 1)
  24. #include "rtl8814a/phydm_iqk_8814a.h"
  25. #endif
  26. #if (RTL8822B_SUPPORT == 1)
  27. #include "rtl8822b/phydm_iqk_8822b.h"
  28. #endif
  29. #if (RTL8821C_SUPPORT == 1)
  30. #include "rtl8821c/phydm_iqk_8821c.h"
  31. #endif
  32. #include "phydm_powertracking_ce.h"
  33. enum spur_cal_method {
  34. PLL_RESET,
  35. AFE_PHASE_SEL
  36. };
  37. enum pwrtrack_method {
  38. BBSWING,
  39. TXAGC,
  40. MIX_MODE,
  41. TSSI_MODE,
  42. MIX_2G_TSSI_5G_MODE,
  43. MIX_5G_TSSI_2G_MODE
  44. };
  45. typedef void (*func_set_pwr)(void *, enum pwrtrack_method, u8, u8);
  46. typedef void(*func_iqk)(void *, u8, u8, u8);
  47. typedef void (*func_lck)(void *);
  48. typedef void (*func_swing)(void *, u8 **, u8 **, u8 **, u8 **);
  49. typedef void (*func_swing8814only)(void *, u8 **, u8 **, u8 **, u8 **);
  50. typedef void(*func_swing_xtal)(void *, s8 **, s8 **);
  51. typedef void(*func_set_xtal)(void *);
  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_swing_xtal get_delta_swing_xtal_table;
  66. func_set_xtal odm_txxtaltrack_set_xtal;
  67. };
  68. void
  69. configure_txpower_track(
  70. void *p_dm_void,
  71. struct _TXPWRTRACK_CFG *p_config
  72. );
  73. void
  74. odm_clear_txpowertracking_state(
  75. void *p_dm_void
  76. );
  77. void
  78. odm_txpowertracking_callback_thermal_meter(
  79. #if (DM_ODM_SUPPORT_TYPE & ODM_AP)
  80. void *p_dm_void
  81. #else
  82. struct _ADAPTER *adapter
  83. #endif
  84. );
  85. #define ODM_TARGET_CHNL_NUM_2G_5G 59
  86. void
  87. odm_reset_iqk_result(
  88. void *p_dm_void
  89. );
  90. u8
  91. odm_get_right_chnl_place_for_iqk(
  92. u8 chnl
  93. );
  94. void phydm_rf_init(void *p_dm_void);
  95. void phydm_rf_watchdog(void *p_dm_void);
  96. #endif /* #ifndef __HAL_PHY_RF_H__ */