Commit 3ad61970 authored by Avraham Stern's avatar Avraham Stern Committed by Johannes Berg
Browse files

wifi: iwlwifi: mvm: fix setting the TK when associated



When running secured ranging and the initiator is associated with
the responder, the TK was not set in the range request command.
Fix it.

Signed-off-by: default avatarAvraham Stern <avraham.stern@intel.com>
Signed-off-by: default avatarMiri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250308231427.603dc31579d9.Icd19d797e56483c08dd22c55b96fee481c4d2f3d@changeid


Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c7f50d04
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -672,7 +672,11 @@ iwl_mvm_ftm_set_secured_ranging(struct iwl_mvm *mvm, struct ieee80211_vif *vif,

			target.bssid = bssid;
			target.cipher = cipher;
			target.tk = NULL;
			ieee80211_iter_keys(mvm->hw, vif, iter, &target);

			if (!WARN_ON(!target.tk))
				memcpy(tk, target.tk, TK_11AZ_LEN);
		} else {
			memcpy(tk, entry->tk, sizeof(entry->tk));
		}