Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Avraham Stern and committed by
Johannes Berg
f737b704 91b193d5

+10 -3
+1 -2
net/wireless/nl80211.c
··· 315 315 [NL80211_PMSR_FTM_REQ_ATTR_BURST_PERIOD] = { .type = NLA_U16 }, 316 316 [NL80211_PMSR_FTM_REQ_ATTR_BURST_DURATION] = 317 317 NLA_POLICY_MAX(NLA_U8, 15), 318 - [NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST] = 319 - NLA_POLICY_MAX(NLA_U8, 31), 318 + [NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST] = { .type = NLA_U8 }, 320 319 [NL80211_PMSR_FTM_REQ_ATTR_NUM_FTMR_RETRIES] = { .type = NLA_U8 }, 321 320 [NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI] = { .type = NLA_FLAG }, 322 321 [NL80211_PMSR_FTM_REQ_ATTR_REQUEST_CIVICLOC] = { .type = NLA_FLAG },
+9 -1
net/wireless/pmsr.c
··· 1 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 2 /* 3 - * Copyright (C) 2018 - 2021, 2023 Intel Corporation 3 + * Copyright (C) 2018 - 2021, 2023 - 2024 Intel Corporation 4 4 */ 5 5 #include <net/cfg80211.h> 6 6 #include "core.h" ··· 146 146 NL_SET_ERR_MSG(info->extack, 147 147 "FTM: can't set both trigger based and non trigger based"); 148 148 return -EINVAL; 149 + } 150 + 151 + if (out->ftm.ftms_per_burst > 31 && !out->ftm.non_trigger_based && 152 + !out->ftm.trigger_based) { 153 + NL_SET_ERR_MSG_ATTR(info->extack, 154 + tb[NL80211_PMSR_FTM_REQ_ATTR_FTMS_PER_BURST], 155 + "FTM: FTMs per burst must be set lower than 31"); 156 + return -ERANGE; 149 157 } 150 158 151 159 if ((out->ftm.trigger_based || out->ftm.non_trigger_based) &&