Ejemplo n.º 1
0
/**
 * \fn     scanCncnSmImmed1Shot_ScrRelease
 * \brief  Release the SCR as one-shot immediate scan
 *
 * Release the SCR as one-shot immediate scan
 *
 * \param  hScanCncnClient - handle to the specific client object
 * \return None
 */
void scanCncnSmImmed1Shot_ScrRelease (TI_HANDLE hScanCncnClient)
{
	TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;

	/* release the SCR */
	scr_clientComplete (pScanCncnClient->hSCR, SCR_CID_IMMED_SCAN, SCR_RESOURCE_SERVING_CHANNEL);
}
Ejemplo n.º 2
0
/**
 * \fn     scanCncnSmDrvP_ScrRelease
 * \brief  Release the SCR as periodic driver scan
 *
 * Release the SCR as periodic driver scan
 *
 * \param  hScanCncnClient - handle to the specific client object
 * \return None
 */
void scanCncnSmDrvP_ScrRelease (TI_HANDLE hScanCncnClient)
{
	TScanCncnClient *pScanCncnClient = (TScanCncnClient*)hScanCncnClient;

	/* release the SCR */
	scr_clientComplete (pScanCncnClient->hSCR, SCR_CID_DRIVER_FG_SCAN, SCR_RESOURCE_PERIODIC_SCAN);
}
Ejemplo n.º 3
0
static TI_STATUS configHW_to_connected(void *pData)
{
    conn_t          *pConn=(conn_t *)pData;
    EScrResourceId  uResourceIndex;

    /* Update TxMgmtQueue SM to open Tx path to all packets. */
    txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_OPEN);

#ifdef XCC_MODULE_INCLUDED
    XCCMngr_updateIappInformation(pConn->hXCCMngr, XCC_ASSOC_OK);
#endif

    /* Start keep alive process */
    siteMgr_start(pConn->hSiteMgr);

    /* free both SCR resources */
    for (uResourceIndex = SCR_RESOURCE_SERVING_CHANNEL;
         uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES;
         uResourceIndex++)
    {
        scr_clientComplete(pConn->hScr, SCR_CID_CONNECT, uResourceIndex );
        pConn->scrRequested[ uResourceIndex ] = TI_FALSE;
    }

    /* Update current BSS connection type and mode */
    currBSS_updateConnectedState(pConn->hCurrBss, TI_TRUE, BSS_INFRASTRUCTURE);

    pConn->pConnStatusCB( pConn->connStatCbObj, STATUS_SUCCESSFUL, 0);
    
    SoftGemini_SetPSmode(pConn->hSoftGemini);

    return TI_OK;
}
Ejemplo n.º 4
0
static TI_STATUS connInfra_WaitDisconnectToIdle(void *pData)
{
    conn_t          *pConn = (conn_t *)pData;
    EScrResourceId  uResourceIndex;

    /* close all BA sessions */
    TWD_CloseAllBaSessions(pConn->hTWD);

    /* Stop the disconnect timeout timer. */
    tmr_StopTimer (pConn->hConnTimer);

    /*
     * In case of connection failuer we might get here without freeing the SCR.
     */
    for (uResourceIndex = SCR_RESOURCE_SERVING_CHANNEL;
         uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES;
         uResourceIndex++)
    {
        if (pConn->scrRequested[ uResourceIndex ] == TI_TRUE)
        {
            scr_clientComplete(pConn->hScr, SCR_CID_CONNECT, uResourceIndex );
            pConn->scrRequested[ uResourceIndex ] = TI_FALSE;
        }
    }

    /*
     * Call the connection lost callback set by the SME or AP_CONN.
     */
    pConn->pConnStatusCB( pConn->connStatCbObj, pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode);

    return TI_OK;
}
Ejemplo n.º 5
0
/**
 * \\n
 * \date 01-May-2005\n
 * \brief Stops continuous scan process.\n
 *
 * Function Scope \e Public.\n
 * \param hScr - handle to the SCR object.\n
 * \param client - the client to release as.\n
 * \param eResource - the released resource.\n
 */
