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


C++ DMESG函数代码示例

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


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

示例1: cmdpkt_beacontimerinterrupt_819xusb

void
cmdpkt_beacontimerinterrupt_819xusb(
	struct net_device *dev
)
{
	struct r8192_priv *priv = ieee80211_priv(dev);
	u16 tx_rate;
	{
		//
		// 070117, rcnjko: 87B have to S/W beacon for DTM encryption_cmn.
		//
		if(priv->ieee80211->current_network.mode == IEEE_A  ||
			priv->ieee80211->current_network.mode == IEEE_N_5G ||
			(priv->ieee80211->current_network.mode == IEEE_N_24G  && (!priv->ieee80211->pHTInfo->bCurSuppCCK)))
		{
			tx_rate = 60;
			DMESG("send beacon frame  tx rate is 6Mbpm\n");
		}
		else
		{
			tx_rate =10;
			DMESG("send beacon frame  tx rate is 1Mbpm\n");
		}

		rtl819xusb_beacon_tx(dev,tx_rate); // HW Beacon

	}

}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:29,代码来源:r819xU_cmdpkt.c

示例2: cmpk_handle_interrupt_status

static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
{
	struct cmpk_intr_sta rx_intr_status;
	struct r8192_priv *priv = rtllib_priv(dev);

	DMESG("---> cmpk_Handle_Interrupt_Status()\n");

	rx_intr_status.length = pmsg[1];
	if (rx_intr_status.length != (sizeof(struct cmpk_intr_sta) - 2)) {
		DMESG("cmpk_Handle_Interrupt_Status: wrong length!\n");
		return;
	}

	if (priv->rtllib->iw_mode == IW_MODE_ADHOC) {
		rx_intr_status.interrupt_status = *((u32 *)(pmsg + 4));

		DMESG("interrupt status = 0x%x\n",
		      rx_intr_status.interrupt_status);

		if (rx_intr_status.interrupt_status & ISR_TxBcnOk) {
			priv->rtllib->bibsscoordinator = true;
			priv->stats.txbeaconokint++;
		} else if (rx_intr_status.interrupt_status & ISR_TxBcnErr) {
			priv->rtllib->bibsscoordinator = false;
			priv->stats.txbeaconerr++;
		}

		if (rx_intr_status.interrupt_status & ISR_BcnTimerIntr)
			cmdpkt_beacontimerinterrupt_819xusb(dev);
	}

	DMESG("<---- cmpk_handle_interrupt_status()\n");

}
开发者ID:19Dan01,项目名称:linux,代码行数:34,代码来源:r8192E_cmdpkt.c

示例3: cmpk_handle_interrupt_status

/*-----------------------------------------------------------------------------
 * Function:    cmpk_handle_interrupt_status()
 *
 * Overview:    The function is responsible for extract the message from
 *				firmware. It will contain dedicated info in
 *				ws-07-0063-v06-rtl819x-command-packet-specification-070315.doc.
 * 				Please refer to chapter "Interrupt Status Element".
 *
 * Input:       struct net_device *dev,
 *			u8*	pmsg		-	Message Pointer of the command packet.
 *
 * Output:      NONE
 *
 * Return:      NONE
 *
 * Revised History:
 *  When			Who			Remark
 *  05/12/2008	amy		Add this for rtl8192 porting from windows code.
 *
 *---------------------------------------------------------------------------*/
static	void
cmpk_handle_interrupt_status(
	struct net_device *dev,
	u8*	pmsg)
{
	cmpk_intr_sta_t		rx_intr_status;	/* */
	struct r8192_priv *priv = ieee80211_priv(dev);

	DMESG("---> cmpk_Handle_Interrupt_Status()\n");

	/* 0. Display received message. */
	//cmpk_Display_Message(CMPK_RX_BEACON_STATE_SIZE, pMsg);

	/* 1. Extract TX feedback info from RFD to temp structure buffer. */
	/* It seems that FW use big endian(MIPS) and DRV use little endian in
	   windows OS. So we have to read the content byte by byte or transfer
	   endian type before copy the message copy. */
	//rx_bcn_state.Element_ID 	= pMsg[0];
	//rx_bcn_state.Length 		= pMsg[1];
	rx_intr_status.length = pmsg[1];
	if (rx_intr_status.length != (sizeof(cmpk_intr_sta_t) - 2))
	{
		DMESG("cmpk_Handle_Interrupt_Status: wrong length!\n");
		return;
	}


	// Statistics of beacon for ad-hoc mode.
	if(	priv->ieee80211->iw_mode == IW_MODE_ADHOC)
	{
		//2 maybe need endian transform?
		rx_intr_status.interrupt_status = *((u32 *)(pmsg + 4));
		//rx_intr_status.InterruptStatus = N2H4BYTE(*((UINT32 *)(pMsg + 4)));

		DMESG("interrupt status = 0x%x\n", rx_intr_status.interrupt_status);

		if (rx_intr_status.interrupt_status & ISR_TxBcnOk)
		{
			priv->ieee80211->bibsscoordinator = true;
			priv->stats.txbeaconokint++;
		}
		else if (rx_intr_status.interrupt_status & ISR_TxBcnErr)
		{
			priv->ieee80211->bibsscoordinator = false;
			priv->stats.txbeaconerr++;
		}

		if (rx_intr_status.interrupt_status & ISR_BcnTimerIntr)
		{
			cmdpkt_beacontimerinterrupt_819xusb(dev);
		}

	}

	 // Other informations in interrupt status we need?


	DMESG("<---- cmpk_handle_interrupt_status()\n");

}	/* cmpk_handle_interrupt_status */
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:80,代码来源:r819xU_cmdpkt.c

