From: hwg Date: Sat, 29 Mar 2014 06:54:03 +0000 (+0800) Subject: rkwifi: optimize wifi open time X-Git-Tag: firefly_0821_release~5724 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=35bef0546999bf3777daa64e24a2eda699d1aca3;p=firefly-linux-kernel-4.4.55.git rkwifi: optimize wifi open time --- diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc_linux.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc_linux.c old mode 100644 new mode 100755 index c98192589bac..bd2137aa1cf5 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc_linux.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/bcmsdh_sdmmc_linux.c @@ -289,12 +289,15 @@ static struct sdio_driver dummy_sdmmc_driver = { int sdio_func_reg_notify(void* semaphore) { notify_semaphore = semaphore; - return sdio_register_driver(&dummy_sdmmc_driver); + if (notify_semaphore) + up(notify_semaphore); + return 0; + //return sdio_register_driver(&dummy_sdmmc_driver); } void sdio_func_unreg_notify(void) { - sdio_unregister_driver(&dummy_sdmmc_driver); + //sdio_unregister_driver(&dummy_sdmmc_driver); } #endif /* defined(BCMLXSDMMC) */ diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_custom_gpio.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_custom_gpio.c old mode 100644 new mode 100755 index 39b7be94e8da..aa1285a0fce9 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_custom_gpio.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_custom_gpio.c @@ -133,7 +133,7 @@ dhd_customer_gpio_wlan_ctrl(int onoff) __FUNCTION__)); #ifdef CUSTOMER_HW bcm_wlan_power_on(2); - OSL_DELAY(200); + //OSL_DELAY(200); #endif /* CUSTOMER_HW */ #if defined(CUSTOMER_HW2) wifi_set_power(1, 200); @@ -157,7 +157,7 @@ dhd_customer_gpio_wlan_ctrl(int onoff) bcm_wlan_power_on(1); #endif /* CUSTOMER_HW */ /* Lets customer power to get stable */ - OSL_DELAY(200); + //OSL_DELAY(200); WL_ERROR(("=========== WLAN placed in POWER ON ========\n")); break; } diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c index ecaee23cb4e9..16cc4934f0a6 100755 --- a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c +++ b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_gpio.c @@ -46,12 +46,10 @@ void bcm_wlan_power_on(int flag) if (flag == 1) { printk("======== PULL WL_REG_ON HIGH! ========\n"); rockchip_wifi_power(1); - msleep(100); rockchip_wifi_set_carddetect(1); } else { printk("======== PULL WL_REG_ON HIGH! (flag = %d) ========\n", flag); rockchip_wifi_power(1); - msleep(100); } } diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_linux.c old mode 100644 new mode 100755 diff --git a/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_sdio.c b/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_sdio.c old mode 100644 new mode 100755 diff --git a/net/rfkill/rfkill-wlan.c b/net/rfkill/rfkill-wlan.c index 6a3bb3bcdc61..a4b2c02f0856 100755 --- a/net/rfkill/rfkill-wlan.c +++ b/net/rfkill/rfkill-wlan.c @@ -229,7 +229,7 @@ int rockchip_wifi_power(int on) } } regulator_put(ldo); - mdelay(100); + msleep(100); } } else { poweron = &mrfkill->pdata->power_n; @@ -238,20 +238,21 @@ int rockchip_wifi_power(int on) if (on){ if (gpio_is_valid(poweron->io)) { gpio_set_value(poweron->io, poweron->enable); + msleep(100); } - mdelay(100); if (gpio_is_valid(reset->io)) { gpio_set_value(reset->io, reset->enable); + msleep(100); } - mdelay(100); + LOG("wifi turn on power. %d\n", poweron->io); }else{ if (gpio_is_valid(poweron->io)) { gpio_set_value(poweron->io, !(poweron->enable)); + msleep(100); } - mdelay(100); if (gpio_is_valid(reset->io)) { gpio_set_value(reset->io, !(reset->enable)); }