void releaseAsClient(TI_HANDLE hScr, EScrClientId client,
		     EScrResourceId eResource)
{
	scr_clientComplete(hScr, client, eResource);
	WLAN_OS_REPORT(("Resource %s was released as client %s\n",
			resourceDesc[eResource], clientDesc[client]));
}
static TI_STATUS measurementMgrSM_acFrameReceived_fromMeasuring(void * pData)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;

	setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);

	/* release the SCR */
	scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);

	/* Clear Measurement fields */
	measurementMgrSM_resetParams(pMeasurementMgr);

	/* Process New Frame */
	return measurementMgrSM_acFrameReceived_fromIdle(pData);
}
static TI_STATUS measurementMgrSM_acDisable_fromMeasuring(void * pData)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;

	setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);

	/* release the SCR */
	scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);

	/* Clear Measurement fields */
	measurementMgrSM_resetParams(pMeasurementMgr);

	pMeasurementMgr->Enabled = TI_FALSE;

	return TI_OK;
}
/**
 * Called when a firmware reset has been detected.
 *
 * @date 05-Jan-2006
 */
static TI_STATUS measurementMgrSM_acFirmwareReset(void * pData)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;

	TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Firmware Reset!!\n");

	setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);

	/* release the SCR */
	scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);

	/* Clear Measurement fields */
	measurementMgrSM_resetParams(pMeasurementMgr);

	return TI_OK;
}
static TI_STATUS measurementMgrSM_acAbort_fromMeasuring(void * pData)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;

	setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);

	/* release the SCR */
	scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);

	/* Clear Measurement fields */
	measurementMgrSM_resetParams(pMeasurementMgr);

	TWD_StopMeasurement (pMeasurementMgr->hTWD, TI_TRUE ,NULL, NULL);

	return TI_OK;
}
Ejemplo n.º 10
0
/**
*
*
* \b Description:
*
* This function is called when recovery occurred, while waiting for SCR due
 * to previous switch channel command.
 * Exit PS
 * Release SCR.
*
* \b ARGS:
*
*  I   - pData - pointer to the SwitchChannel SM context  \n
*
* \b RETURNS:
*
*  TI_OK if successful, TI_NOK otherwise.
*
*
*************************************************************************/
static TI_STATUS switchChannel_smScrFailWhileWait4Scr(void *pData)
{
	switchChannel_t                       *pSwitchChannel = (switchChannel_t*)pData;

	if (pSwitchChannel == NULL) {
		return TI_NOK;
	}


	switchChannel_zeroDatabase(pSwitchChannel);

	/* release the SCR is not required !!! */
	scr_clientComplete(pSwitchChannel->hSCR, SCR_CID_SWITCH_CHANNEL, SCR_RESOURCE_SERVING_CHANNEL);

	return TI_OK;
}
/**
 * Called if the SCR callbacked with a response other than RUN.
 *
 * @date 05-Jan-2006
 */
