示例#1
0
/***********************************************************************
 *                        rsnWait_to_waitToDisconnCmplt
 ***********************************************************************
DESCRIPTION: 


INPUT:   

OUTPUT:

RETURN:     TI_OK on success, TI_NOK otherwise

************************************************************************/
static TI_STATUS rsnWait_to_waitToDisconnCmplt(void *pData)
{
    paramInfo_t     param;
	TI_STATUS		tStatus;
	conn_t          *pConn = (conn_t *)pData;

    tStatus = rsn_stop(((conn_t *)pData)->hRsn, TI_FALSE);

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

	/* Update TxMgmtQueue SM to close Tx path. */
	txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_CLOSE);

    /* Update current BSS connection type and mode */
    currBSS_updateConnectedState(((conn_t *)pData)->hCurrBss, TI_FALSE, BSS_INDEPENDENT);

    /* Start the disconnect complete time out timer.
       Disconect Complete event, which stops the timer. */
    tmr_StartTimer (pConn->hConnTimer, conn_timeout, (TI_HANDLE)pConn, DISCONNECT_TIMEOUT_MSEC, TI_FALSE);

    /* Stop beacon generation */
    TWD_CmdFwDisconnect (((conn_t *)pData)->hTWD, DISCONNECT_IMMEDIATE, STATUS_UNSPECIFIED); 

    return tStatus;
}
示例#2
0
/***********************************************************************
 *                        rsnWait_to_connected
 ***********************************************************************
DESCRIPTION: 


INPUT:   

OUTPUT:

RETURN:     TI_OK on success, TI_NOK otherwise

************************************************************************/
static TI_STATUS rsnWait_to_connected(void *pData)
{
    paramInfo_t param;

    conn_t *pConn=(conn_t *)pData;

    TrafficMonitor_Start( pConn->hTrafficMonitor );

    healthMonitor_setState(pConn->hHealthMonitor, HEALTH_MONITOR_STATE_CONNECTED);

    siteMgr_start(pConn->hSiteMgr);

    param.paramType = RX_DATA_PORT_STATUS_PARAM;
    param.content.rxDataPortStatus = OPEN;
    rxData_setParam(((conn_t *)pData)->hRxData, &param);

	/* Update TxMgmtQueue SM to open Tx path to all packets. */
	txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_OPEN);
    
    /* Update current BSS connection type and mode */
    currBSS_updateConnectedState(pConn->hCurrBss, TI_TRUE, BSS_INDEPENDENT);

#ifdef REPORT_LOG
    WLAN_OS_REPORT(("************ NEW CONNECTION ************\n"));
    siteMgr_printPrimarySiteDesc(pConn->hSiteMgr);
    WLAN_OS_REPORT(("****************************************\n"));
