Skip to content

24.10 nss - #64

Open
johnpaultads wants to merge 281 commits into
qosmio:24.10-nssfrom
johnpaultads:24.10-nss
Open

24.10 nss#64
johnpaultads wants to merge 281 commits into
qosmio:24.10-nssfrom
johnpaultads:24.10-nss

Conversation

@johnpaultads

Copy link
Copy Markdown

Thanks for your contribution to OpenWrt!

To help keep the codebase consistent and readable,
and to help people review your contribution,
we ask you to follow the rules you find in the wiki at this link
https://openwrt.org/submitting-patches

Please remove this message before posting the pull request.

qosmio added 30 commits October 5, 2025 15:04
This is mostly a cosmetic change for users running NSS firmware 11.4
with mesh setups. Rather than fill up kernel logs with warnings, move log
warnings to debug.

The stats are still captured in '/sys/kernel/debug/qca-nss-drv/stats/*'

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Should be 'rx'

Signed-off-by: Sean Khan <datapronix@protonmail.com>
While freeing skb in tx completion path for status reinject, inspect
or vdevid mismatch, dev_kfree_skb_any() is used but when a function
is using functions from mac80211 to free an skb then it should do
it consistently and not switch to the generic dev_kfree_skb_any.
Otherwise, mac80211 will not be aware of the freed skb and thus
not clean up related information in its internal data structures.

Hence fix the issue by properly using ieee80211_free_txskb().

Signed-off-by: Sarika Sharma <quic_sarishar@quicinc.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Lock is missed while accessing idr_pool of tx_ring which
causes Use after free crash in dp_free path when unloading
the module.

Fix this by adding tx_idr_lock when accessing idr_pool
of tx_ring.

Signed-off-by: Aishwarya R <quic_aisr@quicinc.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
…rrays

Fixes compile issues on GCC 13.3+

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
1. Fix function to check for bridge master status while checking
for Bridge VLAN filter feature is enabled on bridge slave ports.
2. Disable default PVID for bridges during device registration in
the system.

Change-Id: Ibea6559c1b0700a2300b60e20d57b7818e23a8a8
Signed-off-by: Vishnu Vardhan Bantanahal <quic_vishvard@quicinc.com>

bridge: Fix Bridge VLAN stats update
This patch fixes Bridge VLAN stats update for both bridge master
and bridge slave.
Change-Id: Ia26f4c71e83e27dd83336815cda5c05c8c3f24ff
Signed-off-by: Vishnu Vardhan Bantanahal <quic_vishvard@quicinc.com>

bridge: Add bridge VLAN filter APIs for offload for 6.1 Kernel

Change-Id: I54e44c26664f86ae024f54605a032713a9a3eee5
Signed-off-by: Vishnu Vardhan Bantanahal <quic_vishvard@quicinc.com>

Signed-off-by: Sean Khan <datapronix@protonmail.com>
This patch adds support for allocating 1MB of reserved memory
for ramoops on IPQ807x and IPQ6018 platforms.

This is required to get PSTORE option working.

Tested with the following options:

```
CONFIG_PACKAGE_kmod-pstore=y
CONFIG_PACKAGE_kmod-ramoops=y
CONFIG_PACKAGE_kmod-reed-solomon=y
```

dmesg output
```
➤ dmesg | grep -Ei "psto|ramo"

[Sun Jun  9 23:22:01 2024] OF: reserved mem: 0x0000000051200000..0x00000000512fffff (1024 KiB) map non-reusable ramoops@51200000
[Sun Jun  9 23:22:05 2024] pstore: Using crash dump compression: deflate
[Sun Jun  9 23:22:05 2024] pstore: Registered ramoops as persistent store backend
[Sun Jun  9 23:22:05 2024] ramoops: using 0x100000@0x51200000, ecc: 0
```

Triggering kernel panic

```
sh -c 'echo 10 > /proc/sys/kernel/panic; echo c > /proc/sysrq-trigger'
```

After rebooting

```
mkdir -p /tmp/ramoops
mount -t pstore pstore /tmp/ramoops
```