static TI_STATUS measurementMgrSM_acAbort_fromWaitForSCR(void * pData)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;

	setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);

	/* Release the SCR */
	scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);

	/* Build a reject report */
	measurementMgr_rejectPendingRequests(pMeasurementMgr, MSR_REJECT_SCR_UNAVAILABLE);

	/* Clear Measurement fields */
	pMeasurementMgr->sendReportAndCleanObj(pMeasurementMgr);

	return TI_OK;
}
Ejemplo n.º 12
0
static TI_STATUS disAssocc_to_idle(void *pData)
{
    conn_t *pConn = (conn_t *)pData;

    /* Stop the disconnect timeout timer. */
    os_timerStop(((conn_t *)pData)->hOs, ((conn_t *)pData)->pTimer);

    /* 
     * Tx Data Stop and QoS disconnect must be called only after the disconnect (dissasociate/deauthenticate)
     * has been sent, or else no TX complete is received!
     */
    txData_stop(pConn->hTxData);
    qosMngr_disconnect(pConn->hQosMngr);

#ifdef EXC_MODULE_INCLUDED
    measurementMgr_disableTsMetrics(pConn->hMeasurementMgr, MAX_NUM_OF_AC);
#endif

    /* set Hw not available now that the connection process failed */
    MacServices_powerAutho_AwakeRequiredUpdate(pConn->hMacServices, POWERAUTHO_AWAKE_NOT_REQUIRED, POWERAUTHO_AWAKE_REASON_CONNECTION);

    whalCtrl_FwDisconnect(pConn->hHalCtrl, 
                          RX_CONFIG_OPTION_MY_DST_MY_BSS, 
                          RX_FILTER_OPTION_FILTER_ALL);

#ifdef EXC_MODULE_INCLUDED
    excMngr_updateIappInformation(pConn->hExcMngr, EXC_DISASSOC);
#endif

    /*
     * Call the connection lost callback set by the SME or AP_CONN.
     */
	pConn->pConnStatusCB( pConn->connStatCbObj, pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode);

    /*
     * In case of connection failuer we might get here without freeing the SCR.
     */
    if( pConn->scrRequested == TRUE ){
         scr_clientComplete( pConn->hScr, SCR_CID_CONNECT );
         pConn->scrRequested = FALSE;
    }


    return OK;

}
Ejemplo n.º 13
0
static TI_STATUS ScrWait_to_idle(void *pData)
{
    conn_t *pConn = (conn_t *)pData;

    WLAN_REPORT_INFORMATION( pConn->hReport, CONN_MODULE_LOG,
                             ("Infra Connnect SM: Stop event while in SCR wait, moving to IDLE.\n") );

    scr_clientComplete( pConn->hScr, SCR_CID_CONNECT );
    pConn->scrRequested = FALSE;

    /*
     * Call the connection lost callback set by the SME or AP_CONN.
     */
	pConn->pConnStatusCB( pConn->connStatCbObj, pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode);

    return OK;

}
Ejemplo n.º 14
0
/* STOP_MLME, SET_DATA_PORT_CLOSE, DIS_JOIN */
static TI_STATUS mlmeWait_to_Idle(void *pData)
{
    TI_STATUS status;
    paramInfo_t param;
    conn_t *pConn = (conn_t *)pData; 

    status = mlme_stop( pConn->hMlmeSm, pConn->disConnType, pConn->disConnReasonToAP );
    if (status != OK)
        return status;

    param.paramType = RX_DATA_PORT_STATUS_PARAM;
    param.content.rxDataPortStatus = CLOSE;
    rxData_setParam(pConn->hRxData, &param);


    param.paramType = TX_DATA_PORT_STATUS_PARAM;
    param.content.txDataPortStatus = CLOSE;
    txData_setParam(pConn->hTxData, &param);

    /* set Hw not available now that the connection process failed */
    MacServices_powerAutho_AwakeRequiredUpdate(pConn->hMacServices, POWERAUTHO_AWAKE_NOT_REQUIRED, POWERAUTHO_AWAKE_REASON_CONNECTION);
    
    whalCtrl_FwDisconnect(pConn->hHalCtrl, 
                          RX_CONFIG_OPTION_MY_DST_MY_BSS, 
                          RX_FILTER_OPTION_FILTER_ALL );

#ifdef EXC_MODULE_INCLUDED
    excMngr_updateIappInformation(pConn->hExcMngr, EXC_DISASSOC);
#endif

    scr_clientComplete(pConn->hScr, SCR_CID_CONNECT );

    pConn->scrRequested = FALSE;

    /*
     * Call the connection lost callback set by the SME or AP_CONN.
     */
    pConn->pConnStatusCB( pConn->connStatCbObj, pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode);

    return OK;
}
Ejemplo n.º 15
0
/* This function is called from the WAIT_FOR_JOIN_CB_CMPLT state (before mlme_start)
  - all we need to do is call siteMgr_disJoin */
