phydm_dfs.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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 __PHYDM_DFS_H__
  21. #define __PHYDM_DFS_H__
  22. #define DFS_VERSION "1.1"
  23. /* ============================================================
  24. Definition
  25. ============================================================
  26. */
  27. /*
  28. ============================================================
  29. 1 structure
  30. ============================================================
  31. */
  32. struct _DFS_STATISTICS {
  33. u8 mask_idx;
  34. u8 igi_cur;
  35. u8 igi_pre;
  36. u8 st_l2h_cur;
  37. u16 fa_count_pre;
  38. u16 fa_inc_hist[5];
  39. u16 vht_crc_ok_cnt_pre;
  40. u16 ht_crc_ok_cnt_pre;
  41. u16 leg_crc_ok_cnt_pre;
  42. u16 short_pulse_cnt_pre;
  43. u16 long_pulse_cnt_pre;
  44. u8 pwdb_th;
  45. u8 pwdb_th_cur;
  46. u8 pwdb_scalar_factor;
  47. u8 peak_th;
  48. u8 short_pulse_cnt_th;
  49. u8 long_pulse_cnt_th;
  50. u8 peak_window;
  51. u8 nb2wb_th;
  52. u8 fa_mask_th;
  53. u8 det_flag_offset;
  54. u8 st_l2h_max;
  55. u8 st_l2h_min;
  56. u8 mask_hist_checked;
  57. boolean pulse_flag_hist[5];
  58. boolean radar_det_mask_hist[5];
  59. boolean idle_mode;
  60. boolean force_TP_mode;
  61. boolean dbg_mode;
  62. boolean det_print;
  63. boolean det_print2;
  64. };
  65. /* ============================================================
  66. enumeration
  67. ============================================================
  68. */
  69. enum phydm_dfs_region_domain {
  70. PHYDM_DFS_DOMAIN_UNKNOWN = 0,
  71. PHYDM_DFS_DOMAIN_FCC = 1,
  72. PHYDM_DFS_DOMAIN_MKK = 2,
  73. PHYDM_DFS_DOMAIN_ETSI = 3,
  74. };
  75. /*
  76. ============================================================
  77. function prototype
  78. ============================================================
  79. */
  80. #if defined(CONFIG_PHYDM_DFS_MASTER)
  81. void phydm_radar_detect_reset(void *p_dm_void);
  82. void phydm_radar_detect_disable(void *p_dm_void);
  83. void phydm_radar_detect_enable(void *p_dm_void);
  84. boolean phydm_radar_detect(void *p_dm_void);
  85. void phydm_dfs_parameter_init(void *p_dm_void);
  86. void phydm_dfs_debug(void *p_dm_void, u32 *const argv, u32 *_used, char *output, u32 *_out_len);
  87. #endif /* defined(CONFIG_PHYDM_DFS_MASTER) */
  88. boolean phydm_dfs_is_meteorology_channel(void *p_dm_void);
  89. boolean
  90. phydm_dfs_master_enabled(
  91. void *p_dm_void
  92. );
  93. #endif /*#ifndef __PHYDM_DFS_H__ */