Netgear R7800 exploration (IPQ8065, QCA9984)

It is not the kernel 4.9 bump itself, but the addition of support for ipq40xx devices. The commit https://github.com/lede-project/source/commit/cc189c0b7fa015978b04bb663a75b1da726376b5 removed a local hack mac80211/patches/936-ath10k_skip_otp_check.patch that had enabled the radios of the existing ipq806x radios to work. No replacement for that hack for that was provided, so the existing devices' wifi chips have stopped working.

At least r7800's QCA9984 chip lost wifi, and based on your experience also QCA9980 (that is in EA8500 and C2600), so my guess is that most previous ipq806x devices lost wifi due to that commit.

I have proposed a fix (based on a suggestion from @chunkeey ) in PR https://github.com/lede-project/source/pull/995 that fixes things by allowing a non-essential board name detection function to fail. That helps at least for R7800.

But until @blogic @mkresin @nbd or some other ipq806x related committer looks into the matter, you have to patch sources manually to get wifi. You need to either restore the removed hack (mac80211 patch 936) or add my new 936 patch from PR 995.

Thank you Hannu. Since there seems to be a bit of disconnect between the forum and IRC, I'll just relay what @mkresin said:

be patient. @blogic and @nbd are working on the ipq target at the moment. i'm sure they will take care of the patch soon.

Hopefully so. But the otp patch removal concerns also other targets than ipq806x, as the removed patch was generic ath10k patch in mac80211 and had nothing to do with ipq806x by itself (except that ipq806x devices generally use ath10k radios).

The dd-wrt head developer seems to think that the now-removed "skip otp" patch is still necessary for routers in his answer to the question posted by @chunkeey to the ath10k developer list: http://lists.infradead.org/pipermail/ath10k/2017-March/009555.html

Could be that my patch proposal is another working way to get over the id failure, but I am not a wifi or ath10k expert, so I am not sure what is the best solution.

Hi everyone,

I've been using LEDE for about a month. I posted earlier in the thread.

LEDE fixed the bootup failure occurring with OpenWRT. I hear that the Wi-Fi speeds may have improved. If so is there a stable version without regression issues and what LEDE git hash should i merge with?

Thanks for the help and all the work on the platform.

@blogic @hnyman
Wonder if there's any use of Qualcomm Secure Execution Environment driver for ipq806x in LEDE?
https://source.codeaurora.org/quic/qsdk/oss/kernel/linux-msm/tree/drivers/misc/qseecom.c?h=eggplant

Unless you want it for pure research purposes there is no reason to touch the QSEE. It's also not "secure"...

The "no wireless" issue for R7800 has hopefully been nwo fixed, as my patch from PR 995 has been committed as https://github.com/lede-project/source/commit/c69a89fe23a526ec3eef9c4e63eb672387e5177e

I am not sure if that is an optimal solution, but seems to work for R7800. hopefully also for the other affected routers.

Thank you, wireless is indeed fixed in r3888 for Linksys EA8500.

Hey guys, I wanted to buy this router to turn it into a VPN router. So I just have two small questions regarding it:

  • What speeds can I achieve with the OpenVPN client? Since it has this powerful cpu, I hope for 60-70mbps.
  • Does LEDE come with a DNLA server built in?

Thanks in advance :slight_smile:

I can reach 50Mbps in Openvpn on the R7800 router, without any specific tuning.
During transfer, CPU is still 44% idle.

Hi All,

I have recently upgraded my R7800 to both the latest snapshot version, and 17.01 (inc RC1 and RC2) versions and I've lost the use of wifi.

Here is the dmesg output. Wireless was working on the previous version I had installed, which was r3540, btw if anyone has a copy of this build, could you please point me in the right direction so I can at least get wifi back.

