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


C++ DBG_PRT函数代码示例

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


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

示例1: iwctl_giwrate

/*
 * Wireless Handler: get data rate
 */
int iwctl_giwrate(struct net_device *dev, struct iw_request_info *info,
		union iwreq_data *wrqu, char *extra)
{
	struct vnt_private *pDevice = netdev_priv(dev);
	struct iw_param *wrq = &wrqu->bitrate;
	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;

	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRATE\n");

	if (pMgmt == NULL)
		return -EFAULT;

	{
		BYTE abySupportedRates[13] = {
			0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30,
			0x48, 0x60, 0x6C, 0x90
		};
		int brate = 0;

		if (pDevice->uConnectionRate < 13) {
			brate = abySupportedRates[pDevice->uConnectionRate];
		} else {
			if (pDevice->byBBType == BB_TYPE_11B)
				brate = 0x16;
			if (pDevice->byBBType == BB_TYPE_11G)
				brate = 0x6C;
			if (pDevice->byBBType == BB_TYPE_11A)
				brate = 0x6C;
		}
		if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
			if (pDevice->byBBType == BB_TYPE_11B)
				brate = 0x16;
			if (pDevice->byBBType == BB_TYPE_11G)
				brate = 0x6C;
			if (pDevice->byBBType == BB_TYPE_11A)
				brate = 0x6C;
		}
    		if (pDevice->uConnectionRate == 13)
			brate = abySupportedRates[pDevice->wCurrentRate];
		wrq->value = brate * 500000;
		// If more than one rate, set auto
		if (pDevice->bFixRate == TRUE)
			wrq->fixed = TRUE;
	}

	return 0;
}
开发者ID:strassek,项目名称:linux-kempld,代码行数:50,代码来源:iwctl.c

示例2: FIRMWAREbBrach2Sram

int FIRMWAREbBrach2Sram(struct vnt_private *pDevice)
{
	int NdisStatus;

	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Branch to Sram\n");

	NdisStatus = CONTROLnsRequestOut(pDevice,
					1,
					0x1200,
					0x0000,
					0,
					NULL);
	if (NdisStatus != STATUS_SUCCESS)
		return false;
	else
		return true;
}
开发者ID:7799,项目名称:linux,代码行数:17,代码来源:firmware.c

示例3: hostap_set_flags_sta

/*
 * Description:
 *      set station flag
 *
 * Parameters:
 *  In:
 *      pDevice   -
 *      param     -
 *  Out:
 *
 * Return Value:
 *
 */
static int hostap_set_flags_sta(PSDevice pDevice,
				struct viawget_hostapd_param *param)
{
	PSMgmtObject    pMgmt = pDevice->pMgmt;
	unsigned int uNodeIndex;

	if (BSSDBbIsSTAInNodeDB(pMgmt, param->sta_addr, &uNodeIndex)) {
		pMgmt->sNodeDBTable[uNodeIndex].dwFlags |= param->u.set_flags_sta.flags_or;
		pMgmt->sNodeDBTable[uNodeIndex].dwFlags &= param->u.set_flags_sta.flags_and;
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " dwFlags = %x \n",
			(unsigned int)pMgmt->sNodeDBTable[uNodeIndex].dwFlags);
	} else {
		return -ENOENT;
	}

	return 0;
}
开发者ID:BozkurTR,项目名称:kernel,代码行数:30,代码来源:hostap.c

示例4: wpa_release_wpadev

static int wpa_release_wpadev(PSDevice pDevice)
{
    if (pDevice->skb) {
        dev_kfree_skb(pDevice->skb);
        pDevice->skb = NULL;
    }

    if (pDevice->wpadev) {
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: Netdevice %s unregistered\n",
	       pDevice->dev->name, pDevice->wpadev->name);
	unregister_netdev(pDevice->wpadev);
	free_netdev(pDevice->wpadev);
         pDevice->wpadev = NULL;
    }

	return 0;
}
开发者ID:openube,项目名称:android_kernel_sony_c2305,代码行数:17,代码来源:wpactl.c

示例5: PSbConsiderPowerDown

