@@ -552,15 +552,19 @@ struct iwl_tof_range_req_ap_entry_v4 {
552
552
* @IWL_LOCATION_CIPHER_CCMP_128: CCMP 128
553
553
* @IWL_LOCATION_CIPHER_GCMP_128: GCMP 128
554
554
* @IWL_LOCATION_CIPHER_GCMP_256: GCMP 256
555
+ * @IWL_LOCATION_CIPHER_INVALID: security is not used.
556
+ * @IWL_LOCATION_CIPHER_MAX: maximum value for this enum.
555
557
*/
556
558
enum iwl_location_cipher {
557
559
IWL_LOCATION_CIPHER_CCMP_128 ,
558
560
IWL_LOCATION_CIPHER_GCMP_128 ,
559
561
IWL_LOCATION_CIPHER_GCMP_256 ,
562
+ IWL_LOCATION_CIPHER_INVALID ,
563
+ IWL_LOCATION_CIPHER_MAX ,
560
564
};
561
565
562
566
/**
563
- * struct iwl_tof_range_req_ap_entry - AP configuration parameters
567
+ * struct iwl_tof_range_req_ap_entry_v6 - AP configuration parameters
564
568
* @initiator_ap_flags: see &enum iwl_initiator_ap_flags.
565
569
* @channel_num: AP Channel number
566
570
* @format_bw: bits 0 - 3: &enum iwl_location_frame_format.
@@ -588,7 +592,7 @@ enum iwl_location_cipher {
588
592
* @beacon_interval: beacon interval of the AP in TUs. Only required if
589
593
* &IWL_INITIATOR_AP_FLAGS_TB is set.
590
594
*/
591
- struct iwl_tof_range_req_ap_entry {
595
+ struct iwl_tof_range_req_ap_entry_v6 {
592
596
__le32 initiator_ap_flags ;
593
597
u8 channel_num ;
594
598
u8 format_bw ;
@@ -606,6 +610,61 @@ struct iwl_tof_range_req_ap_entry {
606
610
__le16 beacon_interval ;
607
611
} __packed ; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_6 */
608
612
613
+ /**
614
+ * struct iwl_tof_range_req_ap_entry_v7 - AP configuration parameters
615
+ * @initiator_ap_flags: see &enum iwl_initiator_ap_flags.
616
+ * @channel_num: AP Channel number
617
+ * @format_bw: bits 0 - 3: &enum iwl_location_frame_format.
618
+ * bits 4 - 7: &enum iwl_location_bw.
619
+ * @ctrl_ch_position: Coding of the control channel position relative to the
620
+ * center frequency, see iwl_mvm_get_ctrl_pos().
621
+ * @ftmr_max_retries: Max number of retries to send the FTMR in case of no
622
+ * reply from the AP.
623
+ * @bssid: AP's BSSID
624
+ * @burst_period: Recommended value to be sent to the AP. Measurement
625
+ * periodicity In units of 100ms. ignored if num_of_bursts_exp = 0
626
+ * @samples_per_burst: the number of FTMs pairs in single Burst (1-31);
627
+ * @num_of_bursts: Recommended value to be sent to the AP. 2s Exponent of
628
+ * the number of measurement iterations (min 2^0 = 1, max 2^14)
629
+ * @sta_id: the station id of the AP. Only relevant when associated to the AP,
630
+ * otherwise should be set to &IWL_MVM_INVALID_STA.
631
+ * @cipher: pairwise cipher suite for secured measurement.
632
+ * &enum iwl_location_cipher.
633
+ * @hltk: HLTK to be used for secured 11az measurement
634
+ * @tk: TK to be used for secured 11az measurement
635
+ * @calib: An array of calibration values per FTM rx bandwidth.
636
+ * If &IWL_INITIATOR_AP_FLAGS_USE_CALIB is set, the fw will use the
637
+ * calibration value that corresponds to the rx bandwidth of the FTM
638
+ * frame.
639
+ * @beacon_interval: beacon interval of the AP in TUs. Only required if
640
+ * &IWL_INITIATOR_AP_FLAGS_TB is set.
641
+ * @rx_pn: the next expected PN for protected management frames Rx. LE byte
642
+ * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id
643
+ * is set to &IWL_MVM_INVALID_STA.
644
+ * @tx_pn: the next PN to use for protected management frames Tx. LE byte
645
+ * order. Only valid if &IWL_INITIATOR_AP_FLAGS_SECURED is set and sta_id
646
+ * is set to &IWL_MVM_INVALID_STA.
647
+ */
648
+ struct iwl_tof_range_req_ap_entry_v7 {
649
+ __le32 initiator_ap_flags ;
650
+ u8 channel_num ;
651
+ u8 format_bw ;
652
+ u8 ctrl_ch_position ;
653
+ u8 ftmr_max_retries ;
654
+ u8 bssid [ETH_ALEN ];
655
+ __le16 burst_period ;
656
+ u8 samples_per_burst ;
657
+ u8 num_of_bursts ;
658
+ u8 sta_id ;
659
+ u8 cipher ;
660
+ u8 hltk [HLTK_11AZ_LEN ];
661
+ u8 tk [TK_11AZ_LEN ];
662
+ __le16 calib [IWL_TOF_BW_NUM ];
663
+ __le16 beacon_interval ;
664
+ u8 rx_pn [IEEE80211_CCMP_PN_LEN ];
665
+ u8 tx_pn [IEEE80211_CCMP_PN_LEN ];
666
+ } __packed ; /* LOCATION_RANGE_REQ_AP_ENTRY_CMD_API_S_VER_7 */
667
+
609
668
/**
610
669
* enum iwl_tof_response_mode
611
670
* @IWL_MVM_TOF_RESPONSE_ASAP: report each AP measurement separately as soon as
@@ -772,7 +831,7 @@ struct iwl_tof_range_req_cmd_v8 {
772
831
} __packed ; /* LOCATION_RANGE_REQ_CMD_API_S_VER_8 */
773
832
774
833
/**
775
- * struct iwl_tof_range_req_cmd - start measurement cmd
834
+ * struct iwl_tof_range_req_cmd_v9 - start measurement cmd
776
835
* @initiator_flags: see flags @ iwl_tof_initiator_flags
777
836
* @request_id: A Token incremented per request. The same Token will be
778
837
* sent back in the range response
@@ -787,7 +846,7 @@ struct iwl_tof_range_req_cmd_v8 {
787
846
* TSF of this mac id. 0xff to disable TSF reporting.
788
847
* @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2.
789
848
*/
790
- struct iwl_tof_range_req_cmd {
849
+ struct iwl_tof_range_req_cmd_v9 {
791
850
__le32 initiator_flags ;
792
851
u8 request_id ;
793
852
u8 num_of_ap ;
@@ -796,9 +855,37 @@ struct iwl_tof_range_req_cmd {
796
855
u8 macaddr_template [ETH_ALEN ];
797
856
__le32 req_timeout_ms ;
798
857
__le32 tsf_mac_id ;
799
- struct iwl_tof_range_req_ap_entry ap [IWL_MVM_TOF_MAX_APS ];
858
+ struct iwl_tof_range_req_ap_entry_v6 ap [IWL_MVM_TOF_MAX_APS ];
800
859
} __packed ; /* LOCATION_RANGE_REQ_CMD_API_S_VER_9 */
801
860
861
+ /**
862
+ * struct iwl_tof_range_req_cmd_v11 - start measurement cmd
863
+ * @initiator_flags: see flags @ iwl_tof_initiator_flags
864
+ * @request_id: A Token incremented per request. The same Token will be
865
+ * sent back in the range response
866
+ * @num_of_ap: Number of APs to measure (error if > IWL_MVM_TOF_MAX_APS)
867
+ * @range_req_bssid: ranging request BSSID
868
+ * @macaddr_mask: Bits set to 0 shall be copied from the MAC address template.
869
+ * Bits set to 1 shall be randomized by the UMAC
870
+ * @macaddr_template: MAC address template to use for non-randomized bits
871
+ * @req_timeout_ms: Requested timeout of the response in units of milliseconds.
872
+ * This is the session time for completing the measurement.
873
+ * @tsf_mac_id: report the measurement start time for each ap in terms of the
874
+ * TSF of this mac id. 0xff to disable TSF reporting.
875
+ * @ap: per-AP request data, see &struct iwl_tof_range_req_ap_entry_v2.
876
+ */
877
+ struct iwl_tof_range_req_cmd_v11 {
878
+ __le32 initiator_flags ;
879
+ u8 request_id ;
880
+ u8 num_of_ap ;
881
+ u8 range_req_bssid [ETH_ALEN ];
882
+ u8 macaddr_mask [ETH_ALEN ];
883
+ u8 macaddr_template [ETH_ALEN ];
884
+ __le32 req_timeout_ms ;
885
+ __le32 tsf_mac_id ;
886
+ struct iwl_tof_range_req_ap_entry_v7 ap [IWL_MVM_TOF_MAX_APS ];
887
+ } __packed ; /* LOCATION_RANGE_REQ_CMD_API_S_VER_11 */
888
+
802
889
/*
803
890
* enum iwl_tof_range_request_status - status of the sent request
804
891
* @IWL_TOF_RANGE_REQUEST_STATUS_SUCCESSFUL - FW successfully received the
@@ -960,7 +1047,7 @@ struct iwl_tof_range_rsp_ap_entry_ntfy_v4 {
960
1047
} __packed ; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_4 */
961
1048
962
1049
/**
963
- * struct iwl_tof_range_rsp_ap_entry_ntfy - AP parameters (response)
1050
+ * struct iwl_tof_range_rsp_ap_entry_ntfy_v5 - AP parameters (response)
964
1051
* @bssid: BSSID of the AP
965
1052
* @measure_status: current APs measurement status, one of
966
1053
* &enum iwl_tof_entry_status.
@@ -992,7 +1079,7 @@ struct iwl_tof_range_rsp_ap_entry_ntfy_v4 {
992
1079
* @rttConfidence: a value between 0 - 31 that represents the rtt accuracy.
993
1080
* @reserved: for alignment
994
1081
*/
995
- struct iwl_tof_range_rsp_ap_entry_ntfy {
1082
+ struct iwl_tof_range_rsp_ap_entry_ntfy_v5 {
996
1083
u8 bssid [ETH_ALEN ];
997
1084
u8 measure_status ;
998
1085
u8 measure_bw ;
@@ -1016,6 +1103,69 @@ struct iwl_tof_range_rsp_ap_entry_ntfy {
1016
1103
u8 reserved [3 ];
1017
1104
} __packed ; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_5 */
1018
1105
1106
+ /**
1107
+ * struct iwl_tof_range_rsp_ap_entry_ntfy_v6 - AP parameters (response)
1108
+ * @bssid: BSSID of the AP
1109
+ * @measure_status: current APs measurement status, one of
1110
+ * &enum iwl_tof_entry_status.
1111
+ * @measure_bw: Current AP Bandwidth: 0 20MHz, 1 40MHz, 2 80MHz
1112
+ * @rtt: The Round Trip Time that took for the last measurement for
1113
+ * current AP [pSec]
1114
+ * @rtt_variance: The Variance of the RTT values measured for current AP
1115
+ * @rtt_spread: The Difference between the maximum and the minimum RTT
1116
+ * values measured for current AP in the current session [pSec]
1117
+ * @rssi: RSSI as uploaded in the Channel Estimation notification
1118
+ * @rssi_spread: The Difference between the maximum and the minimum RSSI values
1119
+ * measured for current AP in the current session
1120
+ * @last_burst: 1 if no more FTM sessions are scheduled for this responder
1121
+ * @refusal_period: refusal period in case of
1122
+ * @IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec]
1123
+ * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was
1124
+ * uploaded by the LMAC
1125
+ * @start_tsf: measurement start time in TSF of the mac specified in the range
1126
+ * request
1127
+ * @rx_rate_n_flags: rate and flags of the last FTM frame received from this
1128
+ * responder
1129
+ * @tx_rate_n_flags: rate and flags of the last ack sent to this responder
1130
+ * @t2t3_initiator: as calculated from the algo in the initiator
1131
+ * @t1t4_responder: as calculated from the algo in the responder
1132
+ * @common_calib: Calib val that was used in for this AP measurement
1133
+ * @specific_calib: val that was used in for this AP measurement
1134
+ * @papd_calib_output: The result of the tof papd calibration that was injected
1135
+ * into the algorithm.
1136
+ * @rttConfidence: a value between 0 - 31 that represents the rtt accuracy.
1137
+ * @reserved: for alignment
1138
+ * @rx_pn: the last PN used for this responder Rx in case PMF is configured in
1139
+ * LE byte order.
1140
+ * @tx_pn: the last PN used for this responder Tx in case PMF is configured in
1141
+ * LE byte order.
1142
+ */
1143
+ struct iwl_tof_range_rsp_ap_entry_ntfy_v6 {
1144
+ u8 bssid [ETH_ALEN ];
1145
+ u8 measure_status ;
1146
+ u8 measure_bw ;
1147
+ __le32 rtt ;
1148
+ __le32 rtt_variance ;
1149
+ __le32 rtt_spread ;
1150
+ s8 rssi ;
1151
+ u8 rssi_spread ;
1152
+ u8 last_burst ;
1153
+ u8 refusal_period ;
1154
+ __le32 timestamp ;
1155
+ __le32 start_tsf ;
1156
+ __le32 rx_rate_n_flags ;
1157
+ __le32 tx_rate_n_flags ;
1158
+ __le32 t2t3_initiator ;
1159
+ __le32 t1t4_responder ;
1160
+ __le16 common_calib ;
1161
+ __le16 specific_calib ;
1162
+ __le32 papd_calib_output ;
1163
+ u8 rttConfidence ;
1164
+ u8 reserved [3 ];
1165
+ u8 rx_pn [IEEE80211_CCMP_PN_LEN ];
1166
+ u8 tx_pn [IEEE80211_CCMP_PN_LEN ];
1167
+ } __packed ; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_6 */
1168
+
1019
1169
/**
1020
1170
* enum iwl_tof_response_status - tof response status
1021
1171
*
@@ -1066,21 +1216,37 @@ struct iwl_tof_range_rsp_ntfy_v6 {
1066
1216
} __packed ; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_6 */
1067
1217
1068
1218
/**
1069
- * struct iwl_tof_range_rsp_ntfy - ranging response notification
1219
+ * struct iwl_tof_range_rsp_ntfy_v7 - ranging response notification
1070
1220
* @request_id: A Token ID of the corresponding Range request
1071
1221
* @num_of_aps: Number of APs results
1072
1222
* @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise.
1073
1223
* @reserved: reserved
1074
1224
* @ap: per-AP data
1075
1225
*/
1076
- struct iwl_tof_range_rsp_ntfy {
1226
+ struct iwl_tof_range_rsp_ntfy_v7 {
1077
1227
u8 request_id ;
1078
1228
u8 num_of_aps ;
1079
1229
u8 last_report ;
1080
1230
u8 reserved ;
1081
- struct iwl_tof_range_rsp_ap_entry_ntfy ap [IWL_MVM_TOF_MAX_APS ];
1231
+ struct iwl_tof_range_rsp_ap_entry_ntfy_v5 ap [IWL_MVM_TOF_MAX_APS ];
1082
1232
} __packed ; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_7 */
1083
1233
1234
+ /**
1235
+ * struct iwl_tof_range_rsp_ntfy_v8 - ranging response notification
1236
+ * @request_id: A Token ID of the corresponding Range request
1237
+ * @num_of_aps: Number of APs results
1238
+ * @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise.
1239
+ * @reserved: reserved
1240
+ * @ap: per-AP data
1241
+ */
1242
+ struct iwl_tof_range_rsp_ntfy_v8 {
1243
+ u8 request_id ;
1244
+ u8 num_of_aps ;
1245
+ u8 last_report ;
1246
+ u8 reserved ;
1247
+ struct iwl_tof_range_rsp_ap_entry_ntfy_v6 ap [IWL_MVM_TOF_MAX_APS ];
1248
+ } __packed ; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_8 */
1249
+
1084
1250
#define IWL_MVM_TOF_MCSI_BUF_SIZE (245)
1085
1251
/**
1086
1252
* struct iwl_tof_mcsi_notif - used for debug
0 commit comments