root@LEDE:~# dmesg | grep ath
[ 10.332710] ath10k_pci 0000:01:00.0: enabling device (0140 -> 0142)
[ 10.332801] ath10k_pci 0000:01:00.0: enabling bus mastering
[ 10.333275] ath10k_pci 0000:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[ 10.501740] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:01:00.0.bin failed with error -2
[ 10.501769] ath10k_pci 0000:01:00.0: Falling back to user helper
[ 10.537762] firmware ath10k!pre-cal-pci-0000:01:00.0.bin: firmware_loading_store: map pages failed
[ 10.538032] ath10k_pci 0000:01:00.0: Direct firmware load for ath10k/cal-pci-0000:01:00.0.bin failed with error -2
[ 10.545709] ath10k_pci 0000:01:00.0: Falling back to user helper
[ 10.957287] ath10k_pci 0000:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[ 10.957319] ath10k_pci 0000:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[ 10.968439] ath10k_pci 0000:01:00.0: firmware ver 10.4-3.4-00074 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast crc32 fa32e88e
[ 13.009498] ath10k_pci 0000:01:00.0: unable to read from the device
[ 13.009519] ath10k_pci 0000:01:00.0: could not execute otp for board id check: -110
[ 13.014936] ath10k_pci 0000:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0046,subsystem-vendor=168c,subsystem-device=cafem
[ 13.014936] ▒▒▒▒▒▒,▒ from ath10k/QCA9984/hw1.0/board-2.bin
[ 13.022418] ath10k_pci 0000:01:00.0: board_file api 1 bmi_id N/A crc32 4785ac90
[ 14.549978] ath10k_pci 0000:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 512 raw 0 hwcrypto 1
[ 14.632516] ath: EEPROM regdomain: 0x0
[ 14.632526] ath: EEPROM indicates default country code should be used
[ 14.632533] ath: doing EEPROM country->regdmn map search
[ 14.632546] ath: country maps to regdmn code: 0x3a
[ 14.632556] ath: Country alpha2 being used: US
[ 14.632564] ath: Regpair used: 0x3a
[ 14.638767] ath10k_pci 0001:01:00.0: enabling device (0140 -> 0142)
[ 14.638882] ath10k_pci 0001:01:00.0: enabling bus mastering
[ 14.639540] ath10k_pci 0001:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[ 14.820979] ath10k_pci 0001:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0001:01:00.0.bin failed with error -2
[ 14.821016] ath10k_pci 0001:01:00.0: Falling back to user helper
[ 14.870665] firmware ath10k!pre-cal-pci-0001:01:00.0.bin: firmware_loading_store: map pages failed
[ 14.870858] ath10k_pci 0001:01:00.0: Direct firmware load for ath10k/cal-pci-0001:01:00.0.bin failed with error -2
[ 14.878518] ath10k_pci 0001:01:00.0: Falling back to user helper
[ 15.066377] ath10k_pci 0001:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[ 15.066432] ath10k_pci 0001:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[ 15.083408] ath10k_pci 0001:01:00.0: firmware ver 10.4-3.4-00074 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast crc32 fa32e88e
[ 17.119498] ath10k_pci 0001:01:00.0: unable to read from the device
[ 17.119522] ath10k_pci 0001:01:00.0: could not execute otp for board id check: -110
[ 17.124746] ath10k_pci 0001:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0046,subsystem-vendor=168c,subsystem-device=cafem
[ 17.124746] ▒▒▒▒▒▒,▒ from ath10k/QCA9984/hw1.0/board-2.bin
[ 17.132387] ath10k_pci 0001:01:00.0: board_file api 1 bmi_id N/A crc32 4785ac90
[ 18.667146] ath10k_pci 0001:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal file max-sta 512 raw 0 hwcrypto 1
[ 18.751687] ath: EEPROM regdomain: 0x0
[ 18.751695] ath: EEPROM indicates default country code should be used
[ 18.751699] ath: doing EEPROM country->regdmn map search
[ 18.751708] ath: country maps to regdmn code: 0x3a
[ 18.751714] ath: Country alpha2 being used: US
[ 18.751719] ath: Regpair used: 0x3a
[ 22.184475] ath: EEPROM regdomain: 0x833a
[ 22.184496] ath: EEPROM indicates we should expect a country code
[ 22.187465] ath: doing EEPROM country->regdmn map search
[ 22.193624] ath: country maps to regdmn code: 0x37
[ 22.198912] ath: Country alpha2 being used: GB
[ 22.203580] ath: Regpair used: 0x37
[ 22.207942] ath: regdomain 0x833a dynamically updated by user
[ 22.211412] ath: EEPROM regdomain: 0x833a
[ 22.217228] ath: EEPROM indicates we should expect a country code
[ 22.221295] ath: doing EEPROM country->regdmn map search
[ 22.227308] ath: country maps to regdmn code: 0x37
[ 22.232774] ath: Country alpha2 being used: GB
[ 22.237290] ath: Regpair used: 0x37
[ 22.241786] ath: regdomain 0x833a dynamically updated by user

Cheers all!

[quote="ddunford, post:311, topic:285"]
I have recently upgraded my R7800 to both the latest snapshot version, and 17.01 (inc RC1 and RC2) versions and I've lost the use of wifi.
[/quote]your log showed nothing strange.
And 17.01 has not had relevant radio changes for some time.
If you have trouble with snapshot and 17.01 rc versions, I think that you likely have a faulty wifi config. You have e.g. had a build with full wpad and that has generated config items that do not work with wpad-mini.

What errors does logread show when you do "wifi up" ?

Or delete /etc/config/wireless and start from scratch after a reboot.

1 Like

Here is the error when I run wifi up.