示例4: r8180_wx_set_retry

static int r8180_wx_set_retry(struct net_device *dev,
                              struct iw_request_info *info,
                              union iwreq_data *wrqu, char *extra)
{
    struct r8180_priv *priv = ieee80211_priv(dev);
    int err = 0;

    if (priv->ieee80211->bHwRadioOff)
        return 0;

    down(&priv->wx_sem);

    if (wrqu->retry.flags & IW_RETRY_LIFETIME ||
            wrqu->retry.disabled)	{
        err = -EINVAL;
        goto exit;
    }
    if (!(wrqu->retry.flags & IW_RETRY_LIMIT))	{
        err = -EINVAL;
        goto exit;
    }

    if (wrqu->retry.value > R8180_MAX_RETRY)	{
        err = -EINVAL;
        goto exit;
    }
    if (wrqu->retry.flags & IW_RETRY_MAX) {
        priv->retry_rts = wrqu->retry.value;
        DMESG("Setting retry for RTS/CTS data to %d", wrqu->retry.value);

    }	else {
        priv->retry_data = wrqu->retry.value;
        DMESG("Setting retry for non RTS/CTS data to %d", wrqu->retry.value);
    }

    /* FIXME !
     * We might try to write directly the TX config register
     * or to restart just the (R)TX process.
     * I'm unsure if whole reset is really needed
     */

    rtl8180_commit(dev);
    /*
    if(priv->up){
    	rtl8180_rtx_disable(dev);
    	rtl8180_rx_enable(dev);
    	rtl8180_tx_enable(dev);

    }
    */
exit:
    up(&priv->wx_sem);

    return err;
}
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:55,代码来源:r8180_wx.c

示例5: cmdpkt_beacontimerinterrupt_819xusb

static void cmdpkt_beacontimerinterrupt_819xusb(struct net_device *dev)
{
	struct r8192_priv *priv = rtllib_priv(dev);

	if ((priv->rtllib->current_network.mode == IEEE_A)  ||
	    (priv->rtllib->current_network.mode == IEEE_N_5G) ||
	    ((priv->rtllib->current_network.mode == IEEE_N_24G)  &&
	    (!priv->rtllib->pHTInfo->bCurSuppCCK)))
		DMESG("send beacon frame  tx rate is 6Mbpm\n");
	else
		DMESG("send beacon frame  tx rate is 1Mbpm\n");
}
开发者ID:19Dan01,项目名称:linux,代码行数:12,代码来源:r8192E_cmdpkt.c

示例6: r8192_wx_set_crcmon

static int r8192_wx_set_crcmon(struct net_device *dev,
			       struct iw_request_info *info,
			       union iwreq_data *wrqu, char *extra)
{
	struct r8192_priv *priv = ieee80211_priv(dev);
	int *parms = (int *)extra;
	int enable = (parms[0] > 0);
	short prev = priv->crcmon;

	down(&priv->wx_sem);

	if(enable)
		priv->crcmon=1;
	else
		priv->crcmon=0;

	DMESG("bad CRC in monitor mode are %s",
	      priv->crcmon ? "accepted" : "rejected");

	if(prev != priv->crcmon && priv->up){
		//rtl8180_down(dev);
		//rtl8180_up(dev);
	}

	up(&priv->wx_sem);

	return 0;
}
开发者ID:7799,项目名称:linux,代码行数:28,代码来源:r8192U_wx.c

示例7: r8180_wx_set_key

int r8180_wx_set_key(struct net_device *dev, struct iw_request_info *info, 
		     union iwreq_data *wrqu, char *key)
{
	struct r8180_priv *priv = ieee80211_priv(dev);
	struct iw_point *erq = &(wrqu->encoding);	

