hal_dm.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 __HAL_DM_H__
  16. #define __HAL_DM_H__
  17. #define adapter_to_phydm(adapter) (&(GET_HAL_DATA(adapter)->odmpriv))
  18. #define dvobj_to_phydm(dvobj) adapter_to_phydm(dvobj_get_primary_adapter(dvobj))
  19. void rtw_phydm_priv_init(_adapter *adapter);
  20. void Init_ODM_ComInfo(_adapter *adapter);
  21. void rtw_phydm_init(_adapter *adapter);
  22. void rtw_hal_turbo_edca(_adapter *adapter);
  23. u8 rtw_phydm_is_iqk_in_progress(_adapter *adapter);
  24. void GetHalODMVar(
  25. PADAPTER Adapter,
  26. HAL_ODM_VARIABLE eVariable,
  27. PVOID pValue1,
  28. PVOID pValue2);
  29. void SetHalODMVar(
  30. PADAPTER Adapter,
  31. HAL_ODM_VARIABLE eVariable,
  32. PVOID pValue1,
  33. BOOLEAN bSet);
  34. void rtw_phydm_ra_registed(_adapter *adapter, struct sta_info *psta);
  35. #ifdef CONFIG_DYNAMIC_SOML
  36. void rtw_dyn_soml_byte_update(_adapter *adapter, u8 data_rate, u32 size);
  37. void rtw_dyn_soml_para_set(_adapter *adapter, u8 train_num, u8 intvl,
  38. u8 period, u8 delay);
  39. void rtw_dyn_soml_config(_adapter *adapter);
  40. #endif
  41. void rtw_phydm_watchdog(_adapter *adapter);
  42. void rtw_hal_update_iqk_fw_offload_cap(_adapter *adapter);
  43. void dump_sta_info(void *sel, struct sta_info *psta);
  44. void dump_sta_traffic(void *sel, _adapter *adapter, struct sta_info *psta);
  45. #ifdef CONFIG_DBG_RF_CAL
  46. void rtw_hal_iqk_test(_adapter *adapter, bool recovery, bool clear, bool segment);
  47. void rtw_hal_lck_test(_adapter *adapter);
  48. #endif
  49. s8 rtw_phydm_get_min_rssi(_adapter *adapter);
  50. u8 rtw_phydm_get_cur_igi(_adapter *adapter);
  51. #ifdef CONFIG_LPS_LCLK_WD_TIMER
  52. extern void phydm_rssi_monitor_check(void *p_dm_void);
  53. void rtw_phydm_wd_lps_lclk_hdl(_adapter *adapter);
  54. void rtw_phydm_watchdog_in_lps_lclk(_adapter *adapter);
  55. #endif
  56. enum phy_cnt {
  57. FA_OFDM,
  58. FA_CCK,
  59. FA_TOTAL,
  60. CCA_OFDM,
  61. CCA_CCK,
  62. CCA_ALL,
  63. CRC32_OK_VHT,
  64. CRC32_OK_HT,
  65. CRC32_OK_LEGACY,
  66. CRC32_OK_CCK,
  67. CRC32_ERROR_VHT,
  68. CRC32_ERROR_HT,
  69. CRC32_ERROR_LEGACY,
  70. CRC32_ERROR_CCK,
  71. };
  72. u32 rtw_phydm_get_phy_cnt(_adapter *adapter, enum phy_cnt cnt);
  73. #if ((RTL8822B_SUPPORT == 1) || (RTL8821C_SUPPORT == 1) || (RTL8814B_SUPPORT == 1))
  74. void rtw_phydm_iqk_trigger(_adapter *adapter);
  75. #endif
  76. void rtw_phydm_read_efuse(_adapter *adapter);
  77. #ifdef CONFIG_SUPPORT_DYNAMIC_TXPWR
  78. void rtw_phydm_set_dyntxpwr(_adapter *adapter, u8 *desc, u8 mac_id);
  79. #endif
  80. #ifdef CONFIG_RTW_TX_2PATH_EN
  81. void rtw_phydm_tx_2path_en(_adapter *adapter);
  82. #endif
  83. #ifdef CONFIG_LPS_PG
  84. void rtw_phydm_lps_pg_hdl(_adapter *adapter, struct sta_info *sta, bool in_lpspg);
  85. #endif
  86. #endif /* __HAL_DM_H__ */