phydm_antdect.h 2.1 KB

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