phydm_kfree.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 __PHYDMKFREE_H__
  21. #define __PHYDKFREE_H__
  22. #define KFREE_VERSION "1.0"
  23. #if (DM_ODM_SUPPORT_TYPE & ODM_WIN)
  24. #define BB_GAIN_NUM 6
  25. #define KFREE_FLAG_ON BIT(0)
  26. #define KFREE_FLAG_THERMAL_K_ON BIT(1)
  27. #endif
  28. #define PPG_BB_GAIN_2G_TXA_OFFSET_8821C 0x1EE
  29. #define PPG_BB_GAIN_5GL1_TXA_OFFSET_8821C 0x1EC
  30. #define PPG_BB_GAIN_5GL2_TXA_OFFSET_8821C 0x1E8
  31. #define PPG_BB_GAIN_5GM1_TXA_OFFSET_8821C 0x1E4
  32. #define PPG_BB_GAIN_5GM2_TXA_OFFSET_8821C 0x1E0
  33. #define PPG_BB_GAIN_5GH1_TXA_OFFSET_8821C 0x1DC
  34. #define PPG_THERMAL_OFFSET_8821C 0x1EF
  35. struct odm_power_trim_data {
  36. u8 flag;
  37. s8 bb_gain[BB_GAIN_NUM][MAX_RF_PATH];
  38. s8 thermal;
  39. };
  40. enum phydm_kfree_channeltosw {
  41. PHYDM_2G = 0,
  42. PHYDM_5GLB1 = 1,
  43. PHYDM_5GLB2 = 2,
  44. PHYDM_5GMB1 = 3,
  45. PHYDM_5GMB2 = 4,
  46. PHYDM_5GHB = 5,
  47. };
  48. void
  49. phydm_get_thermal_trim_offset(
  50. void *p_dm_void
  51. );
  52. void
  53. phydm_get_power_trim_offset(
  54. void *p_dm_void
  55. );
  56. s8
  57. phydm_get_thermal_offset(
  58. void *p_dm_void
  59. );
  60. void
  61. phydm_config_kfree(
  62. void *p_dm_void,
  63. u8 channel_to_sw
  64. );
  65. #endif