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


C++ GEN_CMD_CODE函数代码示例

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


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

示例1: r8712_disconnectCtrlEx_cmd

u8 r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl,
			u32 tryPktCnt, u32 tryPktInterval, u32 firstStageTO)
{
	struct cmd_obj *ph2c;
	struct DisconnectCtrlEx_param *param;
	struct cmd_priv *pcmdpriv = &adapter->cmdpriv;

	ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
	if (ph2c == NULL)
		return _FAIL;
	param = kzalloc(sizeof(*param), GFP_ATOMIC);
	if (param == NULL) {
		kfree(ph2c);
		return _FAIL;
	}

	param->EnableDrvCtrl = (unsigned char)enableDrvCtrl;
	param->TryPktCnt = (unsigned char)tryPktCnt;
	param->TryPktInterval = (unsigned char)tryPktInterval;
	param->FirstStageTO = (unsigned int)firstStageTO;

	init_h2fwcmd_w_parm_no_rsp(ph2c, param,
				GEN_CMD_CODE(_DisconnectCtrlEx));
	r8712_enqueue_cmd(pcmdpriv, ph2c);
	return _SUCCESS;
}
开发者ID:383530895,项目名称:linux,代码行数:26,代码来源:rtl871x_cmd.c

示例2: r8712_sitesurvey_cmd

/*
r8712_sitesurvey_cmd(~)
	### NOTE:#### (!!!!)
	MUST TAKE CARE THAT BEFORE CALLING THIS FUNC,
	 YOU SHOULD HAVE LOCKED pmlmepriv->lock
*/
u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
			struct ndis_802_11_ssid *pssid)
{
	struct cmd_obj	*ph2c;
	struct sitesurvey_parm	*psurveyPara;
	struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;

	ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
	if (ph2c == NULL)
		return _FAIL;
	psurveyPara = kmalloc(sizeof(*psurveyPara), GFP_ATOMIC);
	if (psurveyPara == NULL) {
		kfree(ph2c);
		return _FAIL;
	}
	init_h2fwcmd_w_parm_no_rsp(ph2c, psurveyPara,
				   GEN_CMD_CODE(_SiteSurvey));
	psurveyPara->bsslimit = cpu_to_le32(48);
	psurveyPara->passive_mode = cpu_to_le32(pmlmepriv->passive_mode);
	psurveyPara->ss_ssidlen = 0;
	memset(psurveyPara->ss_ssid, 0, IW_ESSID_MAX_SIZE + 1);
	if ((pssid != NULL) && (pssid->SsidLength)) {
		memcpy(psurveyPara->ss_ssid, pssid->Ssid, pssid->SsidLength);
		psurveyPara->ss_ssidlen = cpu_to_le32(pssid->SsidLength);
	}
	set_fwstate(pmlmepriv, _FW_UNDER_SURVEY);
	r8712_enqueue_cmd(pcmdpriv, ph2c);
	_set_timer(&pmlmepriv->scan_to_timer, SCANNING_TIMEOUT);
	padapter->ledpriv.LedControlHandler(padapter, LED_CTL_SITE_SURVEY);
	padapter->blnEnableRxFF0Filter = 0;
	return _SUCCESS;
}
开发者ID:383530895,项目名称:linux,代码行数:39,代码来源:rtl871x_cmd.c

示例3: r8712_gettssi_cmd

