Commit eee3a678 authored by Justin P. Mattock's avatar Justin P. Mattock Committed by Greg Kroah-Hartman
Browse files

staging: brcm80211 Remove WAKE_LOCK



The patch below removes WAKE_LOCK since it is no longer in the kernel.
Please let me know, if this is the proper way of doing this and/or more needs
to be done..

Signed-off-by: default avatarJustin P. Mattock <justinmattock@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e6856764
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -328,8 +328,6 @@ static irqreturn_t wlan_oob_irq(int irq, void *dev_id)
		return IRQ_HANDLED;
	}

	WAKE_LOCK_TIMEOUT(dhdp, WAKE_LOCK_TMOUT, 25);

	dhdsdio_isr((void *)dhdp->bus);

	return IRQ_HANDLED;
+0 −15
Original line number Diff line number Diff line
@@ -49,21 +49,6 @@ enum dhd_bus_state {
	DHD_BUS_DATA		/* Ready for frame transfers */
};

enum dhd_bus_wake_state {
	WAKE_LOCK_OFF,
	WAKE_LOCK_PRIV,
	WAKE_LOCK_DPC,
	WAKE_LOCK_IOCTL,
	WAKE_LOCK_DOWNLOAD,
	WAKE_LOCK_TMOUT,
	WAKE_LOCK_WATCHDOG,
	WAKE_LOCK_LINK_DOWN_TMOUT,
	WAKE_LOCK_PNO_FIND_TMOUT,
	WAKE_LOCK_SOFTAP_SET,
	WAKE_LOCK_SOFTAP_STOP,
	WAKE_LOCK_SOFTAP_START,
	WAKE_LOCK_MAX
};
enum dhd_prealloc_index {
	DHD_PREALLOC_PROT = 0,
	DHD_PREALLOC_RXBUF,
+0 −33
Original line number Diff line number Diff line
@@ -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);
+0 −4
Original line number Diff line number Diff line
@@ -3419,8 +3419,6 @@ void wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void *data)
		if (!(flags & WLC_EVENT_MSG_LINK)) {
			memset(wrqu.addr.sa_data, 0, ETH_ALEN);
			memset(&extra, 0, ETH_ALEN);
			WAKE_LOCK_TIMEOUT(iw->pub, WAKE_LOCK_LINK_DOWN_TMOUT,
					  20 * HZ);
		} else {
			memcpy(wrqu.addr.sa_data, &e->addr, ETH_ALEN);
			WL_TRACE("Link UP\n");
@@ -3533,8 +3531,6 @@ void wl_iw_event(struct net_device *dev, wl_event_msg_t *e, void *data)
			WL_ERROR("%s Event WLC_E_PFN_NET_FOUND, send %s up : find %s len=%d\n",
				 __func__, PNO_EVENT_UP,
				 ssid->SSID, ssid->SSID_len);
			WAKE_LOCK_TIMEOUT(iw->pub, WAKE_LOCK_PNO_FIND_TMOUT,
					  20 * HZ);
			cmd = IWEVCUSTOM;
			memset(&wrqu, 0, sizeof(wrqu));
			strcpy(extra, PNO_EVENT_UP);