• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ os_memoryZero函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中os_memoryZero函数的典型用法代码示例。如果您正苦于以下问题:C++ os_memoryZero函数的具体用法?C++ os_memoryZero怎么用?C++ os_memoryZero使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了os_memoryZero函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: 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;


	default:
		return PARAM_NOT_SUPPORTED;

	}

	return TI_OK;
}
开发者ID:IdeosDev,项目名称:vendor_ti_wlan,代码行数:55,代码来源:txCtrlParams.c


示例2: admCtrl_create

/**
*
* admCtrl_create
*
* \b Description: 
*
* Create the admission control context.
*
* \b ARGS:
*
*  I   - role - admission cotrol role (AP or Station)  \n
*  I   - authSuite - authentication suite to work with \n
*  
* \b RETURNS:
*
*  TI_OK on success, TI_NOK on failure.
*
* \sa 
*/
admCtrl_t* admCtrl_create(TI_HANDLE hOs)
{
    admCtrl_t       *pHandle;

    /* allocate rsniation context memory */
    pHandle = (admCtrl_t*)os_memoryAlloc(hOs, sizeof(admCtrl_t));
    if (pHandle == NULL)
    {
        return NULL;
    }

    os_memoryZero(hOs, pHandle, sizeof(admCtrl_t));

    pHandle->hOs = hOs;

    return pHandle;
}
开发者ID:0omega,项目名称:platform_system_wlan_ti,代码行数:36,代码来源:admCtrl.c


示例3: context_Create

/** 
 * \fn     context_Create 
 * \brief  Create the module 
 * 
 * Allocate and clear the module object.
 * 
 * \note    
 * \param  hOs      - Handle to Os Abstraction Layer
 * \return Handle of the allocated object 
 * \sa     context_Destroy
 */ 
TI_HANDLE context_Create (TI_HANDLE hOs)
{
	TI_HANDLE hContext;

	/* allocate module object */
	hContext = os_memoryAlloc (hOs, sizeof(TContext));
	
	if (!hContext)
	{
		WLAN_OS_REPORT (("context_Create():  Allocation failed!!\n"));
		return NULL;
	}
	
    os_memoryZero (hOs, hContext, (sizeof(TContext)));

	return (hContext);
}
开发者ID:CyanogenDefy,项目名称:android_system_wlan_ti,代码行数:28,代码来源:context.c


示例4: os_memoryZero

/**
 * \fn     scanresultTbale_AllocateNewEntry
 * \brief  Allocates an empty entry for a new site
 *
 * Function Allocates an empty entry for a new site (and nullfiies required entry fields)
 *
 * \param  hScanResultTable - handle to the scan result table object
 * \return Pointer to the site entry (NULL if the table is full)
 */
TSiteEntry *scanResultTbale_AllocateNewEntry (TI_HANDLE hScanResultTable)
{
    TScanResultTable    *pScanResultTable = (TScanResultTable*)hScanResultTable;

    /* if the table is full */
    if (pScanResultTable->uCurrentSiteNumber >= TABLE_ENTRIES_NUMBER)
    {
        return NULL;
    }

    /* Nullify new site data */
    os_memoryZero(pScanResultTable->hOS, &(pScanResultTable->pTable[ pScanResultTable->uCurrentSiteNumber ]), sizeof (TSiteEntry));

    /* return the site (and update site count) */
    pScanResultTable->uCurrentSiteNumber++;
    return &(pScanResultTable->pTable[ pScanResultTable->uCurrentSiteNumber - 1 ]);
}
开发者ID:bluewater-cn,项目名称:ti_wilink,代码行数:26,代码来源:scanResultTable.c


示例5: measurementMgr_receiveFrameRequest

/**
 * Called when a frame with type measurement request is received.
 * 
 * @param hMeasurementMgr A handle to the Measurement Manager module.
 * @param frameType The frame type.
 * @param dataLen The length of the frame.
 * @param pData A pointer to the frame's content.
 * 
 * @date 16-Dec-2005
 */
