diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-10 14:58:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:06:35 -0800 |
commit | 4f679496567809ce1e95730c25274e1832537f4b (patch) | |
tree | e46717a8df0eda9e741098ddaf56b7e1c36ab580 /drivers/net/wireless/libertas/main.c | |
parent | 1309b55b4de18bbfe19c73225a5481d6cdc8a463 (diff) |
libertas: clean up lbs_interrupt()
Make it take struct lbs_private as argument; that's all it wants anyway,
and all callers were starting off from that. Don't wake the netif
queues, because those should be handled elsewhere. And sort out the
locking, with a big nasty warning for those who don't have the
driver_lock locked when they call it.
Oh, and fix if_cs.c to lock the driver_lock before calling it.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index f16c93ba6efd..2797149649ca 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c @@ -1408,23 +1408,22 @@ out: * @param dev A pointer to net_device structure * @return n/a */ -void lbs_interrupt(struct net_device *dev) +void lbs_interrupt(struct lbs_private *priv) { - struct lbs_private *priv = dev->priv; - lbs_deb_enter(LBS_DEB_THREAD); - lbs_deb_thread("lbs_interrupt: intcounter=%d\n", - priv->intcounter); + lbs_deb_thread("lbs_interrupt: intcounter=%d\n", priv->intcounter); + + if (spin_trylock(&priv->driver_lock)) { + spin_unlock(&priv->driver_lock); + printk(KERN_CRIT "%s called without driver_lock held\n", __func__); + WARN_ON(1); + } priv->intcounter++; - if (priv->psstate == PS_STATE_SLEEP) { + if (priv->psstate == PS_STATE_SLEEP) priv->psstate = PS_STATE_AWAKE; - netif_wake_queue(dev); - if (priv->mesh_dev) - netif_wake_queue(priv->mesh_dev); - } wake_up_interruptible(&priv->waitq); |