Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1559962rdd; Thu, 11 Jan 2024 02:58:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IEHRI6UDkRf3IXqQmMKN5ZA5GwWzOWo8dm+DghT1k/uo+MS7DtnbxWZxiLc5BbBfkBEAeZF X-Received: by 2002:a17:906:53ce:b0:a2b:65e5:101e with SMTP id p14-20020a17090653ce00b00a2b65e5101emr251707ejo.294.1704970713015; Thu, 11 Jan 2024 02:58:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704970713; cv=none; d=google.com; s=arc-20160816; b=BY+8bwQISNgYdJrk1lJ3GO4CudjPhS38boPTs1HM9tZetwfM3tJR2a0ITYi3lhoykG u687E9o/e1UchK2gw3TlIKmrWMd/5piqM0wV5SUAPUfx34hpnuJ9MiYPXS1Dmn+1C0mJ RXz21eCeMLOtAX8qMvnsyzRLiqVo2678m233Tul0728AtZKXkkK0O4aAsaOHiqQk8/0j 76rJSCL7QRLsnb2LH/EnKFGS2AMBcvZYO8iPCXm2zlOWqL/ZPxAzmg9x4Eta44PtBlW8 nTZeuh+rMEldew602fqKRJQMfZ8FWswfU4JHRaQAypLXweISGyBJJIWGa62U/6O45xYf fLMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=rGP6pcKWBl2HwMtNlSMIuuuZp9AKVlkEhkRNkeCJ3z0=; fh=SnaPSLgX3svkS/5HajitLE8krf2G3bBloJMjoqgH5Oo=; b=Eqswk36Tao8ai746JJPW3rEQF9mA/zA1OmgTMiifN9FpqxvtkWlk65Sz9cIEmWl1CW s/Hl9xVeVS+STwHqhYFME4Lwz1ec/cZVeNw1B1l/aS/f8rb52pdh5uF14eGFouoYoKxt m3lYlwcB7YLzqUG097VlNyFFb5sZbVjsyYgyW6ECyGzEkMYwFSCs8Cu7wyILSeUBlVKX IrY7jgdFLp/Jdg4VRUCKZ/z38+DaIG6xFFwy5TLkr63m6nLKu08Ed/o2r2row03in80f QHcLSwtyNvbLOaQ2bC+KPdhanwnny2UwZYZ3rlOh+GggAnUq3pOMY8YWx7bQM9iMScHy bWLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f8FOHZFu; spf=pass (google.com: domain of linux-wireless+bounces-1707-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1707-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id j12-20020a170906050c00b00a26b8707520si390433eja.446.2024.01.11.02.58.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 02:58:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-1707-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=f8FOHZFu; spf=pass (google.com: domain of linux-wireless+bounces-1707-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-1707-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id C12331F21814 for ; Thu, 11 Jan 2024 10:58:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7F04B14F9D; Thu, 11 Jan 2024 10:58:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="f8FOHZFu" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5CBBD14F60; Thu, 11 Jan 2024 10:58:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8E76BC433B2; Thu, 11 Jan 2024 10:58:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704970691; bh=b4kPg7Dlhoh2Ylgd7Rl0rO+8xy+oTw1hAq/n9H5lbHY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=f8FOHZFumJgkdpbXCpfREugTvA1/PkK+qa0y+iiwCNQkl5H1QzCshaHj38k7PZCfO FLAKNEMdDZyibSA+/u1dw3K1+MbiNrAZDzIIhIpdD4YvbW4UvHdegjKuHwhnTc4vqx RuqSA5bBZtZUk5LKIklpEnPT9qNEBwNsCMB2o2h+8IWuj03Rg9vRs4aMS5aGDgUQ+D ii6s3LLrj1FLv1SiGxA0otdb2eHs0KugWkm4+qpTuga8/tY4GYMT7VD6KiDtsxUSs4 oKRGMeEvoqy7gIRBM05HMRlnbcCUANxUdIhjWxIoo7nrsDCDmAp4IuFzuwGgR2UEV/ 4r61du8RAVmTQ== From: Kalle Valo To: Mario Limonciello Cc: "Ma, Jun" , Johannes Berg , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "open list:MAC80211" , "open list:NETWORKING [GENERAL]" , open list , Jun Ma Subject: Re: [PATCH] wifi: mac80211: Use subsystem appropriate debug call References: <20231215145439.57286-1-mario.limonciello@amd.com> <87frzzsfoi.fsf@kernel.org> <46bf6ed5-31f6-48f4-b63d-f532e163204e@amd.com> <87cyv0oyaf.fsf@kernel.org> <0ad78e88-05d5-483f-83fa-87d5f1d80ca5@amd.com> Date: Thu, 11 Jan 2024 12:58:07 +0200 In-Reply-To: <0ad78e88-05d5-483f-83fa-87d5f1d80ca5@amd.com> (Mario Limonciello's message of "Fri, 29 Dec 2023 20:42:10 -0600") Message-ID: <87bk9sb0hs.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Mario Limonciello writes: > On 12/21/2023 00:38, Kalle Valo wrote: > >> "Ma, Jun" writes: >> >>> Hi, >>> >>> On 12/18/2023 11:17 PM, Kalle Valo wrote: >>>> Mario Limonciello writes: >>>> >>>>> mac80211 doesn't use dev_dbg() but instead various macros from >>>>> net/mac80211/debug.h. Adjust wbrf code to use wiphy_dbg() instead. >>>>> >>>>> Cc: Jun Ma >>>>> Reported-by: kvalo@kernel.org >>>>> Closes: >>>>> https://lore.kernel.org/amd-gfx/8bd60010-7534-4c22-9337-c4219946d8d6@amd.com/T/#mfe2f29372c45130d27745912faf33d9f7ce50118 >>>>> Fixes: d34be4310cbe ("wifi: mac80211: Add support for WBRF features") >>>>> Signed-off-by: Mario Limonciello >>>>> --- >>>>> net/mac80211/wbrf.c | 4 ++-- >>>>> 1 file changed, 2 insertions(+), 2 deletions(-) >>>>> >>>>> diff --git a/net/mac80211/wbrf.c b/net/mac80211/wbrf.c >>>>> index a05c5b971789..12c23e14f884 100644 >>>>> --- a/net/mac80211/wbrf.c >>>>> +++ b/net/mac80211/wbrf.c >>>>> @@ -23,8 +23,8 @@ void ieee80211_check_wbrf_support(struct ieee80211_local *local) >>>>> return; >>>>> local->wbrf_supported = >>>>> acpi_amd_wbrf_supported_producer(dev); >>>>> - dev_dbg(dev, "WBRF is %s supported\n", >>>>> - local->wbrf_supported ? "" : "not"); >>>>> + wiphy_dbg(wiphy, "WBRF is %s supported\n", >>>>> + local->wbrf_supported ? "" : "not"); >>>>> } >>>> >>>> This won't work, I still see the debug message: >>>> >>>> [ 333.765867] ieee80211 phy0: WBRF is not supported >>>> >>>> The issue seems to be that mac80211 defines DEBUG in >>>> net/mac80211/Makefile: >>>> >>>> ccflags-y += -DDEBUG >>>> >>>> That -DDEBUG should be cleaned up, but I think separately. It's just >>>> that I cannot come up with any good proposal, all the macros in >>>> net/mac80211/debug.h require sdata and we don't have that in this stage. >>>> Any ideas? >>> >>> I will submit a patch that only compiles wbrf.c when CONFIG_AMD_WBRF=y >> But does this mean that the debug is still printed when >> CONFIG_AMD_WBRF >> is enabled? And I would assume all distros enable that, right? >> > > Maybe just discard the debug message instead of have to deal with this. > > We'll be able to tell from the consumer (amdgpu right now) when WBRF > is being used and if we need to debug an issue knowing that it's > supported or not supported from the producer side is the least of our > worries. Yeah, removing the message for now is the best solution. It can be added later after we have improved mac80211 logging. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches