Hal8723DPhyCfg.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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 __INC_HAL8723DPHYCFG_H__
  16. #define __INC_HAL8723DPHYCFG_H__
  17. /*--------------------------Define Parameters-------------------------------*/
  18. #define LOOP_LIMIT 5
  19. #define MAX_STALL_TIME 50 /* us */
  20. #define AntennaDiversityValue 0x80 /* (Adapter->bSoftwareAntennaDiversity ? 0x00 : 0x80) */
  21. #define MAX_TXPWR_IDX_NMODE_92S 63
  22. #define Reset_Cnt_Limit 3
  23. #ifdef CONFIG_PCI_HCI
  24. #define MAX_AGGR_NUM 0x0B
  25. #else
  26. #define MAX_AGGR_NUM 0x07
  27. #endif /* CONFIG_PCI_HCI */
  28. /*--------------------------Define Parameters End-------------------------------*/
  29. /*------------------------------Define structure----------------------------*/
  30. /*------------------------------Define structure End----------------------------*/
  31. /*--------------------------Exported Function prototype---------------------*/
  32. u32
  33. PHY_QueryBBReg_8723D(
  34. IN PADAPTER Adapter,
  35. IN u32 RegAddr,
  36. IN u32 BitMask
  37. );
  38. VOID
  39. PHY_SetBBReg_8723D(
  40. IN PADAPTER Adapter,
  41. IN u32 RegAddr,
  42. IN u32 BitMask,
  43. IN u32 Data
  44. );
  45. u32
  46. PHY_QueryRFReg_8723D(
  47. IN PADAPTER Adapter,
  48. IN enum rf_path eRFPath,
  49. IN u32 RegAddr,
  50. IN u32 BitMask
  51. );
  52. VOID
  53. PHY_SetRFReg_8723D(
  54. IN PADAPTER Adapter,
  55. IN enum rf_path eRFPath,
  56. IN u32 RegAddr,
  57. IN u32 BitMask,
  58. IN u32 Data
  59. );
  60. /* MAC/BB/RF HAL config */
  61. int PHY_BBConfig8723D(PADAPTER Adapter);
  62. int PHY_RFConfig8723D(PADAPTER Adapter);
  63. s32 PHY_MACConfig8723D(PADAPTER padapter);
  64. int
  65. PHY_ConfigRFWithParaFile_8723D(
  66. IN PADAPTER Adapter,
  67. IN u8 *pFileName,
  68. enum rf_path eRFPath
  69. );
  70. VOID
  71. PHY_SetTxPowerIndex_8723D(
  72. IN PADAPTER Adapter,
  73. IN u32 PowerIndex,
  74. IN enum rf_path RFPath,
  75. IN u8 Rate
  76. );
  77. u8
  78. PHY_GetTxPowerIndex_8723D(
  79. IN PADAPTER pAdapter,
  80. IN enum rf_path RFPath,
  81. IN u8 Rate,
  82. IN u8 BandWidth,
  83. IN u8 Channel,
  84. struct txpwr_idx_comp *tic
  85. );
  86. VOID
  87. PHY_GetTxPowerLevel8723D(
  88. IN PADAPTER Adapter,
  89. OUT s32 *powerlevel
  90. );
  91. VOID
  92. PHY_SetTxPowerLevel8723D(
  93. IN PADAPTER Adapter,
  94. IN u8 channel
  95. );
  96. VOID
  97. PHY_SetSwChnlBWMode8723D(
  98. IN PADAPTER Adapter,
  99. IN u8 channel,
  100. IN enum channel_width Bandwidth,
  101. IN u8 Offset40,
  102. IN u8 Offset80
  103. );
  104. VOID phy_set_rf_path_switch_8723d(
  105. IN struct dm_struct *phydm,
  106. IN bool bMain
  107. );
  108. /*--------------------------Exported Function prototype End---------------------*/
  109. #endif