BOOL PSbConsiderPowerDown(void *hDeviceContext,
			  BOOL bCheckRxDMA,
			  BOOL bCheckCountToWakeUp)
{
	PSDevice pDevice = (PSDevice)hDeviceContext;
	PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
	BYTE byData;

	
	ControlvReadByte(pDevice, MESSAGE_REQUEST_MACREG,
					MAC_REG_PSCTL, &byData);

	if ((byData & PSCTL_PS) != 0)
		return TRUE;

	if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
		
		if (pMgmt->bInTIMWake)
			return FALSE;
	}

	
	if (pDevice->bCmdRunning)
		return FALSE;

	
	if (pDevice->bPSModeTxBurst)
		return FALSE;

	
	MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_PSEN);

	if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
		if (bCheckCountToWakeUp && (pMgmt->wCountToWakeUp == 0
			|| pMgmt->wCountToWakeUp == 1)) {
				return FALSE;
		}
	}

	pDevice->bPSRxBeacon = TRUE;

	
	MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE);
	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n");
	return TRUE;
}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:46,代码来源:power.c

示例6: iwctl_giwaplist

int iwctl_giwaplist(struct net_device *dev,
             struct iw_request_info *info,
             struct iw_point *wrq,
             char *extra)
{
	int ii,jj, rc = 0;
	struct sockaddr sock[IW_MAX_AP];
	struct iw_quality qual[IW_MAX_AP];
	PSDevice	        pDevice = (PSDevice)netdev_priv(dev);
    PSMgmtObject        pMgmt = &(pDevice->sMgmtObj);


    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAPLIST \n");
	

	if (!capable(CAP_NET_ADMIN)) {
		rc = -EPERM;
		return rc;
	}

	if (wrq->pointer) {

		PKnownBSS pBSS = &(pMgmt->sBSSList[0]);

		for (ii = 0, jj= 0; ii < MAX_BSS_NUM; ii++) {
		    pBSS = &(pMgmt->sBSSList[ii]);
            if (!pBSS->bActive)
                continue;
            if ( jj >= IW_MAX_AP)
                break;
			memcpy(sock[jj].sa_data, pBSS->abyBSSID, 6);
			sock[jj].sa_family = ARPHRD_ETHER;
			qual[jj].level = pBSS->uRSSI;
			qual[jj].qual = qual[jj].noise = 0;
			qual[jj].updated = 2;
			jj++;
		}

		wrq->flags = 1; 
		wrq->length = jj;
		memcpy(extra, sock, sizeof(struct sockaddr)*jj);
		memcpy(extra + sizeof(struct sockaddr)*jj, qual, sizeof(struct iw_quality)*jj);
	}

	return rc;
}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:46,代码来源:iwctl.c

示例7: PSbSendNullPacket

int PSbSendNullPacket(struct vnt_private *pDevice)
{
	struct vnt_tx_mgmt *pTxPacket = NULL;
	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
	u16 flags = 0;

	if (pDevice->bLinkPass == false)
		return false;

	if ((pDevice->bEnablePSMode == false) &&
		(pDevice->fTxDataInSleep == false)) {
			return false;
	}

	memset(pMgmt->pbyPSPacketPool, 0, sizeof(struct vnt_tx_mgmt)
		+ WLAN_NULLDATA_FR_MAXLEN);
	pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyPSPacketPool;
	pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
		+ sizeof(struct vnt_tx_mgmt));

	flags = WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) |
                        WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL);

	if (pDevice->bEnablePSMode)
		flags |= WLAN_SET_FC_PWRMGT(1);
	else
		flags |= WLAN_SET_FC_PWRMGT(0);

	pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(flags);

	if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA)
		pTxPacket->p80211Header->sA3.wFrameCtl |= cpu_to_le16((WORD)WLAN_SET_FC_TODS(1));

	memcpy(pTxPacket->p80211Header->sA3.abyAddr1, pMgmt->abyCurrBSSID, WLAN_ADDR_LEN);
	memcpy(pTxPacket->p80211Header->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
	memcpy(pTxPacket->p80211Header->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
	pTxPacket->cbMPDULen = WLAN_HDR_ADDR3_LEN;
	pTxPacket->cbPayloadLen = 0;
	/* log error if sending failed */
	if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Null Packet failed !\n");
		return false;
	}
	return true;
}
开发者ID:AiWinters,项目名称:linux,代码行数:45,代码来源:power.c

示例8: iwctl_giwsens

