From: Kalle Valo <kvalo@qca.qualcomm.com>
To: kvalo@qca.qualcomm.com
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 01/10] ath6kl: don't use cfg80211_scan_request after cfg80211_scan_done()
Date: Thu, 27 Oct 2011 18:47:46 +0300 [thread overview]
Message-ID: <20111027154746.23519.39680.stgit@localhost6.localdomain6> (raw)
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>
---
drivers/net/wireless/ath/ath6kl/cfg80211.c | 6 ++++--
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 0b044aa..f5f4a1d 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;
}
next reply other threads:[~2011-10-27 15:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-27 15:47 Kalle Valo [this message]
2011-10-27 15:48 ` [PATCH 02/10] ath6kl: rename ath6kl_wmi_qos_state_init() to _wmi_reset() Kalle Valo
2011-10-27 15:48 ` [PATCH 03/10] ath6kl: move power control from sdio to core Kalle Valo
2011-10-27 15:48 ` [PATCH 04/10] ath6kl: add a fixme to ath6kl_htc_wait_target() Kalle Valo
2011-10-27 15:48 ` [PATCH 05/10] ath6kl: merge ath6kl_init() to ath6kl_core_init() Kalle Valo
2011-10-27 15:48 ` [PATCH 06/10] ath6kl: separate hardware boot code from module initialisation code Kalle Valo
2011-10-27 15:48 ` [PATCH 07/10] ath6kl: remove useless cleanup call from ath6kl_bmi_done() Kalle Valo
2011-10-27 15:48 ` [PATCH 08/10] ath6kl: add a timeout to ath6kl_hif_intr_bh_handler() Kalle Valo
2011-10-27 15:49 ` [PATCH 09/10] ath6kl: create ath6kl_htc_reset() Kalle Valo
2011-10-27 15:49 ` [PATCH 10/10] ath6kl: don't print an error for canceled packets Kalle Valo
2011-10-28 11:22 ` [PATCH 01/10] ath6kl: don't use cfg80211_scan_request after cfg80211_scan_done() Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20111027154746.23519.39680.stgit@localhost6.localdomain6 \
--to=kvalo@qca.qualcomm.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).