TI_STATUS measurementMgr_receiveFrameRequest(TI_HANDLE hMeasurementMgr,
                                             EMeasurementFrameType frameType,
                                             TI_INT32 dataLen,
                                             TI_UINT8 * pData)
{
    measurementMgr_t * pMeasurementMgr = (measurementMgr_t *) hMeasurementMgr;

    TMeasurementFrameRequest * frame = &(pMeasurementMgr->newFrameRequest);    
    TI_UINT16 currentFrameToken;
    
    /* checking if measurement is enabled */
    if (pMeasurementMgr->Mode == MSR_MODE_NONE)
        return TI_NOK;

    /* ignore broadcast/multicast request if unicast request is active */
    if (frameType != MSR_FRAME_TYPE_UNICAST && pMeasurementMgr->currentFrameType == MSR_FRAME_TYPE_UNICAST)
    {
        return TI_NOK;
    }

    /* ignore broadcast request if multicast request is active */
    if (frameType == MSR_FRAME_TYPE_BROADCAST && pMeasurementMgr->currentFrameType == MSR_FRAME_TYPE_MULTICAST)
    {
        return TI_NOK;
    }

    /* Parsing the Frame Request Header */
    pMeasurementMgr->parserFrameReq(hMeasurementMgr, pData, dataLen, 
                                        frame);

    frame->frameType = frameType;

    /* checking if the received token frame is the same as the one that is being processed */
    if ((requestHandler_getFrameToken(pMeasurementMgr->hRequestH, &currentFrameToken) == TI_OK)
        && (currentFrameToken == frame->hdr->dialogToken))
    {
        os_memoryZero(pMeasurementMgr->hOs, &pMeasurementMgr->newFrameRequest, 
                      sizeof(TMeasurementFrameRequest));

        return TI_NOK;
    }

    /* Frame is Received for processing */
    return measurementMgrSM_event((TI_UINT8 *) &(pMeasurementMgr->currentState), 
                               MEASUREMENTMGR_EVENT_FRAME_RECV, pMeasurementMgr);
}
开发者ID:bluewater-cn,项目名称:ti_wilink,代码行数:56,代码来源:measurementMgr.c


示例6: txDataQ_Create

/**
 * \fn     txDataQ_Create
 * \brief  Create the module and its queues
 *
 * Create the Tx Data module and its queues.
 *
 * \note
 * \param  hOs - Handle to the Os Abstraction Layer
 * \return Handle to the allocated Tx Data Queue module (NULL if failed)
 * \sa
 */
TI_HANDLE txDataQ_Create(TI_HANDLE hOs)
{
	TTxDataQ *pTxDataQ;

	/* allocate TxDataQueue module */
	pTxDataQ = os_memoryAlloc (hOs, (sizeof(TTxDataQ)));

	if (!pTxDataQ) {
		WLAN_OS_REPORT(("Error allocating the TxDataQueue Module\n"));
		return NULL;
	}

	/* Reset TxDataQueue module */
	os_memoryZero (hOs, pTxDataQ, (sizeof(TTxDataQ)));

	return (TI_HANDLE)pTxDataQ;
}
开发者ID:3ig,项目名称:Xperia-2011-Official-Kernel-Sources,代码行数:28,代码来源:txDataQueue.c


示例7: cmdMbox_Create

/*
 * \brief	Create the mailbox object
 * 
 * \param  hOs  - OS module object handle
 * \return Handle to the created object
 * 
 * \par Description
 * Calling this function creates a CmdMbox object
 * 
 * \sa cmdMbox_Destroy
 */
TI_HANDLE cmdMbox_Create (TI_HANDLE hOs)
{
    TCmdMbox   *pCmdMbox;

    pCmdMbox = os_memoryAlloc (hOs, sizeof (TCmdMbox));
    if (pCmdMbox == NULL)
    {
        WLAN_OS_REPORT (("FATAL ERROR: cmdMbox_Create(): Error Creating CmdMbox - Aborting\n"));
        return NULL;
    }

    /* reset control module control block */
    os_memoryZero (hOs, pCmdMbox, sizeof (TCmdMbox));
    pCmdMbox->hOs = hOs;

    return pCmdMbox;
}
开发者ID:Achotjan,项目名称:FreeXperia,代码行数:28,代码来源:CmdMBox.c


