Blame SOURCES/0008-Revert-iwlwifi-mvm-support-rtt-confidence-indication.patch

deb259
From 1f462c5d0f105c46b47db26c8a44c37a5c1028f2 Mon Sep 17 00:00:00 2001
deb259
From: Eugene Syromiatnikov <esyr@redhat.com>
deb259
Date: Thu, 25 Jul 2019 13:52:10 +0200
deb259
Subject: [PATCH 2/7] Revert "iwlwifi: mvm: support rtt confidence indication"
deb259
deb259
This reverts commit 957a67c828e741ef7e09f69075edd3d5a6148e2c.
deb259
---
deb259
 .../net/wireless/intel/iwlwifi/fw/api/location.h   | 77 +---------------------
deb259
 .../net/wireless/intel/iwlwifi/mvm/ftm-initiator.c | 13 +---
deb259
 2 files changed, 3 insertions(+), 87 deletions(-)
deb259
deb259
diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/location.h b/drivers/net/wireless/intel/iwlwifi/fw/api/location.h
deb259
index 8d78b0e671c0..5dddb21c1c4d 100644
deb259
--- a/drivers/net/wireless/intel/iwlwifi/fw/api/location.h
deb259
+++ b/drivers/net/wireless/intel/iwlwifi/fw/api/location.h
deb259
@@ -675,59 +675,6 @@ struct iwl_tof_range_rsp_ap_entry_ntfy_v3 {
deb259
 } __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_3 */
deb259
 
deb259
 /**
deb259
- * struct iwl_tof_range_rsp_ap_entry_ntfy_v4 - AP parameters (response)
deb259
- * @bssid: BSSID of the AP
deb259
- * @measure_status: current APs measurement status, one of
deb259
- *	&enum iwl_tof_entry_status.
deb259
- * @measure_bw: Current AP Bandwidth: 0  20MHz, 1  40MHz, 2  80MHz
deb259
- * @rtt: The Round Trip Time that took for the last measurement for
deb259
- *	current AP [pSec]
deb259
- * @rtt_variance: The Variance of the RTT values measured for current AP
deb259
- * @rtt_spread: The Difference between the maximum and the minimum RTT
deb259
- *	values measured for current AP in the current session [pSec]
deb259
- * @rssi: RSSI as uploaded in the Channel Estimation notification
deb259
- * @rssi_spread: The Difference between the maximum and the minimum RSSI values
deb259
- *	measured for current AP in the current session
deb259
- * @last_burst: 1 if no more FTM sessions are scheduled for this responder
deb259
- * @refusal_period: refusal period in case of
deb259
- *	@IWL_TOF_ENTRY_RESPONDER_CANNOT_COLABORATE [sec]
deb259
- * @timestamp: The GP2 Clock [usec] where Channel Estimation notification was
deb259
- *	uploaded by the LMAC
deb259
- * @start_tsf: measurement start time in TSF of the mac specified in the range
deb259
- *	request
deb259
- * @rx_rate_n_flags: rate and flags of the last FTM frame received from this
deb259
- *	responder
deb259
- * @tx_rate_n_flags: rate and flags of the last ack sent to this responder
deb259
- * @t2t3_initiator: as calculated from the algo in the initiator
deb259
- * @t1t4_responder: as calculated from the algo in the responder
deb259
- * @common_calib: Calib val that was used in for this AP measurement
deb259
- * @specific_calib: val that was used in for this AP measurement
deb259
- * @papd_calib_output: The result of the tof papd calibration that was injected
deb259
- *	into the algorithm.
deb259
- */
deb259
-struct iwl_tof_range_rsp_ap_entry_ntfy_v4 {
deb259
-	u8 bssid[ETH_ALEN];
deb259
-	u8 measure_status;
deb259
-	u8 measure_bw;
deb259
-	__le32 rtt;
deb259
-	__le32 rtt_variance;
deb259
-	__le32 rtt_spread;
deb259
-	s8 rssi;
deb259
-	u8 rssi_spread;
deb259
-	u8 last_burst;
deb259
-	u8 refusal_period;
deb259
-	__le32 timestamp;
deb259
-	__le32 start_tsf;
deb259
-	__le32 rx_rate_n_flags;
deb259
-	__le32 tx_rate_n_flags;
deb259
-	__le32 t2t3_initiator;
deb259
-	__le32 t1t4_responder;
deb259
-	__le16 common_calib;
deb259
-	__le16 specific_calib;
deb259
-	__le32 papd_calib_output;
deb259
-} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_4 */
deb259
-
deb259
-/**
deb259
  * struct iwl_tof_range_rsp_ap_entry_ntfy - AP parameters (response)
deb259
  * @bssid: BSSID of the AP
deb259
  * @measure_status: current APs measurement status, one of
deb259
@@ -757,8 +704,6 @@ struct iwl_tof_range_rsp_ap_entry_ntfy_v4 {
deb259
  * @specific_calib: val that was used in for this AP measurement
deb259
  * @papd_calib_output: The result of the tof papd calibration that was injected
deb259
  *	into the algorithm.
deb259
- * @rttConfidence: a value between 0 - 31 that represents the rtt accuracy.
deb259
- * @reserved: for alignment
deb259
  */
