Netgear R7800 exploration (IPQ8065, QCA9984)


root@R7800RT1:~# cat /etc/banner|grep Open
OpenWrt SNAPSHOT, r7427-f715d816b7

root@R7800RT1:~# uname -r

root@R7800RT1:~# ls -l /sys/kernel/debug/ieee80211/phy1/ath10k/tpc_stats
-r-------- 1 root root 0 Jul 7 13:48 /sys/kernel/debug/ieee80211/phy1/ath10k/tpc_stats

root@R7800RT1:~# cat /sys/kernel/debug/ieee80211/phy1/ath10k/tpc_stats

root@R7800RT1:/# [ 1380.213122] Kernel panic - not syncing: stack-protector: Kernel stack is corrupted in: bf7fad20
[ 1380.213122] 
[ 1380.213187] CPU1: stopping
[ 1380.222380] CPU: 1 PID: 3414 Comm: cat Not tainted 4.14.53 #0
[ 1380.224892] Hardware name: Generic DT based system
[ 1380.230755] [<c030f8e8>] (unwind_backtrace) from [<c030bb2c>] (show_stack+0x14/0x20)
[ 1380.235423] [<c030bb2c>] (show_stack) from [<c07846d8>] (dump_stack+0x88/0x9c)
[ 1380.243314] [<c07846d8>] (dump_stack) from [<c030eb58>] (handle_IPI+0xf4/0x1a8)
[ 1380.250343] [<c030eb58>] (handle_IPI) from [<c03014b8>] (gic_handle_irq+0x9c/0xb8)
[ 1380.257546] [<c03014b8>] (gic_handle_irq) from [<c030c70c>] (__irq_svc+0x6c/0x90)
[ 1380.265176] Exception stack(0xdb7cbce8 to 0xdb7cbd30)
[ 1380.272753] bce0:                   00000002 0000004e 00000000 00000004 e0965145 bf809f78
[ 1380.277797] bd00: bf809f78 db7cbd8c 00000014 e0a65000 c07dffa0 000ffecf 00000043 db7cbd38
[ 1380.285941] bd20: c079877c c0798780 80000013 ffffffff
[ 1380.294096] [<c030c70c>] (__irq_svc) from [<c0798780>] (vsnprintf+0x74/0x490)
[ 1380.299129] [<c0798780>] (vsnprintf) from [<c0798c34>] (scnprintf+0x28/0x54)
[ 1380.306328] [<c0798c34>] (scnprintf) from [<bf7e3334>] (ath10k_info+0xe8/0x1dc [ath10k_core])
[ 1380.313580] [<bf7e3334>] (ath10k_info [ath10k_core]) from [<bf7e534c>] (ath10k_tpc_stats_open+0x30c/0x40c [ath10k_core])
[ 1380.321853] [<bf7e534c>] (ath10k_tpc_stats_open [ath10k_core]) from [<c04a48c8>] (full_proxy_open+0x168/0x20c)
[ 1380.332737] [<c04a48c8>] (full_proxy_open) from [<c03e39e4>] (do_dentry_open.constprop.4+0x208/0x344)
[ 1380.342538] [<c03e39e4>] (do_dentry_open.constprop.4) from [<c03f6310>] (path_openat+0xd00/0x10b0)
[ 1380.351821] [<c03f6310>] (path_openat) from [<c03f7624>] (do_filp_open+0x68/0xc0)
[ 1380.360679] [<c03f7624>] (do_filp_open) from [<c03e4c8c>] (do_sys_open+0x16c/0x20c)
[ 1380.368233] [<c03e4c8c>] (do_sys_open) from [<c0307f60>] (ret_fast_syscall+0x0/0x54)
[ 1380.375697] Rebooting in 3 seconds..
[ 1384.384703] BUG: scheduling while atomic: swapper/0/0/0x00000100
[ 1384.384732] Modules linked in: pppoe ppp_async ath10k_pci ath10k_core ath pptp pppox ppp_mppe ppp_generic mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_esp xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CLASSIFY usbserial slhc nf_reject_ipv4 nf_nat_rtsp nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv4 nf_conntrack_rtsp nf_conntrack_rtcache nf_conntrack_netlink iptable_mangle iptable_filter ipt_ah ipt_ECN ip_tables crc_ccitt compat chaoskey fuse sch_cake act_skbedit act_mirred em_u32 cls_u32
[ 1384.437764]  cls_tcindex cls_flow cls_route cls_fw sch_tbf sch_htb sch_hfsc sch_ingress ledtrig_usbport xt_set ip_set_list_set ip_set_hash_netiface ip_set_hash_netport ip_set_hash_netnet ip_set_hash_net ip_set_hash_netportnet ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6t_NPT ip6t_MASQUERADE nf_nat_masquerade_ipv6 ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 nf_nat nf_conntrack ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_

