RE: [PATCH V8 3/9] cfg80211: expose nl80211_chan_width_to_mhz for wide sharing
From: Quan, Evan <hidden>
Date: 2023-08-14 08:05:55
Also in:
amd-gfx, dri-devel, linux-acpi, linux-wireless, lkml
[AMD Official Use Only - General]
-----Original Message----- From: Jeff Johnson <redacted> Sent: Thursday, August 10, 2023 10:06 PM To: Quan, Evan <redacted>; rafael@kernel.org; lenb@kernel.org; Deucher, Alexander [off-list ref]; Koenig, Christian [off-list ref]; Pan, Xinhui [off-list ref]; airlied@gmail.com; daniel@ffwll.ch; johannes@sipsolutions.net; davem@davemloft.net; edumazet@google.com; kuba@kernel.org; pabeni@redhat.com; Limonciello, Mario [off-list ref]; mdaenzer@redhat.com; maarten.lankhorst@linux.intel.com; tzimmermann@suse.de; hdegoede@redhat.com; jingyuwang_vip@163.com; Lazar, Lijo [off-list ref]; jim.cromie@gmail.com; bellosilicio@gmail.com; andrealmeid@igalia.com; trix@redhat.com; jsg@jsg.id.au; arnd@arndb.de; andrew@lunn.ch Cc: linux-kernel@vger.kernel.org; linux-acpi@vger.kernel.org; amd- gfx@lists.freedesktop.org; dri-devel@lists.freedesktop.org; linux- wireless@vger.kernel.org; netdev@vger.kernel.org Subject: Re: [PATCH V8 3/9] cfg80211: expose nl80211_chan_width_to_mhz for wide sharing On 8/10/2023 12:37 AM, Evan Quan wrote:quoted
The newly added WBRF feature needs this interface for channel width calculation. Signed-off-by: Evan Quan <redacted> --- 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 index7c7d03aa9d06..f50508e295db 100644--- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h@@ -920,6 +920,14 @@ const struct cfg80211_chan_def * cfg80211_chandef_compatible(const struct cfg80211_chan_def*chandef1,quoted
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.SI nit: s/Mhz/MHz/ in both places
Thanks, will update them accordingly. Evan
quoted
+ */ +int nl80211_chan_width_to_mhz(enum nl80211_chan_widthchan_width);quoted
+ /** * 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(conststruct cfg80211_chan_def *chandef)quoted
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(enumnl80211_chan_width chan_width)quoted
} return mhz; } +EXPORT_SYMBOL(nl80211_chan_width_to_mhz); static int cfg80211_chandef_get_width(const struct cfg80211_chan_def*c)quoted
{