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

In DD-WRT, I used to have a /jffs partition and how do I enable it in OpenWRT? I see that there is a /overlay mount and not sure whether it's the same or different.

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