Ipq806x NSS build (Netgear R7800 / TP-Link C2600 / Linksys EA8500)

How do I know whether I am using -ct or ath10k driver? I flashed the default firmware (without the ath10k name) and just a few minutes ago, I lost my wifi connection. So, I flashed R7800-20221223-Stable2203NSS-ath10k-sysupgrade and I believe this uses the mainline driver, correct?

Is there a way to know what wifi driver I am using in either luci or from cli?

search for ath10k in the system log

I see it listed at 5:10 PM (default firmware) and at 7:32 PM (after I flashed ath10k). So, ath10k is there before too. What other way to confirm it as this is inconclusive?

Mon Jan 2 17:10:25 2023 kern.warn kernel: [ 58.746351] ath10k_pci 0000:01:00.0: Unknown eventid: 36933
Mon Jan 2 19:32:06 2023 kern.warn kernel: [ 64.993974] ath10k_pci 0001:01:00.0: Unknown eventid: 36933

or maybe see system-> software, click update list and click installed

Does this mean I am using atk10k and NOT the -ct driver?

Yes it does

1 Like

Any way to get nlbwmon working on this?

Thanks, that worked and I have ath10k firmware build now.

Having minor issues with getting the nss patch to work with the mac80211 updates in master. Anybody have any suggestions to help with the patch nomenclature to fix these errors?

Previous working version of the patch:

Hunk the build log is complaining about (this is modifying the tx.c file):

@@ -4468,6 +4483,30 @@ out:
		kfree_skb(skb);
		return NETDEV_TX_OK;
	}