u8 r8712_gettssi_cmd(struct _adapter *padapter, u8 offset, u8 *pval)
{
	struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
	struct cmd_obj *ph2c;
	struct readTSSI_parm *prdtssiparm;

	ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
	if (ph2c == NULL)
		return _FAIL;
	prdtssiparm = kmalloc(sizeof(*prdtssiparm), GFP_ATOMIC);
	if (prdtssiparm == NULL) {
		kfree(ph2c);
		return _FAIL;
	}
	INIT_LIST_HEAD(&ph2c->list);
	ph2c->cmdcode = GEN_CMD_CODE(_ReadTSSI);
	ph2c->parmbuf = (unsigned char *)prdtssiparm;
	ph2c->cmdsz = sizeof(struct readTSSI_parm);
	ph2c->rsp = pval;
	ph2c->rspsz = sizeof(struct readTSSI_rsp);

	prdtssiparm->offset = offset;
	r8712_enqueue_cmd(pcmdpriv, ph2c);
	return _SUCCESS;
}
开发者ID:383530895,项目名称:linux,代码行数:25,代码来源:rtl871x_cmd.c

示例4: rtw_rpt_timer_cfg_cmd

u8 rtw_rpt_timer_cfg_cmd(struct adapter *padapter, u16 min_time)
{
	struct cmd_obj		*ph2c;
	struct drvextra_cmd_parm	*pdrvextra_cmd_parm;
	struct cmd_priv	*pcmdpriv = &padapter->cmdpriv;

	u8	res = _SUCCESS;

	ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
	if (ph2c == NULL) {
		res = _FAIL;
		goto exit;
	}

	pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_ATOMIC);
	if (pdrvextra_cmd_parm == NULL) {
		kfree(ph2c);
		res = _FAIL;
		goto exit;
	}

	pdrvextra_cmd_parm->ec_id = RTP_TIMER_CFG_WK_CID;
	pdrvextra_cmd_parm->type_size = min_time;
	pdrvextra_cmd_parm->pbuf = NULL;
	init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
	res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:


	return res;
}
开发者ID:020gzh,项目名称:linux,代码行数:31,代码来源:rtw_cmd.c

示例5: rtw_ps_cmd

u8 rtw_ps_cmd(struct adapter *padapter)
{
    struct cmd_obj		*ppscmd;
    struct drvextra_cmd_parm	*pdrvextra_cmd_parm;
    struct cmd_priv	*pcmdpriv = &padapter->cmdpriv;

    u8	res = _SUCCESS;

    ppscmd = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
    if (ppscmd == NULL) {
        res = _FAIL;
        goto exit;
    }

    pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_ATOMIC);
    if (pdrvextra_cmd_parm == NULL) {
        kfree(ppscmd);
        res = _FAIL;
        goto exit;
    }

    pdrvextra_cmd_parm->ec_id = POWER_SAVING_CTRL_WK_CID;
    pdrvextra_cmd_parm->pbuf = NULL;
    init_h2fwcmd_w_parm_no_rsp(ppscmd, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));

    res = rtw_enqueue_cmd(pcmdpriv, ppscmd);

exit:


    return res;
}
开发者ID:raoy1990,项目名称:linux,代码行数:32,代码来源:rtw_cmd.c

示例6: rtw_dynamic_chk_wk_cmd

u8 rtw_dynamic_chk_wk_cmd(struct adapter *padapter)
{
	struct cmd_obj *ph2c;
	struct drvextra_cmd_parm *pdrvextra_cmd_parm;
	struct cmd_priv	*pcmdpriv = &padapter->cmdpriv;
	u8	res = _SUCCESS;


	ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
	if (ph2c == NULL) {
		res = _FAIL;
		goto exit;
	}

	pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_ATOMIC);
	if (pdrvextra_cmd_parm == NULL) {
		kfree(ph2c);
		res = _FAIL;
		goto exit;
	}

	pdrvextra_cmd_parm->ec_id = DYNAMIC_CHK_WK_CID;
	pdrvextra_cmd_parm->type_size = 0;
	pdrvextra_cmd_parm->pbuf = (u8 *)padapter;

	init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));


	/* rtw_enqueue_cmd(pcmdpriv, ph2c); */
	res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
	return res;
}
开发者ID:020gzh,项目名称:linux,代码行数:33,代码来源:rtw_cmd.c

示例7: rtw_chk_hi_queue_cmd

