Commit 36817294 authored by Sara Sharon's avatar Sara Sharon Committed by Kalle Valo
Browse files

iwlwifi: pcie: lock txq a bit later in reclaim code



In reclaim code, we don't need to take the queue lock for
waking the queue. The code section is executed only when
the tx path is stopped, and since the reclaim path is not
executed in parallel to itself, no one can update the queue
pointers, and accessing them is safe without a lock.

Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 83eabf1e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1160,10 +1160,11 @@ void iwl_trans_pcie_reclaim(struct iwl_trans *trans, int txq_id, int ssn,
			 */
			iwl_trans_tx(trans, skb, dev_cmd_ptr, txq_id);
		}
		spin_lock_bh(&txq->lock);

		if (iwl_queue_space(trans, txq) > txq->low_mark)
			iwl_wake_queue(trans, txq);

		spin_lock_bh(&txq->lock);
	}

	if (txq->read_ptr == txq->write_ptr) {