diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2026-05-31 13:53:00 +0300 |
|---|---|---|
| committer | Miri Korenblit <miriam.rachel.korenblit@intel.com> | 2026-06-03 17:02:55 +0300 |
| commit | f255f1f2a05d2e2147a24f649755b2a0dd8aa1a7 (patch) | |
| tree | e324ef2c0388594f3a43d849adeaa13322c630d8 | |
| parent | 33346563d6d2b860c0a11bf31dca925b48dd3db2 (diff) | |
| download | linux-f255f1f2a05d2e2147a24f649755b2a0dd8aa1a7.tar.xz | |
wifi: iwlwifi: pcie: fix write pointer move detection
Ever since the TFD queue size is no longer limited to 256 entries,
this code has been wrong, and might erroneously not detect a move
if it was by a multiple of 256. Not a big deal, but fix it while
I see it.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Link: https://patch.msgid.link/20260531135036.87ffbeab298e.I4fae41383b6756bccbed250985e0521b68a40d0c@changeid
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
| -rw-r--r-- | drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c index 976a47ef6d0e..28b276c65952 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/gen1_2/trans.c @@ -2590,7 +2590,7 @@ int iwl_trans_pcie_wait_txq_empty(struct iwl_trans *trans, int txq_idx) struct iwl_txq *txq; unsigned long now = jiffies; bool overflow_tx; - u8 wr_ptr; + int wr_ptr; /* Make sure the NIC is still alive in the bus */ if (test_bit(STATUS_TRANS_DEAD, &trans->status)) @@ -2613,7 +2613,7 @@ int iwl_trans_pcie_wait_txq_empty(struct iwl_trans *trans, int txq_idx) overflow_tx) && !time_after(jiffies, now + msecs_to_jiffies(IWL_FLUSH_WAIT_MS))) { - u8 write_ptr = READ_ONCE(txq->write_ptr); + int write_ptr = READ_ONCE(txq->write_ptr); /* * If write pointer moved during the wait, warn only |
