本文整理汇总了C++中dhd_customer_gpio_wlan_ctrl函数的典型用法代码示例。如果您正苦于以下问题:C++ dhd_customer_gpio_wlan_ctrl函数的具体用法?C++ dhd_customer_gpio_wlan_ctrl怎么用?C++ dhd_customer_gpio_wlan_ctrl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dhd_customer_gpio_wlan_ctrl函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: wl_android_wifi_off
int wl_android_wifi_off(struct net_device *dev)
{
int ret = 0;
printk("%s in\n", __FUNCTION__);
if (!dev) {
DHD_ERROR(("%s: dev is null\n", __FUNCTION__));
//return -EINVAL;
if (g_wifi_on) {
sdioh_stop(NULL);
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);
g_wifi_on = 0;
}
} else {
dhd_net_if_lock(dev);
if (g_wifi_on) {
ret = dhd_dev_reset(dev, TRUE);
sdioh_stop(NULL);
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);
g_wifi_on = 0;
}
dhd_net_if_unlock(dev);
}
return ret;
}
开发者ID:brunotl,项目名称:kernel-kobo-mx6sl-ntx,代码行数:25,代码来源:wl_android.c
示例2: wl_android_wifi_on
int wl_android_wifi_on(struct net_device *dev)
{
int ret = 0;
int retry = POWERUP_MAX_RETRY;
if (!dev) {
ANDROID_ERROR(("%s: dev is null\n", __FUNCTION__));
return -EINVAL;
}
dhd_net_if_lock(dev);
printk("%s in\n", __FUNCTION__);
if (!g_wifi_on) {
do {
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_ON);
ret = sdioh_start(NULL, 0);
if (ret == 0)
break;
ANDROID_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) {
ANDROID_ERROR(("\nfailed to power up wifi chip, max retry reached **\n\n"));
goto exit;
}
ret = dhd_dev_reset(dev, FALSE);
if (ret)
goto err;
sdioh_start(NULL, 1);
if (!ret) {
if (dhd_dev_init_ioctl(dev) < 0) {
ret = -EFAULT;
goto err;
}
}
#if defined(PROP_TXSTATUS) && !defined(PROP_TXSTATUS_VSDB)
dhd_wlfc_init(bcmsdh_get_drvdata());
#endif
g_wifi_on = TRUE;
}
exit:
printk("%s: Success\n", __FUNCTION__);
dhd_net_if_unlock(dev);
return ret;
err:
dhd_dev_reset(dev, TRUE);
sdioh_stop(NULL);
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);
printk("%s: Failed\n", __FUNCTION__);
dhd_net_if_unlock(dev);
return ret;
}
开发者ID:TinyHTPC,项目名称:buildroot-linux-kernel-m6,代码行数:56,代码来源:wl_android.c
示例3: wl_android_wifi_on
int wl_android_wifi_on(struct net_device *dev)
{
int ret = 0;
int retry = POWERUP_MAX_RETRY;
printf("in\n");
if (!dev) {
DHD_ERROR(("%s: dev is null\n", __FUNCTION__));
return -EINVAL;
}
dhd_net_if_lock(dev);
if (!g_wifi_on) {
do {
/* fix sdio init error/timeout issue begin */
sdioh_power_on();
/* fix sdio init error/timeout issue end */
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);
/* fix sdio init error/timeout issue begin */
sdioh_power_off();
/* fix sdio init error/timeout issue end */
} 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;
} else {
DHD_ERROR(("%s: dhd_dev_reset failed, ret is %d\n", __FUNCTION__, ret));
}
#if defined(PROP_TXSTATUS) && !defined(PROP_TXSTATUS_VSDB) && defined(BCMLXSDMMC)
dhd_wlfc_init(bcmsdh_get_drvdata());
#endif
g_wifi_on = TRUE;
}
exit:
dhd_net_if_unlock(dev);
return ret;
}
开发者ID:rgmabs19357,项目名称:Huawei-,代码行数:51,代码来源:wl_android.c
示例4: wl_android_wifi_on
int wl_android_wifi_on(struct net_device *dev)
{
int ret = 0;
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) {
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_ON);
sdioh_start(NULL, 0);
ret = dhd_dev_reset(dev, FALSE);
sdioh_start(NULL, 1);
if (!ret) {
if ((dhd_dev_init_ioctl(dev)) < 0)
ret = -EFAULT;
}
g_wifi_on = 1;
}
dhd_net_if_unlock(dev);
return ret;
}
开发者ID:AirShark,项目名称:android_kernel_lenovo_redhookbay,代码行数:26,代码来源:wl_android.c
示例5: wl_android_wifi_off
int wl_android_wifi_off(struct net_device *dev)
{
int ret = 0;
printf("in\n");
if (!dev) {
DHD_TRACE(("%s: dev is null\n", __FUNCTION__));
return -EINVAL;
}
dhd_net_if_lock(dev);
if (g_wifi_on) {
#if defined(PROP_TXSTATUS) && !defined(PROP_TXSTATUS_VSDB) && defined(BCMLXSDMMC)
dhd_wlfc_deinit(bcmsdh_get_drvdata());
#endif
ret = dhd_dev_reset(dev, TRUE);
sdioh_stop(NULL);
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);
/* fix sdio init error/timeout issue begin */
sdioh_power_off();
/* fix sdio init error/timeout issue end */
g_wifi_on = FALSE;
}
dhd_net_if_unlock(dev);
return ret;
}
开发者ID:rgmabs19357,项目名称:Huawei-,代码行数:28,代码来源:wl_android.c
示例6: dhd_conf_wifi_stop
void
dhd_conf_wifi_stop(struct net_device *dev)
{
if (!dev) {
CONFIG_ERROR(("%s: dev is null\n", __FUNCTION__));
return;
}
printk("%s in 1\n", __FUNCTION__);
dhd_net_if_lock(dev);
printk("%s in 2: g_wifi_on=%d, name=%s\n", __FUNCTION__, g_wifi_on, dev->name);
if (g_wifi_on) {
#ifdef WL_CFG80211
wl_cfg80211_user_sync(true);
wl_cfg80211_stop();
#endif
dhd_bus_devreset(bcmsdh_get_drvdata(), true);
sdioh_stop(NULL);
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);
g_wifi_on = FALSE;
#ifdef WL_CFG80211
wl_cfg80211_user_sync(false);
#endif
}
printk("%s out\n", __FUNCTION__);
dhd_net_if_unlock(dev);
}
开发者ID:kclin,项目名称:linux-sdk-kernel-source,代码行数:28,代码来源:dhd_config.c
示例7: wl_android_wifi_on
/**
* Global function definitions (declared in wl_android.h)
*/
int wl_android_wifi_on(struct net_device *dev)
{
int ret = 0;
int retry = 1;
onretry:
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) {
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_ON);
sdioh_start(NULL, 0);
ret = dhd_dev_reset(dev, FALSE);
sdioh_start(NULL, 1);
if (!ret)
ret = dhd_dev_init_ioctl_ret(dev);
g_wifi_on = 1;
}
dhd_net_if_unlock(dev);
////////////////////////////////// Adam Patch /////////////////////////////////////
if (ret == -EIO && retry < 5) {
wl_android_wifi_off(dev);
msleep(1000);
printk("I/O Error on wifi, power down and try again. Attempt %d/5\n", retry);
goto onretry;
}
////////////////////////////////////////////////////////////////////////////////////
return ret;
}
开发者ID:marcero,项目名称:android-tegra-nv-2.6.39-rel-14r7,代码行数:36,代码来源:wl_android.c
示例8: wl_android_wifi_off
int wl_android_wifi_off(struct net_device *dev)
{
int ret = 0;
if (!dev) {
ANDROID_TRACE(("%s: dev is null\n", __FUNCTION__));
return -EINVAL;
}
dhd_net_if_lock(dev);
printk("%s in\n", __FUNCTION__);
if (g_wifi_on) {
#if defined(PROP_TXSTATUS) && !defined(PROP_TXSTATUS_VSDB)
dhd_wlfc_deinit(bcmsdh_get_drvdata());
#endif
ret = dhd_dev_reset(dev, TRUE);
sdioh_stop(NULL);
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);
g_wifi_on = FALSE;
}
printk("%s out\n", __FUNCTION__);
dhd_net_if_unlock(dev);
return ret;
}
开发者ID:TinyHTPC,项目名称:buildroot-linux-kernel-m6,代码行数:25,代码来源:wl_android.c
示例9: wl_android_post_init
void wl_android_post_init(void)
{
if (!dhd_download_fw_on_driverload) {
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);
g_wifi_on = 0;
}
}
开发者ID:DirtyDroidX,项目名称:android_kernel_htc_m8ul,代码行数:8,代码来源:wl_android.c
示例10: wl_android_post_init
void wl_android_post_init(void)
{
if (!dhd_download_fw_on_driverload) {
/* Call customer gpio to turn off power with WL_REG_ON signal */
#if !defined(OOB_INTR_ONLY)
sdioh_stop(NULL);
#endif /* !defined(OOB_INTR_ONLY) */
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);
g_wifi_on = 0;
}
}
开发者ID:JoinTheRealms,项目名称:TF700-dualboot-hunds,代码行数:11,代码来源:wl_android.c
示例11: 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));
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;
}
g_wifi_on = TRUE;
}
exit:
dhd_net_if_unlock(dev);
return ret;
}
开发者ID:Banjo0917,项目名称:mt6577_kernel3.4,代码行数:40,代码来源:wl_android.c
示例12: wl_android_wifi_off
int wl_android_wifi_off(struct net_device *dev)
{
int ret = 0;
printk("%s in\n", __FUNCTION__);
if (!dev) {
ANDROID_TRACE(("%s: dev is null\n", __FUNCTION__));
return -EINVAL;
}
dhd_net_if_lock(dev);
if (g_wifi_on == G_WLAN_SET_ON) {
ret = dhd_dev_reset(dev, TRUE);
sdioh_stop(NULL);
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);
g_wifi_on = G_WLAN_SET_OFF;
}
dhd_net_if_unlock(dev);
return ret;
}
开发者ID:zp8001,项目名称:STUDY_4.0.3,代码行数:21,代码来源:wl_android.c
示例13: wl_android_wifi_off
int wl_android_wifi_off(struct net_device *dev)
{
int ret = 0;
DHD_ERROR(("%s in\n", __FUNCTION__));
if (!dev) {
DHD_TRACE(("%s: dev is null\n", __FUNCTION__));
return -EINVAL;
}
dhd_net_if_lock(dev);
if (g_wifi_on) {
dhd_dev_reset(dev, 1);
if (dhd_download_fw_on_driverload)
msleep(100);
sdioh_stop(NULL);
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);
g_wifi_on = FALSE;
}
dhd_net_if_unlock(dev);
return ret;
}
开发者ID:Jimmyk422,项目名称:android_kernel_samsung_iconvmu,代码行数:23,代码来源:wl_android.c
示例14: wl_android_wifi_on
int wl_android_wifi_on(struct net_device *dev)
{
int ret = 0;
printk("%s in\n", __FUNCTION__);
if (!dev) {
ANDROID_ERR(("%s: dev is null\n", __FUNCTION__));
return -EINVAL;
}
dhd_net_if_lock(dev);
if (g_wifi_on == G_WLAN_SET_OFF) {
dhd_customer_gpio_wlan_ctrl(WLAN_RESET_ON);
sdioh_start(NULL, 0);
ret = dhd_dev_reset(dev, FALSE);
sdioh_start(NULL, 1);
if (!ret)
dhd_dev_init_ioctl(dev);
g_wifi_on = G_WLAN_SET_ON;
}
dhd_net_if_unlock(dev);
return ret;
}
开发者ID:zp8001,项目名称:STUDY_4.0.3,代码行数:24,代码来源:wl_android.c
注:本文中的dhd_customer_gpio_wlan_ctrl函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论