From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA7F4391832 for ; Fri, 7 Aug 2026 08:26:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786091194; cv=none; b=EyabUKwGCtlQQ9gyMJfSkN8XyPOf/Y2V04rh5VIrxh2nS+tM32yKFt/VofhURrOO1Zj6uD9lEbIes+OnjMasKUBIi45g079XoMLZvgwg2UgrfqtRAS8S12nElq1+BFhn/Du0k6XHlzL1bG3Iea3zF1A/Z8YBHGimLS0ZliGeftM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786091194; c=relaxed/simple; bh=StDQICSSTYfrDyqy3wyl3t6MvwAR/CjM2yoIGOCA/eQ=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AXM6/Dyn6sd+RAq6wGc84hxxNY/p+/XzCp9R0Qhgkaamz3ItPzAuYrF8QlxZ1ktA5A+i6tIIHVDUHkEyN93p5iPQd9hhfwbMzhbKnkCI5af0+D6ZmMYv00P5z9fm37Nw2CwayhY2M0i9kKL2b2hXPqWsCkTvpKEbNDgm+7oorQs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Odm4ol7y; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Odm4ol7y" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2ce7d2adef4so46894855ad.3 for ; Fri, 07 Aug 2026 01:26:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786091191; x=1786695991; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:date:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=rzU8xub4Kt9oAWjkKq11oBriTEMhTM7pr8/P/jz7Ayw=; b=Odm4ol7ydpAVlxv2Tu8JZC5PtUTYXy2PRWIh4qlj7UtHSYvQgOnFW8v1qjCY1COJyF 4BfncxHQ8bEf0F5B9vGRmqPMfsHvtB5ucGtpfd+tqWvks/b7FcN/6OKJFbzxNjBpGLbr M/rgtprpheYpi8pJwShXwaTs7IKyuSHJViyo+d2QO5CmDiTSMwSrjEZSPtzDKsYKxZcy mLeloD7Tzemgivpy5Qk7btRbxhahPfcJ9jhI2KGpv/F2UTSZxNO+YQX/eHqTliMlpddE /dqcJx3BHbQ7kZwc1bfUafZgoTPKi/u+7h+/GTdcAFXSJ1eD/WZt0CMenjOyFZNzjFji w9Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786091191; x=1786695991; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=rzU8xub4Kt9oAWjkKq11oBriTEMhTM7pr8/P/jz7Ayw=; b=iyOulMSykduoAKhxU9Qbfge9XH7oMd+SYsvUehBXl4jQWrc1djq4MtOcyJ4iiQtd4a 3rkz/bBL1pbZN4mNeUMZSG9UWnbVw+L8snbCGCNz4tgbjhGe7KCB0ZBawNkiCrCrED6i 5D0fPT3xohC5JkM6UaXGXZMySYjPVtAwqR8rvnZ2H05SbZvEtdq5fAd0XElYFjkegZpY g0Ghr4v7OQhQRXQkWXoLsxsIySkUaXVhcloFVQnFEpYaUoo2Ys+xvuR4B6PhQUr9/ZnA UoXBfwTqmEs+JB8qj8Oi4uPwGZMg1qCDTVIaAGIsD6wFpS4HDTY4yGdxz4p/Ql3D6RbW GDhg== X-Forwarded-Encrypted: i=1; AHgh+RrBZSA6a3FwVSeGVSJ2M5mX0JFiKAw+5vtv+a89JY/sewBIYefp9InzO8qi1lHW+QffiDcdlmD7S8msoGU=@vger.kernel.org X-Gm-Message-State: AOJu0YxPmJgsFso7L1ibc+DLY4wDZU4qqZ9Vqw4y4g6+weNch8Z9hIOK XqvGWq6JluOaHZ+j705Tmjbp0dti0ajRWvlSBfhA6l/v44eDALgBdlcv X-Gm-Gg: AR+sD12tzFlxHblpZj/GgYA8RbFkkGXZxPyzIGXaCVKF6XOuR7OsomZB0RtMAs441Q/ ZU1bA3EjvsurLKYv+OYyy/TYwMFeyswh1/YgX1i4IYC4GMZQSG+N+cWHy3L621+VAGXQ60mKaEw YC55RiFezv3BGSCiGQDM3G1nkPl3FOxNlWZk89gBs49e9BHICv942D3dnOpKZWwJpzNRJsYcgMW DDn2jhGD7A0ejD0TG73YlQEYXY2EktTBuUr6eM+hEJUyZS/HjR9uC+0ir79vlW6ODlQdIibMphr RWBSDxkqR2AU4qfuPmgHT1bMJXM/GS7wmk374704uMNyJWCsWpTzjgu/KaOp7iae21f4f3EufBB ohFyDKz+lx3zXuwT7yzbfg+spZhnX+dLZM6FJwCgJK2BfewUNYcY1mLFFlxR8cnH5zScEH944Jg AMyWXVTpcpKdSiezDL55YRnpuWPfDe/SO1nze7Dc20ooiZWJdZM6aKe3gdhu89iLHZ+spVoNv4y qrleAzzaGqrspUMgt5TABf76yRBUDhOCVb8239ARgoJ0Kneo521PWNHzamN0JPfsw== X-Received: by 2002:a17:90b:2dc7:b0:380:fead:448d with SMTP id 98e67ed59e1d1-392620e6e25mr2519576a91.13.1786091191456; Fri, 07 Aug 2026 01:26:31 -0700 (PDT) Received: from nxpwireless-Inspiron-14-Plus-7440 (61-228-218-123.dynamic-ip.hinet.net. [61.228.218.123]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3925ff244aasm1558519a91.12.2026.08.07.01.26.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2026 01:26:30 -0700 (PDT) From: Jeff Chen X-Google-Original-From: Jeff Chen Date: Fri, 7 Aug 2026 16:26:23 +0800 To: Georgi Valkov Cc: briannorris@chromium.org, chunfan.chen@gmail.com, francesco@dolcini.it, johannes.berg@intel.com, kees@kernel.org, miriam.rachel.korenblit@intel.com, wenst@chromium.org, rafael.beims@toradex.com, avraham.stern@intel.com, peddolla.reddy@oss.qualcomm.com, error27@gmail.com, s.kerkmann@pengutronix.de, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2] wifi: mwifiex: ignore ROM regulatory hint on WRT3200ACM/WRT32x Message-ID: References: <20260731063118.26171-1-gvalkov@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260731063118.26171-1-gvalkov@gmail.com> On Fri, Jul 31, 2026 at 09:31:18 AM +0300, Georgi Valkov wrote: > WRT3200ACM and WRT32x routers always report a fixed US regulatory domain > from the mwifiex ROM, which conflicts with the platform regulatory > configuration on units sold outside the US market. For example: > - phy0 mwlwifi 5 GHz, hard-coded region 98 EU mapped to FR > - phy1 mwlwifi 2.4 GHz, hard-coded region 98 EU mapped to FR > - phy2 mwifiex 2.4 and 5 GHz, hard-coded region US > > When the system boots, it detects a conflict between the user selected > region and the radios, e.g. BG FR US, and applies extreme restrictions, > preventing use of 5 GHz and DFS channels. This also affects phy0. > > Ignore the incorrect regulatory hint in the ROM of these devices, so > userspace can set the correct platform regulatory domain. These radios > are locked to the hard-coded configuration for which they are certified, > so the only impact is that the region conflict is avoided and the 5 GHz > radios can be used. > > The change affects only WRT3200ACM and WRT32x routers, and helps > overcome the incorrect behaviour of proprietary radio firmware. > > [1] https://github.com/kaloz/mwlwifi/issues/173#issuecomment-307879699 > [2] https://github.com/openwrt/openwrt/issues/9956 > > Tested-on: WRT3200ACM, OpenWrt > Cc: stable@vger.kernel.org > Signed-off-by: Georgi Valkov > --- Hi Georgi, Thanks for the V2. The updated strings now match both environments. However, checking board-specific DT strings inside a generic peripheral driver is still not a good idea. Since you asked about a better approach, why not consider the solution mentioned by openwrt-ai using the "reg_alpha2" module parameter? If OpenWrt injects "reg_alpha2=00" via a modprobe conf file under target/linux/mvebu/, the ROM regulatory hint can be overridden from userspace without needing any hardcoded logic inside the upstream driver. Best regards, Jeff