Build for Netgear R7800

Hello. I've been using hnyman's r3xxx builds on the R7800, and I have to say, they have been stable thus far. Performance is comparable to stock firmware—if not better.

After flashing the latest build as of this writing (r3585-421754191d), I've encountered some interesting error messages from the Kernel log:

[17177.543374] ath10k_pci 0001:01:00.0: received unexpected tx_fetch_ind event: in push mode
[17177.543429] ath10k_pci 0001:01:00.0: received unexpected tx_fetch_ind event: in push mode
[17177.550576] ath10k_pci 0001:01:00.0: received unexpected tx_fetch_ind event: in push mode
[17177.558843] ath10k_pci 0001:01:00.0: received unexpected tx_fetch_ind event: in push mode
[17177.566971] ath10k_pci 0001:01:00.0: received unexpected tx_fetch_ind event: in push mode
[17177.575137] ath10k_pci 0001:01:00.0: received unexpected tx_fetch_ind event: in push mode
[17177.583288] ath10k_pci 0001:01:00.0: received unexpected tx_fetch_ind event: in push mode
[17177.591347] ath10k_pci 0001:01:00.0: received unexpected tx_fetch_ind event: in push mode
[17177.599615] ath10k_pci 0001:01:00.0: received unexpected tx_fetch_ind event: in push mode
[17177.607770] ath10k_pci 0001:01:00.0: received unexpected tx_fetch_ind event: in push mode
[21620.527479] ------------[ cut here ]------------
[21620.527654] WARNING: CPU: 0 PID: 6 at compat-wireless-2017-01-31/drivers/net/wireless/ath/ath10k/mac.c:7132 ath10k_reconfig_complete+0xe4/0x294 [ath10k_core]()
[21620.531216] Modules linked in: pppoe ppp_async iptable_nat ip6table_nat pptp pppox ppp_mppe ppp_generic nf_nat_ipv6 nf_nat_ipv4 nf_conntrack_ipv6 nf_conntrack_ipv4 ipt_REJECT ipt_MASQUERADE 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_DSCP xt_CLASSIFY usbserial slhc nf_reject_ipv4 nf_nat_rtsp nf_nat_redirect nf_nat_masquerade_ipv4 nf_log_ipv4 nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtsp nf_conntrack_rtcache nf_conntrack_netlink iptable_mangle iptable_filter ipt_ah ipt_ECN ip_tables crc_ccitt fuse sch_cake act_skbedit act_mirred em_u32 cls_u32 cls_tcindex cls_flow cls_route cls_fw sch_tbf sch_htb sch_hfsc sch_ingress ath10k_pci ath10k_core ath mac80211 cfg80211 compat 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 nf_nat nf_conntrack ip6t_REJECT nf_reject_ipv6 nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables x_tables msdos ip_gre gre ifb sit tunnel4 ip_tunnel tun vfat fat hfsplus cifs nls_utf8 nls_iso8859_15 nls_iso8859_1 nls_cp850 nls_cp437 nls_cp1250 sha256_generic sha1_generic md5 md4 hmac ecb des_generic usb_storage leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_of_simple ohci_platform ohci_hcd phy_qcom_dwc3 ahci ehci_platform ehci_hcd sd_mod ahci_platform libahci_platform libahci libata scsi_mod gpio_button_hotplug ext4 jbd2 mbcache exfat usbcore nls_base usb_common crc32c_generic
[21620.707314] CPU: 0 PID: 6 Comm: kworker/u4:0 Not tainted 4.4.93 #0
[21620.707577] Hardware name: Qualcomm (Flattened Device Tree)
[21620.713805] Workqueue: phy0 ieee80211_csa_finalize_work [mac80211]
[21620.725394] [<c02207c4>] (unwind_backtrace) from [<c021d258>] (show_stack+0x14/0x20)
[21620.725484] [<c021d258>] (show_stack) from [<c03bd3c8>] (dump_stack+0x8c/0xa0)
[21620.733294] [<c03bd3c8>] (dump_stack) from [<c0228b88>] (warn_slowpath_common+0xa4/0xd0)
[21620.740317] [<c0228b88>] (warn_slowpath_common) from [<c0228c68>] (warn_slowpath_null+0x1c/0x24)
[21620.748630] [<c0228c68>] (warn_slowpath_null) from [<bf51ac7c>] (ath10k_reconfig_complete+0xe4/0x294 [ath10k_core])
[21620.757497] [<bf51ac7c>] (ath10k_reconfig_complete [ath10k_core]) from [<bf5202bc>] (ath10k_sta_state+0xce8/0xe74 [ath10k_core])
[21620.767600] [<bf5202bc>] (ath10k_sta_state [ath10k_core]) from [<bf520484>] (ath10k_mac_op_switch_vif_chanctx+0x3c/0x5c [ath10k_core])
[21620.779435] [<bf520484>] (ath10k_mac_op_switch_vif_chanctx [ath10k_core]) from [<bf490890>] (drv_switch_vif_chanctx+0xfc/0x168 [mac80211])
[21620.791388] [<bf490890>] (drv_switch_vif_chanctx [mac80211]) from [<bf4c4928>] (ieee80211_vif_unreserve_chanctx+0x45c/0xbb8 [mac80211])
[21620.803778] [<bf4c4928>] (ieee80211_vif_unreserve_chanctx [mac80211]) from [<bf4c5660>] (ieee80211_vif_use_reserved_context+0xb8/0x148 [mac80211])
[21620.815848] [<bf4c5660>] (ieee80211_vif_use_reserved_context [mac80211]) from [<bf4ac544>] (ieee80211_csa_finalize_work+0x64/0xa0 [mac80211])
[21620.828962] [<bf4ac544>] (ieee80211_csa_finalize_work [mac80211]) from [<c023e3d8>] (process_one_work+0x238/0x3f4)
[21620.841624] [<c023e3d8>] (process_one_work) from [<c023e8b4>] (worker_thread+0x320/0x528)
[21620.851866] [<c023e8b4>] (worker_thread) from [<c0243aec>] (kthread+0xf8/0x100)
[21620.860112] [<c0243aec>] (kthread) from [<c0209cb8>] (ret_from_fork+0x14/0x3c)
[21620.867313] ---[ end trace 0c3fa0ff2a930e1d ]---
[21620.875469] ath10k_warn: 7 callbacks suppressed
[21620.879286] ath10k_pci 0001:01:00.0: SWBA overrun on vdev 0, skipped old beacon
[21620.883768] ath10k_pci 0001:01:00.0: SWBA overrun on vdev 1, skipped old beacon
[21620.891075] ath10k_pci 0001:01:00.0: SWBA overrun on vdev 0, skipped old beacon

