Skip to content

Commit 93a108d

Browse files
striebitgregkh
authored andcommitted
iwlwifi: mvm: avoid clearing a just saved session protection id
[ Upstream commit 8e967c1 ] 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 <[email protected]> Signed-off-by: Luca Coelho <[email protected]> Link: https://lore.kernel.org/r/iwlwifi.20211204130722.b0743a588d14.I098fef6677d0dab3ef1b6183ed206a10bab01eb2@changeid Signed-off-by: Luca Coelho <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent ec01e0f commit 93a108d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/net/wireless/intel/iwlwifi/mvm/time-event.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,15 +1166,10 @@ void iwl_mvm_schedule_session_protection(struct iwl_mvm *mvm,
11661166
cpu_to_le32(FW_CMD_ID_AND_COLOR(mvmvif->id,
11671167
mvmvif->color)),
11681168
.action = cpu_to_le32(FW_CTXT_ACTION_ADD),
1169+
.conf_id = cpu_to_le32(SESSION_PROTECT_CONF_ASSOC),
11691170
.duration_tu = cpu_to_le32(MSEC_TO_TU(duration)),
11701171
};
11711172

1172-
/* The time_event_data.id field is reused to save session
1173-
* protection's configuration.
1174-
*/
1175-
mvmvif->time_event_data.id = SESSION_PROTECT_CONF_ASSOC;
1176-
cmd.conf_id = cpu_to_le32(mvmvif->time_event_data.id);
1177-
11781173
lockdep_assert_held(&mvm->mutex);
11791174

11801175
spin_lock_bh(&mvm->time_event_lock);
@@ -1188,6 +1183,11 @@ void iwl_mvm_schedule_session_protection(struct iwl_mvm *mvm,
11881183
}
11891184

11901185
iwl_mvm_te_clear_data(mvm, te_data);
1186+
/*
1187+
* The time_event_data.id field is reused to save session
1188+
* protection's configuration.
1189+
*/
1190+
te_data->id = le32_to_cpu(cmd.conf_id);
11911191
te_data->duration = le32_to_cpu(cmd.duration_tu);
11921192
spin_unlock_bh(&mvm->time_event_lock);
11931193

0 commit comments

Comments
 (0)