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 --- 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)