SparkLan WPEQ-261ACN (QCA6174) : packets loss ?

Contrib Open Source contrib.open.source at gmail.com
Thu Jan 11 07:00:35 PST 2018


Hello,

I purchased a SparkLan WPEQ-261ACN (+ BT) half mini-PCIe wireless
module, which is based on QCA6174A-5, and a preliminary test with
iperf in UDP mode shows that a lot of packets are lost.

Linux kernel version is v4.9 (even if I will not be able to upgrade it
in the short term, any information about missing features/known issues
with “older” kernel version like the one I used will be much
appreciated ^_^).

Firstly, before investigating this packet loss, I would like to check
that I’m using the right firmware files.
Based on kernel traces displayed by ath10k driver:
   ath10k_pci 0000:01:00.0: enabling device (0000 -> 0002)
   ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
   ath10k_pci 0000:01:00.0: Direct firmware load for
ath10k/pre-cal-pci-0000:01:00.0.bin failed with error -2
   ath10k_pci 0000:01:00.0: Direct firmware load for
ath10k/cal-pci-0000:01:00.0.bin failed with error -2
   ath10k_pci 0000:01:00.0: Direct firmware load for
ath10k/QCA6174/hw3.0/firmware-5.bin failed with error -2
   ath10k_pci 0000:01:00.0: could not fetch firmware file
'ath10k/QCA6174/hw3.0/firmware-5.bin': -2
   ath10k_pci 0000:01:00.0: Direct firmware load for
ath10k/QCA6174/hw3.0/firmware-4.bin failed with error -2
   ath10k_pci 0000:01:00.0: could not fetch firmware file
'ath10k/QCA6174/hw3.0/firmware-4.bin': -2
   ath10k_pci 0000:01:00.0: Direct firmware load for
ath10k/QCA6174/hw3.0/firmware-3.bin failed with error -2
   ath10k_pci 0000:01:00.0: could not fetch firmware file
'ath10k/QCA6174/hw3.0/firmware-3.bin': -2
   ath10k_pci 0000:01:00.0: Direct firmware load for
ath10k/QCA6174/hw3.0/firmware-2.bin failed with error -2
   ath10k_pci 0000:01:00.0: could not fetch firmware file
'ath10k/QCA6174/hw3.0/firmware-2.bin': -2
   ath10k_pci 0000:01:00.0: could not fetch firmware files (-2)
   ath10k_pci 0000:01:00.0: could not probe fw (-2) We can notice that
driver is looking for a firmware file with API5.
Unfortunately, at this time, API5 firmware is not available anymore in:
   https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/log/ath10k/QCA6174/hw3.0
but there is API6 instead.
I also looked at kvalo github and noticed in log message that
firmware-5.bin was renamed into firmware-6.bin:
   QCA6174 hw3.0: change 4.4 branch to use FW API 6
      https://github.com/kvalo/ath10k-firmware/commit/da1564dafe1c8175faf694482d1649f56229ae96
So I downloaded the latest binaries available, which are:
   https://raw.githubusercontent.com/kvalo/ath10k-firmware/35d8642f452827b955470de4ac997ffe906a6f17/QCA6174/hw3.0/4.4.1/firmware-6.bin_WLAN.RM.4.4.1-00079-QCARMSWPZ-1
   https://raw.githubusercontent.com/kvalo/ath10k-firmware/35d8642f452827b955470de4ac997ffe906a6f17/QCA6174/hw3.0/board-2.bin
   https://raw.githubusercontent.com/kvalo/ath10k-firmware/35d8642f452827b955470de4ac997ffe906a6f17/QCA6174/hw3.0/board.bin
and installed them into expected folder in /lib/firmware *AND* created
a symbolic link (/!\ downgrading firmware API):
   firmware-5.bin pointing to firmware-6.bin_WLAN.RM.4.4.1-00079-QCARMSWPZ-1
Moreover, as described in previous commit "da1564dafe1", I recompiled
my driver with this patch:
   ath10k: ignore configuring the incorrect board_id
      https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=d2e202c06ca42d353d95df12437740921a6d05b5
And at this point, I was able to use my device:
   mobdprobe ath10k_pci
      ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0
reset_mode 0
      ath10k_pci 0000:01:00.0: Direct firmware load for
ath10k/pre-cal-pci-0000:01:00.0.bin failed with error -2
      ath10k_pci 0000:01:00.0: Direct firmware load for
ath10k/cal-pci-0000:01:00.0.bin failed with error -2
      ath10k_pci 0000:01:00.0: qca6174 hw3.2 target 0x05030000 chip_id
0x00340aff sub 1dac:0261
      ath10k_pci 0000:01:00.0: kconfig debug 1 debugfs 1 tracing 0 dfs
1 testmode 1
      ath10k_pci 0000:01:00.0: firmware ver
WLAN.RM.4.4.1-00079-QCARMSWPZ-1 api 5 features wowlan,ignore-otp crc32
fd869beb
      ath10k_pci 0000:01:00.0: board id is not exist in otp, ignore it
      ath10k_pci 0000:01:00.0: board_file api 2 bmi_id N/A crc32 20d869c3
      ath10k_pci 0000:01:00.0: Unknown eventid: 118809
      ath10k_pci 0000:01:00.0: Unknown eventid: 90118
      ath10k_pci 0000:01:00.0: htt-ver 3.47 wmi-op 4 htt-op 3 cal otp
max-sta 32 raw 0 hwcrypto 1

Now I'm able to scan SSID, associate to my AP, ping, use iperf, etc.
But iperf shows that a majority of packets are lost. :(

So my questions are :
Q1) is it correct to "downgrade" firmware API in this case (symbolic
link firmware-5.bin) ?
I also tried to use firmware-5.bin before its renaming into API6, with
board files available at that time, (and still with patch
"d2e202c06ca" included), but it seems that firmware was not able to
boot:
   ath10k_pci 0000:01:00.0: failed to ping firmware: -110
   ath10k_pci 0000:01:00.0: failed to reset rx filter: -110
   ath10k_pci 0000:01:00.0: could not init core (-110)
   ath10k_pci 0000:01:00.0: could not probe fw (-110)

Q2) is it possible to use recent board files with an "older" firmware file ?

Q3) how to know which firmware files to use for my specific device ?

After searching in this mailing list and googling about QCA6174, and
as far as I understand (which may be limited in this matter !):
   *) firmware file is supplied by Qualcomm Atheros, and does not
depend on module manufacturer
   *) board files are not generic and depend on module manufacturer
(so not Qualcomm)
   *) board-2.bin file contains data for multiple wifi modules
   *) board.bin file contains data for a single wifi module (and
probably not the one I use)
   *) calibration files are optional but mandatory for good
performance/throughput Board files are extracted from EEPROM data
files, that can be found in Windows driver for example.

Q4) do I have to extract EEPROM from Windows driver or current
board-2.bin is already compatible ?

Q5) how to get calibration files from Windows driver ?

Thanks for your help,
Contrib



More information about the ath10k mailing list