lkml.org 
[lkml]   [2022]   [Jan]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.16 105/217] iwlwifi: mvm: avoid clearing a just saved session protection id
    Date
    From: Shaul Triebitz <shaul.triebitz@intel.com>

    [ Upstream commit 8e967c137df3b236d2075f9538cb888129425d1a ]

    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>
    Link: https://lore.kernel.org/r/iwlwifi.20211204130722.b0743a588d14.I098fef6677d0dab3ef1b6183ed206a10bab01eb2@changeid
    Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    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 e91f8e889df70..e6813317edf35 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.34.1
    \
     
     \ /
      Last update: 2022-01-18 03:27    [W:4.086 / U:0.172 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site