/*
 * Wireless Handler: get Sensitivity
 */
int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info,
		union iwreq_data *wrqu, char *extra)
{
	struct vnt_private *pDevice = netdev_priv(dev);
	struct iw_param *wrq = &wrqu->sens;
	long ldBm;

	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS\n");
	if (pDevice->bLinkPass == true) {
		RFvRSSITodBm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm);
		wrq->value = ldBm;
	} else {
		wrq->value = 0;
	}
	wrq->disabled = (wrq->value == 0);
	wrq->fixed = 1;
	return 0;
}
开发者ID:7799,项目名称:linux,代码行数:21,代码来源:iwctl.c

示例9: hostap_set_flags_sta

/*
 * Description:
 *      set station flag
 *
 * Parameters:
 *  In:
 *      pDevice   -
 *      param     -
 *  Out:
 *
 * Return Value:
 *
 */
static int hostap_set_flags_sta(struct vnt_private *pDevice,
		struct viawget_hostapd_param *param)
{
	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
	unsigned int uNodeIndex;

    if (BSSbIsSTAInNodeDB(pDevice, param->sta_addr, &uNodeIndex)) {
		pMgmt->sNodeDBTable[uNodeIndex].dwFlags |= param->u.set_flags_sta.flags_or;
		pMgmt->sNodeDBTable[uNodeIndex].dwFlags &= param->u.set_flags_sta.flags_and;
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " dwFlags = %x\n",
			(unsigned int) pMgmt->sNodeDBTable[uNodeIndex].dwFlags);
	}
	else {
	    return -ENOENT;
	}

	return 0;
}
开发者ID:AiWinters,项目名称:linux,代码行数:31,代码来源:hostap.c

示例10: PSbSendNullPacket

BOOL PSbSendNullPacket(void *hDeviceContext)
{
	PSDevice pDevice = (PSDevice)hDeviceContext;
	PSTxMgmtPacket pTxPacket = NULL;
	PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
	u16 flags = 0;

	if (pDevice->bLinkPass == FALSE)
		return FALSE;

	if ((pDevice->bEnablePSMode == FALSE) &&
		(pDevice->fTxDataInSleep == FALSE)) {
			return FALSE;
	}

	memset(pMgmt->pbyPSPacketPool, 0, sizeof(STxMgmtPacket) + WLAN_NULLDATA_FR_MAXLEN);
	pTxPacket = (PSTxMgmtPacket)pMgmt->pbyPSPacketPool;
	pTxPacket->p80211Header = (PUWLAN_80211HDR)((PBYTE)pTxPacket + sizeof(STxMgmtPacket));

	flags = WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) |
                        WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL);

	if (pDevice->bEnablePSMode)
		flags |= WLAN_SET_FC_PWRMGT(1);
	else
		flags |= WLAN_SET_FC_PWRMGT(0);

	pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(flags);

	if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA)
		pTxPacket->p80211Header->sA3.wFrameCtl |= cpu_to_le16((WORD)WLAN_SET_FC_TODS(1));

	memcpy(pTxPacket->p80211Header->sA3.abyAddr1, pMgmt->abyCurrBSSID, WLAN_ADDR_LEN);
	memcpy(pTxPacket->p80211Header->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
	memcpy(pTxPacket->p80211Header->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
	pTxPacket->cbMPDULen = WLAN_HDR_ADDR3_LEN;
	pTxPacket->cbPayloadLen = 0;
	
	if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Send Null Packet failed !\n");
		return FALSE;
	}
	return TRUE;
}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:44,代码来源:power.c

示例11: PSbConsiderPowerDown

int PSbConsiderPowerDown(struct vnt_private *pDevice, int bCheckRxDMA,
	int bCheckCountToWakeUp)
{
	struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
	u8 byData;

	/* check if already in Doze mode */
	ControlvReadByte(pDevice, MESSAGE_REQUEST_MACREG,
					MAC_REG_PSCTL, &byData);

	if ((byData & PSCTL_PS) != 0)
		return true;

	if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
		/* check if in TIM wake period */
		if (pMgmt->bInTIMWake)
			return false;
	}

	/* check scan state */
	if (pDevice->bCmdRunning)
		return false;

	/* Tx Burst */
	if (pDevice->bPSModeTxBurst)
		return false;

	/* Froce PSEN on */
	MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_PSEN);

	if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
		if (bCheckCountToWakeUp && (pMgmt->wCountToWakeUp == 0
			|| pMgmt->wCountToWakeUp == 1)) {
				return false;
		}
	}

	pDevice->bPSRxBeacon = true;

	/* no Tx, no Rx isr, now go to Doze */
	MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE);
	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n");
	return true;
}
开发者ID:AiWinters,项目名称:linux,代码行数:44,代码来源:power.c

