Netgear R7800 exploration (IPQ8065, QCA9984)

@chunkeey that would be great (s.l-h gmx.de), thanks a lot!

No, you don't need modified board-2.bin, it works oob from Kvalo's or CAF repo

Well, there were two discussions on the ML about this. https://patchwork.kernel.org/patch/9615181/ (IPQ4019).
I ran into this problem with the RT-AC58U. It worked very poorly with the standard board-2.bin, which were supplied by ath10k-firmware repo or Kvalo's CAF repo. And I was not alone, Sven Eckelmann had similar issues with his board.

I think, the QCA9984s will work "OK, but not great" as long as Netgear, Zyxel, ... stick 100% to Qualcomm's Reference designs and RF-Layout designs.

However, If they don't, the performance and regdom conformance will fall apart.
Take a look at the values in the board-2.bin and compare those to Kvalo's CAF or ath10k-firmware repository. You'll see that there are substantial differences.

In fact, it looks like Netgear ships with no less than three board files.
https://github.com/paul-chambers/netgear-r7800/tree/master/package/qca-wifi-fw/files

boardData_QCA9984_CUS239_5G_v1_001.bin
boardData_QCA9984_CUS239_5G_v1_NEW_FCC_001.bin
boardData_QCA9984_CUS239_5G_v1_PR_001.bin

Based on the name. The NEW_FCC is for the US (maybe Canda too?). PR probably stands for China and the default one could be for everywhere else. What's missing is a reference to the switcher... But knowing Qualcomm Atheros, it's probably implemented somewhere in the umac/ath_hal/ath_dev modules. Otherwise, Netgear/Zyxel/... probably won't add those files.

Aha, I see, went through ML discussion. Will verify how it goes then.
Btw isn't it better to use more recent boardData_QCA9984_CUS239_5G_v1_xxx.bin instead of boarddata_0.bin for incorporating into board-2.bin?

Edit: And can't there be a situation that in some future units bmi id of qca9984 chips will differ from current ones?

edit2: here is the list of board files in OEM rom:
boardData_QCA9984_CUS238_5G_v1_003.bin
boardData_QCA9984_CUS238_5G_v1_003_CTL.bin
boardData_QCA9984_CUS239_5G_v1_001.bin
boardData_QCA9984_CUS239_5G_v1_001_ctl.bin
boardData_QCA9984_CUS239_5G_v1_NEW_FCC_001.bin
boardData_QCA9984_CUS239_5G_v1_PR_001.bin
boardData_QCA9984_CUS239_high_band_5G_v1_006.bin
boardData_QCA9984_CUS239_low_band_5G_v1_005.bin
boardData_QCA9984_CUS239_low_pwr_pa_5G_v1_007.bin
boardData_QCA9984_CUS239_negative_pwr_offset_5G_v1_008.bin
boardData_QCA9984_CUS240_2G_v1_004.bin
boardData_QCA9984_CUS240_2G_v1_004_CTL.bin
boardData_QCA9984_CUS260_2G_v1_002.bin
boardData_QCA9984_CUS260_2G_v1_002_ctl.bin
boardData_QCA9984_CUS260_2G_v1_PR_002.bin
boardData_QCA9984_CUS260_negative_pwr_offset_2G_v1_009.bin
boarddata_0.bin
boarddata_1.bin

Hi @dissent1. I check connection speed using IPoE with last snapshot and using Your "ipq806x: use upstream switch phy driver (DSA)" patch

Snapshot speed (Mbit/s):
wireless:
up: 380
down 280
wired
up: 550
down: 654

With patch:
wireless:
up: 378
down: 410
wired:
up: 550
down: 450

