您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wldev_iovar_setint函数代码示例

51自学网 2021-06-03 10:00:41
  C++
这篇教程C++ wldev_iovar_setint函数代码示例写得很实用,希望能帮到您。

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

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

示例1: wl_cfg80211_bt_setflag

static voidwl_cfg80211_bt_setflag(struct net_device *dev, bool set){#if defined(BT_DHCP_USE_FLAGS)	char buf_flag7_dhcp_on[8] = { 7, 00, 00, 00, 0x1, 0x0, 0x00, 0x00 };	char buf_flag7_default[8]   = { 7, 00, 00, 00, 0x0, 0x00, 0x00, 0x00};#endif	int bt_coex = 0;#if defined(BT_DHCP_eSCO_FIX)		set_btc_esco_params(dev, set);#endif#if defined(BT_DHCP_USE_FLAGS)	WL_TRACE(("WI-FI priority boost via bt flags, set:%d/n", set));	if (set == TRUE) {				dev_wlc_bufvar_set(dev, "btc_flags",			(char *)&buf_flag7_dhcp_on[0],			sizeof(buf_flag7_dhcp_on));		wldev_iovar_setint(dev, "btc_mode", bt_coex);	} else {				dev_wlc_bufvar_set(dev, "btc_flags",			(char *)&buf_flag7_default[0],			sizeof(buf_flag7_default));		bt_coex = 1;		wldev_iovar_setint(dev, "btc_mode", bt_coex);    }#endif}
开发者ID:hyuh,项目名称:m7-wls,代码行数:33,


示例2: wl_android_okc_enable

static intwl_android_okc_enable(struct net_device *dev, char *command, int total_len){	int error = 0;	char okc_enable = 0;	okc_enable = command[strlen(CMD_OKC_ENABLE) + 1] - '0';	error = wldev_iovar_setint(dev, "okc_enable", okc_enable);	if (error) {		DHD_ERROR(("Failed to %s OKC, error = %d/n",			okc_enable ? "enable" : "disable", error));	}	wldev_iovar_setint(dev, "ccx_enable", 0);	return error;}
开发者ID:rgmabs19357,项目名称:Huawei-,代码行数:17,


示例3: wl_android_iolist_add

static intwl_android_iolist_add(struct net_device *dev, struct list_head *head, struct io_cfg *config){	struct io_cfg *resume_cfg;	s32 ret;	resume_cfg = kzalloc(sizeof(struct io_cfg), GFP_KERNEL);	if (!resume_cfg)		return -ENOMEM;	if (config->iovar) {		ret = wldev_iovar_getint(dev, config->iovar, &resume_cfg->param);		if (ret) {			DHD_ERROR(("%s: Failed to get current %s value/n",				__FUNCTION__, config->iovar));			goto error;		}		ret = wldev_iovar_setint(dev, config->iovar, config->param);		if (ret) {			DHD_ERROR(("%s: Failed to set %s to %d/n", __FUNCTION__,				config->iovar, config->param));			goto error;		}		resume_cfg->iovar = config->iovar;	} else {		resume_cfg->arg = kzalloc(config->len, GFP_KERNEL);		if (!resume_cfg->arg) {			ret = -ENOMEM;			goto error;		}		ret = wldev_ioctl(dev, config->ioctl, resume_cfg->arg, config->len, false);		if (ret) {			DHD_ERROR(("%s: Failed to get ioctl %d/n", __FUNCTION__,				config->ioctl));			goto error;		}		ret = wldev_ioctl(dev, config->ioctl + 1, config->arg, config->len, true);		if (ret) {			DHD_ERROR(("%s: Failed to set %s to %d/n", __FUNCTION__,				config->iovar, config->param));			goto error;		}		if (config->ioctl + 1 == WLC_SET_PM)			wl_cfg80211_update_power_mode(dev);		resume_cfg->ioctl = config->ioctl;		resume_cfg->len = config->len;	}	list_add(&resume_cfg->list, head);	return 0;error:	kfree(resume_cfg->arg);	kfree(resume_cfg);	return ret;}
开发者ID:rgmabs19357,项目名称:Huawei-,代码行数:58,


示例4: set_roamscan_channel_list

int set_roamscan_channel_list(struct net_device *dev,	unsigned char n, unsigned char channels[], int ioctl_ver){	int i;	int error;	channel_list_t channel_list;	char iobuf[WLC_IOCTL_SMLEN];	roamscan_mode = ROAMSCAN_MODE_WES;	if (n > MAX_CHANNEL_LIST)		n = MAX_CHANNEL_LIST;	for (i = 0; i < n; i++) {		chanspec_t chanspec;		if (channels[i] <= CH_MAX_2G_CHANNEL) {			chanspec = band2G | band_bw | channels[i];		} else {			chanspec = band5G | band_bw | channels[i];		}		roam_cache[i].chanspec = chanspec;		channel_list.channels[i] = chanspec;		WL_DBG(("channel[%d] - [%02d] /n", i, channels[i]));	}	n_roam_cache = n;	channel_list.n = n;	/* need to set ROAMSCAN_MODE_NORMAL to update roamscan_channels,	 * otherwise, it won't be updated	 */	wldev_iovar_setint(dev, "roamscan_mode", ROAMSCAN_MODE_NORMAL);	error = wldev_iovar_setbuf(dev, "roamscan_channels", &channel_list,		sizeof(channel_list), iobuf, sizeof(iobuf), NULL);	if (error) {		WL_DBG(("Failed to set roamscan channels, error = %d/n", error));	}	wldev_iovar_setint(dev, "roamscan_mode", ROAMSCAN_MODE_WES);	return error;}
开发者ID:saiyamd,项目名称:P900-kernel-source,代码行数:42,


示例5: set_roamscan_mode

int set_roamscan_mode(struct net_device *dev, int mode){	int error = 0;	roamscan_mode = mode;	n_roam_cache = 0;	error = wldev_iovar_setint(dev, "roamscan_mode", mode);	if (error) {		WL_ERROR(("Failed to set roamscan mode to %d, error = %d/n", mode, error));	}	return error;}
开发者ID:garwynn,项目名称:SC02E_LJF_Kernel,代码行数:13,


示例6: wl_android_wifi_on

int wl_android_wifi_on(struct net_device *dev){	int ret = 0;	int retry = POWERUP_MAX_RETRY;	printk("%s in/n", __FUNCTION__);	if (!dev) {		DHD_ERROR(("%s: dev is null/n", __FUNCTION__));		return -EINVAL;	}	dhd_net_if_lock(dev);	if (!g_wifi_on) {		do {			dhd_customer_gpio_wlan_ctrl(WLAN_RESET_ON);			ret = sdioh_start(NULL, 0);			if (ret == 0)				break;			DHD_ERROR(("/nfailed to power up wifi chip, retry again (%d left) **/n/n",				retry+1));			dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);		} while (retry-- >= 0);		if (ret != 0) {			DHD_ERROR(("/nfailed to power up wifi chip, max retry reached **/n/n"));			goto exit;		}		ret = dhd_dev_reset(dev, FALSE);		sdioh_start(NULL, 1);		if (!ret) {			if (dhd_dev_init_ioctl(dev) < 0)				ret = -EFAULT;		}#if defined(PROP_TXSTATUS) && !defined(PROP_TXSTATUS_VSDB)		dhd_wlfc_init(bcmsdh_get_drvdata());#endif		g_wifi_on = TRUE;	}	wldev_iovar_setint(dev, "mimo_bw_cap", 1);exit:	dhd_net_if_unlock(dev);	return ret;}
开发者ID:thoniorf,项目名称:ouya_1_1-kernel,代码行数:44,


示例7: wl_android_iolist_resume

static voidwl_android_iolist_resume(struct net_device *dev, struct list_head *head){	struct io_cfg *config;	struct list_head *cur, *q;	list_for_each_safe(cur, q, head) {		config = list_entry(cur, struct io_cfg, list);		if (config->iovar) {			wldev_iovar_setint(dev, config->iovar, config->param);		} else {			wldev_ioctl(dev, config->ioctl + 1, config->arg, config->len, true);			if (config->ioctl + 1 == WLC_SET_PM)				wl_cfg80211_update_power_mode(dev);			kfree(config->arg);		}		list_del(cur);		kfree(config);	}
开发者ID:rgmabs19357,项目名称:Huawei-,代码行数:19,


示例8: wldev_set_ap_sta_registra_wsec

int wldev_set_ap_sta_registra_wsec(struct net_device *dev, char *command, int total_len){	int bytes_written = 0;	int wsec = 0;        if ( !ap_net_dev ) return 0;	wldev_iovar_getint(ap_net_dev, "wsec", &wsec);	WLDEV_ERROR(("### %s devname[%s],got wsec(bset)=0x%x/n", __FUNCTION__, ap_net_dev->name, wsec));	wsec |= SES_OW_ENABLED;	WLDEV_ERROR(("### %s devname[%s],wsec=0x%x/n", __FUNCTION__, ap_net_dev->name, wsec));	wldev_iovar_setint(ap_net_dev, "wsec", wsec);	WLDEV_ERROR(("### %s devname[%s] seting/n", __FUNCTION__, ap_net_dev->name));	wldev_iovar_getint(ap_net_dev, "wsec", &wsec);	WLDEV_ERROR(("### %s devname[%s],got(aset) wsec=0x%x/n", __FUNCTION__, ap_net_dev->name, wsec));	return bytes_written;}
开发者ID:curbthepain,项目名称:NuK3rn3l_m7_sense_lollipop,代码行数:21,


示例9: wl_android_set_roam_mode

int wl_android_set_roam_mode(struct net_device *dev, char *command, int total_len){	int error = 0;	int mode = 0;	if (sscanf(command, "%*s %d", &mode) != 1) {		DHD_ERROR(("%s: Failed to get Parameter/n", __FUNCTION__));		return -1;	}	error = wldev_iovar_setint(dev, "roam_off", mode);	if (error) {		DHD_ERROR(("%s: Failed to set roaming Mode %d, error = %d/n",		__FUNCTION__, mode, error));		return -1;	}	else		DHD_ERROR(("%s: succeeded to set roaming Mode %d, error = %d/n",		__FUNCTION__, mode, error));	return 0;}
开发者ID:rgmabs19357,项目名称:Huawei-,代码行数:21,


示例10: wldev_set_apsta

intwldev_set_apsta(struct net_device *dev, bool enable){   	int res = 0;   	int mpc = 0;	int concr_mode = 0;   	char smbuf[WLC_IOCTL_SMLEN];	bss_setbuf_t bss_setbuf;        memset(smbuf, 0, sizeof(smbuf));	printf("%s: enter/n", __FUNCTION__);   	if (!dev) {                  WLDEV_ERROR(("%s: dev is null/n", __FUNCTION__));                  return -1;   	}	if (enable){		/* wait for interface ready */		wait_for_ap_ready(1); //broacom 0405		if ( ap_net_dev == NULL ) {                        WLDEV_ERROR(("%s ap_net_dev == NULL/n", __FUNCTION__));                        goto fail;		}		//2012-09-10 CT2 set Concr_mode ++++		concr_mode = 1;		if ((res = wldev_iovar_setint(dev, "concr_mode_set", concr_mode))) {					printf("%s fail to set concr_mode res[%d]/n", __FUNCTION__,res);		}		//2012-09-10 CT2 set Concr_mode ++++   		mpc = 0;      	        if ((res = wldev_iovar_setint(dev, "mpc", mpc))) {           	        WLDEV_ERROR(("%s fail to set mpc/n", __FUNCTION__));           	        goto fail;      	        }	         	if ((res = wl_iw_set_ap_security(ap_net_dev, &ap_cfg)) != 0) {           	        WLDEV_ERROR((" %s ERROR setting SOFTAP security in :%d/n", __FUNCTION__, res));         	        goto fail;                }                                 bss_setbuf.cfg = 1;                bss_setbuf.val = 1;  /* up the interface */                if ((res = wldev_iovar_setbuf_bsscfg(dev, "bss", &bss_setbuf, sizeof(bss_setbuf), smbuf, sizeof(smbuf), 1, NULL)) < 0){           	         WLDEV_ERROR(("%s: ERROR:%d, set bss up failed/n", __FUNCTION__, res));           	         goto fail;        	}	        bcm_mdelay(500);		if ((res = wldev_iovar_setint(dev, "allmulti", 1))) {            		WLDEV_ERROR(("%s: ERROR:%d, set allmulti failed/n", __FUNCTION__, res));            		goto fail;		}//BRCM_APSTA_START		set_ap_channel(dev,&ap_cfg);		ap_net_dev->operstate = IF_OPER_UP;//BRCM_APSTA_END	} else {		if ((res = wl_softap_stop(ap_net_dev))){           		WLDEV_ERROR(("%s: ERROR:%d, call wl_softap_stop failed/n", __FUNCTION__, res));           		goto fail;		}		//2012-09-10 CT2 set Concr_mode ++++		concr_mode = 0;		if ((res = wldev_iovar_setint(dev, "concr_mode_set", concr_mode))) {				printf("%s fail to set concr_mode res[%d]/n", __FUNCTION__,res);		}		//2012-09-10 CT2 set Concr_mode ++++    		mpc = 1;	     	if ((res = wldev_iovar_setint(dev, "mpc", mpc))) {        	   	WLDEV_ERROR(("%s fail to set mpc/n", __FUNCTION__));           		goto fail;	      	}		}fail:    return res;}
开发者ID:JmzTaylor,项目名称:android_kernel_htc_totemc2,代码行数:86,


示例11: wldev_set_country

//.........这里部分代码省略.........	}	return 0;}#if defined(CUSTOM_PLATFORM_NV_TEGRA)/* tuning performance for miracast */int wldev_miracast_tuning(	struct net_device *dev, char *command, int total_len){	int error = 0;	int mode = 0;	int ampdu_mpdu;	int roam_off;#ifdef VSDB_BW_ALLOCATE_ENABLE	int mchan_algo;	int mchan_bw;#endif /* VSDB_BW_ALLOCATE_ENABLE */	if (sscanf(command, "%*s %d", &mode) != 1) {		WLDEV_ERROR(("Failed to get mode/n"));		return -1;	}	WLDEV_ERROR(("mode: %d/n", mode));	if (mode == 0) {		/* Normal mode: restore everything to default */		ampdu_mpdu = -1;	/* FW default */#if defined(ROAM_ENABLE)		roam_off = 0;	/* roam enable */#elif defined(DISABLE_BUILTIN_ROAM)		roam_off = 1;	/* roam disable */#endif#ifdef VSDB_BW_ALLOCATE_ENABLE		mchan_algo = 0;	/* Default */		mchan_bw = 50;	/* 50:50 */#endif /* VSDB_BW_ALLOCATE_ENABLE */	}	else if (mode == 1) {		/* Miracast source mode */		ampdu_mpdu = 8;	/* for tx latency */#if defined(ROAM_ENABLE) || defined(DISABLE_BUILTIN_ROAM)		roam_off = 1; /* roam disable */#endif#ifdef VSDB_BW_ALLOCATE_ENABLE		mchan_algo = 1;	/* BW based */		mchan_bw = 25;	/* 25:75 */#endif /* VSDB_BW_ALLOCATE_ENABLE */	}	else if (mode == 2) {		/* Miracast sink/PC Gaming mode */		ampdu_mpdu = -1;	/* FW default */#if defined(ROAM_ENABLE) || defined(DISABLE_BUILTIN_ROAM)		roam_off = 1; /* roam disable */#endif#ifdef VSDB_BW_ALLOCATE_ENABLE		mchan_algo = 0;	/* Default */		mchan_bw = 50;	/* 50:50 */#endif /* VSDB_BW_ALLOCATE_ENABLE */	}	else {		WLDEV_ERROR(("Unknown mode: %d/n", mode));		return -1;	}	/* Update ampdu_mpdu */	error = wldev_iovar_setint(dev, "ampdu_mpdu", ampdu_mpdu);	if (error) {		WLDEV_ERROR(("Failed to set ampdu_mpdu: mode:%d, error:%d/n",			mode, error));		return -1;	}#if defined(ROAM_ENABLE) || defined(DISABLE_BUILTIN_ROAM)	error = wldev_iovar_setint(dev, "roam_off", roam_off);	if (error) {		WLDEV_ERROR(("Failed to set roam_off: mode:%d, error:%d/n",			mode, error));		return -1;	}#endif /* ROAM_ENABLE || DISABLE_BUILTIN_ROAM */#ifdef VSDB_BW_ALLOCATE_ENABLE	error = wldev_iovar_setint(dev, "mchan_algo", mchan_algo);	if (error) {		WLDEV_ERROR(("Failed to set mchan_algo: mode:%d, error:%d/n",			mode, error));		return -1;	}	error = wldev_iovar_setint(dev, "mchan_bw", mchan_bw);	if (error) {		WLDEV_ERROR(("Failed to set mchan_bw: mode:%d, error:%d/n",			mode, error));		return -1;	}#endif /* VSDB_BW_ALLOCATE_ENABLE */	return error;}
开发者ID:nel82,项目名称:android_zenfone4_kernel,代码行数:101,


示例12: wldev_miracast_tuning

/* tuning performance for miracast */int wldev_miracast_tuning(	struct net_device *dev, int mode){	int error = 0;	int ampdu_mpdu;	int roam_off;#ifdef VSDB_BW_ALLOCATE_ENABLE	int mchan_algo;	int mchan_bw;#endif /* VSDB_BW_ALLOCATE_ENABLE */	WLDEV_ERROR(("mode: %d/n", mode));	if (mode == 0) {		/* Normal mode: restore everything to default */		ampdu_mpdu = -1;	/* FW default */#if defined(ROAM_ENABLE)		roam_off = 0;	/* roam enable */#elif defined(DISABLE_BUILTIN_ROAM)		roam_off = 1;	/* roam disable */#endif#ifdef VSDB_BW_ALLOCATE_ENABLE		mchan_algo = 0;	/* Default */		mchan_bw = 50;	/* 50:50 */#endif /* VSDB_BW_ALLOCATE_ENABLE */	}	else if (mode == 1) {		/* Miracast source mode */		ampdu_mpdu = 8;	/* for tx latency */#if defined(ROAM_ENABLE) || defined(DISABLE_BUILTIN_ROAM)		roam_off = 1; /* roam disable */#endif#ifdef VSDB_BW_ALLOCATE_ENABLE		mchan_algo = 1;	/* BW based */		mchan_bw = 35;	/* 35:65 */#endif /* VSDB_BW_ALLOCATE_ENABLE */	}	else if (mode == 2) {		/* Miracast sink/PC Gaming mode */		ampdu_mpdu = -1;	/* FW default */#if defined(ROAM_ENABLE) || defined(DISABLE_BUILTIN_ROAM)		roam_off = 1; /* roam disable */#endif#ifdef VSDB_BW_ALLOCATE_ENABLE		mchan_algo = 0;	/* Default */		mchan_bw = 50;	/* 50:50 */#endif /* VSDB_BW_ALLOCATE_ENABLE */	}	else {		WLDEV_ERROR(("Unknown mode: %d/n", mode));		return -1;	}	/* Update ampdu_mpdu */	error = wldev_iovar_setint(dev, "ampdu_mpdu", ampdu_mpdu);	if (error) {		WLDEV_ERROR(("Failed to set ampdu_mpdu: mode:%d, error:%d/n",			mode, error));		return -1;	}#if defined(ROAM_ENABLE) || defined(DISABLE_BUILTIN_ROAM)	error = wldev_iovar_setint(dev, "roam_off", roam_off);	if (error) {		WLDEV_ERROR(("Failed to set roam_off: mode:%d, error:%d/n",			mode, error));		return -1;	}#endif /* ROAM_ENABLE || DISABLE_BUILTIN_ROAM */#ifdef VSDB_BW_ALLOCATE_ENABLE	error = wldev_iovar_setint(dev, "mchan_algo", mchan_algo);	if (error) {		WLDEV_ERROR(("Failed to set mchan_algo: mode:%d, error:%d/n",			mode, error));		return -1;	}	error = wldev_iovar_setint(dev, "mchan_bw", mchan_bw);	if (error) {		WLDEV_ERROR(("Failed to set mchan_bw: mode:%d, error:%d/n",			mode, error));		return -1;	}#endif /* VSDB_BW_ALLOCATE_ENABLE */	return error;}
开发者ID:curbthepain,项目名称:NuK3rn3l_m7_sense_lollipop,代码行数:89,


示例13: wldev_miracast_tuning

/* tuning performance for miracast */int wldev_miracast_tuning(	struct net_device *dev, char *command, int total_len){	int error = 0;	int mode = 0;	int ampdu_mpdu;	int ampdu_rx_tid = -1;	int disable_interference_mitigation = 0;	int auto_interference_mitigation = -1;#ifdef VSDB_BW_ALLOCATE_ENABLE	int mchan_algo;	int mchan_bw;#endif /* VSDB_BW_ALLOCATE_ENABLE */	if (sscanf(command, "%*s %d", &mode) != 1) {		WLDEV_ERROR(("Failed to get mode/n"));		return -1;	}set_mode:	WLDEV_ERROR(("mode: %d/n", mode));	if (mode == 0) {		/* Normal mode: restore everything to default */		ampdu_mpdu = -1;	/* FW default */#ifdef VSDB_BW_ALLOCATE_ENABLE		mchan_algo = 0;	/* Default */		mchan_bw = 50;	/* 50:50 */#endif /* VSDB_BW_ALLOCATE_ENABLE */	}	else if (mode == 1) {		/* Miracast source mode */		ampdu_mpdu = 8;	/* for tx latency */#ifdef VSDB_BW_ALLOCATE_ENABLE		mchan_algo = 1;	/* BW based */		mchan_bw = 25;	/* 25:75 */#endif /* VSDB_BW_ALLOCATE_ENABLE */	}	else if (mode == 2) {		/* Miracast sink/PC Gaming mode */		ampdu_mpdu = 8;	/* FW default */#ifdef VSDB_BW_ALLOCATE_ENABLE		mchan_algo = 0;	/* Default */		mchan_bw = 50;	/* 50:50 */#endif /* VSDB_BW_ALLOCATE_ENABLE */	} else if (mode == 3) {		ampdu_rx_tid = 0;		mode = 2;		goto set_mode;	} else if (mode == 4) {		ampdu_rx_tid = 0x5f;		mode = 0;		goto set_mode;	} else if (mode == 5) {		/* Blake connected mode, disable interference mitigation */		error = wldev_ioctl(dev, WLC_SET_INTERFERENCE_OVERRIDE_MODE,							&disable_interference_mitigation,							sizeof(int), true);		if (error) {			WLDEV_ERROR((				"Failed to set interference_override: mode:%d, error:%d/n",				mode, error));			return -1;		}		return error;	} else if (mode == 6) {		/* No Blake connected, enable auto interference mitigation */		error = wldev_ioctl(dev, WLC_SET_INTERFERENCE_OVERRIDE_MODE,							&auto_interference_mitigation,							sizeof(int), true);		if (error) {			WLDEV_ERROR((				"Failed to set interference_override: mode:%d, error:%d/n",				mode, error));			return -1;		}		return error;	} else {		WLDEV_ERROR(("Unknown mode: %d/n", mode));		return -1;	}	/* Update ampdu_mpdu */	error = wldev_iovar_setint(dev, "ampdu_mpdu", ampdu_mpdu);	if (error) {		WLDEV_ERROR(("Failed to set ampdu_mpdu: mode:%d, error:%d/n",			mode, error));		return -1;	}	if (ampdu_rx_tid != -1)		dhd_set_ampdu_rx_tid(dev, ampdu_rx_tid);#ifdef VSDB_BW_ALLOCATE_ENABLE	error = wldev_iovar_setint(dev, "mchan_algo", mchan_algo);	if (error) {		WLDEV_ERROR(("Failed to set mchan_algo: mode:%d, error:%d/n",			mode, error));//.........这里部分代码省略.........
开发者ID:Toradex-Apalis-TK1-AndroidTV,项目名称:android_kernel_nvidia_mm,代码行数:101,


示例14: wldev_miracast_tuning

int wldev_miracast_tuning(	struct net_device *dev, int mode){	int error = 0;	int ampdu_mpdu;	int roam_off;#ifdef VSDB_BW_ALLOCATE_ENABLE	int mchan_algo;	int mchan_bw;#endif 	WLDEV_ERROR(("mode: %d/n", mode));	if (mode == 0) {				ampdu_mpdu = -1;	#if defined(ROAM_ENABLE)		roam_off = 0;	#elif defined(DISABLE_BUILTIN_ROAM)		roam_off = 1;	#endif#ifdef VSDB_BW_ALLOCATE_ENABLE		mchan_algo = 0;			mchan_bw = 50;	#endif 	}	else if (mode == 1) {				ampdu_mpdu = 8;	#if defined(ROAM_ENABLE) || defined(DISABLE_BUILTIN_ROAM)		roam_off = 1; #endif#ifdef VSDB_BW_ALLOCATE_ENABLE		mchan_algo = 1;			mchan_bw = 35;	#endif 	}	else if (mode == 2) {				ampdu_mpdu = -1;	#if defined(ROAM_ENABLE) || defined(DISABLE_BUILTIN_ROAM)		roam_off = 1; #endif#ifdef VSDB_BW_ALLOCATE_ENABLE		mchan_algo = 0;			mchan_bw = 50;	#endif 	}	else {		WLDEV_ERROR(("Unknown mode: %d/n", mode));		return -1;	}		error = wldev_iovar_setint(dev, "ampdu_mpdu", ampdu_mpdu);	if (error) {		WLDEV_ERROR(("Failed to set ampdu_mpdu: mode:%d, error:%d/n",			mode, error));		return -1;	}#if defined(ROAM_ENABLE) || defined(DISABLE_BUILTIN_ROAM)	error = wldev_iovar_setint(dev, "roam_off", roam_off);	if (error) {		WLDEV_ERROR(("Failed to set roam_off: mode:%d, error:%d/n",			mode, error));		return -1;	}#endif #ifdef VSDB_BW_ALLOCATE_ENABLE	error = wldev_iovar_setint(dev, "mchan_algo", mchan_algo);	if (error) {		WLDEV_ERROR(("Failed to set mchan_algo: mode:%d, error:%d/n",			mode, error));		return -1;	}	error = wldev_iovar_setint(dev, "mchan_bw", mchan_bw);	if (error) {		WLDEV_ERROR(("Failed to set mchan_bw: mode:%d, error:%d/n",			mode, error));		return -1;	}#endif 	return error;}
开发者ID:smokin901,项目名称:m7-GPE-5.0.1,代码行数:88,


示例15: wldev_set_apsta

intwldev_set_apsta(struct net_device *dev, bool enable){   	int res = 0;   	int mpc = 0;   	int concr_mode = 0;	int roam_off;   	char smbuf[WLC_IOCTL_SMLEN];	bss_setbuf_t bss_setbuf;	int frameburst;        memset(smbuf, 0, sizeof(smbuf));	printf("%s: enter/n", __FUNCTION__);   	if (!dev) {                  WLDEV_ERROR(("%s: dev is null/n", __FUNCTION__));                  return -1;   	}	if (enable){		/* wait for interface ready */		wait_for_ap_ready(1);		if ( ap_net_dev == NULL ) {                        WLDEV_ERROR(("%s ap_net_dev == NULL/n", __FUNCTION__));                        goto fail;		}		concr_mode = 1;		if ((res = wldev_iovar_setint(dev, "concr_mode_set", concr_mode))) {			printf("%s fail to set concr_mode res[%d]/n", __FUNCTION__,res);		}        rxglom_fail_count = RXGLOM_CONCUR_MODE_FAIL_COUNT;        max_cntl_timeout =  MAX_CONCUR_MODE_CNTL_TIMEOUT;		roam_off = 1;		if((res = wldev_iovar_setint(dev, "roam_off", roam_off)))			printf("%s fail to set roam_off res[%d]/n", __FUNCTION__,res);		   		mpc = 0;		if ((res = wldev_iovar_setint(dev, "mpc", mpc))) {			WLDEV_ERROR(("%s fail to set mpc/n", __FUNCTION__));			goto fail;		}			if ((res = wl_iw_set_ap_security(ap_net_dev, &ap_cfg)) != 0) {			WLDEV_ERROR((" %s ERROR setting SOFTAP security in :%d/n", __FUNCTION__, res));			goto fail;		} 		if(wl_get_drv_status(wlcfg_drv_priv,CONNECTED,dev))		{			u32 chanspec = 0;			int err;			if(wldev_iovar_getint(dev, "chanspec", (s32 *)&chanspec) == BCME_OK)			{				printf("%s get Chanspec [%0x]/n",__func__ ,chanspec);				if((err = wldev_iovar_setint(ap_net_dev, "chanspec", chanspec)) == BCME_BADCHAN) {					printf("%s set Chanspec failed/n",__func__);				} else					printf("%s set Chanspec OK/n",__func__);			}			else				printf("%s get Chanspec failed/n",__func__);		}		else			printf("%s Sta is not connected with any AP/n",__func__);			bss_setbuf.cfg = 1;			bss_setbuf.val = 1;  /* up the interface */			if ((res = wldev_iovar_setbuf_bsscfg(dev, "bss", &bss_setbuf, sizeof(bss_setbuf), smbuf, sizeof(smbuf), 1, NULL)) < 0){				WLDEV_ERROR(("%s: ERROR:%d, set bss up failed/n", __FUNCTION__, res));				goto fail;        	}	        bcm_mdelay(500);            printf("prepare set frameburst /n");            frameburst = 1;            if ((res = wldev_ioctl(dev, WLC_SET_FAKEFRAG, &frameburst, sizeof(frameburst), 0))) {                printf("%s fail to set frameburst !!/n", __FUNCTION__);            }		if ((res = wldev_iovar_setint(dev, "allmulti", 1))) {            		WLDEV_ERROR(("%s: ERROR:%d, set allmulti failed/n", __FUNCTION__, res));            		goto fail;		}#if !defined(WLCREDALL)		if ((res = wldev_iovar_setint(dev, "bus:credall", 1))) {			WLDEV_ERROR(("%s: ERROR:%d, set credall failed/n", __FUNCTION__, res));			goto fail;		}#endif//.........这里部分代码省略.........
开发者ID:curbthepain,项目名称:NuK3rn3l_m7_sense_lollipop,代码行数:101,


示例16: wldev_set_apsta

intwldev_set_apsta(struct net_device *dev, bool enable){   	int res = 0;   	int mpc = 0;   	int concr_mode = 0;	int roam_off;   	char smbuf[WLC_IOCTL_SMLEN];	bss_setbuf_t bss_setbuf;	int frameburst;        memset(smbuf, 0, sizeof(smbuf));	printf("%s: enter/n", __FUNCTION__);   	if (!dev) {                  WLDEV_ERROR(("%s: dev is null/n", __FUNCTION__));                  return -1;   	}	if (enable){				wait_for_ap_ready(1); 		if ( ap_net_dev == NULL ) {                        WLDEV_ERROR(("%s ap_net_dev == NULL/n", __FUNCTION__));                        goto fail;		}						concr_mode = 1;				if ((res = wldev_iovar_setint(dev, "concr_mode_set", concr_mode))) {						printf("%s fail to set concr_mode res[%d]/n", __FUNCTION__,res);				}						roam_off = 1;		if((res = wldev_iovar_setint(dev, "roam_off", roam_off)))				printf("%s fail to set roam_off res[%d]/n", __FUNCTION__,res);				   		mpc = 0;      	        if ((res = wldev_iovar_setint(dev, "mpc", mpc))) {           	        WLDEV_ERROR(("%s fail to set mpc/n", __FUNCTION__));           	        goto fail;      	        }	         	if ((res = wl_iw_set_ap_security(ap_net_dev, &ap_cfg)) != 0) {           	        WLDEV_ERROR((" %s ERROR setting SOFTAP security in :%d/n", __FUNCTION__, res));         	        goto fail;                }                                 bss_setbuf.cfg = 1;                bss_setbuf.val = 1;                  if ((res = wldev_iovar_setbuf_bsscfg(dev, "bss", &bss_setbuf, sizeof(bss_setbuf), smbuf, sizeof(smbuf), 1, NULL)) < 0){           	         WLDEV_ERROR(("%s: ERROR:%d, set bss up failed/n", __FUNCTION__, res));           	         goto fail;        	}	        bcm_mdelay(500);            printf("prepare set frameburst /n");            frameburst = 1;            if ((res = wldev_ioctl(dev, WLC_SET_FAKEFRAG, &frameburst, sizeof(frameburst), 0))) {                printf("%s fail to set frameburst !!/n", __FUNCTION__);            }		if ((res = wldev_iovar_setint(dev, "allmulti", 1))) {            		WLDEV_ERROR(("%s: ERROR:%d, set allmulti failed/n", __FUNCTION__, res));            		goto fail;		}		set_ap_channel(dev,&ap_cfg);		ap_net_dev->operstate = IF_OPER_UP;	} else {		if ((res = wl_softap_stop(ap_net_dev))){           		WLDEV_ERROR(("%s: ERROR:%d, call wl_softap_stop failed/n", __FUNCTION__, res));           		goto fail;		}			concr_mode = 0;		if ((res = wldev_iovar_setint(dev, "concr_mode_set", concr_mode))) {				printf("%s fail to set concr_mode res[%d]/n", __FUNCTION__,res);			}			roam_off = 0;	if((res = wldev_iovar_setint(dev, "roam_off", roam_off)))			printf("%s fail to set roam_off res[%d]/n", __FUNCTION__,res);		mpc = 1;	     	if ((res = wldev_iovar_setint(dev, "mpc", mpc))) {        	   	WLDEV_ERROR(("%s fail to set mpc/n", __FUNCTION__));           		goto fail;	      	}//.........这里部分代码省略.........
开发者ID:Albinoman887,项目名称:pyramid-3.4.10,代码行数:101,



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


C++ wldev_mkiovar函数代码示例
C++ wldev_iovar_setbuf函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。