ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Myeonghun Pak <mhun512@gmail.com>
To: jjohnson@kernel.org
Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org
Subject: [PATCH] wifi: ath11k: disable wake IRQ on AHB suspend failure
Date: Thu, 10 Sep 2026 18:40:48 -0400	[thread overview]
Message-ID: <20260910224048.10294-1-mhun512@gmail.com> (raw)

ath11k_ahb_hif_suspend() enables the wake IRQ before sending the SMP2P
power-save-enter message. If qcom_smem_state_update_bits() fails, the
function returns without balancing enable_irq_wake(). The WoW suspend
error path does not call ath11k_ahb_hif_resume(), so its wake IRQ cleanup
does not undo this enable.

Disable the wake IRQ before returning the SMP2P error. Warn if disabling
it also fails, while preserving the original error code.

This issue was identified during our ongoing static-analysis research while
reviewing kernel code.

Fixes: 69ccee619a38 ("wifi: ath11k: Add WoW support for WCN6750")
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
 drivers/net/wireless/ath/ath11k/ahb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
index ec5bf5c..3c9de95 100644
--- a/drivers/net/wireless/ath/ath11k/ahb.c
+++ b/drivers/net/wireless/ath/ath11k/ahb.c
@@ -742,6 +742,8 @@ static int ath11k_ahb_hif_suspend(struct ath11k_base *ab)
 					  ATH11K_AHB_SMP2P_SMEM_VALUE_MASK, value);
 	if (ret) {
 		ath11k_err(ab, "failed to send smp2p power save enter cmd :%d\n", ret);
+		if (disable_irq_wake(wake_irq))
+			ath11k_warn(ab, "failed to disable wakeup irq on suspend failure\n");
 		return ret;
 	}
 

base-commit: 08df884136f1c1197bab2a27814404fd329d9aac
-- 
2.50.1


                 reply	other threads:[~2026-09-10 22:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260910224048.10294-1-mhun512@gmail.com \
    --to=mhun512@gmail.com \
    --cc=ath11k@lists.infradead.org \
    --cc=jjohnson@kernel.org \
    --cc=linux-wireless@vger.kernel.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