Commit Graph

36 Commits

Author SHA1 Message Date
Sean Khan
adbbcb0c41 treewide: Refresh patches
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 22:12:00 -04:00
Sean Khan
dca6e6e880 nss-drv: fix write error when creating/destroying PPE VP interfaces
This is just a functional fix, the underlying framework for PPE VP is
not really useful for anything on ipq807x.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 20:41:20 -04:00
Sean Khan
5cb2492405 nss-drv: fix null ptr deref when logging is enabled
When debug logging is enabled for bridge or gre a null
pointer deref error was causing system to crash

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 20:37:06 -04:00
Sean Khan
a6d4d5bfc3 nss-drv: [12.5] fix missing GRE macro
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-07-10 20:34:51 -04:00
Sean Khan
03f6cb25eb nss-drv: Limit arch specific NSS features
Prevent selecting or building NSS features that are ipq806x specific

These include:

- Port ID (nss_portid.c)
- OAM (nss_oam.c)
- Timestamping (nss_tstamp.c)
- Legacy WiFi Offload (nss_wifi.c)

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-30 14:35:29 -04:00
Sean Khan
6b2d99511c nss-drv: Restore '-Wno-unused-variable' flag
It was accidentally removed in commit: de828e39b
("treewide: Additional fixes for kernel 6.12 + GCC 14.3")

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-30 03:21:05 -04:00
Sean Khan
54d105f7ca nss-drv: additional fixes for kernel 6.12
Fixes the following sysctl table check failures:

[Tue May 27 17:37:40 2025] sysctl table check failed: dev/nss/ppe_vp/(null) procname is null
[Tue May 27 17:37:40 2025] sysctl table check failed: dev/nss/ppe_vp/(null) No proc_handler
[Tue May 27 17:37:40 2025] sysctl table check failed: dev/nss/pppoe/(null) procname is null
[Tue May 27 17:37:40 2025] sysctl table check failed: dev/nss/pppoe/(null) No proc_handler

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-27 19:13:10 -04:00
Sean Khan
9762fbaabe nss-drv: Fix GCC empty-body error in GCC 14.3+
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-27 15:47:10 -04:00
Sean Khan
25086fbac3 treewide: Additional fixes for kernel 6.12 + GCC 15.1
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-25 15:36:03 -04:00
Sean Khan
6f823a2b34 treewide: Initial support for kernel 6.12 + GCC 15.1
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-05-08 23:12:18 -04:00
Sean Khan
8ae73bb2c6 nss-drv: treewide fix compiler warnings
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-17 22:41:30 -04:00
Sean Khan
387698c63b nss-drv: nss_rps/dscp fix read/write procfs files
Another fix for reading procfs files.

This fixes a long time bug where reading/writing to
ipv4_dscp_map, ipv6_dscp_map, pri_map would result in a 'Bad Memory'
error

Should now look like this when reading the following:

