本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}