halphyrf_ce.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. * The full GNU General Public License is included in this distribution in the
  15. * file called LICENSE.
  16. *
  17. * Contact Information:
  18. * wlanfae <wlanfae@realtek.com>
  19. * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
  20. * Hsinchu 300, Taiwan.
  21. *
  22. * Larry Finger <Larry.Finger@lwfinger.net>
  23. *
  24. *****************************************************************************/
  25. #ifndef __HALPHYRF_H__
  26. #define __HALPHYRF_H__
  27. #include "halrf/halrf_kfree.h"
  28. #if (RTL8814A_SUPPORT == 1)
  29. #include "halrf/rtl8814a/halrf_iqk_8814a.h"
  30. #endif
  31. #if (RTL8822B_SUPPORT == 1)
  32. #include "halrf/rtl8822b/halrf_iqk_8822b.h"
  33. #endif
  34. #if (RTL8821C_SUPPORT == 1)
  35. #include "halrf/rtl8821c/halrf_iqk_8821c.h"
  36. #endif
  37. #if (RTL8195B_SUPPORT == 1)
  38. /* #include "halrf/rtl8195b/halrf.h" */
  39. #include "halrf/rtl8195b/halrf_iqk_8195b.h"
  40. #include "halrf/rtl8195b/halrf_txgapk_8195b.h"
  41. #include "halrf/rtl8195b/halrf_dpk_8195b.h"
  42. #endif
  43. #include "halrf/halrf_powertracking_ce.h"
  44. enum spur_cal_method {
  45. PLL_RESET,
  46. AFE_PHASE_SEL
  47. };
  48. enum pwrtrack_method {
  49. BBSWING,
  50. TXAGC,
  51. MIX_MODE,
  52. TSSI_MODE,
  53. MIX_2G_TSSI_5G_MODE,
  54. MIX_5G_TSSI_2G_MODE
  55. };
  56. typedef void (*func_set_pwr)(void *, enum pwrtrack_method, u8, u8);
  57. typedef void (*func_iqk)(void *, u8, u8, u8);
  58. typedef void (*func_lck)(void *);
  59. typedef void (*func_swing)(void *, u8 **, u8 **, u8 **, u8 **);
  60. typedef void (*func_swing8814only)(void *, u8 **, u8 **, u8 **, u8 **);
  61. typedef void (*func_swing_xtal)(void *, s8 **, s8 **);
  62. typedef void (*func_set_xtal)(void *);
  63. struct txpwrtrack_cfg {
  64. u8 swing_table_size_cck;
  65. u8 swing_table_size_ofdm;
  66. u8 threshold_iqk;
  67. u8 threshold_dpk;
  68. u8 average_thermal_num;
  69. u8 rf_path_count;
  70. u32 thermal_reg_addr;
  71. func_set_pwr odm_tx_pwr_track_set_pwr;
  72. func_iqk do_iqk;
  73. func_lck phy_lc_calibrate;
  74. func_swing get_delta_swing_table;
  75. func_swing8814only get_delta_swing_table8814only;
  76. func_swing_xtal get_delta_swing_xtal_table;
  77. func_set_xtal odm_txxtaltrack_set_xtal;
  78. };
  79. void configure_txpower_track(void *dm_void, struct txpwrtrack_cfg *config);
  80. void odm_clear_txpowertracking_state(void *dm_void);
  81. #if (DM_ODM_SUPPORT_TYPE & ODM_AP)
  82. void odm_txpowertracking_callback_thermal_meter(void *dm_void);
  83. #elif (DM_ODM_SUPPORT_TYPE & ODM_CE)
  84. void odm_txpowertracking_callback_thermal_meter(void *dm);
  85. #else
  86. void odm_txpowertracking_callback_thermal_meter(void *adapter);
  87. #endif
  88. #define ODM_TARGET_CHNL_NUM_2G_5G 59
  89. void odm_reset_iqk_result(void *dm_void);
  90. u8 odm_get_right_chnl_place_for_iqk(u8 chnl);
  91. void phydm_rf_init(void *dm_void);
  92. void phydm_rf_watchdog(void *dm_void);
  93. #endif /*#ifndef __HALPHYRF_H__*/