net: wireless: bcmdhd: Decrease chip recognition attempts to 3
Dmitry Shmidt [Wed, 27 Jun 2012 00:17:02 +0000 (17:17 -0700)]
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

drivers/net/wireless/bcmdhd/dhd.h
drivers/net/wireless/bcmdhd/dhd_linux.c
drivers/net/wireless/bcmdhd/wl_android.c

index 0a6b328..46e3263 100644 (file)
@@ -93,10 +93,10 @@ enum dhd_bus_state {
 #define DHD_SCAN_PASSIVE_TIME  130 /* ms: Embedded default Passive setting from DHD Driver */
 
 #ifndef POWERUP_MAX_RETRY
-#define POWERUP_MAX_RETRY      (10) /* how many times we retry to power up the chip */
+#define POWERUP_MAX_RETRY      3 /* how many times we retry to power up the chip */
 #endif
 #ifndef POWERUP_WAIT_MS
-#define POWERUP_WAIT_MS                (2000) /* ms: time out in waiting wifi to come up */
+#define POWERUP_WAIT_MS                2000 /* ms: time out in waiting wifi to come up */
 #endif
 
 enum dhd_bus_wake_state {
index 4e33dc7..15ca8fb 100644 (file)
@@ -2460,7 +2460,7 @@ dhd_open(struct net_device *net)
                firmware_path[0] = '\0';
        }
 
-       dhd->pub.dongle_trap_occured = 0;\r
+       dhd->pub.dongle_trap_occured = 0;
        dhd->pub.hang_was_sent = 0;
 #if !defined(WL_CFG80211)
        /*
@@ -3897,7 +3897,7 @@ void dhd_detach(dhd_pub_t *dhdp)
        if (dhd->dhd_state & DHD_ATTACH_STATE_WAKELOCKS_INIT) {
 #ifdef CONFIG_HAS_WAKELOCK
                dhd->wakelock_counter = 0;
-               dhd->wakelock_rx_timeout_enable = 0;\r
+               dhd->wakelock_rx_timeout_enable = 0;
                dhd->wakelock_ctrl_timeout_enable = 0;
                wake_lock_destroy(&dhd->wl_wifi);
                wake_lock_destroy(&dhd->wl_rxwake);
@@ -4001,7 +4001,7 @@ dhd_module_init(void)
                        break;
                }
                DHD_ERROR(("\nfailed to power up wifi chip, retry again (%d left) **\n\n",
-                       retry+1));
+                       retry));
                dhd_bus_unreg_sdio_notify();
 #if defined(CONFIG_WIFI_CONTROL_FUNC)
                wl_android_wifictrl_func_del();
index 9157a21..0ab637d 100644 (file)
@@ -391,7 +391,7 @@ int wl_android_wifi_on(struct net_device *dev)
                        if (ret == 0)
                                break;
                        DHD_ERROR(("\nfailed to power up wifi chip, retry again (%d left) **\n\n",
-                               retry+1));
+                               retry));
                        dhd_customer_gpio_wlan_ctrl(WLAN_RESET_OFF);
                } while (retry-- >= 0);
                if (ret != 0) {