aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-12-10 14:58:37 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:06:35 -0500
commit4f679496567809ce1e95730c25274e1832537f4b (patch)
treee46717a8df0eda9e741098ddaf56b7e1c36ab580 /drivers/net/wireless/libertas/main.c
parent1309b55b4de18bbfe19c73225a5481d6cdc8a463 (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.c19
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:
1408 * @param dev A pointer to net_device structure 1408 * @param dev A pointer to net_device structure
1409 * @return n/a 1409 * @return n/a
1410 */ 1410 */
1411void lbs_interrupt(struct net_device *dev) 1411void lbs_interrupt(struct lbs_private *priv)
1412{ 1412{
1413 struct lbs_private *priv = dev->priv;
1414
1415 lbs_deb_enter(LBS_DEB_THREAD); 1413 lbs_deb_enter(LBS_DEB_THREAD);
1416 1414
1417 lbs_deb_thread("lbs_interrupt: intcounter=%d\n", 1415 lbs_deb_thread("lbs_interrupt: intcounter=%d\n", priv->intcounter);
1418 priv->intcounter); 1416
1417 if (spin_trylock(&priv->driver_lock)) {
1418 spin_unlock(&priv->driver_lock);
1419 printk(KERN_CRIT "%s called without driver_lock held\n", __func__);
1420 WARN_ON(1);
1421 }
1419 1422
1420 priv->intcounter++; 1423 priv->intcounter++;
1421 1424
1422 if (priv->psstate == PS_STATE_SLEEP) { 1425 if (priv->psstate == PS_STATE_SLEEP)
1423 priv->psstate = PS_STATE_AWAKE; 1426 priv->psstate = PS_STATE_AWAKE;
1424 netif_wake_queue(dev);
1425 if (priv->mesh_dev)
1426 netif_wake_queue(priv->mesh_dev);
1427 }
1428 1427
1429 wake_up_interruptible(&priv->waitq); 1428 wake_up_interruptible(&priv->waitq);
1430 1429