/**************************************************************************** * TnetwDrv_FinalizeDownload() **************************************************************************** * DESCRIPTION: Finalize all the remaining initialization after the downloaD HAS FINISHED Register the ERRORS indications events to the FW * * INPUTS: * * OUTPUT: None * * RETURNS: OK or NOK ****************************************************************************/ TI_STATUS TnetwDrv_FinalizeDownload (TI_HANDLE hTnetwDrv) { TnetwDrv_t *pTnetwDrv = (TnetwDrv_t *)hTnetwDrv; /* Here at the end call the Initialize Complete callback that will release the user Init semaphore */ WLAN_REPORT_INIT(pTnetwDrv->hReport, HAL_CTRL_MODULE_LOG, ("hTNETW_Driver %x!!!!!\n", hTnetwDrv)); /* Here at the end call the Initialize Complete callback that will release the user Init semaphore */ WLAN_REPORT_INIT(pTnetwDrv->hReport, HAL_CTRL_MODULE_LOG, ("Call MacServices_init!!!!!\n")); /* * Initialize the FW-Transfer modules */ txXfer_init (pTnetwDrv->hTxXfer, pTnetwDrv->hReport, pTnetwDrv->hTNETWIF, pTnetwDrv->hTxResult); txResult_init (pTnetwDrv->hTxResult, pTnetwDrv->hReport, pTnetwDrv->hTNETWIF, pTnetwDrv->hFwEvent); rxXfer_Config (pTnetwDrv->hRxXfer, pTnetwDrv->hFwEvent, pTnetwDrv->hMemMgr, pTnetwDrv->hReport,pTnetwDrv->hTNETWIF); #ifdef TI_DBG debugTrace_Config (pTnetwDrv->hDebugTrace, pTnetwDrv->hWhalParams, pTnetwDrv->hReport, pTnetwDrv->hMemMgr, pTnetwDrv->hTNETWIF, pTnetwDrv->hFwEvent); #endif /* TI_DBG */ /* * Initialize the MAC Services */ MacServices_init (pTnetwDrv->hMacServices, pTnetwDrv->hReport, pTnetwDrv->hHalCtrl); /* * Initialize the Data-Services modules */ txCtrlBlk_init (pTnetwDrv->hTxCtrlBlk, pTnetwDrv->hReport); txHwQueue_init (pTnetwDrv->hTxHwQueue, pTnetwDrv->hReport, pTnetwDrv->hWhalParams); /* Here at the end call the Initialize Complete callback that will release the user Init semaphore */ WLAN_REPORT_INIT(pTnetwDrv->hReport, HAL_CTRL_MODULE_LOG, ("Before sending the Init Complet callback !!!!!\n")); /* Sign that init has succeeded */ pTnetwDrv->bInitSuccess = TRUE; /* When working with GWSI Call the Init Complete callback */ #ifdef GWSI_LIB /* * The callback function does not need the handle of the GWSI * since it takes it from the global handle */ GWSI_FinalizeDownload (pTnetwDrv->hUser, OK); /* * When working with CORE call the os_Init_Complete * that will release the OS semaphore that the * user is lock on it in the esta_drb to go on call the next stage */ #else /* Here at the end call the Initialize Complete callback that will release the user Init semaphore */ WLAN_REPORT_INIT(pTnetwDrv->hReport, HAL_CTRL_MODULE_LOG, ("Call os_Complete !!!!!\n")); /* Start configuring driver */ if (TnetwDrv_Configure (hTnetwDrv, NULL) != OK) { WLAN_REPORT_ERROR (pTnetwDrv->hReport, TNETW_DRV_MODULE_LOG, ("TnetwDrv_FinalizeDownload: configuration failure!\n")); } #endif return TNETWIF_COMPLETE; }
void TWD_Init (TI_HANDLE hTWD, TI_HANDLE hReport, TI_HANDLE hUser, TI_HANDLE hTimer, TI_HANDLE hContext, TI_HANDLE hTxnQ, TTwdCallback fInitHwCb, TTwdCallback fInitFwCb, TTwdCallback fConfigFwCb, TTwdCallback fStopCb, TTwdCallback fInitFailCb) { TTwd *pTWD = (TTwd *)hTWD; pTWD->bInitSuccess = TI_FALSE; pTWD->bRecoveryEnabled = TI_FALSE; pTWD->hReport = hReport; pTWD->hUser = hUser; pTWD->hTimer = hTimer; pTWD->hContext = hContext; pTWD->hTxnQ = hTxnQ; pTWD->fInitHwCb = fInitHwCb; pTWD->fInitFwCb = fInitFwCb; pTWD->fConfigFwCb = fConfigFwCb; pTWD->fStopCb = fStopCb; pTWD->fInitFailCb = fInitFailCb; /* FwEvent should be configured first */ fwEvent_Init (pTWD->hFwEvent, hTWD); eventMbox_Config (pTWD->hEventMbox, pTWD->hTwIf, pTWD->hReport, pTWD->hFwEvent, pTWD->hCmdBld); cmdQueue_Init (pTWD->hCmdQueue, pTWD->hCmdMbox, pTWD->hReport, pTWD->hTwIf, pTWD->hTimer); /* Configure Command Builder */ cmdBld_Config (pTWD->hCmdBld, pTWD->hReport, (void *)TWD_FinalizeDownload, hTWD, pTWD->hEventMbox, pTWD->hCmdQueue, pTWD->hTwIf); hwInit_Init (pTWD->hHwInit, pTWD->hReport, hTWD, hTWD, (TFinalizeCb)TWD_FinalizeDownload, TWD_InitHwCb); /* * Initialize the FW-Transfer modules */ txXfer_Init (pTWD->hTxXfer, pTWD->hReport, pTWD->hTwIf); txResult_Init (pTWD->hTxResult, pTWD->hReport, pTWD->hTwIf); rxXfer_Init (pTWD->hRxXfer, pTWD->hFwEvent, pTWD->hReport, pTWD->hTwIf, pTWD->hRxQueue); RxQueue_Init (pTWD->hRxQueue, pTWD->hReport); #ifdef TI_DBG fwDbg_Init (pTWD->hFwDbg, pTWD->hReport, pTWD->hTwIf); #endif /* TI_DBG */ /* Initialize the MAC Services */ MacServices_init (pTWD->hMacServices, pTWD->hReport, hTWD, pTWD->hCmdBld, pTWD->hEventMbox, pTWD->hTimer); /* * Initialize the Data-Services modules */ txCtrlBlk_Init (pTWD->hTxCtrlBlk, pTWD->hReport, pTWD->hContext); txHwQueue_Init (pTWD->hTxHwQueue, pTWD->hReport); /* Initialize the TwIf module */ twIf_Init (pTWD->hTwIf, pTWD->hReport, pTWD->hContext, pTWD->hTimer, pTWD->hTxnQ, (TRecoveryCb)TWD_StopComplete, hTWD); }