summaryrefslogtreecommitdiff
path: root/include/net/cfg80211.h
diff options
context:
space:
mode:
authorIlan Peer <ilan.peer@intel.com>2020-05-28 21:34:39 +0200
committerJohannes Berg <johannes.berg@intel.com>2020-05-31 11:27:05 +0200
commit2ad2274c58ee2dcaf9ccde5c63ff30f59b138f77 (patch)
treec691d86de0575b1b1a43d7c382f6ce524e6570b4 /include/net/cfg80211.h
parent1bb9a8a4c81d0305c511a0919cd30ebfa91915ae (diff)
mac80211: Add HE 6GHz capabilities element to probe request
On 6 GHz, the 6 GHz capabilities element should be added, do that. Signed-off-by: Ilan Peer <ilan.peer@intel.com> [add commit message] Link: https://lore.kernel.org/r/20200528213443.8ee764f0cde0.I2b0c66b60e11818c97c9803e04a6a197c6376243@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r--include/net/cfg80211.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 9b76be3d561a..95b55eea2afb 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -513,6 +513,26 @@ ieee80211_get_he_sta_cap(const struct ieee80211_supported_band *sband)
}
/**
+ * ieee80211_get_he_6ghz_capa - return HE 6 GHz capabilities
+ * @sband: the sband to search for the STA on
+ * @iftype: the iftype to search for
+ *
+ * Return: the 6GHz capabilities
+ */
+static inline __le16
+ieee80211_get_he_6ghz_capa(const struct ieee80211_supported_band *sband,
+ enum nl80211_iftype iftype)
+{
+ const struct ieee80211_sband_iftype_data *data =
+ ieee80211_get_sband_iftype_data(sband, iftype);
+
+ if (WARN_ON(!data || !data->he_cap.has_he))
+ return 0;
+
+ return data->he_6ghz_capa.capa;
+}
+
+/**
* wiphy_read_of_freq_limits - read frequency limits from device tree
*
* @wiphy: the wireless device to get extra limits for