Problems with Aerohive AP330 with QCA9882 AC mini pcie card

Hi,

I recently bought an Aerohive AP330 access point and installed OpenWrt 19.07.5 on it. I still had a spare QCA9882 mini pcie card lying around so decided to put this in the access point. When I run lspci the card is visible but I can't get it to work with the ath10k or the ath10k-ct driver. The relevant dmesg output is listed below. Does anybody have an idea why this doesn't work?

Thanks,

Koen

lspci

root@OpenWrt:~# lspci
9000:00:00.0 PCI bridge: Freescale Semiconductor Inc P1020E (rev 11)
9000:01:00.0 Network controller: Qualcomm Atheros AR93xx Wireless Network Adapter (rev 01)
a000:02:00.0 PCI bridge: Freescale Semiconductor Inc P1020E (rev 11)
a000:03:00.0 Network controller: Qualcomm Atheros QCA986x/988x 802.11ac Wireless Network Adapter

ath10k and ath10k-firmware-qca988x packages installed:

[   22.832721] ath10k_pci a000:03:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
[   23.155172] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/pre-cal-pci-a000:03:00.0.bin failed with error -2
[   23.283373] ath10k_pci a000:03:00.0: Falling back to user helper
[   23.417238] firmware ath10k!pre-cal-pci-a000:03:00.0.bin: firmware_loading_store: map pages failed
[   23.524954] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/cal-pci-a000:03:00.0.bin failed with error -2
[   23.649021] ath10k_pci a000:03:00.0: Falling back to user helper
[   23.785096] firmware ath10k!cal-pci-a000:03:00.0.bin: firmware_loading_store: map pages failed
[   23.889549] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-6.bin failed with error -2
[   24.017809] ath10k_pci a000:03:00.0: Falling back to user helper
[   24.153579] firmware ath10k!QCA988X!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed
[   25.027997] ath10k_pci a000:03:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043222ff sub 0000:0000
[   25.138488] ath10k_pci a000:03:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[   25.240004] ath10k_pci a000:03:00.0: firmware ver 10.2.4-1.0-00047 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 35bd9258
[   25.417607] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/board-2.bin failed with error -2
[   25.542699] ath10k_pci a000:03:00.0: Falling back to user helper
[   25.647993] firmware ath10k!QCA988X!hw2.0!board-2.bin: firmware_loading_store: map pages failed
[   25.758391] ath10k_pci a000:03:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
[   25.934051] ath10k_pci a000:03:00.0: otp calibration failed: 2
[   26.003911] ath10k_pci a000:03:00.0: failed to run otp: -22
[   26.070635] ath10k_pci a000:03:00.0: could not init core (-22)
[   26.140524] ath10k_pci a000:03:00.0: could not probe fw (-22)

ath10k and ath10k-firmware-qca988x removed and ath10k-ct and ath10k-firmware-qca988x-ct packages installed followed by a reboot:

[   22.719383] ath10k 4.19 driver, optimized for CT firmware, probing pci device: 0x3c.
[   22.815591] ath10k_pci a000:03:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
[   23.129404] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/fwcfg-pci-a000:03:00.0.txt failed with error -2
[   23.255530] ath10k_pci a000:03:00.0: Falling back to user helper
[   23.389646] firmware ath10k!fwcfg-pci-a000:03:00.0.txt: firmware_loading_store: map pages failed
[   23.495275] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/pre-cal-pci-a000:03:00.0.bin failed with error -2
[   23.623482] ath10k_pci a000:03:00.0: Falling back to user helper
[   23.747431] firmware ath10k!pre-cal-pci-a000:03:00.0.bin: firmware_loading_store: map pages failed
[   23.855126] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/cal-pci-a000:03:00.0.bin failed with error -2
[   23.979197] ath10k_pci a000:03:00.0: Falling back to user helper
[   24.115279] firmware ath10k!cal-pci-a000:03:00.0.bin: firmware_loading_store: map pages failed
[   24.220126] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/ct-firmware-5.bin failed with error -2
[   24.351493] ath10k_pci a000:03:00.0: Falling back to user helper
[   24.456796] firmware ath10k!QCA988X!hw2.0!ct-firmware-5.bin: firmware_loading_store: map pages failed
[   24.568519] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/ct-firmware-2.bin failed with error -2
[   24.699892] ath10k_pci a000:03:00.0: Falling back to user helper
[   24.836418] firmware ath10k!QCA988X!hw2.0!ct-firmware-2.bin: firmware_loading_store: map pages failed
[   24.947201] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-6.bin failed with error -2
[   25.075444] ath10k_pci a000:03:00.0: Falling back to user helper
[   25.212546] firmware ath10k!QCA988X!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed
[   25.320225] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-5.bin failed with error -2
[   25.448490] ath10k_pci a000:03:00.0: Falling back to user helper
[   25.584547] firmware ath10k!QCA988X!hw2.0!firmware-5.bin: firmware_loading_store: map pages failed
[   25.693110] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-4.bin failed with error -2
[   25.821317] ath10k_pci a000:03:00.0: Falling back to user helper
[   25.957889] firmware ath10k!QCA988X!hw2.0!firmware-4.bin: firmware_loading_store: map pages failed
[   26.065680] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/firmware-3.bin failed with error -2
[   26.193914] ath10k_pci a000:03:00.0: Falling back to user helper
[   26.299432] firmware ath10k!QCA988X!hw2.0!firmware-3.bin: firmware_loading_store: map pages failed
[   26.763953] ath10k_pci a000:03:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043222ff sub 0000:0000
[   26.874462] ath10k_pci a000:03:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   26.975503] ath10k_pci a000:03:00.0: firmware ver 10.1-ct-8x-__fW-022-538f0906 api 2 features wmi-10.x,has-wmi-mgmt-tx,mfp,txstatus-noack,wmi-10.x-CT,ratemask-CT,txrate-CT,get-temp-CT,tx-rc-CT,cust-stats-CT,retry-gt2-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT crc32 e1c91a74
[   27.294937] ath10k_pci a000:03:00.0: Direct firmware load for ath10k/QCA988X/hw2.0/board-2.bin failed with error -2
[   27.420017] ath10k_pci a000:03:00.0: Falling back to user helper
[   27.524947] firmware ath10k!QCA988X!hw2.0!board-2.bin: firmware_loading_store: map pages failed
[   27.631096] ath10k_pci a000:03:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
[   27.752200] ath10k_pci a000:03:00.0: otp calibration failed: 2
[   27.822063] ath10k_pci a000:03:00.0: failed to run otp: -22 (download-cal-data)
[   27.909617] ath10k_pci a000:03:00.0: could not init core (-22)
[   27.979516] ath10k_pci a000:03:00.0: could not probe fw (-22)

