当前位置: 首页>>代码示例>>C++>>正文


C++ VOS_IS_STATUS_SUCCESS函数代码示例

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


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

示例1: bapRsnSendEapolFrame

/*
    \brief bapRsnSendEapolFrame
    To push an eapol frame to TL. 

    \param pAniPkt - a ready eapol frame that is prepared in tAniPacket format
*/
VOS_STATUS bapRsnSendEapolFrame( v_PVOID_t pvosGCtx, tAniPacket *pAniPkt )
{
    VOS_STATUS status;
    vos_pkt_t *pPacket = NULL;
    v_U8_t *pData, *pSrc;
    int pktLen = aniAsfPacketGetBytes( pAniPkt, &pSrc );

    if( pktLen <= 0 )
    {
        return VOS_STATUS_E_EMPTY;
    }
    status = bapRsnAcquirePacket( &pPacket, &pData, pktLen );
    if( VOS_IS_STATUS_SUCCESS( status ) && ( NULL != pPacket ))
    {
        vos_mem_copy( pData, pSrc, pktLen );
        //Send the packet, need to check whether we have an outstanding packet first.
        status = bapRsnTxFrame( pvosGCtx, pPacket );
        if( !VOS_IS_STATUS_SUCCESS( status ) )
        {
            vos_pkt_return_packet( pPacket );
        }
    }

    return ( status );
}
开发者ID:AmperificSuperKANG,项目名称:android_kernel_mako,代码行数:31,代码来源:bapRsnTxRx.c

示例2: hddDevTmUnregisterNotifyCallback

/*----------------------------------------------------------------------------

   @brief Un-Register function
        Un-Register Thermal Mitigation Level Changed handle callback function

   @param hdd_context_t pHddCtx
        Global hdd context

   @return General status code
        VOS_STATUS_SUCCESS       Un-Registration Success
        VOS_STATUS_E_FAILURE     Un-Registration Fail

----------------------------------------------------------------------------*/
VOS_STATUS hddDevTmUnregisterNotifyCallback(hdd_context_t *pHddCtx)
{
   VOS_STATUS vosStatus = VOS_STATUS_SUCCESS;

   wcnss_unregister_thermal_mitigation(hddDevTmLevelChangedHandler);

   if(VOS_TIMER_STATE_RUNNING ==
           vos_timer_getCurrentState(&pHddCtx->tmInfo.txSleepTimer))
   {
       vosStatus = vos_timer_stop(&pHddCtx->tmInfo.txSleepTimer);
       if(!VOS_IS_STATUS_SUCCESS(vosStatus))
       {
           VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
                                "%s: Timer stop fail", __func__);
       }
   }

   // Destroy the vos timer...
   vosStatus = vos_timer_destroy(&pHddCtx->tmInfo.txSleepTimer);
   if (!VOS_IS_STATUS_SUCCESS(vosStatus))
   {
       VOS_TRACE(VOS_MODULE_ID_HDD,VOS_TRACE_LEVEL_ERROR,
                            "%s: Fail to destroy timer", __func__);
   }

   return VOS_STATUS_SUCCESS;
}
开发者ID:AmperificSuperKANG,项目名称:android_kernel_mako,代码行数:40,代码来源:wlan_hdd_dev_pwr.c

示例3: bapRsnAcquirePacket

//To reserve a vos_packet for Tx eapol frame
//If success, pPacket is the packet and pData points to the head.
static VOS_STATUS bapRsnAcquirePacket( vos_pkt_t **ppPacket, v_U8_t **ppData, v_U16_t size )
{
    VOS_STATUS status;
    vos_pkt_t *pPacket;

    status = vos_pkt_get_packet( &pPacket, VOS_PKT_TYPE_TX_802_11_MGMT, size, 1, 
                                    VOS_TRUE, NULL, NULL );
    if( VOS_IS_STATUS_SUCCESS( status ) )
    {
        status = vos_pkt_reserve_head( pPacket, (v_VOID_t **)ppData, size );
        if( !VOS_IS_STATUS_SUCCESS( status ) )
        {
            VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
                "bapRsnAcquirePacket failed to reserve size = %d\n", size );
            vos_pkt_return_packet( pPacket );
        }
        else
        {
            *ppPacket = pPacket;
        }
    }
    else
    {
        VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
                "bapRsnAcquirePacket failed to get vos_pkt\n" );
    }

    return ( status );
}
开发者ID:AmperificSuperKANG,项目名称:android_kernel_mako,代码行数:31,代码来源:bapRsnTxRx.c