Bootlog with "add multiple cpu ports qca8k" patch:
Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.31 (hyniu@o2.pl) (gcc version 5.4.0 (LEDE GCC 5.4.0 r4356-7f91cab) ) #0 SMP Thu Jun 8 17:58:41 UTC 2017
[    0.000000] CPU: ARMv7 Processor [512f04d0] revision 0 (ARMv7), cr=10c5787d
[    0.000000] CPU: div instructions available: patching division code
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt:Machine model: TP-Link Archer C2600
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 13 pages/cpu @ddc05000 s21004 r8192 d24052 u53248
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 121920
[    0.000000] Kernel command line:
[    0.000000] Bootloader command line (ignored): console=ttyHSL1,115200n8 root=mtd:rootfs rootfstype=squashfs
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 481084K/491520K available (3831K kernel code, 245K rwdata, 1228K rodata, 240K init, 242K bss, 10436K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xde800000 - 0xff800000   ( 528 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xde000000   ( 480 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0208000 - 0xc05c6190   (3833 kB)
[    0.000000]       .init : 0xc071a000 - 0xc0756000   ( 240 kB)
[    0.000000]       .data : 0xc0756000 - 0xc07936c0   ( 246 kB)
[    0.000000]        .bss : 0xc0795000 - 0xc07d1868   ( 243 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: dg_timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 305801671480 ns
[    0.000008] sched_clock: 32 bits at 6MHz, resolution 160ns, wraps every 343597383600ns
[    0.000022] Switching to timer-based delay loop, resolution 160ns
[    0.000237] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.50 BogoMIPS (lpj=62500)
[    0.000258] pid_max: default: 32768 minimum: 301
[    0.000366] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000381] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.001039] CPU: Testing write buffer coherency: ok
[    0.001322] Setting up static identity map for 0x42208280 - 0x422082d8
[    0.004613] Brought up 2 CPUs
[    0.004629] SMP: Total of 2 processors activated (25.00 BogoMIPS).
[    0.004638] CPU: All CPU(s) started in SVC mode.
[    0.017966] VFP support v0.3: implementor 51 architecture 64 part 4d variant 2 rev 0
[    0.018163] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.018191] futex hash table entries: 512 (order: 3, 32768 bytes)
[    0.018276] pinctrl core: initialized pinctrl subsystem
[    0.019585] NET: Registered protocol family 16
[    0.019833] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.051773] cpuidle: using governor ladder
[    0.082789] cpuidle: using governor menu
[    0.084925] qcom_rpm 108000.rpm: could not find pctldev for node /soc/pinmux@800000/i2c4_pinmux, deferring probe
[    0.135496] msm_bus_fabric_init_driver
[    0.136630] usbcore: registered new interface driver usbfs
[    0.136722] usbcore: registered new interface driver hub
[    0.136813] usbcore: registered new device driver usb
[    0.136869] pps_core: LinuxPPS API ver. 1 registered
[    0.136882] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.136916] PTP clock support registered
[    0.138775] clocksource: Switched to clocksource dg_timer
[    0.142910] NET: Registered protocol family 2
[    0.143499] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.143544] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.143602] TCP: Hash tables configured (established 4096 bind 4096)
[    0.143656] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.143679] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.143878] NET: Registered protocol family 1
[    0.145414] No memory allocated for crashlog
[    0.145738] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    0.152163] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.152178] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.158745] io scheduler noop registered
[    0.158763] io scheduler deadline registered (default)
[    0.160294] 1b500000.pci supply vdda not found, using dummy regulator
[    0.160397] 1b500000.pci supply vdda_phy not found, using dummy regulator
[    0.160496] 1b500000.pci supply vdda_refclk not found, using dummy regulator
[    0.161306] OF: PCI: host bridge /soc/pci@1b500000 ranges:
[    0.161346] OF: PCI:    IO 0x0fe00000..0x0fefffff -> 0x0fe00000
[    0.161372] OF: PCI:   MEM 0x08000000..0x0fdfffff -> 0x08000000
[    0.269685] qcom-pcie 1b500000.pci: link up
[    0.271760] qcom-pcie 1b500000.pci: PCI host bridge to bus 0000:00
[    0.271783] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.271802] pci_bus 0000:00: root bus resource [io  0x0000-0xfffff] (bus address [0xfe00000-0xfefffff])
[    0.271817] pci_bus 0000:00: root bus resource [mem 0x08000000-0x0fdfffff]
[    0.272352] PCI: bus0: Fast back to back transfers disabled
[    0.274480] PCI: bus1: Fast back to back transfers disabled
[    0.274824] pci 0000:00:00.0: BAR 8: assigned [mem 0x08000000-0x081fffff]
[    0.274848] pci 0000:01:00.0: BAR 0: assigned [mem 0x08000000-0x081fffff 64bit]
[    0.274975] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.274997] pci 0000:00:00.0:   bridge window [mem 0x08000000-0x081fffff]
[    0.275803] 1b700000.pci supply vdda not found, using dummy regulator
[    0.275906] 1b700000.pci supply vdda_phy not found, using dummy regulator
[    0.275991] 1b700000.pci supply vdda_refclk not found, using dummy regulator
[    0.276773] OF: PCI: host bridge /soc/pci@1b700000 ranges:
[    0.276813] OF: PCI:    IO 0x31e00000..0x31efffff -> 0x31e00000
[    0.276837] OF: PCI:   MEM 0x2e000000..0x31dfffff -> 0x2e000000
[    0.387113] qcom-pcie 1b700000.pci: link up
[    0.389130] qcom-pcie 1b700000.pci: PCI host bridge to bus 0001:00
[    0.389149] pci_bus 0001:00: root bus resource [bus 00-ff]
[    0.389165] pci_bus 0001:00: root bus resource [mem 0x2e000000-0x31dfffff]
[    0.389644] PCI: bus0: Fast back to back transfers disabled
[    0.391716] PCI: bus1: Fast back to back transfers disabled
[    0.392195] pci 0001:00:00.0: BAR 8: assigned [mem 0x2e000000-0x2e1fffff]
[    0.392216] pci 0001:01:00.0: BAR 0: assigned [mem 0x2e000000-0x2e1fffff 64bit]
[    0.392338] pci 0001:00:00.0: PCI bridge to [bus 01]
[    0.392357] pci 0001:00:00.0:   bridge window [mem 0x2e000000-0x2e1fffff]
[    0.395347] L2 @ QSB rate. Forcing new rate.
[    0.395539] L2 @ 384000 KHz
[    0.395716] CPU0 @ 800000 KHz
[    0.395728] CPU1 @ QSB rate. Forcing new rate.
[    0.395853] CPU1 @ 384000 KHz
[    0.398558] gsbi 16300000.gsbi: GSBI port protocol: 6 crci: 0
[    0.400114] gsbi 1a200000.gsbi: GSBI port protocol: 3 crci: 0
[    0.401608] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.402513] msm_serial 16340000.serial: msm_serial: detected port #0
[    0.402622] msm_serial 16340000.serial: uartclk = 7372800
[    0.402698] 16340000.serial: ttyMSM0 at MMIO 0x16340000 (irq = 167, base_baud = 460800) is a MSM
[    0.402732] msm_serial: console setup on port #0
[    1.111807] console [ttyMSM0] enabled
[    1.116536] msm_serial: driver initialized
[    1.127584] loop: module loaded
[    1.129041] spi_qup 1a280000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64
[    1.131121] m25p80 spi32766.0: mx25u25635f (32768 Kbytes)
[    1.137063] 25 ofpart partitions found on MTD device spi32766.0
[    1.142314] Creating 25 MTD partitions on "spi32766.0":
[    1.147944] 0x000000000000-0x000000020000 : "SBL1"
[    1.154326] 0x000000020000-0x000000040000 : "MIBIB"
[    1.159404] 0x000000040000-0x000000060000 : "SBL2"
[    1.163772] 0x000000060000-0x000000090000 : "SBL3"
[    1.168656] 0x000000090000-0x0000000a0000 : "DDRCONFIG"
[    1.173504] 0x0000000a0000-0x0000000b0000 : "SSD"
[    1.178512] 0x0000000b0000-0x0000000e0000 : "TZ"
[    1.183484] 0x0000000e0000-0x000000100000 : "RPM"
[    1.188120] 0x000000100000-0x000000170000 : "fs-uboot"
[    1.192729] 0x000000170000-0x0000001b0000 : "uboot-env"
[    1.197730] 0x0000001b0000-0x0000001f0000 : "radio"
[    1.202907] 0x0000001f0000-0x0000003f0000 : "os-image"
[    1.207696] 0x0000003f0000-0x000001ef0000 : "rootfs"
[    1.212968] mtd: device 12 (rootfs) set to be root filesystem
[    1.217289] 1 squashfs-split partitions found on MTD device rootfs
[    1.222749] 0x000000690000-0x000001ef0000 : "rootfs_data"
[    1.229826] 0x000001ef0000-0x000001ef0200 : "default-mac"
[    1.235244] 0x000001ef0200-0x000001ef0400 : "pin"
[    1.240672] 0x000001ef0400-0x000001f00000 : "product-info"
[    1.245342] 0x000001f00000-0x000001f10000 : "partition-table"
[    1.250792] 0x000001f10000-0x000001f20000 : "soft-version"
[    1.256477] 0x000001f20000-0x000001f30000 : "support-list"
[    1.261972] 0x000001f30000-0x000001f40000 : "profile"
[    1.267347] 0x000001f40000-0x000001f50000 : "default-config"
[    1.272560] 0x000001f50000-0x000001f90000 : "user-config"
[    1.278479] 0x000001f90000-0x000001fd0000 : "qos-db"
[    1.283596] 0x000001fd0000-0x000001fe0000 : "usb-config"
[    1.288752] 0x000001fe0000-0x000002000000 : "log"
[    1.294727] libphy: GPIO Bitbanged MDIO: probed
[    1.305205] mdio_bus gpio-0:10: mdio_device_register
[    1.306274] libphy: Fixed MDIO Bus: probed
[    1.309355] libphy: mdio_driver_register: qca8k
[    1.316932] stmmac - user ID: 0x10, Synopsys ID: 0x37
[    1.317569]  Ring mode enabled
[    1.322878]  DMA HW capability register supported[    1.325728]  Enhanced/Alternate descriptors
[    1.331371]  Enabled extended descriptors
[    1.334328]  RX Checksum Offload Engine supported
[    1.338496]  COE Type 2
[    1.343313]  TX Checksum insertion supported
[    1.345439]  Wake-Up On Lan supported
[    1.350014]  Enable RX Mitigation via HW Watchdog Timer
[    1.355447] stmmac - user ID: 0x10, Synopsys ID: 0x37
[    1.358549]  Ring mode enabled
[    1.363839]  DMA HW capability register supported[    1.366708]  Enhanced/Alternate descriptors
[    1.372348]  Enabled extended descriptors
[    1.375305]  RX Checksum Offload Engine supported
[    1.379539]  COE Type 2
[    1.384156]  TX Checksum insertion supported
[    1.386416]  Wake-Up On Lan supported
[    1.391001]  Enable RX Mitigation via HW Watchdog Timer
[    1.395246] i2c /dev entries driver
[    1.400434] Calibration not found.
[    1.403003] qcom-tsens 900000.thermal-sensor: tsens calibration failed
[    1.407534] Speed bin: 0
[    1.413058] PVS bin: 1
[    1.417461] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    1.417894] cpuidle: enable-method property 'qcom,kpss-acc-v1' found operations
[    1.425645] sdhci: Secure Digital Host Controller Interface driver
[    1.432427] sdhci: Copyright(c) Pierre Ossman
[    1.438590] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.444755] NET: Registered protocol family 10
[    1.450320] NET: Registered protocol family 17
[    1.453288] 8021q: 802.1Q VLAN Support v1.8
[    1.457482] Registering SWP/SWPB emulation handler
[    1.473742] qcom_rpm 108000.rpm: RPM firmware 3.0.16777342
[    1.485410] s1a: Bringing 0uV into 1050000-1050000uV
[    1.485738] s1b: Bringing 0uV into 1050000-1050000uV
[    1.489844] s2a: Bringing 0uV into 800000-800000uV
[    1.494689] s2b: Bringing 0uV into 800000-800000uV
[    1.500550] Unable to handle kernel NULL pointer dereference at virtual address 00000070
[    1.503765] pgd = c0204000
[    1.512090] [00000070] *pgd=00000000
[    1.517911] Internal error: Oops: 805 [#1] SMP ARM
[    1.518170] Modules linked in:
[    1.525894] CPU: 0 PID: 25 Comm: kworker/0:1 Not tainted 4.9.31 #0
[    1.525982] Hardware name: Generic DT based system
[    1.532080] Workqueue: events deferred_probe_work_func
[    1.541947] task: dd47f900 task.stack: dd5b6000
[    1.542055] PC is at dsa_register_switch+0x380/0x7f0
[    1.546384] LR is at dsa_register_switch+0x440/0x7f0
[    1.551593] pc : [<c05b6714>]    lr : [<c05b67d4>]    psr: 80000013
[    1.551593] sp : dd5b7e50  ip : 00000000  fp : dcc1c108
[    1.556548] r10: dcc1c0fc  r9 : dd41b000  r8 : 00000000
[    1.567737] r7 : dcc75e10  r6 : 00000000  r5 : dcc75e10  r4 : dcc1c000
[    1.572948] r3 : 00000000  r2 : 0000001c  r1 : 1d4b6000  r0 : 80000013
[    1.579546] Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    1.586057] Control: 10c5787d  Table: 4220406a  DAC: 00000051
[    1.593259] Process kworker/0:1 (pid: 25, stack limit = 0xdd5b6210)
[    1.598989] Stack: (0xdd5b7e50 to 0xdd5b8000)
[    1.605075] 7e40:                                     00000000 c0473a24 dcc1c0f8 dcc1c108
[    1.609606] 7e60: dcc75e10 00000000 00000000 00000006 00000004 dcc1e400 c07c8fdc 00000000
[    1.617767] 7e80: c078a444 00000004 00000000 dd591c18 00000008 c0422494 00000000 dd5b7ec8
[    1.625926] 7ea0: c04226b8 dcc1e434 ddc0c600 c0420ea0 dd555e70 dd7edcb8 dcc1e400 c0789c74
[    1.634085] 7ec0: 00000001 c0422310 dcc1e400 00000001 00000001 c0787070 c0789c74 dcc1e400
[    1.642244] 7ee0: 00000000 c0421a54 c0787070 dcc1e400 c0787090 c0421ea0 dd591c00 c0787098
[    1.650405] 7f00: ddc09340 c0231044 dd591c00 c0787098 dd591c00 dd591c18 ddc09340 dd5b6000
[    1.658564] 7f20: ddc09358 c0758d00 dd591c18 c02311a8 dd591c00 ddc09340 ddc09340 c0231d50
[    1.666723] 7f40: dd591c00 dd5960c0 00000000 dd591c00 c0231a54 00000000 00000000 00000000
[    1.674883] 7f60: 00000000 c0235c8c 66c860a6 00000000 c0110e7c dd591c00 00000000 00000000
[    1.683045] 7f80: dd5b7f80 dd5b7f80 00000000 00000000 dd5b7f90 dd5b7f90 dd5b7fac dd5960c0
[    1.691202] 7fa0: c0235bb4 00000000 00000000 c020ec78 00000000 00000000 00000000 00000000
[    1.699361] 7fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[    1.707521] 7fe0: 00000000 00000000 00000000 00000000 00000013 00000000 fc058431 0561b6e6
[    1.715682] [<c05b6714>] (dsa_register_switch) from [<c0422494>] (driver_probe_device+0x10c/0x254)
[    1.723831] [<c0422494>] (driver_probe_device) from [<c0420ea0>] (bus_for_each_drv+0x80/0x90)
[    1.732681] [<c0420ea0>] (bus_for_each_drv) from [<c0422310>] (__device_attach+0x78/0xcc)
[    1.741273] [<c0422310>] (__device_attach) from [<c0421a54>] (bus_probe_device+0x28/0x80)
[    1.749432] [<c0421a54>] (bus_probe_device) from [<c0421ea0>] (deferred_probe_work_func+0x50/0x74)
[    1.757600] [<c0421ea0>] (deferred_probe_work_func) from [<c0231044>] (process_one_work+0x1d4/0x310)
[    1.766449] [<c0231044>] (process_one_work) from [<c02311a8>] (process_scheduled_works+0x28/0x30)
[    1.775736] [<c02311a8>] (process_scheduled_works) from [<c0231d50>] (worker_thread+0x2fc/0x414)
[    1.784510] [<c0231d50>] (worker_thread) from [<c0235c8c>] (kthread+0xd8/0xec)
[    1.793366] [<c0235c8c>] (kthread) from [<c020ec78>] (ret_from_fork+0x14/0x3c)
[    1.800399] Code: e7832001 e121f000 e5953010 e288201c (e7839102)
[    1.807695] ---[ end trace 86f6029a6c521b28 ]---
[    1.813808] Kernel panic - not syncing: Fatal exception
[    1.818447] CPU1: stopping
[    1.823389] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G      D         4.9.31 #0
[    1.826163] Hardware name: Generic DT based system
[    1.833408] [<c0215670>] (unwind_backtrace) from [<c0211f1c>] (show_stack+0x10/0x14)
[    1.838080] [<c0211f1c>] (show_stack) from [<c0394ce4>] (dump_stack+0x7c/0x9c)
[    1.845974] [<c0394ce4>] (dump_stack) from [<c02149b8>] (handle_IPI+0xcc/0x184)
[    1.853001] [<c02149b8>] (handle_IPI) from [<c02093f8>] (gic_handle_irq+0x78/0x94)
[    1.860213] [<c02093f8>] (gic_handle_irq) from [<c02129cc>] (__irq_svc+0x6c/0x90)
[    1.867832] Exception stack(0xdd473f90 to 0xdd473fd8)
[    1.875397] 3f80:                                     00000001 00000000 00000000 c021a3c0
[    1.880455] 3fa0: 00000000 dd472000 c0758fe4 00000002 c07529f0 00000000 dd473fe8 00000001
[    1.888606] 3fc0: 00000001 dd473fe0 c020f510 c020f514 60000013 ffffffff
[    1.896761] [<c02129cc>] (__irq_svc) from [<c020f514>] (arch_cpu_idle+0x2c/0x38)
[    1.903183] [<c020f514>] (arch_cpu_idle) from [<c024ee24>] (cpu_startup_entry+0xe8/0x198)
[    1.910817] [<c024ee24>] (cpu_startup_entry) from [<422094ac>] (0x422094ac)
[    1.918879] Rebooting in 1 seconds..
1 Like

Much appreciated!

1 Like

I have run into strange wifi trouble with my R7800 build for 17.01 branch: building from the current HEAD of the 17.01 branch make radio1 to fail. The earlier 17.01 builds upto r3422-b78bcdf619. worked ok, as does the official 17.01.2 build of r3435-65eec8bd5f. But my personal build r3437-a6b5ddfd9b fails. (I think that the only possible difference between the release 17.01.2 build by my build is possibly CONFIG_ATH_USER_REGD=y and CONFIG_PACKAGE_ATH_DFS=y in my build. I haven't checked the release for those options but they may be absent.)

In any case now my 17.01 build fails radio1 with errors like:

[   30.720699] ath10k_pci 0001:01:00.0: enabling device (0140 -> 0142)
[   30.720807] ath10k_pci 0001:01:00.0: enabling bus mastering
[   30.721324] ath10k_pci 0001:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   30.850119] ath10k_pci 0001:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0001:01:00.0.bin failed with error -2
[   30.850161] ath10k_pci 0001:01:00.0: Falling back to user helper
[   31.242322] ath10k_pci 0001:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[   31.242381] ath10k_pci 0001:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[   31.257107] ath10k_pci 0001:01:00.0: firmware ver 10.4-3.4-00072 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast crc32 75ec955f
[   31.280234] ath10k_pci 0001:01:00.0: failed to fetch board data for bus=pci,vendor=168c,device=0046,subsystem-vendor=168c,subsystem-device=cafe from ath10k/QCA9984/hw1.0/board-2.bin
[   31.280373] ath10k_pci 0001:01:00.0: board_file api 1 bmi_id N/A crc32 dd636801
[   33.348520] ath10k_pci 0001:01:00.0: unable to read from the device
[   33.348545] ath10k_pci 0001:01:00.0: could not execute otp for board id check: -110
[   33.353589] ath10k_pci 0001:01:00.0: failed to get board id: -110
[   35.368529] ath10k_pci 0001:01:00.0: unable to read from the device (-110)
[   35.368551] ath10k_pci 0001:01:00.0: could not read board ext data addr (-110)
[   35.374286] ath10k_pci 0001:01:00.0: could not push board ext data (-110)
[   35.381551] ath10k_pci 0001:01:00.0: failed to download board data: -110
[   35.388351] ath10k_pci 0001:01:00.0: failed to run otp: -110
[   35.395173] ath10k_pci 0001:01:00.0: could not init core (-110)
[   35.400863] ath10k_pci 0001:01:00.0: could not probe fw (-110)