static TI_STATUS JoinWait_to_Idle(void *pData)
{
    conn_t *pConn = (conn_t *)pData; 

    whalCtrl_FwDisconnect(pConn->hHalCtrl, 
                           RX_CONFIG_OPTION_MY_DST_MY_BSS,
                           RX_FILTER_OPTION_FILTER_ALL );
    
    /* set Hw not available now that the connection process failed */
    MacServices_powerAutho_AwakeRequiredUpdate(pConn->hMacServices, POWERAUTHO_AWAKE_NOT_REQUIRED, POWERAUTHO_AWAKE_REASON_CONNECTION);
        
    scr_clientComplete( pConn->hScr, SCR_CID_CONNECT );
    pConn->scrRequested = FALSE;

    /*
     * Call the connection lost callback set by the SME or AP_CONN.
     */
	pConn->pConnStatusCB( pConn->connStatCbObj, pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode);

   return OK;
}
Ejemplo n.º 16
0
static TI_STATUS ScrWait_to_idle(void *pData)
{
    conn_t          *pConn = (conn_t *)pData;
    EScrResourceId  uResourceIndex;

    /* free both SCR resources */
    for (uResourceIndex = SCR_RESOURCE_SERVING_CHANNEL;
         uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES;
         uResourceIndex++)
    {
        scr_clientComplete(pConn->hScr, SCR_CID_CONNECT, uResourceIndex );
        pConn->scrRequested[ uResourceIndex ] = TI_FALSE;
    }

    /*
     * Call the connection lost callback set by the SME or AP_CONN.
     */
    pConn->pConnStatusCB( pConn->connStatCbObj, pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode);

    return TI_OK;
}
Ejemplo n.º 17
0
/**
*
*
* \b Description:
*
* This function is called when the station becomes Disconnected and the current
* state is SwitchChannelInProg. In this case perfrom:
 * Stop the timer
 * Enable TX if it was disabled
 * Zero the current command parameters
 * resume self test
 * Complete SCR
 * Exit PS
*
* \b ARGS:
*
*  I   - pData - pointer to the SwitchChannel SM context  \n
*
* \b RETURNS:
*
*  TI_OK if successful, TI_NOK otherwise.
*
*
*************************************************************************/
static TI_STATUS switchChannel_smStopWhileSwitchChannelInProg(void *pData)
{
	switchChannel_t                       *pSwitchChannel = (switchChannel_t*)pData;

	if (pSwitchChannel == NULL) {
		return TI_NOK;
	}


	/* Exit PS */
	/*PowerMgr_exitFromDriverMode(pSwitchChannel->hPowerMngr, "SwitchChannel");*/

	apConn_indicateSwitchChannelFinished(pSwitchChannel->hApConn);

	TWD_CmdSwitchChannelCancel (pSwitchChannel->hTWD, pSwitchChannel->currentChannel);
	switchChannel_zeroDatabase(pSwitchChannel);

	/* release the SCR */
	scr_clientComplete(pSwitchChannel->hSCR, SCR_CID_SWITCH_CHANNEL, SCR_RESOURCE_SERVING_CHANNEL);

	return TI_OK;
}
Ejemplo n.º 18
0
static TI_STATUS configHW_to_connected(void *pData)
{
    conn_t          *pConn=(conn_t *)pData;
    EScrResourceId  uResourceIndex;

    /* Update TxMgmtQueue SM to open Tx path to all packets. */
    txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_OPEN);


    /* Start keep alive process */
    siteMgr_start(pConn->hSiteMgr);

    /* free both SCR resources */
    for (uResourceIndex = SCR_RESOURCE_SERVING_CHANNEL;
         uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES;
         uResourceIndex++)
    {
        scr_clientComplete(pConn->hScr, SCR_CID_CONNECT, uResourceIndex );
        pConn->scrRequested[ uResourceIndex ] = TI_FALSE;
    }

    /* Update current BSS connection type and mode */
    currBSS_updateConnectedState(pConn->hCurrBss, TI_TRUE, BSS_INFRASTRUCTURE);

    pConn->pConnStatusCB( pConn->connStatCbObj, STATUS_SUCCESSFUL, 0);
    
    SoftGemini_SetPSmode(pConn->hSoftGemini);
#ifdef REPORT_LOG  
    TRACE0(pConn->hReport, REPORT_SEVERITY_CONSOLE, "************ NEW CONNECTION ************\n"); 
    WLAN_OS_REPORT(("************ NEW CONNECTION ************\n"));
    siteMgr_printPrimarySiteDesc(pConn->hSiteMgr);
     TRACE0(pConn->hReport, REPORT_SEVERITY_CONSOLE, "****************************************\n"); 
    WLAN_OS_REPORT(("****************************************\n"));
#else
    os_printf("%s: *** NEW CONNECTION ***\n", __func__);