示例4: suppRsnTxCompleteHandler

static int suppRsnTxCompleteHandler( v_PVOID_t pvosGCtx, vos_pkt_t *pPacket, VOS_STATUS retStatus )
{
    tBtampContext *ctx = (tBtampContext *)VOS_GET_BAP_CB( pvosGCtx );
    tAuthRsnFsm *fsm;

    vos_pkt_return_packet( pPacket );
    if (pvosGCtx == NULL)
    {
        VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
                     "param is NULL in %s", __func__);

        return ANI_ERROR;
    }

    if (NULL == ctx) 
    {
        VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
                     "ctx is NULL in %s", __func__);

        return ANI_ERROR;
    }

    fsm = &ctx->uFsm.authFsm;
    if (NULL == fsm) 
    {
        VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
                     "fsm is NULL in %s", __func__);

        return ANI_ERROR;
    }

    //Synchronization needed
    
    if(!VOS_IS_STATUS_SUCCESS( retStatus ) )
    {
        //This is bad.
        VOS_TRACE( VOS_MODULE_ID_BAP, VOS_TRACE_LEVEL_ERROR,
            "Supp: TL Tx complete with error %d current state is %d\n", retStatus, fsm->currentState );
        if( fsm->numTries <= suppConsts.maxTries )
        {
            //retransmit
            fsm->numTries++;
            if( !VOS_IS_STATUS_SUCCESS( bapRsnSendEapolFrame( fsm->ctx->pvosGCtx, fsm->lastEapol ) ) )
            {
                bapSuppDisconnect( fsm->ctx->pvosGCtx );
            }
        }
        else
        {
            bapSuppDisconnect( fsm->ctx->pvosGCtx );
        }
    }

    return ANI_OK;
}
开发者ID:supercairos,项目名称:android_kernel_doro_msm8916_2,代码行数:55,代码来源:bapRsn8021xSuppRsnFsm.c

示例5: vos_wda_shutdown

VOS_STATUS vos_wda_shutdown(v_CONTEXT_t vosContext)
{
  VOS_STATUS vosStatus;
  vosStatus = WDA_shutdown(vosContext, VOS_FALSE);

  if (!VOS_IS_STATUS_SUCCESS(vosStatus))
  {
     VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
         "%s: failed to shutdown WDA", __func__);
     VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) );
  }
  return vosStatus;
}
开发者ID:qtekfun,项目名称:htcDesire820Kernel,代码行数:13,代码来源:vos_api.c

示例6: hdd_tx_complete_cbk

/**============================================================================
  @brief hdd_tx_complete_cbk() - Callback function invoked by TL
  to indicate that a packet has been transmitted across the SDIO bus
  succesfully. OS packet resources can be released after this cbk.

  @param vosContext   : [in] pointer to VOS context   
  @param pVosPacket   : [in] pointer to VOS packet (containing skb) 
  @param vosStatusIn  : [in] status of the transmission 

  @return             : VOS_STATUS_E_FAILURE if any errors encountered 
                      : VOS_STATUS_SUCCESS otherwise
  ===========================================================================*/