+
+#ifdef CPTCFG_MAC80211_NSS_SUPPORT
+	/* Packets from NSS does not have valid protocol, priority and other
+	 * network stack values. Derive required parameters (priority
+	 * and network_header) from payload for QoS header.
+	 * XXX: Here the assumption is that packet are in 802.3 format.
+	 * As of now priority is handled only for IPv4 and IPv6.
+	 */
+	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+
+	if (sdata->nssctx && likely(!skb->protocol)) {
+		skb_set_network_header(skb, 14);
+		switch (((struct ethhdr *)skb->data)->h_proto) {
+		case htons(ETH_P_IP):
+			skb->priority = (ipv4_get_dsfield(ip_hdr(skb)) &
+					 0xfc) >> 5;
+			break;
+		case htons(ETH_P_IPV6):
+			skb->priority = (ipv6_get_dsfield(ipv6_hdr(skb)) &
+					 0xfc) >> 5;
+			break;
+		}
+	}
+#endif

 	if (unlikely(ieee80211_multicast_to_unicast(skb, dev))) {
 		struct sk_buff_head queue; 

Build log errors:

/home/HTPC/OpenWRT/NSSMaster/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/backports-6.1-rc8/net/mac80211/tx.c: In function 'ieee80211_subif_start_xmit':
/home/HTPC/OpenWRT/NSSMaster/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/backports-6.1-rc8/net/mac80211/tx.c:4494:39: error: redefinition of 'sdata'
 4494 |         struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
      |                                       ^~~~~
/home/HTPC/OpenWRT/NSSMaster/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/backports-6.1-rc8/net/mac80211/tx.c:4476:39: note: previous definition of 'sdata' with type 'struct ieee80211_sub_if_data *'
 4476 |         struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
      |                                       ^~~~~
/home/HTPC/OpenWRT/NSSMaster/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/backports-6.1-rc8/net/mac80211/tx.c:4494:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
 4494 |         struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
      |         ^~~~~~
make[3]: Leaving directory '/home/HTPC/OpenWRT/NSSMaster/openwrt/feeds/luci/modules/luci-lua-runtime'
time: package/feeds/luci/luci-lua-runtime/compile#2.51#0.97#4.83
make[3]: Entering directory '/home/HTPC/OpenWRT/NSSMaster/openwrt/feeds/luci/modules/luci-mod-admin-full'
make[9]: *** [scripts/Makefile.build:289: /home/HTPC/OpenWRT/NSSMaster/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/backports-6.1-rc8/net/mac80211/tx.o] Error 1
make[8]: *** [scripts/Makefile.build:552: /home/HTPC/OpenWRT/NSSMaster/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/backports-6.1-rc8/net/mac80211] Error 2
make[7]: *** [Makefile:1903: /home/HTPC/OpenWRT/NSSMaster/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/backports-6.1-rc8] Error 2
make[6]: *** [Makefile.build:13: modules] Error 2
make[5]: *** [Makefile.real:93: modules] Error 2
make[4]: *** [Makefile:121: modules] Error 2
make[4]: Leaving directory '/home/HTPC/OpenWRT/NSSMaster/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/backports-6.1-rc8'
make[3]: *** [Makefile:413: /home/HTPC/OpenWRT/NSSMaster/openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/backports-6.1-rc8/.built] Error 2
make[3]: Leaving directory '/home/HTPC/OpenWRT/NSSMaster/openwrt/package/kernel/mac80211'
time: package/kernel/mac80211/regular/compile#8.01#2.70#11.81
    ERROR: package/kernel/mac80211 failed to build (build variant: regular).

Separately @n00b42 Added kmod-usb-printer to yesterday's 22.03 build. Enjoy!

1 Like

Please patch package/kernel/mac80211/patches/subsys/999-mac80211-NSS-support.patch with this diff. This is needed for any rebase from the master branch since the last 2-3 weeks.

1 Like

Don't use nlbwmon. It will eventually complain about running out of memory and/or provide totally wrong statistics.

2 Likes

Is there anything else to track bandwidth with a GUI?

Hello. Does your build support a 5G modem module like the quectel rm502q-ae? I have the module in a m.2 to USB adapter. Thanks!

Hello gentlemen.
Just wanted to chime in and confirm the beauty nd stability of this FW.


At 27 days i guess there is nothing to doubt about the stability, even though I think I managed to get a good router, where others maybe got an unfortunate specimen.
For the sake of science, is it any useful if I try the ondemand kernel setting, so we see if a (supposed) good chipset is stable with the variations of voltage?
I'm more than willing to test, report and help.
How do I revert to ondemand setting?

2 Likes

On demand is the default governor. If you type this in a ssh console it should return on demand.


cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
cat /sys/devices/system/cpu/cpufreq/policy1/scaling_governor

thank you and @vochong for managing this, I hit that wall heavily and was hoping for you to sort this out..

Thank you a bunch for the answer, Chris.
I was actually running the suggested performance setting you gave in second post...
To try out if my R7800 is stable with the ondemand governor I guess this is what I have to set, right?

I'll set it and see if I score the same stability, on 22.03.
I'll obviously report back to the headquarter!

I'm lost on the specific topic. but NSS core can be used to code openvpn and speed it up? was it achieved?

no, it was not.
crypto functionalities of nss cores were never proficiently used, i can remember @quarky trying something on this, and it got more or less it working, but the point was that passing from user space to kernel space performance were terrible.
at least, i understood that :slight_smile:
the point is that we are not able to use NSS to specifically speed up vpn (if not thanks to freeing cpu power thanks to nss routing)

1 Like

Hey, I freshly installed your custom build to reach the 1000Mbps my connection allow. It works great, thanks. I'm new to the OpenWRT community as well, just installed it on my R7800.

I've been fiddling around with the SQM settings, and I'm not sure I understand your note:

  • Luci SQM and normal SQM config doesn’t work. Have to use custom config.

What does that mean? The configuration done in the UX is ignored? Where is that custom config? I looked at the /etc/config/sqm file, and it seems it's properly written upon changes in the UX. So maybe there is another file I'm missing.

FYI, here are my test results with waveform:

Directly plugged Ethernet to my ISP modem "Orange" in France, (so ISP -> Computer):

** Plugged Ethernet on the R7800 (so ISP -> R7800 -> Computer)
SQM Disabled in the UX, plugged in Ethernet on the R7800

SQM enabled in the UX, plugged in Ethernet on the R7800 - cf screenshots for configuration of SQM

As you can see, the results are sensibly identical with the last 2 links, whether SQM is enabled or not.
Is there something I'm missing here?

I tried to put absurd configuration as well in SQM UX, it didn't change a thing.

What I'm trying to optimise is lag I have in long video calls in Google Hangout, after ~15 minutes I have a 1 second delay between what I see and what I hear, and also I tend to cut people speaking because I don't hear them speaking... It get way worse in long calls.

Silly question: appart from clicking on "Save & Apply", I do not have to reboot, correct?

Thanks!

Settings, I basically followed this wiki page: https://openwrt.org/docs/guide-user/network/traffic-shaping/sqm-details#a_little_about_tuning_sqm

Build: SNAPSHOT r21373+13-aa12a0fdd1 with ath10k driver.