Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 89722f57 authored by Daniel Mack's avatar Daniel Mack Committed by Kalle Valo
Browse files

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: default avatarDaniel Mack <daniel@zonque.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 80c764d3
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -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 */
	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);
		ieee80211_scan_completed(wcn->hw, &scan_info);
	}
}

static void wcn36xx_update_allowed_rates(struct ieee80211_sta *sta,