VOS_STATUS hdd_tx_complete_cbk( v_VOID_t *vosContext, 
                                vos_pkt_t *pVosPacket, 
                                VOS_STATUS vosStatusIn )
{
   VOS_STATUS status = VOS_STATUS_SUCCESS;
   hdd_adapter_t *pAdapter = NULL;   
   hdd_context_t *pHddCtx = NULL;
   void* pOsPkt = NULL;
   
   if( ( NULL == vosContext ) || ( NULL == pVosPacket )  )
   {
      VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,"%s: Null params being passed", __FUNCTION__);
      return VOS_STATUS_E_FAILURE; 
   }

   //Return the skb to the OS
   status = vos_pkt_get_os_packet( pVosPacket, &pOsPkt, VOS_TRUE );
   if(!VOS_IS_STATUS_SUCCESS( status ))
   {
      //This is bad but still try to free the VOSS resources if we can
      VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,"%s: Failure extracting skb from vos pkt", __FUNCTION__);
      vos_pkt_return_packet( pVosPacket );
      return VOS_STATUS_E_FAILURE;
   }
   
   //Get the HDD context.
   pHddCtx = (hdd_context_t *)vos_get_context( VOS_MODULE_ID_HDD, vosContext );
   //Get the Adapter context.
   pAdapter = hdd_get_adapter(pHddCtx,WLAN_HDD_INFRA_STATION);
   if(pAdapter == NULL)
   {
      VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_INFO,"%s: HDD adapter context is Null", __FUNCTION__);
   }
   else
   {
      ++pAdapter->hdd_stats.hddTxRxStats.txCompleted;
   }

   kfree_skb((struct sk_buff *)pOsPkt); 

   //Return the VOS packet resources.
   status = vos_pkt_return_packet( pVosPacket );
   if(!VOS_IS_STATUS_SUCCESS( status ))
   {
      VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,"%s: Could not return VOS packet to the pool", __FUNCTION__);
   }

   return status;
}
开发者ID:F4uzan,项目名称:skernel_u0,代码行数:61,代码来源:wlan_hdd_tx_rx.c

示例7: palPktFree

void palPktFree( tHddHandle hHdd, eFrameType frmType, void* buf, void *pPacket)
{
   vos_pkt_t *pVosPacket = (vos_pkt_t *)pPacket;
   VOS_STATUS vosStatus;
      
   do 
   {
      VOS_ASSERT( pVosPacket );
      
      if ( !pVosPacket ) break;
      
      
      
      VOS_ASSERT( HAL_TXRX_FRM_802_11_MGMT == frmType );
      if ( HAL_TXRX_FRM_802_11_MGMT != frmType ) break;
      
      
      
      vosStatus = vos_pkt_return_packet( pVosPacket );
      VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) );
      
   } while( 0 );
   
   return;
}
开发者ID:Alex-V2,项目名称:One_M8_4.4.3_kernel,代码行数:25,代码来源:palApiComm.c

示例8: wpalPostTxMsg

/*---------------------------------------------------------------------------
     wpalPostTxMsg - Post a message to TX context so it can be processed in that context.
    Param: 
        pPalContext - A PAL context PAL
        pMsg - a pointer to called allocated opaque object;
---------------------------------------------------------------------------*/
wpt_status wpalPostTxMsg(void *pPalContext, wpt_msg *pMsg)
{
   wpt_status status = eWLAN_PAL_STATUS_E_FAILURE;
   vos_msg_t msg;

   if (NULL == pMsg)
   {
      WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                 "%s: NULL message pointer", __FUNCTION__);
      WPAL_ASSERT(0);
      return status;
   }

   msg.type = 0; //This field is not used because VOSS doesn't check it.
   msg.reserved = 0;
   msg.bodyval = 0;
   msg.bodyptr = pMsg;
   if(VOS_IS_STATUS_SUCCESS(vos_tx_mq_serialize(VOS_MQ_ID_WDI, &msg)))
   {
      status = eWLAN_PAL_STATUS_SUCCESS;
   }
   else
   {
      WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, "%s fail to post msg %d\n",
                  __FUNCTION__, pMsg->type);
   }

   return status;
}
开发者ID:ChangYeoun,项目名称:10.1,代码行数:35,代码来源:wlan_qct_pal_msg.c

示例9: wpalPostRxMsg

wpt_status wpalPostRxMsg(void *pPalContext, wpt_msg *pMsg)
{
   wpt_status status = eWLAN_PAL_STATUS_E_FAILURE;
   vos_msg_t msg;

   if (NULL == pMsg)
   {
      WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                 "%s: NULL message pointer", __func__);
      WPAL_ASSERT(0);
      return status;
   }

   msg.type = 0; 
   msg.reserved = 0;
   msg.bodyval = 0;
   msg.bodyptr = pMsg;
   if(VOS_IS_STATUS_SUCCESS(vos_rx_mq_serialize(VOS_MQ_ID_WDI, &msg)))
   {
      status = eWLAN_PAL_STATUS_SUCCESS;
   }
   else
   {
      WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, "%s fail to post msg %d",
                  __func__, pMsg->type);
   }

   return status;
}
开发者ID:Alex-V2,项目名称:One_M8_4.4.3_kernel,代码行数:29,代码来源:wlan_qct_pal_msg.c

