Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp2962912rdb; Tue, 13 Feb 2024 02:42:31 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWEaCRHWc9M6xjsnvnVxc+Z5Hx9qCIF/TB2JokZaSt2sSwUsmoYV3x68tbuGu0yb05CRcbzHfWyB9dj0jc/tc5OwveSUmOIESz5cM8qqQ== X-Google-Smtp-Source: AGHT+IEslxUMLPr7YWIjuKMGLv4sWxsithH+BbmEd482AatEIzZSJYmgZOmuKfyn7FbGvn60wJEQ X-Received: by 2002:a05:6a21:1584:b0:19e:aa08:1a0 with SMTP id nr4-20020a056a21158400b0019eaa0801a0mr2895628pzb.8.1707820950922; Tue, 13 Feb 2024 02:42:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707820950; cv=pass; d=google.com; s=arc-20160816; b=cJ8o2MVmkrMjjtc1lFSAXuAB1RYvkbS6zttsWVLIS+GMIcz97pOWjm2eUqpy9v5t2t v6cZox1/1FjDOT06zyQrp4xsAYD7ztYpV6c6/MwY4+xtylQpF25TGM4E+QAUY/u9WbIe 7wumP+Ko2Vrad/nKkpwi88camdvJFheadoWTyjVz1/FhoyOtnqY8ekQhSLTZx5sLBKZ4 OLyBa6TifQp7nN9tjc2nhQOzzZ3mSxtGg2/YMtMM6mea6iOYFJH6FZ3UW00UlaQET7ON oyPmdMmIhTlFNfkQvIzl1XkU5gMv1IaW5KjdvVwSrkYNE7PAIXZ8yW83brQlGLoGnR6Q w63w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=yWZqjrq6iHQd2stRNdIHt1+ySF68RurJqP3wNOW4ANk=; fh=anm567p1pML8SPv6VNMD2448pYXerMjXg+hShGqXkz8=; b=LSmkdZVV1zLdSn8MavgbEXNglFlAoR/QZ0bfw2bEeWdMPq4xBBLnwaSuNDlO64H/bK WKhaoYxMFDT7H2Fb5qZ+1jSOL3Wgxs7qyrUEs665riw6m6YPPgnulSOa/qNjHVMxvnKL mOCMspqTG94S7AIrLeVfnjjw5Y+q9o3RAXlbFZs1ywL+6CYLgCAxQ1DoqrK//f5VR3hi 9S/qhdaJSg3PiLFSq+hRh5NX89K546SPAU78sF2CCfvDcJ6+tsiNVhtVh/x+1HzgN3Z8 AY6Dimn2/xC/2SMnQjUrSkymRE47l/O1Yq+ZgshPeRuxyD6MfdX1xLuwElgqnpk5Jdbi jAXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=kVgxh25w; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-3523-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net X-Forwarded-Encrypted: i=2; AJvYcCWWwOLuQ/7rlXlSvlmlWgPTBOp9vUr2yV+4ZP5j5L8emZ1Q7JLq1XhRw43W+Y/NqOzejihhchYXvHoMX3nMdMXhAWXjep2SLAIsZzjhXw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id m17-20020a637d51000000b005dc423d758dsi1815164pgn.116.2024.02.13.02.42.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 02:42:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3523-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=kVgxh25w; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-3523-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3523-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A81F2B22DD7 for ; Tue, 13 Feb 2024 10:15:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DE11225B2; Tue, 13 Feb 2024 10:15:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="kVgxh25w" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6149225A6 for ; Tue, 13 Feb 2024 10:15:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707819315; cv=none; b=frGvPW4YIS6HqPog4ESyZlH0xUXPoF04nJAZ23LD7lTB1A6FTjzy9wsEn/jyifC9un/IKbsg/1a5lBgziEzVkkXW6qhz3EauDOkb8VYRidiW+vOhyWfJccg6BT+LLXsYasi0tQ/JVy0H9FyvmukYkjuB0KUgvRxwxnmLFkb+ZFY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707819315; c=relaxed/simple; bh=SwCoVSlg6C5C5+y9/+vHXLpb+ntTbTZz7l2ypfFbNtQ=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=tr1jgDls19CqyVgr1N/Fc8zd+UWXGqnIbJ1LTSR/yyGFAU/ZKE9YlkCw4gpRLF4wNZ9yPK6OqOOxjvlAJCbMEdYSph/GqVhZRVw3gEQHrU1RfXwoYUaU9bWg3XZki+uDtCXHQBbKH33dJK5QobXQzVgjRr2Qph6/RzsH4JsQu/M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=kVgxh25w; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=MIME-Version:Content-Transfer-Encoding: Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject:Message-ID:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To: Resent-Cc:Resent-Message-ID; bh=yWZqjrq6iHQd2stRNdIHt1+ySF68RurJqP3wNOW4ANk=; t=1707819313; x=1709028913; b=kVgxh25wJRtNYTM1RxeWMlK8CSD1BvZNdPq+2LaQuzZf/0F UfqGAb/Gm44/ceQjPMgO2LFi9OcAILU+cFJor5GF9QAxKzH54zrl/QVnDP1sexSiIz2D1EQdIYinj 046uuWsgr2jRTSjj3CQe/8Pu4elFfLOItCsIyfn+KtJVnR8xrXNalnPbzs55WC60CAK8cF0nv9Nsy /lqaPB4Xui4Wqg2v4kaUsLoI43thZnLjbmF8cBWAJ9rtnahNbEskWcA9izc327WwcjyJ64M/n9ZfL F9NgyMEv5TxwGUHIFxCIVNSM7tFccJEXR7MEoQ9ZqqToIOVEkBKlJGBJk50wv42g==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rZpok-00000007bd1-39ur; Tue, 13 Feb 2024 11:15:10 +0100 Message-ID: <99977c876429f33d8dbab18d7c3e71590585263b.camel@sipsolutions.net> Subject: Re: brcmfmac: Unexpected brcmf_set_channel: set chanspec 0xd022 fail, reason -52 - Part 2 From: Johannes Berg To: Arend Van Spriel , Stefan Wahren , Arend van Spriel , Franky Lin , Hante Meuleman Cc: linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, Hector Martin , Kalle Valo Date: Tue, 13 Feb 2024 11:15:09 +0100 In-Reply-To: <18d1388fbe8.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> References: <18bbf6acf10.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> <5c462fac-b27d-41c0-a62c-a8951bf445d2@gmx.net> <89d3f34a-3427-4871-971c-d960a16918ac@broadcom.com> <004dabc3-c345-4d90-9348-5caa9b1f3849@gmx.net> <0e5eba2f-e524-4f0d-8217-2770c57ad5ed@gmx.net> <18c8d7da558.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> <18c921b1690.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> <18c9224abb0.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> <19541618e400c95a448f7e8c79590c01df214782.camel@sipsolutions.net> <18d1388fbe8.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.3 (3.50.3-1.fc39) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-malware-bazaar: not-scanned On Tue, 2024-01-16 at 19:29 +0100, Arend Van Spriel wrote: > > >=20 > > > I modified brcmf_construct_chaninfo() to store the > > > IEEE80211_CHAN_DISABLED flag within orig_flags in case the flags had = it. > > > This avoid the issue. Not sure this is the proper solution. > >=20 > > orig_flags are from when the wiphy is registered - does the driver only > > set up proper flags after that? >=20 > Long time ago we discussed about this. So brcmfmac provides a superset of= =20 > channels during wiphy_register() and none of them are disabled as they= =20 > could never be enabled. After that the driver may disable a subset as it= =20 > syncs with the device. I think we used strict custom reg flag, but that= =20 > seems to have gone. Could that have the result Stefan is observing? >=20 All this confuses me way more than it should, I guess. We do still have REGULATORY_STRICT_REG, no? And that sets even orig_flags: if (lr->initiator =3D=3D NL80211_REGDOM_SET_BY_DRIVER && request_wiphy && request_wiphy =3D=3D wiphy && request_wiphy->regulatory_flags & REGULATORY_STRICT_REG) { /* * This guarantees the driver's requested regulatory domain * will always be used as a base for further regulatory * settings */ chan->flags =3D chan->orig_flags =3D map_regdom_flags(reg_rule->flags) | bw_flags; But brcmf_construct_chaninfo() looks a bit more like it really should be setting a custom regulatory with all the channels listed, a bit like what iwlwifi/mvm does, with REGULATORY_WIPHY_SELF_MANAGED? Maybe we should start from the beginning: what does this actually _want_? johannes