Skip to content

Some more patches for wcn36xx

Daniel Mack linux-wireless 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10wcn36xx: fix buffer commit logic on TX pathdrivers/net/wireless/ath/wcn36xx/dxe.c+38 -372 replies
2/10wcn36xx: set DMA mask explicitlydrivers/net/wireless/ath/wcn36xx/main.c+6 -01 reply
3/10wcn36xx: don't disable RX IRQ from handlerdrivers/net/wireless/ath/wcn36xx/dxe.c+11 -40 replies
4/10wcn36xx: clear all masks in RX interruptdrivers/net/wireless/ath/wcn36xx/dxe.c+40 -220 replies
5/10wcn36xx: only handle packets when ED or DONE bit is setdrivers/net/wireless/ath/wcn36xx/dxe.c+16 -40 replies
6/10wcn36xx: consider CTRL_EOP bit when looking for valid descriptorsdrivers/net/wireless/ath/wcn36xx/dxe.c+3 -10 replies
7/10wcn36xx: set PREASSOC and IDLE stated when BSS info changesdrivers/net/wireless/ath/wcn36xx/main.c+4 -00 replies
8/10wcn36xx: drain pending indicator messages on shutdowndrivers/net/wireless/ath/wcn36xx/smd.c+6 -00 replies
9/10wcn36xx: simplify wcn36xx_smd_open()drivers/net/wireless/ath/wcn36xx/smd.c+3 -90 replies
10/10wcn36xx: improve debug and error messages for SMDdrivers/net/wireless/ath/wcn36xx/smd.c+10 -40 replies

Reviews trailers per patch

2 of 10 patches have a Reviewed-by or Acked-by.

PatchRamon Fried
1/10A-b
2/10A-b
3/10
4/10
5/10
6/10
7/10
8/10
9/10
10/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/10] Some more patches for wcn36xx

Here are some more patches for the wcn36xx driver that emerged from reviews and my attempts to fix the connection timeout issues. Some of them merely bring the driver in sync with what the "prima" downstream driver is doing, and they seemingly make the driver more stable. Others just apply some best practice patterns or do some cleanup.

The first patch in the series is one that I've sent earlier as RFC, and Loic expressed his support in a follow-up. I still believe it does the right thing.

However, the connection timeout problems are still there unfortunately, but they seemingly appear to happen less often now.

To recap, when the driver gets stuck, not a single packet is being sent out anymore. I have a 2nd machine tuned to the same channel to capture all packets from the MAC of the device under test, and it shows a flat line once the connection timeouts happen. Some more context is given in this bug report:

https://bugs.96boards.org/show_bug.cgi?id=538

One interesting find is that setting the debug_mask module parameter to 0x4 or 0x400 (or both), the issue is much less likely to happen. All this does is adding printk()s before each message is sent out, and that affects the timings of course. I tried adding mdelay() there instead, and they too make the effect less likely, but they don't make it go away.

Hence I believe that some sort of firmware internal buffer is overrun if too many SMD requests fly in in a short amount of time. The firmware does, however, still ack all packets just fine on the SMD channels, and also the DXE communication flows are all healthy. No errors are reported anywhere, but nothing is being put on the ether anymore.

I'm running out of ideas at this point. I guess without access to the firmware sources, it's virtually impossible to grok what's going on and how to work around whatever is causing it.

If anyone has an idea on how to debug this frustrating issue any further, please let me know. A reproducer is described in the bug reported linked to above.

Thanks,
Daniel

Daniel Mack (10):
wcn36xx: fix buffer commit logic on TX path
wcn36xx: set DMA mask explicitly
wcn36xx: don't disable RX IRQ from handler
wcn36xx: clear all masks in RX interrupt
wcn36xx: only handle packets when ED or DONE bit is set
wcn36xx: consider CTRL_EOP bit when looking for valid descriptors
wcn36xx: set PREASSOC and IDLE stated when BSS info changes
wcn36xx: drain pending indicator messages on shutdown
wcn36xx: simplify wcn36xx_smd_open()
wcn36xx: improve debug and error messages for SMD

 drivers/net/wireless/ath/wcn36xx/dxe.c  | 176 ++++++++++++++++++++------------
 drivers/net/wireless/ath/wcn36xx/main.c |  10 ++
 drivers/net/wireless/ath/wcn36xx/smd.c  |  32 +++---
 3 files changed, 137 insertions(+), 81 deletions(-)
Signature · 1 line
2.14.3