PageRenderTime 55ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/drivers/net/wireless/tiwlan1251/common/src/hal/hl_ctrl/whalRecovery.c

http://github.com/CyanogenMod/cm-kernel
C | 552 lines | 207 code | 80 blank | 265 comment | 16 complexity | e2d4803574b235f9fd476f9b9d4326e1 MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.0
  1. /****************************************************************************
  2. **+-----------------------------------------------------------------------+**
  3. **| |**
  4. **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved. |**
  5. **| All rights reserved. |**
  6. **| |**
  7. **| Redistribution and use in source and binary forms, with or without |**
  8. **| modification, are permitted provided that the following conditions |**
  9. **| are met: |**
  10. **| |**
  11. **| * Redistributions of source code must retain the above copyright |**
  12. **| notice, this list of conditions and the following disclaimer. |**
  13. **| * Redistributions in binary form must reproduce the above copyright |**
  14. **| notice, this list of conditions and the following disclaimer in |**
  15. **| the documentation and/or other materials provided with the |**
  16. **| distribution. |**
  17. **| * Neither the name Texas Instruments nor the names of its |**
  18. **| contributors may be used to endorse or promote products derived |**
  19. **| from this software without specific prior written permission. |**
  20. **| |**
  21. **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |**
  22. **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |**
  23. **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
  24. **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |**
  25. **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
  26. **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |**
  27. **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
  28. **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
  29. **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |**
  30. **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
  31. **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |**
  32. **| |**
  33. **+-----------------------------------------------------------------------+**
  34. ****************************************************************************/
  35. /****************************************************************************
  36. *
  37. * MODULE: whalRecovery.c
  38. * PURPOSE: Handle Recovery and ACI in the Hal
  39. *
  40. * Recovery
  41. * CheckHwStatus - called periodically from the CORE to check the following triggers:
  42. * Consecutive fcs error
  43. * CheckMailbox - call interrogate with callback (only print)
  44. * RxFreeMem register image
  45. * TxQueue
  46. * TxQueue
  47. * Mailbox error - call the CORE failure event MBOX_FAILURE
  48. * Event mailbox
  49. * MacStatus event - receive the register value for CONS_FCS_ERR and Rx_FREE_MEM triggers
  50. * Health event - device error callback to CORE
  51. * PowerCtrl timeout fail - call the CORE failure event HW_AWAKE_FAILURE
  52. * StopHal - called from the CORE as first step in the recovery process
  53. * Reconfig - called from the CORE as second step in the recovery process
  54. * LNA/ACI
  55. * ACI event - get SCR_PAD8 value, accumulate it locally for later read/write by the CORE
  56. * Rx reset
  57. * API to access the RX_RESET register
  58. *
  59. * Issues
  60. * Add API to
  61. * Move the whalCtrl_hwStatus_t from HwCtrl into Recovery object
  62. * Remove CheckMailbox in CheckHwStatus
  63. * Device error is not enabled
  64. *
  65. ****************************************************************************/
  66. #include "whalCommon.h"
  67. #include "whalCtrl_api.h"
  68. #include "whalCtrl.h"
  69. #include "whalSecurity.h"
  70. #include "eventMbox_api.h"
  71. #include "CmdQueue_api.h"
  72. #include "whalBus_Api.h"
  73. #include "shmBus.h"
  74. #include "whalHwAccess.h"
  75. #include "TNETW_Driver.h"
  76. #include "FwEvent_api.h"
  77. #ifdef USE_RECOVERY
  78. /* Aci Indication Callback */
  79. /* typedef void (*AciIndicationCB_t)(TI_HANDLE handle, char* str , UINT32 strLen);*/
  80. void whalCtrl_HealthReoprt_CB(TI_HANDLE hWhalCtrl, char* Report , UINT32 strLen);
  81. void whalCtrl_MacStatus_CB(TI_HANDLE hWhalCtrl, char* Status , UINT32 strLen);
  82. int whalCtrl_PeriodicCheckMailboxCb(TI_HANDLE hWhalCtrl, UINT16 MboxStatus,char *InterrogateParamsBuf);
  83. /*
  84. * ----------------------------------------------------------------------------
  85. * Function : whalCtrl_RegisterCallbacks
  86. *
  87. * Input :
  88. * Output :
  89. * Process :
  90. * Register all health/sanityCheck/Recovery callbacks
  91. * --------------------------------------------------
  92. * DeviceError - CORE callback for full recovery
  93. * HealthReport - Event Mbox callback for extracting device error
  94. * MacStatus - Event Mbox callback for checkHwStatus FCS_ERR, RX_FREE_MEM regs
  95. * AciIndication - Event Mbox callback for accumulate SCR_PAD8 image
  96. * Mailbox error - Mailbox queue callback for case of timeout/error
  97. * Power control error - PowerMngr callback in case of power ctrl timeout
  98. * Failure event - CORE Callback in case of MailboxError or PowerCtrl error
  99. *
  100. * Note(s) : Done
  101. * -----------------------------------------------------------------------------
  102. */
  103. int whalCtrl_RegisterErrorsCallbacks(TI_HANDLE hWhalCtrl)
  104. {
  105. WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
  106. /*FW events : BUS_ERROR and DEVICE_ERROR*/
  107. pWhalCtrl->HealthReportCB_CB = whalCtrl_HealthReoprt_CB;
  108. pWhalCtrl->HealthReportCB_handle = pWhalCtrl;
  109. eventMbox_RegisterEventCB (pWhalCtrl->hEventMbox, HAL_EVENT_HEALTH_REPORT,(void*)pWhalCtrl->HealthReportCB_CB, pWhalCtrl);
  110. /* The health report event will be enabled in the ConfigHw stage */
  111. /*FW events : FCS_ERROR and HEALTH_TEST_OK*/
  112. pWhalCtrl->MacStatusCB_CB = whalCtrl_MacStatus_CB;
  113. pWhalCtrl->MacStatusCB_CB_handle = pWhalCtrl;
  114. eventMbox_RegisterEventCB(pWhalCtrl->hEventMbox, HAL_EVENT_MAC_STATUS, (void*)pWhalCtrl->MacStatusCB_CB, pWhalCtrl);
  115. eventMbox_EvUnMask(pWhalCtrl->hEventMbox, HAL_EVENT_MAC_STATUS);
  116. /* Register For Error Of Mailbox in case of timeout */
  117. CmdQueue_RegisterForErrorCB(((TnetwDrv_t*)pWhalCtrl->hTNETW_Driver)->hCmdQueue, (void *)whalCtrl_CheckMailboxCb, hWhalCtrl);
  118. #ifdef HW_ACCESS_SDIO
  119. TNETWIF_RegisterBusFailureEventCB(((whalBus_T *)(pWhalCtrl->pHwCtrl->hWhalBus))->hTNETWIF,
  120. (void *)whalCtrl_HealthReoprt_CB,pWhalCtrl);
  121. #endif
  122. return OK;
  123. }
  124. /*
  125. * ----------------------------------------------------------------------------
  126. * Function : whalCtrl_CheckHwStatus
  127. *
  128. * Input :
  129. * Output :
  130. * Process :
  131. * CheckFcsError
  132. * Test the register CONS_FCR_ERR value that came periodically in event
  133. * Try to recover by setting RX_RESET
  134. * Disable full recovery by StaDk_4.1 team !!!!!!!!!!!
  135. * CheckMailbox
  136. * Call interrogate (with callback) to StationId IE
  137. * The callback is just for print
  138. * There is no need for this trigger because of the event mechanizm
  139. * CheckRxFreeMem
  140. * Test the register RX_FREE_MEM value that came periodically in event
  141. * CheckTxQueue
  142. * Check the queue is not empty and no tx complete
  143. * CheckRxQueue
  144. * Disabled
  145. *
  146. * Note(s) : Done
  147. * -----------------------------------------------------------------------------
  148. */
  149. int whalCtrl_CheckHwStatus(TI_HANDLE hWhalCtrl)
  150. {
  151. WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
  152. #if 0
  153. WLAN_REPORT_FATAL_ERROR(pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  154. ("whalCtrl_CheckHwStatus: Start test\n"));
  155. #endif
  156. /*
  157. * Trigger the FW health test command and wait for results.
  158. * -------------------------------------------------------
  159. */
  160. whal_hwCtrl_healthCheck(pWhalCtrl->pHwCtrl);
  161. return OK;
  162. }
  163. /*
  164. * ----------------------------------------------------------------------------
  165. * Function : whalCtrl_RecoveryEnded
  166. *
  167. * Input :
  168. * Output :
  169. * Process :
  170. * aanouce all the modules about the end of the recovery proccess.
  171. * Note(s) : Done
  172. * -----------------------------------------------------------------------------
  173. */
  174. void whalCtrl_RecoveryEnded(TI_HANDLE hWhalCtrl)
  175. {
  176. WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
  177. /*Change the State of the mboxQueue and the interrupt Module and
  178. After recovery we should enable back all interrupts according to the last interrupt shadow mask*/
  179. whalCtrl_exitFromInitMode(hWhalCtrl);
  180. /*
  181. Indicates the MboxQueue that Reconfig Ended in Order To Call the CallBacks
  182. That Was saved before the recovery process started
  183. */
  184. CmdQueue_EndReconfig(((TnetwDrv_t*)pWhalCtrl->hTNETW_Driver)->hCmdQueue);
  185. WLAN_REPORT_INFORMATION(pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  186. ("whalCtrl_ReConfig: End (%d)\n", os_timeStampMs(pWhalCtrl->hOs)));
  187. }
  188. /*
  189. * ----------------------------------------------------------------------------
  190. * Function : whalCtrl_ReConfigCb
  191. *
  192. * Input :
  193. * Output :
  194. * Process :
  195. * Do firmware download
  196. * Run the firmware
  197. * Configure stage (ConfigHw)
  198. * Re-Join if needed
  199. * Note(s) : Done
  200. * -----------------------------------------------------------------------------
  201. */
  202. static int whalCtrl_ReConfigCb (TI_HANDLE hWhalCtrl, TI_STATUS status)
  203. {
  204. WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
  205. WlanParams_T *pWlanParams = whal_ParamsGetWlanParams (pWhalCtrl->pWhalParams);
  206. whalParamInfo_t param;
  207. if (status != OK)
  208. {
  209. WLAN_REPORT_INFORMATION (pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  210. ("whalCtrl_ReConfig: whal_hwCtrl_ConfigHw failed\n"));
  211. return NOK;
  212. }
  213. whalSecur_HwEncDecrEnable (pWhalCtrl->pWhalSecurity, 1);
  214. /* Re-config roaming thresholds */
  215. /* SNR */
  216. whal_hwCtrl_SetSNRParams(pWhalCtrl->pHwCtrl, &pWhalCtrl->pWhalParams->WlanParams.roamTriggers);
  217. /* RSSI */
  218. whalCtrl_SetRSSIParamsCmd (pWhalCtrl, &pWhalCtrl->pWhalParams->WlanParams.roamTriggers);
  219. /* Max consecutive NACK */
  220. whalCtrl_SetMaxTxRetryParamsCmd (pWhalCtrl, &pWhalCtrl->pWhalParams->WlanParams.roamTriggers);
  221. /* Out of sync */
  222. whalCtrl_SetBssLossTsfThresholdParamsCmd (pWhalCtrl, &pWhalCtrl->pWhalParams->WlanParams.roamTriggers);
  223. #ifdef DO_CALIBRATION_IN_DRIVER
  224. /* Perform single calibration for APP scan usage. */
  225. whalCtrl_sendRadioAction (pWhalCtrl, MANUAL_CALIB);
  226. #endif /* DO_CALIBRATION_IN_DRIVER */
  227. /* Join (use the local parameters), otherwise the core will reconnect */
  228. if (pWlanParams->bJoin)
  229. {
  230. /* Set TxRatePolicy */
  231. param.paramType = HAL_CTRL_TX_RATE_CLASS_PARAMS;
  232. param.content.pTxRatePlicy = &pWhalCtrl->pWhalParams->BssInfoParams.TxRateClassParams;
  233. whalCtrl_SetParam (pWhalCtrl->pHwCtrl, &param);
  234. status = (TI_STATUS)whalCtrl_ReJoinBss (hWhalCtrl);
  235. if (status != OK)
  236. {
  237. WLAN_REPORT_INFORMATION (pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  238. ("whalCtrl_ReConfig: whalCtrl_ReJoinBss failed\n"));
  239. return NOK;
  240. }
  241. whal_hwCtrl_AidSet (pWhalCtrl->pHwCtrl, pWhalCtrl->pWhalParams->WlanParams.Aid);
  242. /* Slot time must be setting after doing join */
  243. whal_hwCtrl_SetSlotTime (pWhalCtrl->pHwCtrl, (slotTime_e)pWhalCtrl->pWhalParams->WlanParams.SlotTime);
  244. /* Re-config security keys, default key Id and encryption/decryption control to the FW */
  245. if (whalSecur_KeysReconfig (pWhalCtrl->pWhalSecurity) != OK)
  246. {
  247. WLAN_REPORT_INFORMATION (pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  248. ("whalCtrl_ReConfig: ## whalSecur_KeysReconfig failed\n"));
  249. return NOK;
  250. }
  251. }
  252. return OK;
  253. }
  254. /*
  255. * ----------------------------------------------------------------------------
  256. * Function : whalCtrl_ReConfig
  257. *
  258. * Input :
  259. * Output :
  260. * Process :
  261. * Do firmware download
  262. * Run the firmware
  263. * Configure stage (ConfigHw)
  264. * Re-Join if needed
  265. * Note(s) : Done
  266. * -----------------------------------------------------------------------------
  267. */
  268. int whalCtrl_ReConfig (TI_HANDLE hWhalCtrl, int DoReJoin)
  269. {
  270. WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
  271. WlanParams_T *pWlanParams = whal_ParamsGetWlanParams (pWhalCtrl->pWhalParams);
  272. int Stt;
  273. if (!pWlanParams->RecoveryEnable)
  274. {
  275. WLAN_OS_REPORT(("Recovery is disabled in registry, abort recovery process\n"));
  276. return OK;
  277. }
  278. #if 0
  279. /* L.M. PATCH for card eject */
  280. if (!whalBus_FwCtrl_isCardIn (pWhalCtrl->pHwCtrl->hWhalBus))
  281. {
  282. WLAN_REPORT_REPLY (pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  283. ("whalCtrl_ReConfig: card was removed => not proceeding\n"));
  284. return OK;
  285. }
  286. #endif/*_WINDOWS*/
  287. /*
  288. * Initiate the wlan hardware (FW download).
  289. * -----------------------------------------
  290. */
  291. WLAN_REPORT_INFORMATION (pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  292. ("whalCtrl_ReConfig: Start(%d)\n", os_timeStampMs (pWhalCtrl->hOs)));
  293. Stt = whal_hwCtrl_Initiate (pWhalCtrl->pHwCtrl);
  294. if (Stt != OK)
  295. {
  296. WLAN_REPORT_ERROR (pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  297. ("whalCtrl_ReConfig: whal_hwCtrl_Initiate failed\n"));
  298. return NOK;
  299. }
  300. /* Configure the WLAN hardware */
  301. Stt = whal_hwCtrl_ConfigHw (pWhalCtrl->pHwCtrl, (void *)whalCtrl_ReConfigCb, hWhalCtrl, TRUE);
  302. return OK;
  303. }
  304. /*
  305. * ----------------------------------------------------------------------------
  306. * Function : whalCtrl_CheckMailboxCb
  307. *
  308. * Input :
  309. * Output :
  310. * Process :
  311. * When the command mailbox queue identify mailbox error or timeout, it will call
  312. * to this function to handle the error.
  313. * Call the CORE callback with MBOX_FAILURE type to do the recovery
  314. *
  315. * Note(s) : Done
  316. * -----------------------------------------------------------------------------
  317. */
  318. int whalCtrl_CheckMailboxCb(TI_HANDLE hWhalCtrl,UINT16 MboxStatus, char *InterrogateParamsBuf)
  319. {
  320. WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
  321. whalCtrl_hwStatus_t *pHwStatus = &pWhalCtrl->pHwCtrl->HwStatus;
  322. if(MboxStatus != OK)
  323. {
  324. ++pHwStatus->NumMboxFailures;
  325. WLAN_REPORT_WARNING(pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  326. ("whalCtrl_PeriodicCheckMailboxCb: Periodic intorregate check - Command mailbox failure was occur \n errors failure # %d "
  327. ,pHwStatus->NumMboxFailures));
  328. /* Indicating Upper Layer about Mbox Error */
  329. pWhalCtrl->FailureEvent_CB(pWhalCtrl->FailureEvent_CB_handle,MBOX_FAILURE);
  330. }
  331. return OK;
  332. }
  333. /*
  334. * ----------------------------------------------------------------------------
  335. * Function : whalCtrl_MacStatus_CB
  336. * : Callback from the EventMbox in case Mac status Event Occur
  337. * Input :
  338. * Output :
  339. * Process :
  340. * Note(s) : Done
  341. * -----------------------------------------------------------------------------
  342. */
  343. void whalCtrl_MacStatus_CB(TI_HANDLE hWhalCtrl, char* Status , UINT32 strLen)
  344. {
  345. WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
  346. UINT32 currFcsCounter;
  347. /* The FCS error is updated by the MacStatus event from the firmware */
  348. currFcsCounter = (*(UINT32*)Status);
  349. WLAN_REPORT_INFORMATION(pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  350. ("whalCtrl_MacStatus_CB: Mac Status report currFcsCounter=%d LastConsFcsCounter=%d\n",
  351. currFcsCounter));
  352. /* This event shouldn't be received, so it is not passed on to anybody */
  353. }
  354. #define HEALTH_REPORT_DEVICE_ERROR_BIT BIT_0
  355. #define HEALTH_REPORT_HOST2FW_SEQ_ERROR BIT_1
  356. /*
  357. * ----------------------------------------------------------------------------
  358. * Function : whalCtrl_HealthReoprt_CB
  359. * : Callback from the EventMbox in case HealthReport Event Occur
  360. * Input :
  361. * Output :
  362. * Process :
  363. * Note(s) : Done
  364. * -----------------------------------------------------------------------------
  365. */
  366. void whalCtrl_HealthReoprt_CB(TI_HANDLE hWhalCtrl, char* Report , UINT32 strLen)
  367. {
  368. WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
  369. UINT16 HealthReport = *((UINT16*)Report);
  370. if(HealthReport & HEALTH_REPORT_DEVICE_ERROR_BIT)
  371. {
  372. WLAN_REPORT_ERROR(pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  373. ("whalCtrl_HealthReoprt_CB: Firmware reports about DEVICE_ERROR, handle by callback"));
  374. /* Indicating Upper Layer about Device Error */
  375. pWhalCtrl->FailureEvent_CB(pWhalCtrl->FailureEvent_CB_handle, DEVICE_ERROR);
  376. }
  377. else
  378. if(HealthReport & HEALTH_REPORT_HOST2FW_SEQ_ERROR)
  379. /* For USB Health Check */
  380. {
  381. WLAN_REPORT_ERROR(pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  382. ("whalCtrl_HealthReoprt_CB: Firmware reports about HOST2FW_SEQ_ERROR"));
  383. /* This shall invoke softice, if occure we will handle this case locally*/
  384. /* ASSERT(0);*/
  385. }
  386. else
  387. if (HealthReport & HEALTH_REPORT_BUS_ERROR)
  388. {
  389. WLAN_REPORT_ERROR(pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  390. ("whalCtrl_HealthReoprt_CB: Low level bus driver reported bus error. Performing hardware reset of the bus\n"));
  391. pWhalCtrl->FailureEvent_CB(pWhalCtrl->FailureEvent_CB_handle, BUS_ERROR);
  392. }
  393. else
  394. {
  395. WLAN_REPORT_ERROR(pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,
  396. ("whalCtrl_HealthReoprt_CB: UnKnown Health report ID 0x%x ", (int)HealthReport));
  397. }
  398. }
  399. /*
  400. * ----------------------------------------------------------------------------
  401. * Function : whalCtrl_resetMacRx
  402. *
  403. * Input :
  404. * Output :
  405. * Process : Reset the Rx.
  406. * Note(s) : Done
  407. * -----------------------------------------------------------------------------
  408. */
  409. int whalCtrl_resetMacRx (TI_HANDLE hWhalCtrl)
  410. {
  411. WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
  412. WLAN_REPORT_ERROR(pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,("whalCtrl_resetMacRx:\n"));
  413. return whal_HwCtrl_resetMacRx (pWhalCtrl->pHwCtrl);
  414. }
  415. /*
  416. * ----------------------------------------------------------------------------
  417. * Function : whalCtrl_PrintHwStatus
  418. *
  419. * Input :
  420. * Output :
  421. * Process :
  422. * Print the Recovery status
  423. * Note(s) : Done
  424. * -----------------------------------------------------------------------------
  425. */
  426. int whalCtrl_PrintHwStatus(TI_HANDLE hWhalCtrl)
  427. {
  428. #ifdef REPORT_LOG
  429. WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
  430. whalCtrl_hwStatus_t *pHwStatus = &pWhalCtrl->pHwCtrl->HwStatus;
  431. WLAN_OS_REPORT(("--------------- whalCtrl_PrintHwStatus ---------------\n\n"));
  432. WLAN_OS_REPORT(("NumMboxErrDueToPeriodicBuiltInTestCheck = %d\n", pHwStatus->NumMboxErrDueToPeriodicBuiltInTestCheck));
  433. WLAN_OS_REPORT(("NumMboxFailures = %d\n", pHwStatus->NumMboxFailures));
  434. #endif
  435. return OK;
  436. }
  437. /*
  438. * ----------------------------------------------------------------------------
  439. * Function : whalCtrl_ResetBusAfterHardBoot
  440. *
  441. * Input :
  442. * Output :
  443. * Process :
  444. * Restart the buss access layer after hard boot.
  445. * Note(s) : Done
  446. * -----------------------------------------------------------------------------
  447. */
  448. void whalCtrl_ResetBusAfterHardBoot(TI_HANDLE hWhalCtrl)
  449. {
  450. #ifdef HW_ACCESS_SDIO
  451. WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
  452. whalBus_ReConfig( pWhalCtrl->hWhalBus );
  453. #endif
  454. }
  455. #endif /* USE_RECOVERY */
  456. /*
  457. * ----------------------------------------------------------------------------
  458. * Function : whalCtrl_LNAControl
  459. *
  460. * Input : LNAControlField, 0=> Turn Off , 1=> Turn On
  461. * Output :
  462. * Process :
  463. * Call the mailbox (need to be called directly without HwCtrl)
  464. * Note(s) : Done
  465. * -----------------------------------------------------------------------------
  466. */
  467. int whalCtrl_LNAControl (TI_HANDLE hWhalCtrl, UINT8 LNAControlField)
  468. {
  469. WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
  470. WLAN_REPORT_INFORMATION(pWhalCtrl->hReport, HAL_CTRL_MODULE_LOG,("whalCtrl_LNAControl: Set LAN to %d\n",LNAControlField));
  471. return whal_HwCtrl_LNAControl (pWhalCtrl->pHwCtrl, LNAControlField);
  472. }