```
dev.nss.ipv4cfg.ipv4_dscp_map = priority: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
dev.nss.ipv4cfg.ipv4_dscp_map = action:   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
dev.nss.ipv6cfg.ipv6_dscp_map = priority: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
dev.nss.ipv6cfg.ipv6_dscp_map = action:   0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
dev.nss.rps.pri_map = Cores: -1 -1 -1 -1
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2025-04-17 12:01:06 -04:00
Sean Khan
e991bc1429 nss-drv: [12.5] bump to latest and refresh patches
This commit updates 12.5 version of the nss-drv from:

30fbfa4 -> 4dfab93

Bringing in the following changes:

```
2024-11-13 - d5ee67b - Add support for clearing N2H stats
2024-11-13 - 4850be3 - Add support for clearing DRV stats
2024-11-13 - 3d7c16d - Add support for clearing capwap stats
2024-11-13 - 163fbf4 - Add support clearing Crypto CMN stats
2024-11-13 - 084b475 - Add support for clearing DTLS CMN stats
2024-11-13 - e32f844 - Add support clearing PVxLAN stats
2024-11-13 - 2f54141 - Add support for clearing ipv6 stats
2024-11-13 - 702b14c - Add support for clearing C2C TX stats
2024-11-13 - 201dbc5 - Add support for clearing ipv4 stats
2024-11-13 - 24b6f1a - Add support for clearing eth_rx stats
2024-11-05 - 6e242de - Add support for clearing C2C RX stats
2024-11-05 - 942593c - Added a flag to identify if HW UDP checksum is supported for udp_st
2024-11-05 - e11eb4e - Add support for clearing Trustsec TX stats
2024-11-05 - 4f01399 - Add support for clearing EDMA Lite stats
2024-11-05 - 45b9a31 - Add support for clearing Trustsec RX stats
2024-11-05 - 57b338d - Add baseline stats write functionality
2024-10-16 - b671190 - Fix dtsi parameter that controls enabling UBI
2024-10-08 - 9514a99 - Enabling qca-nss-drv on 6.6 kernel
2024-07-16 - e96972f - udp_st: Add a new mode to handle unsynchronized time.
2024-05-16 - 1db9e55 - Add missing error code for wifili pkg.
```

Stats can be cleared by echoing `0` to the corresponding stats file.

For example, to clear the N2H stats, you can run:

```
echo 0 > /sys/kernel/debug/qca-nss-drv/stats/n2h
```
2025-04-08 03:10:05 -04:00
Sean Khan
46cd9e7707 nss-drv: Fix 'mesh_mesh' naming mesh stats
Cleans up mesh stats naming to remove 'mesh' from prefix as it's already
prefixed when displaying. Otherwise it shows up as 'mesh_mesh'

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-09-21 16:31:13 -04:00
Sean Khan
2fcfece2b9 nss-drv: Add missing error code for wifili pkg.
Add missing error code between nss fw and nss drv.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-09-21 16:17:56 -04:00
Sean Khan
23d5aaaf3f nss-drv: cleanup and refresh patches
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-08-09 01:42:04 -04:00
Sean Khan
0cf4f442e2 nss-drv: add boot wait
Ensures NSS cores are fully booted to hopefully workaround issues with
wifi stats (rx/tx rates) and inactive time.

Patch-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-08-09 01:40:40 -04:00
Sean Khan
7a21a949cf treewide: Option to build for all NSS firmware
The idea that "newer" NSS firmware = "better" is not always true.
Especially given that 11.4 is the only firmware known to work with mesh,
among other issues like WDS/rmnet_nss being broken on 12.5 releases.

Add option to allow building for all known and available NSS firmwares.
The following are now supported NSS firmwares:

1.) 11.4.0.5-5
2.) 12.1
3.) 12.2
4.) 12.5

Users should start with 11.4 as that seems to be the one with the most
enabled features. It is now also the default version.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-30 14:33:50 -04:00
Sean Khan
9c1bd07946 treewide: Bump NSS FW 12.1 to 12.5
Switch to personal fork utilizing NSS fw binaries from dd-wrt repo:
`https://github.com/mirror/dd-wrt/tree/master/src/router/qca-nss/firmware`

Also delete patches that limited feature set to NSS firmware 12.1

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-22 16:51:11 -04:00
Sean Khan
4490b7a4a7 nss-drv: More FW 12.1 fixes
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-10 17:36:42 -04:00
Sean Khan
1af951126c nss-drv: limit headers to fw 12.1
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-10 13:50:58 -04:00
Sean Khan
841d43b00f treewide: various patches for GCC-14 + build fixes
Also disabled pvxlanmgr and clmapmgr from showing up. It's badly broken
and not suported.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-08 21:03:51 -04:00
Sean Khan
76047d6637 nss-drv: extract and display nss firmware version
Added a custom function to show NSS firmware version during boot.

```
[Mon Jul  8 07:45:21 2024] qca-nss 39000000.nss: NSS FW Version: NSS.FW.12.1-022-HK.R
```

And

```
[Mon Jul  8 07:21:12 2024] qca-nss 39000000.nss: NSS FW Version: NSS.HK.11.4.0.5-5-R
```

