本文整理汇总了C++中os_memoryCopy函数 的典型用法代码示例。如果您正苦于以下问题:C++ os_memoryCopy函数的具体用法?C++ os_memoryCopy怎么用?C++ os_memoryCopy使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了os_memoryCopy函数 的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: keyDeriveWep_derive
TI_STATUS keyDeriveWep_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
{
TI_STATUS status;
securityKeys_t key;
if (pEncodedKey==NULL)
{
return NOK;
}
if ((pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_40) &&
(pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_104) &&
(pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_232))
{
WLAN_REPORT_ERROR(pKeyDerive->hReport, RSN_MODULE_LOG,
("DeriveWep_derive: ERROR: it is not WEP key lenghth (len=%d) !!!\n", pEncodedKey->keyLen));
return NOK;
}
key.keyType = WEP_KEY;
key.keyIndex = (UINT8)pEncodedKey->keyId;
key.encLen = (UINT16)pEncodedKey->keyLen;
os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, pEncodedKey->pData, pEncodedKey->keyLen);
status = pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key);
if (status == OK)
{
os_memoryCopy(pKeyDerive->hOs, &pKeyDerive->key, pEncodedKey, sizeof(encodedKeyMaterial_t));
}
return status;
}
开发者ID:0omega, 项目名称:platform_system_wlan_ti, 代码行数:32, 代码来源:keyDeriveWep.c
示例2: keyDeriveWep_derive
TI_STATUS keyDeriveWep_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
{
TI_STATUS status;
TSecurityKeys key;
if (pEncodedKey==NULL) {
return TI_NOK;
}
if ((pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_40) &&
(pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_104) &&
(pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_232)) {
return TI_NOK;
}
key.keyType = KEY_WEP;
key.keyIndex = (TI_UINT8)pEncodedKey->keyId;
key.encLen = (TI_UINT16)pEncodedKey->keyLen;
os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, pEncodedKey->pData, pEncodedKey->keyLen);
status = pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key);
if (status == TI_OK) {
os_memoryCopy(pKeyDerive->hOs, &pKeyDerive->key, pEncodedKey, sizeof(encodedKeyMaterial_t));
}
return status;
}
开发者ID:IdeosDev, 项目名称:vendor_ti_wlan, 代码行数:27, 代码来源:keyDeriveWep.c
示例3: txCtrlParams_getParam
/***************************************************************************
* txCtrlParams_getParam
****************************************************************************
* DESCRIPTION: Get a specific parameter by an external user application.
*
* OUTPUT: pParamInfo - structure which include the value of
* the requested parameter
***************************************************************************/
TI_STATUS txCtrlParams_getParam(TI_HANDLE hTxCtrl, paramInfo_t *pParamInfo)
{
txCtrl_t *pTxCtrl = (txCtrl_t *)hTxCtrl;
TI_UINT32 ac;
if(pTxCtrl == NULL) { /* check handle validity */
return TI_NOK;
}
switch (pParamInfo->paramType) {
case TX_CTRL_COUNTERS_PARAM:
/* Convert total-delays units from usec to mSec. */
for(ac = 0 ; ac < MAX_NUM_OF_AC ; ac++) {
pTxCtrl->txDataCounters[ac].SumTotalDelayMs = pTxCtrl->SumTotalDelayUs[ac] / 1000;
}
os_memoryCopy( pTxCtrl->hOs, pParamInfo->content.pTxDataCounters, &(pTxCtrl->txDataCounters[0]),
sizeof(TTxDataCounters) * MAX_NUM_OF_AC);
pParamInfo->paramLength = sizeof(TTxDataCounters) * MAX_NUM_OF_AC;
break;
case TX_CTRL_GET_DATA_FRAME_COUNTER:
pParamInfo->content.txPacketsCount = 0;
for (ac = 0; ac < MAX_NUM_OF_AC; ac++)
pParamInfo->content.txPacketsCount += pTxCtrl->txDataCounters[ac].XmitOk;
break;
case TX_CTRL_REPORT_TS_STATISTICS:
ac = pParamInfo->content.tsMetricsCounters.acID;
os_memoryCopy(pTxCtrl->hOs,
pParamInfo->content.tsMetricsCounters.pTxDataCounters,
&(pTxCtrl->txDataCounters[ac]),
sizeof(TTxDataCounters));
os_memoryZero(pTxCtrl->hOs, &(pTxCtrl->txDataCounters[ac]), sizeof(TTxDataCounters));
break;
case TX_CTRL_GENERIC_ETHERTYPE:
pParamInfo->content.txGenericEthertype = pTxCtrl->genericEthertype;
break;
case TX_CTRL_GET_DATA_LINK_COUNTER:
{
TI_UINT32 uHlid;
for (uHlid = 0; uHlid < WLANLINKS_MAX_LINKS; uHlid++)
{
pParamInfo->content.linkDataCounters[uHlid].sentPkts = pTxCtrl->dbgLinkCounters.dbgNumPktsSent[uHlid];
pParamInfo->content.linkDataCounters[uHlid].sentBytes = pTxCtrl->dbgLinkCounters.dbgNumBytesSent[uHlid];
pParamInfo->content.linkDataCounters[uHlid].sentPktsError = pTxCtrl->dbgLinkCounters.dbgNumPktsError[uHlid];
}
}
break;
default:
TRACE0(pTxCtrl->hReport, REPORT_SEVERITY_ERROR, ": PARAMETER NOT SUPPORTED\n");
return PARAM_NOT_SUPPORTED;
break;
}
return TI_OK;
}
开发者ID:3ig, 项目名称:Xperia-2011-Official-Kernel-Sources, 代码行数:67, 代码来源:txCtrlParams.c
示例4: cmdBld_CmdIeSetKey
/****************************************************************************
* cmdBld_CmdIeSetKey()
****************************************************************************
* DESCRIPTION: Construct the SetKey command fileds and send it to the mailbox
*
* INPUTS:
* Action - add/remove key
* MacAddr - relevant only for mapping keys
* KeySize - key size
* KeyType - default/mapping/TKIP
* KeyId - relevant only for default keys
* Key - key data
*
* OUTPUT: None
*
* RETURNS: TI_OK or TI_NOK
****************************************************************************/
TI_STATUS cmdBld_CmdIeSetKey (TI_HANDLE hCmdBld,
TI_UINT32 action,
TI_UINT8 *pMacAddr,
TI_UINT32 uKeySize,
TI_UINT32 uKeyType,
TI_UINT32 uKeyId,
TI_UINT8 *pKey,
TI_UINT32 uSecuritySeqNumLow,
TI_UINT32 uSecuritySeqNumHigh,
void *fCb,
TI_HANDLE hCb)
{
TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
SetKey_t AcxCmd_SetKey;
SetKey_t *pCmd = &AcxCmd_SetKey;
os_memoryZero (pCmdBld->hOs, (void *)pCmd, sizeof(*pCmd));
MAC_COPY (pCmd->addr, pMacAddr);
if (uKeySize > MAX_KEY_SIZE)
{
os_memoryCopy (pCmdBld->hOs, (void *)pCmd->key, (void *)pKey, MAX_KEY_SIZE);
}
else
{
os_memoryCopy (pCmdBld->hOs, (void *)pCmd->key, (void *)pKey, uKeySize);
}
pCmd->action = ENDIAN_HANDLE_WORD((TI_UINT16)action);
pCmd->keySize = (TI_UINT8)uKeySize;
pCmd->type = (TI_UINT8)uKeyType;
pCmd->id = (TI_UINT8)uKeyId;
pCmd->ssidProfile = 0;
/*
* Preserve TKIP/AES security sequence number after recovery.
* Note that our STA Tx is currently using only one sequence-counter
* for all ACs (unlike the Rx which is separated per AC).
*/
pCmd->AcSeqNum16[0] = ENDIAN_HANDLE_WORD((TI_UINT16)uSecuritySeqNumLow);
pCmd->AcSeqNum16[1] = 0;
pCmd->AcSeqNum16[2] = 0;
pCmd->AcSeqNum16[3] = 0;
pCmd->AcSeqNum32[0] = ENDIAN_HANDLE_LONG(uSecuritySeqNumHigh);
pCmd->AcSeqNum32[1] = 0;
pCmd->AcSeqNum32[2] = 0;
pCmd->AcSeqNum32[3] = 0;
TRACE6(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "Addr: %02x:%02x:%02x:%02x:%02x:%02x\n", pCmd->addr[0],pCmd->addr[1],pCmd->addr[2],pCmd->addr[3],pCmd->addr[4],pCmd->addr[5]);
TRACE7(pCmdBld->hReport, REPORT_SEVERITY_INFORMATION, "Action=%x,keySize=0x%x,type=%x, id=%x, ssidProfile=%x, AcSeqNum16[0]=%x, AcSeqNum32[0]=%x\n", pCmd->action,pCmd->keySize, pCmd->type,pCmd->id,pCmd->ssidProfile,pCmd->AcSeqNum16[0],pCmd->AcSeqNum32[0] );
return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_SET_KEYS, (char *)pCmd, sizeof(*pCmd), fCb, hCb, NULL);
}
开发者ID:aleho, 项目名称:ti_wilink, 代码行数:74, 代码来源:CmdBldCmdIE.c
示例5: powerMgrKL_setParam
/**
* \fn powerMgrKL_setParam
* \brief Handles a parametr change from user-mode
*
* Handles addition / removal of a template and global enable / disable flag
*
* \param hPowerMgrKL - handle to the power-manager keep-alive object
* \param pParam - A pointer to the paramter being set
* \return TI_OK if succesful, TI_NOK otherwise
* \sa powerMgrKL_start, powerMgrKL_stop
*/
TI_STATUS powerMgrKL_setParam (TI_HANDLE hPowerMgrKL, paramInfo_t *pParam)
{
TPowerMgrKL *pPowerMgrKL = (TPowerMgrKL*)hPowerMgrKL;
TI_UINT32 uIndex;
TKeepAliveTemplate *pNewTmpl;
TI_STATUS status = TI_OK;
switch (pParam->paramType) {
/* global keep-alive enable / disable flag */
case POWER_MGR_KEEP_ALIVE_ENA_DIS:
pPowerMgrKL->tCurrentConfig.enaDisFlag = pParam->content.powerMgrKeepAliveEnaDis;
return TWD_CfgKeepAliveEnaDis(pPowerMgrKL->hTWD,
(TI_UINT8)pParam->content.powerMgrKeepAliveEnaDis);
break;
/* keep-alive template and parameters configuration */
case POWER_MGR_KEEP_ALIVE_ADD_REM:
pNewTmpl = pParam->content.pPowerMgrKeepAliveTemplate;
uIndex = pNewTmpl->keepAliveParams.index;
/* if STA is connected */
if (TI_TRUE == pPowerMgrKL->bConnected) {
/* if keep-alive is already configured for this index */
if (TI_TRUE == pPowerMgrKL->tCurrentConfig.templates[ uIndex ].keepAliveParams.enaDisFlag) {
/* disable previous keep-alive */
pPowerMgrKL->tCurrentConfig.templates[ uIndex ].keepAliveParams.enaDisFlag = TI_FALSE;
status = TWD_CfgKeepAlive (pPowerMgrKL->hTWD, &(pPowerMgrKL->tCurrentConfig.templates[ uIndex ].keepAliveParams));
if (TI_OK != status) {
return status;
}
}
/* copy configuration */
os_memoryCopy (pPowerMgrKL->hOs, &(pPowerMgrKL->tCurrentConfig.templates[ uIndex ]),
pNewTmpl, sizeof (TKeepAliveTemplate));
/* configure keep-alive to the FW (through command builder */
return powerMgrKLConfigureMessage (hPowerMgrKL, uIndex);
}
/* STA disconnected */
else {
/* copy configuration */
os_memoryCopy (pPowerMgrKL->hOs, &(pPowerMgrKL->tCurrentConfig.templates[ uIndex ]),
pNewTmpl, sizeof (TKeepAliveTemplate));
}
return TI_OK;
break;
default:
return PARAM_NOT_SUPPORTED;
break;
}
}
开发者ID:IdeosDev, 项目名称:vendor_ti_wlan, 代码行数:66, 代码来源:PowerMgrKeepAlive.c
示例6: cmdBld_CmdIeSetKey
/****************************************************************************
* cmdBld_CmdIeSetKey()
****************************************************************************
* DESCRIPTION: Construct the SetKey command fileds and send it to the mailbox
*
* INPUTS:
* Action - add/remove key
* MacAddr - relevant only for mapping keys
* KeySize - key size
* KeyType - default/mapping/TKIP
* KeyId - relevant only for default keys
* Key - key data
*
* OUTPUT: None
*
* RETURNS: TI_OK or TI_NOK
****************************************************************************/
TI_STATUS cmdBld_CmdIeSetKey (TI_HANDLE hCmdBld,
TI_UINT32 action,
TI_UINT8 *pMacAddr,
TI_UINT32 uKeySize,
TI_UINT32 uKeyType,
TI_UINT32 uKeyId,
TI_UINT8 *pKey,
TI_UINT32 uSecuritySeqNumLow,
TI_UINT32 uSecuritySeqNumHigh,
void *fCb,
TI_HANDLE hCb)
{
TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
SetKey_t AcxCmd_SetKey;
SetKey_t *pCmd = &AcxCmd_SetKey;
os_memoryZero (pCmdBld->hOs, (void *)pCmd, sizeof(*pCmd));
MAC_COPY (pCmd->addr, pMacAddr);
if (uKeySize > MAX_KEY_SIZE) {
os_memoryCopy (pCmdBld->hOs, (void *)pCmd->key, (void *)pKey, MAX_KEY_SIZE);
} else {
os_memoryCopy (pCmdBld->hOs, (void *)pCmd->key, (void *)pKey, uKeySize);
}
pCmd->action = ENDIAN_HANDLE_WORD((TI_UINT16)action);
pCmd->keySize = (TI_UINT8)uKeySize;
pCmd->type = (TI_UINT8)uKeyType;
pCmd->id = (TI_UINT8)uKeyId;
pCmd->ssidProfile = 0;
/*
* Preserve TKIP/AES security sequence number after recovery.
* If not in reconfig set to 0 so the FW will ignore it and keep its own number.
* Note that our STA Tx is currently using only one sequence-counter
* for all ACs (unlike the Rx which is separated per AC).
*/
if (pCmdBld->bReconfigInProgress == TI_FALSE) {
uSecuritySeqNumLow = uSecuritySeqNumHigh = 0;
}
pCmd->AcSeqNum16[0] = ENDIAN_HANDLE_WORD((TI_UINT16)uSecuritySeqNumLow);
pCmd->AcSeqNum16[1] = 0;
pCmd->AcSeqNum16[2] = 0;
pCmd->AcSeqNum16[3] = 0;
pCmd->AcSeqNum32[0] = ENDIAN_HANDLE_LONG(uSecuritySeqNumHigh);
pCmd->AcSeqNum32[1] = 0;
pCmd->AcSeqNum32[2] = 0;
pCmd->AcSeqNum32[3] = 0;
return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_SET_KEYS, (char *)pCmd, sizeof(*pCmd), fCb, hCb, NULL);
}
开发者ID:IdeosDev, 项目名称:vendor_ti_wlan, 代码行数:71, 代码来源:CmdBldCmdIE.c
示例7: concat_replaceWlanHeader
/*************************************************************************
* wdrv_txReplaceWlanHeader *
*************************************************************************
DESCRIPTION: This function replaces the 802.11 header with length + SA as
prefix to the concatenated MSDU.
INPUT: msduPtr - Pointer to the first MSDU.
RETURN: OK : Initiation succesfull.
NOK: Initiation unsuccesfull.
************************************************************************/
static TI_STATUS concat_replaceWlanHeader(concatenator_t* pConcatenator,
mem_MSDU_T *msduPtr)
{
UINT8 *firstDataBuf;
UINT8 numOfPadBytes;
UINT8 *tmpPtr;
UINT8 tmpMacAddr[WLAN_DA_FIELD_LEN];
int i;
/* Replace the 802.11 header with 2 length bytes and 6 DA . */
firstDataBuf = (UINT8 *)(msduPtr->firstBDPtr->data +
msduPtr->firstBDPtr->dataOffset);
/*
* Use temporary buffer to prevent overwrite on the same data
*/
os_memoryCopy(pConcatenator->hOs,
tmpMacAddr,
firstDataBuf+WLAN_DA_FIELD_OFFSET, WLAN_DA_FIELD_LEN);
os_memoryCopy(pConcatenator->hOs,
firstDataBuf+ WLAN_HDR_LEN - WLAN_DA_FIELD_LEN,
tmpMacAddr, WLAN_DA_FIELD_LEN);
msduPtr->firstBDPtr->dataOffset += WLAN_CONCAT_HDR_OFFSET;
msduPtr->firstBDPtr->length -= WLAN_CONCAT_HDR_OFFSET;
msduPtr->dataLen -= WLAN_CONCAT_HDR_OFFSET;
/* Fill the length bytes. */
(*(UINT16*)(firstDataBuf+ WLAN_CONCAT_HDR_OFFSET)) =
wlan_htons((UINT16)(msduPtr->dataLen - WLAN_4X_LEN_FIELD_LEN));
/* Padding the last buffer with zeros.*/
numOfPadBytes = msduPtr->dataLen % 4;
if( numOfPadBytes > 0 )
{
#if 1
/*
* fixing the alignment bug.
*/
numOfPadBytes = 4 - numOfPadBytes;
#endif
tmpPtr = (UINT8 *) ((UINT32)msduPtr->lastBDPtr->data + msduPtr->lastBDPtr->length +
msduPtr->lastBDPtr->dataOffset);
for( i=0; i<numOfPadBytes; i++)
tmpPtr[i] = 0x00;
msduPtr->lastBDPtr->length += numOfPadBytes;
msduPtr->dataLen += numOfPadBytes;
}
return OK;
}
开发者ID:0omega, 项目名称:platform_system_wlan_ti, 代码行数:67, 代码来源:Concatenator.c
示例8: cmdBld_CmdIeSetKey
/****************************************************************************
* cmdBld_CmdIeSetKey()
****************************************************************************
* DESCRIPTION: Construct the SetKey command fileds and send it to the mailbox
*
* INPUTS:
* Action - add/remove key
* MacAddr - relevant only for mapping keys
* KeySize - key size
* KeyType - default/mapping/TKIP
* KeyId - relevant only for default keys
* Key - key data
*
* OUTPUT: None
*
* RETURNS: TI_OK or TI_NOK
****************************************************************************/
TI_STATUS cmdBld_CmdIeSetKey (TI_HANDLE hCmdBld,
TI_UINT32 action,
TI_UINT8 hlid,
TI_UINT8 lidkeytype,
TI_UINT32 uKeySize,
TI_UINT32 uKeyType,
TI_UINT32 uKeyId,
TI_UINT8 *pKey,
TI_UINT32 uSecuritySeqNumLow,
TI_UINT32 uSecuritySeqNumHigh,
void *fCb,
TI_HANDLE hCb)
{
TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
SetKey_t AcxCmd_SetKey;
SetKey_t *pCmd = &AcxCmd_SetKey;
os_memoryZero (pCmdBld->hOs, (void *)pCmd, sizeof(*pCmd));
if (uKeySize > MAX_KEY_SIZE) {
os_memoryCopy (pCmdBld->hOs, (void *)pCmd->key, (void *)pKey, MAX_KEY_SIZE);
} else {
os_memoryCopy (pCmdBld->hOs, (void *)pCmd->key, (void *)pKey, uKeySize);
}
pCmd->hlid = hlid;
pCmd->lidKeyType = lidkeytype;
pCmd->action = ENDIAN_HANDLE_WORD((TI_UINT16)action);
pCmd->keySize = (TI_UINT8)uKeySize;
pCmd->type = (TI_UINT8)uKeyType;
pCmd->keyId = (TI_UINT8)uKeyId;
/*
* Preserve TKIP/AES security sequence number after recovery.
* Note that our STA Tx is currently using only one sequence-counter
* for all ACs (unlike the Rx which is separated per AC).
*/
pCmd->AcSeqNum16[0] = ENDIAN_HANDLE_WORD((TI_UINT16)uSecuritySeqNumLow);
pCmd->AcSeqNum16[1] = 0;
pCmd->AcSeqNum16[2] = 0;
pCmd->AcSeqNum16[3] = 0;
pCmd->AcSeqNum32[0] = ENDIAN_HANDLE_LONG(uSecuritySeqNumHigh);
pCmd->AcSeqNum32[1] = 0;
pCmd->AcSeqNum32[2] = 0;
pCmd->AcSeqNum32[3] = 0;
return cmdQueue_SendCommand (pCmdBld->hCmdQueue, CMD_SET_KEYS, (char *)pCmd, sizeof(*pCmd), fCb, hCb, NULL);
}
开发者ID:IdeosDev, 项目名称:vendor_ti_wlan, 代码行数:68, 代码来源:CmdBldCmdIE.c
示例9: roamingMngr_connect
TI_STATUS roamingMngr_connect(TI_HANDLE hRoamingMngr, TargetAp_t* pTargetAp)
{
roamingMngr_t *pRoamingMngr = (roamingMngr_t*)hRoamingMngr;
bssList_t *bssList;
int i=0;
TRACE2(pRoamingMngr->hReport, REPORT_SEVERITY_INFORMATION, "roamingMngr_connect(),"
"transitionMethod = %d,"
"requestType = %d,"
" \n", pTargetAp->transitionMethod,pTargetAp->connRequest.requestType) ;
TRACE6(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_connect(),"
" AP to roam BSSID: "
"%02x-%02x-%02x-%02x-%02x-%02x "
"\n", pTargetAp->newAP.BSSID[0],pTargetAp->newAP.BSSID[1],pTargetAp->newAP.BSSID[2],pTargetAp->newAP.BSSID[3],pTargetAp->newAP.BSSID[4],pTargetAp->newAP.BSSID[5]);
/* Search for target AP in the scan manager results table, to get its beacon/ProbResponse buffer */
bssList = scanMngr_getBSSList(((roamingMngr_t*)hRoamingMngr)->hScanMngr);
for (i=0; i< bssList->numOfEntries ; i++) {
if (MAC_EQUAL(bssList->BSSList[i].BSSID, pTargetAp->newAP.BSSID)) {
pTargetAp->newAP.pBuffer = bssList->BSSList[i].pBuffer;
pTargetAp->newAP.bufferLength = bssList->BSSList[i].bufferLength;
os_memoryCopy(pRoamingMngr->hOs, &(pRoamingMngr->targetAP), (void*)pTargetAp, sizeof(TargetAp_t));
return roamingMngr_smEvent(ROAMING_MANUAL_EVENT_CONNECT, hRoamingMngr);
}
}
TRACE6(pRoamingMngr->hReport, REPORT_SEVERITY_ERROR, "roamingMngr_connect(),"
"AP was not found in scan table!! BSSID: "
"%02x-%02x-%02x-%02x-%02x-%02x "
"\n", pTargetAp->newAP.BSSID[0],pTargetAp->newAP.BSSID[1],pTargetAp->newAP.BSSID[2],pTargetAp->newAP.BSSID[3],pTargetAp->newAP.BSSID[4],pTargetAp->newAP.BSSID[5]);
return TI_NOK;
}
开发者ID:3ig, 项目名称:Xperia-2011-Official-Kernel-Sources, 代码行数:35, 代码来源:roamingMngr.c
示例10: mainSecKeysOnly_getSessionKey
/**
*
* mainSecSmNull_setKey
*
* \b Description:
*
* Start the NULL main security SM. Reports success to the rsn module immediately.
*
* \b ARGS:
*
* none
*
* \b RETURNS:
*
* OK on success, NOK otherwise.
*
* \sa
*/
TI_STATUS mainSecKeysOnly_getSessionKey(mainSec_t *pMainSec, UINT8* pKey, UINT32* pKeyLen)
{
os_memoryCopy(pMainSec->hOs, pKey, pMainSec->sessionKey, pMainSec->sessionKeyLen);
*pKeyLen = pMainSec->sessionKeyLen;
return OK;
}
开发者ID:0omega, 项目名称:platform_system_wlan_ti, 代码行数:25, 代码来源:mainSecKeysOnly.c
示例11: cmdBld_CfgBeaconFilterTable
/****************************************************************************
* cmdBld_CfgBeaconFilterTable
****************************************************************************
* DESCRIPTION: Sets Beacon filtering state
*
* INPUTS: None
*
* OUTPUT: None
*
* RETURNS: TI_OK or TI_NOK
****************************************************************************/
TI_STATUS cmdBld_CfgBeaconFilterTable (TI_HANDLE hCmdBld,
TI_UINT8 uNumberOfIEs,
TI_UINT8 *pIETable,
TI_UINT8 uIETableSize,
void *fCb,
TI_HANDLE hCb)
{
TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
if (uIETableSize > BEACON_FILTER_TABLE_MAX_SIZE) {
TRACE2(pCmdBld->hReport, REPORT_SEVERITY_ERROR, "cmdBld_CfgBeaconFilterTable: Table size is too big %d (>%d)\n", uIETableSize, BEACON_FILTER_TABLE_MAX_SIZE);
return PARAM_VALUE_NOT_VALID;
}
os_memoryZero (pCmdBld->hOs,
(void *)DB_WLAN(hCmdBld).beaconFilterIETable.IETable,
BEACON_FILTER_TABLE_MAX_SIZE);
os_memoryCopy (pCmdBld->hOs,
(void *)DB_WLAN(hCmdBld).beaconFilterIETable.IETable,
(void *)pIETable,
uIETableSize);
DB_WLAN(hCmdBld).beaconFilterIETable.numberOfIEs = uNumberOfIEs;
DB_WLAN(hCmdBld).beaconFilterIETable.IETableSize = uIETableSize;
return cmdBld_CfgIeBeaconFilterTable (hCmdBld, uNumberOfIEs, pIETable, uIETableSize, fCb, hCb);
}
开发者ID:Achotjan, 项目名称:FreeXperia, 代码行数:38, 代码来源:CmdBldCfg.c
示例12: cmdBld_CfgRxDataFilter
/****************************************************************************
* cmdBld_CfgRxDataFilter()
*****************************************************************************
* DESCRIPTION: Add/remove Rx Data filter information element.
*
* INPUTS: index - Index of the Rx Data filter
* command - Add or remove the filter
* action - Action to take on packets matching the pattern
* numFieldPatterns - Number of field patterns in the filter
* lenFieldPatterns - Length of the field pattern series
* fieldPatterns - Series of field patterns
*
* OUTPUT: None
*
* RETURNS: TI_OK or TI_NOK
****************************************************************************/
TI_STATUS cmdBld_CfgRxDataFilter (TI_HANDLE hCmdBld,
TI_UINT8 index,
TI_UINT8 command,
filter_e eAction,
TI_UINT8 uNumFieldPatterns,
TI_UINT8 uLenFieldPatterns,
TI_UINT8 *pFieldPatterns,
void *fCb,
TI_HANDLE hCb)
{
TCmdBld *pCmdBld = (TCmdBld *)hCmdBld;
TRxDataFilter *pFilters = &(DB_RX_DATA_FLTR(hCmdBld).aRxDataFilter[index]);
/* Save parameters for reconfig phase */
pFilters->uIndex = index;
pFilters->uCommand = command;
pFilters->eAction = eAction;
pFilters->uNumFieldPatterns = uNumFieldPatterns;
pFilters->uLenFieldPatterns = uLenFieldPatterns;
os_memoryCopy(pCmdBld->hOs, pFilters->aFieldPattern, pFieldPatterns, uLenFieldPatterns);
return cmdBld_CfgIeRxDataFilter (hCmdBld,
index,
command,
eAction,
uNumFieldPatterns,
uLenFieldPatterns,
pFieldPatterns,
fCb,
hCb);
}
开发者ID:Achotjan, 项目名称:FreeXperia, 代码行数:47, 代码来源:CmdBldCfg.c
示例13: mainKeys_smTimeOut
/**
*
* mainKeySmLogMessage
*
* \b Description:
*
* Prints Log messge.\n
* Start session timer.
*
* \b ARGS:
*
* I - pData - station control block \n
*
* \b RETURNS:
*
* OK on success, NOK otherwise.
*/
TI_STATUS mainKeys_smTimeOut(void* data)
{
OS_802_11_AUTHENTICATION_REQUEST *request;
UINT8 AuthBuf[sizeof(UINT32) + sizeof(OS_802_11_AUTHENTICATION_REQUEST)];
paramInfo_t param;
TI_STATUS status;
struct _mainKeys_t *pMainKeys = (struct _mainKeys_t *)data;
WLAN_REPORT_INFORMATION(pMainKeys->hReport, RSN_MODULE_LOG,
("MAIN_KEY_SM: TRAP: Session Timeout for station , mainKeysTimeoutCounter=%d\n",
pMainKeys->mainKeysTimeoutCounter));
request = (OS_802_11_AUTHENTICATION_REQUEST *)(AuthBuf + sizeof(UINT32));
request->Length = sizeof(OS_802_11_AUTHENTICATION_REQUEST);
param.paramType = CTRL_DATA_CURRENT_BSSID_PARAM;
status = ctrlData_getParam(pMainKeys->hCtrlData, ¶m);
if (status != OK)
{
return NOK;
}
WLAN_REPORT_INFORMATION(pMainKeys->hReport, RSN_MODULE_LOG,
("current station is banned from the roaming candidates list for %d Ms\n",
RSN_MAIN_KEYS_SESSION_TIMEOUT));
rsn_banSite(pMainKeys->hRsn, param.content.ctrlDataCurrentBSSID, RSN_SITE_BAN_LEVEL_FULL, RSN_MAIN_KEYS_SESSION_TIMEOUT);
/* mainKeysTimeoutCounter is a boolean variable, With states: */
/* TRUE - It is a Timeout Association Event */
/* FALSE - It is a Media specific Event */
if (!pMainKeys->mainKeysTimeoutCounter)
{
/* Fill Media specific indication fields and send to OS/User */
os_memoryCopy(pMainKeys->hOs, request->BSSID, (void *)param.content.ctrlDataCurrentBSSID.addr, MAC_ADDR_LEN);
request->Flags = OS_802_11_REQUEST_REAUTH;
*(UINT32*)AuthBuf = os802_11StatusType_Authentication;
WLAN_REPORT_INFORMATION(pMainKeys->hReport, RSN_MODULE_LOG,
(" %d Ms\n",RSN_MAIN_KEYS_SESSION_TIMEOUT));
EvHandlerSendEvent(pMainKeys->hEvHandler, IPC_EVENT_MEDIA_SPECIFIC, (UINT8*)AuthBuf,
sizeof(UINT32) + sizeof(OS_802_11_AUTHENTICATION_REQUEST));
os_timerStart(pMainKeys->hOs, pMainKeys->timer, pMainKeys->keysTimeout, FALSE);
pMainKeys->mainKeysTimeoutCounter = TRUE;
}
else
{
pMainKeys->mainKeysTimeoutCounter = FALSE;
rsn_reportAuthFailure(pMainKeys->hRsn, RSN_AUTH_STATUS_TIMEOUT);
conn_reportRsnStatus(pMainKeys->hConn, (mgmtStatus_e)STATUS_SECURITY_FAILURE);
}
return OK;
}
开发者ID:0omega, 项目名称:platform_system_wlan_ti, 代码行数:77, 代码来源:mainKeysSm.c
示例14: MacServices_measurementSRV_startMeasurement
/**
* \\n
* \date 09-November-2005\n
* \brief Starts a measurement operation.\n
*
* Function Scope \e Public.\n
* \param hMacServices - handle to the MacServices object.\n
* \param pMsrRequest - a structure containing measurement parameters.\n
* \param timeToRequestexpiryMs - the time (in milliseconds) the measurement SRV has to start the request.\n
* \param cmdResponseCBFunc - callback function to used for command response.\n
* \param cmdResponseCBObj - handle to pass to command response CB.\n
* \param cmdCompleteCBFunc - callback function to be used for command complete.\n
* \param cmdCompleteCBObj - handle to pass to command complete CB.\n
* \return TI_OK if successful (various, TBD codes if not).\n
*/
TI_STATUS MacServices_measurementSRV_startMeasurement( TI_HANDLE hMacServices,
TMeasurementRequest* pMsrRequest,
TI_UINT32 timeToRequestExpiryMs,
TCmdResponseCb cmdResponseCBFunc,
TI_HANDLE cmdResponseCBObj,
TMeasurementSrvCompleteCb cmdCompleteCBFunc,
TI_HANDLE cmdCompleteCBObj )
{
measurementSRV_t* pMeasurementSRV = (measurementSRV_t*)((MacServices_t*)hMacServices)->hMeasurementSRV;
TI_INT32 i;
#ifdef TI_DBG
measurementSRVPrintRequest( (TI_HANDLE)pMeasurementSRV, pMsrRequest );
#endif
/* mark that request is in progress */
pMeasurementSRV->bInRequest = TI_TRUE;
/* mark to send NULL data when exiting driver mode (can be changed to TI_FALSE
only when explictly stopping the measurement */
pMeasurementSRV->bSendNullDataWhenExitPs = TI_TRUE;
/* Nullify return status */
pMeasurementSRV->returnStatus = TI_OK;
/* copy request parameters */
os_memoryCopy (pMeasurementSRV->hOS,
(void *)&pMeasurementSRV->msrRequest,
(void *)pMsrRequest,
sizeof(TMeasurementRequest));
/* Mark the current time stamp and the duration to start to cehck expiry later */
pMeasurementSRV->requestRecptionTimeStampMs = os_timeStampMs( pMeasurementSRV->hOS );
pMeasurementSRV->timeToRequestExpiryMs = timeToRequestExpiryMs;
/* copy callbacks */
pMeasurementSRV->commandResponseCBFunc = cmdResponseCBFunc;
pMeasurementSRV->commandResponseCBObj = cmdResponseCBObj;
pMeasurementSRV->measurmentCompleteCBFunc = cmdCompleteCBFunc;
pMeasurementSRV->measurementCompleteCBObj = cmdCompleteCBObj;
/* initialize reply */
pMeasurementSRV->msrReply.numberOfTypes = pMsrRequest->numberOfTypes;
for ( i = 0; i < pMsrRequest->numberOfTypes; i++ ) {
pMeasurementSRV->msrReply.msrTypes[ i ].msrType = pMeasurementSRV->msrRequest.msrTypes[ i ].msrType;
pMeasurementSRV->msrReply.msrTypes[ i ].status = TI_OK;
}
/* nullify the pending CBs bitmap */
pMeasurementSRV->pendingParamCBs = 0;
/* send a start measurement event to the SM */
measurementSRVSM_SMEvent( (TI_HANDLE)pMeasurementSRV, &(pMeasurementSRV->SMState),
MSR_SRV_EVENT_MEASURE_START_REQUEST );
/* mark that request has been sent */
pMeasurementSRV->bInRequest = TI_FALSE;
return pMeasurementSRV->returnStatus;
}
开发者ID:IdeosDev, 项目名称:vendor_ti_wlan, 代码行数:75, 代码来源:MeasurementSrv.c
示例15: assoc_recv
/**
*
* assoc_recv - Recive a message from the AP
*
* \b Description:
*
* Parse a message form the AP and perform the appropriate event.
*
* \b ARGS:
*
* I - hAssoc - Association SM context \n
* I - pFrame - Frame recieved \n
*
* \b RETURNS:
*
* TI_OK if successful, TI_NOK otherwise.
*
* \sa assoc_Start, assoc_Stop
*/
TI_STATUS assoc_recv(TI_HANDLE hAssoc, mlmeFrameInfo_t *pFrame)
{
TI_STATUS status;
assoc_t *pHandle = (assoc_t*)hAssoc;
TTwdParamInfo tTwdParam;
TI_UINT16 rspStatus;
if (pHandle == NULL)
{
return TI_NOK;
}
/* ensure that the SM is waiting for assoc response */
if(pHandle->currentState != ASSOC_SM_STATE_WAIT)
return TI_OK;
if ((pFrame->subType != ASSOC_RESPONSE) && (pFrame->subType != RE_ASSOC_RESPONSE))
{
return TI_NOK;
}
/* check response status */
rspStatus = pFrame->content.assocRsp.status;
if (rspStatus == 0)
{
TRsnData rsnData;
dot11_RSN_t *pRsnIe;
TI_UINT8 curRsnData[255];
TI_UINT8 rsnAssocIeLen;
TI_UINT8 length = 0;
TRACE0(pHandle->hReport, REPORT_SEVERITY_SM, "ASSOC_SM: DEBUG Success associating to AP \n");
/* set AID to HAL */
tTwdParam.paramType = TWD_AID_PARAM_ID;
tTwdParam.content.halCtrlAid = pFrame->content.assocRsp.aid;
TWD_SetParam (pHandle->hTWD, &tTwdParam);
/* Get the RSN IE data */
pRsnIe = pFrame->content.assocRsp.pRsnIe;
while (length < pFrame->content.assocRsp.rsnIeLen && (pFrame->content.assocRsp.rsnIeLen < 255))
{
curRsnData[0+length] = pRsnIe->hdr[0];
curRsnData[1+length] = pRsnIe->hdr[1];
os_memoryCopy(pHandle->hOs, &curRsnData[2+length], (void *)pRsnIe->rsnIeData, pRsnIe->hdr[1]);
length += pRsnIe->hdr[1] + 2;
pRsnIe += 1;
}
if (pFrame->content.assocRsp.rsnIeLen != 0)
{
rsnData.pIe = curRsnData;
rsnData.ieLen = pFrame->content.assocRsp.rsnIeLen;
rsnData.privacy = ((pFrame->content.assocRsp.capabilities >> CAP_PRIVACY_SHIFT) & CAP_PRIVACY_MASK) ? TI_TRUE : TI_FALSE;
rsn_setSite(pHandle->hRsn, &rsnData, NULL, &rsnAssocIeLen);
}
开发者ID:0omega, 项目名称:platform_system_wlan_ti, 代码行数:79, 代码来源:assocSM.c
示例16: fwDbg_ReadAddr
/*
* \brief Read Address to FW
*
* \param hFwDebug - Handle to FW Debug
* \param Address - Absolute HW address
* \param Length - Length in byte to write
* \param Buffer - Buffer to copy to FW
* \param fCb - CB function
* \param hCb - CB Handle
* \return none
*
* \par Description
* Read from HW, must receive length in byte max size 256 bytes
* address must be absolute HW address.
*
* \sa
*/
TI_STATUS fwDbg_ReadAddr (TI_HANDLE hFwDebug,
TI_UINT32 Address,
TI_UINT32 Length,
TI_UINT8* Buffer,
TFwDubCallback fCb,
TI_HANDLE hCb)
{
TI_STATUS rc;
TTxnStruct *pTxn;
TFwDebug *pFwDebug = (TFwDebug*)hFwDebug;
pTxn = &pFwDebug->tTxn;
/* check if length is large than default threshold */
if (Length > DMA_SIZE_BUF)
{
TRACE1(pFwDebug->hReport, REPORT_SEVERITY_ERROR, "fwDbg_ReadAddr : Buffer Length too large -- %d",Length);
return TXN_STATUS_ERROR;
}
pFwDebug->fCb = fCb;
pFwDebug->hCb = hCb;
pFwDebug->pReadBuf = Buffer;
/* Build the command TxnStruct */
TXN_PARAM_SET(pTxn, TXN_LOW_PRIORITY, TXN_FUNC_ID_WLAN, TXN_DIRECTION_READ, TXN_INC_ADDR)
/* Applying a CB in case of an async read */
BUILD_TTxnStruct(pTxn, Address, pFwDebug->pDMABuf, Length,(TTxnDoneCb)fwDbg_ReadAddrCb, pFwDebug)
rc = twIf_Transact(pFwDebug->hTwif,pTxn);
if (rc == TXN_STATUS_COMPLETE)
{
/* copy from DMA buufer to given buffer */
os_memoryCopy(pFwDebug->hOs,pFwDebug->pReadBuf,pFwDebug->pDMABuf,Length);
}
return rc;
}
开发者ID:CoreTech-Development, 项目名称:buildroot-linux-kernel, 代码行数:51, 代码来源:fwDebug.c
示例17: fsm_Config
/**
*
* fsm_Init - Initialize the FSM structure
*
* \b Description:
*
* Init The FSM structure. If matrix argument is NULL, allocate memory for
* new matrix.
*
* \b ARGS:
*
* O - pFsm - the generated FSM module \n
* I - noOfStates - Number of states in the module \n
* I - noOfStates - Number of events in the module \n
* I/O - matrix - the state event matrix
* I - transFunc - Transition finction for the state machine \n
*
* \b RETURNS:
*
* TI_OK on success, TI_NOK on failure
*
* \sa fsm_Event
*/
TI_STATUS fsm_Config(fsm_stateMachine_t *pFsm,
fsm_Matrix_t pMatrix,
TI_UINT8 ActiveNoOfStates,
TI_UINT8 ActiveNoOfEvents,
fsm_eventActivation_t transFunc,
TI_HANDLE hOs)
{
/* check for perliminary conditions */
if ((pFsm == NULL) ||
(pMatrix == NULL)) {
return TI_NOK;
}
if ((ActiveNoOfStates > pFsm->MaxNoOfStates) ||
(ActiveNoOfEvents > pFsm->MaxNoOfEvents)) {
return TI_NOK;
}
/* copy matrix to FSM context */
os_memoryCopy(hOs, (void *)pFsm->stateEventMatrix, (void *)pMatrix,
ActiveNoOfStates * ActiveNoOfEvents * sizeof(fsm_actionCell_t));
/* update pFsm structure with parameters */
pFsm->ActiveNoOfStates = ActiveNoOfStates;
pFsm->ActiveNoOfEvents = ActiveNoOfEvents;
pFsm->transitionFunc = transFunc;
return(TI_OK);
}
开发者ID:Achotjan, 项目名称:FreeXperia, 代码行数:51, 代码来源:fsm.c
示例18: TWDriverTest
/****************************************************************************************
* TWDriverTest
****************************************************************************************/
TI_STATUS TWDriverTest(TI_HANDLE hTWD,
TestCmdID_enum eTestCmd,
void* pTestCmdParams,
TTestCmdCB fCb,
TI_HANDLE hCb)
{
TTwd *pTWD = (TTwd *)hTWD;
/* check parameters */
if (( hTWD == NULL ) ||
( eTestCmd >= MAX_TEST_CMD_ID ) ||
( fCb == NULL ) ||
( hCb == NULL ))
{
return (TI_NOK);
}
pTWD->testCmd.testCmdId = eTestCmd;
if (pTestCmdParams != NULL)
{
os_memoryCopy(NULL, &pTWD->testCmd.testCmd_u, pTestCmdParams, sizeof(pTWD->testCmd.testCmd_u));
}
pTWD->fRadioCb = fCb;
pTWD->pRadioCb = pTestCmdParams;
pTWD->hRadioCb = hCb;
return(cmdBld_CmdTest (pTWD->hCmdBld,
(TI_HANDLE)TWDriverTestCB,
hTWD,
&pTWD->testCmd));
}
开发者ID:CoreTech-Development, 项目名称:buildroot-linux-kernel, 代码行数:36, 代码来源:TWDriverRadio.c
示例19: keyDeriveNone_derive
TI_STATUS keyDeriveNone_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
{
securityKeys_t key;
if (pEncodedKey==NULL)
{
return NOK;
}
if ((pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_40) &&
(pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_104) &&
(pEncodedKey->keyLen != DERIVE_WEP_KEY_LEN_232))
{
return NOK;
}
key.keyType = WEP_KEY;
key.keyIndex = (UINT8)pEncodedKey->keyId;
key.encLen = (UINT16)pEncodedKey->keyLen;
os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, pEncodedKey->pData, pEncodedKey->keyLen);
pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key);
return OK;
}
开发者ID:0omega, 项目名称:platform_system_wlan_ti, 代码行数:25, 代码来源:keyDeriveWep.c
六六分期app的软件客服如何联系?不知道吗?加qq群【895510560】即可!标题:六六分期
阅读:19231| 2023-10-27
今天小编告诉大家如何处理win10系统火狐flash插件总是崩溃的问题,可能很多用户都不知
阅读:9996| 2022-11-06
今天小编告诉大家如何对win10系统删除桌面回收站图标进行设置,可能很多用户都不知道
阅读:8331| 2022-11-06
今天小编告诉大家如何对win10系统电脑设置节能降温的设置方法,想必大家都遇到过需要
阅读:8700| 2022-11-06
我们在使用xp系统的过程中,经常需要对xp系统无线网络安装向导设置进行设置,可能很多
阅读:8645| 2022-11-06
今天小编告诉大家如何处理win7系统玩cf老是与主机连接不稳定的问题,可能很多用户都不
阅读:9667| 2022-11-06
电脑对日常生活的重要性小编就不多说了,可是一旦碰到win7系统设置cf烟雾头的问题,很
阅读:8630| 2022-11-06
我们在日常使用电脑的时候,有的小伙伴们可能在打开应用的时候会遇见提示应用程序无法
阅读:8004| 2022-11-06
今天小编告诉大家如何对win7系统打开vcf文件进行设置,可能很多用户都不知道怎么对win
阅读:8664| 2022-11-06
今天小编告诉大家如何对win10系统s4开启USB调试模式进行设置,可能很多用户都不知道怎
阅读:7540| 2022-11-06
请发表评论