示例8: txDataQ_ResetQueueStatistics

/** 
 * \fn     txDataQ_ResetQueueStatistics
 * \brief  Reset queues statistics
 * 
 * Reset queues statistics
 *
 * \note   
 * \param  hTxDataQ - The object                                          
 * \return void 
 * \sa     
 */ 
void txDataQ_ResetQueueStatistics (TI_HANDLE hTxDataQ) 
{
	TTxDataQ *pTxDataQ = (TTxDataQ *)hTxDataQ;
	TDataLinkQ *pLinkQ;
	TI_UINT32  uHlid;

	/* 
	 * init all queues in all links 
	*/
	for (uHlid = 0; uHlid < WLANLINKS_MAX_LINKS; uHlid++)
	{
            pLinkQ = &pTxDataQ->aDataLinkQ[uHlid]; /* Link queues */

            os_memoryZero(pTxDataQ->hOs, &pLinkQ->aQueueCounters, sizeof(pLinkQ->aQueueCounters));
	}
    pTxDataQ->uTxSendPaceTimeoutsCount = 0;
}
开发者ID:Achotjan,项目名称:FreeXperia,代码行数:28,代码来源:txDataQueue.c


示例9: tmr_Create

/** 
 * \fn     tmr_Create 
 * \brief  Create the timer module
 * 
 * Allocate and clear the timer module object.
 * 
 * \note   This is NOT a specific timer creation! (see tmr_CreateTimer)
 * \param  hOs - Handle to Os Abstraction Layer
 * \return Handle of the allocated object 
 * \sa     tmr_Destroy
 */ 
TI_HANDLE tmr_Create (TI_HANDLE hOs)
{
    TI_HANDLE hTimerModule;

    /* allocate module object */
    hTimerModule = os_memoryAlloc (hOs, sizeof(TTimerModule));
	
    if (!hTimerModule)
    {
        WLAN_OS_REPORT (("tmr_Create():  Allocation failed!!\n"));
        return NULL;
    }
	
    os_memoryZero (hOs, hTimerModule, (sizeof(TTimerModule)));

    return (hTimerModule);
}
开发者ID:CoreTech-Development,项目名称:buildroot-linux-kernel,代码行数:28,代码来源:timer.c


示例10: buildQosNullDataTemplate

/************************************************************************
 *                        buildQosNullDataTemplate							*
 ************************************************************************
DESCRIPTION: This function build a qos null data template
				performs the following:
				-	Build a template & set the template len, the template type is set in the site mgr
                                                                                                   
INPUT:      pSiteMgr	-	Handle to site manager	
			pTemplate	-	Pointer to the template structure		
			pSsid		-	Desired SSID

OUTPUT:		

RETURN:     TI_OK
************************************************************************/
TI_STATUS buildQosNullDataTemplate(siteMgr_t * pSiteMgr,
				   TSetTemplate * pTemplate,
				   TI_UINT8 userPriority)
{
	paramInfo_t param;
	TI_UINT32 size;
	QosNullDataTemplate_t *pBuffer =
	    (QosNullDataTemplate_t *) pTemplate->ptr;
	siteEntry_t *pPrimarySite = pSiteMgr->pSitesMgmtParams->pPrimarySite;
	TI_UINT16 fc;
	TI_UINT16 qosControl;

	os_memoryZero(pSiteMgr->hOs, pBuffer, sizeof(QosNullDataTemplate_t));

	/*
	 * Header First
	 */
	/* Set destination address */
	if (pPrimarySite) {
		MAC_COPY(pBuffer->hdr.address1, pPrimarySite->bssid);

		/* Set BSSID address */
		MAC_COPY(pBuffer->hdr.address3, pPrimarySite->bssid);
	} else {
		TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION,
		       "No Primary site so cannot fill QosNullData template\n");
	}

	/* Build Source address */
	param.paramType = CTRL_DATA_MAC_ADDRESS;
	ctrlData_getParam(pSiteMgr->hCtrlData, &param);
	MAC_COPY(pBuffer->hdr.address2, param.content.ctrlDataDeviceMacAddress);

	fc = DOT11_FC_DATA_NULL_QOS | (1 << DOT11_FC_TO_DS_SHIFT);
	COPY_WLAN_WORD(&pBuffer->hdr.fc, &fc);	/* copy with endianess handling. */

	qosControl = (TI_UINT16) userPriority;
	qosControl <<= QOS_CONTROL_UP_SHIFT;
	COPY_WLAN_WORD(&pBuffer->hdr.qosControl, &qosControl);	/* copy with endianess handling. */

	size = WLAN_QOS_HDR_LEN;

	pTemplate->len = size;

	return TI_OK;
}
开发者ID:blueskycoco,项目名称:wang-linux,代码行数:61,代码来源:templates.c


