summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wcn36xx
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2018-04-17 15:23:35 +0200
committerKalle Valo <kvalo@codeaurora.org>2018-04-24 09:06:13 +0300
commit89722f5767ac71b66e3077b6a158495eb316a43c (patch)
tree41f4308374371261319767f6e36c474d45ff7c10 /drivers/net/wireless/ath/wcn36xx
parent80c764d32122eceb26754d9ffa9718c124c8072e (diff)
wcn36xx: handle scan cancellation when firmware support is missing
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> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wcn36xx')
-rw-r--r--drivers/net/wireless/ath/wcn36xx/main.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c
index 08b6939d3f57..e3b91b3b38ef 100644
--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -687,10 +687,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,