summaryrefslogtreecommitdiffstats
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorAvraham Stern <avraham.stern@intel.com>2020-01-31 13:12:38 +0200
committerJohannes Berg <johannes.berg@intel.com>2020-03-20 14:42:19 +0100
commitefb5520d0e0039537a9da5a420e40afefa9a5dd5 (patch)
tree040a44d90d24bce02374494390644383b7e713ef /net/wireless/core.c
parent95247705c4fdb0057de6d9a98a094cf193d4885c (diff)
downloadlinux-efb5520d0e0039537a9da5a420e40afefa9a5dd5.tar.gz
linux-efb5520d0e0039537a9da5a420e40afefa9a5dd5.tar.bz2
linux-efb5520d0e0039537a9da5a420e40afefa9a5dd5.zip
nl80211/cfg80211: add support for non EDCA based ranging measurement
Add support for requesting that the ranging measurement will use the trigger-based / non trigger-based flow instead of the EDCA based flow. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/20200131111300.891737-2-luca@coelho.fi Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 3e25229a059d..341402b4f178 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -693,8 +693,14 @@ int wiphy_register(struct wiphy *wiphy)
~(BIT(NL80211_PREAMBLE_LEGACY) |
BIT(NL80211_PREAMBLE_HT) |
BIT(NL80211_PREAMBLE_VHT) |
+ BIT(NL80211_PREAMBLE_HE) |
BIT(NL80211_PREAMBLE_DMG))))
return -EINVAL;
+ if (WARN_ON((wiphy->pmsr_capa->ftm.trigger_based ||
+ wiphy->pmsr_capa->ftm.non_trigger_based) &&
+ !(wiphy->pmsr_capa->ftm.preambles &
+ BIT(NL80211_PREAMBLE_HE))))
+ return -EINVAL;
if (WARN_ON(wiphy->pmsr_capa->ftm.bandwidths &
~(BIT(NL80211_CHAN_WIDTH_20_NOHT) |
BIT(NL80211_CHAN_WIDTH_20) |