```
➤ l /tmp/ramoops
drwxr-x---    2 root     root           0 Jun  9 23:02 .
drwxr-xr-x    8 root     root        4.0K Jun  9 23:23 ..
-r--r--r--    1 root     root        6.6K Jun  9 23:21 dmesg-ramoops-0
```

Truncated output
```
Panic#1 Part1
<6>[   21.656119] remoteproc remoteproc0: remote processor cd00000.q6v5_wcss is now up
<14>[   21.657910] kmodloader: done loading kernel modules from /etc/modules.d/*
<6>[   21.710545] ath11k c000000.wifi: chip_id 0x0 chip_family 0x0 board_id 0xff soc_id 0xffffffff
<6>[   21.710594] ath11k c000000.wifi: fw_version 0x270204a5 fw_build_timestamp 2022-08-04 13:05 fw_build_id WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
<6>[   91.416867] br-lan: topology change detected, sending tcn bpdu
<6>[ 1256.023874] sysrq: Trigger a crash
<0>[ 1256.023911] Kernel panic - not syncing: sysrq triggered crash
<4>[ 1256.026176] CPU: 2 PID: 2842 Comm: sh Tainted: G           O       6.6.32 #0
<4>[ 1256.031993] Hardware name: Linksys MX5300 (DT)
<4>[ 1256.039106] Call trace:
<4>[ 1256.043354]  dump_backtrace+0xb0/0x10c
<4>[ 1256.045701]  show_stack+0x18/0x24
<4>[ 1256.049519]  dump_stack_lvl+0x48/0x60
<4>[ 1256.052906]  dump_stack+0x18/0x24
<4>[ 1256.056550]  panic+0x2d0/0x31c
<4>[ 1256.059848]  sysrq_handle_moom+0x0/0x30
<4>[ 1256.062800]  __handle_sysrq+0xe4/0x1e0
<4>[ 1256.066534]  write_sysrq_trigger+0xbc/0xfc
<4>[ 1256.070354]  proc_reg_write+0xb0/0xf8
<4>[ 1256.074434]  vfs_write+0xa4/0x298
<4>[ 1256.078165]  ksys_write+0x5c/0xe0
<4>[ 1256.081464]  __arm64_sys_write+0x1c/0x28
<4>[ 1256.084763]  invoke_syscall.constprop.0+0x5c/0x100
<4>[ 1256.088758]  do_el0_svc+0x40/0xc8
<4>[ 1256.093355]  el0_svc+0x30/0xb8
<4>[ 1256.096740]  el0t_64_sync_handler+0x120/0x12c
<4>[ 1256.099694]  el0t_64_sync+0x178/0x17c
<2>[ 1256.104122] SMP: stopping secondary CPUs
<0>[ 1256.107773] Kernel Offset: disabled
<0>[ 1256.111759] CPU features: 0x0,00000000,00000000,0000400b
<0>[ 1256.114975] Memory Limit: none
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
The following options can now be specified in `pbuf` uci config.

1.) auto_scale (bool) - enable or disable NSS CPU auto-scaling.
                        default: 'off'.

                        NOTE: Recommended to leave off, as it locks
                        NSS core to it's full 1.7Ghz speed. In the past
                        auto_scaling has been unstable, often causing
                        kernel panics or connection drops. Qualcomm
                        themselves disables scaling in QSDK for
                        ath11k/ath12k/qca-wifi.

                        It is provided to allow users wanting more
                        control over power usage. Setting to 'on' also
                        fixes NSS CPU stats updating properly.

2.) n2h_queue_limit_core0 (int) - set queue limits for CORE 0 and 1.
                                  default: '2048'

                                  For users on low memory systems (<=512M),
                                  that are experiencing issues can try lowering
                                  to the driver default of '256'.
NSS patches should always get applied last as to avoid fuzzing issues
with upstream patches.

Also cleanup patches that introduced spaces as indents vs. tabs

Signed-off-by: Sean Khan <datapronix@protonmail.com>

ath11k_nss: drop upstreamed patch

A variation of this patch 'wifi: mac80211: Use flexible array in struct ieee80211_tim_ie'
was upstreamed in commit 'e6e4d90b69027d74ba7e9a0a586b95a5714e10c0'.
Remove it to avoid compilation issues.

Signed-off-by: Sean Khan <datapronix@protonmail.com>

ath11k_nss: Fix patch conflict

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>

qualcommax: NSS: Refresh patches against 6.6.41

Signed-off-by: Sean Khan <datapronix@protonmail.com>

qualcommax: NSS: refresh patches for 6.6.51

Signed-off-by: Sean Khan <datapronix@protonmail.com>

qualcommax: add console-size + increase record-size

Signed-off-by: Sean Khan <datapronix@protonmail.com>
(cherry picked from commit 4ea718f)

qualcommax: NSS: refresh patches for 6.6.56

Signed-off-by: Sean Khan <datapronix@protonmail.com>

qualcommax: NSS: refresh patches for 6.6.60

Signed-off-by: Sean Khan <datapronix@protonmail.com>
(cherry picked from commit 8efd9fedbff95990ffe192f504491fe63e9a7d55)

qualcommax: Refresh NSS patches against rebase 863d1a6

Signed-off-by: Sean Khan <datapronix@protonmail.com>

qualcommax: NSS: Refresh patches for 6.6.67

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Revert to using the default kernel timer (CONFIG_HZ_100).

Setting the timer to 1000hz is unecessary and just adds CPU overhead. It
also causes atomic scheduling issues in various threaded tasks,
especially when using threaded NAPI.

When the kernel timer frequency is set to 1000 Hz, it generates interrupts
1000 times per second. This increased frequency can lead to more
frequent context switches and interrupt handling, which can
interfere with other kernel activities.

Since network packet processing is offloaded to the NSS cores, the main CPU
does not need high-resolution timer interrupts to manage network
traffic efficiently. The NSS cores handle this independently.

This is the setting used and recommended by Qualcomm for all their IPQ
platforms.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Cleaned up erronous settings for disabled features. The syntax should be
"# CONFIG_SOME_OPTION is not set", rather than simply commenting it out.

Removed left over config options from 5.15, and enabled features
recommended by QSDK:

```
CONFIG_IRQ_TIME_ACCOUNTING=y
CONFIG_MULTI_IRQ_HANDLER=y
CONFIG_HANDLE_DOMAIN_IRQ=y
CONFIG_HZ_FIXED=0
CONFIG_NO_HZ=y
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
These packages are required for basic NSS offloading. So ensure they're
selected for all qualcommax targets.

  * kmod-qca-nss-ecm (Enhanced Connection Manager)
  * kmod-qca-nss-drv (NSS Driver)
  * kmod-qca-nss-drv-bridge-mgr (NSS Manager for Bridges)

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
This reverts commit 5cf32cfe3edca047b7347236496c275bc23ae7fb.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
commit 072327212c033baf96365a5045673c5981eb0bdf (HEAD -> next, origin/next)
Author:     John Crispin <john@phrozen.org>
AuthorDate: Fri Jul 5 15:42:24 2024 +0200
Commit:     John Crispin <john@phrozen.org>
CommitDate: Fri Jul 5 15:42:40 2024 +0200

    ath11k: fix monitor mode

    Enabling CPTCFG_ATH11K_MEM_PROFILE_512M will change the layout of
    struct hal_rx_desc_ipq8074. This broke monitor mode. Fix it by not modifying
    the struct even if the 512MB profile is enabled.

    Fixes: WIFI-12102
    Signed-off-by: John Crispin <john@phrozen.org>

