mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gianluca Boiano <morf3089@gmail.com>
To: jjohnson@kernel.org
Cc: loic.poulain@oss.qualcomm.com, linux-wireless@vger.kernel.org,
	ath10k@lists.infradead.org, linux-kernel@vger.kernel.org,
	Gianluca Boiano <morf3089@gmail.com>
Subject: [PATCH 2/3] wifi: ath10k: add firmware feature bit to skip quiet mode
Date: Sat, 21 Nov 2026 20:49:38 +0100	[thread overview]
Message-ID: <20261121194939.3647400-3-morf3089@gmail.com> (raw)
In-Reply-To: <20261121194939.3647400-1-morf3089@gmail.com>

WCN3990 firmware advertises WMI_SERVICE_THERM_THROT, so the existing
service-bit guard in ath10k_thermal_set_throttling() lets the pdev quiet
mode command through. The firmware crashes on it deterministically and
takes the modem down with it.

Rather than hardcoding a chip check, add ATH10K_FW_FEATURE_NO_QUIET_MODE
so affected firmware images can opt out via firmware-N.bin. With the bit
set, thermal throttling through the ath10k cooling device has no effect.

Tested on SDM660 (WCN3990).

Signed-off-by: Gianluca Boiano <morf3089@gmail.com>
---
 drivers/net/wireless/ath/ath10k/core.c    | 1 +
 drivers/net/wireless/ath/ath10k/core.h    | 5 +++++
 drivers/net/wireless/ath/ath10k/thermal.c | 5 +++++
 3 files changed, 11 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index d37add4cf..6272e0f62 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -816,6 +816,7 @@ static const char *const ath10k_core_fw_feature_str[] = {
 	[ATH10K_FW_FEATURE_PEER_FIXED_RATE] = "peer-fixed-rate",
 	[ATH10K_FW_FEATURE_IRAM_RECOVERY] = "iram-recovery",
 	[ATH10K_FW_FEATURE_NO_CHAN_STAT_EVENT] = "no-chan-stat-event",
+	[ATH10K_FW_FEATURE_NO_QUIET_MODE] = "no-quiet-mode",
 };
 
 static unsigned int ath10k_core_get_fw_feature_str(char *buf,
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index 29a4c0d74..5dd21f063 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -841,6 +841,11 @@ enum ath10k_fw_features {
 	/* Firmware crashes when asked for channel stats events during scan. */
 	ATH10K_FW_FEATURE_NO_CHAN_STAT_EVENT = 23,
 
+	/* Firmware advertises WMI_SERVICE_THERM_THROT but crashes when it
+	 * receives the pdev quiet mode command.
+	 */
+	ATH10K_FW_FEATURE_NO_QUIET_MODE = 24,
+
 	/* keep last */
 	ATH10K_FW_FEATURE_COUNT,
 };
diff --git a/drivers/net/wireless/ath/ath10k/thermal.c b/drivers/net/wireless/ath/ath10k/thermal.c
index 9bb486f8e..c558a9e7c 100644
--- a/drivers/net/wireless/ath/ath10k/thermal.c
+++ b/drivers/net/wireless/ath/ath10k/thermal.c
@@ -139,6 +139,11 @@ void ath10k_thermal_set_throttling(struct ath10k *ar)
 	if (ar->state != ATH10K_STATE_ON)
 		return;
 
+	/* running_fw is only valid once the device is up */
+	if (test_bit(ATH10K_FW_FEATURE_NO_QUIET_MODE,
+		     ar->running_fw->fw_file.fw_features))
+		return;
+
 	period = ar->thermal.quiet_period;
 	duration = (period * ar->thermal.throttle_state) / 100;
 	enabled = duration ? 1 : 0;
-- 
2.56.1


  parent reply	other threads:[~2026-11-21 19:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21 19:49 [PATCH 0/3] wifi: ath10k: firmware feature bits for WCN3990 on SDM660 Gianluca Boiano
2026-11-21 19:49 ` [PATCH 1/3] wifi: ath10k: add firmware feature bit to skip channel stats events Gianluca Boiano
2026-11-21 19:49 ` Gianluca Boiano [this message]
2026-11-21 19:49 ` [PATCH 3/3] wifi: ath10k: add firmware feature bit to force passive scan on 5 GHz Gianluca Boiano

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=20261121194939.3647400-3-morf3089@gmail.com \
    --to=morf3089@gmail.com \
    --cc=ath10k@lists.infradead.org \
    --cc=jjohnson@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    /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

all inboxes | Powered by JetHome®