I've done some digging on some of these messages, but for the most part they seem to be esoteric in nature. Using the ath10k codebase over at github as a reference, the first set of errors is caused by line 2079 in htt_rx.c. Seems to have something to do with "push-pull tx" implementation a while back.

Nonetheless, after these odd issues, there doesn't seem to be any actual problem with the WiFi as far as I can tell. Just wanted to share since a lot of these error messages haven't cropped up it looks like in the past year or so...

FWIW: I did a sysupgrade firmware flash from hnyman's r3580 -> r3585. Never encountered these errors on the previous firmware (which happens to be a "clean" flash from stock firmware).

Thanks!

A bit suprsing, as you are talking about the 17.01 stable branch which has not seen relevant-looking changes for some time.

Indeed. It's more of an interesting occurrence than an issue though.

A bit of an update: at the moment I'm running two guest network bands, and the 5G channel suddenly changed from 52 VHT80 to 149 VHT80. I don't suspect these messages to relate to the errors I've seen, since channel 52 in the US is DFS. On the other hand, these messages show some kind of dump, which could mean a crash somewhere. DFS is weird though, so I'll just leave it at that.

I want to confirm a few "known" things real quick and see if I am understanding everything correctly:

  • The 17.01 build is stable has no issues with WiFi speed.
  • The master build is stable but does seem to have some issues when it comes to the speed of the WiFi connections. @hnyman is aware of this but is not a heavy wifi user so obviously isn't too concerned with the speed issue.

Are these assumptions above correct?

If so, have any others begun troubleshoot the speed issues on the master build on another thread somewhere? If not, is anyone interested in fixing this with me or atleast looking at potential issues?

Do we know why speed might be affected on the master branch?

Thank you.

