Commit 110736de authored by Jussi Kivilinna's avatar Jussi Kivilinna Committed by John W. Linville

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: default avatarJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1487cd5e
...@@ -2457,9 +2457,6 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf) ...@@ -2457,9 +2457,6 @@ static int rndis_wlan_bind(struct usbnet *usbdev, struct usb_interface *intf)
disassociate(usbdev, 1); disassociate(usbdev, 1);
netif_carrier_off(usbdev->net); netif_carrier_off(usbdev->net);
queue_delayed_work(priv->workqueue, &priv->stats_work,
round_jiffies_relative(STATS_UPDATE_JIFFIES));
return 0; return 0;
fail: fail:
...@@ -2499,15 +2496,33 @@ static void rndis_wlan_unbind(struct usbnet *usbdev, struct usb_interface *intf) ...@@ -2499,15 +2496,33 @@ static void rndis_wlan_unbind(struct usbnet *usbdev, struct usb_interface *intf)
static int rndis_wlan_reset(struct usbnet *usbdev) static int rndis_wlan_reset(struct usbnet *usbdev)
{ {
struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev);
devdbg(usbdev, "rndis_wlan_reset"); devdbg(usbdev, "rndis_wlan_reset");
queue_delayed_work(priv->workqueue, &priv->stats_work,
round_jiffies_relative(STATS_UPDATE_JIFFIES));
return deauthenticate(usbdev); return deauthenticate(usbdev);
} }
static int rndis_wlan_stop(struct usbnet *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"); 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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment