Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp361755rdb; Thu, 2 Nov 2023 06:05:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnsgf/dtxqB/U64eBoMDGb+4xtR2Jrkgr0RLx9/TKDGsSxmJm0DeVVFpYQOaM6KYR+npI8 X-Received: by 2002:a17:903:2155:b0:1c4:56c8:27f8 with SMTP id s21-20020a170903215500b001c456c827f8mr12154901ple.68.1698930306187; Thu, 02 Nov 2023 06:05:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698930306; cv=none; d=google.com; s=arc-20160816; b=ntLrxM1xXlpStdQ/uPA0FyGS4HT/rnXI7faq9x8i8ztVBV1Pj7dtN3KtceLCDsgfsb TnqM9DbMkukwxUBcbSgQibVDhIEIRp6KdEAaRtgDcZ1XEP0SjfKieWnlEY6Bc9zHlXEN zRQSrdNBLaTniVz9jU8cfaclNZPg23qPMfelaanzS4d50BT3crm+a12lNMP7AUpAeYHM ViObX6Nl7LHRgCAw4as05Q5uB0m4bB9grGnzWXf4h5rgWt6b7UvYbVqoUBYDH1lZHUew snLKPkCP8ocFkBArQf0ilzSMZTD71z5XunZ+3/wdc2DEwHJzFF/MNVqvGKngBNKOlQw4 tuFg== 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=lhnHvgPTUerCavcKvy4VoFNn9k17Ymmjx4Tbd3bshik=; fh=SyZLLbfPgOHz4OAheIA0tz5UACTdEIy9MvI+1XaiipA=; b=OMoVQGyY1dhqJ3yXBFE95myu3qQegNKibb5i0VMTEK5Cn9S7YuDnmUpiZYdQiJudNx /GTxDJaL0Dj2CRpmC2tEk4DamI44GaQghsK4qWr1FCn1fm6nYQG873t6vgsDjCyLdusd GCfaHNeS5ddL0Gyo9OszMFWt+xGSr0K1+I1bNIC5ECAqlUlcayKofe9gV74n1f+IEkHL xEXsUAwgclxiiM2H7+PgD+WEmaKX30MXyhXxBLSaYZby1wWLQGvrqLKtq6qaXwRm6PHX hcSYAVmGk6CbsJpMHZyTkYj3CP1kMdq2hPy82rm8o01tAlHlPPq6hWCMIAb6v4jdmWgb Hk0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=axIh+OQs; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ky12-20020a170902f98c00b001cc4807a1b3si4795905plb.100.2023.11.02.06.04.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 06:05:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=axIh+OQs; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 342E7821A142; Thu, 2 Nov 2023 06:04:57 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234969AbjKBNE4 (ORCPT + 52 others); Thu, 2 Nov 2023 09:04:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234905AbjKBNEz (ORCPT ); Thu, 2 Nov 2023 09:04:55 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:242:246e::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6067E193; Thu, 2 Nov 2023 06:04:49 -0700 (PDT) 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=lhnHvgPTUerCavcKvy4VoFNn9k17Ymmjx4Tbd3bshik=; t=1698930289; x=1700139889; b=axIh+OQs/8lt1/eCYxHEd6sdY68CsoLKtnX3H8kQwIL2R9T zrcHkoQiiL6mQPu8UReBO+NoXxOSaafybY8xtaCYh2PIlqJtOHavjMqBB/WFNzlyFVWTJDvKYqz6H ZnpD8tIKRq69VUxxGGwxF6EQI06974EwMFdxkTVPCvro3Ksfsav0Nmq/Z9DFqQkl0Gwj4R/OT1nkd ThcikbeZ6oRrjaof0DHOmaonV/KtEVxVHtQ7GuRhUWrxw1youZF98Gd+VcYRJ1ir7Ar5DEhu1lVJs WGfYlaDWfTtJokAS8YbUfi4qADPzC+rrH5y5ttw/y8JL3+h3BxAxfEtUP9oWj8LA==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97-RC1) (envelope-from ) id 1qyXNL-0000000BJWz-3w9i; Thu, 02 Nov 2023 14:04:44 +0100 Message-ID: Subject: Re: [Patch v13 4/9] wifi: mac80211: Add support for WBRF features From: Johannes Berg To: Ilpo =?ISO-8859-1?Q?J=E4rvinen?= Cc: Ma Jun , amd-gfx@lists.freedesktop.org, lenb@kernel.org, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, alexander.deucher@amd.com, Lijo.Lazar@amd.com, mario.limonciello@amd.com, Netdev , linux-wireless@vger.kernel.org, LKML , linux-doc@vger.kernel.org, platform-driver-x86@vger.kernel.org, majun@amd.com, Evan Quan Date: Thu, 02 Nov 2023 14:04:42 +0100 In-Reply-To: References: <20231030071832.2217118-1-Jun.Ma2@amd.com> <20231030071832.2217118-5-Jun.Ma2@amd.com> <5b8ea81c-dd4c-7f2a-c862-b9a0aab16044@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.4 (3.48.4-1.fc38) 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,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 02 Nov 2023 06:04:57 -0700 (PDT) On Thu, 2023-11-02 at 14:24 +0200, Ilpo J=C3=A4rvinen wrote: > On Thu, 2 Nov 2023, Johannes Berg wrote: > > On Thu, 2023-11-02 at 13:55 +0200, Ilpo J=C3=A4rvinen wrote: > >=20 > > > > +static void get_chan_freq_boundary(u32 center_freq, u32 bandwidth,= u64 *start, u64 *end) > > > > +{ > > > > + bandwidth =3D MHZ_TO_KHZ(bandwidth); > > > > + center_freq =3D MHZ_TO_KHZ(center_freq); > > >=20 > > > Please use include/linux/units.h ones for these too. > >=20 > > Now we're feature creeping though - this has existed for *years* in the > > wireless stack with many instances? We can convert them over, I guess, > > but not sure that makes much sense here - we'd want to add such macros > > to units.h, but ... moving them can be independent of this patch? >=20 > What new macros you're talking about?=C2=A0 Sorry, I got confused - for some reason I was pretty sure something here was already being added to units.h in this patchset. > Nothing new needs to be added=20 > as there's already KHZ_PER_MHZ so these would just be: >=20 > bandwidth *=3D KHZ_PER_MHZ; > center_freq *=3D KHZ_PER_MHZ; Sure, and in this case that's probably pretty much equivalent. But having a MHZ_TO_KHZ() macro isn't inherently *bad*, and I'm not sure you're objection to it on anything other than "it's not defined in units.h". > Everything can of course be postponed by the argument that some=20 > subsystem specific mechanism has been there before the generic one > but the end of that road won't be pretty... What I was trying to do > here was to point out the new stuff introduced by this series into the= =20 > direction of the generic thing. I just think that the better course of action would be to eventually move MHZ_TO_KHZ() to units.h ... johannes