Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp11492615rwl; Mon, 2 Jan 2023 23:16:50 -0800 (PST) X-Google-Smtp-Source: AMrXdXtAc/QtOBUQ6zf3QoLNSv6UXpxfFcpZSEetuvZDBoRcaeJTULWx63skT5z5xT5Po1dJsrrq X-Received: by 2002:a17:906:3bc7:b0:7c0:db61:dbd5 with SMTP id v7-20020a1709063bc700b007c0db61dbd5mr35491154ejf.62.1672730209988; Mon, 02 Jan 2023 23:16:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672730209; cv=none; d=google.com; s=arc-20160816; b=DhxhvQD31LBYhQQ7d+n2alW1ufDmilzPGD4utn/D9MdhbzCx7q/5HiVhApd0kqKes3 iNUGXhMmDiZ93eyCf7/rlHq0E1V4PpjLV8wD//d6l5p60aTRzLsKoVEKJM5Ybt0QaVyC /PM0m/Z3XgQd5SBGgDKm1q+jJKTPR+3fwYLfCZGbxaPigGHX/9/WHFntVu4WoyKS2IEh e/eyM26yGt5iVmdYB8sElEA4QMfImgxwnMM2PA6ToRiaNhdu3DmB9EHmFwjhUUevRqQt 3trbnDiXZAcEf9zMDKvJ78N+6sSD+dkX3FJdNqPy1ucXCJv8GhypVXDMlUZewKNXT/LV Jl/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=qJZlfWxkp/1m9UXQ4biuXBTqc3b4Hp2gezpakrBy610=; b=dQ/vovDtU9iHx1Nx03PdPvjn/MuvFQVY6kFrMauVd0PRpmq4TEolucQBTzHZIU6v7C n9NsoH/l43rs9sBWKMwtXVgRLg2jrzdxPAD0xFUZ/NmKo7qrFztFOk49VEx41fHSrpEc YWKiaC8lezXmNVHyWXHAQ5G5N8GZg7xnkBB5fXZYPmQYNbVFEH/McfmRX1ki2cXXVCpD Gm9wISeJ18pJ6vPCb+uZopBjW30RPYFfdqZ4a5aOS8OYATfk4pfPZ8yWneOS3qU4nk2p 08VCNdZCJRUaubLxgGuVCOqyDLX2/C+g7fR5PYNuXT9MstuCwxfykyNbXiFFOMzK/VX3 UxaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=nsjw6EEf; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb11-20020a1709071c8b00b007f46a3735cbsi29745270ejc.172.2023.01.02.23.16.28; Mon, 02 Jan 2023 23:16:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=nsjw6EEf; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbjACHHv (ORCPT + 67 others); Tue, 3 Jan 2023 02:07:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230254AbjACHHu (ORCPT ); Tue, 3 Jan 2023 02:07:50 -0500 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18A87DEA3 for ; Mon, 2 Jan 2023 23:07:48 -0800 (PST) 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=qJZlfWxkp/1m9UXQ4biuXBTqc3b4Hp2gezpakrBy610=; t=1672729669; x=1673939269; b=nsjw6EEffgt76sN1yoqyrY0cK2SFVZe1ZZabrWlTe4arCRe m46+WTugTOB/IvrmHiYa9cjhNcgCH8w+9y9qOFS1ysiIUtQgXr1xRzWK0VsfoMQ3ubJ27OTC9vfs4 Zub9xa4r1DHEKrsTCYq2gxEf+1RXbB6pSE9vDBAkIe7i+5oL2gB/lcIrpJCeqN7LIewnUM9dwiNy+ +J1WLMQ9s6tVe9gc5Y9CBtoL7WeMG87UjZqoTicQsEx3vav8UzariVe5ixDxiCR+Sfs5DBEkT+qJQ d3l+F4kb2WjsPhvL1pS2PEfVoCIqvkNHdXaLGgzsNYQvHHwxmsUBXJBypmy/jrtw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1pCbOh-008b8A-2y; Tue, 03 Jan 2023 08:07:44 +0100 Message-ID: Subject: Re: brcmfmac: Unexpected cfg80211_set_channel: set chanspec ... fail, reason -52 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 Date: Tue, 03 Jan 2023 08:07:41 +0100 In-Reply-To: <1f428e2b-f73f-64ff-02d3-eefbcd11db89@broadcom.com> References: <2635fd4f-dfa0-1d87-058b-e455cee96750@i2se.com> <1f428e2b-f73f-64ff-02d3-eefbcd11db89@broadcom.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-malware-bazaar: not-scanned X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Hi, > > [=C2=A0 104.897615] brcmfmac: cfg80211_set_channel: set chanspec 0x100e= fail,=20 > > reason -52 [...] >=20 > > All of these 10 errors are repeated every 60 sec. >=20 > Catching up after the holidays ;-) Above chanspec values are invalid.=20 > 0x100e =3D channel 14/bw 20MHz. The 'iw list' output shows all these=20 > channels are disabled. So who/what is trying to set these channels.=20 > Scanning sets the channel in firmware. Is this initiated from hostapd?= =20 Yeah, what userspace is running here? Looks like cfg80211_set_channel() is only used for survey? Couple of observations on the side: * might be nice to have some "brcm" indication in that name :P * dump_survey should just dump data, not actually implement the data collection, I think? > Maybe trying ACS?=C2=A0 >=20 Seems it must be something like that. > As these are marked as disabled user-space should not=20 > use them. What I don't understand is why these pass the cfg80211 layer= =20 > so adding Johannes here. >=20 Well that goes back to my earlier observation above: dump_survey() should just dump all *available* data, not actually try to *collect* data. So if userspace requests data for a channel that's disabled, that's actually OK, but you shouldn't _have_ any data for that channel since it's disabled. Also nl80211 won't send the data out if it exists, but there's no check to see if asking the driver makes sense since if it's a channel that exists, it should be valid to ask the driver if it has data - it just shouldn't have any. The way it works in mac80211 is that survey data is collected during scan, I think? johannes