示例11: StaCap_Create

/**
 * \fn     staCap_Create
 * \brief  Create the staCap module.
 *
 * Allocate and clear the staCap module object.
 *
 * \param  hOs - Handle to Os Abstraction Layer
 * \return Handle of the allocated object
 * \sa     staCap_Destroy
 */
TI_HANDLE StaCap_Create (TI_HANDLE hOs)
{
	TI_HANDLE hStaCap;

	/* allocate module object */
	hStaCap = os_memoryAlloc (hOs, sizeof(TStaCap));

	if (!hStaCap)
	{
		WLAN_OS_REPORT (("StaCap_Create():  Allocation failed!!\n"));
		return NULL;
	}

	os_memoryZero (hOs, hStaCap, (sizeof(TStaCap)));

	return (hStaCap);
}
开发者ID:Achotjan,项目名称:FreeXperia,代码行数:27,代码来源:StaCap.c


示例12: cmdQueue_Create

/*
 * \brief	Create the TCmdQueue object
 * 
 * \param  hOs  - OS module object handle
 * \return Handle to the created object
 * 
 * \par Description
 * Calling this function creates a CmdQueue object
 * 
 * \sa cmdQueue_Destroy
 */
TI_HANDLE cmdQueue_Create (TI_HANDLE hOs)
{
    TCmdQueue  *pCmdQueue;

    pCmdQueue = os_memoryAlloc (hOs, sizeof(TCmdQueue));
    if (pCmdQueue == NULL)
    {
        WLAN_OS_REPORT(("FATAL ERROR: cmdQueue_Create(): Error Creating aCmdQueue - Aborting\n"));
        return NULL;
    }

    /* reset control module control block */
    os_memoryZero (hOs, pCmdQueue, sizeof(TCmdQueue));
    pCmdQueue->hOs = hOs;
    
    return pCmdQueue;   
}
开发者ID:chambejp,项目名称:hardware,代码行数:28,代码来源:CmdQueue.c


示例13: mainSec_create