u8 rtw_chk_hi_queue_cmd(struct adapter *padapter)
{
	struct cmd_obj	*ph2c;
	struct drvextra_cmd_parm	*pdrvextra_cmd_parm;
	struct cmd_priv	*pcmdpriv = &padapter->cmdpriv;
	u8	res = _SUCCESS;

	ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
	if (ph2c == NULL) {
		res = _FAIL;
		goto exit;
	}

	pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
	if (pdrvextra_cmd_parm == NULL) {
		kfree(ph2c);
		res = _FAIL;
		goto exit;
	}

	pdrvextra_cmd_parm->ec_id = CHECK_HIQ_WK_CID;
	pdrvextra_cmd_parm->type_size = 0;
	pdrvextra_cmd_parm->pbuf = NULL;

	init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));

	res = rtw_enqueue_cmd(pcmdpriv, ph2c);
exit:
	return res;
}
开发者ID:020gzh,项目名称:linux,代码行数:30,代码来源:rtw_cmd.c

示例8: createbss_cmd_ex

u8 createbss_cmd_ex(_adapter *padapter, unsigned char *pbss, unsigned int sz)
{
	struct cmd_obj	*pcmd;
	struct cmd_priv	*pcmdpriv=&padapter->cmdpriv;
	u8 res = _SUCCESS;

_func_enter_;

	pcmd = (struct cmd_obj*)_malloc(sizeof(struct cmd_obj));
	if (pcmd == NULL) {
		res = _FAIL;
		goto exit;
	}

	_init_listhead(&pcmd->list);
	pcmd->cmdcode = GEN_CMD_CODE(_CreateBss);
	pcmd->parmbuf = pbss;
	pcmd->cmdsz = sz;
	pcmd->rsp = NULL;
	pcmd->rspsz = 0;

	enqueue_cmd(pcmdpriv, pcmd);

exit:

_func_exit_;

	return res;
}
开发者ID:OpenHMR,项目名称:Open-HMR600,代码行数:29,代码来源:rtl871x_cmd.c

示例9: setstandby_cmd

/*
u8 setstandby_cmd(unsigned char  *adapter)
*/
u8 setstandby_cmd(_adapter *padapter, uint action)
{
	struct cmd_obj		*ph2c;
	struct usb_suspend_parm	*psetusbsuspend;
	struct cmd_priv 	*pcmdpriv = &padapter->cmdpriv;

	u8 ret = _SUCCESS;

_func_enter_;

	ph2c = (struct cmd_obj*)_malloc(sizeof(struct cmd_obj));
	if (ph2c == NULL) {
		ret = _FAIL;
		goto exit;
	}

	psetusbsuspend = (struct usb_suspend_parm*)_malloc(sizeof(struct usb_suspend_parm));
	if (psetusbsuspend == NULL) {
		_mfree((u8*)ph2c, sizeof(struct cmd_obj));
		ret = _FAIL;
		goto exit;
	}

	psetusbsuspend->action = action;

	init_h2fwcmd_w_parm_no_rsp(ph2c, psetusbsuspend, GEN_CMD_CODE(_SetUsbSuspend));

	enqueue_cmd(pcmdpriv, ph2c);

exit:

_func_exit_;

	return ret;
}
开发者ID:OpenHMR,项目名称:Open-HMR600,代码行数:38,代码来源:rtl871x_cmd.c

示例10: rtw_set_chplan_cmd