示例12: BRAIN_CK

bool
brain::dbg_br_compute_binary(row_neuron_t& neus){
#ifdef FULL_DEBUG
	long ii;
	for(ii = 0; ii < neus.size(); ii++){
		BRAIN_CK(neus[ii] != NULL_PT);
		neuron& neu = *(neus[ii]);

		if(! neu.ne_original){
			continue;
		}
		if(!(neu.is_ne_inert())){
			DBG_PRT(24, os << "FAILED compute neu=" << &(neu));
			return false;
		}
	}
#endif
	return true;
}
开发者ID:ben-jose,项目名称:ben-jose,代码行数:19,代码来源:dbg_brain.cpp

示例13: INTnsProcessData

void INTnsProcessData(PSDevice pDevice)
{
	PSINTData pINTData;
	PSMgmtObject pMgmt = &(pDevice->sMgmtObj);
	struct net_device_stats *pStats = &pDevice->stats;

	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsInterruptProcessData\n");

	pINTData = (PSINTData) pDevice->intBuf.pDataBuf;
	if (pINTData->byTSR0 & TSR_VALID) {
		STAvUpdateTDStatCounter(&(pDevice->scStatistic),
					(BYTE)(pINTData->byPkt0 & 0x0F),
					(BYTE)(pINTData->byPkt0>>4),
					pINTData->byTSR0);
		BSSvUpdateNodeTxCounter(pDevice,
					&(pDevice->scStatistic),
					pINTData->byTSR0,
					pINTData->byPkt0);
		/*DBG_PRN_GRP01(("TSR0 %02x\n", pINTData->byTSR0));*/
	}
开发者ID:ARMWorks,项目名称:FA_2451_Linux_Kernel,代码行数:20,代码来源:int.c

示例14: iwctl_siwfrag

/*
 * Wireless Handler: set fragment threshold
 */
int iwctl_siwfrag(struct net_device *dev, struct iw_request_info *info,
		union iwreq_data *wrqu, char *extra)
{
	struct vnt_private *pDevice = netdev_priv(dev);
	struct iw_param *wrq = &wrqu->frag;
	int rc = 0;
	int fthr = wrq->value;

	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFRAG\n");

	if (wrq->disabled)
		fthr = 2312;
	if ((fthr < 256) || (fthr > 2312)) {
		rc = -EINVAL;
	} else {
		fthr &= ~0x1; // Get an even value
		pDevice->wFragmentationThreshold = (u16)fthr;
	}
	return rc;
}
开发者ID:7799,项目名称:linux,代码行数:23,代码来源:iwctl.c

示例15: sysdeps_initrd_get_addr

/*
 * initrd_get_addr()
 *	Compute a starting address for the initial RAMdisk image.
 *	For now we suggest 'initrd_addr_max' with room for 32MB,
 *	as image->pgcnt is not initialized yet.
 */
INTN
sysdeps_initrd_get_addr(kdesc_t *kd, memdesc_t *imem)
{
	DBG_PRT((L"initrd_get_addr()\n"));

	if (!kd || !imem) {
		ERR_PRT((L"kd="PTR_FMT" imem="PTR_FMT"", kd, imem));
		return -1;
	}

	VERB_PRT(3, Print(L"initrd_addr_max="PTR_FMT" reserve=%d\n",
		param_start->s.initrd_addr_max, 32*MB));

	imem->start_addr = (VOID *)
		(((UINT64)param_start->s.initrd_addr_max - 32*MB + 1)
		& ~EFI_PAGE_MASK);

	VERB_PRT(3, Print(L"initrd start_addr="PTR_FMT" pgcnt=%d\n", 
		imem->start_addr, imem->pgcnt));

	return 0;
}
开发者ID:jeppeter,项目名称:elilo,代码行数:28,代码来源:system.c


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