Beispiel #1
0
TI_STATUS SoftGemini_SetDefaults (TI_HANDLE hSoftGemini, SoftGeminiInitParams_t *pSoftGeminiInitParams)
{
	SoftGemini_t *pSoftGemini = (SoftGemini_t *)hSoftGemini;
	TI_UINT8 i =0;
	TI_STATUS status;
	/*************************************/
	/* Getting SoftGemini init Params */
	/***********************************/

	pSoftGemini->SoftGeminiEnable = pSoftGeminiInitParams->SoftGeminiEnable;

	for (i =0; i< SOFT_GEMINI_PARAMS_MAX ; i++)
	{
		pSoftGemini->SoftGeminiParam.coexParams[i] = pSoftGeminiInitParams->coexParams[i];
	}

	pSoftGemini->SoftGeminiParam.paramIdx = 0xFF; /* signals to FW to config all the paramters */

  
    /* Send the configuration to the FW */
	status = SoftGemini_setParamsToFW(hSoftGemini, &pSoftGemini->SoftGeminiParam);

	/*******************************/
    /* register Indication interrupts  */
	/*****************************/

    TWD_RegisterEvent (pSoftGemini->hTWD, 
                       TWD_OWN_EVENT_SOFT_GEMINI_SENSE,
                       (void *)SoftGemini_SenseIndicationCB, 
                       hSoftGemini);
	TWD_RegisterEvent (pSoftGemini->hTWD, 
                       TWD_OWN_EVENT_SOFT_GEMINI_PREDIC,
                       (void *)SoftGemini_ProtectiveIndicationCB, 
                       hSoftGemini);

    TWD_EnableEvent (pSoftGemini->hTWD, TWD_OWN_EVENT_SOFT_GEMINI_SENSE);
	TWD_EnableEvent (pSoftGemini->hTWD, TWD_OWN_EVENT_SOFT_GEMINI_PREDIC);

	/* On system initialization SG is disabled but later calls to SoftGemini_setEnableParam() */
	pSoftGemini->bProtectiveMode = TI_FALSE;	
	pSoftGemini->SoftGeminiEnable = SG_DISABLE; 
	pSoftGemini->bDriverEnabled = TI_FALSE;
        pSoftGemini->bPsPollFailureActive = TI_FALSE;

	if ((TI_OK == status) && (pSoftGeminiInitParams->SoftGeminiEnable != SG_DISABLE))
	{	/* called only if different than SG_DISABLE */
		status = SoftGemini_setEnableParam(hSoftGemini, pSoftGeminiInitParams->SoftGeminiEnable, TI_FALSE);
	}

	if (status == TI_OK)
	{
TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_INIT, "  SoftGemini_config() - configured successfully\n");
	}
	else
	{
TRACE0(pSoftGemini->hReport, REPORT_SEVERITY_ERROR, "  SoftGemini_config() - Error configuring module \n");
	}

	return status;
}
Beispiel #2
0
TI_STATUS conn_SetDefaults (TI_HANDLE 	hConn, connInitParams_t		*pConnInitParams)
{
    conn_t *pConn = (conn_t *)hConn;

    pConn->timeout			   = pConnInitParams->connSelfTimeout;
	pConn->connType			   = CONN_TYPE_FIRST_CONN;
    pConn->ibssDisconnectCount = 0;

	/* allocate OS timer memory */
    pConn->hConnTimer = tmr_CreateTimer (pConn->hTimer);
	if (pConn->hConnTimer == NULL)
	{
        TRACE0(pConn->hReport, REPORT_SEVERITY_ERROR, "conn_SetDefaults(): Failed to create hConnTimer!\n");
		release_module (pConn);
		return TI_NOK;
	}
	
	TWD_RegisterEvent (pConn->hTWD,  
                       TWD_OWN_EVENT_JOIN_CMPLT, 
					   (void *)connInfra_JoinCmpltNotification, 
                       pConn);

	TWD_EnableEvent (pConn->hTWD, TWD_OWN_EVENT_JOIN_CMPLT);
	
	 /* Register for 'TWD_OWN_EVENT_DISCONNECT_COMPLETE' event */
    TWD_RegisterEvent (pConn->hTWD, TWD_OWN_EVENT_DISCONNECT_COMPLETE, (void *)conn_DisconnectComplete, pConn);
	TWD_EnableEvent (pConn->hTWD, TWD_OWN_EVENT_DISCONNECT_COMPLETE);

	return TI_OK;
}
Beispiel #3
0
/**
 * \fn     txMgmtQ_SetDefaults
 * \brief  Configure this modules default settings
 *
 * \note
 * \param  hTxMgmtQ - The module's object
 * \return TI_NOK if failed. TI_OK otherwise
 * \sa
 */
TI_STATUS txMgmtQ_SetDefaults (TI_HANDLE hTxMgmtQ)
{
	TTxMgmtQ  *pTxMgmtQ = (TTxMgmtQ*) hTxMgmtQ;
	TI_STATUS  status;

	/* Register handler for, and enable the Dummy Packet Request event */
	{
		status = TWD_RegisterEvent (pTxMgmtQ->hTWD, TWD_OWN_EVENT_DUMMY_PKT_REQ,
			(void *)dummyPktReqCB, pTxMgmtQ);

		if (TI_OK != status)
		{
			return TI_NOK;
		}

		status = TWD_EnableEvent (pTxMgmtQ->hTWD, TWD_OWN_EVENT_DUMMY_PKT_REQ);

		if (TI_OK != status)
		{
			return TI_NOK;
		}
	}

	return TI_OK;
}
TI_STATUS switchChannel_SetDefaults (TI_HANDLE hSwitchChannel, SwitchChannelInitParams_t *SwitchChannelInitParams)
{
	switchChannel_t       *pSwitchChannel = (switchChannel_t *)hSwitchChannel;

	/* init variables */
	pSwitchChannel->dot11SpectrumManagementRequired = SwitchChannelInitParams->dot11SpectrumManagementRequired;
	pSwitchChannel->currentState = SC_STATE_IDLE;
	pSwitchChannel->currentChannel = 0;
	pSwitchChannel->switchChannelStarted = TI_FALSE;

	/* register to SCR */
	scr_registerClientCB(pSwitchChannel->hSCR, SCR_CID_SWITCH_CHANNEL,
	                     switchChannel_scrStatusCB, pSwitchChannel);

	/* register to Switch Channel Complete event in HAL */
	TWD_RegisterEvent (pSwitchChannel->hTWD,
	                   TWD_OWN_EVENT_SWITCH_CHANNEL_CMPLT,
	                   (void *)switchChannel_SwitchChannelCmdCompleteReturn,
	                   pSwitchChannel);

	TWD_EnableEvent (pSwitchChannel->hTWD, TWD_OWN_EVENT_SWITCH_CHANNEL_CMPLT);
#ifdef TI_DBG
	/* for debug */
	pSwitchChannel->debugChannelSwitchCmdParams.hdr[0] = CHANNEL_SWITCH_ANNOUNCEMENT_IE_ID;
	pSwitchChannel->debugChannelSwitchCmdParams.hdr[1] = SC_SWITCH_CHANNEL_CMD_LEN;
	pSwitchChannel->ignoreCancelSwitchChannelCmd = 0;
#endif

	return TI_OK;
}