|
@@ -1045,7 +1045,6 @@ int dhd_sendpkt(dhd_pub_t *dhdp, int ifidx, struct sk_buff *pktbuf)
|
|
|
#ifdef BCMDBUS
|
|
|
ret = dbus_send_pkt(dhdp->dbus, pktbuf, NULL /* pktinfo */);
|
|
|
#else
|
|
|
- WAKE_LOCK_TIMEOUT(dhdp, WAKE_LOCK_TMOUT, 25);
|
|
|
ret = dhd_bus_txdata(dhdp->bus, pktbuf);
|
|
|
#endif /* BCMDBUS */
|
|
|
|
|
@@ -1304,7 +1303,6 @@ static struct net_device_stats *dhd_get_stats(struct net_device *net)
|
|
|
static int dhd_watchdog_thread(void *data)
|
|
|
{
|
|
|
dhd_info_t *dhd = (dhd_info_t *) data;
|
|
|
- WAKE_LOCK_INIT(&dhd->pub, WAKE_LOCK_WATCHDOG, "dhd_watchdog_thread");
|
|
|
|
|
|
/* This thread doesn't need any user-level access,
|
|
|
* so get rid of all our resources
|
|
@@ -1325,18 +1323,14 @@ static int dhd_watchdog_thread(void *data)
|
|
|
break;
|
|
|
if (down_interruptible(&dhd->watchdog_sem) == 0) {
|
|
|
if (dhd->pub.dongle_reset == false) {
|
|
|
- WAKE_LOCK(&dhd->pub, WAKE_LOCK_WATCHDOG);
|
|
|
/* Call the bus module watchdog */
|
|
|
dhd_bus_watchdog(&dhd->pub);
|
|
|
- WAKE_UNLOCK(&dhd->pub, WAKE_LOCK_WATCHDOG);
|
|
|
}
|
|
|
/* Count the tick for reference */
|
|
|
dhd->pub.tickcnt++;
|
|
|
} else
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
- WAKE_LOCK_DESTROY(&dhd->pub, WAKE_LOCK_WATCHDOG);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -1370,7 +1364,6 @@ static int dhd_dpc_thread(void *data)
|
|
|
{
|
|
|
dhd_info_t *dhd = (dhd_info_t *) data;
|
|
|
|
|
|
- WAKE_LOCK_INIT(&dhd->pub, WAKE_LOCK_DPC, "dhd_dpc_thread");
|
|
|
/* This thread doesn't need any user-level access,
|
|
|
* so get rid of all our resources
|
|
|
*/
|
|
@@ -1393,21 +1386,15 @@ static int dhd_dpc_thread(void *data)
|
|
|
/* Call bus dpc unless it indicated down
|
|
|
(then clean stop) */
|
|
|
if (dhd->pub.busstate != DHD_BUS_DOWN) {
|
|
|
- WAKE_LOCK(&dhd->pub, WAKE_LOCK_DPC);
|
|
|
if (dhd_bus_dpc(dhd->pub.bus)) {
|
|
|
up(&dhd->dpc_sem);
|
|
|
- WAKE_LOCK_TIMEOUT(&dhd->pub,
|
|
|
- WAKE_LOCK_TMOUT, 25);
|
|
|
}
|
|
|
- WAKE_UNLOCK(&dhd->pub, WAKE_LOCK_DPC);
|
|
|
} else {
|
|
|
dhd_bus_stop(dhd->pub.bus, true);
|
|
|
}
|
|
|
} else
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
- WAKE_LOCK_DESTROY(&dhd->pub, WAKE_LOCK_DPC);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -1797,14 +1784,9 @@ static int dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd)
|
|
|
if (is_set_key_cmd)
|
|
|
dhd_wait_pend8021x(net);
|
|
|
|
|
|
- WAKE_LOCK_INIT(&dhd->pub, WAKE_LOCK_IOCTL, "dhd_ioctl_entry");
|
|
|
- WAKE_LOCK(&dhd->pub, WAKE_LOCK_IOCTL);
|
|
|
-
|
|
|
bcmerror =
|
|
|
dhd_prot_ioctl(&dhd->pub, ifidx, (wl_ioctl_t *)&ioc, buf, buflen);
|
|
|
|
|
|
- WAKE_UNLOCK(&dhd->pub, WAKE_LOCK_IOCTL);
|
|
|
- WAKE_LOCK_DESTROY(&dhd->pub, WAKE_LOCK_IOCTL);
|
|
|
done:
|
|
|
if (!bcmerror && buf && ioc.buf) {
|
|
|
if (copy_to_user(ioc.buf, buf, buflen))
|
|
@@ -2115,11 +2097,6 @@ dhd_pub_t *dhd_attach(struct osl_info *osh, struct dhd_bus *bus,
|
|
|
#endif /* defined(CONFIG_PM_SLEEP) */
|
|
|
/* && defined(DHD_GPL) */
|
|
|
/* Init lock suspend to prevent kernel going to suspend */
|
|
|
- WAKE_LOCK_INIT(&dhd->pub, WAKE_LOCK_TMOUT, "dhd_wake_lock");
|
|
|
- WAKE_LOCK_INIT(&dhd->pub, WAKE_LOCK_LINK_DOWN_TMOUT,
|
|
|
- "dhd_wake_lock_link_dw_event");
|
|
|
- WAKE_LOCK_INIT(&dhd->pub, WAKE_LOCK_PNO_FIND_TMOUT,
|
|
|
- "dhd_wake_lock_link_pno_find_event");
|
|
|
#ifdef CONFIG_HAS_EARLYSUSPEND
|
|
|
dhd->early_suspend.level = EARLY_SUSPEND_LEVEL_BLANK_SCREEN + 20;
|
|
|
dhd->early_suspend.suspend = dhd_early_suspend;
|
|
@@ -2153,20 +2130,13 @@ int dhd_bus_start(dhd_pub_t *dhdp)
|
|
|
|
|
|
/* try to download image and nvram to the dongle */
|
|
|
if (dhd->pub.busstate == DHD_BUS_DOWN) {
|
|
|
- WAKE_LOCK_INIT(dhdp, WAKE_LOCK_DOWNLOAD, "dhd_bus_start");
|
|
|
- WAKE_LOCK(dhdp, WAKE_LOCK_DOWNLOAD);
|
|
|
if (!(dhd_bus_download_firmware(dhd->pub.bus, dhd->pub.osh,
|
|
|
fw_path, nv_path))) {
|
|
|
DHD_ERROR(("%s: dhdsdio_probe_download failed. "
|
|
|
"firmware = %s nvram = %s\n",
|
|
|
__func__, fw_path, nv_path));
|
|
|
- WAKE_UNLOCK(dhdp, WAKE_LOCK_DOWNLOAD);
|
|
|
- WAKE_LOCK_DESTROY(dhdp, WAKE_LOCK_DOWNLOAD);
|
|
|
return -1;
|
|
|
}
|
|
|
-
|
|
|
- WAKE_UNLOCK(dhdp, WAKE_LOCK_DOWNLOAD);
|
|
|
- WAKE_LOCK_DESTROY(dhdp, WAKE_LOCK_DOWNLOAD);
|
|
|
}
|
|
|
|
|
|
/* Start the watchdog timer */
|
|
@@ -2432,9 +2402,6 @@ void dhd_detach(dhd_pub_t *dhdp)
|
|
|
unregister_pm_notifier(&dhd_sleep_pm_notifier);
|
|
|
#endif /* defined(CONFIG_PM_SLEEP) */
|
|
|
/* && defined(DHD_GPL) */
|
|
|
- WAKE_LOCK_DESTROY(dhdp, WAKE_LOCK_TMOUT);
|
|
|
- WAKE_LOCK_DESTROY(dhdp, WAKE_LOCK_LINK_DOWN_TMOUT);
|
|
|
- WAKE_LOCK_DESTROY(dhdp, WAKE_LOCK_PNO_FIND_TMOUT);
|
|
|
free_netdev(ifp->net);
|
|
|
kfree(ifp);
|
|
|
kfree(dhd);
|