Signed-off-by: Sean Khan <datapronix@protonmail.com>
This patch handles the updating of MU-EDCA parameters indicated by
driver. Driver requests to update the parameters and Parameter Set
Update Count in beacon frames. This patch addresses only AP mode.

Three actions are taken to successfully update MU-EDCA parameters
in beacon:
	(1) Update MU-EDCA parameters stored in hostapd
	    The following Access Categories (AC) are updated:
	      VO: Voice
	      VI: Video
	      BE: Best Effort
	      BK: Background

	(2) Increment Parameter Set Update Count
	(3) Update beacon with new parameters

There aren't any options to configure, hostapd simply updates MU-EDCA
published by ath11k driver.

To verify params are getting updated, set log_level to '1' and check
logger

i.e. `uci set wireless.radio0.log_level=1`

```
Sat Jul  6 15:36:10 2024 daemon.debug hostapd: phy0-ap0: IEEE 802.11 MU-EDCA: Updated MU-EDCA parameters for AC 0: BE: 3, BK: 7, VI: 2, VO: 2
Sat Jul  6 15:36:10 2024 daemon.debug hostapd: phy0-ap0: IEEE 802.11 MU-EDCA: Updated MU-EDCA parameters for AC 1: BE: 164, BK: 164, VI: 67, VO: 50
Sat Jul  6 15:36:10 2024 daemon.debug hostapd: phy0-ap0: IEEE 802.11 MU-EDCA: Updated MU-EDCA parameters for AC 2: BE: 255, BK: 2, VI: 255, VO: 255
```

