wifi: iwlwifi: mvm: support new initiator and responder command version
authorAvraham Stern <avraham.stern@intel.com>
Mon, 28 Oct 2024 11:54:52 +0000 (13:54 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 7 Nov 2024 13:42:29 +0000 (14:42 +0100)
Add support for range_request_cmd version 15. This version adds a
testing option flag to use bad secure LTF Tx key. The command struct
itself is not changed.
Add support for responder config command version 11. This version only
adds a flag which is part of the MVM_FTM_RESP_FLAGS and does not
require any special handling.

Signed-off-by: Avraham Stern <avraham.stern@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20241028135215.264826832f16.Iad4fdcd177a9c4bcb0839d3f87c793b4f83eb2c7@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/intel/iwlwifi/fw/api/location.h
drivers/net/wireless/intel/iwlwifi/mvm/ftm-initiator.c
drivers/net/wireless/intel/iwlwifi/mvm/ftm-responder.c

index 30a54c7fa0016a99608bd8b0fccb6b23368fe8ae..15aab3bbb7e930904076aba6a0f375d6984142c5 100644 (file)
@@ -616,6 +616,9 @@ struct iwl_tof_range_req_ap_entry_v2 {
  *     continue with the session and will provide the LMR feedback.
  * @IWL_INITIATOR_AP_FLAGS_TEST_INCORRECT_SAC: send an incorrect SAC in the
  *     first NDP exchange. This is used for testing.
+ * @IWL_INITIATOR_AP_FLAGS_TEST_BAD_SLTF: use incorrect secure LTF tx key. This
+ *     is used for testing. Only supported from version 15 of the range request
+ *     command.
  */
 enum iwl_initiator_ap_flags {
        IWL_INITIATOR_AP_FLAGS_ASAP = BIT(1),
@@ -633,6 +636,7 @@ enum iwl_initiator_ap_flags {
        IWL_INITIATOR_AP_FLAGS_PMF = BIT(14),
        IWL_INITIATOR_AP_FLAGS_TERMINATE_ON_LMR_FEEDBACK = BIT(15),
        IWL_INITIATOR_AP_FLAGS_TEST_INCORRECT_SAC = BIT(16),
+       IWL_INITIATOR_AP_FLAGS_TEST_BAD_SLTF = BIT(17),
 };
 
 /**
index 55245f913286b9d3bb2a66eb1303c70be0808f72..77cfad6707f81355713b1f36d50835ccf3f166d6 100644 (file)
@@ -1063,6 +1063,8 @@ int iwl_mvm_ftm_start(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
                                                   IWL_FW_CMD_VER_UNKNOWN);
 
                switch (cmd_ver) {
+               case 15:
+                       /* Version 15 has the same struct as 14 */
                case 14:
                        err = iwl_mvm_ftm_start_v14(mvm, vif, req);
                        break;
index e4caa362f597b0053b910400abf68111d1ac1426..e6e468e81ab3a3fde7639aec242c991d0521a238 100644 (file)
@@ -131,7 +131,7 @@ iwl_mvm_ftm_responder_cmd(struct iwl_mvm *mvm,
 
        lockdep_assert_held(&mvm->mutex);
 
-       if (cmd_ver == 10) {
+       if (cmd_ver >= 10) {
                cmd.band =
                        iwl_mvm_phy_band_from_nl80211(chandef->chan->band);
        }