archive mirror
 help / color / mirror / Atom feed
* Bug in Memory Layout of rx_desc for QCA6174
@ 2021-10-29 14:43 Francesco Magliocca
  0 siblings, 0 replies; 4+ messages in thread
From: Francesco Magliocca @ 2021-10-29 14:43 UTC (permalink / raw)
  To: kvalo; +Cc: ath10k

Hi, sorry for the late reply, have had rough times.
Yes I can work on a patch, I'll try to get something working by the
end of the week.

> Heh, I was also about to ask about that as well :) The firmware is
> supposed to handle length differences but clearly it's not.

In fact, I see that the driver notifies the firmware about the offset
of the various fields of the data structure,
so this made me think about the firmware. I still can't figure out
what wifi packet is causing this problem...

Anyways I'll work on a patch abstracting the various representations out.
I just ask that you be a little bit patient with me, because this is
the first time I contribute to the kernel,
so I may be making mistakes

ath10k mailing list

^ permalink raw reply	[flat|nested] 4+ messages in thread
* Bug in Memory Layout of rx_desc for QCA6174
@ 2021-06-18  7:28 Francesco Magliocca
  2021-09-21  9:21 ` Kalle Valo
  0 siblings, 1 reply; 4+ messages in thread
From: Francesco Magliocca @ 2021-06-18  7:28 UTC (permalink / raw)
  To: ath10k

Hello everyone,
I have a QCA6174 PCIe board, I am using linux kernel 5.12.10.
The firmware loaded is:
> [    4.483131] ath10k_pci 0000:02:00.0: qca6174 hw3.2 target 0x05030000 chip_id 0x00340aff sub 1a56:143a
> [    4.483136] ath10k_pci 0000:02:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 0 testmode 0
> [    4.483567] ath10k_pci 0000:02:00.0: firmware ver WLAN.RM.4.4.1-00157-QCARMSWPZ-1 api 6 features wowlan,ignore-otp,mfp crc32 90eebefb
> [    4.572730] ath10k_pci 0000:02:00.0: board_file api 2 bmi_id N/A crc32 318825bf
> [    4.665592] ath10k_pci 0000:02:00.0: htt-ver 3.60 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1

around six months ago I reported a bug which is still haunting me:
When I am connected to my home's Wi-Fi network and my father's Huawei
smartphone is connected too
my Wi-Fi card hangs and gets stuck, I have to force restart of the device.

Note that this problem does not happen if my pc and the smartphone are
connected to different networks (for example
I tried connecting my pc to the 2.4GHz network and the smartphone to
the 5GHz network, and the bug does not appear).

Now, I tried bisecting driver changes, and I found the faulty one,
it is the commit: e3def6f7ddf88636febb12e1e3e86387a4ce5452

It adds some fields to structures like rx_msdu_start, rx_frag_info, etc..
The changes modify the size of these structures!

If I revert this commit changes, the bug does not happen
(I tested it for two weeks, while the bug happens at least once in 2-3 hours
from when the smartphone is connected to the wifi network).

Also, if I selectively remove some of the changes introduced by the
faulty commit,
the bug does not go away, so it looks like the problem is in the
change of size of the
data structures.

Now, I'd like to ask you what we can do to fix this problem...
Is there something I am doing wrong?
Or is there a bug in the firmware?

If the firmware can't be easily fixed, I was thinking that we can
abstract the htt_rx_desc
(in the same way we do with ops in other parts of the driver) to have
two versions:
one for 32-bit descriptors (like my QCA6174)
and one for 64-bit descriptors (i.e. WCN3990, which was the cause of
this change).

I'd be really happy to help, but I am not sure I fully understand what
is going on,
so what do you think is happening and what should we do?

Thanks in advance.
Francesco Magliocca

ath10k mailing list

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-10-29 14:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-29 14:43 Bug in Memory Layout of rx_desc for QCA6174 Francesco Magliocca
  -- strict thread matches above, loose matches on Subject: below --
2021-06-18  7:28 Francesco Magliocca
2021-09-21  9:21 ` Kalle Valo
2021-10-29  9:07   ` Thorsten Leemhuis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).