deb259
 struct iwl_tof_range_rsp_ap_entry_ntfy {
deb259
 	u8 bssid[ETH_ALEN];
deb259
@@ -780,9 +725,7 @@ struct iwl_tof_range_rsp_ap_entry_ntfy {
deb259
 	__le16 common_calib;
deb259
 	__le16 specific_calib;
deb259
 	__le32 papd_calib_output;
deb259
-	u8 rttConfidence;
deb259
-	u8 reserved[3];
deb259
-} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_5 */
deb259
+} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_4 */
deb259
 
deb259
 /**
deb259
  * enum iwl_tof_response_status - tof response status
deb259
@@ -818,22 +761,6 @@ struct iwl_tof_range_rsp_ntfy_v5 {
deb259
 } __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_5 */
deb259
 
deb259
 /**
deb259
- * struct iwl_tof_range_rsp_ntfy_v6 - ranging response notification
deb259
- * @request_id: A Token ID of the corresponding Range request
deb259
- * @num_of_aps: Number of APs results
deb259
- * @last_report: 1 if no more FTM sessions are scheduled, 0 otherwise.
deb259
- * @reserved: reserved
deb259
- * @ap: per-AP data
deb259
- */
deb259
-struct iwl_tof_range_rsp_ntfy_v6 {
deb259
-	u8 request_id;
deb259
-	u8 num_of_aps;
deb259
-	u8 last_report;
deb259
-	u8 reserved;
deb259
-	struct iwl_tof_range_rsp_ap_entry_ntfy_v4 ap[IWL_MVM_TOF_MAX_APS];
deb259
-} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_6 */
deb259
-
deb259
-/**
deb259
  * struct iwl_tof_range_rsp_ntfy - ranging response notification
deb259
  * @request_id: A Token ID of the corresponding Range request
deb259
  * @num_of_aps: Number of APs results
deb259
@@ -847,7 +774,7 @@ struct iwl_tof_range_rsp_ntfy {
deb259
 	u8 last_report;
deb259
 	u8 reserved;
deb259
 	struct iwl_tof_range_rsp_ap_entry_ntfy ap[IWL_MVM_TOF_MAX_APS];
deb259
-} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_7 */
deb259
+} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_6 */
deb259
 
deb259
 #define IWL_MVM_TOF_MCSI_BUF_SIZE  (245)
deb259
 /**
deb259
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c
deb259
index b15a4db7198e..94132cfd1f56 100644
deb259
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c
deb259
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c
deb259
@@ -480,7 +480,6 @@ void iwl_mvm_ftm_range_resp(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
deb259
 {
deb259
 	struct iwl_rx_packet *pkt = rxb_addr(rxb);
deb259
 	struct iwl_tof_range_rsp_ntfy_v5 *fw_resp_v5 = (void *)pkt->data;
deb259
-	struct iwl_tof_range_rsp_ntfy_v6 *fw_resp_v6 = (void *)pkt->data;
deb259
 	struct iwl_tof_range_rsp_ntfy *fw_resp = (void *)pkt->data;
deb259
 	int i;
deb259
 	bool new_api = fw_has_api(&mvm->fw->ucode_capa,
deb259
@@ -520,12 +519,7 @@ void iwl_mvm_ftm_range_resp(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
deb259
 		int peer_idx;
deb259
 
deb259
 		if (new_api) {
deb259
-			if (fw_has_api(&mvm->fw->ucode_capa,
deb259
-				       IWL_UCODE_TLV_API_FTM_RTT_ACCURACY))
deb259
-				fw_ap = &fw_resp->ap[i];
deb259
-			else
deb259
-				fw_ap = (void *)&fw_resp_v6->ap[i];
deb259
-
deb259
+			fw_ap = &fw_resp->ap[i];
deb259
 			result.final = fw_resp->ap[i].last_burst;
deb259
 		} else {
deb259
 			/* the first part is the same for old and new APIs */
deb259
@@ -594,11 +588,6 @@ void iwl_mvm_ftm_range_resp(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
deb259
 				     mvm->ftm_initiator.req,
deb259
 				     &result, GFP_KERNEL);
deb259
 
deb259
-		if (fw_has_api(&mvm->fw->ucode_capa,
deb259
-			       IWL_UCODE_TLV_API_FTM_RTT_ACCURACY))
deb259
-			IWL_DEBUG_INFO(mvm, "RTT confidence: %hhu\n",
deb259
-				       fw_ap->rttConfidence);
deb259
-
deb259
 		iwl_mvm_debug_range_resp(mvm, i, &result);
deb259
 	}
deb259
 
deb259
-- 
deb259
2.13.6
deb259