Skip to content

Commit

Permalink
rndis_wlan: clear cfg80211 scan on rndis_wlan_stop()
Browse files Browse the repository at this point in the history
Scanning gets stuck if device is stopped when scan is active. Fix by
clearing/aborting cfg80211 scan on rndis_wlan_stop().

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Jussi Kivilinna authored and John W. Linville committed Aug 4, 2009
1 parent 110736d commit 005ba2f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/net/wireless/rndis_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -1484,6 +1484,9 @@ static void rndis_get_scan_results(struct work_struct *work)

devdbg(usbdev, "get_scan_results");

if (!priv->scan_request)
return;

ret = rndis_check_bssid_list(usbdev);

cfg80211_scan_done(priv->scan_request, ret < 0);
Expand Down Expand Up @@ -2522,6 +2525,11 @@ static int rndis_wlan_stop(struct usbnet *usbdev)
cancel_work_sync(&priv->work);
flush_workqueue(priv->workqueue);

if (priv->scan_request) {
cfg80211_scan_done(priv->scan_request, true);
priv->scan_request = NULL;
}

return retval;
}

Expand Down

0 comments on commit 005ba2f

Please sign in to comment.