/**
*
* mainSec_create
*
* \b Description: 
*
* Allocate memory for the main security context, and create all the rest of the needed contexts.
*
* \b ARGS:
*
*  I - hOs - OS handle for OS operations.
*
* \b RETURNS:
*
*  pointer to main security context. If failed, returns NULL.
*
* \sa 
*/
mainSec_t* mainSec_create(TI_HANDLE hOs)
{
    mainSec_t   *pHandle;
    TI_STATUS       status;

    /* allocate association context memory */
    pHandle = (mainSec_t*)os_memoryAlloc(hOs, sizeof(mainSec_t));
    if (pHandle == NULL)
    {
        return NULL;
    }

    os_memoryZero(hOs, pHandle, sizeof(mainSec_t));

    /* allocate memory for association state machine */
    status = fsm_Create(hOs, &pHandle->pMainSecSm, MAIN_SEC_MAX_NUM_STATES, MAIN_SEC_MAX_NUM_EVENTS);
    if (status != TI_OK)
    {
        os_memoryFree(hOs, pHandle, sizeof(mainSec_t));
        return NULL;
    }

    pHandle->pMainKeys = mainKeys_create(hOs);
    if (pHandle->pMainKeys == NULL)
    {
        fsm_Unload(hOs, pHandle->pMainSecSm);
        os_memoryFree(hOs, pHandle, sizeof(mainSec_t));
        return NULL;
    }

    pHandle->pKeyParser = pHandle->pMainKeys->pKeyParser;
    pHandle->hOs = hOs;
    
    /* created only for external security mode */
    pHandle->pExternalSec = externalSec_create(hOs);

    if (pHandle->pExternalSec == NULL)
    {
        fsm_Unload(hOs, pHandle->pMainSecSm);
        mainKeys_unload(pHandle->pMainKeys);
        os_memoryFree(hOs, pHandle, sizeof(mainSec_t));
        return NULL;
    }

    return pHandle;
}
开发者ID:ACSOP,项目名称:android_hardware_ti_wlan,代码行数:64,代码来源:mainSecSm.c


示例14: measurementSRVHandleNoiseHistogramComplete

/** 
 * \\n
 * \date 15-November-2005\n
 * \brief Handles a noise histogram timer expiry, by requesting noise histogram
 * reaults from the FW.\n
 *
 * Function Scope \e Private.\n
 * \param hMeasurementSRV - handle to the measurement SRV object.\n
 * \param requestIndex - index of the beacon request in the request structure.\n
 */
void measurementSRVHandleNoiseHistogramComplete( TI_HANDLE hMeasurementSRV, TI_INT32 requestIndex )
{
    measurementSRV_t		    *pMeasurementSRV = (measurementSRV_t*)hMeasurementSRV;
	TTwdParamInfo	            tTwdParam;
    TNoiseHistogram             pNoiseHistParams;
	TI_STATUS	                status;
	
    /* Set Noise Histogram Cmd Params */
    pNoiseHistParams.cmd = STOP_NOISE_HIST;
    pNoiseHistParams.sampleInterval = 0;
    os_memoryZero( pMeasurementSRV->hOS, &(pNoiseHistParams.ranges[0]), MEASUREMENT_NOISE_HISTOGRAM_NUM_OF_RANGES );
    
    /* Send a Stop command to the FW */
    status = cmdBld_CmdNoiseHistogram (pMeasurementSRV->hCmdBld, &pNoiseHistParams, NULL, NULL);
    
    if ( TI_OK != status )
	{
		/* mark that the specific measurment type has failed */
		pMeasurementSRV->msrReply.msrTypes[ requestIndex ].status = TI_NOK;

		/* if all measurement types has finished, an event will be send by request timer expired */
	}

   	/* Get measurement results */
	tTwdParam.paramType = TWD_NOISE_HISTOGRAM_PARAM_ID;
    tTwdParam.content.interogateCmdCBParams.fCb = (void *)MacServices_measurementSRV_noiseHistCallBack;
    tTwdParam.content.interogateCmdCBParams.hCb = hMeasurementSRV;
    tTwdParam.content.interogateCmdCBParams.pCb = (TI_UINT8*)&pMeasurementSRV->noiseHistogramResults;
	status = cmdBld_GetParam (pMeasurementSRV->hCmdBld, &tTwdParam);

    if ( TI_OK == status )
    {
		/* setting On the Waitng for Noise Histogram Results Bit */
		pMeasurementSRV->pendingParamCBs |= MSR_SRV_WAITING_NOISE_HIST_RESULTS;

	}
    else
    {

		/* mark that the specific measurment type has failed */
		pMeasurementSRV->msrReply.msrTypes[ requestIndex ].status = TI_NOK;

		/* if all measurement types has finished, an event will be send by request timer expired */
    }
}
开发者ID:bluewater-cn,项目名称:ti_wilink,代码行数:55,代码来源:MeasurementSrv.c