#endif

	sme_ReportConnStatus(((conn_t *)pData)->hSmeSm, STATUS_SUCCESSFUL, 0);

    return TI_OK;
}
示例#3
0
/* SET_DATA_PORT_EAPOL, START_RSN */
static TI_STATUS mlmeWait_to_rsnWait(void *pData)
{
    TI_STATUS status;
    paramInfo_t *pParam;
    conn_t *pConn = (conn_t *)pData;

    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
    if (!pParam)
    {
        return TI_NOK;
    }

    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
    pParam->content.rxDataPortStatus = OPEN_EAPOL;
    status = rxData_setParam(pConn->hRxData, pParam);    
    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
    if (status != TI_OK)
        return status;

    /* Update TxMgmtQueue SM to enable EAPOL packets. */
    txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_EAPOL);

    /*
     *  Notify that the driver is associated to the supplicant\IP stack. 
     */
    EvHandlerSendEvent(pConn->hEvHandler, IPC_EVENT_ASSOCIATED, NULL,0);

    status = rsn_start(pConn->hRsn);
    return status;
}
/* SET_DATA_PORT_EAPOL, START_RSN */
static TI_STATUS mlmeWait_to_rsnWait(void *pData)
{
    TI_STATUS status;
    paramInfo_t param;
    conn_t *pConn = (conn_t *)pData;

    param.paramType = RX_DATA_PORT_STATUS_PARAM;
    param.content.rxDataPortStatus = OPEN_EAPOL;
    status = rxData_setParam(pConn->hRxData, &param);
    if (status != OK)
        return status;

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

    /*
     *  Notify that the driver is associated to the supplicant\IP stack. 
     */
    EvHandlerSendEvent(pConn->hEvHandler, IPC_EVENT_ASSOCIATED, NULL,0);

    return rsn_start(pConn->hRsn);
}
示例#5
0
/* STOP_MLME, SET_DATA_PORT_CLOSE, DIS_JOIN */
static TI_STATUS mlmeWait_to_WaitDisconnect(void *pData)
{
    TI_STATUS   status;
    paramInfo_t *pParam;
    conn_t      *pConn = (conn_t *)pData;

    status = mlme_stop( pConn->hMlme, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP );
    if (status != TI_OK)
        return status;

    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
    if (!pParam)
    {
        return TI_NOK;
    }

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


    /* Update TxMgmtQueue SM to close Tx path. */
    txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_CLOSE);

    /* Start the disconnect complete time out timer. 
       Disconect Complete event, which stops the timer. */
    tmr_StartTimer (pConn->hConnTimer, conn_timeout, (TI_HANDLE)pConn, DISCONNECT_TIMEOUT_MSEC, TI_FALSE);

    /* FW will send the disconn frame according to disConnType */ 
    TWD_CmdFwDisconnect (pConn->hTWD, pConn->disConnType, pConn->disConnReasonToAP); 

    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
    return TI_OK;
}
示例#6
0
static TI_STATUS JoinWait_to_mlmeWait(void *pData)
{
    TI_STATUS status;
    paramInfo_t *pParam;
    conn_t *pConn = (conn_t *)pData;

    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
    if (!pParam)
    {
        return TI_NOK;
    }

    /* Set the BA session policies to the FW */
    qosMngr_SetBaPolicies(pConn->hQosMngr);

    pParam->paramType = SITE_MGR_CURRENT_CHANNEL_PARAM;
    siteMgr_getParam(pConn->hSiteMgr, pParam);

    pParam->paramType = REGULATORY_DOMAIN_TX_POWER_AFTER_SELECTION_PARAM;
    pParam->content.channel = pParam->content.siteMgrCurrentChannel;
    regulatoryDomain_setParam(pConn->hRegulatoryDomain, pParam);

    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
    pParam->content.rxDataPortStatus = OPEN_NOTIFY;
    status = rxData_setParam(pConn->hRxData, pParam);
    if (status != TI_OK)
    {
        TRACE1( pConn->hReport, REPORT_SEVERITY_FATAL_ERROR, "JoinWait_to_mlmeWait: rxData_setParam return 0x%x.\n", status);
        os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
        return status;
    }

    /* Update TxMgmtQueue SM to open Tx path only for Mgmt packets. */
    txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_MGMT);

    /* 
     * Set the reassociation flag in the association logic.
     */ 
    pParam->paramType = MLME_RE_ASSOC_PARAM;

    if( pConn->connType == CONN_TYPE_ROAM )
	{
        pParam->content.mlmeReAssoc = TI_TRUE;
	}
    else 
	{
        pParam->content.mlmeReAssoc = TI_FALSE;
	}

    status = mlme_setParam(pConn->hMlme, pParam);

    if (status != TI_OK)
    {
        TRACE1( pConn->hReport, REPORT_SEVERITY_FATAL_ERROR, "JoinWait_to_mlmeWait: mlme_setParam return 0x%x.\n", status);
    }
	os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));

	/* TODO - YD - check the association type and then start mlme */
	return mlme_start(pConn->hMlme, pConn->connType);
}
/* STOP_RSN, SET_DATA_PORT_CLOSE, STOP_MLME, DIS_JOIN */
static TI_STATUS rsnWait_to_disassociate(void *pData)
{
    TI_STATUS status;
    paramInfo_t param;
    conn_t *pConn = (conn_t *)pData;

    status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys);
    if (status != OK)
        return status;

    param.paramType = RX_DATA_PORT_STATUS_PARAM;
    param.content.rxDataPortStatus = CLOSE;
    status = rxData_setParam(pConn->hRxData, &param);
    if (status != OK)
        return status;

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

    /* Start the disconnect complete time out timer. 
        This should be done BEFORE calling mlme_stop, which invokes Disconect Complete
        event, which stops the timer. */
    os_timerStart(pConn->hOs, pConn->pTimer, DISCONNECT_TIMEOUT, FALSE);

    status = mlme_stop( pConn->hMlmeSm, pConn->disConnType, pConn->disConnReasonToAP );

    if (status != OK)
        return status;

    return OK;
}
static TI_STATUS selfw_merge_rsnw(void *pData)
{
	conn_t *pConn=(conn_t *)pData;
	paramInfo_t param;

	os_printf("IBSS selfw_merge_rsnw!!!!!!!!!!\n");

	tmr_StopTimer (pConn->hConnTimer);
	siteMgr_join(pConn->hSiteMgr);

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

	/* Update TxMgmtQueue SM to enable EAPOL packets. */
	txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_EAPOL);

	/*
	 *  Notify that the driver is associated to the supplicant\IP stack.
	 */
	EvHandlerSendEvent (pConn->hEvHandler, IPC_EVENT_ASSOCIATED, NULL, 0);

	return rsn_start (pConn->hRsn);

}
/***************************************************************************
*                           txCtrlParams_setParam                           
****************************************************************************
* DESCRIPTION:  Set a specific parameter by an external user application.
*
* INPUTS:       hTxCtrl - the object
*               pParamInfo - structure which include the value to set for
*               the requested parameter
***************************************************************************/
TI_STATUS txCtrlParams_setParam(TI_HANDLE hTxCtrl, paramInfo_t *pParamInfo)
{
	txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
	TI_UINT8 acID;

    if(pTxCtrl == NULL)  /* check handle validity */
    {
        return TI_NOK;
    }
	
    switch (pParamInfo->paramType)
    {
    case TX_CTRL_SET_MEDIUM_USAGE_THRESHOLD:
		acID = (TI_UINT8)pParamInfo->content.txDataMediumUsageThreshold.uAC;
		if(acID < MAX_NUM_OF_AC)
		{
			pTxCtrl->highMediumUsageThreshold[acID] = 
				pParamInfo->content.txDataMediumUsageThreshold.uHighThreshold;
			pTxCtrl->lowMediumUsageThreshold[acID] = 
				pParamInfo->content.txDataMediumUsageThreshold.uLowThreshold;
		}
		else
TRACE1(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, ": Wrong AC (AC=%d > 3)\n", acID);
		break;

    case TX_CTRL_GET_MEDIUM_USAGE_THRESHOLD:
		/* Note: SET operation is used for GET, because AC parameter should be supplied from Utility- 
	         Adapter to driver (copy of user supplied block of data is only performed in SetParam calls). */
		acID = (TI_UINT8)pParamInfo->content.txDataMediumUsageThreshold.uAC;
		pParamInfo->content.txDataMediumUsageThreshold.uHighThreshold = pTxCtrl->highMediumUsageThreshold[acID];
		pParamInfo->content.txDataMediumUsageThreshold.uLowThreshold  = pTxCtrl->lowMediumUsageThreshold[acID];
		break;

    case TX_CTRL_POLL_AP_PACKETS_FROM_AC:
       TRACE0(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, ": Poll-AP is not supported in this version!!\n");
       return PARAM_NOT_SUPPORTED;

	case TX_CTRL_RESET_COUNTERS_PARAM:
		txCtrlParams_resetCounters(hTxCtrl);
		break;

	case TX_CTRL_GENERIC_ETHERTYPE:
        pTxCtrl->genericEthertype = pParamInfo->content.txGenericEthertype;
		{
				paramInfo_t param;
				param.paramType = RX_DATA_GENERIC_ETHERTYPE_PARAM;
				param.content.rxGenericEthertype = pTxCtrl->genericEthertype;
				rxData_setParam(pTxCtrl->hRxData, &param);
		}
		break;


    default:
        TRACE0(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, ": PARAMETER NOT SUPPORTED\n");
        return PARAM_NOT_SUPPORTED;
    }

    return TI_OK;
}
示例#10
0
static TI_STATUS connect_to_ScrWait(void *pData)
{
    TI_STATUS   status;
    paramInfo_t *pParam;
    conn_t      *pConn = (conn_t *)pData;

    /*
     * This function performs roaming by two steps:
     * First - close the current connection without notify the SME.
     * Second - start new connection in reassociation mode.
     */ 

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

    status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys);
    if (status != TI_OK)
        return status;

    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
    if (!pParam)
    {
        return TI_NOK;
    }

    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
    pParam->content.rxDataPortStatus = CLOSE;
    status = rxData_setParam(pConn->hRxData, pParam);
    if (status == TI_OK)
    {
        /* Update TxMgmtQueue SM to close Tx path. */
        txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_CLOSE);

        status = mlme_stop(pConn->hMlmeSm, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP);
        if (status == TI_OK)
        {
            pParam->paramType = REGULATORY_DOMAIN_DISCONNECT_PARAM;
            regulatoryDomain_setParam(pConn->hRegulatoryDomain, pParam);

#ifdef XCC_MODULE_INCLUDED
            XCCMngr_updateIappInformation(pConn->hXCCMngr, XCC_DISASSOC);
#endif
        /* Must be called AFTER mlme_stop. since De-Auth packet should be sent with the
            supported rates, and stopModules clears all rates. */
            stopModules(pConn, TI_FALSE);

            txCtrlParams_setEapolEncryptionStatus(pConn->hTxCtrl, DEF_EAPOL_ENCRYPTION_STATUS);
            qosMngr_disconnect (pConn->hQosMngr, TI_FALSE);

        /* 
         * Start new connection.
         */ 
            connInfra_ScrWait(pConn);
        }
    }

    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
    return status;
}
示例#11
0
static TI_STATUS connect_to_ScrWait(void *pData)
{
    TI_STATUS status;
    paramInfo_t param;
    conn_t *pConn = (conn_t *)pData;
    /*
     * This function performs roaming by two steps:
     * First - close the current connection without notify the SME.
     * Second - start new connection in reassociation mode.
     */ 


    status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys);
    if (status != OK)
        return status;

    param.paramType = RX_DATA_PORT_STATUS_PARAM;
    param.content.rxDataPortStatus = CLOSE;
    status = rxData_setParam(pConn->hRxData, &param);
    if (status != OK)
        return status;

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

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

    param.paramType = REGULATORY_DOMAIN_DISCONNECT_PARAM;
    regulatoryDomain_setParam(pConn->hRegulatoryDomain, &param);

