diff options
author | Avraham Stern <avraham.stern@intel.com> | 2024-06-05 12:57:16 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2024-06-12 13:04:25 +0200 |
commit | f737b70434f332042fcbe37f85ee3ee424959403 (patch) | |
tree | 7b5b2614a8af931e0735719125c9625eeb89f1a0 /net/wireless/pmsr.c | |
parent | wifi: cfg80211: reject non-conformant 6 GHz center frequencies (diff) | |
download | linux-f737b70434f332042fcbe37f85ee3ee424959403.tar.xz linux-f737b70434f332042fcbe37f85ee3ee424959403.zip |
wifi: nl80211: remove the FTMs per burst limit for NDP ranging
In NDP ranging, the number of NDP exchanges is not negotiated
and thus is not limited by the protocol. Remove the limit on
FTMs per burst for trigger based and non trigger based ranging.
Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240605135233.916e228537d9.I5fe4c1cefa1c1328726e7615dd5a0d861c694381@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/pmsr.c')
-rw-r--r-- | net/wireless/pmsr.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/net/wireless/pmsr.c b/net/wireless/pmsr.c index c569c37da317..0396fa19bdf1 100644 --- a/net/wireless/pmsr.c +++ b/net/wireless/pmsr.c @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ /* - * Copyright (C) 2018 - 2021, 2023 Intel Corporation + * Copyright (C) 2018 - 2021, 2023 - 2024 Intel Corporation */ #include <net/cfg80211.h> #include "core.h" @@ -148,6 +148,14 @@ static int pmsr_parse_ftm(struct cfg80211_registered_device *rdev, return -EINVAL; } + if (out->ftm.ftms_per_burst > 31 && !out->ftm.non_trigger_based && + !out->ftm.trigger_based) { + NL_SET_ERR_MSG_ATTR(info->extack, + tb[NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST], + "FTM: FTMs per burst must be set lower than 31"); + return -ERANGE; + } + if ((out->ftm.trigger_based || out->ftm.non_trigger_based) && out->ftm.preamble != NL80211_PREAMBLE_HE) { NL_SET_ERR_MSG_ATTR(info->extack, |