示例15: keyDeriveAes_derive

TI_STATUS keyDeriveAes_derive(struct _keyDerive_t *pKeyDerive, encodedKeyMaterial_t *pEncodedKey)
{
	TI_STATUS status;
	TSecurityKeys	key;
	keyMaterialAes_t   *keyMaterialAes = NULL;
	
	/* Small verification */
	if ((pEncodedKey==NULL) || (pKeyDerive == NULL))
	{
		return TI_NOK;
	}
	
    /* Note: Reduce 2 bytes from the size of keyMaterialAes_t in the following check, 
	         because it is added as padding at the end due to the OS_PACKED removal. */
    if ( pEncodedKey->keyLen < (sizeof(keyMaterialAes_t) - 2) )
	{
TRACE1(pKeyDerive->hReport, REPORT_SEVERITY_ERROR, "KEY_DERIVE_AES: ERROR: wrong key length %d !!!\n",						pEncodedKey->keyLen);
		return TI_NOK;
	}

	keyMaterialAes = (keyMaterialAes_t*)pEncodedKey->pData;

	
	/* Fill security key structure */
	os_memoryZero(pKeyDerive->hOs, &key, sizeof(TSecurityKeys));

	key.keyType   = KEY_AES;
	key.keyIndex  = (TI_UINT8)pEncodedKey->keyId;
	key.encLen    = DERIVE_AES_KEY_LEN;
	os_memoryCopy(pKeyDerive->hOs, (void *)key.encKey, pEncodedKey->pData + MAC_ADDR_LEN+KEY_RSC_LEN, 
		          DERIVE_AES_KEY_LEN);

	/* Copy MAC address key */
	MAC_COPY (key.macAddress, keyMaterialAes->macAddress);
	/* Copy RSC */
	os_memoryCopy(pKeyDerive->hOs, (void *)key.keyRsc, (void *)keyMaterialAes->keyRSC, KEY_RSC_LEN);

	status = pKeyDerive->pMainKeys->setKey(pKeyDerive->pMainKeys, &key);
	if (status == TI_OK)
	{
		os_memoryCopy(pKeyDerive->hOs, &pKeyDerive->key, pEncodedKey, sizeof(encodedKeyMaterial_t));
	}
	
	return status;
}
开发者ID:Achotjan,项目名称:FreeXperia,代码行数:45,代码来源:keyDeriveAes.c


示例16: RxQueue_Create

/**
 * \fn     RxQueue_Create()
 * \brief  Create the RxQueue module.
 *
 * Allocate and clear the RxQueue module object.
 *
 * \param  hOs - Handle to Os Abstraction Layer
 * \return Handle of the allocated object
 * \sa     RxQueue_Destroy
 */
TI_HANDLE RxQueue_Create (TI_HANDLE hOs)
{
	TRxQueue *pRxQueue;

	/* allocate module object */
	pRxQueue = os_memoryAlloc (hOs, sizeof(TRxQueue));

	if (!pRxQueue) {
		WLAN_OS_REPORT (("RxQueue_Create():  Allocation failed!!\n"));
		return NULL;
	}

	os_memoryZero (hOs, pRxQueue, (sizeof(TRxQueue)));

	pRxQueue->hOs = hOs;

	return (pRxQueue);
}
开发者ID:IdeosDev,项目名称:vendor_ti_wlan,代码行数:28,代码来源:RxQueue.c


示例17: pwrState_Create

TI_HANDLE pwrState_Create (TI_HANDLE hOs)
{
	TPwrState *pPwrState = NULL;

	pPwrState = (TPwrState*) os_memoryAlloc (hOs, sizeof(TPwrState));

	if ( NULL == pPwrState )
	{
		WLAN_OS_REPORT(("%s: Memory Allocation Error!\n", __func__));
		return NULL;
	}

	os_memoryZero (hOs, pPwrState, sizeof(TPwrState));

	pPwrState->hOs = hOs;

	return pPwrState;
}
开发者ID:chambejp,项目名称:hardware,代码行数:18,代码来源:pwrState.c


