From: Daniel Mack <daniel@zonque.org>
To: linux-wireless@vger.kernel.org
Cc: wcn36xx@lists.infradead.org, kvalo@codeaurora.org,
loic.poulain@linaro.org, rfried@codeaurora.org,
bjorn.andersson@linaro.org, Daniel Mack <daniel@zonque.org>
Subject: [PATCH 3/5] wcn36xx: handle scan cancellation when firmware support is missing
Date: Mon, 16 Apr 2018 15:16:32 +0200 [thread overview]
Message-ID: <20180416131634.25432-4-daniel@zonque.org> (raw)
In-Reply-To: <20180416131634.25432-1-daniel@zonque.org>
For firmwares that don't have the SCAN_OFFLOAD feature bit set, do
not call into wcn36xx_smd_stop_hw_scan(). Instead, stop the asynchronous
work and call into ieee80211_scan_completed() immediately.
Signed-off-by: Daniel Mack <daniel@zonque.org>
---
drivers/net/wireless/ath/wcn36xx/main.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index e5ef2cbb622f..28c0286ae47b 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -685,10 +685,18 @@ static void wcn36xx_cancel_hw_scan(struct ieee80211_hw *hw,
wcn->scan_aborted = true;
mutex_unlock(&wcn->scan_lock);
- /* ieee80211_scan_completed will be called on FW scan indication */
- wcn36xx_smd_stop_hw_scan(wcn);
+ if (get_feat_caps(wcn->fw_feat_caps, SCAN_OFFLOAD)) {
+ /* ieee80211_scan_completed will be called on FW scan
+ * indication */
+ wcn36xx_smd_stop_hw_scan(wcn);
+ } else {
+ struct cfg80211_scan_info scan_info = {
+ .aborted = true,
+ };
- cancel_work_sync(&wcn->scan_work);
+ cancel_work_sync(&wcn->scan_work);
+ ieee80211_scan_completed(wcn->hw, &scan_info);
+ }
}
static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta,
--
2.14.3
next prev parent reply other threads:[~2018-04-16 13:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-16 13:16 [PATCH 0/5] wcn36xx: scan related patches Daniel Mack
2018-04-16 13:16 ` [PATCH 1/5] wcn36xx: abort scan request when 'dequeued' indicator is sent Daniel Mack
2018-04-16 13:16 ` [PATCH 2/5] wcn36xx: cancel pending scan request when interface goes down Daniel Mack
2018-04-16 13:16 ` Daniel Mack [this message]
2018-04-16 13:16 ` [PATCH 4/5] wcn36xx: send bss_type in scan requests Daniel Mack
2018-04-16 13:16 ` [PATCH 5/5] wcn36xx: pass information elements " Daniel Mack
2018-04-16 14:03 ` Kalle Valo
2018-04-16 14:06 ` Daniel Mack
2018-04-16 14:13 ` Kalle Valo
2018-04-16 14:29 ` Daniel Mack
2018-04-16 14:41 ` Kalle Valo
2018-04-16 15:03 ` Daniel Mack
2018-04-23 14:14 ` Kalle Valo
2018-04-16 22:24 ` [PATCH 0/5] wcn36xx: scan related patches Ramon Fried
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=20180416131634.25432-4-daniel@zonque.org \
--to=daniel@zonque.org \
--cc=bjorn.andersson@linaro.org \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
--cc=loic.poulain@linaro.org \
--cc=rfried@codeaurora.org \
--cc=wcn36xx@lists.infradead.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).