Not sure why Qualcomm never included this ability in their drivers, since
it's clearly there in every firmware.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-08 11:19:16 -04:00
Sean Khan
19f6ecc012 qca-nss-drv: refactor __nss_hal_request_irq
refactored the logic in `__nss_hal_request_irq` to use case statements,
with a single call to `netif_napi_add_weight` and `request_irq`.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-02 21:06:57 -04:00
Sean Khan
cefc1a062d qca-nss-drv: Use devinfo for cleaner kernel logs
Use kernel built-in `devinfo` to show cleaner kernel logs. This allows
showing the module and specific NSS device the message is meant for.

```
[Tue Jul  2 04:27:45 2024] qca-nss 39000000.nss: fw of size 833304 bytes copied to addr: 40000000, nss_id: 0
[Tue Jul  2 04:27:45 2024] qca-nss 39000000.nss: NSS core 0 booted successfully
[Tue Jul  2 04:27:45 2024] qca-nss 39400000.nss: fw of size 292296 bytes copied to addr: 40800000, nss_id: 1
[Tue Jul  2 04:27:45 2024] qca-nss 39400000.nss: NSS core 1 booted successfully
[Tue Jul  2 04:28:03 2024] qca-nss 39000000.nss: Configuring additional NSS pbufs
[Tue Jul  2 04:28:03 2024] qca-nss 39000000.nss: Additional pbufs of size 10002432 got added to NSS
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-02 21:02:06 -04:00
Sean Khan
4e841d15bb qca-nss-drv: add missing gmac patch
Add in missing gmac. Meant for IPQ806X

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-07-02 20:38:38 -04:00
Sean Khan
5fa030cfed Revert "qca-nss-drv: add NAPI threading"
This reverts commit 5700922738.

Causes panic on IPQ807x platforms after sometime. Drop NAPI patch

[180247.904310] Call trace:
[180247.908300]  dump_backtrace+0xb0/0x10c
[180247.910992]  show_stack+0x18/0x24
[180247.914550]  dump_stack_lvl+0x48/0x60
[180247.918023]  dump_stack+0x18/0x24
[180247.921756]  __schedule_bug+0x54/0x6c
[180247.925141]  __schedule+0x4f0/0x5e8
[180247.928873]  schedule+0x5c/0xc4
[180247.932605]  napi_threaded_poll+0x60/0x1f8
[180247.935819]  kthread+0x10c/0x110
[180247.939724]  ret_from_fork+0x10/0x20
[180609.113998] BUG: scheduling while atomic: napi/nss-9/1264/0x00000201

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-06-05 19:47:31 -04:00
Sean Khan
a4d36065f6 qca-nss-drv: allow mac80211 to disable signal redirection
Added from brainslayer's patch here:

https://svn.dd-wrt.com/changeset/56322

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-06-02 19:38:54 -04:00
Sean Khan
5700922738 qca-nss-drv: add NAPI threading
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-06-02 19:35:52 -04:00
Sean Khan
9308d452f6 nss-packages: Bump to QSDK 12.5 for kernel 6.6
note: qca-nss-crypto, and qca-nss-cfi are non-code change releases, but
align with naming scheme upstream anyways.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-05-05 02:49:54 -04:00
Qosmio
952e573a71 nss-packages: convert modules to use wifili vs wifi 2024-03-17 02:18:20 -04:00
Qosmio
327b97d4a0 qca-nss-drv: Move Profiler code to ipq806x
Useless to build on IPQ807x/60xx
2024-03-12 17:22:54 -04:00
Qosmio
8795d29dfb nss-packages: Initial support for kernel 6.6
WIP
2024-03-12 12:00:52 -04:00
Qosmio
c7c8de990f nss-packages: refresh patches 2024-03-11 15:53:55 -04:00
JiaY-shi
a5cff6d62e qca-nss-drv: fix ipq60xx support 2024-02-28 15:25:25 +08:00
Qosmio
8d54d726c2 Move non-upstream NSS packages back into repo
To keep fork as closely synced with upstream, move NSS packages back
into repository. Not sure why they were moved out from my original fork.
* nss-firmware
* qca-nss-crypto
* qca-nss-cfi

Removed the following:
* mhz (already available in packages repo)
* qrtr (unecessary, and has been broken for years)

Also moved packages out of `qca` and back into root directory.
2024-02-19 01:35:04 -05:00