示例10: csrLLOpen

eHalStatus csrLLOpen( tHddHandle hHdd, tDblLinkList *pList )
{
    eHalStatus status = eHAL_STATUS_SUCCESS;
    VOS_STATUS vosStatus;
    
    if( !pList) 
    {
        VOS_TRACE(VOS_MODULE_ID_SME, VOS_TRACE_LEVEL_FATAL,"%s: Error!! pList is Null", __func__);
        return eHAL_STATUS_FAILURE ; 
    }
    
    if ( LIST_FLAG_OPEN != pList->Flag ) 
    {
        pList->Count = 0;
        pList->cmdTimeoutTimer = NULL;
        vosStatus = vos_lock_init(&pList->Lock);

        if(VOS_IS_STATUS_SUCCESS(vosStatus))
        {
            csrListInit( &pList->ListHead );
            pList->Flag = LIST_FLAG_OPEN;
            pList->hHdd = hHdd;
        }
        else
        {
           status = eHAL_STATUS_FAILURE;
        }
    }
    return (status);
}
开发者ID:GSandeep24,项目名称:android_kernel_lenovo_msm8916,代码行数:30,代码来源:csrLinkList.c

示例11: palSpinLockAlloc

eHalStatus palSpinLockAlloc( tHddHandle hHdd, tPalSpinLockHandle *pHandle )
{
    eHalStatus halStatus = eHAL_STATUS_FAILURE;
    VOS_STATUS vosStatus;
    vos_lock_t *pLock;

    do
    {
        pLock = vos_mem_malloc( sizeof( vos_lock_t ) );

        if ( NULL == pLock ) break;

        vos_mem_set(pLock, sizeof( vos_lock_t ), 0);

        vosStatus = vos_lock_init( pLock );
        if ( !VOS_IS_STATUS_SUCCESS( vosStatus ) )
        {
            vos_mem_free( pLock );
            break;
        }

        *pHandle = (tPalSpinLockHandle)pLock;
        halStatus = eHAL_STATUS_SUCCESS;

    } while( 0 );

    return( halStatus );
}
开发者ID:supercairos,项目名称:android_kernel_doro_msm8916_2,代码行数:28,代码来源:palApiComm.c

示例12: wpalPacketGetLength

/*---------------------------------------------------------------------------
    wpalPacketGetLength – Get number of bytes in a wpt_packet. It include the 
    bytes in a BD if it exist.
    Param: 
        pPkt - pointer to a packet to be freed.
    Return:
        Length of the data include layer-2 headers. For example, if the frame
        is 802.3, the length includes the ethernet header.
---------------------------------------------------------------------------*/
wpt_uint32 wpalPacketGetLength(wpt_packet *pPkt)
{
   v_U16_t len = 0, pktLen = 0;

   // Validate the parameter pointers
   if (unlikely(NULL == pPkt))
   {
      WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "%s : NULL packet pointer", __func__);
      return eWLAN_PAL_STATUS_E_INVAL;
   }


   if( WPAL_PACKET_GET_BD_POINTER(pPkt) )
   {
      len = WPAL_PACKET_GET_BD_LENGTH(pPkt);
   }
   if( VOS_IS_STATUS_SUCCESS(vos_pkt_get_packet_length(WPAL_TO_VOS_PKT(pPkt), &pktLen)) )
   {
      len += pktLen;
   }
   else
   {
      WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, "%s  failed",
         __func__);
   }

   return ((wpt_uint32)len);
}/*wpalPacketGetLength*/
开发者ID:TechExhibeo,项目名称:Cancro,代码行数:38,代码来源:wlan_qct_pal_packet.c

示例13: palPktFree

