本文整理汇总了C++中HAL_STATUS_SUCCESS函数的典型用法代码示例。如果您正苦于以下问题:C++ HAL_STATUS_SUCCESS函数的具体用法?C++ HAL_STATUS_SUCCESS怎么用?C++ HAL_STATUS_SUCCESS使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了HAL_STATUS_SUCCESS函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: oemData_SendMBOemDataReq
/* ---------------------------------------------------------------------------
\fn oemData_SendMBOemDataReq
\brief Request an OEM DATA REQ to be passed down to PE
\param pMac:
\param pOemDataReq: Pointer to the oem data request
\return eHalStatus
-------------------------------------------------------------------------------*/
eHalStatus oemData_SendMBOemDataReq(tpAniSirGlobal pMac, tOemDataReq *pOemDataReq)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tSirOemDataReq* pMsg;
tANI_U16 msgLen;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, pOemDataReq->sessionId );
smsLog(pMac, LOGW, "OEM_DATA: entering Function %s", __func__);
msgLen = (tANI_U16)(sizeof(tSirOemDataReq));
status = palAllocateMemory(pMac->hHdd, (void**)&pMsg, msgLen);
if(HAL_STATUS_SUCCESS(status))
{
palZeroMemory(pMac->hHdd, pMsg, msgLen);
pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_OEM_DATA_REQ);
palCopyMemory(pMac->hHdd, pMsg->selfMacAddr, pSession->selfMacAddr, sizeof(tSirMacAddr) );
status = palCopyMemory(pMac->hHdd, pMsg->oemDataReq, pOemDataReq->oemDataReq, OEM_DATA_REQ_SIZE);
if(HAL_STATUS_SUCCESS(status))
{
smsLog(pMac, LOGW, "OEM_DATA: sending message to pe%s", __func__);
status = palSendMBMessage(pMac->hHdd, pMsg);
}
else
{
palFreeMemory(pMac->hHdd, pMsg);
}
}
smsLog(pMac, LOGW, "OEM_DATA: exiting Function %s", __func__);
return status;
}
示例2: csrTdlsProcessAddSta
eHalStatus csrTdlsProcessAddSta( tpAniSirGlobal pMac, tSmeCmd *cmd )
{
tTdlsAddStaCmdInfo *tdlsAddStaCmdInfo = &cmd->u.tdlsCmd.u.tdlsAddStaCmdInfo ;
tSirTdlsAddStaReq *tdlsAddStaReq = NULL ;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, cmd->sessionId );
eHalStatus status = eHAL_STATUS_FAILURE;
if (NULL == pSession->pConnectBssDesc)
{
smsLog( pMac, LOGE, FL("BSS description is not present") );
return eHAL_STATUS_FAILURE;
}
status = palAllocateMemory( pMac->hHdd, (void **)&tdlsAddStaReq,
(sizeof(tSirTdlsAddStaReq) ) );
if (!HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL("alloc failed") );
VOS_ASSERT(0) ;
return status ;
}
tdlsAddStaReq->sessionId = cmd->sessionId;
tdlsAddStaReq->tdlsAddOper = tdlsAddStaCmdInfo->tdlsAddOper;
//Using dialog as transactionId. This can be used to match response with request
tdlsAddStaReq->transactionId = 0;
palCopyMemory(pMac->hHdd, tdlsAddStaReq->bssid,
pSession->pConnectBssDesc->bssId, sizeof (tSirMacAddr));
palCopyMemory(pMac->hHdd, tdlsAddStaReq->peerMac,
tdlsAddStaCmdInfo->peerMac, sizeof(tSirMacAddr)) ;
tdlsAddStaReq->capability = tdlsAddStaCmdInfo->capability;
tdlsAddStaReq->uapsd_queues = tdlsAddStaCmdInfo->uapsdQueues;
tdlsAddStaReq->max_sp = tdlsAddStaCmdInfo->maxSp;
palCopyMemory(pMac->hHdd, tdlsAddStaReq->extn_capability,
tdlsAddStaCmdInfo->extnCapability,
SIR_MAC_MAX_EXTN_CAP);
tdlsAddStaReq->htcap_present = tdlsAddStaCmdInfo->htcap_present;
palCopyMemory(pMac->hHdd, &tdlsAddStaReq->htCap,
&tdlsAddStaCmdInfo->HTCap, sizeof(tdlsAddStaCmdInfo->HTCap));
tdlsAddStaReq->vhtcap_present = tdlsAddStaCmdInfo->vhtcap_present;
palCopyMemory(pMac->hHdd, &tdlsAddStaReq->vhtCap,
&tdlsAddStaCmdInfo->VHTCap, sizeof(tdlsAddStaCmdInfo->VHTCap));
tdlsAddStaReq->supported_rates_length = tdlsAddStaCmdInfo->supportedRatesLen;
palCopyMemory(pMac->hHdd, &tdlsAddStaReq->supported_rates,
tdlsAddStaCmdInfo->supportedRates, tdlsAddStaCmdInfo->supportedRatesLen);
// Send the request to PE.
smsLog( pMac, LOGE, "sending TDLS Add Sta req to PE " );
status = tdlsSendMessage(pMac, eWNI_SME_TDLS_ADD_STA_REQ,
(void *)tdlsAddStaReq , sizeof(tSirTdlsAddStaReq)) ;
if(!HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL("Failed to send request to MAC"));
}
return status;
}
示例3: csrTdlsProcessSendMgmt
eHalStatus csrTdlsProcessSendMgmt( tpAniSirGlobal pMac, tSmeCmd *cmd )
{
tTdlsSendMgmtCmdInfo *tdlsSendMgmtCmdInfo = &cmd->u.tdlsCmd.u.tdlsSendMgmtCmdInfo ;
tSirTdlsSendMgmtReq *tdlsSendMgmtReq = NULL ;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, cmd->sessionId );
eHalStatus status = eHAL_STATUS_FAILURE;
if (NULL == pSession->pConnectBssDesc)
{
smsLog( pMac, LOGE, FL("BSS Description is not present") );
return eHAL_STATUS_FAILURE;
}
status = palAllocateMemory( pMac->hHdd, (void **)&tdlsSendMgmtReq,
(sizeof(tSirTdlsSendMgmtReq) + tdlsSendMgmtCmdInfo->len ) );
if (!HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL("alloc failed") );
VOS_ASSERT(0) ;
return status ;
}
tdlsSendMgmtReq->sessionId = cmd->sessionId;
//Using dialog as transactionId. This can be used to match response with request
tdlsSendMgmtReq->transactionId = tdlsSendMgmtCmdInfo->dialog;
tdlsSendMgmtReq->reqType = tdlsSendMgmtCmdInfo->frameType ;
tdlsSendMgmtReq->dialog = tdlsSendMgmtCmdInfo->dialog ;
tdlsSendMgmtReq->statusCode = tdlsSendMgmtCmdInfo->statusCode ;
tdlsSendMgmtReq->responder = tdlsSendMgmtCmdInfo->responder;
palCopyMemory(pMac->hHdd, tdlsSendMgmtReq->bssid,
pSession->pConnectBssDesc->bssId, sizeof (tSirMacAddr));
palCopyMemory(pMac->hHdd, tdlsSendMgmtReq->peerMac,
tdlsSendMgmtCmdInfo->peerMac, sizeof(tSirMacAddr)) ;
if(tdlsSendMgmtCmdInfo->len && tdlsSendMgmtCmdInfo->buf)
{
palCopyMemory(pMac->hHdd, tdlsSendMgmtReq->addIe, tdlsSendMgmtCmdInfo->buf,
tdlsSendMgmtCmdInfo->len);
}
// Send the request to PE.
smsLog( pMac, LOG1, "sending TDLS Mgmt Frame req to PE " );
status = tdlsSendMessage(pMac, eWNI_SME_TDLS_SEND_MGMT_REQ,
(void *)tdlsSendMgmtReq , sizeof(tSirTdlsSendMgmtReq)+tdlsSendMgmtCmdInfo->len) ;
if(!HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL("Failed to send request to MAC"));
}
if(tdlsSendMgmtCmdInfo->len && tdlsSendMgmtCmdInfo->buf)
{
//Done with the buf. Free it.
vos_mem_free( tdlsSendMgmtCmdInfo->buf );
tdlsSendMgmtCmdInfo->buf = NULL;
tdlsSendMgmtCmdInfo->len = 0;
}
return status;
}
示例4: csrTdlsProcessDelSta
eHalStatus csrTdlsProcessDelSta( tpAniSirGlobal pMac, tSmeCmd *cmd )
{
tTdlsDelStaCmdInfo *tdlsDelStaCmdInfo = &cmd->u.tdlsCmd.u.tdlsDelStaCmdInfo ;
tSirTdlsDelStaReq *tdlsDelStaReq = NULL ;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, cmd->sessionId );
eHalStatus status = eHAL_STATUS_FAILURE;
if (NULL == pSession)
{
smsLog( pMac, LOGE, FL("pSession is NULL"));
return eHAL_STATUS_FAILURE;
}
if (NULL == pSession->pConnectBssDesc)
{
smsLog( pMac, LOGE, FL("BSS description is not present") );
return eHAL_STATUS_FAILURE;
}
tdlsDelStaReq = vos_mem_malloc(sizeof(tSirTdlsDelStaReq));
if ( NULL == tdlsDelStaReq )
status = eHAL_STATUS_FAILURE;
else
status = eHAL_STATUS_SUCCESS;
if (!HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL("alloc failed") );
VOS_ASSERT(0) ;
return status ;
}
tdlsDelStaReq->sessionId = cmd->sessionId;
//Using dialog as transactionId. This can be used to match response with request
tdlsDelStaReq->transactionId = 0;
vos_mem_copy( tdlsDelStaReq->bssid,
pSession->pConnectBssDesc->bssId, sizeof (tSirMacAddr));
vos_mem_copy( tdlsDelStaReq->peerMac,
tdlsDelStaCmdInfo->peerMac, sizeof(tSirMacAddr)) ;
// Send the request to PE.
#ifdef WLAN_FEATURE_TDLS_DEBUG
smsLog( pMac, LOGE,
#else
smsLog( pMac, LOG1,
#endif
"sending TDLS Del Sta "MAC_ADDRESS_STR" req to PE",
MAC_ADDR_ARRAY(tdlsDelStaCmdInfo->peerMac));
status = tdlsSendMessage(pMac, eWNI_SME_TDLS_DEL_STA_REQ,
(void *)tdlsDelStaReq , sizeof(tSirTdlsDelStaReq)) ;
if(!HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL("Failed to send request to MAC"));
}
return status;
}
示例5: csrTdlsProcessDelSta
eHalStatus csrTdlsProcessDelSta( tpAniSirGlobal pMac, tSmeCmd *cmd )
{
tTdlsDelStaCmdInfo *tdlsDelStaCmdInfo = &cmd->u.tdlsCmd.u.tdlsDelStaCmdInfo ;
tSirTdlsDelStaReq *tdlsDelStaReq = NULL ;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, cmd->sessionId );
eHalStatus status = eHAL_STATUS_FAILURE;
if (NULL == pSession)
{
return eHAL_STATUS_FAILURE;
}
if (NULL == pSession->pConnectBssDesc)
{
smsLog( pMac, LOGE, FL("BSS description is not present") );
return eHAL_STATUS_FAILURE;
}
status = palAllocateMemory( pMac->hHdd, (void **)&tdlsDelStaReq,
(sizeof(tSirTdlsDelStaReq) ) );
if (!HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL("alloc failed") );
VOS_ASSERT(0) ;
return status ;
}
tdlsDelStaReq->sessionId = cmd->sessionId;
//Using dialog as transactionId. This can be used to match response with request
tdlsDelStaReq->transactionId = 0;
palCopyMemory(pMac->hHdd, tdlsDelStaReq->bssid,
pSession->pConnectBssDesc->bssId, sizeof (tSirMacAddr));
palCopyMemory(pMac->hHdd, tdlsDelStaReq->peerMac,
tdlsDelStaCmdInfo->peerMac, sizeof(tSirMacAddr)) ;
// Send the request to PE.
#ifdef WLAN_FEATURE_TDLS_DEBUG
smsLog( pMac, LOGE,
#else
smsLog( pMac, LOG1,
#endif
"sending TDLS Del Sta %02x:%02x:%02x:%02x:%02x:%02x req to PE",
tdlsDelStaCmdInfo->peerMac[0], tdlsDelStaCmdInfo->peerMac[1], tdlsDelStaCmdInfo->peerMac[2],
tdlsDelStaCmdInfo->peerMac[3], tdlsDelStaCmdInfo->peerMac[4], tdlsDelStaCmdInfo->peerMac[5]);
status = tdlsSendMessage(pMac, eWNI_SME_TDLS_DEL_STA_REQ,
(void *)tdlsDelStaReq , sizeof(tSirTdlsDelStaReq)) ;
if(!HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL("Failed to send request to MAC"));
}
return status;
}
示例6: csrTdlsProcessCmd
/*
* commands received from CSR
*/
eHalStatus csrTdlsProcessCmd(tpAniSirGlobal pMac, tSmeCmd *cmd)
{
eSmeCommandType cmdType = cmd->command ;
tANI_BOOLEAN status = eANI_BOOLEAN_TRUE;
switch(cmdType)
{
case eSmeCommandTdlsSendMgmt:
{
status = csrTdlsProcessSendMgmt( pMac, cmd );
if(HAL_STATUS_SUCCESS( status ) )
{
status = eANI_BOOLEAN_FALSE ;
}
}
break ;
case eSmeCommandTdlsAddPeer:
{
status = csrTdlsProcessAddSta( pMac, cmd );
if(HAL_STATUS_SUCCESS( status ) )
{
status = eANI_BOOLEAN_FALSE ;
}
}
break;
case eSmeCommandTdlsDelPeer:
{
status = csrTdlsProcessDelSta( pMac, cmd );
if(HAL_STATUS_SUCCESS( status ) )
{
status = eANI_BOOLEAN_FALSE ;
}
}
break;
case eSmeCommandTdlsLinkEstablish:
{
status = csrTdlsProcessLinkEstablish( pMac, cmd );
if(HAL_STATUS_SUCCESS( status ) )
{
status = eANI_BOOLEAN_FALSE ;
}
}
break;
default:
{
/* TODO: Add default handling */
break ;
}
}
return status ;
}
开发者ID:dianlujitao,项目名称:platform_vendor_qcom-opensource_wlan_qcacld-2.0,代码行数:54,代码来源:csrTdlsProcess.c
示例7: oemData_ProcessOemDataReqCommand
/* ---------------------------------------------------------------------------
\fn oemData_ProcessOemDataReqCommand
\brief This function is called by the smeProcessCommand when the case hits
eSmeCommandOemDataReq
\return eHalStatus
-------------------------------------------------------------------------------*/
eHalStatus oemData_ProcessOemDataReqCommand(tpAniSirGlobal pMac, tSmeCmd *pOemDataReqCmd)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
//check if the system is in proper mode of operation for
//oem data req/rsp to be functional. Currently, concurrency is not
//supported and the driver must be operational only as
//STA for oem data req/rsp to be functional. We return an invalid
//mode flag if it is operational as any one of the following
//in any of the active sessions
//1. AP Mode
//2. IBSS Mode
//3. BTAMP Mode ...
if(eHAL_STATUS_SUCCESS == oemData_IsOemDataReqAllowed(pMac))
{
smsLog(pMac, LOG1, "%s: OEM_DATA REQ allowed in the current mode", __func__);
pMac->oemData.oemDataReqActive = eANI_BOOLEAN_TRUE;
status = oemData_SendMBOemDataReq(pMac, &(pOemDataReqCmd->u.oemDataCmd.oemDataReq));
}
else
{
smsLog(pMac, LOG1, "%s: OEM_DATA REQ not allowed in the current mode", __func__);
status = eHAL_STATUS_FAILURE;
}
if(!HAL_STATUS_SUCCESS(status))
{
smsLog(pMac, LOG1, "%s: OEM_DATA Failure, Release command", __func__);
oemData_ReleaseOemDataReqCommand(pMac, pOemDataReqCmd, eOEM_DATA_REQ_INVALID_MODE);
pMac->oemData.oemDataReqActive = eANI_BOOLEAN_FALSE;
}
return status;
}
示例8: oemData_SendMBOemDataReq
/* ---------------------------------------------------------------------------
\fn oemData_SendMBOemDataReq
\brief Request an OEM DATA REQ to be passed down to PE
\param pMac:
\param pOemDataReq: Pointer to the oem data request
\return eHalStatus
-------------------------------------------------------------------------------*/
eHalStatus oemData_SendMBOemDataReq(tpAniSirGlobal pMac, tOemDataReq *pOemDataReq)
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tSirOemDataReq* pMsg;
tANI_U16 msgLen;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, pOemDataReq->sessionId );
smsLog(pMac, LOGW, "OEM_DATA: entering Function %s", __func__);
msgLen = (tANI_U16)(sizeof(tSirOemDataReq));
pMsg = vos_mem_malloc(msgLen);
if ( NULL == pMsg )
status = eHAL_STATUS_FAILURE;
else
status = eHAL_STATUS_SUCCESS;
if(HAL_STATUS_SUCCESS(status))
{
vos_mem_set(pMsg, msgLen, 0);
pMsg->messageType = pal_cpu_to_be16((tANI_U16)eWNI_SME_OEM_DATA_REQ);
pMsg->messageLen = pal_cpu_to_be16(msgLen);
vos_mem_copy(pMsg->selfMacAddr, pSession->selfMacAddr, sizeof(tSirMacAddr) );
vos_mem_copy(pMsg->oemDataReq, pOemDataReq->oemDataReq, OEM_DATA_REQ_SIZE);
smsLog(pMac, LOGW, "OEM_DATA: sending message to pe%s", __func__);
status = palSendMBMessage(pMac->hHdd, pMsg);
}
smsLog(pMac, LOGW, "OEM_DATA: exiting Function %s", __func__);
return status;
}
示例9: tdlsSaveTdlsPeerInfo
static eHalStatus tdlsSaveTdlsPeerInfo(tpAniSirGlobal pMac,
tSirTdlsPeerInfo *disPeerInfo)
{
tCsrTdlsPeerLinkinfo *peerInfo = NULL ;
tCsrTdlsCtxStruct *disInfo = &pMac->tdlsCtx ;
eHalStatus status = eHAL_STATUS_FAILURE ;
status = palAllocateMemory( pMac->hHdd, (void **)&peerInfo,
sizeof(tCsrTdlsPeerLinkinfo));
if (HAL_STATUS_SUCCESS(status))
{
palZeroMemory(pMac->hHdd, &peerInfo->tdlsDisPeerInfo,
sizeof(tSirTdlsPeerInfo));
palCopyMemory(pMac->hHdd, &peerInfo->tdlsDisPeerInfo, disPeerInfo,
sizeof(tSirTdlsPeerInfo));
disInfo->tdlsPeerCount++ ;
csrLLInsertTail( &disInfo->tdlsPotentialPeerList,
&peerInfo->tdlsPeerStaLink, LL_ACCESS_LOCK );
}
return status ;
}
示例10: csrTdlsSendMgmtReq
/*
* TDLS request API, called from HDD to send a TDLS frame
* in SME/CSR and send message to PE to trigger TDLS discovery procedure.
*/
eHalStatus csrTdlsSendMgmtReq(tHalHandle hHal, tANI_U8 sessionId, tCsrTdlsSendMgmt *tdlsSendMgmt)
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
tSmeCmd *tdlsSendMgmtCmd ;
eHalStatus status = eHAL_STATUS_FAILURE ;
//If connected and in Infra. Only then allow this
if( CSR_IS_SESSION_VALID( pMac, sessionId ) &&
csrIsConnStateConnectedInfra( pMac, sessionId ) &&
(NULL != tdlsSendMgmt) )
{
tdlsSendMgmtCmd = csrGetCommandBuffer(pMac) ;
if(tdlsSendMgmtCmd)
{
tTdlsSendMgmtCmdInfo *tdlsSendMgmtCmdInfo =
&tdlsSendMgmtCmd->u.tdlsCmd.u.tdlsSendMgmtCmdInfo ;
tdlsSendMgmtCmd->sessionId = sessionId;
tdlsSendMgmtCmdInfo->frameType = tdlsSendMgmt->frameType ;
tdlsSendMgmtCmdInfo->dialog = tdlsSendMgmt->dialog ;
tdlsSendMgmtCmdInfo->statusCode = tdlsSendMgmt->statusCode ;
tdlsSendMgmtCmdInfo->responder = tdlsSendMgmt->responder;
tdlsSendMgmtCmdInfo->peerCapability = tdlsSendMgmt->peerCapability;
vos_mem_copy(tdlsSendMgmtCmdInfo->peerMac,
tdlsSendMgmt->peerMac, sizeof(tSirMacAddr)) ;
if( (0 != tdlsSendMgmt->len) && (NULL != tdlsSendMgmt->buf) )
{
tdlsSendMgmtCmdInfo->buf = vos_mem_malloc(tdlsSendMgmt->len);
if ( NULL == tdlsSendMgmtCmdInfo->buf )
status = eHAL_STATUS_FAILURE;
else
status = eHAL_STATUS_SUCCESS;
if(!HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL("Alloc Failed") );
VOS_ASSERT(0) ;
return status ;
}
vos_mem_copy(tdlsSendMgmtCmdInfo->buf,
tdlsSendMgmt->buf, tdlsSendMgmt->len );
tdlsSendMgmtCmdInfo->len = tdlsSendMgmt->len;
}
else
{
tdlsSendMgmtCmdInfo->buf = NULL;
tdlsSendMgmtCmdInfo->len = 0;
}
tdlsSendMgmtCmd->command = eSmeCommandTdlsSendMgmt ;
tdlsSendMgmtCmd->u.tdlsCmd.size = sizeof(tTdlsSendMgmtCmdInfo) ;
smePushCommand(pMac, tdlsSendMgmtCmd, FALSE) ;
status = eHAL_STATUS_SUCCESS ;
}
}
return status ;
}
示例11: sme_GetRICIEs
/*--------------------------------------------------------------------------
*
* SME now sends the RIC IEs up to the supplicant.
* The supplicant will then proceed to send down the
* Reassoc Req.
*
*------------------------------------------------------------------------*/
void sme_GetRICIEs( tHalHandle hHal, tANI_U8 *ric_ies, tANI_U32 ric_ies_ip_len,
tANI_U32 *ric_ies_length )
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
eHalStatus status = eHAL_STATUS_FAILURE;
*ric_ies_length = 0;
status = sme_AcquireGlobalLock( &pMac->sme );
if (!( HAL_STATUS_SUCCESS( status )))
return;
/* All or nothing */
if (pMac->ft.ftSmeContext.psavedFTPreAuthRsp->ric_ies_length >
ric_ies_ip_len)
{
sme_ReleaseGlobalLock( &pMac->sme );
return;
}
vos_mem_copy(ric_ies, pMac->ft.ftSmeContext.psavedFTPreAuthRsp->ric_ies,
pMac->ft.ftSmeContext.psavedFTPreAuthRsp->ric_ies_length);
*ric_ies_length = pMac->ft.ftSmeContext.psavedFTPreAuthRsp->ric_ies_length;
#ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG
smsLog( pMac, LOGE, FL(" Filled ric ies = %d\n"), *ric_ies_length);
#endif
sme_ReleaseGlobalLock( &pMac->sme );
return;
}
示例12: csrTdlsProcessLinkEstablish
eHalStatus csrTdlsProcessLinkEstablish( tpAniSirGlobal pMac, tSmeCmd *cmd )
{
tTdlsLinkEstablishCmdInfo *tdlsLinkEstablishCmdInfo = &cmd->u.tdlsCmd.u.tdlsLinkEstablishCmdInfo ;
tSirTdlsLinkEstablishReq *tdlsLinkEstablishReq = NULL ;
eHalStatus status = eHAL_STATUS_FAILURE;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, cmd->sessionId );
if (NULL == pSession)
{
smsLog( pMac, LOGE, FL("pSession is NULL"));
return eHAL_STATUS_FAILURE;
}
status = palAllocateMemory( pMac->hHdd, (void **)&tdlsLinkEstablishReq,
(sizeof(tSirTdlsLinkEstablishReq) ) );
if (!HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL("alloc failed \n") );
VOS_ASSERT(0) ;
return status ;
}
tdlsLinkEstablishReq->sessionId = cmd->sessionId;
tdlsLinkEstablishReq->transactionId = 0;
palCopyMemory(pMac->hHdd, tdlsLinkEstablishReq->peerMac,
tdlsLinkEstablishCmdInfo->peerMac, sizeof(tSirMacAddr));
palCopyMemory(pMac->hHdd, tdlsLinkEstablishReq->bssid, pSession->pConnectBssDesc->bssId,
sizeof (tSirMacAddr));
tdlsLinkEstablishReq->isBufSta = tdlsLinkEstablishCmdInfo->isBufSta;
tdlsLinkEstablishReq->isResponder= tdlsLinkEstablishCmdInfo->isResponder;
tdlsLinkEstablishReq->uapsdQueues= tdlsLinkEstablishCmdInfo->uapsdQueues;
tdlsLinkEstablishReq->maxSp= tdlsLinkEstablishCmdInfo->maxSp;
smsLog( pMac, LOGE, "sending TDLS Link Establish Request to PE \n" );
status = tdlsSendMessage(pMac, eWNI_SME_TDLS_LINK_ESTABLISH_REQ,
(void *)tdlsLinkEstablishReq,
sizeof(tSirTdlsLinkEstablishReq));
if (!HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL("Failed to send request to MAC\n"));
}
return status;
}
示例13: csrTdlsProcessLinkEstablish
eHalStatus csrTdlsProcessLinkEstablish( tpAniSirGlobal pMac, tSmeCmd *cmd )
{
tTdlsLinkEstablishCmdInfo *tdlsLinkEstablishCmdInfo = &cmd->u.tdlsCmd.u.tdlsLinkEstablishCmdInfo ;
tSirTdlsLinkEstablishReq *tdlsLinkEstablishReq = NULL ;
eHalStatus status = eHAL_STATUS_FAILURE;
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, cmd->sessionId );
if (NULL == pSession)
{
smsLog( pMac, LOGE, FL("pSession is NULL"));
return eHAL_STATUS_FAILURE;
}
tdlsLinkEstablishReq = vos_mem_malloc(sizeof(tSirTdlsLinkEstablishReq));
if (tdlsLinkEstablishReq == NULL)
{
smsLog( pMac, LOGE, FL("alloc failed \n") );
VOS_ASSERT(0) ;
return status ;
}
tdlsLinkEstablishReq->sessionId = cmd->sessionId;
//Using dialog as transactionId. This can be used to match response with request
tdlsLinkEstablishReq->transactionId = 0;
vos_mem_copy(tdlsLinkEstablishReq->peerMac,
tdlsLinkEstablishCmdInfo->peerMac, sizeof(tSirMacAddr));
vos_mem_copy(tdlsLinkEstablishReq->bssid, pSession->pConnectBssDesc->bssId,
sizeof (tSirMacAddr));
vos_mem_copy(tdlsLinkEstablishReq->supportedChannels,
tdlsLinkEstablishCmdInfo->supportedChannels,
tdlsLinkEstablishCmdInfo->supportedChannelsLen);
tdlsLinkEstablishReq->supportedChannelsLen =
tdlsLinkEstablishCmdInfo->supportedChannelsLen;
vos_mem_copy(tdlsLinkEstablishReq->supportedOperClasses,
tdlsLinkEstablishCmdInfo->supportedOperClasses,
tdlsLinkEstablishCmdInfo->supportedOperClassesLen);
tdlsLinkEstablishReq->supportedOperClassesLen =
tdlsLinkEstablishCmdInfo->supportedOperClassesLen;
tdlsLinkEstablishReq->isBufSta = tdlsLinkEstablishCmdInfo->isBufSta;
tdlsLinkEstablishReq->isResponder= tdlsLinkEstablishCmdInfo->isResponder;
tdlsLinkEstablishReq->uapsdQueues= tdlsLinkEstablishCmdInfo->uapsdQueues;
tdlsLinkEstablishReq->maxSp= tdlsLinkEstablishCmdInfo->maxSp;
tdlsLinkEstablishReq->isOffChannelSupported =
tdlsLinkEstablishCmdInfo->isOffChannelSupported;
// Send the request to PE.
smsLog( pMac, LOGE, "sending TDLS Link Establish Request to PE \n" );
status = tdlsSendMessage(pMac, eWNI_SME_TDLS_LINK_ESTABLISH_REQ,
(void *)tdlsLinkEstablishReq,
sizeof(tSirTdlsLinkEstablishReq));
if (!HAL_STATUS_SUCCESS( status ) )
{
smsLog( pMac, LOGE, FL("Failed to send request to MAC\n"));
}
return status;
}
示例14: sme_p2pOpen
eHalStatus sme_p2pOpen( tHalHandle hHal )
{
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
eHalStatus status = eHAL_STATUS_SUCCESS;
//If static structure is too big, Need to change this function to allocate memory dynamically
vos_mem_zero(&pMac->p2pContext, sizeof( tp2pContext ));
if(!HAL_STATUS_SUCCESS(status))
{
sme_p2pClose(hHal);
}
return status;
}
示例15: sme_GetFTPreAuthResponse
/*--------------------------------------------------------------------------
*
* HDD Interface to SME. SME now sends the Auth 2 and RIC IEs up to the supplicant.
* The supplicant will then proceed to send down the
* Reassoc Req.
*
*------------------------------------------------------------------------*/
void sme_GetFTPreAuthResponse( tHalHandle hHal, tANI_U32 sessionId, tANI_U8 *ft_ies,
tANI_U32 ft_ies_ip_len, tANI_U16 *ft_ies_length )
{
tpAniSirGlobal pMac = PMAC_STRUCT( hHal );
tCsrRoamSession *pSession = CSR_GET_SESSION( pMac, sessionId );
eHalStatus status = eHAL_STATUS_FAILURE;
if (!pSession)
{
smsLog( pMac, LOGE, FL("pSession is NULL"));
return;
}
*ft_ies_length = 0;
status = sme_AcquireGlobalLock( &pMac->sme );
if (!( HAL_STATUS_SUCCESS( status )))
return;
/* All or nothing - proceed only if both BSSID and FT IE fit */
if((ANI_MAC_ADDR_SIZE +
pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length) > ft_ies_ip_len)
{
sme_ReleaseGlobalLock( &pMac->sme );
return;
}
// hdd needs to pack the bssid also along with the
// auth response to supplicant
vos_mem_copy(ft_ies, pSession->ftSmeContext.preAuthbssId, ANI_MAC_ADDR_SIZE);
// Copy the auth resp FTIEs
vos_mem_copy(&(ft_ies[ANI_MAC_ADDR_SIZE]),
pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies,
pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length);
*ft_ies_length = ANI_MAC_ADDR_SIZE +
pSession->ftSmeContext.psavedFTPreAuthRsp->ft_ies_length;
pSession->ftSmeContext.FTState = eFT_REASSOC_REQ_WAIT;
#ifdef WLAN_FEATURE_VOWIFI_11R_DEBUG
smsLog( pMac, LOG1, FL(" Filled auth resp = %d"), *ft_ies_length);
#endif
sme_ReleaseGlobalLock( &pMac->sme );
return;
}