rtl8723a_hal.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  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 __RTL8723A_HAL_H__
  21. #define __RTL8723A_HAL_H__
  22. //#include "hal_com.h"
  23. #if 1
  24. #include "hal_data.h"
  25. #else
  26. #include "../hal/OUTSRC/odm_precomp.h"
  27. #endif
  28. #include "rtl8723a_spec.h"
  29. #include "rtl8723a_pg.h"
  30. #include "Hal8723APhyReg.h"
  31. #include "Hal8723APhyCfg.h"
  32. #include "rtl8723a_rf.h"
  33. #ifdef CONFIG_BT_COEXIST
  34. #include "rtl8723a_bt-coexist.h"
  35. #endif
  36. #include "rtl8723a_dm.h"
  37. #include "rtl8723a_recv.h"
  38. #include "rtl8723a_xmit.h"
  39. #include "rtl8723a_cmd.h"
  40. #include "rtl8723a_led.h"
  41. #include "Hal8723PwrSeq.h"
  42. #ifdef DBG_CONFIG_ERROR_DETECT
  43. #include "rtl8723a_sreset.h"
  44. #endif
  45. #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
  46. //2TODO: We should define 8192S firmware related macro settings here!!
  47. #define RTL819X_DEFAULT_RF_TYPE RF_1T2R
  48. #define RTL819X_TOTAL_RF_PATH 2
  49. //---------------------------------------------------------------------
  50. // RTL8723S From file
  51. //---------------------------------------------------------------------
  52. #define RTL8723_FW_UMC_IMG "rtl8723S\\rtl8723fw.bin"
  53. #define RTL8723_FW_UMC_B_IMG "rtl8723S\\rtl8723fw_B.bin"
  54. #define RTL8723_PHY_REG "rtl8723S\\PHY_REG_1T.txt"
  55. #define RTL8723_PHY_RADIO_A "rtl8723S\\radio_a_1T.txt"
  56. #define RTL8723_PHY_RADIO_B "rtl8723S\\radio_b_1T.txt"
  57. #define RTL8723_AGC_TAB "rtl8723S\\AGC_TAB_1T.txt"
  58. #define RTL8723_PHY_MACREG "rtl8723S\\MAC_REG.txt"
  59. #define RTL8723_PHY_REG_PG "rtl8723S\\PHY_REG_PG.txt"
  60. #define RTL8723_PHY_REG_MP "rtl8723S\\PHY_REG_MP.txt"
  61. //---------------------------------------------------------------------
  62. // RTL8723S From header
  63. //---------------------------------------------------------------------
  64. // Fw Array
  65. #define Rtl8723_FwImageArray Rtl8723SFwImgArray
  66. #define Rtl8723_FwUMCBCutImageArrayWithBT Rtl8723SFwUMCBCutImgArrayWithBT
  67. #define Rtl8723_FwUMCBCutImageArrayWithoutBT Rtl8723SFwUMCBCutImgArrayWithoutBT
  68. #define Rtl8723_ImgArrayLength Rtl8723SImgArrayLength
  69. #define Rtl8723_UMCBCutImgArrayWithBTLength Rtl8723SUMCBCutImgArrayWithBTLength
  70. #define Rtl8723_UMCBCutImgArrayWithoutBTLength Rtl8723SUMCBCutImgArrayWithoutBTLength
  71. #define Rtl8723_PHY_REG_Array_PG Rtl8723SPHY_REG_Array_PG
  72. #define Rtl8723_PHY_REG_Array_PGLength Rtl8723SPHY_REG_Array_PGLength
  73. #if MP_DRIVER == 1
  74. #define Rtl8723E_FwBTImgArray Rtl8723EFwBTImgArray
  75. #define Rtl8723E_FwBTImgArrayLength Rtl8723EBTImgArrayLength
  76. #define Rtl8723_FwUMCBCutMPImageArray Rtl8723SFwUMCBCutMPImgArray
  77. #define Rtl8723_UMCBCutMPImgArrayLength Rtl8723SUMCBCutMPImgArrayLength
  78. #define Rtl8723_PHY_REG_Array_MP Rtl8723SPHY_REG_Array_MP
  79. #define Rtl8723_PHY_REG_Array_MPLength Rtl8723SPHY_REG_Array_MPLength
  80. #endif
  81. #ifndef CONFIG_PHY_SETTING_WITH_ODM
  82. // MAC/BB/PHY Array
  83. #define Rtl8723_MAC_Array Rtl8723SMAC_2T_Array
  84. //#define Rtl8723_AGCTAB_2TArray Rtl8723SAGCTAB_2TArray
  85. #define Rtl8723_AGCTAB_1TArray Rtl8723SAGCTAB_1TArray
  86. //#define Rtl8723_PHY_REG_2TArray Rtl8723SPHY_REG_2TArray
  87. #define Rtl8723_PHY_REG_1TArray Rtl8723SPHY_REG_1TArray
  88. //#define Rtl8723_RadioA_2TArray Rtl8723SRadioA_2TArray
  89. #define Rtl8723_RadioA_1TArray Rtl8723SRadioA_1TArray
  90. //#define Rtl8723_RadioB_2TArray Rtl8723SRadioB_2TArray
  91. #define Rtl8723_RadioB_1TArray Rtl8723SRadioB_1TArray
  92. // Array length
  93. #define Rtl8723_MAC_ArrayLength Rtl8723SMAC_2T_ArrayLength
  94. #define Rtl8723_AGCTAB_1TArrayLength Rtl8723SAGCTAB_1TArrayLength
  95. #define Rtl8723_PHY_REG_1TArrayLength Rtl8723SPHY_REG_1TArrayLength
  96. #define Rtl8723_RadioA_1TArrayLength Rtl8723SRadioA_1TArrayLength
  97. #define Rtl8723_RadioB_1TArrayLength Rtl8723SRadioB_1TArrayLength
  98. #endif // CONFIG_PHY_SETTING_WITH_ODM
  99. #endif // CONFIG_SDIO_HCI
  100. #ifdef CONFIG_USB_HCI
  101. //2TODO: We should define 8192S firmware related macro settings here!!
  102. #define RTL819X_DEFAULT_RF_TYPE RF_1T2R
  103. #define RTL819X_TOTAL_RF_PATH 2
  104. //TODO: The following need to check!!
  105. #define RTL8723_FW_UMC_IMG "rtl8192CU\\rtl8723fw.bin"
  106. #define RTL8723_FW_UMC_B_IMG "rtl8192CU\\rtl8723fw_B.bin"
  107. #define RTL8723_PHY_REG "rtl8723S\\PHY_REG_1T.txt"
  108. #define RTL8723_PHY_RADIO_A "rtl8723S\\radio_a_1T.txt"
  109. #define RTL8723_PHY_RADIO_B "rtl8723S\\radio_b_1T.txt"
  110. #define RTL8723_AGC_TAB "rtl8723S\\AGC_TAB_1T.txt"
  111. #define RTL8723_PHY_MACREG "rtl8723S\\MAC_REG.txt"
  112. #define RTL8723_PHY_REG_PG "rtl8723S\\PHY_REG_PG.txt"
  113. #define RTL8723_PHY_REG_MP "rtl8723S\\PHY_REG_MP.txt"
  114. //---------------------------------------------------------------------
  115. // RTL8723S From header
  116. //---------------------------------------------------------------------
  117. // Fw Array
  118. #define Rtl8723_FwImageArray Rtl8723UFwImgArray
  119. #define Rtl8723_FwUMCBCutImageArrayWithBT Rtl8723UFwUMCBCutImgArrayWithBT
  120. #define Rtl8723_FwUMCBCutImageArrayWithoutBT Rtl8723UFwUMCBCutImgArrayWithoutBT
  121. #define Rtl8723_ImgArrayLength Rtl8723UImgArrayLength
  122. #define Rtl8723_UMCBCutImgArrayWithBTLength Rtl8723UUMCBCutImgArrayWithBTLength
  123. #define Rtl8723_UMCBCutImgArrayWithoutBTLength Rtl8723UUMCBCutImgArrayWithoutBTLength
  124. #define Rtl8723_PHY_REG_Array_PG Rtl8723UPHY_REG_Array_PG
  125. #define Rtl8723_PHY_REG_Array_PGLength Rtl8723UPHY_REG_Array_PGLength
  126. #if MP_DRIVER == 1
  127. #define Rtl8723E_FwBTImgArray Rtl8723EFwBTImgArray
  128. #define Rtl8723E_FwBTImgArrayLength Rtl8723EBTImgArrayLength
  129. #define Rtl8723_FwUMCBCutMPImageArray Rtl8723SFwUMCBCutMPImgArray
  130. #define Rtl8723_UMCBCutMPImgArrayLength Rtl8723SUMCBCutMPImgArrayLength
  131. #define Rtl8723_PHY_REG_Array_MP Rtl8723UPHY_REG_Array_MP
  132. #define Rtl8723_PHY_REG_Array_MPLength Rtl8723UPHY_REG_Array_MPLength
  133. #endif
  134. #ifndef CONFIG_PHY_SETTING_WITH_ODM
  135. // MAC/BB/PHY Array
  136. #define Rtl8723_MAC_Array Rtl8723UMAC_2T_Array
  137. //#define Rtl8723_AGCTAB_2TArray Rtl8723UAGCTAB_2TArray
  138. #define Rtl8723_AGCTAB_1TArray Rtl8723UAGCTAB_1TArray
  139. //#define Rtl8723_PHY_REG_2TArray Rtl8723UPHY_REG_2TArray
  140. #define Rtl8723_PHY_REG_1TArray Rtl8723UPHY_REG_1TArray
  141. //#define Rtl8723_RadioA_2TArray Rtl8723URadioA_2TArray
  142. #define Rtl8723_RadioA_1TArray Rtl8723URadioA_1TArray
  143. //#define Rtl8723_RadioB_2TArray Rtl8723URadioB_2TArray
  144. #define Rtl8723_RadioB_1TArray Rtl8723URadioB_1TArray
  145. // Array length
  146. #define Rtl8723_MAC_ArrayLength Rtl8723UMAC_2T_ArrayLength
  147. #define Rtl8723_AGCTAB_1TArrayLength Rtl8723UAGCTAB_1TArrayLength
  148. #define Rtl8723_PHY_REG_1TArrayLength Rtl8723UPHY_REG_1TArrayLength
  149. #define Rtl8723_RadioA_1TArrayLength Rtl8723URadioA_1TArrayLength
  150. #define Rtl8723_RadioB_1TArrayLength Rtl8723URadioB_1TArrayLength
  151. #endif
  152. #endif
  153. #define FW_8723A_SIZE 0x8000
  154. #define FW_8723A_START_ADDRESS 0x1000
  155. #define FW_8723A_END_ADDRESS 0x1FFF //0x5FFF
  156. #define IS_FW_HEADER_EXIST_8723A(_pFwHdr) ((le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x92C0 ||\
  157. (le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x88C0 ||\
  158. (le16_to_cpu(_pFwHdr->Signature)&0xFFF0) == 0x2300)
  159. typedef struct _RT_FIRMWARE_8723A {
  160. FIRMWARE_SOURCE eFWSource;
  161. #ifdef CONFIG_EMBEDDED_FWIMG
  162. u8* szFwBuffer;
  163. #else
  164. u8 szFwBuffer[FW_8723A_SIZE];
  165. #endif
  166. u32 ulFwLength;
  167. #ifdef CONFIG_EMBEDDED_FWIMG
  168. u8* szBTFwBuffer;
  169. #else
  170. u8 szBTFwBuffer[FW_8723A_SIZE];
  171. #endif
  172. u32 ulBTFwLength;
  173. } RT_FIRMWARE_8723A, *PRT_FIRMWARE_8723A;
  174. //
  175. // This structure must be cared byte-ordering
  176. //
  177. // Added by tynli. 2009.12.04.
  178. typedef struct _RT_8723A_FIRMWARE_HDR
  179. {
  180. // 8-byte alinment required
  181. //--- LONG WORD 0 ----
  182. u16 Signature; // 92C0: test chip; 92C, 88C0: test chip; 88C1: MP A-cut; 92C1: MP A-cut
  183. u8 Category; // AP/NIC and USB/PCI
  184. u8 Function; // Reserved for different FW function indcation, for further use when driver needs to download different FW in different conditions
  185. u16 Version; // FW Version
  186. u8 Subversion; // FW Subversion, default 0x00
  187. u16 Rsvd1;
  188. //--- LONG WORD 1 ----
  189. u8 Month; // Release time Month field
  190. u8 Date; // Release time Date field
  191. u8 Hour; // Release time Hour field
  192. u8 Minute; // Release time Minute field
  193. u16 RamCodeSize; // The size of RAM code
  194. u16 Rsvd2;
  195. //--- LONG WORD 2 ----
  196. u32 SvnIdx; // The SVN entry index
  197. u32 Rsvd3;
  198. //--- LONG WORD 3 ----
  199. u32 Rsvd4;
  200. u32 Rsvd5;
  201. }RT_8723A_FIRMWARE_HDR, *PRT_8723A_FIRMWARE_HDR;
  202. #define DRIVER_EARLY_INT_TIME_8723A 0x05
  203. #define BCN_DMA_ATIME_INT_TIME_8723A 0x02
  204. // Note: We will divide number of page equally for each queue other than public queue!
  205. #define TX_TOTAL_PAGE_NUMBER_8723A 0xF8
  206. #define TX_PAGE_BOUNDARY (TX_TOTAL_PAGE_NUMBER_8723A + 1)
  207. // For Normal Chip Setting
  208. // (HPQ + LPQ + NPQ + PUBQ) shall be TX_TOTAL_PAGE_NUMBER_8723A
  209. #define NORMAL_PAGE_NUM_PUBQ 0xE7
  210. #define NORMAL_PAGE_NUM_HPQ 0x0C
  211. #define NORMAL_PAGE_NUM_LPQ 0x02
  212. #define NORMAL_PAGE_NUM_NPQ 0x02
  213. // For Test Chip Setting
  214. // (HPQ + LPQ + PUBQ) shall be TX_TOTAL_PAGE_NUMBER_8723A
  215. #define TEST_PAGE_NUM_PUBQ 0x7E
  216. // For Test Chip Setting
  217. #define WMM_TEST_TX_TOTAL_PAGE_NUMBER 0xF5
  218. #define WMM_TEST_TX_PAGE_BOUNDARY (WMM_TEST_TX_TOTAL_PAGE_NUMBER + 1) //F6
  219. #define WMM_TEST_PAGE_NUM_PUBQ 0xA3
  220. #define WMM_TEST_PAGE_NUM_HPQ 0x29
  221. #define WMM_TEST_PAGE_NUM_LPQ 0x29
  222. // Note: For Normal Chip Setting, modify later
  223. #define WMM_NORMAL_TX_TOTAL_PAGE_NUMBER 0xF5
  224. #define WMM_NORMAL_TX_PAGE_BOUNDARY (WMM_TEST_TX_TOTAL_PAGE_NUMBER + 1) //F6
  225. #define WMM_NORMAL_PAGE_NUM_PUBQ 0xB0
  226. #define WMM_NORMAL_PAGE_NUM_HPQ 0x29
  227. #define WMM_NORMAL_PAGE_NUM_LPQ 0x1C
  228. #define WMM_NORMAL_PAGE_NUM_NPQ 0x1C
  229. //-------------------------------------------------------------------------
  230. // Chip specific
  231. //-------------------------------------------------------------------------
  232. #define CHIP_BONDING_IDENTIFIER(_value) (((_value)>>22)&0x3)
  233. #define CHIP_BONDING_92C_1T2R 0x1
  234. #define CHIP_BONDING_88C_USB_MCARD 0x2
  235. #define CHIP_BONDING_88C_USB_HP 0x1
  236. //-------------------------------------------------------------------------
  237. // Channel Plan
  238. //-------------------------------------------------------------------------
  239. #define HAL_EFUSE_MEMORY
  240. #define EFUSE_REAL_CONTENT_LEN 512
  241. #define EFUSE_MAP_LEN 128
  242. #define EFUSE_MAX_SECTION 16
  243. #define EFUSE_IC_ID_OFFSET 506 //For some inferiority IC purpose. added by Roger, 2009.09.02.
  244. #define AVAILABLE_EFUSE_ADDR(addr) (addr < EFUSE_REAL_CONTENT_LEN)
  245. //
  246. // <Roger_Notes>
  247. // To prevent out of boundary programming case,
  248. // leave 1byte and program full section
  249. // 9bytes + 1byt + 5bytes and pre 1byte.
  250. // For worst case:
  251. // | 1byte|----8bytes----|1byte|--5bytes--|
  252. // | | Reserved(14bytes) |
  253. //
  254. // PG data exclude header, dummy 6 bytes frome CP test and reserved 1byte.
  255. #define EFUSE_OOB_PROTECT_BYTES 15
  256. #define EFUSE_REAL_CONTENT_LEN_8723A 512
  257. #define EFUSE_MAP_LEN_8723A 256
  258. #define EFUSE_MAX_SECTION_8723A 32
  259. //========================================================
  260. // EFUSE for BT definition
  261. //========================================================
  262. #define EFUSE_BT_REAL_BANK_CONTENT_LEN 512
  263. #define EFUSE_BT_REAL_CONTENT_LEN 1536 // 512*3
  264. #define EFUSE_BT_MAP_LEN 1024 // 1k bytes
  265. #define EFUSE_BT_MAX_SECTION 128 // 1024/8
  266. #define EFUSE_PROTECT_BYTES_BANK 16
  267. // Description: Determine the types of C2H events that are the same in driver and Fw.
  268. // Fisrt constructed by tynli. 2009.10.09.
  269. typedef enum _RTL8192C_C2H_EVT
  270. {
  271. C2H_DBG = 0,
  272. C2H_TSF = 1,
  273. C2H_AP_RPT_RSP = 2,
  274. C2H_CCX_TX_RPT = 3, // The FW notify the report of the specific tx packet.
  275. C2H_BT_RSSI = 4,
  276. C2H_BT_OP_MODE = 5,
  277. C2H_EXT_RA_RPT = 6,
  278. C2H_HW_INFO_EXCH = 10,
  279. C2H_C2H_H2C_TEST = 11,
  280. C2H_BT_INFO = 12,
  281. C2H_BT_MP_INFO = 15,
  282. MAX_C2HEVENT
  283. } RTL8192C_C2H_EVT;
  284. #define GET_RF_TYPE(priv) (GET_HAL_DATA(priv)->rf_type)
  285. #define INCLUDE_MULTI_FUNC_BT(_Adapter) (GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_BT)
  286. #define INCLUDE_MULTI_FUNC_GPS(_Adapter) (GET_HAL_DATA(_Adapter)->MultiFunc & RT_MULTI_FUNC_GPS)
  287. typedef struct rxreport_8723a
  288. {
  289. u32 pktlen:14;
  290. u32 crc32:1;
  291. u32 icverr:1;
  292. u32 drvinfosize:4;
  293. u32 security:3;
  294. u32 qos:1;
  295. u32 shift:2;
  296. u32 physt:1;
  297. u32 swdec:1;
  298. u32 ls:1;
  299. u32 fs:1;
  300. u32 eor:1;
  301. u32 own:1;
  302. u32 macid:5;
  303. u32 tid:4;
  304. u32 hwrsvd:4;
  305. u32 amsdu:1;
  306. u32 paggr:1;
  307. u32 faggr:1;
  308. u32 a1fit:4;
  309. u32 a2fit:4;
  310. u32 pam:1;
  311. u32 pwr:1;
  312. u32 md:1;
  313. u32 mf:1;
  314. u32 type:2;
  315. u32 mc:1;
  316. u32 bc:1;
  317. u32 seq:12;
  318. u32 frag:4;
  319. u32 nextpktlen:14;
  320. u32 nextind:1;
  321. u32 rsvd0831:1;
  322. u32 rxmcs:6;
  323. u32 rxht:1;
  324. u32 gf:1;
  325. u32 splcp:1;
  326. u32 bw:1;
  327. u32 htc:1;
  328. u32 eosp:1;
  329. u32 bssidfit:2;
  330. u32 rsvd1214:16;
  331. u32 unicastwake:1;
  332. u32 magicwake:1;
  333. u32 pattern0match:1;
  334. u32 pattern1match:1;
  335. u32 pattern2match:1;
  336. u32 pattern3match:1;
  337. u32 pattern4match:1;
  338. u32 pattern5match:1;
  339. u32 pattern6match:1;
  340. u32 pattern7match:1;
  341. u32 pattern8match:1;
  342. u32 pattern9match:1;
  343. u32 patternamatch:1;
  344. u32 patternbmatch:1;
  345. u32 patterncmatch:1;
  346. u32 rsvd1613:19;
  347. u32 tsfl;
  348. u32 bassn:12;
  349. u32 bavld:1;
  350. u32 rsvd2413:19;
  351. } RXREPORT, *PRXREPORT;
  352. typedef struct phystatus_8723a
  353. {
  354. u32 rxgain_a:7;
  355. u32 trsw_a:1;
  356. u32 rxgain_b:7;
  357. u32 trsw_b:1;
  358. u32 chcorr_l:16;
  359. u32 sigqualcck:8;
  360. u32 cfo_a:8;
  361. u32 cfo_b:8;
  362. u32 chcorr_h:8;
  363. u32 noisepwrdb_h:8;
  364. u32 cfo_tail_a:8;
  365. u32 cfo_tail_b:8;
  366. u32 rsvd0824:8;
  367. u32 rsvd1200:8;
  368. u32 rxevm_a:8;
  369. u32 rxevm_b:8;
  370. u32 rxsnr_a:8;
  371. u32 rxsnr_b:8;
  372. u32 noisepwrdb_l:8;
  373. u32 rsvd1616:8;
  374. u32 postsnr_a:8;
  375. u32 postsnr_b:8;
  376. u32 csi_a:8;
  377. u32 csi_b:8;
  378. u32 targetcsi_a:8;
  379. u32 targetcsi_b:8;
  380. u32 sigevm:8;
  381. u32 maxexpwr:8;
  382. u32 exintflag:1;
  383. u32 sgien:1;
  384. u32 rxsc:2;
  385. u32 idlelong:1;
  386. u32 anttrainen:1;
  387. u32 antselb:1;
  388. u32 antsel:1;
  389. } PHYSTATUS, *PPHYSTATUS;
  390. // rtl8723a_hal_init.c
  391. s32 rtl8723a_FirmwareDownload(PADAPTER padapter);
  392. void rtl8723a_FirmwareSelfReset(PADAPTER padapter);
  393. void rtl8723a_InitializeFirmwareVars(PADAPTER padapter);
  394. void rtl8723a_InitAntenna_Selection(PADAPTER padapter);
  395. void rtl8723a_DeinitAntenna_Selection(PADAPTER padapter);
  396. void rtl8723a_CheckAntenna_Selection(PADAPTER padapter);
  397. void rtl8723a_init_default_value(PADAPTER padapter);
  398. s32 InitLLTTable(PADAPTER padapter, u32 boundary);
  399. s32 CardDisableHWSM(PADAPTER padapter, u8 resetMCU);
  400. s32 CardDisableWithoutHWSM(PADAPTER padapter);
  401. // EFuse
  402. u8 GetEEPROMSize8723A(PADAPTER padapter);
  403. void Hal_InitPGData(PADAPTER padapter, u8 *PROMContent);
  404. void Hal_EfuseParseIDCode(PADAPTER padapter, u8 *hwinfo);
  405. void Hal_EfuseParseTxPowerInfo_8723A(PADAPTER padapter, u8 *PROMContent, BOOLEAN AutoLoadFail);
  406. void Hal_EfuseParseBTCoexistInfo_8723A(PADAPTER padapter, u8 *hwinfo, BOOLEAN AutoLoadFail);
  407. void Hal_EfuseParseEEPROMVer(PADAPTER padapter, u8 *hwinfo, BOOLEAN AutoLoadFail);
  408. void rtl8723a_EfuseParseChnlPlan(PADAPTER padapter, u8 *hwinfo, BOOLEAN AutoLoadFail);
  409. void Hal_EfuseParseCustomerID(PADAPTER padapter, u8 *hwinfo, BOOLEAN AutoLoadFail);
  410. void Hal_EfuseParseAntennaDiversity(PADAPTER padapter, u8 *hwinfo, BOOLEAN AutoLoadFail);
  411. void Hal_EfuseParseRateIndicationOption(PADAPTER padapter, u8 *hwinfo, BOOLEAN AutoLoadFail);
  412. void Hal_EfuseParseXtal_8723A(PADAPTER pAdapter, u8 *hwinfo, u8 AutoLoadFail);
  413. void Hal_EfuseParseThermalMeter_8723A(PADAPTER padapter, u8 *hwinfo, u8 AutoLoadFail);
  414. //RT_CHANNEL_DOMAIN rtl8723a_HalMapChannelPlan(PADAPTER padapter, u8 HalChannelPlan);
  415. //VERSION_8192C rtl8723a_ReadChipVersion(PADAPTER padapter);
  416. //void rtl8723a_ReadBluetoothCoexistInfo(PADAPTER padapter, u8 *PROMContent, BOOLEAN AutoloadFail);
  417. void Hal_InitChannelPlan(PADAPTER padapter);
  418. void rtl8723a_set_hal_ops(struct hal_ops *pHalFunc);
  419. void SetHwReg8723A(PADAPTER padapter, u8 variable, u8 *val);
  420. void GetHwReg8723A(PADAPTER padapter, u8 variable, u8 *val);
  421. #ifdef CONFIG_BT_COEXIST
  422. void rtl8723a_SingleDualAntennaDetection(PADAPTER padapter);
  423. #endif
  424. // register
  425. void SetBcnCtrlReg(PADAPTER padapter, u8 SetBits, u8 ClearBits);
  426. void rtl8723a_InitBeaconParameters(PADAPTER padapter);
  427. void rtl8723a_InitBeaconMaxError(PADAPTER padapter, u8 InfraMode);
  428. void rtl8723a_clone_haldata(_adapter *dst_adapter, _adapter *src_adapter);
  429. void rtl8723a_start_thread(_adapter *padapter);
  430. void rtl8723a_stop_thread(_adapter *padapter);
  431. s32 c2h_id_filter_ccx_8723a(u8 id);
  432. void _InitTransferPageSize(PADAPTER padapter);
  433. #endif// __RTL8723A_HAL_H__