nl80211: bounce scan request back to userspace
[safe/jmp/linux-2.6] / net / wireless / scan.c
index df59440..e95b638 100644 (file)
@@ -29,13 +29,14 @@ void cfg80211_scan_done(struct cfg80211_scan_request *request, bool aborted)
                goto out;
 
        WARN_ON(request != wiphy_to_dev(request->wiphy)->scan_req);
-       wiphy_to_dev(request->wiphy)->scan_req = NULL;
 
        if (aborted)
                nl80211_send_scan_aborted(wiphy_to_dev(request->wiphy), dev);
        else
                nl80211_send_scan_done(wiphy_to_dev(request->wiphy), dev);
 
+       wiphy_to_dev(request->wiphy)->scan_req = NULL;
+
 #ifdef CONFIG_WIRELESS_EXT
        if (!aborted) {
                memset(&wrqu, 0, sizeof(wrqu));