am e2062c5b: bcm4329: Fix wakelock acquisition in scan threads (b/2249878)

Merge commit 'e2062c5b5a6e5accf0d39fab31e6106c22521449' into eclair-mr2-plus-aosp

* commit 'e2062c5b5a6e5accf0d39fab31e6106c22521449':
  bcm4329: Fix wakelock acquisition in scan threads (b/2249878)
diff --git a/bcm4329/src/wl/sys/wl_iw.c b/bcm4329/src/wl/sys/wl_iw.c
index f92e186..1773d6b 100644
--- a/bcm4329/src/wl/sys/wl_iw.c
+++ b/bcm4329/src/wl/sys/wl_iw.c
@@ -1780,10 +1780,14 @@
 	uint32 status;
 	iscan_info_t *iscan = (iscan_info_t *)data;
 	static bool iscan_pass_abort = FALSE;
+
 	DAEMONIZE("iscan_sysioc");
 
 	status = WL_SCAN_RESULTS_PARTIAL;
 	while (down_interruptible(&iscan->sysioc_sem) == 0) {
+
+		net_os_wake_lock(iscan->dev);
+
 		if (iscan->timer_on) {
 			del_timer(&iscan->timer);
 			iscan->timer_on = 0;
@@ -1844,12 +1848,15 @@
 				WL_TRACE(("iscanresults returned unknown status %d\n", status));
 				break;
 		}
+
+		net_os_wake_unlock(iscan->dev);
 	}
 
 	if (iscan->timer_on) {
 		del_timer(&iscan->timer);
 		iscan->timer_on = 0;
 	}
+
 	complete_and_exit(&iscan->sysioc_exited, 0);
 }
 #endif 
@@ -4566,6 +4573,9 @@
 	DAEMONIZE("dhcp_sysioc");
 
 	while (down_interruptible(&g_bt->bt_sem) == 0) {
+
+		net_os_wake_lock(g_bt->dev);
+
 		if (g_bt->timer_on) {
 			del_timer(&g_bt->timer);
 			g_bt->timer_on = 0;
@@ -4605,12 +4615,15 @@
 				g_bt->timer_on = 0;
 				break;
 		 }
+
+		net_os_wake_unlock(g_bt->dev);
 	}
 
 	if (g_bt->timer_on) {
 		del_timer(&g_bt->timer);
 		g_bt->timer_on = 0;
 	}
+
 	complete_and_exit(&g_bt->bt_exited, 0);
 }