summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorKalle Valo <kvalo@qca.qualcomm.com>2011-10-27 18:47:46 +0300
committerKalle Valo <kvalo@qca.qualcomm.com>2011-11-11 12:58:55 +0200
commitcb93821a9eaf53fb60addd689d3fa9f106790be1 (patch)
treeb50f2f091c056ca7d82e240b35742c587aca5562 /drivers/net
parent3101edef5cc43034cd809e7105ea2b366e9c7c00 (diff)
ath6kl: don't use cfg80211_scan_request after cfg80211_scan_done()
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>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 940aeb69d20c..01bb9ede471b 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -874,6 +874,7 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
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);
@@ -882,11 +883,11 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, int 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++) {
@@ -897,6 +898,7 @@ void ath6kl_cfg80211_scan_complete_event(struct ath6kl_vif *vif, int status)
}
out:
+ cfg80211_scan_done(vif->scan_req, aborted);
vif->scan_req = NULL;
}