示例18: cmdBld_CmdIeBssStart

TI_STATUS cmdBld_CmdIeBssStart (TI_HANDLE hCmdBld, BssStartCmd_t *pBssStartParams, void* fCB, TI_HANDLE hCb)
{
    TCmdBld *pCmdBld    = (TCmdBld *)hCmdBld;
    BssStartCmd_t       tCmdBssStart;
    BssStartCmd_t       *pCmd = &tCmdBssStart   ;
    TI_UINT8            tmpSsid[33] = {0}; /* For debug only - Remove later!!*/

    os_memoryZero (pCmdBld->hOs, (void *)pCmd, sizeof(*pCmd));

    pCmd->bssIndex          = pBssStartParams->bssIndex;
    pCmd->beaconInterval    = ENDIAN_HANDLE_WORD(pBssStartParams->beaconInterval);
    pCmd->dtimInterval      = pBssStartParams->dtimInterval;
    pCmd->agingPeriod       = ENDIAN_HANDLE_WORD(pBssStartParams->agingPeriod);
    pCmd->channelNumber     = pBssStartParams->channelNumber;
    pCmd->band              = pBssStartParams->band;
    pCmd->broadcastHLID     = pBssStartParams->broadcastHLID;
    pCmd->globalHLID        = pBssStartParams->globalHLID;
    pCmd->basicRateSet      = ENDIAN_HANDLE_LONG(pBssStartParams->basicRateSet);
    pCmd->beaconExpiry      = pBssStartParams->beaconExpiry;

    os_memoryCopy(pCmdBld->hOs, &pCmd->ssid, &pBssStartParams->ssid, sizeof(SSID_t));
    os_memoryCopy(pCmdBld->hOs, pCmd->bssid, pBssStartParams->bssid, MAC_ADDR_LEN);

    os_memoryCopy(pCmdBld->hOs, &tmpSsid, &pBssStartParams->ssid.ssid, pBssStartParams->ssid.ssidLength);
    tmpSsid[pBssStartParams->ssid.ssidLength]= '\0';

    WLAN_OS_REPORT(("\n%s: ------------------------------------------->\n", __FUNCTION__));
    WLAN_OS_REPORT(("ssid=%s len=%d bssid=%02X:%02X:%02X:%02X:%02X:%02X Indx=%d\n", tmpSsid, pCmd->ssid.ssidLength, 
                    pCmd->bssid[0],pCmd->bssid[1],pCmd->bssid[2],pCmd->bssid[3],pCmd->bssid[4],pCmd->bssid[5], pCmd->bssIndex));
    WLAN_OS_REPORT(("beacon=%d dtim=%d aging=%d chan=%d band=%d\n",
                    pCmd->beaconInterval, pCmd->dtimInterval, pCmd->agingPeriod, pCmd->channelNumber, pCmd->band));
    WLAN_OS_REPORT(("brdcstHLID=%d globalHLID=%d ssidType=%d basicRates=0x%04x beacon expiry=%d\n",
                    pCmd->broadcastHLID, pCmd->globalHLID, pCmd->ssid.ssidType, (TI_UINT32)pCmd->basicRateSet, pCmd->beaconExpiry));    
    WLAN_OS_REPORT(("%s: <--------------------------------------------\n", __FUNCTION__));


    return cmdQueue_SendCommand (pCmdBld->hCmdQueue,
                             CMD_BSS_START,
                             (void *)pCmd,
                             sizeof(*pCmd),
                             fCB,
                             hCb,
                             NULL);
}
开发者ID:3ig,项目名称:Xperia-2011-Official-Kernel-Sources,代码行数:44,代码来源:CmdBldCmdIE.c


示例19: removeSiteEntry

