Linux wireless drivers development
 help / color / mirror / Atom feed
From: Josef Schlehofer <pepe.schlehofer@gmail.com>
To: Jeff Johnson <jjohnson@kernel.org>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH ath-next 3/9] wifi: ath6kl: ignore AR6006 regulatory domain events
Date: Mon, 30 Nov 2026 10:50:36 +0100	[thread overview]
Message-ID: <20261130095042.41330-4-pepe.schlehofer@gmail.com> (raw)
In-Reply-To: <20261130095042.41330-1-pepe.schlehofer@gmail.com>

The AR6006 hw1.1 firmware sends regdomain events with a country that
varies. On one router it reported 0x4000006a (no country) at load,
then about 0.6 s later 0x80000114 (DE) in one run and 0x800000cb (CZ)
in another. Every time an AP started it reported 0x80000348 (US). Why
the country varies is not known. A country taken from nearby beacons
is one possibility.

ath6kl passes the country to regulatory_hint(). On a router with other
radios this intersects the global regulatory domain with that country.
In testing the global domain turned from CZ into "98". After an AP
started it became "98" with DFS-UNSET and without channels 12 and 13.

The host cannot set the country in this firmware either.
WMI_SET_REGDOMAIN_CMDID is 0xf0b0 in this WMI layout and 0xf08f in
mainline, and ath6kl only sends it with the REGDOMAIN capability,
which this firmware does not get.

Ignore the regdomain event for the AR6006 and leave the country to
user space.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
---
The series ran on OpenWrt 25.12 (backports 6.18.55) on a big-endian
QCA9563 router with two other radios. The global regulatory domain
stayed unchanged at load and after an AP started.

 drivers/net/wireless/ath/ath6kl/wmi.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index 941612c68..238dbfcf3 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -1054,6 +1054,16 @@ static void ath6kl_wmi_regdomain_event(struct wmi *wmi, u8 *datap, int len)
 	char alpha2[2];
 	u32 reg_code;
 
+	/*
+	 * The AR6006 firmware reports a varying country. Passing it on
+	 * changes the global regulatory domain for the other radios of the
+	 * system, so ignore it for this chip.
+	 */
+	if (wmi->parent_dev->target_type == TARGET_TYPE_AR6006) {
+		ath6kl_dbg(ATH6KL_DBG_WMI, "ignoring AR6006 regdomain event\n");
+		return;
+	}
+
 	ev = (struct ath6kl_wmi_regdomain *) datap;
 	reg_code = le32_to_cpu(ev->reg_code);
 
-- 
2.54.0 (Apple Git-157)


  parent reply	other threads:[~2026-11-30  9:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  9:50 [PATCH ath-next 0/9] wifi: ath6kl: add AR6006 hw1.1 (QCA6006) support Josef Schlehofer
2026-11-30  9:50 ` [PATCH ath-next 1/9] wifi: ath6kl: add AR6006 hw1.1 support Josef Schlehofer
2026-11-30  9:50 ` [PATCH ath-next 2/9] wifi: ath6kl: handle the AR6006 WMI layout Josef Schlehofer
2026-11-30  9:50 ` Josef Schlehofer [this message]
2026-11-30  9:50 ` [PATCH ath-next 4/9] wifi: ath6kl: use per-device band and channel copies Josef Schlehofer
2026-11-30  9:50 ` [PATCH ath-next 5/9] dt-bindings: net: wireless: add QCA6006 binding Josef Schlehofer
2026-11-30  9:50 ` [PATCH ath-next 6/9] wifi: ath6kl: take the AR6006 MAC address from DT Josef Schlehofer
2026-11-30  9:50 ` [PATCH ath-next 7/9] wifi: ath6kl: handle unsupported connection frequencies Josef Schlehofer
2026-11-30  9:50 ` [PATCH ath-next 8/9] wifi: ath6kl: honour ieee80211-freq-limit from DT Josef Schlehofer
2026-11-30  9:50 ` [PATCH ath-next 9/9] wifi: ath6kl: add QCA6006 USB ID Josef Schlehofer

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=20261130095042.41330-4-pepe.schlehofer@gmail.com \
    --to=pepe.schlehofer@gmail.com \
    --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