Exemplo n.º 1
0
/**
 * \fn     smeSm_ConnWhenConnecting
 * \brief  Starts the connect process again
 *
 * Starts the connect process again
 *
 * \param  hSme - handle to the SME object
 * \return None
 * \sa     smeSm_Connect
 */
void smeSm_ConnWhenConnecting (TI_HANDLE hSme)
{
	TSme        *pSme = (TSme*)hSme;
	TI_STATUS   tStatus;

	/* start the connection process */
	tStatus = conn_start (pSme->hConn, CONN_TYPE_FIRST_CONN, sme_ReportConnStatus, hSme, TI_FALSE, TI_FALSE);
}
Exemplo n.º 2
0
/** 
 * \fn     smeSm_ConnWhenConnecting 
 * \brief  Starts the connect process again
 * 
 * Starts the connect process again
 * 
 * \param  hSme - handle to the SME object
 * \return None
 * \sa     smeSm_Connect
 */ 
void smeSm_ConnWhenConnecting (TI_HANDLE hSme)
{
    TSme        *pSme = (TSme*)hSme;
    TI_STATUS   tStatus;

    /* start the connection process */
    tStatus = conn_start (pSme->hConn, CONN_TYPE_FIRST_CONN, sme_ReportConnStatus, hSme, TI_FALSE, TI_FALSE);
    if (TI_OK != tStatus)
    {
        TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "smeSm_ConnWhenConnecting: conn_start returned status %d\n", tStatus);
    }
}
Exemplo n.º 3
0
/** 
 * \fn     smeSm_Connect
 * \brief  Starts a connection process with the selected network
 * 
 * Starts a connection process with the selected network
 * 
 * \param  hSme - handle to the SME object
 * \return None
 * \sa     smeSm_PreConnect, smeSm_ConnectSuccess
 */ 
void smeSm_Connect (TI_HANDLE hSme)
{
    TSme        *pSme = (TSme*)hSme;
    TI_STATUS       tStatus;
    paramInfo_t     *pParam;
//joetest
TRACE0(pSme->hReport, REPORT_SEVERITY_SM , "smeSm_Connect!!!\n");
    /* Sanity check - if no connection candidate was found so far */
    if (NULL == pSme->pCandidate)
    {
        TRACE0(pSme->hReport, REPORT_SEVERITY_ERROR , "smeSm_Connect: No candidate available, sending connect failure\n");
        sme_SmEvent (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
    }
    else
    {      
        pParam = (paramInfo_t *)os_memoryAlloc(pSme->hOS, sizeof(paramInfo_t));
        if (!pParam)
        {
            return;
        }

       /* set SCR group */
       if (BSS_INFRASTRUCTURE == pSme->pCandidate->bssType)
       {
           scr_setGroup (pSme->hScr, SCR_GID_CONNECT);
       }

       /***************** Config Connection *************************/
       pParam->paramType = CONN_TYPE_PARAM;	
       if (BSS_INDEPENDENT == pSme->pCandidate->bssType)
           if (SITE_SELF == pSme->pCandidate->siteType)
           {
               pParam->content.connType = CONNECTION_SELF;
           }
           else
           {
               pParam->content.connType = CONNECTION_IBSS;
           }
       else
            pParam->content.connType = CONNECTION_INFRA;
       conn_setParam(pSme->hConn, pParam);   
       os_memoryFree(pSme->hOS, pParam, sizeof(paramInfo_t));

       /* start the connection process */
       tStatus = conn_start (pSme->hConn, CONN_TYPE_FIRST_CONN, sme_ReportConnStatus, hSme, TI_FALSE, TI_FALSE);
       if (TI_OK != tStatus)
       {
           TRACE1(pSme->hReport, REPORT_SEVERITY_ERROR , "smeSm_Connect: conn_start returned status %d\n", tStatus);
       }
    }
}
Exemplo n.º 4
0
/**
 * \fn     smeSm_Connect
 * \brief  Starts a connection process with the selected network
 *
 * Starts a connection process with the selected network
 *
 * \param  hSme - handle to the SME object
 * \return None
 * \sa     smeSm_PreConnect, smeSm_ConnectSuccess
 */
void smeSm_Connect (TI_HANDLE hSme)
{
	TSme        *pSme = (TSme*)hSme;
	TI_STATUS       tStatus;
	paramInfo_t     *pParam;

	/* Sanity check - if no connection candidate was found so far */
	if (NULL == pSme->pCandidate) {
		genSM_Event (pSme->hSmeSm, SME_SM_EVENT_CONNECT_FAILURE, hSme);
	} else {
		pParam = (paramInfo_t *)os_memoryAlloc(pSme->hOS, sizeof(paramInfo_t));
		if (!pParam) {
			return;
		}

		/* set SCR group */
		if (BSS_INFRASTRUCTURE == pSme->pCandidate->bssType) {
			scr_setGroup (pSme->hScr, SCR_GID_CONNECT);
		}

		/***************** Config Connection *************************/
		pParam->paramType = CONN_TYPE_PARAM;
		if (BSS_INDEPENDENT == pSme->pCandidate->bssType)
			if (SITE_SELF == pSme->pCandidate->siteType) {
				pParam->content.connType = CONNECTION_SELF;
			} else {
				pParam->content.connType = CONNECTION_IBSS;
			}
		else
			pParam->content.connType = CONNECTION_INFRA;
		conn_setParam(pSme->hConn, pParam);
		os_memoryFree(pSme->hOS, pParam, sizeof(paramInfo_t));

		/* start the connection process */
		tStatus = conn_start (pSme->hConn, CONN_TYPE_FIRST_CONN, sme_ReportConnStatus, hSme, TI_FALSE, TI_FALSE);
	}
}