aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
diff options
context:
space:
mode:
authorJohannes Berg <[email protected]>2023-03-17 09:53:24 +0000
committerJohannes Berg <[email protected]>2023-03-22 12:14:18 +0000
commitb58e3d4311b54b6dd0e37165277965da0c9eb21d (patch)
treedc31bfe22ea178a80669930d23d2ae2eca34feda /drivers/net/wireless/intel/iwlwifi/mvm/ops.c
parentwifi: mac80211: Serialize ieee80211_handle_wake_tx_queue() (diff)
downloadkernel-b58e3d4311b54b6dd0e37165277965da0c9eb21d.tar.gz
kernel-b58e3d4311b54b6dd0e37165277965da0c9eb21d.zip
wifi: iwlwifi: mvm: fix mvmtxq->stopped handling
This could race if the queue is redirected while full, then the flushing internally would start it while it's not yet usable again. Fix it by using two state bits instead of just one. Reviewed-by: Benjamin Berg <[email protected]> Tested-by: Jose Ignacio Tornos Martinez <[email protected]> Signed-off-by: Johannes Berg <[email protected]>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/ops.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/ops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
index f4e9446d9dc2..efad8f92d132 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c
@@ -1691,7 +1691,10 @@ static void iwl_mvm_queue_state_change(struct iwl_op_mode *op_mode,
txq = sta->txq[tid];
mvmtxq = iwl_mvm_txq_from_mac80211(txq);
- mvmtxq->stopped = !start;
+ if (start)
+ clear_bit(IWL_MVM_TXQ_STATE_STOP_FULL, &mvmtxq->state);
+ else
+ set_bit(IWL_MVM_TXQ_STATE_STOP_FULL, &mvmtxq->state);
if (start && mvmsta->sta_state != IEEE80211_STA_NOTEXIST)
iwl_mvm_mac_itxq_xmit(mvm->hw, txq);