	if (erq->flags & IW_ENCODE_DISABLED) {
	}
	
	
/*	i = erq->flags & IW_ENCODE_INDEX;
	if (i < 1 || i > 4)
*/	
	
	if (erq->length > 0) {

		//int len = erq->length <= 5 ? 5 : 13;
		
		u32* tkey= (u32*) key;
		priv->key0[0] = tkey[0];
		priv->key0[1] = tkey[1];
		priv->key0[2] = tkey[2];
		priv->key0[3] = tkey[3] &0xff;
		DMESG("Setting wep key to %x %x %x %x", 
		      tkey[0],tkey[1],tkey[2],tkey[3]);
		rtl8180_set_hw_wep(dev);
	}
	return 0;
}
开发者ID:OpenHMR,项目名称:Open-HMR600,代码行数:29,代码来源:r8180_wx.c

示例8: soap_new__wsdair__SQLExecuteFactoryRequest

int SQLAccessFactory::MakeSQLExecuteFactoryRequest(std::string &dran
                     , std::string &command
                     , SQLExecuteFactoryRequest **req)
{
  SQLExecuteFactoryRequest*  seReq 
     = soap_new__wsdair__SQLExecuteFactoryRequest(&soap,-1);
  *req = seReq;

  seReq->wsdair__SQLExpression = soap_new_wsdair__SQLExpressionType(&soap, -1) ;
  seReq->wsdair__SQLExpression->Expression = command ;
  seReq->wsdai__DataResourceAbstractName = dran;

  DMESG("DRAN : " << seReq->wsdai__DataResourceAbstractName << endl);
  DMESG("EXPR : " << seReq->wsdair__SQLExpression->Expression << endl);

  return SOAP_OK;
}
开发者ID:ic-hep,项目名称:emi3,代码行数:17,代码来源:SQLAccessFactory.cpp

示例9: check

    // Destructor
    FileIO::~FileIO()  {
       // Free all HDF5 resources
       /* End access to the dataset and release resources used by it. */
       // if(asciiOutput == true) asciiOutputFile.close();

     // close some extra stuff
     check( H5Tclose(complex_tid),   DMESG("H5Tclose"));
     check( H5Tclose(timing_tid),   DMESG("H5Tclose"));
     check( H5Tclose(species_tid),  DMESG("H5Tclose"));
     check( H5Tclose(s256_tid),     DMESG("H5Tclose"));
    
     
     // close file
     check( H5Fclose(file) , DMESG("Unable to close file ..."));

     delete cfl_table;

}
开发者ID:xyuan,项目名称:gkc,代码行数:19,代码来源:FileIO.cpp

示例10: if

Array2c Analysis::getSpectrum(unsigned int dir) {
       Array2c spectrum;
       if     (dir == SPEC_XZ)  spectrum.reference(spectrumXZ);
       else if(dir == SPEC_YZ)  spectrum.reference(spectrumXZ);
       else if(dir == SPEC_XY)  spectrum.reference(spectrumXY);
       else   check(-1, DMESG("No such direction for get spectrum"));
    
       return spectrum;
   };
开发者ID:xyuan,项目名称:gkc,代码行数:9,代码来源:Analysis.cpp

示例11: r8192_wx_set_retry

static int r8192_wx_set_retry(struct net_device *dev,
				struct iw_request_info *info,
				union iwreq_data *wrqu, char *extra)
{
	struct r8192_priv *priv = rtllib_priv(dev);
	int err = 0;

	if (priv->bHwRadioOff == true)
		return 0;

	down(&priv->wx_sem);

	if (wrqu->retry.flags & IW_RETRY_LIFETIME ||
	    wrqu->retry.disabled) {
		err = -EINVAL;
		goto exit;
	}
	if (!(wrqu->retry.flags & IW_RETRY_LIMIT)) {
		err = -EINVAL;
		goto exit;
	}

	if (wrqu->retry.value > R8192_MAX_RETRY) {
		err = -EINVAL;
		goto exit;
	}
	if (wrqu->retry.flags & IW_RETRY_MAX) {
		priv->retry_rts = wrqu->retry.value;
		DMESG("Setting retry for RTS/CTS data to %d",
		      wrqu->retry.value);

	} else {
		priv->retry_data = wrqu->retry.value;
		DMESG("Setting retry for non RTS/CTS data to %d",
		      wrqu->retry.value);
	}


	rtl8192_commit(dev);
exit:
	up(&priv->wx_sem);

	return err;
}
开发者ID:454053205,项目名称:linux,代码行数:44,代码来源:rtl_wx.c

示例12: cmpk_handle_interrupt_status