void palPktFree( tHddHandle hHdd, eFrameType frmType, void* buf, void *pPacket)
{
    vos_pkt_t *pVosPacket = (vos_pkt_t *)pPacket;
    VOS_STATUS vosStatus;

    do
    {
        VOS_ASSERT( pVosPacket );

        if ( !pVosPacket ) break;

        // we are only handling the 802_11_MGMT frame type for PE/LIM.  All other frame types should be
        // ported to use the VOSS APIs directly and should not be using this palPktAlloc API.
        VOS_ASSERT( HAL_TXRX_FRM_802_11_MGMT == frmType );
        if ( HAL_TXRX_FRM_802_11_MGMT != frmType ) break;

        // return the vos packet to Voss.  Nothing to do if this fails since the palPktFree does not
        // have a return code.
        vosStatus = vos_pkt_return_packet( pVosPacket );
        VOS_ASSERT( VOS_IS_STATUS_SUCCESS( vosStatus ) );

    } while( 0 );

    return;
}
开发者ID:supercairos,项目名称:android_kernel_doro_msm8916_2,代码行数:25,代码来源:palApiComm.c

示例14: wpalPacketRawTrimTail

/*---------------------------------------------------------------------------
    wpalPacketRawTrimTail – reduce the length of the packet.
    Param: 
        pPkt - pointer to a wpt_packet.
        size – number of bytes to take of the packet length
    Return:
        eWLAN_PAL_STATUS_SUCCESS – success. Otherwise fail.
---------------------------------------------------------------------------*/
wpt_status wpalPacketRawTrimTail(wpt_packet *pPkt, wpt_uint32 size)
{
   wpt_status status = eWLAN_PAL_STATUS_SUCCESS;

   // Validate the parameter pointers
   if (unlikely(NULL == pPkt))
   {
      WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "%s : NULL packet pointer", __func__);
      return eWLAN_PAL_STATUS_E_INVAL;
   }

   if ((eWLAN_PAL_PKT_TYPE_TX_802_11_MGMT == WPAL_PACKET_GET_TYPE(pPkt)) ||
               (eWLAN_PAL_PKT_TYPE_RX_RAW == WPAL_PACKET_GET_TYPE(pPkt)))
   {
       // Continue to trim the packet
   }
   else
   {
      WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "%s : neither 80211 managment packet nor RAW packet", __func__);
      VOS_ASSERT(0);
      return eWLAN_PAL_STATUS_E_INVAL;
   }

   if( !VOS_IS_STATUS_SUCCESS(vos_pkt_trim_tail(WPAL_TO_VOS_PKT(pPkt), (v_SIZE_t)size)) )
   {
      WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, "%s  Invalid trim(%d)",
         __func__, size);
      status = eWLAN_PAL_STATUS_E_INVAL;
   }

   return status;
}/*wpalPacketRawTrimTail*/
开发者ID:TechExhibeo,项目名称:Cancro,代码行数:42,代码来源:wlan_qct_pal_packet.c

示例15: wpalPacketSetRxLength

/*---------------------------------------------------------------------------
    wpalPacketSetRxLength – Set the valid data length on a RX packet. This function must 
    be called once per RX packet per receiving. It indicates the available data length from
    the start of the buffer.
    Param: 
        pPkt - pointer to a wpt_packet.
    Return:
        NULL - fail.
        Otherwise the address of the starting of the buffer
---------------------------------------------------------------------------*/
wpt_status wpalPacketSetRxLength(wpt_packet *pPkt, wpt_uint32 len)
{
   // Validate the parameter pointers
   if (unlikely(NULL == pPkt))
   {
      WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR,
                "%s : NULL packet pointer", __func__);
      return eWLAN_PAL_STATUS_E_INVAL;
   }

   /*Only allowed for RX Raw packets */
   if( (eWLAN_PAL_PKT_TYPE_RX_RAW != WPAL_PACKET_GET_TYPE(pPkt)))
   {
     WPAL_TRACE(eWLAN_MODULE_PAL, eWLAN_PAL_TRACE_LEVEL_ERROR, 
                "%s  Invalid packet type(%d)",  __func__,
                WPAL_PACKET_GET_TYPE(pPkt));
     return eWLAN_PAL_STATUS_E_INVAL;
   }

   if(VOS_IS_STATUS_SUCCESS(vos_pkt_set_rx_length(WPAL_TO_VOS_PKT(pPkt), len)))
   {
      return eWLAN_PAL_STATUS_SUCCESS;
   }
   else
   {
      return eWLAN_PAL_STATUS_E_INVAL;
   }
}/*wpalPacketSetRxLength*/
开发者ID:TechExhibeo,项目名称:Cancro,代码行数:38,代码来源:wlan_qct_pal_packet.c


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