Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3028133rdg; Tue, 17 Oct 2023 02:14:57 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEODbSRB9Ti0d2IUn3I7I9nzF6EDd5TkO8S0WQcVtXEm6SpRkGr5wJvtl7k4lw8hPp5xiUh X-Received: by 2002:a67:a407:0:b0:457:cc32:39c6 with SMTP id n7-20020a67a407000000b00457cc3239c6mr1722599vse.16.1697534097282; Tue, 17 Oct 2023 02:14:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697534097; cv=none; d=google.com; s=arc-20160816; b=uafHFhOU+HBOvykKzEW3BoUwu0dU2fMsex8xznufNFzFBXnzfcrO9zmpCWRrfEzC49 zdetgcZzGAOMeCN0r6Xv7lQ4SBjQ8Y6RozYRXEgqRaOhzutX4OTp9kJOuetYyRcysLfB gkEIWKbPFSjnA3gKu0OsrORs3hDpOh8+ib2xb7RYe0ulV+6WP6KYbY10f+Ss49X10hkq GZ268IOmTnrvAZQQLsvmhddQWvyVSgsru10v9iq5ivlcyFbremasjnrGUwFhf3ttEBDA 9BgXjiU4jqe7dc7mB6tbaK9dGSvdNzb2XPFeC+KiCdVpSDzpzemgk9kqs9UVja18mVSn 8GCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:message-id:in-reply-to :subject:cc:to:from:date:dkim-signature; bh=yqz5ME7mww9QcfUoad836EzQ6Kk4QYsSBkg8DpzWczg=; fh=vNLEY746teB6uKOp12IiCI0hWpF0wnMOnihrIc5DNdQ=; b=WCBIAF0ygpQFo4UTsEo/4QtHcbxq504dGhnnd2E4KRtsNTD2sVk8Oj794aZ8x9EKX3 cmHgtdDRRPezKwguDOpn2i1lwdPISIr884dEC/vcg4qi003ntdy/OrAAAxaOUYWys/9t EfVQoTjp2YL+D83MBFqs1jxL4pjot3O+cOskUMQ8BRZdJuSVeJhR2kf0uqA++bFAIhn6 x/VWZLYAWLX9FogKrhMssicIVKPR4oMWxcSdhovJ9tq8u9cYoba4xOrJYvc3H6MCJhji 9dsslAp1k+JkmJA3Rq/G3p2ivxe95TVU5R7eLpuGTCDJ1kcltIQ87XvLXuGxi/9xAI+p dAuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GPeI5XqQ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id ca41-20020a056a0206a900b005b42f4443b7si1476399pgb.653.2023.10.17.02.14.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 02:14:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GPeI5XqQ; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 9AC51808577F; Tue, 17 Oct 2023 02:14:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234789AbjJQJOo (ORCPT + 52 others); Tue, 17 Oct 2023 05:14:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234145AbjJQJOn (ORCPT ); Tue, 17 Oct 2023 05:14:43 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 602EC8E; Tue, 17 Oct 2023 02:14:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697534081; x=1729070081; h=date:from:to:cc:subject:in-reply-to:message-id: references:mime-version; bh=5hJ1MOTyviSW3cZFQ1/6LAEsLb2tBCjZ2qHZ6qLypPU=; b=GPeI5XqQVBZOvT8zyzLJO/bJ7Hnlm+DI8VvieFJYQMxA/CjFkDj+elJV xF1tAoVOK4gqYlvXGJCRbzNV17u8CuIJp7bPhR+A6O9LkW8IkVWgFbn6y 9rEdaS9KKDZLX/yHxpYKPilPBaEXxNcBvI1a/8svivdIjCMVNiVcpHweL AyRez3cpm7rbUsNSDPtPy9lmPk9rlzbSgQDNSJf9+AHsnRsE358WWRURE DoONlBvAczW7TJZJ0krX/xx5IuxKkjdtGi/B1FyPQmFJwGpUM6MPg0gEn 0IWRt7eNNiPf6L4CZWVda4WLtQDUi5cr7/YNMhzEZZzYo18a2eNaHo20c Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10865"; a="416820961" X-IronPort-AV: E=Sophos;i="6.03,231,1694761200"; d="scan'208";a="416820961" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 02:14:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.03,231,1694761200"; d="scan'208";a="3851348" Received: from spandruv-mobl.amr.corp.intel.com ([10.252.44.24]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 02:13:27 -0700 Date: Tue, 17 Oct 2023 12:14:30 +0300 (EEST) From: =?ISO-8859-15?Q?Ilpo_J=E4rvinen?= To: Ma Jun cc: amd-gfx@lists.freedesktop.org, lenb@kernel.org, johannes@sipsolutions.net, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, alexander.deucher@amd.com, Lijo.Lazar@amd.com, mario.limonciello@amd.com, majun@amd.com, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, platform-driver-x86@vger.kernel.org, Evan Quan Subject: Re: [PATCH v12 3/9] cfg80211: expose nl80211_chan_width_to_mhz for wide sharing In-Reply-To: <20231017025358.1773598-4-Jun.Ma2@amd.com> Message-ID: <92dde569-3919-15e-b714-4eb8fbc73eae@linux.intel.com> References: <20231017025358.1773598-1-Jun.Ma2@amd.com> <20231017025358.1773598-4-Jun.Ma2@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Tue, 17 Oct 2023 02:14:54 -0700 (PDT) On Tue, 17 Oct 2023, Ma Jun wrote: > From: Evan Quan > > The newly added WBRF feature needs this interface for channel > width calculation. > > Signed-off-by: Ma Jun > Signed-off-by: Evan Quan > > -- > v8->v9: > - correct typo(Mhz -> MHz) (Johnson) > --- > include/net/cfg80211.h | 8 ++++++++ > net/wireless/chan.c | 3 ++- > 2 files changed, 10 insertions(+), 1 deletion(-) > > diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h > index d6fa7c8767ad..026d91083f37 100644 > --- a/include/net/cfg80211.h > +++ b/include/net/cfg80211.h > @@ -923,6 +923,14 @@ const struct cfg80211_chan_def * > cfg80211_chandef_compatible(const struct cfg80211_chan_def *chandef1, > const struct cfg80211_chan_def *chandef2); > > +/** > + * nl80211_chan_width_to_mhz - get the channel width in MHz > + * @chan_width: the channel width from &enum nl80211_chan_width > + * Return: channel width in MHz if the chan_width from &enum nl80211_chan_width > + * is valid. -1 otherwise. Add empty line before Return: > + */ > +int nl80211_chan_width_to_mhz(enum nl80211_chan_width chan_width); > + > /** > * cfg80211_chandef_valid - check if a channel definition is valid > * @chandef: the channel definition to check > diff --git a/net/wireless/chan.c b/net/wireless/chan.c > index 0b7e81db383d..227db04eac42 100644 > --- a/net/wireless/chan.c > +++ b/net/wireless/chan.c > @@ -141,7 +141,7 @@ static bool cfg80211_edmg_chandef_valid(const struct cfg80211_chan_def *chandef) > return true; > } > > -static int nl80211_chan_width_to_mhz(enum nl80211_chan_width chan_width) > +int nl80211_chan_width_to_mhz(enum nl80211_chan_width chan_width) > { > int mhz; > > @@ -190,6 +190,7 @@ static int nl80211_chan_width_to_mhz(enum nl80211_chan_width chan_width) > } > return mhz; > } > +EXPORT_SYMBOL(nl80211_chan_width_to_mhz); > > static int cfg80211_chandef_get_width(const struct cfg80211_chan_def *c) > { > -- i.