/*-----------------------------------------------------------------------------
 * Function:    cmpk_handle_interrupt_status()
 *
 * Overview:    The function is responsible for extract the message from
 *		firmware. It will contain dedicated info in
 *		ws-07-0063-v06-rtl819x-command-packet-specification-070315.doc.
 *		Please refer to chapter "Interrupt Status Element".
 *
 * Input:       struct net_device *dev
 *              u8 *pmsg		- Message Pointer of the command packet.
 *
 * Output:      NONE
 *
 * Return:      NONE
 *
 * Revised History:
 *  When		Who	Remark
 *  05/12/2008		amy	Add this for rtl8192 porting from windows code.
 *
 *---------------------------------------------------------------------------
 */
static void cmpk_handle_interrupt_status(struct net_device *dev, u8 *pmsg)
{
	cmpk_intr_sta_t		rx_intr_status;	/* */
	struct r8192_priv *priv = ieee80211_priv(dev);

	DMESG("---> cmpk_Handle_Interrupt_Status()\n");

	/* 1. Extract TX feedback info from RFD to temp structure buffer. */
	/* It seems that FW use big endian(MIPS) and DRV use little endian in
	 * windows OS. So we have to read the content byte by byte or transfer
	 * endian type before copy the message copy.
	 */
	rx_intr_status.length = pmsg[1];
	if (rx_intr_status.length != (sizeof(cmpk_intr_sta_t) - 2)) {
		DMESG("cmpk_Handle_Interrupt_Status: wrong length!\n");
		return;
	}

	/* Statistics of beacon for ad-hoc mode. */
	if (priv->ieee80211->iw_mode == IW_MODE_ADHOC) {
		/* 2 maybe need endian transform? */
		rx_intr_status.interrupt_status = *((u32 *)(pmsg + 4));

		DMESG("interrupt status = 0x%x\n",
		      rx_intr_status.interrupt_status);

		if (rx_intr_status.interrupt_status & ISR_TxBcnOk) {
			priv->ieee80211->bibsscoordinator = true;
			priv->stats.txbeaconokint++;
		} else if (rx_intr_status.interrupt_status & ISR_TxBcnErr) {
			priv->ieee80211->bibsscoordinator = false;
			priv->stats.txbeaconerr++;
		}

		if (rx_intr_status.interrupt_status & ISR_BcnTimerIntr)
			cmdpkt_beacontimerinterrupt_819xusb(dev);
	}

	/* Other informations in interrupt status we need? */

	DMESG("<---- cmpk_handle_interrupt_status()\n");
}
开发者ID:ReneNyffenegger,项目名称:linux,代码行数:63,代码来源:r819xU_cmdpkt.c

示例13: DMESG

int S_SQLAccessFactory::commitDirectoryToIndex2(EntryProps &prop
                           , const std::string &indexTable
                           , std::string &table
                           , Statement &statement)
{ 
  std::ostringstream query;
  
  query << "UPDATE " << indexTable 
        << " SET \"table_name\" = '" << table  << "', "
        << " \"directory\" = '" << dran << "',"
        << " \"flags\" = '" << prop.flags << "'"
        << " WHERE \"id\"=" << prop.id
        << ";";

  DMESG("SQL: >" << query.str() << "<" << std::endl);
  
  if(statement.exec(query.str())){
    DMESG("16 Directory exists\n");
    return -1;
  } 

  return prop.id;
}
开发者ID:ic-hep,项目名称:emi3,代码行数:23,代码来源:S_SQLAccessFactory.cpp

示例14: r8180_wx_set_enc

static int r8180_wx_set_enc(struct net_device *dev, 
			    struct iw_request_info *info, 
			    union iwreq_data *wrqu, char *key)
{
	struct r8180_priv *priv = ieee80211_priv(dev);
	int ret;
	
	down(&priv->wx_sem);
	
		DMESG("Setting SW wep key");
		ret = ieee80211_wx_set_encode(priv->ieee80211,info,wrqu,key);
			
	up(&priv->wx_sem);
	return ret;
}
开发者ID:iwangv,项目名称:edimax-br-6528n,代码行数:15,代码来源:r8180_wx.c

示例15: r8180_wx_set_beaconinterval

static int r8180_wx_set_beaconinterval(struct net_device *dev, struct iw_request_info *aa,
			  union iwreq_data *wrqu, char *b)
{
	int *parms = (int *)b;
	int bi = parms[0];
	
	struct r8180_priv *priv = ieee80211_priv(dev);
	
	down(&priv->wx_sem);
	DMESG("setting beacon interval to %x",bi);
	
	priv->ieee80211->beacon_interval=bi;
	rtl8180_commit(dev);
	up(&priv->wx_sem);
		
	return 0;	
}
开发者ID:iwangv,项目名称:edimax-br-6528n,代码行数:17,代码来源:r8180_wx.c


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