Hello, Did you find maybe a solution to this? I am struggling with similar case - Adding AC Wifi to Aerohive AP330 - Installing and Using OpenWrt - OpenWrt Forum .

No I didn't. I got the mini pcie card from a different wifi access point and assume that although it uses a QCA9882 chip it is not supported by the driver.

You do need to extract the correct wifi calibration data from the donor AP (and may have to recombine the relevant offsets into your existing on the donee), not trivial - and harder if you have to juggle different chipsets (drivers).

Actually I got further - did not need to do the re calibration and wifi was (I hope :slight_smile: ) working fine at 877mbps (speedtest, ping, no errors in logs etc.). I have now a different problem though - on the cold boot it doesn't recognize the new card (at the UBoot stage) but when I reboot (after OpenWRT boots) it starts too. Maybe you know what could be wrong?

I've decided to give this another try after updating to 21.02.1 but have not managed to get it to work.

[   28.125599] ath10k 5.10 driver, optimized for CT firmware, probing pci device: 0x3c.
[   28.221846] ath10k_pci a000:03:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
[   29.267310] ath10k_pci a000:03:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043222ff sub 0000:0000
[   29.377815] ath10k_pci a000:03:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
[   29.478714] ath10k_pci a000:03:00.0: firmware ver 10.1-ct-8x-__fH-022-ecad3248 api 2 features wmi-10.x,mfp,txstatus-noack,wmi-10.x-CT,ratemask-CT,txrate-CT,get-temp-CT,tx-rc-CT,cust-stats-CT,retry-gt2-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT crc32 1b2a161c
[   29.829956] ath10k_pci a000:03:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
[   29.949176] ath10k_pci a000:03:00.0: otp calibration failed: 2
[   30.019092] ath10k_pci a000:03:00.0: failed to run otp: -22 (download-cal-data)
[   30.106683] ath10k_pci a000:03:00.0: could not init core (-22)
[   30.176798] ath10k_pci a000:03:00.0: could not probe fw (-22)

When I check the ath10 linux firmware page it shows that it only supports a specific set of boards with the QCA9882 chip.

I've googled the different numbers on the mini pcie card but it does not give any useful information. So I can only assume that the cards I have are not supported by the ath10 driver.

I guess something I can try to make this work is to see if I can extract the original board.bin and firmware files from the access point I took the mini pcie card from.

In your case, the problem is that the calibration is not being provided. It can be stored as an eeprom on-board, in which case IIRC an nvmem device-tree bit is used to bring it over to make it available for the driver.

Yes you are correct. I assumed that all mini pcie cards store the calibration data on the card such that they are interchangeable between devices. However my assumption is wrong and there are mini pcie cards that do not have the calibration data on the card. The mini pcie card I was trying to use is very similar as the one as shown in the following topic.

Reading through the topic it becomes clear that the calibration data is stored in nand and not on the mini pcie card. So that explains why I can't just replace the cards in the AP330 with the cards I salvaged from a different access point.