U-Boot 2012.07 [local,local] (Sep 03 2015 - 17:33:28)

This is a serial console dump from PuTTY.


will send to ath10k mailing list

ok searching the problem on google....

there is already a patch to solve this...

will add it to the massive backport pr...


applying this patch brake the ethernet swtich completely... think you need to add the qca8k driver too... and also kernel configuration for dsa...


Yes /etc/config/network needs to be wiped before upgrade


umm no i tried to reset and i still have no eth connection


Maybe you only partially applied the patch. It touches multiple files.


i don't think.. i copied your patch and git apply it


Latest version:

I just flashed it and it works fine over here.


I've successfully tested the commit fixing the tpc_stats crash and filed an according pull request:


There is already a massive pr full of backport patch, with that included... Will rebase if they merge yours first


Recent update for original firmware has increased 5GHz Wifi txpower to 29dBm for channel 36, are OpenWRT going to increase it too?


Changes in txpower are unlikely, as they're determined by the intersection of hardware capabilities (it's unlikely that OpenWrt will suddenly come to a different conclusion here), hardware regulatory domain minus 3 dBm (missing tpc, this might change in the future if tpc were to be implemented in the linux driver, but I wouldn't hold my breath) and your own local regdom setting (which might change over time, but probably not in your favour).


i try to compile but get error

Applying ./patches/985-ath10k-debugfs-support-to-get-final-TPC-stats-for-10.4-variants.patch using plaintext: 
patching file drivers/net/wireless/ath/ath10k/core.h
patching file drivers/net/wireless/ath/ath10k/debug.c
Hunk #2 succeeded at 2419 (offset 6 lines).
Hunk #3 succeeded at 2633 (offset 6 lines).
patching file drivers/net/wireless/ath/ath10k/debug.h
patching file drivers/net/wireless/ath/ath10k/wmi-ops.h
patching file drivers/net/wireless/ath/ath10k/wmi.h
Hunk #6 FAILED at 4043.
1 out of 8 hunks FAILED -- saving rejects to file drivers/net/wireless/ath/ath10k/wmi.h.rej
patching file drivers/net/wireless/ath/ath10k/wmi.c
Hunk #6 FAILED at 4350.
Hunk #7 succeeded at 4381 (offset 6 lines).
Hunk #8 succeeded at 4425 (offset 6 lines).
Hunk #9 succeeded at 4484 (offset 6 lines).
Hunk #10 succeeded at 5817 (offset 6 lines).
Hunk #11 succeeded at 8298 (offset 6 lines).
Hunk #12 succeeded at 8765 (offset 6 lines).
1 out of 12 hunks FAILED -- saving rejects to file drivers/net/wireless/ath/ath10k/wmi.c.rej
Patch failed!  Please fix ./patches/985-ath10k-debugfs-support-to-get-final-TPC-stats-for-10.4-variants.patch!

I am picked,, and


You don't need to apply the last patch... It's already included in my commit


Has anyone had any luck getting VHT160 to work since the patch was merged? No matter what channel I choose it fails at e.g.

Fri Jul 20 21:07:24 2018 daemon.notice hostapd: wlan0: DFS-CAC-START freq=5180 chan=36 sec_chan=1, width=2, seg0=50, seg1=0, cac_time=60s
Fri Jul 20 21:07:24 2018 daemon.err hostapd: DFS start_dfs_cac() failed, -1


When I build based off of @hnyman's scripts with the 1160 and 1161 patches above applied, 160mhz seems to be working. It does not crash and works with my Intel 9260.


Thanks, I hadn't realised that there was another round of patches that aren't in master yet. Hopefully they can be merged soon?


Think you are referring to my pr... Someone should alert the Devs that it does exist...


Also 160 MHz you need to select a channel from 56 to 115 or so...


The Intel 9260ac only supports contiguous HT160 not split channel 80+80 bonding and so you can only use the lower channels for HT160.