Sat Apr 1 14:25:58 2017 daemon.notice netifd: radio0 (32215): command failed: Not supported (-95)
Sat Apr 1 14:25:58 2017 daemon.notice netifd: radio1 (32229): command failed: Not supported (-95)
Sat Apr 1 14:25:59 2017 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Sat Apr 1 14:25:59 2017 daemon.err hostapd: Line 38: unknown configuration item 'ieee80211w'
Sat Apr 1 14:25:59 2017 daemon.err hostapd: 1 errors found in configuration file '/var/run/hostapd-phy0.conf'
Sat Apr 1 14:25:59 2017 daemon.err hostapd: Failed to set up interface with /var/run/hostapd-phy0.conf
Sat Apr 1 14:25:59 2017 daemon.err hostapd: Failed to initialize interface
Sat Apr 1 14:25:59 2017 daemon.notice netifd: radio0 (32215): cat: can't open '/var/run/wifi-phy0.pid': No such file or directory
Sat Apr 1 14:25:59 2017 daemon.notice netifd: radio0 (32215): WARNING (wireless_add_process): executable path /usr/sbin/wpad does not match process path ()
Sat Apr 1 14:25:59 2017 daemon.notice netifd: radio0 (32215): Command failed: Invalid argument
Sat Apr 1 14:25:59 2017 daemon.notice netifd: radio0 (32215): Device setup failed: HOSTAPD_START_FAILED

Guessing that's the problem :slight_smile:

Removing ieee80211w from /etc/config/wireless fixed the issue.

Thanks!

I wonder if anybody has tested how ipq806x: enable QCE hardware crypto inside the kernel could increase SSL/OpenVPN thoroughput or decrease CPU load.

1 Like

Well, I can give you some numbers for the IPQ40XX (Asus RT-AC58U at 666 MHz and not the Full 716 MHz - with QCE enabled)
Note: All values are MiB/s! and not Mbit/s!

This is with the qcrypto/QCE active:

root@xbow:~# cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
[...] (PBKDF benchmark - not important)
#  Algorithm | Key |  Encryption |  Decryption
     aes-cbc   128b    63.7 MiB/s    63.3 MiB/s
     aes-cbc   256b    55.5 MiB/s    55.4 MiB/s
     aes-xts   256b    50.5 MiB/s    60.7 MiB/s
     aes-xts   512b           N/A           N/A

The AES-XTS 512bit is not working with the QCE. But it is with software ciphers.

w/o crypto (aka unbind qcrypto via sysfs - this can be done at runtime)

#  Algorithm | Key |  Encryption |  Decryption
     aes-cbc   128b    11.1 MiB/s    11.9 MiB/s
     aes-cbc   256b     8.0 MiB/s     9.0 MiB/s
     aes-xts   256b    10.7 MiB/s    11.6 MiB/s
     aes-xts   512b     8.9 MiB/s     8.9 MiB/s

Again, These are in MiB/s!
So even in software cipher manages aes-128-cbc @ 11.1 MiB/s. Which is 11.1 MiB/s * 8 Bits / Byte = 88.8 Mbits/s .

With Hardware-acceleration the aes-128-cbc @ 63.3 MiB/s is about 506.4 MBit/s.
If you have a reasonably easy way to check the VPN, I can provide the numbers as well. Since I expect them to be lower due to the overhead.

Edit: fixed units.

1 Like

Thanks @chunkeey! 6x is a nice factor :smile:

I spent few hours testing IGMP snooping feature in R7800 switch (Atheros AR8337), my conclusion is that IGMPv2 is working fine, but IGMPv3 is brocken. With or without the global igmp_v3 key set to 1, the switch is dropping all IGMPv3 queries and reports on ports (at ingress).

root@LEDE:~# swconfig dev switch0 show
Global attributes:
     [...]
        igmp_snooping: 1
        igmp_v3: 1

According to the Qualcomm QCA8337N datasheet, there are many registries to manipulate IGMP/MLD. I should try to look at driver but I'm not sure to be efficient. Do you know someone who could help me ?

I've upgraded my R7800 to the latest snapshot release.
still seeing errors like these in my logs:

[301291.884900] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 117 tid 0
[301291.884982] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 117 tid 0
[301291.891547] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 117 tid 0
[301291.898902] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 117 tid 0
[314444.989139] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 130 tid 0
[314444.989220] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 130 tid 0
[314444.995644] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 130 tid 0
[314445.003171] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 130 tid 0
[315044.988668] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 131 tid 0
[315044.988773] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 131 tid 0
[315044.995327] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 131 tid 0
[315045.002654] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 131 tid 0
[315045.011077] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 131 tid 1
[315045.017397] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 131 tid 1
[315045.024841] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 131 tid 1
[315045.032212] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 131 tid 1
[316845.002705] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 135 tid 0
[316845.002784] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 135 tid 0
[316845.009310] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 135 tid 0
[316845.016713] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 135 tid 0
[316845.024132] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 135 tid 1
[316845.031391] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 135 tid 1
[316845.038857] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 135 tid 1
[316845.046273] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 135 tid 1
[324543.323520] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 137 tid 0
[324543.323602] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 137 tid 0
[324543.330025] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 137 tid 0
[324543.337545] ath10k_pci 0001:01:00.0: failed to lookup txq for peer_id 137 tid 0

anyone any idea, what could be causing these/ how i could prevent these?