Lines Matching full:ftm

20 	if (!(rdev->wiphy.pmsr_capa->ftm.bandwidths & BIT(out->chandef.width))) {  in pmsr_parse_ftm()
21 NL_SET_ERR_MSG(info->extack, "FTM: unsupported bandwidth"); in pmsr_parse_ftm()
33 out->ftm.requested = true; in pmsr_parse_ftm()
42 "FTM: must specify preamble"); in pmsr_parse_ftm()
47 if (!(capa->ftm.preambles & BIT(preamble))) { in pmsr_parse_ftm()
50 "FTM: invalid preamble"); in pmsr_parse_ftm()
54 out->ftm.preamble = preamble; in pmsr_parse_ftm()
56 out->ftm.burst_period = 0; in pmsr_parse_ftm()
58 out->ftm.burst_period = in pmsr_parse_ftm()
61 out->ftm.asap = !!tb[NL80211_PMSR_FTM_REQ_ATTR_ASAP]; in pmsr_parse_ftm()
62 if (out->ftm.asap && !capa->ftm.asap) { in pmsr_parse_ftm()
65 "FTM: ASAP mode not supported"); in pmsr_parse_ftm()
69 if (!out->ftm.asap && !capa->ftm.non_asap) { in pmsr_parse_ftm()
71 "FTM: non-ASAP mode not supported"); in pmsr_parse_ftm()
75 out->ftm.num_bursts_exp = 0; in pmsr_parse_ftm()
77 out->ftm.num_bursts_exp = in pmsr_parse_ftm()
80 if (capa->ftm.max_bursts_exponent >= 0 && in pmsr_parse_ftm()
81 out->ftm.num_bursts_exp > capa->ftm.max_bursts_exponent) { in pmsr_parse_ftm()
84 "FTM: max NUM_BURSTS_EXP must be set lower than the device limit"); in pmsr_parse_ftm()
88 out->ftm.burst_duration = 15; in pmsr_parse_ftm()
90 out->ftm.burst_duration = in pmsr_parse_ftm()
93 out->ftm.ftms_per_burst = 0; in pmsr_parse_ftm()
95 out->ftm.ftms_per_burst = in pmsr_parse_ftm()
98 if (capa->ftm.max_ftms_per_burst && in pmsr_parse_ftm()
99 (out->ftm.ftms_per_burst > capa->ftm.max_ftms_per_burst || in pmsr_parse_ftm()
100 out->ftm.ftms_per_burst == 0)) { in pmsr_parse_ftm()
103 "FTM: FTMs per burst must be set lower than the device limit but non-zero"); in pmsr_parse_ftm()
107 out->ftm.ftmr_retries = 3; in pmsr_parse_ftm()
109 out->ftm.ftmr_retries = in pmsr_parse_ftm()
112 out->ftm.request_lci = !!tb[NL80211_PMSR_FTM_REQ_ATTR_REQUEST_LCI]; in pmsr_parse_ftm()
113 if (out->ftm.request_lci && !capa->ftm.request_lci) { in pmsr_parse_ftm()
116 "FTM: LCI request not supported"); in pmsr_parse_ftm()
119 out->ftm.request_civicloc = in pmsr_parse_ftm()
121 if (out->ftm.request_civicloc && !capa->ftm.request_civicloc) { in pmsr_parse_ftm()
124 "FTM: civic location request not supported"); in pmsr_parse_ftm()
127 out->ftm.trigger_based = in pmsr_parse_ftm()
129 if (out->ftm.trigger_based && !capa->ftm.trigger_based) { in pmsr_parse_ftm()
132 "FTM: trigger based ranging is not supported"); in pmsr_parse_ftm()
136 out->ftm.non_trigger_based = in pmsr_parse_ftm()
138 if (out->ftm.non_trigger_based && !capa->ftm.non_trigger_based) { in pmsr_parse_ftm()
141 "FTM: trigger based ranging is not supported"); in pmsr_parse_ftm()
145 if (out->ftm.trigger_based && out->ftm.non_trigger_based) { in pmsr_parse_ftm()
147 "FTM: can't set both trigger based and non trigger based"); in pmsr_parse_ftm()
151 if (out->ftm.ftms_per_burst > 31 && !out->ftm.non_trigger_based && in pmsr_parse_ftm()
152 !out->ftm.trigger_based) { in pmsr_parse_ftm()
155 "FTM: FTMs per burst must be set lower than 31"); in pmsr_parse_ftm()
159 if ((out->ftm.trigger_based || out->ftm.non_trigger_based) && in pmsr_parse_ftm()
160 out->ftm.preamble != NL80211_PREAMBLE_HE) { in pmsr_parse_ftm()
163 "FTM: non EDCA based ranging must use HE preamble"); in pmsr_parse_ftm()
167 out->ftm.lmr_feedback = in pmsr_parse_ftm()
169 if (!out->ftm.trigger_based && !out->ftm.non_trigger_based && in pmsr_parse_ftm()
170 out->ftm.lmr_feedback) { in pmsr_parse_ftm()
173 "FTM: LMR feedback set for EDCA based ranging"); in pmsr_parse_ftm()
178 if (!out->ftm.non_trigger_based && !out->ftm.trigger_based) { in pmsr_parse_ftm()
181 "FTM: BSS color set for EDCA based ranging"); in pmsr_parse_ftm()
185 out->ftm.bss_color = in pmsr_parse_ftm()
407 res->ftm.failure_reason)) in nl80211_pmsr_send_ftm_res()
410 if (res->ftm.failure_reason == in nl80211_pmsr_send_ftm_res()
412 res->ftm.busy_retry_time && in nl80211_pmsr_send_ftm_res()
414 res->ftm.busy_retry_time)) in nl80211_pmsr_send_ftm_res()
424 res->ftm.val)) \ in nl80211_pmsr_send_ftm_res()
430 if (res->ftm.val##_valid) \ in nl80211_pmsr_send_ftm_res()
438 res->ftm.val, \ in nl80211_pmsr_send_ftm_res()
445 if (res->ftm.val##_valid) \ in nl80211_pmsr_send_ftm_res()
449 if (res->ftm.burst_index >= 0) in nl80211_pmsr_send_ftm_res()
458 if (res->ftm.tx_rate_valid && in nl80211_pmsr_send_ftm_res()
459 !nl80211_put_sta_rate(msg, &res->ftm.tx_rate, in nl80211_pmsr_send_ftm_res()
462 if (res->ftm.rx_rate_valid && in nl80211_pmsr_send_ftm_res()
463 !nl80211_put_sta_rate(msg, &res->ftm.rx_rate, in nl80211_pmsr_send_ftm_res()
472 if (res->ftm.lci && res->ftm.lci_len && in nl80211_pmsr_send_ftm_res()
474 res->ftm.lci_len, res->ftm.lci)) in nl80211_pmsr_send_ftm_res()
476 if (res->ftm.civicloc && res->ftm.civicloc_len && in nl80211_pmsr_send_ftm_res()
478 res->ftm.civicloc_len, res->ftm.civicloc)) in nl80211_pmsr_send_ftm_res()