Use of cfg80211_scan_request is not valid after calling cfg80211_scan_done()
but ath6kl_cfg80211_scan_complete_event() was doing exactly that. Change
the function to call cfg80211_scan_done() last.
This was found during code review, I didn't see any visible problems
due to this bug.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
 void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, int status)
 {
        struct ath6kl *ar = vif->ar;
+       bool aborted;
        int i;
 
        ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: status %d\n", __func__, status);
                return;
 
        if ((status == -ECANCELED) || (status == -EBUSY)) {
-               cfg80211_scan_done(vif->scan_req, true);
+               aborted = true;
                goto out;
        }
 
-       cfg80211_scan_done(vif->scan_req, false);
+       aborted = false;
 
        if (vif->scan_req->n_ssids && vif->scan_req->ssids[0].ssid_len) {
                for (i = 0; i < vif->scan_req->n_ssids; i++) {
        }
 
 out:
+       cfg80211_scan_done(vif->scan_req, aborted);
        vif->scan_req = NULL;
 }