All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luca Coelho <luca@coelho.fi>
To: kvalo@codeaurora.org
Cc: luca@coelho.fi, linux-wireless@vger.kernel.org
Subject: [PATCH 06/12] iwlwifi: mvm: avoid clearing a just saved session protection id
Date: Sat,  4 Dec 2021 13:10:47 +0200	[thread overview]
Message-ID: <iwlwifi.20211204130722.b0743a588d14.I098fef6677d0dab3ef1b6183ed206a10bab01eb2@changeid> (raw)
In-Reply-To: <20211204111053.852455-1-luca@coelho.fi>

From: Shaul Triebitz <shaul.triebitz@intel.com>

When scheduling a session protection the id is saved but
then it may be cleared when calling iwl_mvm_te_clear_data
(if a previous session protection is currently active).
Fix it by saving the id after calling iwl_mvm_te_clear_data.

Signed-off-by: Shaul Triebitz <shaul.triebitz@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
---
 drivers/net/wireless/intel/iwlwifi/mvm/time-event.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
index e91f8e889df7..e6813317edf3 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c
@@ -1158,15 +1158,10 @@ void iwl_mvm_schedule_session_protection(struct iwl_mvm *mvm,
 			cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id,
 							mvmvif->color)),
 		.action = cpu_to_le32(FW_CTXT_ACTION_ADD),
+		.conf_id = cpu_to_le32(SESSION_PROTECT_CONF_ASSOC),
 		.duration_tu = cpu_to_le32(MSEC_TO_TU(duration)),
 	};
 
-	/* The time_event_data.id field is reused to save session
-	 * protection's configuration.
-	 */
-	mvmvif->time_event_data.id = SESSION_PROTECT_CONF_ASSOC;
-	cmd.conf_id = cpu_to_le32(mvmvif->time_event_data.id);
-
 	lockdep_assert_held(&mvm->mutex);
 
 	spin_lock_bh(&mvm->time_event_lock);
@@ -1180,6 +1175,11 @@ void iwl_mvm_schedule_session_protection(struct iwl_mvm *mvm,
 	}
 
 	iwl_mvm_te_clear_data(mvm, te_data);
+	/*
+	 * The time_event_data.id field is reused to save session
+	 * protection's configuration.
+	 */
+	te_data->id = le32_to_cpu(cmd.conf_id);
 	te_data->duration = le32_to_cpu(cmd.duration_tu);
 	te_data->vif = vif;
 	spin_unlock_bh(&mvm->time_event_lock);
-- 
2.33.1


  parent reply	other threads:[~2021-12-04 11:11 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04 11:10 [PATCH 00/12] iwlwifi: updates intended for v5.16 2021-12-04 part 2 Luca Coelho
2021-12-04 11:10 ` [PATCH 01/12] iwlwifi: mvm: remove session protection upon station removal Luca Coelho
2021-12-04 11:10 ` [PATCH 02/12] iwlwifi: add missing entries for Gf4 with So and SoF Luca Coelho
2021-12-04 11:10 ` [PATCH 03/12] iwlwifi: mvm: Fix wrong documentation for scan request command Luca Coelho
2021-12-04 11:10 ` [PATCH 04/12] iwlwifi: mvm: Add support for a new version of " Luca Coelho
2021-12-04 11:10 ` [PATCH 05/12] iwlwifi: mvm: add support for statistics update version 15 Luca Coelho
2021-12-04 11:10 ` Luca Coelho [this message]
2021-12-04 11:10 ` [PATCH 07/12] iwlwifi: mvm: update rate scale in moving back to assoc state Luca Coelho
2021-12-04 11:10 ` [PATCH 08/12] iwlwifi: yoyo: support for DBGC4 for dram Luca Coelho
2021-12-04 11:10 ` [PATCH 09/12] iwlwifi: acpi: fix wgds rev 3 size Luca Coelho
2021-12-04 11:10 ` [PATCH 10/12] iwlwifi: swap 1650i and 1650s killer struct names Luca Coelho
2021-12-04 11:10 ` [PATCH 11/12] iwlwifi: fw: add support for splitting region type bits Luca Coelho
2021-12-04 11:10 ` [PATCH 12/12] iwlwifi: mvm: add some missing command strings Luca Coelho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=iwlwifi.20211204130722.b0743a588d14.I098fef6677d0dab3ef1b6183ed206a10bab01eb2@changeid \
    --to=luca@coelho.fi \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.