Hal8723BPhyCfg.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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 __INC_HAL8723BPHYCFG_H__
  21. #define __INC_HAL8723BPHYCFG_H__
  22. /*--------------------------Define Parameters-------------------------------*/
  23. #define LOOP_LIMIT 5
  24. #define MAX_STALL_TIME 50 //us
  25. #define AntennaDiversityValue 0x80 //(Adapter->bSoftwareAntennaDiversity ? 0x00:0x80)
  26. #define MAX_TXPWR_IDX_NMODE_92S 63
  27. #define Reset_Cnt_Limit 3
  28. #ifdef CONFIG_PCI_HCI
  29. #define MAX_AGGR_NUM 0x0B
  30. #else
  31. #define MAX_AGGR_NUM 0x07
  32. #endif // CONFIG_PCI_HCI
  33. /*--------------------------Define Parameters End-------------------------------*/
  34. /*------------------------------Define structure----------------------------*/
  35. /*------------------------------Define structure End----------------------------*/
  36. /*--------------------------Exported Function prototype---------------------*/
  37. u32
  38. PHY_QueryBBReg_8723B(
  39. IN PADAPTER Adapter,
  40. IN u32 RegAddr,
  41. IN u32 BitMask
  42. );
  43. VOID
  44. PHY_SetBBReg_8723B(
  45. IN PADAPTER Adapter,
  46. IN u32 RegAddr,
  47. IN u32 BitMask,
  48. IN u32 Data
  49. );
  50. u32
  51. PHY_QueryRFReg_8723B(
  52. IN PADAPTER Adapter,
  53. IN u8 eRFPath,
  54. IN u32 RegAddr,
  55. IN u32 BitMask
  56. );
  57. VOID
  58. PHY_SetRFReg_8723B(
  59. IN PADAPTER Adapter,
  60. IN u8 eRFPath,
  61. IN u32 RegAddr,
  62. IN u32 BitMask,
  63. IN u32 Data
  64. );
  65. /* MAC/BB/RF HAL config */
  66. int PHY_BBConfig8723B(PADAPTER Adapter );
  67. int PHY_RFConfig8723B(PADAPTER Adapter );
  68. s32 PHY_MACConfig8723B(PADAPTER padapter);
  69. int
  70. PHY_ConfigRFWithParaFile_8723B(
  71. IN PADAPTER Adapter,
  72. IN u8* pFileName,
  73. RF_PATH eRFPath
  74. );
  75. int
  76. PHY_ConfigRFWithHeaderFile_8723B(
  77. IN PADAPTER Adapter,
  78. RF_PATH eRFPath
  79. );
  80. int
  81. PHY_ConfigRFWithTxPwrTrackParaFile(
  82. IN PADAPTER Adapter,
  83. IN s8 * pFileName
  84. );
  85. VOID
  86. storePwrIndexDiffRateOffset(
  87. IN PADAPTER Adapter,
  88. IN u32 RegAddr,
  89. IN u32 BitMask,
  90. IN u32 Data
  91. );
  92. void PHY_SetTxPowerLevel8723B(PADAPTER Adapter, u8 channel);
  93. VOID
  94. PHY_SetTxPowerLevel8723B(
  95. IN PADAPTER Adapter,
  96. IN u8 channel
  97. );
  98. VOID
  99. PHY_SetBWMode8723B(
  100. IN PADAPTER Adapter,
  101. IN CHANNEL_WIDTH Bandwidth, // 20M or 40M
  102. IN unsigned char Offset // Upper, Lower, or Don't care
  103. );
  104. VOID
  105. PHY_SwChnl8723B( // Call after initialization
  106. IN PADAPTER Adapter,
  107. IN u8 channel
  108. );
  109. VOID
  110. PHY_SetSwChnlBWMode8723B(
  111. IN PADAPTER Adapter,
  112. IN u8 channel,
  113. IN CHANNEL_WIDTH Bandwidth,
  114. IN u8 Offset40,
  115. IN u8 Offset80
  116. );
  117. /*--------------------------Exported Function prototype End---------------------*/
  118. #endif