當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。