]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: ath12k: Fix scan initiation failure handling
authorVignesh C <quic_vignc@quicinc.com>
Mon, 12 May 2025 06:58:49 +0000 (12:28 +0530)
committerJeff Johnson <jeff.johnson@oss.qualcomm.com>
Mon, 19 May 2025 17:45:40 +0000 (10:45 -0700)
During a code review, it is observed that in the scenario
where scan initiation fails, the current code schedules the
ar->scan.timeout workqueue which is not necessary.

In the scan initiation failure scenario, exit the code instead
of scheduling the ar->scan.timeout workqueue.

Compile tested only.

Signed-off-by: Vignesh C <quic_vignc@quicinc.com>
Link: https://patch.msgid.link/20250512065849.2833232-1-quic_vignc@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
drivers/net/wireless/ath/ath12k/mac.c

index 569f8406a514f9d020a4e929b9f0a76c889c00b4..fa39537fa4ce8a4a2aad5aff87868aeaecd73565 100644 (file)
@@ -4657,6 +4657,7 @@ static int ath12k_mac_op_hw_scan(struct ieee80211_hw *hw,
                spin_lock_bh(&ar->data_lock);
                ar->scan.state = ATH12K_SCAN_IDLE;
                spin_unlock_bh(&ar->data_lock);
+               goto exit;
        }
 
        ath12k_dbg(ar->ab, ATH12K_DBG_MAC, "mac scan started");