#ifdef EXC_MODULE_INCLUDED
    excMngr_updateIappInformation(pConn->hExcMngr, EXC_DISASSOC);
#endif
    /* Must be called AFTER mlme_stop. since De-Auth packet should be sent with the
        supported rates, and stopModules clears all rates. */
    stopModules(pConn);

    /* 
     * Tx Data Stop and QoS disconnect must be called only after the disconnect (dissasociate/deauthenticate)
     * has been sent. In this case no deauthenticate frame is sent bu still we keep the 
     * order.
     */
    txData_stop(pConn->hTxData);
    qosMngr_disconnect(pConn->hQosMngr);

    /* 
     * Start new connection.
     */ 
    Idle_to_ScrWait(pConn);

    return OK;
}
示例#12
0
static TI_STATUS rsnWait_to_configHW(void *pData)
{
    conn_t *pConn=(conn_t *)pData;
    TI_STATUS status;
    static UINT8    buf[20]; /* for mailbox interrogate leave the "static" flag !!!*/
    paramInfo_t     param;

    /* Open the RX to DATA */
    param.paramType = RX_DATA_PORT_STATUS_PARAM;
    param.content.rxDataPortStatus = OPEN;
    status = rxData_setParam(pConn->hRxData, &param);
    if (status != OK)
        return status;

    status = ctrlData_start(pConn->hCtrlData);
    if (status != OK)
      {
         WLAN_REPORT_ERROR(pConn->hReport, CONN_MODULE_LOG, ("Infra Conn status=%d, have to return (%d)\n",status,__LINE__));
         return status;
      }

    status = qosMngr_connect(pConn->hQosMngr);
    if (status != OK)
    {
         WLAN_REPORT_ERROR(pConn->hReport, CONN_MODULE_LOG, ("Infra Conn status=%d, have to return (%d)\n",status,__LINE__));
         return status;
    }

    status = measurementMgr_connected(pConn->hMeasurementMgr);
    if (status != OK)
      {
         WLAN_REPORT_ERROR(pConn->hReport, CONN_MODULE_LOG, ("Infra Conn status=%d, have to return (%d)\n",status,__LINE__));
         return status;
      }

    status = TrafficMonitor_Start(pConn->hTrafficMonitor);
    if (status != OK)
      {
         WLAN_REPORT_ERROR(pConn->hReport, CONN_MODULE_LOG, ("Infra Conn status=%d, have to return (%d)\n",status,__LINE__));
         return status;
      }

    healthMonitor_setState(pConn->hHealthMonitor, HEALTH_MONITOR_STATE_CONNECTED);

    switchChannel_start(pConn->hSwitchChannel);

    scanConcentrator_switchToConnected( pConn->hScanCnc );

    PowerMgr_startPS(pConn->hPwrMngr);
    
    whalCtrl_InterrogateMbox(pConn->hHalCtrl, (void *)conn_MboxFlushFinishCb,pData,&buf[0]);

    return OK;
}
示例#13
0
static TI_STATUS rsnWait_to_configHW(void *pData)
{
    conn_t *pConn=(conn_t *)pData;
    TI_STATUS status;
    paramInfo_t *pParam;

    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
    if (!pParam)
    {
        return TI_NOK;
    }

    /* Open the RX to DATA */
    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
    pParam->content.rxDataPortStatus = OPEN;
    status = rxData_setParam(pConn->hRxData, pParam);
    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
    if (status != TI_OK)
        return status;

    status = qosMngr_connect(pConn->hQosMngr);
    if (status != TI_OK)
    {
         TRACE2(pConn->hReport, REPORT_SEVERITY_ERROR, "Infra Conn status=%d, have to return (%d)\n",status,__LINE__);
         return status;
    }

    status = measurementMgr_connected(pConn->hMeasurementMgr);
    if (status != TI_OK)
    {
        TRACE2(pConn->hReport, REPORT_SEVERITY_ERROR, "Infra Conn status=%d, have to return (%d)\n",status,__LINE__);
        return status;
    }

    status = TrafficMonitor_Start(pConn->hTrafficMonitor);
    if (status != TI_OK)
    {
        TRACE2(pConn->hReport, REPORT_SEVERITY_ERROR, "Infra Conn status=%d, have to return (%d)\n",status,__LINE__);
        return status;
    }

    healthMonitor_setState(pConn->hHealthMonitor, HEALTH_MONITOR_STATE_CONNECTED);

    switchChannel_start(pConn->hSwitchChannel);

    scanCncn_SwitchToConnected (pConn->hScanCncn);

    PowerMgr_startPS(pConn->hPwrMngr);
    
    TRACE1(pConn->hReport, REPORT_SEVERITY_INFORMATION, "rsnWait_to_configHW: setStaStatus %d\n",STA_STATE_CONNECTED);
    TWD_CmdSetStaState(pConn->hTWD, STA_STATE_CONNECTED, (void *)conn_ConfigHwFinishCb, pData);

    return TI_OK;
}
示例#14
0
/***********************************************************************
 *                        selfWait_to_rsnWait
 ***********************************************************************
DESCRIPTION: 


INPUT:   

OUTPUT:

RETURN:     TI_OK on success, TI_NOK otherwise

************************************************************************/
static TI_STATUS selfWait_to_rsnWait (void *pData)
{
	conn_t      *pConn = (conn_t *)pData;
    paramInfo_t  param;

    tmr_StopTimer (pConn->hConnTimer);

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

	/* Update TxMgmtQueue SM to enable EAPOL packets. */
	txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_EAPOL);

    return rsn_start (pConn->hRsn);
}
示例#15
0
static TI_STATUS connInfra_ScrWaitDisconn_to_disconnect(void *pData)
{
    TI_STATUS status;
    paramInfo_t *pParam;
    conn_t *pConn = (conn_t *)pData;
    
    status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys);
    if (status != TI_OK)
        return status;

    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
    if (!pParam)
    {
        return TI_NOK;
    }

    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
    pParam->content.rxDataPortStatus = CLOSE;
    status = rxData_setParam(pConn->hRxData, pParam);
    if (status == TI_OK) 
    {
        /* Update TxMgmtQueue SM to close Tx path for all except Mgmt packets. */
        txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_MGMT);

        pParam->paramType = REGULATORY_DOMAIN_DISCONNECT_PARAM;
        regulatoryDomain_setParam(pConn->hRegulatoryDomain, pParam);

        status = mlme_stop( pConn->hMlme, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP );
        if (status == TI_OK) 
        {
            /* Must be called AFTER mlme_stop. since De-Auth packet should be sent with the
                supported rates, and stopModules clears all rates. */
            stopModules(pConn, TI_TRUE);
    
            /* send disconnect command to firmware */
            prepare_send_disconnect(pData);
        }
    }

    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
    return status;
}
示例#16
0
static TI_STATUS selfw_merge_rsnw(void *pData)
{
    conn_t *pConn=(conn_t *)pData;
    paramInfo_t param;

	os_printf("IBSS selfw_merge_rsnw!!!!!!!!!!\n");

	tmr_StopTimer (pConn->hConnTimer);
	siteMgr_join(pConn->hSiteMgr);

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

	/* Update TxMgmtQueue SM to enable EAPOL packets. */
	txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_EAPOL);

    return rsn_start (pConn->hRsn);

}
示例#17
0
static TI_STATUS connect_to_disassociate(void *pData)
{
    TI_STATUS status;
    paramInfo_t param;
    conn_t *pConn = (conn_t *)pData;

    status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys);
    if (status != OK)
        return status;

    param.paramType = RX_DATA_PORT_STATUS_PARAM;
    param.content.rxDataPortStatus = CLOSE;
    status = rxData_setParam(pConn->hRxData, &param);
    if (status != OK)
        return status;

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

    param.paramType = REGULATORY_DOMAIN_DISCONNECT_PARAM;
    regulatoryDomain_setParam(pConn->hRegulatoryDomain, &param);

    /* Start the disconnect complete time out timer. 
        This should be done BEFORE calling mlme_stop, which invokes Disconect Complete
        event, which stops the timer. */
    os_timerStart(pConn->hOs, pConn->pTimer, DISCONNECT_TIMEOUT, FALSE);

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

    /* Must be called AFTER mlme_stop. since De-Auth packet should be sent with the
        supported rates, and stopModules clears all rates. */
    stopModules(pConn);

    return OK;

}
示例#18
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;
}
示例#19
0
/***********************************************************************
 *                        rsnWait_to_waitToDisconnCmplt
 ***********************************************************************
DESCRIPTION: 


INPUT:   

OUTPUT:

RETURN:     TI_OK on success, TI_NOK otherwise

************************************************************************/
static TI_STATUS rsnWait_to_waitToDisconnCmplt(void *pData)
{
    paramInfo_t     param;
	TI_STATUS		tStatus;

    tStatus = rsn_stop(((conn_t *)pData)->hRsn, TI_FALSE);

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

	/* Update TxMgmtQueue SM to close Tx path. */
	txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_CLOSE);

    /* Update current BSS connection type and mode */
    currBSS_updateConnectedState(((conn_t *)pData)->hCurrBss, TI_FALSE, BSS_INDEPENDENT);

    /* Stop beacon generation */
    TWD_CmdFwDisconnect (((conn_t *)pData)->hTWD, DISCONNECT_IMMEDIATE, STATUS_UNSPECIFIED); 

    return tStatus;
}
示例#20
0
/***********************************************************************
 *                        idle_to_rsnWait
 ***********************************************************************
DESCRIPTION: 


INPUT:   

OUTPUT:

RETURN:     TI_OK on success, TI_NOK otherwise

************************************************************************/
static TI_STATUS idle_to_rsnWait(void *pData)
{
    paramInfo_t param;

    siteMgr_join(((conn_t *)pData)->hSiteMgr);

    param.paramType = RX_DATA_PORT_STATUS_PARAM;
    param.content.rxDataPortStatus = OPEN_EAPOL;
    rxData_setParam(((conn_t *)pData)->hRxData, &param);

	/* Update TxMgmtQueue SM to enable EAPOL packets. */
	txMgmtQ_SetConnState (((conn_t *)pData)->hTxMgmtQ, TX_CONN_STATE_EAPOL);
    
    /*
     *  Notify that the driver is associated to the supplicant\IP stack. 
     */
    EvHandlerSendEvent(((conn_t *)pData)->hEvHandler, IPC_EVENT_ASSOCIATED, NULL,0);

    /* Update current BSS connection type and mode */
    currBSS_updateConnectedState(((conn_t *)pData)->hCurrBss, TI_TRUE, BSS_INDEPENDENT);
    
    return rsn_start(((conn_t *)pData)->hRsn);
}
示例#21
0
static TI_STATUS JoinWait_to_mlmeWait(void *pData)
{
    TI_STATUS status;
    paramInfo_t param;
    conn_t *pConn = (conn_t *)pData;

    txData_start(pConn->hTxData);

    param.paramType = REGULATORY_DOMAIN_TX_POWER_AFTER_SELECTION_PARAM;
    regulatoryDomain_setParam(pConn->hRegulatoryDomain, &param);

    param.paramType = RX_DATA_PORT_STATUS_PARAM;
    param.content.rxDataPortStatus = OPEN_NOTIFY;
    status = rxData_setParam(pConn->hRxData, &param);
    if (status != OK)
        return status;

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

    /* 
     * Set the reassociation flag in the association logic.
     */ 
    param.paramType = MLME_RE_ASSOC_PARAM;

    if( pConn->connType == CONN_TYPE_ROAM )
        param.content.mlmeReAssoc = TRUE;
    else 
        param.content.mlmeReAssoc = FALSE;

    status = mlme_setParam(pConn->hMlmeSm, &param);

    return mlme_start(pConn->hMlmeSm);
}
示例#22
0
/* STOP_RSN, SET_DATA_PORT_CLOSE, STOP_MLME, DIS_JOIN */
static TI_STATUS rsnWait_to_disconnect(void *pData)
{
    TI_STATUS status;
    paramInfo_t *pParam;
    conn_t *pConn = (conn_t *)pData;

    status = rsn_stop(pConn->hRsn, pConn->disConEraseKeys);
    if (status != TI_OK)
        return status;

    pParam = (paramInfo_t *)os_memoryAlloc(pConn->hOs, sizeof(paramInfo_t));
    if (!pParam)
    {
        return TI_NOK;
    }

    pParam->paramType = RX_DATA_PORT_STATUS_PARAM;
    pParam->content.rxDataPortStatus = CLOSE;
    status = rxData_setParam(pConn->hRxData, pParam);
    os_memoryFree(pConn->hOs, pParam, sizeof(paramInfo_t));
    if (status != TI_OK)
        return status;

    /* Update TxMgmtQueue SM to close Tx path for all except Mgmt packets. */
    txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_MGMT);

    status = mlme_stop( pConn->hMlme, DISCONNECT_IMMEDIATE, pConn->disConnReasonToAP );

    if (status != TI_OK)
        return status;

    /* send disconnect command to firmware */
    prepare_send_disconnect(pData);

    return TI_OK;
}
示例#23
0
/***********************************************************************
 *                        selfWait_to_waitToDisconnCmplt
 ***********************************************************************
DESCRIPTION: 


INPUT:   

OUTPUT:

RETURN:     TI_OK on success, TI_NOK otherwise

************************************************************************/
static TI_STATUS selfWait_to_waitToDisconnCmplt (void *pData)
{
	conn_t      *pConn = (conn_t *)pData;
    paramInfo_t  param;  

    tmr_StopTimer (pConn->hConnTimer);
    
    siteMgr_removeSelfSite(pConn->hSiteMgr);

    /* Update current BSS connection type and mode */
    currBSS_updateConnectedState(pConn->hCurrBss, TI_FALSE, BSS_INDEPENDENT);
    
    /* stop beacon generation  */
    param.paramType = RX_DATA_PORT_STATUS_PARAM;
    param.content.rxDataPortStatus = CLOSE;
    rxData_setParam(pConn->hRxData, &param);

	/* Update TxMgmtQueue SM to close Tx path. */
	txMgmtQ_SetConnState (pConn->hTxMgmtQ, TX_CONN_STATE_CLOSE);
    
    TWD_CmdFwDisconnect (pConn->hTWD, DISCONNECT_IMMEDIATE, STATUS_UNSPECIFIED);

    return TI_OK;
}
示例#24
0
/**
*
* admCtrlNone_setSite  - Set current primary site parameters for registration.
*
* \b Description: 
*
* Set current primary site parameters for registration.
*
* \b ARGS:
*
*  I   - pAdmCtrl - context \n
*  I   - pRsnData - site's RSN data \n
*  O   - pAssocIe - result IE of evaluation \n
*  O   - pAssocIeLen - length of result IE of evaluation \n
*  
* \b RETURNS:
*
*  TI_OK on site is aproved, TI_NOK on site is rejected.
*
* \sa 
*/
TI_STATUS admCtrlNone_setSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen)
{
	TI_STATUS			status;
	paramInfo_t			param;
	TTwdParamInfo		tTwdParam;
	EAuthSuite			authSuite;

	admCtrlNone_config(pAdmCtrl);

	authSuite = pAdmCtrl->authSuite;

  /* Config the default keys */
	if ((authSuite == RSN_AUTH_SHARED_KEY) || (authSuite == RSN_AUTH_AUTO_SWITCH))
	{   /* Configure Security status in HAL */
		tTwdParam.paramType = TWD_RSN_SECURITY_MODE_PARAM_ID;
		tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_WEP;
		status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
		/* Configure the keys in HAL */
		rsn_setDefaultKeys(pAdmCtrl->pRsn);
	}

#ifdef XCC_MODULE_INCLUDED
	admCtrlXCC_setExtendedParams(pAdmCtrl, pRsnData);
#endif

	/* Now we configure the MLME module with the 802.11 legacy authentication suite, 
		THe MLME will configure later the authentication module */
	param.paramType = MLME_LEGACY_TYPE_PARAM;
	switch (authSuite)
	{
	case RSN_AUTH_OPEN:
		param.content.mlmeLegacyAuthType = AUTH_LEGACY_OPEN_SYSTEM;
		break;

	case RSN_AUTH_SHARED_KEY: 
		param.content.mlmeLegacyAuthType = AUTH_LEGACY_SHARED_KEY;
		break;

	case RSN_AUTH_AUTO_SWITCH:
		param.content.mlmeLegacyAuthType = AUTH_LEGACY_AUTO_SWITCH;
		break;

	default:
		return TI_NOK;
	}
	
	status = mlme_setParam(pAdmCtrl->hMlme, &param);
	if (status != TI_OK)
	{
		return status;
	}

	param.paramType = RX_DATA_EAPOL_DESTINATION_PARAM;
	param.content.rxDataEapolDestination = OS_ABS_LAYER;
	status = rxData_setParam(pAdmCtrl->hRx, &param);
	if (status != TI_OK)
	{
		return status;
	}

	/* Configure privacy status in HAL */
	if (authSuite == RSN_AUTH_OPEN)
	{
		tTwdParam.paramType = TWD_RSN_SECURITY_MODE_PARAM_ID;
		tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_NONE;
		status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
	}

	return status;
}
示例#25
0
/**
*
* admCtrlWep_setSite  - Set current primary site parameters for registration.
*
* \b Description: 
*
* Set current primary site parameters for registration.
*
* \b ARGS:
*
*  I   - pAdmCtrl - context \n
*  I   - pRsnData - site's RSN data \n
*  O   - pAssocIe - result IE of evaluation \n
*  O   - pAssocIeLen - length of result IE of evaluation \n
*  
* \b RETURNS:
*
*  TI_OK on site is aproved, TI_NOK on site is rejected.
*
* \sa 
*/
TI_STATUS admCtrlWep_setSite(admCtrl_t *pAdmCtrl, TRsnData *pRsnData, TI_UINT8 *pAssocIe, TI_UINT8 *pAssocIeLen)
{
	TI_STATUS			status;
	paramInfo_t			param;
    TTwdParamInfo       tTwdParam;
	EAuthSuite			authSuite;

#ifdef XCC_MODULE_INCLUDED
	if (mlmeParser_ParseIeBuffer (pAdmCtrl->hMlme, pRsnData->pIe, pRsnData->ieLen, XCC_EXT_1_IE_ID, NULL, NULL, 0))
	{
		pAdmCtrl->XCCSupport = TI_TRUE;
		return (admCtrlXCC_setSite(pAdmCtrl, pRsnData, pAssocIe, pAssocIeLen));
	}
#endif


	pAdmCtrl->XCCSupport = TI_FALSE;
	pAdmCtrl->unicastSuite = TWD_CIPHER_WEP;
	pAdmCtrl->broadcastSuite = TWD_CIPHER_WEP;

	admCtrlWep_config(pAdmCtrl);

	authSuite = pAdmCtrl->authSuite;

  /* Config the default keys */
	if ((authSuite == RSN_AUTH_SHARED_KEY) || (authSuite == RSN_AUTH_AUTO_SWITCH))
	{	/* Configure Security status in HAL */
		tTwdParam.paramType = TWD_RSN_SECURITY_MODE_PARAM_ID;
		tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_WEP;
		status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);
		/* Configure the keys in HAL */
		rsn_setDefaultKeys(pAdmCtrl->pRsn);
	}


	/* Now we configure the MLME module with the 802.11 legacy authentication suite, 
		THe MLME will configure later the authentication module */
	param.paramType = MLME_LEGACY_TYPE_PARAM;
