diff mbox series

[ath-next] wifi: ath12k: Fix scan initiation failure handling

Message ID 20250512065849.2833232-1-quic_vignc@quicinc.com
State New
Headers show
Series [ath-next] wifi: ath12k: Fix scan initiation failure handling | expand

Commit Message

Vignesh C May 12, 2025, 6:58 a.m. UTC
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.

Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
Signed-off-by: Vignesh C <quic_vignc@quicinc.com>
---
 drivers/net/wireless/ath/ath12k/mac.c | 1 +
 1 file changed, 1 insertion(+)


base-commit: 3a64d6def8733e75909abcfab983efae92dc4102

Comments

Vignesh C May 15, 2025, 10:43 a.m. UTC | #1
On 5/14/2025 7:17 PM, Jeff Johnson wrote:
> On 5/14/2025 4:48 AM, Vignesh C wrote:
>>
>>
>> On 5/13/2025 3:25 AM, Jeff Johnson wrote:
>>> On 5/11/2025 11:58 PM, Vignesh C wrote:
>>>> 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.
>>>
>>> Are there any user-visible effects?
>>>
>>
>> When MAC debug is enabled, the message 'mac scan started' is displayed, which is misleading in scan start failure scenario. Additionally, a scan timeout work-queue is scheduled to attempt aborting the scan, which is unnecessary in such cases.
> 
> Since there are no stability issues this is not a candidate for backporting
> 

Agreed.

>>
>>>>
>>>> In the scan initiation failure scenario, exit the code instead
>>>> of scheduling the ar->scan.timeout workqueue.
>>>>
>>>> Compile tested only.
>>>>
>>>> Fixes: d889913205cf ("wifi: ath12k: driver for Qualcomm Wi-Fi 7 devices")
>>>
>>> If there are no user-visible effects then I'll drop the Fixes tag since there
>>> is no reason to backport this to stable kernel versions.
>>>
>>
>> Kindly refer the above comment and please let me know the next steps.
> 
> There are no actions required on your part.
> 
> I've made the change in the pending branch:
> https://git.kernel.org/pub/scm/linux/kernel/git/ath/ath.git/commit/?h=pending&id=4545ccf7efbd97566eb6d98738013bb6d72ced05

Thanks, Jeff.
diff mbox series

Patch

diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c
index 4dae941c9615..0cf2b3d06c3b 100644
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -4647,6 +4647,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");