#endif

    return TI_OK;
}
Ejemplo n.º 19
0
static TI_STATUS configHW_to_connected(void *pData)
{
    TI_STATUS status;
    paramInfo_t param;
    conn_t *pConn=(conn_t *)pData;


    param.paramType = TX_DATA_PORT_STATUS_PARAM;
    param.content.txDataPortStatus = OPEN;
    status = txData_setParam(pConn->hTxData, &param);
    if (status != OK)
        return status;

#ifdef EXC_MODULE_INCLUDED
    excMngr_updateIappInformation(pConn->hExcMngr, EXC_ASSOC_OK);
#endif

    /* Start keep alive process */
    siteMgr_start(pConn->hSiteMgr);

    scr_clientComplete( pConn->hScr, SCR_CID_CONNECT );
    pConn->scrRequested = FALSE;

    /* Update current BSS connection type and mode */
    currBSS_updateConnectedState(pConn->hCurrBss, TRUE, BSS_INFRASTRUCTURE);

    pConn->pConnStatusCB( pConn->connStatCbObj, STATUS_SUCCESSFUL, 0);

    /* set Hw not available now that the connection process ended successfully */
    MacServices_powerAutho_AwakeRequiredUpdate(pConn->hMacServices, POWERAUTHO_AWAKE_NOT_REQUIRED, POWERAUTHO_AWAKE_REASON_CONNECTION);

	SoftGemini_SetPSmode(pConn->hSoftGemini);
    
	WLAN_OS_REPORT(("************ NEW CONNECTION ************\n"));
    siteMgr_printPrimarySiteDesc(pConn->hSiteMgr);

    return OK;
}
Ejemplo n.º 20
0
static TI_STATUS ScrWait_to_idle(void *pData)
{
    conn_t          *pConn = (conn_t *)pData;
    EScrResourceId  uResourceIndex;

    TRACE0( pConn->hReport, REPORT_SEVERITY_INFORMATION, "Infra Connnect SM: Stop event while in SCR wait, moving to IDLE.\n");

    /* free both SCR resources */
    for (uResourceIndex = SCR_RESOURCE_SERVING_CHANNEL;
         uResourceIndex < SCR_RESOURCE_NUM_OF_RESOURCES;
         uResourceIndex++)
    {
        scr_clientComplete(pConn->hScr, SCR_CID_CONNECT, uResourceIndex );
        pConn->scrRequested[ uResourceIndex ] = TI_FALSE;
    }

    /*
     * Call the connection lost callback set by the SME or AP_CONN.
     */
    pConn->pConnStatusCB( pConn->connStatCbObj, pConn->smContext.disAssocEventReason, pConn->smContext.disAssocEventStatusCode);

    return TI_OK;
}
/**
 * Called when we finished a measurement request.
 *
 * @date 05-Jan-2006
 */
static TI_STATUS measurementMgrSM_acMeasurementComplete(void * pData)
{
	measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) pData;
	requestHandler_t * pRequestH = (requestHandler_t *) pMeasurementMgr->hRequestH;

	TRACE0(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Completing measurement operation and resuming normal behavior\n");

	/* advance the activeRequestID variable to get rid of the */
	/* measurement requests we've already executed */
	TRACE2(pMeasurementMgr->hReport, REPORT_SEVERITY_INFORMATION, ": Increasing activeRequestID from %d to %d.\n", pRequestH->activeRequestID, pRequestH->activeRequestID + pMeasurementMgr->currentNumOfRequestsInParallel);

	pRequestH->activeRequestID += pMeasurementMgr->currentNumOfRequestsInParallel;

	setDefaultProbeReqTemplate (pMeasurementMgr->hSiteMgr);

	/* move the driver result table to stable state and clear it */
	sme_MeansurementScanResult (pMeasurementMgr->hSme, SCAN_CRS_SCAN_COMPLETE_OK, NULL);

	/* release the SCR */
	scr_clientComplete(pMeasurementMgr->hScr, SCR_CID_XCC_MEASURE, SCR_RESOURCE_SERVING_CHANNEL);

	/* Process New Frame */
	return measurementMgr_activateNextRequest(pData);
}
Ejemplo n.º 22
0
/**
*
*
* \b Description:
*
* This function is called when SwitchChannel command completed in FW.
 * In this case release SCR and update current channel.
 * If TX was sus, it will be enabled only after first Beacon is recieved.
 * Exit PS.
*
* \b ARGS:
*
*  I   - pData - pointer to the SwitchChannel SM context  \n
*
* \b RETURNS:
*
*  TI_OK if successful, TI_NOK otherwise.
*
*
*************************************************************************/
static TI_STATUS switchChannel_smSwitchChannelCmplt(void *pData)
{
	switchChannel_t             *pSwitchChannel = (switchChannel_t *)pData;
	paramInfo_t     param;

	if (pSwitchChannel == NULL) {
		return TI_NOK;
	}

	/* Update new current channel */
	param.paramType = SITE_MGR_CURRENT_CHANNEL_PARAM;
	param.content.siteMgrCurrentChannel = pSwitchChannel->curChannelSwitchCmdParams.channelNumber;
	siteMgr_setParam(pSwitchChannel->hSiteMgr, &param);


	apConn_indicateSwitchChannelFinished(pSwitchChannel->hApConn);
	switchChannel_zeroDatabase(pSwitchChannel);

	/* release the SCR */
	scr_clientComplete(pSwitchChannel->hSCR, SCR_CID_SWITCH_CHANNEL, SCR_RESOURCE_SERVING_CHANNEL);

	return TI_OK;

}