I have built several times, but have found no obvious reason for the failure or solution.

I decided to to fix that by backporting the otp fixes from @dissent1

OTP fixes work ok and now my R7800 runs 17.01 with properly identified and calibrated radios:

[   37.260259] ath10k_pci 0001:01:00.0: pci irq msi oper_irq_mode 2 irq_mode 0 reset_mode 0
[   37.390005] ath10k_pci 0001:01:00.0: Direct firmware load for ath10k/pre-cal-pci-0001:01:00.0.bin failed with error -2
[   37.390042] ath10k_pci 0001:01:00.0: Falling back to user helper
[   37.808590] ath10k_pci 0001:01:00.0: qca9984/qca9994 hw1.0 target 0x01000000 chip_id 0x00000000 sub 168c:cafe
[   37.808623] ath10k_pci 0001:01:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[   37.819418] ath10k_pci 0001:01:00.0: firmware ver 10.4-3.4-00082 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast crc32 f301de65
[   40.089782] ath10k_pci 0001:01:00.0: board_file api 2 bmi_id 0:2 crc32 751efba1
[   45.939850] ath10k_pci 0001:01:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 512 raw 0 hwcrypto 1

The backport consists of three components:

  • ath10k QCA9984 firmware updates ( commits 4101020d, 6c344e39, a124f073, a1afee24). I skipped the qca4019 and "ct" specific things, but at least the "ct" things should likely be included if this gets officially backported to 17.01. I have also not really looked into possible qca988x changes)
  • removal of the old 936-ath10k_skip_otp_check.patch (done by commit cc189c0b7) and replacing it with the same (possibly unnecessary) new 936 patch as currently in master (commit c69a89fe)
  • the two new commits from @dissent1 for properly reading board ID and calibration data (48ae1f53, e980f3b6 in PR https://github.com/lede-project/source/pull/1153)

I have placed an unified patch of these changes into my R7800 community firmware download page:
https://www.dropbox.com/sh/ew0gap0crn30wyk/AADQLCBF5All8wc8RXmxisqAa

1 Like

Thanks for all the effort put into this device. Would you say it's stable with lede?

Sure. I have been using R7800 with LEDE as my main router since last year.

1 Like

What is your CPU usage with Samba/USB transfers with it? A friend had a 1900ACS and it literally was getting double the transfer speeds with half the CPU usage when using Samba with the same equipment except the router.

He tried LEDE trunk with the 4.9 kernel, and the "stable" release with 4.4, they both behave the same. Any tips/ideas?

Your milage will vary. @hnyman has been having a lot of luck with his unit and use. I on the other hand have been plagued by crashing of the 2.4ghz radio

Try replacing your cal files with his.

I'm pretty sure that 2.4 ghz issue is firmware/calibration irrespective, hope it will get better with newer compat wireless

How do we do that? I would also like to mention that using any form of QoS, either fq_codel with simple.qos or cake with piece.of.cake, both result in almost halving his max download speed (his connection is 200/10) and in 50%+ CPU usage in top.

What are cal files and what can we do about them? I have Linux experience, I just don't know what it is you mentioned. We don't seem to have WiFi issues with the router.

dissent1 says its irrespective of it and he may be right, it helped me but that's because mine was an engineering sample. Without the cal files I dont even get WiFi in LUCI as an option in LEDE, seems my beta test device's cal files aren't properly read or maybe empty. Using the D7800's cal files got me WiFi but I had crashes under heavy load on both radios. However since using the retail R7800's files from hnyman all is good for me so far.

However if you want to try, do the following:
Basically use WinSCP to copy hnyman's cal files (2 of them), from his dropbox at the top of this thread, and replace the originals in the router at the following location:

/lib/firmware/ath10k/cal-pci-0001:01:00.0.bin
/lib/firmware/ath10k/cal-pci-0000:01:00.0.bin

Does this mean a lede firmware does not contain all the files for every partition?

Maybe it matters which stock fimware you were on before flashing lede?

No this is an issue for pretty much all R7800 and D7800 "Engineering Sample" beta testers regardless of stock firmware version. Only way to get WiFi on LEDE working for us is to replace our cal files with ones from retail units.

So, does anyone actually uses this router with any Lede distro (trunk, official 17.01.2, or the custom builds), and they actually have proper USB and QoS performance? With connections above 100Mbit.

USB was no worse than stock for me with 17.0.1.2, SQM - Piece of Cake was amazing but I have a 36 Mbit connection, shouldn't be any worse with 100 Mbits.

Truly, USB was as bad as the stock was. Any kind of QoS would limit his connection to 100-120Mbit though, with insane CPU usage.

The 1900ACS we used as a comparison was almost a class faster, which is weird.