/************************************************************************
 *                        removeSiteEntry								*
 ************************************************************************
DESCRIPTION: Removes the site entry from the site table
                                                                                                   
INPUT:      pSiteMgr		   - Handle to site mgr
            pCurrSiteTblParams - Pointer to current site table parameters   
            hashPtr			   - Pointer to the site entry      


OUTPUT:		

RETURN:     

************************************************************************/
void removeSiteEntry(siteMgr_t  *pSiteMgr, 
                     siteTablesParams_t  *pCurrSiteTblParams,
                     siteEntry_t         *pSiteEntry)
{
	TI_UINT8			index; 

	if (pSiteEntry == NULL)
	{
TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "REMOVAL failure, site is NULL\n\n");
		return;
	}

	if (pCurrSiteTblParams->numOfSites == 0)
	{
TRACE0(pSiteMgr->hReport, REPORT_SEVERITY_ERROR, "REMOVAL failure, site table is empty\n\n");
		return;
	}

TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "removeSiteEntry REMOVE ssid=, bssid= 0x%x-0x%x-0x%x-0x%x-0x%x-0x%x\n\n",			   pSiteEntry->bssid[0], pSiteEntry->bssid[1], pSiteEntry->bssid[2],			   pSiteEntry->bssid[3], pSiteEntry->bssid[4], pSiteEntry->bssid[5] );

	pCurrSiteTblParams->numOfSites--;
		
	/* Now remove (exclude) hashPtr entry from the linked list */

TRACE6(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, "REMOVAL success, bssid: %X-%X-%X-%X-%X-%X\n\n", pSiteEntry->bssid[0], pSiteEntry->bssid[1], pSiteEntry->bssid[2], pSiteEntry->bssid[3], pSiteEntry->bssid[4], pSiteEntry->bssid[5]);
TRACE1(pSiteMgr->hReport, REPORT_SEVERITY_INFORMATION, " SITE TABLE remaining entries number  %d \n", pCurrSiteTblParams->numOfSites);
	
	/* Clean the rest of the entry structure */
	index = pSiteEntry->index;     /* keep the index of the siteTable entry */
	os_memoryZero(pSiteMgr->hOs, pSiteEntry, sizeof(siteEntry_t));

    /* This is not required!!!! - Remove!!*/
	pSiteEntry->dtimPeriod = 1;
	pSiteEntry->siteType = SITE_NULL;
	pSiteEntry->index = index;   /* restore the index of the siteTable */

	/* if removing previous primary site - update the link */
	if (pSiteEntry == pSiteMgr->pSitesMgmtParams->pPrevPrimarySite)
	{
		pSiteMgr->pSitesMgmtParams->pPrevPrimarySite = NULL;
	}

	return;
}
开发者ID:Achotjan,项目名称:FreeXperia,代码行数:59,代码来源:siteHash.c


示例20: busDrv_Create

/** 
 * \fn     busDrv_Create 
 * \brief  Create the module
 * 
 * Create and clear the bus driver's object, and the SDIO-adapter.
 * 
 * \note   
 * \param  hOs - Handle to Os Abstraction Layer
 * \return Handle of the allocated object, NULL if allocation failed 
 * \sa     busDrv_Destroy
 */ 
TI_HANDLE busDrv_Create (TI_HANDLE hOs)
{
    TI_HANDLE   hBusDrv;
    TBusDrvObj *pBusDrv;

    hBusDrv = os_memoryAlloc(hOs, sizeof(TBusDrvObj));
    if (hBusDrv == NULL)
    {
        return NULL;
    }
    
    pBusDrv = (TBusDrvObj *)hBusDrv;

    os_memoryZero(hOs, hBusDrv, sizeof(TBusDrvObj));
    
    pBusDrv->hOs = hOs;

    return pBusDrv;
}
开发者ID:CyanogenDefy,项目名称:android_system_wlan_ti,代码行数:30,代码来源:SdioBusDrv.c



注:本文中的os_memoryZero函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ os_memset函数代码示例发布时间:2022-05-30
下一篇:
C++ os_memoryFree函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap