halbtc8821cwifionly.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /******************************************************************************
  2. *
  3. * Copyright(c) 2016 - 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 __INC_HAL8821CWIFIONLYHWCFG_H
  16. #define __INC_HAL8821CWIFIONLYHWCFG_H
  17. struct rfe_type_8821c_wifi_only {
  18. u8 rfe_module_type;
  19. boolean ext_ant_switch_exist;
  20. u8 ext_ant_switch_type; /* 0:DPDT, 1:SPDT */
  21. u8 ext_ant_switch_ctrl_polarity; /* iF 0: DPDT_P=0, DPDT_N=1 => BTG to Main, WL_A+G to Aux */
  22. boolean ant_at_main_port;
  23. boolean wlg_Locate_at_btg; /* If true: WLG at BTG, If false: WLG at WLAG */
  24. boolean ext_ant_switch_diversity; /* If diversity on */
  25. };
  26. enum bt_8821c_wifi_only_ext_ant_switch_type {
  27. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_USE_DPDT = 0x0,
  28. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_USE_SPDT = 0x1,
  29. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_NONE = 0x2,
  30. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_MAX
  31. };
  32. enum bt_8821c_wifi_only_ext_ant_switch_ctrl_type {
  33. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_CTRL_BY_BBSW = 0x0,
  34. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_CTRL_BY_PTA = 0x1,
  35. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_CTRL_BY_ANTDIV = 0x2,
  36. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_CTRL_BY_MAC = 0x3,
  37. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_CTRL_BY_BT = 0x4,
  38. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_CTRL_MAX
  39. };
  40. enum bt_8821c_wifi_only_ext_ant_switch_pos_type {
  41. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_TO_BT = 0x0,
  42. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_TO_WLG = 0x1,
  43. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_TO_WLA = 0x2,
  44. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_TO_NOCARE = 0x3,
  45. BT_8821C_WIFI_ONLY_EXT_ANT_SWITCH_TO_MAX
  46. };
  47. VOID
  48. hal8821c_wifi_only_switch_antenna(
  49. IN struct wifi_only_cfg *pwifionlycfg,
  50. IN u1Byte is_5g
  51. );
  52. VOID
  53. halbtc8821c_wifi_only_set_rfe_type(
  54. IN struct wifi_only_cfg *pwifionlycfg
  55. );
  56. VOID
  57. ex_hal8821c_wifi_only_hw_config(
  58. IN struct wifi_only_cfg *pwifionlycfg
  59. );
  60. VOID
  61. ex_hal8821c_wifi_only_scannotify(
  62. IN struct wifi_only_cfg *pwifionlycfg,
  63. IN u1Byte is_5g
  64. );
  65. VOID
  66. ex_hal8821c_wifi_only_connectnotify(
  67. IN struct wifi_only_cfg *pwifionlycfg,
  68. IN u1Byte is_5g
  69. );
  70. VOID
  71. ex_hal8821c_wifi_only_switchbandnotify(
  72. IN struct wifi_only_cfg *pwifionlycfg,
  73. IN u1Byte is_5g
  74. );
  75. #endif