Requires the following patches applied to 'ath11k/subsys'

commit ce7f1ad354869d85abdf8e8ed8d36599e057ba5d
Author:     Sean Khan <datapronix@protonmail.com>
AuthorDate: Tue Feb 27 00:45:32 2024 -0500
Commit:     Sean Khan <datapronix@protonmail.com>
CommitDate: Sat Jul 6 15:19:26 2024 -0400

    ath11k_nss: FW Initiated Dynamic MU-EDCA

    package/kernel/mac80211/patches/nss/ath11k/203-mac80211-ath11k-fw-dynamic-muedca.patch
    package/kernel/mac80211/patches/nss/subsys/203-mac80211-ath11k-fw-dynamic-muedca.patch

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>

ath11k_nss: fix missing semicolon ';'

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Some features are not available in NSS firmware 11.4.0.5
* `NSS_WIFI_VDEV_EXT_DATA_PKT_TYPE_4ADDR`

This was introduced in `NHSS.QSDK.11.5`. To avoid unexpected issues,
disable the case check for `NSS_WIFI_VDEV_EXT_DATA_PKT_TYPE_4ADDR` if
`CONFIG_NSS_FIRMWARE_VERSION_11_4` is selected.

Signed-off-by: Sean Khan <datapronix@protonmail.com>

ath11k_nss: rename '*.patch.patch' to '.patch'

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
New:
* Add UCI option to /etc/config/pbuf
  1. `stats_disable` - Allows disabling extended stats
     collection. (Default: '1')

  2. `scaling_governor` - Allow specifying CPU governor.
     (Default: disabled )

     Choices depend on what your system is compiled with. Can be found
     using:

     ```sh
     cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
     ondemand performance schedutil
     ```

Changes:

* Rather than hardcode every device model's memory profile. Simply read the
  memory available from `/proc/meminfo`.
* Scaling governor is no longer forced as `performance`. It is now user
  configurable.
* Hash bitmap is now calculated from number of CPUs rather than hardcoded to `15`
* Limit `n2h_queue_limit_core` to `256`. This was set to `2048` which is
  too high when NSS wifi is also enabled.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
qosmio and others added 17 commits October 15, 2025 04:25
This commit includes the following fixes and improvements:

Missing flags:

* IFF_EXT_TUN_TAP, IFF_EXT_GRE_V4_TAP and IFF_EXT_GRE_V6_TAP were missing
  causing issues with proprly offloading GRE/TUN/IPIP tunnels.
* Brought in several missing or fixes for ECM/Bridge/VLAN manager.

Reworked the skb_recycler-support patch with the latest 6.6 QSDK changes:

* Added new flags for tracking recycled SKBs
* Implemented fast SKB recycling path for improved performance
* Added new helper functions for SKB allocation/recycling
* Optimized memory usage with different SKB cache sizes

Consolidated L2TP offloading code:

* Merged functionality from deleted patch (0603-6) into 0603-2
* Added proper support for L2TP device identification in network stack
* Fixed various NSS-ECM networking components:

Properly set skb_iif for tunneled traffic

* Cleaned up bridge VLAN filtering support
* Improved device type identification for offloading decisions
* Code organization improvements:

Moved device type flags to core patch

* Eliminated code duplication between patches
* Fixed stats update logic for VLAN devices

Updated nf_conntrack_dscpremark_ext.h to match the latest QSDK changes:

Quilt refreshed all patches

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Adds in missing callbacks for `rx_desc_get_ip_valid` in IPQ8074, IPQ6018
and QCN9074. This was preventing running in non-NSS mode.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
When running with NSS mode disabled (nss_offload=0) the driver would
crash soon after a client connected with:

```
dog_hb.c:210 DOG_HB detects starvation of task "WLAN RT0", triage with its owner(d.dump 0x4af49e00)
```

Revert the budgeting of the task to the original code to fix the crash.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
…WIOTLB issues"

This commit resolves applying issues due to the upstream commit

(fa50e53: "Fix DMA buffer allocation to resolve SWIOTLB issues".)

Signed-off-by: Sean Khan <datapronix@protonmail.com>
no longer needed with "51300e4 - nss-cfi: fix issue with kernel reporting duplicate driver"

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>

ath11k_nss: Restructure patch to avoid dependency on 207-ath11k-Enable-256_512MB-profiles.patch

In an effort to potentially reduce the number of patches required,
this commit restructures the patch to avoid dependency on `207-ath11k-Enable-256_512MB-profiles.patch`.

Signed-off-by: Sean Khan <datapronix@protonmail.com>

ath11k_nss: Sync 780-mac80211-Advertise-HW-checksum-offload-only-for-ethm with upstream

Apply QSDK 12.5 patch

Signed-off-by: Sean Khan <datapronix@protonmail.com>
When using 802.11r Fast Transition the driver will sometimes reject a
redundant PTK install even though the handshake completes successfully.
Upstream hostapd logs this as "kernel reports: key addition failed"
on every roam, flooding syslogs with harmless errors.

This patch removes the `GENL_SET_ERR_MSG` for that code path in `nl80211_new_key()`,
so we still return the proper error code to userspace but skip the
misleading diagnostic string.

Now users won't be distracted by known-benign messages during FT.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Acidentaly reverted the following commit when rebasing skb recyler from
QSDK

ipvs: Always clear ipvs_property flag in skb_scrub_packet()
[ Upstream commit de2c211868b9424f9aa9b3432c4430825bafb41b ]

Refreshed patches to apply cleanly

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
…N filtering.

Signed-off-by: qosmio <datapronix@protonmail.com>
Fix race in peer kickout handling by ensuring `base_lock` covers peer checks.
Avoids spurious kick events when firmware triggers removal before peer is in mac80211.

Also fix a possible deadlock in peer_sta_ps_state_chg by ensuring spin_unlock on all exit paths.

Patch-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>

Signed-off-by: Sean Khan <datapronix@protonmail.com>
(cherry picked from commit 2d43e93)
GRO fraglist causes issues when NSS offload is enabled,
paticularly with UDP packets (e.g. DNS queries). Rather than rely on
hotplug script disable by default.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
* Restructure the README.md to provide concise UCI configs.
* Add section for WWAN configuration.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
@qosmio
qosmio force-pushed the 24.10-nss branch 2 times, most recently from 617b0b3 to 04665e8 Compare December 30, 2025 00:30
@qosmio
qosmio force-pushed the 24.10-nss branch 2 times, most recently from f1aa967 to 8f05fb6 Compare January 5, 2026 16:58
@qosmio
qosmio force-pushed the 24.10-nss branch 2 times, most recently from fa4c3f9 to 7cbd6aa Compare February 27, 2026 08:25
@qosmio
qosmio force-pushed the 24.10-nss branch 2 times, most recently from b9c8095 to 2a9a392 Compare June 4, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants