diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2009-07-30 12:41:26 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-04 16:44:15 -0400 |
commit | 110736de938b5bfdd63c86166e355d3f16115f6a (patch) | |
tree | 9aa1a5aecc32b8dd5639ade41f0b7146949e3965 /drivers/net/wireless/rndis_wlan.c | |
parent | 1487cd5e76337555737cbc55d7d83f41460d198f (diff) |
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/wireless/rndis_wlan.c')
-rw-r--r-- | drivers/net/wireless/rndis_wlan.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/drivers/net/wireless/rndis_wlan.c b/drivers/net/wireless/rndis_wlan.c index 76c5ec6bbbc5..3c7c620c4f07 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) | |||
2457 | disassociate(usbdev, 1); | 2457 | disassociate(usbdev, 1); |
2458 | netif_carrier_off(usbdev->net); | 2458 | netif_carrier_off(usbdev->net); |
2459 | 2459 | ||
2460 | queue_delayed_work(priv->workqueue, &priv->stats_work, | ||
2461 | round_jiffies_relative(STATS_UPDATE_JIFFIES)); | ||
2462 | |||
2463 | return 0; | 2460 | return 0; |
2464 | 2461 | ||
2465 | fail: | 2462 | fail: |
@@ -2499,15 +2496,33 @@ static void rndis_wlan_unbind(struct usbnet *usbdev, struct usb_interface *intf) | |||
2499 | 2496 | ||
2500 | static int rndis_wlan_reset(struct usbnet *usbdev) | 2497 | static int rndis_wlan_reset(struct usbnet *usbdev) |
2501 | { | 2498 | { |
2499 | struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); | ||
2500 | |||
2502 | devdbg(usbdev, "rndis_wlan_reset"); | 2501 | devdbg(usbdev, "rndis_wlan_reset"); |
2502 | |||
2503 | queue_delayed_work(priv->workqueue, &priv->stats_work, | ||
2504 | round_jiffies_relative(STATS_UPDATE_JIFFIES)); | ||
2505 | |||
2503 | return deauthenticate(usbdev); | 2506 | return deauthenticate(usbdev); |
2504 | } | 2507 | } |
2505 | 2508 | ||
2506 | 2509 | ||
2507 | static int rndis_wlan_stop(struct usbnet *usbdev) | 2510 | static int rndis_wlan_stop(struct usbnet *usbdev) |
2508 | { | 2511 | { |
2512 | struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); | ||
2513 | int retval; | ||
2514 | |||
2509 | devdbg(usbdev, "rndis_wlan_stop"); | 2515 | devdbg(usbdev, "rndis_wlan_stop"); |
2510 | return disassociate(usbdev, 0); | 2516 | |
2517 | retval = disassociate(usbdev, 0); | ||
2518 | |||
2519 | priv->work_pending = 0; | ||
2520 | cancel_delayed_work_sync(&priv->stats_work); | ||
2521 | cancel_delayed_work_sync(&priv->scan_work); | ||
2522 | cancel_work_sync(&priv->work); | ||
2523 | flush_workqueue(priv->workqueue); | ||
2524 | |||
2525 | return retval; | ||
2511 | } | 2526 | } |
2512 | 2527 | ||
2513 | 2528 | ||