phydm_antdect.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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 __PHYDMANTDECT_H__
  21. #define __PHYDMANTDECT_H__
  22. #define ANTDECT_VERSION "2.1" /*2015.07.29 by YuChen*/
  23. #if (defined(CONFIG_ANT_DETECTION))
  24. /* #if( DM_ODM_SUPPORT_TYPE & (ODM_WIN |ODM_CE)) */
  25. /* ANT Test */
  26. #define ANTTESTALL 0x00 /*ant A or B will be Testing*/
  27. #define ANTTESTA 0x01 /*ant A will be Testing*/
  28. #define ANTTESTB 0x02 /*ant B will be testing*/
  29. #define MAX_ANTENNA_DETECTION_CNT 10
  30. struct _ANT_DETECTED_INFO {
  31. boolean is_ant_detected;
  32. u32 db_for_ant_a;
  33. u32 db_for_ant_b;
  34. u32 db_for_ant_o;
  35. };
  36. enum dm_swas_e {
  37. antenna_a = 1,
  38. antenna_b = 2,
  39. antenna_max = 3,
  40. };
  41. /* 1 [1. Single Tone method] =================================================== */
  42. void
  43. odm_single_dual_antenna_default_setting(
  44. void *p_dm_void
  45. );
  46. boolean
  47. odm_single_dual_antenna_detection(
  48. void *p_dm_void,
  49. u8 mode
  50. );
  51. /* 1 [2. Scan AP RSSI method] ================================================== */
  52. #define sw_ant_div_check_before_link odm_sw_ant_div_check_before_link
  53. boolean
  54. odm_sw_ant_div_check_before_link(
  55. void *p_dm_void
  56. );
  57. /* 1 [3. PSD method] ========================================================== */
  58. void
  59. odm_single_dual_antenna_detection_psd(
  60. void *p_dm_void
  61. );
  62. #endif
  63. void
  64. odm_sw_ant_detect_init(
  65. void *p_dm_void
  66. );
  67. #endif