summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorEvan Quan <quanliangl@hotmail.com>2023-12-11 18:06:24 +0800
committerJohannes Berg <johannes.berg@intel.com>2023-12-12 10:36:56 +0100
commit10fa22b6fb68198ab6bf2ab468a11c54f083761d (patch)
tree61973f76572bfb66d1bfd0e54be0427ba04630a6 /include/net
parent383052d09a305e045a30ea387eb588390984cffb (diff)
wifi: cfg80211: expose nl80211_chan_width_to_mhz for wide sharing
The newly added WBRF feature needs this interface for channel width calculation. Signed-off-by: Evan Quan <quanliangl@hotmail.com> Signed-off-by: Ma Jun <Jun.Ma2@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://msgid.link/20231211100630.2170152-4-Jun.Ma2@amd.com Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg80211.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index d59669d86718..324a5f710ad3 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -977,6 +977,15 @@ 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.
+ */
+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
* Return: %true if the channel definition is valid. %false otherwise.