#ifdef XCC_MODULE_INCLUDED	
	if (pAdmCtrl->networkEapMode!=OS_XCC_NETWORK_EAP_OFF)
    {
        param.content.mlmeLegacyAuthType = AUTH_LEGACY_RESERVED1;
    }
    else
#endif
    {
        switch (authSuite)
        {
        case RSN_AUTH_OPEN:
            param.content.mlmeLegacyAuthType = AUTH_LEGACY_OPEN_SYSTEM;
            break;

        case RSN_AUTH_SHARED_KEY: 
            param.content.mlmeLegacyAuthType = AUTH_LEGACY_SHARED_KEY;
            break;

        case RSN_AUTH_AUTO_SWITCH:
            param.content.mlmeLegacyAuthType = AUTH_LEGACY_AUTO_SWITCH;
            TRACE0(pAdmCtrl->hReport , REPORT_SEVERITY_INFORMATION, "WEP admCtrl mlme_setParam, RSN_AUTH_AUTO_SWITCH\n");
            break;

        default:
            return TI_NOK;
        }
    }
	
	status = mlme_setParam(pAdmCtrl->hMlme, &param);
	if (status != TI_OK)
	{
		return status;
	}

	param.paramType = RX_DATA_EAPOL_DESTINATION_PARAM;
	param.content.rxDataEapolDestination = OS_ABS_LAYER;
	status = rxData_setParam(pAdmCtrl->hRx, &param);
	if (status != TI_OK)
	{
		return status;
	}

	/* Configure Security status in HAL */
    tTwdParam.paramType = TWD_RSN_SECURITY_MODE_PARAM_ID;
    tTwdParam.content.rsnEncryptionStatus = (ECipherSuite)TWD_CIPHER_WEP;
    status = TWD_SetParam(pAdmCtrl->pRsn->hTWD, &tTwdParam);

	return status;

}