Skip to content

wifi: iwlwifi: release frames before one beyond the reorder window

David Härdeman linux-wireless lkml stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2wifi: iwlwifi: mvm: release frames before one beyond the windowdrivers/net/wireless/intel/iwlwifi/mvm/rxmq.c+13 -00 replies
2/2wifi: iwlwifi: mld: release frames before one beyond the windowdrivers/net/wireless/intel/iwlwifi/mld/agg.c drivers/net/wireless/intel/iwlwifi/mld/tests/agg.c+42 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] wifi: iwlwifi: release frames before one beyond the reorder window

An AP that gives up on an MPDU of a BA session without sending a BAR and keeps transmitting will eventually send a frame with SN == head_sn + buf_size. Both iwlmvm and iwlmld store that frame in the slot of head_sn and then release it ahead of the frames before it, which all fail the PN check. A single lost MPDU becomes a burst of up to 63 dropped frames, i.e. a TCP loss burst.

I ran into this with an AX210 (iwlmvm) on an rtw88 SDIO AP (RTL8822CS) that drops frames without a BAR while the client is off-channel for background scans; the AP side is a separate problem. A kprobe at the PN check showed every burst starting with the frame at hole + 64.

Patch 1 restores the window check that iwlmvm had before the reorder buffer was simplified. Tested on 7.2.15 (same code): PN-replay drops per client scan went from about 280 to about 12, and in normal use (8 two-minute bidirectional TCP runs each) from 290 to 3 per run.

Patch 2 does the same for iwlmld, which has the same code. I have no iwlmld hardware; it adds a KUnit case that fails without the fix and passes with it.

The patches were generated with the help of an LLM; I have reviewed them (to the best of my ability), and tested patch 1 on actual hardware as described above (patch 2 only with the KUnit case).

David Härdeman (2):
wifi: iwlwifi: mvm: release frames before one beyond the window
wifi: iwlwifi: mld: release frames before one beyond the window

 drivers/net/wireless/intel/iwlwifi/mld/agg.c  | 14 ++++++++++
 .../wireless/intel/iwlwifi/mld/tests/agg.c    | 28 +++++++++++++++++++
 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 13 +++++++++
 3 files changed, 55 insertions(+)

base-commit: 3627924ed81fd7783394fb2555ea179c6606a231

Signature · 1 line
2.47.3