[LEDE-DEV] QCA Dakota support

Christian Lamparter chunkeey at googlemail.com
Mon Dec 19 05:50:48 PST 2016


Hello,

On Monday, November 28, 2016 3:38:44 PM CET Alexis Green wrote:
> Thank you for the usb wireless device hint! I had an ath9k-htc dongle
> kicking about and I'm seeing memory wastage with that device as well
> (albeit slower and only happening while I'm pumping a lot of traffic
> through it), so ath10k is likely off the hook for this one. 
> In fact, I went even farther, checking to see if sending traffic via
> ethernet port causes problems and, again, there's memory wastage. Maybe
> it's a kernel bug after all. One potential thing to try is to roll kernel
> to an older version.

Well, I think the various debug options I enabled added to the memory
overhead. But as far as I can say, there was no memory leak.

However, looking at the ath10k commits, it's clear that qualcomm has
problems with ath10k and platforms that have less than 256MB RAM
(And sadly the AC58U only has 128MB).

In fact even the original qsdk does have a "low-memory" mode:
If you look at the kernel messages of the ASUS firmware you get:

ol_ath_attach:7319:Low memory system - netlink socket for wifipos not created

Also, there are hints about the RX queue allocations in the logs
(it's hard to prove though without a source for the qsdk):

idx 1 req 2  num_units 1 num_unit_info 12 unit size 256 actual units 53
ol_ath_alloc_host_mem_chunk req_id 2 idx 0 num_units 53 unit_len 256,
idx 2 req 3  num_units 1 num_unit_info 12 unit size 1024 actual units 53
ol_ath_alloc_host_mem_chunk req_id 3 idx 1 num_units 53 unit_len 1024,
idx 3 req 4  num_units 1 num_unit_info 12 unit size 4096 actual units 53
ol_ath_alloc_host_mem_chunk req_id 4 idx 2 num_units 53 unit_len 4096,
idx 0 req 1  num_units 0 num_unit_info 2 unit size 720 actual units 147
ol_ath_alloc_host_mem_chunk req_id 1 idx 3 num_units 147 unit_len 720,
idx 4 req 6  num_units 35 num_unit_info 0 unit size 3072 actual units 35
ol_ath_alloc_host_mem_chunk req_id 6 idx 4 num_units 35 unit_len 3072,
idx 5 req 7  num_units 1 num_unit_info 0 unit size 6144 actual units 1
ol_ath_alloc_host_mem_chunk req_id 7 idx 5 num_units 1 unit_len 6144,
idx 6 req 5  num_units 0 num_unit_info 2 unit size 1868 actual units 147
ol_ath_alloc_host_mem_chunk req_id 5 idx 6 num_units 73 unit_len 1868,
ol_ath_alloc_host_mem_chunk req_id 5 idx 7 num_units 74 unit_len 1868,

which would account a little over one 1 MiB (w/o overhead).

<http://lxr.free-electrons.com/source/drivers/net/wireless/ath/ath10k/pci.c#L115>
<http://lxr.free-electrons.com/source/drivers/net/wireless/ath/ath10k/pci.c#L221>
(and the HTT RX queue)

whereas ath10k allocates about 8-10MiB for receive buffers for each device.
(and likely double that amount with debugging). 

Anyway, now the latest firmware should still have about 55-60 MiB of
"free" memory while both wifis are enabled and luci is running in the
background.

I also fixed the bad 11AC performance (platform needs a custom board-2.bin
which makes me wonder, if some supported IPQ806x might as well? After all
with the board-2.bin from the ath10k-firmware repository, the device is
hardly working at 4-5 Mbps). Whereas with the fixed board-2.bin the
RT-AC58U now manages to hit 306Mbps+ TCP with a one 1 Stream Intel WiFi
Link 3160 client at 433 PHY speed. 

I think that's the support for the RT-AC58U is now mostly complete. 
I haven't heard any complains and there seem to be people using it.

Regards,
Christian



More information about the Lede-dev mailing list