summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@mbnet.fi>2009-07-30 16:41:26 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2009-08-04 20:44:15 (GMT)
commit110736de938b5bfdd63c86166e355d3f16115f6a (patch)
tree9aa1a5aecc32b8dd5639ade41f0b7146949e3965 /drivers/net
parent1487cd5e76337555737cbc55d7d83f41460d198f (diff)
downloadlinux-fsl-qoriq-110736de938b5bfdd63c86166e355d3f16115f6a.tar.xz
rndis_wlan: stop workers on rndis_wlan_stop() and restore on rndis_wlan_reset()
Driver doesn't need to poll statistics/link status when stopped. Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/rndis_wlan.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c
index 76c5ec6..3c7c620 100644
--- a/drivers/net/wireless/rndis_wlan.c
+++ b/drivers/net/wireless/rndis_wlan.c
@@ -2457,9 +2457,6 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf)
disassociate(usbdev, 1);
netif_carrier_off(usbdev->net);
- queue_delayed_work(priv->workqueue, &priv->stats_work,
- round_jiffies_relative(STATS_UPDATE_JIFFIES));
-
return 0;
fail:
@@ -2499,15 +2496,33 @@ static void rndis_wlan_unbind(struct usbnet *usbdev, struct usb_interface *intf)
static int rndis_wlan_reset(struct usbnet *usbdev)
{
+ struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
+
devdbg(usbdev, "rndis_wlan_reset");
+
+ queue_delayed_work(priv->workqueue, &priv->stats_work,
+ round_jiffies_relative(STATS_UPDATE_JIFFIES));
+
return deauthenticate(usbdev);
}
static int rndis_wlan_stop(struct usbnet *usbdev)
{
+ struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
+ int retval;
+
devdbg(usbdev, "rndis_wlan_stop");
- return disassociate(usbdev, 0);
+
+ retval = disassociate(usbdev, 0);
+
+ priv->work_pending = 0;
+ cancel_delayed_work_sync(&priv->stats_work);
+ cancel_delayed_work_sync(&priv->scan_work);
+ cancel_work_sync(&priv->work);
+ flush_workqueue(priv->workqueue);
+
+ return retval;
}