u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue)
{
	struct	cmd_obj *pcmdobj;
	struct	SetChannelPlan_param *setChannelPlan_param;
	struct	cmd_priv   *pcmdpriv = &padapter->cmdpriv;

	u8	res = _SUCCESS;


	RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_set_chplan_cmd\n"));

	/* check input parameter */
	if (!rtw_is_channel_plan_valid(chplan)) {
		res = _FAIL;
		goto exit;
	}

	/* prepare cmd parameter */
	setChannelPlan_param = kzalloc(sizeof(struct SetChannelPlan_param), GFP_KERNEL);
	if (setChannelPlan_param == NULL) {
		res = _FAIL;
		goto exit;
	}
	setChannelPlan_param->channel_plan = chplan;

	if (enqueue) {
		/* need enqueue, prepare cmd_obj and enqueue */
		pcmdobj = kzalloc(sizeof(struct	cmd_obj), GFP_KERNEL);
		if (pcmdobj == NULL) {
			kfree(setChannelPlan_param);
			res = _FAIL;
			goto exit;
		}

		init_h2fwcmd_w_parm_no_rsp(pcmdobj, setChannelPlan_param, GEN_CMD_CODE(_SetChannelPlan));
		res = rtw_enqueue_cmd(pcmdpriv, pcmdobj);
	} else {
		/* no need to enqueue, do the cmd hdl directly and free cmd parameter */
		if (set_chplan_hdl(padapter, (unsigned char *)setChannelPlan_param) != H2C_SUCCESS)
			res = _FAIL;

		kfree(setChannelPlan_param);
	}

	/* do something based on res... */
	if (res == _SUCCESS)
		padapter->mlmepriv.ChannelPlan = chplan;

exit:


	return res;
}
开发者ID:020gzh,项目名称:linux,代码行数:53,代码来源:rtw_cmd.c

示例11: rtw_cmd_filter

static int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
{
	u8 bAllow = false; /* set to true to allow enqueuing cmd when hw_init_completed is false */

	/* To decide allow or not */
	if ((pcmdpriv->padapter->pwrctrlpriv.bHWPwrPindetect) &&
	    (!pcmdpriv->padapter->registrypriv.usbss_enable)) {
		if (cmd_obj->cmdcode == GEN_CMD_CODE(_Set_Drv_Extra)) {
			struct drvextra_cmd_parm	*pdrvextra_cmd_parm = (struct drvextra_cmd_parm	*)cmd_obj->parmbuf;

			if (pdrvextra_cmd_parm->ec_id == POWER_SAVING_CTRL_WK_CID)
				bAllow = true;
		}
	}

	if (cmd_obj->cmdcode == GEN_CMD_CODE(_SetChannelPlan))
		bAllow = true;

	if ((!pcmdpriv->padapter->hw_init_completed && !bAllow) ||
	    !pcmdpriv->cmdthd_running)	/* com_thread not running */
		return _FAIL;
	return _SUCCESS;
}
开发者ID:020gzh,项目名称:linux,代码行数:23,代码来源:rtw_cmd.c

示例12: r8712_setfwra_cmd

u8 r8712_setfwra_cmd(struct _adapter *padapter, u8 type)
{
	struct cmd_obj *ph2c;
	struct writePTM_parm *pwriteptmparm;
	struct cmd_priv *pcmdpriv = &padapter->cmdpriv;

	ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
	if (ph2c == NULL)
		return _FAIL;
	pwriteptmparm = kmalloc(sizeof(*pwriteptmparm), GFP_ATOMIC);
	if (pwriteptmparm == NULL) {
		kfree(ph2c);
		return _FAIL;
	}
	init_h2fwcmd_w_parm_no_rsp(ph2c, pwriteptmparm, GEN_CMD_CODE(_SetRA));
	pwriteptmparm->type = type;
	r8712_enqueue_cmd(pcmdpriv, ph2c);
	return _SUCCESS;
}
开发者ID:383530895,项目名称:linux,代码行数:19,代码来源:rtl871x_cmd.c

示例13: sitesurvey_cmd

