nic.h 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. /*
  2. ** Id: //Department/DaVinci/BRANCHES/MT6620_WIFI_DRIVER_V2_3/include/nic/nic.h#1
  3. */
  4. /*! \file "nic.h"
  5. \brief The declaration of nic functions
  6. Detail description.
  7. */
  8. /*
  9. ** Log: nic.h
  10. **
  11. ** 03 11 2014 eason.tsai
  12. ** [ALPS01070904] [Need Patch] [Volunteer Patch][MT6630][Driver]MT6630 Wi-Fi Patch
  13. ** update rssi command
  14. **
  15. ** 08 13 2013 terry.wu
  16. ** [BORA00002207] [MT6630 Wi-Fi] TXM & MQM Implementation
  17. ** 1. Assign TXD.PID by wlan index
  18. ** 2. Some bug fix
  19. **
  20. ** 06 19 2013 cp.wu
  21. ** [BORA00002227] [MT6630 Wi-Fi][Driver] Update for Makefile and HIFSYS modifications
  22. ** update MAC address handling logic
  23. **
  24. ** 01 23 2013 cp.wu
  25. ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
  26. ** modify AIS behavior: stop join trial if failed
  27. **
  28. ** 01 22 2013 cp.wu
  29. ** [BORA00002253] [MT6630 Wi-Fi][Driver][Firmware] Add NLO and timeout mechanism to SCN module
  30. ** modification for ucBssIndex migration
  31. **
  32. ** 01 21 2013 terry.wu
  33. ** [BORA00002207] [MT6630 Wi-Fi] TXM & MQM Implementation
  34. ** Update TX path based on new ucBssIndex modifications.
  35. **
  36. ** 01 17 2013 cm.chang
  37. ** [BORA00002149] [MT6630 Wi-Fi] Initial software development
  38. ** Use ucBssIndex to replace eNetworkTypeIndex
  39. **
  40. ** 09 17 2012 cm.chang
  41. ** [BORA00002149] [MT6630 Wi-Fi] Initial software development
  42. ** Duplicate source from MT6620 v2.3 driver branch
  43. ** (Davinci label: MT6620_WIFI_Driver_V2_3_120913_1942_As_MT6630_Base)
  44. *
  45. * 11 01 2011 chinglan.wang
  46. * NULL
  47. * Modify the Wi-Fi method of the flush TX queue when disconnect the AP.
  48. * If disconnect the AP and flush all the data frame in the TX queue, WPS
  49. * cannot do the 4-way handshake to connect to the AP..
  50. *
  51. * 07 18 2011 chinghwa.yu
  52. * [WCXRP00000063] Update BCM CoEx design and settings[WCXRP00000612] [MT6620 Wi-Fi] [FW] CSD update SWRDD algorithm
  53. * Add CMD/Event for RDD and BWCS.
  54. *
  55. * 05 11 2011 cp.wu
  56. * [WCXRP00000718] [MT6620 Wi-Fi] modify the behavior of setting tx power
  57. * ACPI APIs migrate to wlan_lib.c for glue layer to invoke.
  58. *
  59. * 04 11 2011 yuche.tsai
  60. * [WCXRP00000627] [Volunteer Patch][MT6620][Driver] Pending MMPUD of P2P Network may crash system issue.
  61. * Fix kernel panic issue when MMPDU of P2P is pending in driver.
  62. *
  63. * 03 02 2011 cp.wu
  64. * [WCXRP00000503] [MT6620 Wi-Fi][Driver] Take RCPI brought by association response as initial RSSI right
  65. * after connection is built.
  66. * use RCPI brought by ASSOC-RESP after connection is built as initial RCPI to avoid using a uninitialized MAC-RX RCPI.
  67. *
  68. * 02 01 2011 cm.chang
  69. * [WCXRP00000415] [MT6620 Wi-Fi][Driver] Check if any memory leakage happens when uninitializing in DGB mode
  70. * .
  71. *
  72. * 01 27 2011 tsaiyuan.hsu
  73. * [WCXRP00000392] [MT6620 Wi-Fi][Driver] Add Roaming Support
  74. * add roaming fsm
  75. * 1. not support 11r, only use strength of signal to determine roaming.
  76. * 2. not enable CFG_SUPPORT_ROAMING until completion of full test.
  77. * 3. in 6620, adopt work-around to avoid sign extension problem of cck of hw
  78. * 4. assume that change of link quality in smooth way.
  79. *
  80. * 10 26 2010 cp.wu
  81. * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check[WCXRP00000137] [MT6620 Wi-Fi] [FW]
  82. * Support NIC capability query command
  83. * 1) update NVRAM content template to ver 1.02
  84. * 2) add compile option for querying NIC capability (default: off)
  85. * 3) modify AIS 5GHz support to run-time option, which could be turned on by registry or NVRAM setting
  86. * 4) correct auto-rate compiler error under linux (treat warning as error)
  87. * 5) simplify usage of NVRAM and REG_INFO_T
  88. * 6) add version checking between driver and firmware
  89. *
  90. * 10 26 2010 eddie.chen
  91. * [WCXRP00000134] [MT6620 Wi-Fi][Driver] Add a registry to enable auto rate for SQA test by using E1 EVB
  92. * Add auto rate parameter in registry.
  93. *
  94. * 10 12 2010 cp.wu
  95. * [WCXRP00000084] [MT6620 Wi-Fi][Driver][FW] Add fixed rate support for distance test
  96. * add HT (802.11n) fixed rate support.
  97. *
  98. * 10 08 2010 cp.wu
  99. * [WCXRP00000084] [MT6620 Wi-Fi][Driver][FW] Add fixed rate support for distance test
  100. * adding fixed rate support for distance test. (from registry setting)
  101. *
  102. * 10 05 2010 cp.wu
  103. * [WCXRP00000056] [MT6620 Wi-Fi][Driver] NVRAM implementation with Version Check
  104. * 1) add NVRAM access API
  105. * 2) fake scanning result when NVRAM doesn't exist and/or version mismatch. (off by compiler option)
  106. * 3) add OID implementation for NVRAM read/write service
  107. *
  108. * 10 04 2010 cp.wu
  109. * [WCXRP00000077] [MT6620 Wi-Fi][Driver][FW] Eliminate use of ENUM_NETWORK_TYPE_T and replaced
  110. * by ENUM_NETWORK_TYPE_INDEX_T only
  111. * remove ENUM_NETWORK_TYPE_T definitions
  112. *
  113. * 09 21 2010 cp.wu
  114. * [WCXRP00000053] [MT6620 Wi-Fi][Driver] Reset incomplete and might leads to BSOD when entering RF test
  115. * with AIS associated
  116. * Do a complete reset with STA-REC null checking for RF test re-entry
  117. *
  118. * 09 08 2010 cp.wu
  119. * NULL
  120. * use static memory pool for storing IEs of scanning result.
  121. *
  122. * 09 01 2010 cp.wu
  123. * NULL
  124. * HIFSYS Clock Source Workaround
  125. *
  126. * 08 25 2010 george.huang
  127. * NULL
  128. * update OID/ registry control path for PM related settings
  129. *
  130. * 08 12 2010 cp.wu
  131. * NULL
  132. * [AIS-FSM] honor registry setting for adhoc running mode. (A/B/G)
  133. *
  134. * 08 03 2010 cp.wu
  135. * NULL
  136. * Centralize mgmt/system service procedures into independent calls.
  137. *
  138. * 07 28 2010 cp.wu
  139. * NULL
  140. * 1) eliminate redundant variable eOPMode in prAdapter->rWlanInfo
  141. * 2) change nicMediaStateChange() API prototype
  142. *
  143. * 07 14 2010 yarco.yang
  144. *
  145. * 1. Remove CFG_MQM_MIGRATION
  146. * 2. Add CMD_UPDATE_WMM_PARMS command
  147. *
  148. * 07 08 2010 cp.wu
  149. *
  150. * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
  151. *
  152. * 07 06 2010 george.huang
  153. * [WPD00001556]Basic power managemenet function
  154. * Update arguments for nicUpdateBeaconIETemplate()
  155. *
  156. * 07 06 2010 cp.wu
  157. * [WPD00003833][MT6620 and MT5931] Driver migration
  158. * STA-REC is maintained by CNM only.
  159. *
  160. * 07 05 2010 cp.wu
  161. * [WPD00003833][MT6620 and MT5931] Driver migration
  162. * 1) ignore RSN checking when RSN is not turned on.
  163. * 2) set STA-REC deactivation callback as NULL
  164. * 3) add variable initialization API based on PHY configuration
  165. *
  166. * 06 30 2010 cp.wu
  167. * [WPD00003833][MT6620 and MT5931] Driver migration
  168. * sync. with CMD/EVENT document ver0.07.
  169. *
  170. * 06 29 2010 cp.wu
  171. * [WPD00003833][MT6620 and MT5931] Driver migration
  172. * 1) sync to. CMD/EVENT document v0.03
  173. * 2) simplify DTIM period parsing in scan.c only, bss.c no longer parses it again.
  174. * 3) send command packet to indicate FW-PM after
  175. * a) 1st beacon is received after AIS has connected to an AP
  176. * b) IBSS-ALONE has been created
  177. * c) IBSS-MERGE has occurred
  178. *
  179. * 06 25 2010 george.huang
  180. * [WPD00001556]Basic power managemenet function
  181. * Create beacon update path, with expose bssUpdateBeaconContent()
  182. *
  183. * 06 22 2010 cp.wu
  184. * [WPD00003833][MT6620 and MT5931] Driver migration
  185. * 1) add command warpper for STA-REC/BSS-INFO sync.
  186. * 2) enhance command packet sending procedure for non-oid part
  187. * 3) add command packet definitions for STA-REC/BSS-INFO sync.
  188. *
  189. * 06 21 2010 cp.wu
  190. * [WPD00003833][MT6620 and MT5931] Driver migration
  191. * implement TX_DONE callback path.
  192. *
  193. * 06 11 2010 cp.wu
  194. * [WPD00003833][MT6620 and MT5931] Driver migration
  195. * 1) migrate assoc.c.
  196. * 2) add ucTxSeqNum for tracking frames which needs TX-DONE awareness
  197. * 3) add configuration options for CNM_MEM and RSN modules
  198. * 4) add data path for management frames
  199. * 5) eliminate rPacketInfo of MSDU_INFO_T
  200. *
  201. * 06 10 2010 cp.wu
  202. * [WPD00003833][MT6620 and MT5931] Driver migration
  203. * 1) eliminate CFG_CMD_EVENT_VERSION_0_9
  204. * 2) when disconnected, indicate nic directly (no event is needed)
  205. *
  206. * 06 06 2010 kevin.huang
  207. * [WPD00003832][MT6620 5931] Create driver base
  208. * [MT6620 5931] Create driver base
  209. *
  210. * 04 26 2010 cp.wu
  211. * [WPD00001943]Create WiFi test driver framework on WinXP
  212. * 1) surpress compiler warning
  213. * 2) when acqruing LP-own, keep writing WHLPCR whenever OWN is not acquired yet
  214. *
  215. * 04 13 2010 cp.wu
  216. * [WPD00003823][MT6620 Wi-Fi] Add Bluetooth-over-Wi-Fi support
  217. * add framework for BT-over-Wi-Fi support.
  218. * * * * * * * * * 1) prPendingCmdInfo is replaced by queue for multiple handler capability
  219. * * * * * * * * * 2) command sequence number is now increased atomically
  220. * * * * * * * * * 3) private data could be hold and taken use for other purpose
  221. *
  222. * 04 12 2010 cp.wu
  223. * [WPD00001943]Create WiFi test driver framework on WinXP
  224. * add channel frequency <-> number conversion
  225. *
  226. * 03 19 2010 cp.wu
  227. * [WPD00001943]Create WiFi test driver framework on WinXP
  228. * 1) add ACPI D0/D3 state switching support
  229. * * * * * 2) use more formal way to handle interrupt when the status is retrieved from enhanced RX response
  230. *
  231. * 03 17 2010 cp.wu
  232. * [WPD00001943]Create WiFi test driver framework on WinXP
  233. * always process TX interrupt first then RX interrupt.
  234. *
  235. * 02 25 2010 cp.wu
  236. * [WPD00001943]Create WiFi test driver framework on WinXP
  237. * correct behavior to prevent duplicated RX handling for RX0_DONE and RX1_DONE
  238. *
  239. * 02 23 2010 cp.wu
  240. * [WPD00001943]Create WiFi test driver framework on WinXP
  241. * add checksum offloading support.
  242. ** \main\maintrunk.MT6620WiFiDriver_Prj\5 2009-10-13 21:58:58 GMT mtk01084
  243. ** update for new HW architecture design
  244. ** \main\maintrunk.MT6620WiFiDriver_Prj\4 2009-04-24 21:12:55 GMT mtk01104
  245. ** Add function prototype nicRestoreSpiDefMode()
  246. ** \main\maintrunk.MT6620WiFiDriver_Prj\3 2009-03-19 18:32:54 GMT mtk01084
  247. ** update for basic power management functions
  248. ** \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 20:16:32 GMT mtk01426
  249. ** Init for develop
  250. **
  251. */
  252. #ifndef _NIC_H
  253. #define _NIC_H
  254. /*******************************************************************************
  255. * C O M P I L E R F L A G S
  256. ********************************************************************************
  257. */
  258. /*******************************************************************************
  259. * C O N S T A N T S
  260. ********************************************************************************
  261. */
  262. /*******************************************************************************
  263. * D A T A T Y P E S
  264. ********************************************************************************
  265. */
  266. struct _REG_ENTRY_T {
  267. UINT_32 u4Offset;
  268. UINT_32 u4Value;
  269. };
  270. struct _TABLE_ENTRY_T {
  271. P_REG_ENTRY_T pu4TablePtr;
  272. UINT_16 u2Size;
  273. };
  274. /*! INT status to event map */
  275. typedef struct _INT_EVENT_MAP_T {
  276. UINT_32 u4Int;
  277. UINT_32 u4Event;
  278. } INT_EVENT_MAP_T, *P_INT_EVENT_MAP_T;
  279. typedef struct _ECO_INFO_T {
  280. UINT_8 ucHwVer;
  281. UINT_8 ucRomVer;
  282. UINT_8 ucFactoryVer;
  283. } ECO_INFO_T, *P_ECO_INFO_T;
  284. enum ENUM_INT_EVENT_T {
  285. INT_EVENT_ABNORMAL,
  286. INT_EVENT_SW_INT,
  287. INT_EVENT_TX,
  288. INT_EVENT_RX,
  289. INT_EVENT_NUM
  290. };
  291. typedef enum _ENUM_IE_UPD_METHOD_T {
  292. IE_UPD_METHOD_UPDATE_RANDOM,
  293. IE_UPD_METHOD_UPDATE_ALL,
  294. IE_UPD_METHOD_DELETE_ALL,
  295. } ENUM_IE_UPD_METHOD_T, *P_ENUM_IE_UPD_METHOD_T;
  296. /*******************************************************************************
  297. * E X T E R N A L R E F E R E N C E S
  298. ********************************************************************************
  299. */
  300. /*******************************************************************************
  301. * P U B L I C D A T A
  302. ********************************************************************************
  303. */
  304. /*******************************************************************************
  305. * P R I V A T E D A T A
  306. ********************************************************************************
  307. */
  308. /*******************************************************************************
  309. * M A C R O S
  310. ********************************************************************************
  311. */
  312. /*******************************************************************************
  313. * F U N C T I O N D E C L A R A T I O N S
  314. ********************************************************************************
  315. */
  316. /*----------------------------------------------------------------------------*/
  317. /* Routines in nic.c */
  318. /*----------------------------------------------------------------------------*/
  319. WLAN_STATUS nicAllocateAdapterMemory(IN P_ADAPTER_T prAdapter);
  320. VOID nicReleaseAdapterMemory(IN P_ADAPTER_T prAdapter);
  321. VOID nicDisableInterrupt(IN P_ADAPTER_T prAdapter);
  322. VOID nicEnableInterrupt(IN P_ADAPTER_T prAdapter);
  323. WLAN_STATUS nicProcessIST(IN P_ADAPTER_T prAdapter);
  324. WLAN_STATUS nicProcessIST_impl(IN P_ADAPTER_T prAdapter, IN UINT_32 u4IntStatus);
  325. WLAN_STATUS nicInitializeAdapter(IN P_ADAPTER_T prAdapter);
  326. VOID nicMCRInit(IN P_ADAPTER_T prAdapter);
  327. BOOL nicVerifyChipID(IN P_ADAPTER_T prAdapter);
  328. #if CFG_SDIO_INTR_ENHANCE
  329. VOID nicSDIOInit(IN P_ADAPTER_T prAdapter);
  330. VOID nicSDIOReadIntStatus(IN P_ADAPTER_T prAdapter, OUT PUINT_32 pu4IntStatus);
  331. #endif
  332. VOID nicPmTriggerDriverOwn(IN P_ADAPTER_T prAdapter);
  333. BOOLEAN nicpmSetDriverOwn(IN P_ADAPTER_T prAdapter);
  334. VOID nicpmSetFWOwn(IN P_ADAPTER_T prAdapter, IN BOOLEAN fgEnableGlobalInt);
  335. BOOLEAN nicpmSetAcpiPowerD0(IN P_ADAPTER_T prAdapter);
  336. BOOLEAN nicpmSetAcpiPowerD3(IN P_ADAPTER_T prAdapter);
  337. #if defined(_HIF_SPI)
  338. void nicRestoreSpiDefMode(IN P_ADAPTER_T prAdapter);
  339. #endif
  340. VOID nicProcessSoftwareInterrupt(IN P_ADAPTER_T prAdapter);
  341. VOID nicProcessAbnormalInterrupt(IN P_ADAPTER_T prAdapter);
  342. VOID nicPutMailbox(IN P_ADAPTER_T prAdapter, IN UINT_32 u4MailboxNum, IN UINT_32 u4Data);
  343. VOID nicGetMailbox(IN P_ADAPTER_T prAdapter, IN UINT_32 u4MailboxNum, OUT PUINT_32 pu4Data);
  344. VOID nicSetSwIntr(IN P_ADAPTER_T prAdapter, IN UINT_32 u4SwIntrBitmap);
  345. P_CMD_INFO_T nicGetPendingCmdInfo(IN P_ADAPTER_T prAdapter, IN UINT_8 ucSeqNum);
  346. P_MSDU_INFO_T nicGetPendingTxMsduInfo(IN P_ADAPTER_T prAdapter, IN UINT_8 ucWlanIndex, IN UINT_8 ucSeqNum);
  347. P_MSDU_INFO_T nicGetPendingStaMMPDU(IN P_ADAPTER_T prAdapter, IN UINT_8 ucStaRecIdx);
  348. VOID nicFreePendingTxMsduInfoByBssIdx(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex);
  349. UINT_8 nicIncreaseCmdSeqNum(IN P_ADAPTER_T prAdapter);
  350. UINT_8 nicIncreaseTxSeqNum(IN P_ADAPTER_T prAdapter);
  351. /* Media State Change */
  352. WLAN_STATUS
  353. nicMediaStateChange(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex, IN P_EVENT_CONNECTION_STATUS prConnectionStatus);
  354. WLAN_STATUS nicMediaJoinFailure(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex, IN WLAN_STATUS rStatus);
  355. /* Utility function for channel number conversion */
  356. UINT_32 nicChannelNum2Freq(IN UINT_32 u4ChannelNum);
  357. UINT_32 nicFreq2ChannelNum(IN UINT_32 u4FreqInKHz);
  358. UINT_8 nicGetVhtS1(IN UINT_8 ucPrimaryChannel);
  359. /* firmware command wrapper */
  360. /* NETWORK (WIFISYS) */
  361. WLAN_STATUS nicActivateNetwork(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex);
  362. WLAN_STATUS nicDeactivateNetwork(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex);
  363. /* BSS-INFO */
  364. WLAN_STATUS nicUpdateBss(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex);
  365. /* BSS-INFO Indication (PM) */
  366. WLAN_STATUS nicPmIndicateBssCreated(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex);
  367. WLAN_STATUS nicPmIndicateBssConnected(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex);
  368. WLAN_STATUS nicPmIndicateBssAbort(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex);
  369. /* Beacon Template Update */
  370. WLAN_STATUS
  371. nicUpdateBeaconIETemplate(IN P_ADAPTER_T prAdapter,
  372. IN ENUM_IE_UPD_METHOD_T eIeUpdMethod,
  373. IN UINT_8 ucBssIndex, IN UINT_16 u2Capability, IN PUINT_8 aucIe, IN UINT_16 u2IELen);
  374. WLAN_STATUS nicQmUpdateWmmParms(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex);
  375. WLAN_STATUS nicSetAutoTxPower(IN P_ADAPTER_T prAdapter, IN P_CMD_AUTO_POWER_PARAM_T prAutoPwrParam);
  376. /*----------------------------------------------------------------------------*/
  377. /* Calibration Control */
  378. /*----------------------------------------------------------------------------*/
  379. WLAN_STATUS nicUpdateTxPower(IN P_ADAPTER_T prAdapter, IN P_CMD_TX_PWR_T prTxPwrParam);
  380. WLAN_STATUS nicUpdate5GOffset(IN P_ADAPTER_T prAdapter, IN P_CMD_5G_PWR_OFFSET_T pr5GPwrOffset);
  381. WLAN_STATUS nicUpdateDPD(IN P_ADAPTER_T prAdapter, IN P_CMD_PWR_PARAM_T prDpdCalResult);
  382. /*----------------------------------------------------------------------------*/
  383. /* PHY configuration */
  384. /*----------------------------------------------------------------------------*/
  385. VOID nicSetAvailablePhyTypeSet(IN P_ADAPTER_T prAdapter);
  386. /*----------------------------------------------------------------------------*/
  387. /* MGMT and System Service Control */
  388. /*----------------------------------------------------------------------------*/
  389. VOID nicInitSystemService(IN P_ADAPTER_T prAdapter);
  390. VOID nicResetSystemService(IN P_ADAPTER_T prAdapter);
  391. VOID nicUninitSystemService(IN P_ADAPTER_T prAdapter);
  392. VOID nicInitMGMT(IN P_ADAPTER_T prAdapter, IN P_REG_INFO_T prRegInfo);
  393. VOID nicUninitMGMT(IN P_ADAPTER_T prAdapter);
  394. WLAN_STATUS
  395. nicConfigPowerSaveProfile(IN P_ADAPTER_T prAdapter, UINT_8 ucBssIndex, PARAM_POWER_MODE ePwrMode, BOOLEAN fgEnCmdEvent);
  396. WLAN_STATUS nicEnterCtiaMode(IN P_ADAPTER_T prAdapter, BOOLEAN fgEnterCtia, BOOLEAN fgEnCmdEvent);
  397. /*----------------------------------------------------------------------------*/
  398. /* Scan Result Processing */
  399. /*----------------------------------------------------------------------------*/
  400. VOID
  401. nicAddScanResult(IN P_ADAPTER_T prAdapter,
  402. IN PARAM_MAC_ADDRESS rMacAddr,
  403. IN P_PARAM_SSID_T prSsid,
  404. IN UINT_32 u4Privacy,
  405. IN PARAM_RSSI rRssi,
  406. IN ENUM_PARAM_NETWORK_TYPE_T eNetworkType,
  407. IN P_PARAM_802_11_CONFIG_T prConfiguration,
  408. IN ENUM_PARAM_OP_MODE_T eOpMode,
  409. IN PARAM_RATES_EX rSupportedRates, IN UINT_16 u2IELength, IN PUINT_8 pucIEBuf);
  410. VOID nicFreeScanResultIE(IN P_ADAPTER_T prAdapter, IN UINT_32 u4Idx);
  411. /*----------------------------------------------------------------------------*/
  412. /* Fixed Rate Hacking */
  413. /*----------------------------------------------------------------------------*/
  414. WLAN_STATUS
  415. nicUpdateRateParams(IN P_ADAPTER_T prAdapter,
  416. IN ENUM_REGISTRY_FIXED_RATE_T eRateSetting,
  417. IN PUINT_8 pucDesiredPhyTypeSet,
  418. IN PUINT_16 pu2DesiredNonHTRateSet,
  419. IN PUINT_16 pu2BSSBasicRateSet,
  420. IN PUINT_8 pucMcsSet, IN PUINT_8 pucSupMcs32, IN PUINT_16 u2HtCapInfo);
  421. /*----------------------------------------------------------------------------*/
  422. /* Write registers */
  423. /*----------------------------------------------------------------------------*/
  424. WLAN_STATUS nicWriteMcr(IN P_ADAPTER_T prAdapter, IN UINT_32 u4Address, IN UINT_32 u4Value);
  425. /*----------------------------------------------------------------------------*/
  426. /* Update auto rate */
  427. /*----------------------------------------------------------------------------*/
  428. WLAN_STATUS
  429. nicRlmArUpdateParms(IN P_ADAPTER_T prAdapter,
  430. IN UINT_32 u4ArSysParam0,
  431. IN UINT_32 u4ArSysParam1, IN UINT_32 u4ArSysParam2, IN UINT_32 u4ArSysParam3);
  432. /*----------------------------------------------------------------------------*/
  433. /* Enable/Disable Roaming */
  434. /*----------------------------------------------------------------------------*/
  435. WLAN_STATUS nicRoamingUpdateParams(IN P_ADAPTER_T prAdapter, IN UINT_32 u4EnableRoaming);
  436. VOID nicPrintFirmwareAssertInfo(IN P_ADAPTER_T prAdapter);
  437. /*----------------------------------------------------------------------------*/
  438. /* Link Quality Updating */
  439. /*----------------------------------------------------------------------------*/
  440. VOID
  441. nicUpdateLinkQuality(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex, IN P_EVENT_LINK_QUALITY_V2 prEventLinkQuality);
  442. VOID nicUpdateRSSI(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex, IN INT_8 cRssi, IN INT_8 cLinkQuality);
  443. VOID nicUpdateLinkSpeed(IN P_ADAPTER_T prAdapter, IN UINT_8 ucBssIndex, IN UINT_16 u2LinkSpeed);
  444. #if CFG_SUPPORT_RDD_TEST_MODE
  445. WLAN_STATUS nicUpdateRddTestMode(IN P_ADAPTER_T prAdapter, IN P_CMD_RDD_CH_T prRddChParam);
  446. #endif
  447. /*----------------------------------------------------------------------------*/
  448. /* Address Setting Apply */
  449. /*----------------------------------------------------------------------------*/
  450. WLAN_STATUS nicApplyNetworkAddress(IN P_ADAPTER_T prAdapter);
  451. /*----------------------------------------------------------------------------*/
  452. /* ECO Version */
  453. /*----------------------------------------------------------------------------*/
  454. UINT_8 nicGetChipEcoVer(VOID);
  455. BOOLEAN nicIsEcoVerEqualTo(UINT_8 ucEcoVer);
  456. BOOLEAN nicIsEcoVerEqualOrLaterTo(UINT_8 ucEcoVer);
  457. #endif /* _NIC_H */