mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-12 20:05:06 +07:00
iwlwifi: mvm: reconfigure queues during inactivity check
We currently reconfigure the queues after the inactivity check, but only in one of the two callers. This might leave queues in a state where the TID owner is wrong, if called when reserving a queue for a new station. Clean this up and do the reconfiguration inside the inactivity check function. This requires changing the locking, but one of the two places already holds the mvm mutex and the other easily can. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
b342228d6b
commit
df2a2245db
@ -1383,6 +1383,8 @@ static void iwl_mvm_inactivity_check(struct iwl_mvm *mvm)
|
||||
unsigned long now = jiffies;
|
||||
int i;
|
||||
|
||||
lockdep_assert_held(&mvm->mutex);
|
||||
|
||||
if (iwl_mvm_has_new_tx_api(mvm))
|
||||
return;
|
||||
|
||||
@ -1461,6 +1463,10 @@ static void iwl_mvm_inactivity_check(struct iwl_mvm *mvm)
|
||||
|
||||
rcu_read_unlock();
|
||||
spin_unlock_bh(&mvm->queue_info_lock);
|
||||
|
||||
/* Reconfigure queues requiring reconfiguation */
|
||||
for (i = 0; i < ARRAY_SIZE(mvm->queue_info); i++)
|
||||
iwl_mvm_reconfigure_queue(mvm, i);
|
||||
}
|
||||
|
||||
static inline u8 iwl_mvm_tid_to_ac_queue(int tid)
|
||||
@ -1533,19 +1539,9 @@ void iwl_mvm_add_new_dqa_stream_wk(struct work_struct *wk)
|
||||
unsigned long deferred_tid_traffic;
|
||||
int sta_id, tid;
|
||||
|
||||
/* Check inactivity of queues */
|
||||
iwl_mvm_inactivity_check(mvm);
|
||||
|
||||
mutex_lock(&mvm->mutex);
|
||||
|
||||
/* No queue reconfiguration in TVQM mode */
|
||||
if (!iwl_mvm_has_new_tx_api(mvm)) {
|
||||
int queue;
|
||||
|
||||
/* Reconfigure queues requiring reconfiguation */
|
||||
for (queue = 0; queue < ARRAY_SIZE(mvm->queue_info); queue++)
|
||||
iwl_mvm_reconfigure_queue(mvm, queue);
|
||||
}
|
||||
iwl_mvm_inactivity_check(mvm);
|
||||
|
||||
/* Go over all stations with deferred traffic */
|
||||
for_each_set_bit(sta_id, mvm->sta_deferred_frames,
|
||||
|
Loading…
Reference in New Issue
Block a user