本文整理汇总了C++中WLAN_OS_REPORT函数的典型用法代码示例。如果您正苦于以下问题:C++ WLAN_OS_REPORT函数的具体用法?C++ WLAN_OS_REPORT怎么用?C++ WLAN_OS_REPORT使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了WLAN_OS_REPORT函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: printPrimarySiteDesc
static void printPrimarySiteDesc(siteMgr_t *pSiteMgr, OS_802_11_BSSID *pPrimarySiteDesc)
{
TI_UINT8 rateIndex, maxNumOfRates;
char ssid[MAX_SSID_LEN + 1];
WLAN_OS_REPORT(("\n^^^^^^^^^^^^^^^ PRIMARY SITE DESCRIPTION ^^^^^^^^^^^^^^^^^^^\n\n"));
/* MacAddress */
WLAN_OS_REPORT(("BSSID 0x%X-0x%X-0x%X-0x%X-0x%X-0x%X\n", pPrimarySiteDesc->MacAddress[0],
pPrimarySiteDesc->MacAddress[1],
pPrimarySiteDesc->MacAddress[2],
pPrimarySiteDesc->MacAddress[3],
pPrimarySiteDesc->MacAddress[4],
pPrimarySiteDesc->MacAddress[5]));
/* Capabilities */
WLAN_OS_REPORT(("Capabilities 0x%X\n", pPrimarySiteDesc->Capabilities));
/* SSID */
os_memoryCopy(pSiteMgr->hOs, ssid, (void *)pPrimarySiteDesc->Ssid.Ssid, pPrimarySiteDesc->Ssid.SsidLength);
ssid[pPrimarySiteDesc->Ssid.SsidLength] = 0;
WLAN_OS_REPORT(("SSID %s\n", ssid));
/* privacy */
if (pPrimarySiteDesc->Privacy == TI_TRUE)
WLAN_OS_REPORT(("Privacy ON\n"));
else
WLAN_OS_REPORT(("Privacy OFF\n"));
/* RSSI */
WLAN_OS_REPORT(("RSSI %d\n", ((pPrimarySiteDesc->Rssi)>>16)));
if (pPrimarySiteDesc->InfrastructureMode == os802_11IBSS)
WLAN_OS_REPORT(("BSS Type IBSS\n"));
else
WLAN_OS_REPORT(("BSS Type INFRASTRUCTURE\n"));
maxNumOfRates = sizeof(pPrimarySiteDesc->SupportedRates) / sizeof(pPrimarySiteDesc->SupportedRates[0]);
/* SupportedRates */
for (rateIndex = 0; rateIndex < maxNumOfRates; rateIndex++)
{
if (pPrimarySiteDesc->SupportedRates[rateIndex] != 0)
WLAN_OS_REPORT(("Rate 0x%X\n", pPrimarySiteDesc->SupportedRates[rateIndex]));
}
WLAN_OS_REPORT(("\n---------------------------------------------------------------\n\n", NULL));
}
示例2: txDataQ_FreeResources
/**
* \fn txDataQ_FreeResources
* \brief Free resources per Link and per Ac
*
*/
void txDataQ_FreeResources (TI_HANDLE hTxDataQ, TTxCtrlBlk *pPktCtrlBlk)
{
TTxDataQ *pTxDataQ = (TTxDataQ *)hTxDataQ;
TDataResources *pDataRsrc = &pTxDataQ->tDataRsrc;
TI_UINT32 uHlid = pPktCtrlBlk->tTxDescriptor.hlid;
TI_UINT32 uAc;
/* Free TxData resources only if previous allocated by txDataQ_AllocCheckResources */
if (!IS_TX_CTRL_FLAG_RSRC_ALLOCATED(pPktCtrlBlk)) {
return;
}
/* Enter critical section to protect classifier data and queue access */
context_EnterCriticalSection (pTxDataQ->hContext);
/* Extract original AC (saved by txDataQ_AllocCheckResources) from tx ctrl block */
uAc = GET_TX_CTRL_FLAG_RSRC_AC(pPktCtrlBlk);
/* new packet, Increment packet in use counters */
pDataRsrc->uPktInUse_PerAc[uAc]--;
pDataRsrc->uPktInUse_PerLink[uHlid]--;
/* Update Effective totals = Sum of Max ( PktInUse_PerAc [uAc], Min_PerAc[uAc] ), uAc=0..MAX_AC */
/* no need to calculate Sum of Max on every packet, just small check for this ac only */
if (pDataRsrc->uPktInUse_PerAc[uAc] >= pDataRsrc->uMinGuarantee_PerAc[uAc]) {
pDataRsrc->uEffectiveTotal_Ac--;
#ifdef TI_DBG
/* sanity check */
if (pDataRsrc->uEffectiveTotal_Ac < pDataRsrc->uEffectiveTotal_Ac_Min ) {
WLAN_OS_REPORT(("%s: uEffectiveTotal_Ac=%d is below MIN=%d\n", __FUNCTION__, pDataRsrc->uEffectiveTotal_Ac, pDataRsrc->uEffectiveTotal_Ac_Min));
}
#endif
}
/* Update Effective totals = Sum of Max ( PktInUse_PerLik [uHlid], Min_PerLink[uHlid] ), uHlid=0..MAX_LINK */
/* no need to calculate Sum of Max on every packet, just small check for this link only*/
if (pDataRsrc->uPktInUse_PerLink[uHlid] >= pDataRsrc->uMinGuarantee_PerLink) {
pDataRsrc->uEffectiveTotal_Link--;
#ifdef TI_DBG
/* sanity check */
if (pDataRsrc->uEffectiveTotal_Link < pDataRsrc->uEffectiveTotal_Link_Min ) {
WLAN_OS_REPORT(("%s: uEffectiveTotal_Ac=%d is below MIN=%d\n", __FUNCTION__, pDataRsrc->uEffectiveTotal_Link, pDataRsrc->uEffectiveTotal_Link_Min));
}
#endif
}
/* Leave critical section */
context_LeaveCriticalSection (pTxDataQ->hContext);
}
示例3: whalCtrl_PrintHwStatus
/*
* ----------------------------------------------------------------------------
* Function : whalCtrl_PrintHwStatus
*
* Input :
* Output :
* Process :
* Print the Recovery status
* Note(s) : Done
* -----------------------------------------------------------------------------
*/
int whalCtrl_PrintHwStatus(TI_HANDLE hWhalCtrl)
{
#ifdef REPORT_LOG
WHAL_CTRL *pWhalCtrl = (WHAL_CTRL *)hWhalCtrl;
whalCtrl_hwStatus_t *pHwStatus = &pWhalCtrl->pHwCtrl->HwStatus;
WLAN_OS_REPORT(("--------------- whalCtrl_PrintHwStatus ---------------\n\n"));
WLAN_OS_REPORT(("NumMboxErrDueToPeriodicBuiltInTestCheck = %d\n", pHwStatus->NumMboxErrDueToPeriodicBuiltInTestCheck));
WLAN_OS_REPORT(("NumMboxFailures = %d\n", pHwStatus->NumMboxFailures));
#endif
return OK;
}
示例4: bufferPool_create
/**
* \author Ronen Kalish\n
* \date 05-December-2005\n
* \brief Creates a buffer pool object
*
* Function Scope \e Public.\n
* \param hOS - handle to the OS object.\n
* \param numOfBuffers - the number of buffers to allocate for this pool.\n
* \param bufferSize - the size of each buffer in this pool.\n
* \return a handle to a buffer pool object, NULL if an error occurred.\n
*/
TI_HANDLE bufferPool_create( TI_HANDLE hOS, UINT32 numOfBuffers, UINT32 bufferSize )
{
/* allocate the buffer pool object */
bufferPool_t *pBufferPool = os_memoryAlloc( hOS, sizeof(bufferPool_t) );
if ( NULL == pBufferPool )
{
WLAN_OS_REPORT( ("ERROR: Failed to create buffer pool object") );
return NULL;
}
/*
* adjust buffer size if necessary - the buffer must at least store the pointer to the
* next free buffer when it is free.
*/
if ( sizeof( bufferPool_buffer_t ) > bufferSize )
{
bufferSize = sizeof( bufferPool_buffer_t );
}
/* nullify the buffer pool object */
os_memoryZero( hOS, pBufferPool, sizeof( bufferPool_t ) );
/* allocate the buffers */
pBufferPool->firstBuffer = pBufferPool->firstFreeBuffer = os_memoryAlloc( hOS, numOfBuffers * bufferSize );
if ( NULL == pBufferPool->firstBuffer )
{
WLAN_OS_REPORT( ("ERROR: Failed to allocate buffer storage space") );
bufferPool_destroy( (TI_HANDLE)pBufferPool );
return NULL;
}
/* store the OS handle */
pBufferPool->hOS = hOS;
/* store buffer pool information */
pBufferPool->bufferSize = bufferSize;
pBufferPool->numberOfBuffers = numOfBuffers;
/* initialize the free buffers list */
bufferPool_reinit( (TI_HANDLE)pBufferPool );
#ifdef TI_DBG
/* initialize debug information */
os_memoryZero( pBufferPool->hOS, &(pBufferPool->bufferPoolDbg), sizeof( bufferPoolDbg_t ) );
#endif /* TI_DBG */
return pBufferPool;
}
示例5: wlanDrvIf_Open
/**
* \fn wlanDrvIf_Open
* \brief Start driver
*
* Called by network stack upon opening network interface (ifconfig up).
* Can also be called from user application or CLI for flight mode.
* Start the driver initialization process up to OPERATIONAL state.
*
* \note
* \param dev - The driver network-interface handle
* \return 0 if succeeded, error if driver not available
* \sa wlanDrvIf_Release
*/
int wlanDrvIf_Open (struct net_device *dev)
{
TWlanDrvIfObj *drv = (TWlanDrvIfObj *)NETDEV_GET_PRIVATE(dev);
int status = 0;
WLAN_OS_REPORT(("wlanDrvIf_Open()\n"));
if (!drv->tCommon.hDrvMain)
{
ti_dprintf (TIWLAN_LOG_ERROR, "wlanDrvIf_Open() Driver not created!\n");
return -ENODEV;
}
if (drv->tCommon.eDriverState == DRV_STATE_FAILED)
{
ti_dprintf (TIWLAN_LOG_ERROR, "Driver in FAILED state!\n");
return -EPERM;
}
if (drv->tCommon.eDriverState != DRV_STATE_RUNNING)
{
status = wlanDrvIf_Start(dev);
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 31))
drv->netdev->hard_start_xmit = wlanDrvIf_Xmit;
#else
drv->netdev->netdev_ops = &tiwlan_ops_pri;
#endif
drv->netdev->addr_len = MAC_ADDR_LEN;
netif_start_queue (dev);
}
return status;
}
示例6: roamingMngr_create
TI_HANDLE roamingMngr_create(TI_HANDLE hOs)
{
roamingMngr_t *pRoamingMngr;
TI_UINT32 initVec;
initVec = 0;
pRoamingMngr = os_memoryAlloc(hOs, sizeof(roamingMngr_t));
if (pRoamingMngr == NULL)
return NULL;
initVec |= (1 << ROAMING_MNGR_CONTEXT_INIT_BIT);
pRoamingMngr->hOs = hOs;
/* allocate the state machine object */
pRoamingMngr->hRoamingSm = genSM_Create(hOs);
if (pRoamingMngr->hRoamingSm == NULL) {
roamingMngr_releaseModule(pRoamingMngr, initVec);
WLAN_OS_REPORT(("FATAL ERROR: roamingMngr_create(): Error Creating pRoamingSm - Aborting\n"));
return NULL;
}
initVec |= (1 << ROAMING_MNGR_SM_INIT_BIT);
return pRoamingMngr;
}
示例7: switchChannel_create
/**
*
* \b Description:
*
* This procedure is called by the config manager when the driver is created.
* It creates the SwitchChannel object.
*
* \b ARGS:
*
* I - hOs - OS context \n
*
* \b RETURNS:
*
* Handle to the SwitchChannel object.
*
* \sa
*/
TI_HANDLE switchChannel_create(TI_HANDLE hOs)
{
switchChannel_t *pSwitchChannel = NULL;
TI_UINT32 initVec = 0;
TI_STATUS status;
/* allocating the SwitchChannel object */
pSwitchChannel = os_memoryAlloc(hOs,sizeof(switchChannel_t));
if (pSwitchChannel == NULL)
return NULL;
initVec |= (1 << SC_INIT_BIT);
os_memoryZero(hOs, pSwitchChannel, sizeof(switchChannel_t));
pSwitchChannel->hOs = hOs;
status = fsm_Create(hOs, &pSwitchChannel->pSwitchChannelSm, SC_NUM_STATES, SC_NUM_EVENTS);
if (status != TI_OK) {
release_module(pSwitchChannel, initVec);
WLAN_OS_REPORT(("FATAL ERROR: switchChannel_create(): Error Creating pSwitchChannelSm - Aborting\n"));
return NULL;
}
initVec |= (1 << SC_SM_INIT_BIT);
return(pSwitchChannel);
}
示例8: bufferPool_releaseBuffer
/**
* \author Ronen Kalish\n
* \date 05-December-2005\n
* \brief Returns a buffer to the pool.\n
*
* Function Scope \e Public.\n
* \param hbufferPool - handle to a buffer pool object.\n
* \param buffer - the buffer object to return to the pool.\n
*/
void bufferPool_releaseBuffer( TI_HANDLE hBufferPool, bufferPool_buffer_t buffer )
{
bufferPool_t* pBufferPool = (bufferPool_t*)hBufferPool;
#ifdef TI_DBG
UINT32 bufferIndex;
/* check if the buffer is currently allocated */
bufferIndex = ((UINT8*)buffer - (UINT8*)pBufferPool->firstBuffer) / pBufferPool->bufferSize;
if ( (bufferIndex < BUFFER_POOL_MAX_NUM_OF_BUFFERS_FOR_DBG) &&
(FALSE == pBufferPool->bufferPoolDbg.bAllocated[ bufferIndex ]) )
{
/* count number of free attempts for already free buffers */
pBufferPool->bufferPoolDbg.NumberOfFreeBufferRefreed++;
WLAN_OS_REPORT(("%s: Trying to re-free Buffer %d\n", __FUNCTION__, bufferIndex));
return;
}
else
{
/* decrease the buffers in use count */
pBufferPool->bufferPoolDbg.numberOfUsedBuffers--;
/* mark that the specific buffer is not in use */
pBufferPool->bufferPoolDbg.bAllocated[ bufferIndex ] = FALSE;
}
#endif /* TI_DBG */
/* make the newly released buffer point to the current first free buffer */
*((bufferPool_buffer_t*)buffer) = pBufferPool->firstFreeBuffer;
/* make the newly release buffer the first free buffer */
pBufferPool->firstFreeBuffer = buffer;
}
示例9: PrintElertStus
void PrintElertStus()
{
TrafficMonitor_t *TrafficMonitor =(TrafficMonitor_t*)TestTrafficMonitor;
TrafficAlertElement_t *AlertElement = (TrafficAlertElement_t*)List_GetFirst(TrafficMonitor->NotificationRegList);
/* go over all the Down elements and check for alert ResetElment that ref to TrafficAlertElement*/
while (AlertElement) {
if (AlertElement->CurrentState == ALERT_WAIT_FOR_RESET)
WLAN_OS_REPORT(("TRAFF - ALERT ALERT_WAIT_FOR_RESET"));
else
WLAN_OS_REPORT(("TRAFF - ALERT ENABLED"));
AlertElement = (TrafficAlertElement_t*)List_GetNext(TrafficMonitor->NotificationRegList);
}
}
示例10: tmr_GetExpiry
/**
* \fn tmr_GetExpiry
* \brief Called by OS-API upon any timer expiry
*
* This is the common callback function called upon expiartion of any timer.
* It is called by the OS-API in timer expiry context and handles the transition
* to the driver's context for handling the expiry event.
*
* \note
* \param hTimerInfo - The specific timer handle
* \return void
* \sa tmr_HandleExpiry
*/
void tmr_GetExpiry (TI_HANDLE hTimerInfo)
{
TTimerInfo *pTimerInfo = (TTimerInfo *)hTimerInfo; /* The timer handle */
TTimerModule *pTimerModule = (TTimerModule *)pTimerInfo->hTimerModule; /* The timer module handle */
if (!pTimerModule) {
WLAN_OS_REPORT (("tmr_GetExpiry(): ERROR - NULL timer!\n"));
return;
}
/* Enter critical section */
context_EnterCriticalSection (pTimerModule->hContext);
/*
* If the expired timer was started when the driver's state was Operational,
* insert it to the Operational-queue
*/
if (pTimerInfo->bOperStateWhenStarted) {
que_Enqueue (pTimerModule->hOperQueue, hTimerInfo);
}
/*
* Else (started when driver's state was NOT-Operational), if now the state is still
* NOT Operational insert it to the Init-queue.
* (If state changed from non-operational to operational the event is ignored)
*/
else if (!pTimerModule->bOperState) {
que_Enqueue (pTimerModule->hInitQueue, hTimerInfo);
}
/* Leave critical section */
context_LeaveCriticalSection (pTimerModule->hContext);
/* Request switch to driver context for handling timer events */
context_RequestSchedule (pTimerModule->hContext, pTimerModule->uContextId);
}
示例11: MacServices_init
/****************************************************************************************
* MacServices_init *
*****************************************************************************************
DESCRIPTION: Initializes the MacServices module
INPUT: hMacServices - handle to the Mac Services object.\n
hReport - handle to the report object.\n
hHalCtrl - handle to the HAL ctrl object.\n
OUTPUT:
RETURN:
****************************************************************************************/
void MacServices_init (TI_HANDLE hMacServices,
TI_HANDLE hReport,
TI_HANDLE hTWD,
TI_HANDLE hCmdBld,
TI_HANDLE hEventMbox,
TI_HANDLE hTimer)
{
MacServices_t *pMacServices = (MacServices_t*)hMacServices;
MacServices_scanSRV_init (hMacServices, hReport, hTWD, hTimer, hEventMbox, hCmdBld);
MacServices_measurementSRV_init (pMacServices->hMeasurementSRV,
hReport,
hCmdBld,
hEventMbox,
pMacServices->hPowerSrv,
hTimer);
if (powerSrv_init (pMacServices->hPowerSrv,
hReport,
hEventMbox,
hCmdBld,
hTimer) != TI_OK)
{
WLAN_OS_REPORT(("\n.....PowerSRV_init configuration failure \n"));
/*return TI_NOK;*/
}
}
示例12: cmdDispatch_GetParam
/**
* \fn cmdDispatch_GetParam
* \brief Get a driver parameter
*
* Called by the OS abstraction layer in order to get a parameter the driver.
* If the parameter can not be get from outside the driver it returns a failure status.
* The parameter is get from the module that uses as its father in the system
* (refer to the file paramOut.h for more explanations).
*
* \note
* \param hCmdDispatch - The object
* \param param - The parameter information
* \return result of parameter getting
* \sa
*/
TI_STATUS cmdDispatch_GetParam (TI_HANDLE hCmdDispatch, void *param)
{
TCmdDispatchObj *pCmdDispatch = (TCmdDispatchObj *) hCmdDispatch;
paramInfo_t *pParam = (paramInfo_t *) param;
TI_UINT32 moduleNumber;
TI_STATUS status;
moduleNumber = GET_PARAM_MODULE_NUMBER(pParam->paramType);
if (moduleNumber > MAX_PARAM_MODULE_NUMBER)
{
return PARAM_MODULE_NUMBER_INVALID;
}
if ((pCmdDispatch->paramAccessTable[moduleNumber - 1].set == 0) ||
(pCmdDispatch->paramAccessTable[moduleNumber - 1].get == 0) ||
(pCmdDispatch->paramAccessTable[moduleNumber - 1].handle == 0))
{
WLAN_OS_REPORT(("cmdDispatch_GetParam(): NULL pointers!!!, return, ParamType=0x%x\n", pParam->paramType));
return TI_NOK;
}
TRACE2(pCmdDispatch->hReport, REPORT_SEVERITY_INFORMATION , "cmdDispatch_GetParam(): ParamType=0x%x, ModuleNumber=0x%x\n", pParam->paramType, moduleNumber);
status = pCmdDispatch->paramAccessTable[moduleNumber - 1].get(pCmdDispatch->paramAccessTable[moduleNumber - 1].handle, pParam);
return status;
}
示例13: tmr_DestroyTimer
/**
* \fn tmr_DestroyTimer
* \brief Destroy the specified timer
*
* Destroy the specified timer object, icluding the timer in the OS-API.
*
* \note This timer destruction function should be used before tmr_Destroy() is executed!!
* \param hTimerInfo - The timer handle
* \return TI_OK on success or TI_NOK on failure
* \sa tmr_CreateTimer
*/
TI_STATUS tmr_DestroyTimer (TI_HANDLE hTimerInfo)
{
TTimerInfo *pTimerInfo = (TTimerInfo *)hTimerInfo; /* The timer handle */
TTimerModule *pTimerModule; /* The timer module handle */
if (!pTimerInfo) {
return TI_NOK;
}
pTimerModule = (TTimerModule *)pTimerInfo->hTimerModule;
if (!pTimerModule) {
WLAN_OS_REPORT (("tmr_DestroyTimer(): ERROR - NULL timer!\n"));
/* Free the timer object */
os_memoryFree (NULL, hTimerInfo, sizeof(TTimerInfo));
return TI_NOK;
}
/* Free the OS-API timer */
if (pTimerInfo->hOsTimerObj) {
os_timerDestroy (pTimerModule->hOs, pTimerInfo->hOsTimerObj);
pTimerModule->uTimersCount--; /* update created timers number */
}
/* Free the timer object */
os_memoryFree (pTimerModule->hOs, hTimerInfo, sizeof(TTimerInfo));
return TI_OK;
}
示例14: MibDebugFunction
void MibDebugFunction(TI_HANDLE hTWD ,TI_UINT32 funcType, void* pParam)
{
if (hTWD == NULL)
{
return;
}
switch (funcType)
{
case DBG_MIB_PRINT_HELP:
mibDbgPrintFunctions();
break;
case DBG_MIB_GET_ARP_TABLE:
mibDbgGetArpIpTable(hTWD);
break;
case DBG_MIB_GET_GROUP_ADDRESS_TABLE:
mibDbgGetGroupAddressTable(hTWD);
break;
case DBG_MIB_GET_COUNTER_TABLE:
mibDbgGetCounterTable(hTWD);
break;
case DBG_MIB_MODIFY_CTS_TO_SELF:
mibDbgModifyCtsToSelf(hTWD, pParam);
break;
case DBG_MIB_GET_CTS_TO_SELF:
mibDbgGetCtsToSelf(hTWD);
break;
case DBG_MIB_SET_MAX_RX_LIFE_TIME:
mibDbgSetMaxRxLifetime(hTWD, pParam);
break;
default:
WLAN_OS_REPORT(("MIB Debug: Invalid function type in MIB Debug function: %d\n", funcType));
break;
}
}
示例15: que_Create
/**
* \fn que_Create
* \brief Create a queue.
*
* Allocate and init a queue object.
*
* \note
* \param hOs - Handle to Os Abstraction Layer
* \param hReport - Handle to report module
* \param uLimit - Maximum items to store in queue
* \param uNodeHeaderOffset - Offset of NodeHeader field from the entry of the queued item.
* \return Handle to the allocated queue
* \sa que_Destroy
*/
TI_HANDLE que_Create (TI_HANDLE hOs, TI_HANDLE hReport, TI_UINT32 uLimit, TI_UINT32 uNodeHeaderOffset)
{
TQueue *pQue;
/* allocate queue module */
pQue = os_memoryAlloc (hOs, sizeof(TQueue));
if (!pQue)
{
WLAN_OS_REPORT (("Error allocating the Queue Module\n"));
return NULL;
}
os_memoryZero (hOs, pQue, sizeof(TQueue));
/* Intialize the queue header */
pQue->tHead.pNext = pQue->tHead.pPrev = &pQue->tHead;
/* Set the Queue parameters */
pQue->hOs = hOs;
pQue->hReport = hReport;
pQue->uLimit = uLimit;
pQue->uNodeHeaderOffset = uNodeHeaderOffset;
return (TI_HANDLE)pQue;
}