/*
sitesurvey_cmd(~)
	### NOTE:#### (!!!!)
	MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
*/
u8 sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *pssid)
{
	struct cmd_obj		*ph2c;
	struct sitesurvey_parm	*psurveyPara;
	struct cmd_priv		*pcmdpriv = &padapter->cmdpriv;
	struct mlme_priv	*pmlmepriv = &padapter->mlmepriv;

_func_enter_;

	ph2c = (struct cmd_obj*)_malloc(sizeof(struct cmd_obj));
	if (ph2c == NULL)
		return _FAIL;

	psurveyPara = (struct sitesurvey_parm*)_malloc(sizeof(struct sitesurvey_parm));
	if (psurveyPara == NULL) {
		_mfree((unsigned char*) ph2c, sizeof(struct cmd_obj));
		return _FAIL;
	}

	init_h2fwcmd_w_parm_no_rsp(ph2c, psurveyPara, GEN_CMD_CODE(_SiteSurvey));

	psurveyPara->bsslimit = cpu_to_le32(48);
	psurveyPara->passive_mode = cpu_to_le32(1);
	psurveyPara->ss_ssidlen= cpu_to_le32(0);// pssid->SsidLength;
	_memset(psurveyPara->ss_ssid, 0, IW_ESSID_MAX_SIZE + 1);
	if ((pssid != NULL) && (pssid->SsidLength)) {
		_memcpy(psurveyPara->ss_ssid, pssid->Ssid, pssid->SsidLength);
		psurveyPara->ss_ssidlen = cpu_to_le32(pssid->SsidLength);
	}

	set_fwstate(pmlmepriv, _FW_UNDER_SURVEY);

	enqueue_cmd(pcmdpriv, ph2c);

	_set_timer(&pmlmepriv->scan_to_timer, SCANNING_TIMEOUT);
	padapter->ledpriv.LedControlHandler(padapter, LED_CTL_SITE_SURVEY);
	padapter->blnEnableRxFF0Filter = 0;

_func_exit_;

	return _SUCCESS;
}
开发者ID:OpenHMR,项目名称:Open-HMR600,代码行数:47,代码来源:rtl871x_cmd.c

示例14: r8712_setfwdig_cmd

u8 r8712_setfwdig_cmd(struct _adapter *padapter, u8 type)
{
	struct cmd_obj *ph2c;
	struct writePTM_parm *pwriteptmparm;
	struct cmd_priv *pcmdpriv = &padapter->cmdpriv;

	ph2c = (struct cmd_obj *)_malloc(sizeof(struct cmd_obj));
	if (ph2c == NULL)
		return _FAIL;
	pwriteptmparm = (struct writePTM_parm *)
		_malloc(sizeof(struct setdig_parm));
	if (pwriteptmparm == NULL) {
		kfree((u8 *) ph2c);
		return _FAIL;
	}
	init_h2fwcmd_w_parm_no_rsp(ph2c, pwriteptmparm, GEN_CMD_CODE(_SetDIG));
	pwriteptmparm->type = type;
	r8712_enqueue_cmd(pcmdpriv, ph2c);
	return _SUCCESS;
}
开发者ID:0xroot,项目名称:Blackphone-BP1-Kernel,代码行数:20,代码来源:rtl871x_cmd.c

示例15: r8712_addbareq_cmd

u8 r8712_addbareq_cmd(struct _adapter *padapter, u8 tid)
{
	struct cmd_priv		*pcmdpriv = &padapter->cmdpriv;
	struct cmd_obj		*ph2c;
	struct addBaReq_parm	*paddbareq_parm;

	ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
	if (ph2c == NULL)
		return _FAIL;
	paddbareq_parm = kmalloc(sizeof(*paddbareq_parm), GFP_ATOMIC);
	if (paddbareq_parm == NULL) {
		kfree(ph2c);
		return _FAIL;
	}
	paddbareq_parm->tid = tid;
	init_h2fwcmd_w_parm_no_rsp(ph2c, paddbareq_parm,
				   GEN_CMD_CODE(_AddBAReq));
	r8712_enqueue_cmd_ex(pcmdpriv, ph2c);
	return _SUCCESS;
}
开发者ID:383530895,项目名称:linux,代码行数:20,代码来源:rtl871x_cmd.c


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