Not sure this is still an issue?

From my limited testing, simply running iperf a couple of times to/from a client to the R7800, there is not much difference between stable and master and little variance over all tests.

iperf3 compare wired
iperf3 compare 5G
iperf3 compare 2G

Both builds were running stable for me.
Tested with 3 ssid's and a couple of wired clients for a few days on each build.

Now running my own build, based upon master + hnymanns patches.
I added dissent1's fast-path patch. It's stable but does very little improvement on the R7800.
Wouldnt bother with it fast-path atm.

hope this helps

3 Likes

My master build has nothing special about wireless drivers, so the possible performance problems are generic to the device & drivers.

I have not seen problems myself, but some people have seen with master (either with buildbot snapshots, private builds, or my build).

The possible problem may be somewhere in QCA9984 firmware blob, ath10k driver, hostapd, ...

2 Likes

Thanks @cmd-j that was helpful. Here is what I am seeing when using @hnyman's 17.01 build vs. his master build:

iperf3 - hnyman 17.01 build
iperf3 - hnyman master build

A fairly significant difference. But like @hnyman said, his build has nothing special about wireless drivers so I am going to start looking into where the issue might be but I am likely going to need to hook up the console first so that might take some time.

Thanks for the help.

1 Like

Those bitrates look way too low.
Are you sure the device your are testing with is AC-capable and uses at least two streams/antennas?
I would check:

  • that all antennas on the R7800 are tightly screwed on
  • interference from neighbour wifi's and change channels accordingly

Next steps in this exact order:

  • do a "firstboot" via ssh or a reset via Luci > System > Backup/Flash Firmware > Reset to defaults

  • reflash firmware and do a firstboot/reset again straight after flashing (i have seen gremlins stick otherwise..)

  • To not derail this thread any further:
    Open a seperate topic about the problem and post your /etc/config/wireless there. :wink:

1 Like

Hnyman, I'm trying to recreate your 17.01 build system so that I can add one more package from source. ROOter package to be exact. I do everything you say to do in your first post. I run the .sh file and it seems to set up right with the only 3 patches I see (I think). I add in the rooter package and that works. What I can't seem to do is find or use your config.in to add everything as you do. Maybe the patches are not being put in. I'm not sure and I'm a little new to this to know if it had or not.

There is no config.in
There is .config.init that you should copy info .config

use ls -la .c* to see also the files starting with dot

I only see .config

I must be doing something wrong. I'll try to start over.

Edit:

Looks like the patch filestamps don't match the .sh filestamps. Opps

It's building now with all your patches and ROOter package as well. I'm sure I will have a few discrepancies but that can be easily fixed. Thank you. The best router combined with the best build from you combined with the best LTE modem package. This will be great. Thank you.

Which do I want, wpad or wpad-mini? Does it matter?

hynman I’ve been using your builds for a while, both stable and snapshot, I have noticed that with the stable build, I get network latency on Bf1 on PS4, but with your snapshot builds this doesn’t happen, have noticed it on latest LEDE stable build also any ideas why? I’ve also reverted back to stock firmware and it doesn’t happen on that, it’s like 5 to 10ms in very regular intervals.

There are already lots of differences in master compared to the stable 17.01 that was branched off in January 2017. Different kernel, network stack differences etc.

It is also same in 17.01.4, I have tried with and with out sqm, but doesn’t seem to make a difference. Do you use softirq in your snapshots? If so could it be that?

I am not sure what difference you are talking about regarding my build.

My stable 17.01 branch build is roughly equivalent with 17.01.4 so your results are the same for both. Those have kernel 4.4 and are mostly based on LEDE as in January 2017, when 17.01 was branches off.

Master snapshot build has kernel 4.9 and lots of other development. But there is no special config in my personal build, as all kernel options are current defaults.

So you are likely seeing the effects of the general Linux and LEDE development.

I didn’t know if you had applied some patches to the snapshot builds. Guess I will wait for kernel 4.9 on stable build. Thanks, keep up the good work.

@hnyman Thank you so much for putting these builds together. It is greatly appreciated.

1 Like

Ok. So I loaded the firmware that I made from your build environment. I don't have wifi or a WiFi tab to even edit. Did I miss something?

Edit. I added a wireless file and I'm good.