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

Configure Feed

Select the types of activity you want to include in your feed.

wifi: nl80211/cfg80211: add new FTM capabilities

Add new capabilities to the PMSR FTM capabilities list. The new
capabilities include 6 GHz support, supported number of spatial streams
and supported number of LTF repetitions.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Tested-by: Miriam Rachel Korenblit <miriam.rachel.korenblit@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20260111190221.bf43785c18f6.Ic98cf9790ddee84bf88e5720b93c46c23af3c96c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

authored by

Avraham Stern and committed by
Johannes Berg
86c6b6e4 1e1dd9ee

+71 -1
+19 -1
include/net/cfg80211.h
··· 5643 5643 * not limited) 5644 5644 * @ftm.trigger_based: trigger based ranging measurement is supported 5645 5645 * @ftm.non_trigger_based: non trigger based ranging measurement is supported 5646 + * @ftm.support_6ghz: supports ranging in 6 GHz band 5647 + * @ftm.max_tx_ltf_rep: maximum number of TX LTF repetitions supported (0 means 5648 + * only one LTF, no repetitions) 5649 + * @ftm.max_rx_ltf_rep: maximum number of RX LTF repetitions supported (0 means 5650 + * only one LTF, no repetitions) 5651 + * @ftm.max_tx_sts: maximum number of TX STS supported (zero based) 5652 + * @ftm.max_rx_sts: maximum number of RX STS supported (zero based) 5653 + * @ftm.max_total_ltf_tx: maximum total number of LTFs that can be transmitted 5654 + * (0 means unknown) 5655 + * @ftm.max_total_ltf_rx: maximum total number of LTFs that can be received 5656 + * (0 means unknown) 5646 5657 */ 5647 5658 struct cfg80211_pmsr_capabilities { 5648 5659 unsigned int max_peers; ··· 5671 5660 request_lci:1, 5672 5661 request_civicloc:1, 5673 5662 trigger_based:1, 5674 - non_trigger_based:1; 5663 + non_trigger_based:1, 5664 + support_6ghz:1; 5665 + u8 max_tx_ltf_rep; 5666 + u8 max_rx_ltf_rep; 5667 + u8 max_tx_sts; 5668 + u8 max_rx_sts; 5669 + u8 max_total_ltf_tx; 5670 + u8 max_total_ltf_rx; 5675 5671 } ftm; 5676 5672 }; 5677 5673
+29
include/uapi/linux/nl80211.h
··· 7790 7790 * trigger based ranging measurement is supported 7791 7791 * @NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED: flag attribute indicating 7792 7792 * if non-trigger-based ranging measurement is supported 7793 + * @NL80211_PMSR_FTM_CAPA_ATTR_6GHZ_SUPPORT: flag attribute indicating if 7794 + * ranging on the 6 GHz band is supported 7795 + * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_LTF_REP: u32 attribute indicating 7796 + * the maximum number of LTF repetitions the device can transmit in the 7797 + * preamble of the ranging NDP (zero means only one LTF, no repetitions) 7798 + * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_LTF_REP: u32 attribute indicating 7799 + * the maximum number of LTF repetitions the device can receive in the 7800 + * preamble of the ranging NDP (zero means only one LTF, no repetitions) 7801 + * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_STS: u32 attribute indicating 7802 + * the maximum number of space-time streams supported for ranging NDP TX 7803 + * (zero-based) 7804 + * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_STS: u32 attribute indicating 7805 + * the maximum number of space-time streams supported for ranging NDP RX 7806 + * (zero-based) 7807 + * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_TX: u32 attribute indicating the 7808 + * maximum total number of LTFs the device can transmit. The total number 7809 + * of LTFs is (number of LTF repetitions) * (number of space-time streams). 7810 + * This limits the allowed combinations of LTF repetitions and STS. 7811 + * @NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_RX: u32 attribute indicating the 7812 + * maximum total number of LTFs the device can receive. The total number 7813 + * of LTFs is (number of LTF repetitions) * (number of space-time streams). 7814 + * This limits the allowed combinations of LTF repetitions and STS. 7793 7815 * 7794 7816 * @NUM_NL80211_PMSR_FTM_CAPA_ATTR: internal 7795 7817 * @NL80211_PMSR_FTM_CAPA_ATTR_MAX: highest attribute number ··· 7829 7807 NL80211_PMSR_FTM_CAPA_ATTR_MAX_FTMS_PER_BURST, 7830 7808 NL80211_PMSR_FTM_CAPA_ATTR_TRIGGER_BASED, 7831 7809 NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED, 7810 + NL80211_PMSR_FTM_CAPA_ATTR_6GHZ_SUPPORT, 7811 + NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_LTF_REP, 7812 + NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_LTF_REP, 7813 + NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_STS, 7814 + NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_STS, 7815 + NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_TX, 7816 + NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_RX, 7832 7817 7833 7818 /* keep last */ 7834 7819 NUM_NL80211_PMSR_FTM_CAPA_ATTR,
+23
net/wireless/nl80211.c
··· 2313 2313 if (cap->ftm.non_trigger_based && 2314 2314 nla_put_flag(msg, NL80211_PMSR_FTM_CAPA_ATTR_NON_TRIGGER_BASED)) 2315 2315 return -ENOBUFS; 2316 + if (cap->ftm.support_6ghz && 2317 + nla_put_flag(msg, NL80211_PMSR_FTM_CAPA_ATTR_6GHZ_SUPPORT)) 2318 + return -ENOBUFS; 2319 + if (nla_put_u32(msg, NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_LTF_REP, 2320 + cap->ftm.max_tx_ltf_rep)) 2321 + return -ENOBUFS; 2322 + if (nla_put_u32(msg, NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_LTF_REP, 2323 + cap->ftm.max_rx_ltf_rep)) 2324 + return -ENOBUFS; 2325 + if (nla_put_u32(msg, NL80211_PMSR_FTM_CAPA_ATTR_MAX_TX_STS, 2326 + cap->ftm.max_tx_sts)) 2327 + return -ENOBUFS; 2328 + if (nla_put_u32(msg, NL80211_PMSR_FTM_CAPA_ATTR_MAX_RX_STS, 2329 + cap->ftm.max_rx_sts)) 2330 + return -ENOBUFS; 2331 + if (cap->ftm.max_total_ltf_tx > 0 && 2332 + nla_put_u32(msg, NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_TX, 2333 + cap->ftm.max_total_ltf_tx)) 2334 + return -ENOBUFS; 2335 + if (cap->ftm.max_total_ltf_rx > 0 && 2336 + nla_put_u32(msg, NL80211_PMSR_FTM_CAPA_ATTR_MAX_TOTAL_LTF_RX, 2337 + cap->ftm.max_total_ltf_rx)) 2338 + return -ENOBUFS; 2316 2339 2317 2340 nla_nest_end(msg, ftm); 2318 2341 return 0;