Commit Graph

31039 Commits

Author SHA1 Message Date
zqinking
7d4b3944dd base-files: Add new functions for ath11k caldata 2024-10-16 09:15:23 +00:00
zqinking
6e5172ab4d add mmc.sh support ipq60xx emmc upgrade 2024-10-16 00:33:29 +00:00
zqinking
7bfa0bd56d fix gl-ax1800 gl-axt1800 nic name 2024-10-15 08:57:01 +00:00
zqinking
6a1623809d fix jdcloud-ax1800-pro nic label 2024-10-15 08:30:23 +00:00
breeze303
ae21ad1c30 ipq60xx: uboot-envtools optimize code formatting issues 2024-10-15 10:12:18 +08:00
breeze303
5994db03f5
ipq60xx: ipq6018-xiaomi.dtsi remove useless nodes
Signed-off-by: breeze303 <122870904+breeze303@users.noreply.github.com>
2024-10-15 09:22:07 +08:00
breeze303
69c6e1c0f1 qualcommax: ipq60xx: Add support for a bunch of models 2024-10-14 19:42:41 +08:00
breeze303
430504d94a
ipq60xx: jdc ax6600 Fix line breaks
Signed-off-by: breeze303 <122870904+breeze303@users.noreply.github.com>
2024-10-14 09:38:59 +08:00
breeze303
52a1b9a460 qualcommax: ipq60xx: fix jdcloud-ax6600 2024-10-13 22:31:24 +08:00
breeze303
18f7d15b15 Merge for qosmio 2024-10-13 10:48:20 +08:00
breeze303
8047feb7d3 Modify some default values 2024-10-13 10:43:32 +08:00
Sean Khan
39e3b770b8 qualcommax: NSS: refresh patches for 6.6.56
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:25:30 -04:00
Sean Khan
9f7c16c23c qualcommax: add console-size + increase record-size
Signed-off-by: Sean Khan <datapronix@protonmail.com>
(cherry picked from commit 4ea718f6ebcaadfe6b274b96d9323970151b78f1)
2024-10-12 00:24:15 -04:00
Sean Khan
2807b3e545 qualcommax: Remove swiotlb 64m savings patch
already remediated upstream:
target/linux/generic/backport-6.6/300-v6.7-arm64-swiotlb-Reduce-the-default-size-if-no-ZONE_DMA.patch

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:24:15 -04:00
John Audia
2c9bd2a662 kernel: bump 6.6 to 6.6.56
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.56

No patches needed a rebase

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
2024-10-12 10:13:26 +08:00
Sean Khan
fabb64512c qualcommax: Remove swiotlb 64m savings patch
already remediated upstream:
target/linux/generic/backport-6.6/300-v6.7-arm64-swiotlb-Reduce-the-default-size-if-no-ZONE_DMA.patch

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 10:13:26 +08:00
Shiji Yang
0c672d0360 ipq40xx: switch to zImage kernel for SKSpruce WIA3300-20
The bootloader can support zImage linux kernel which can decrease
the firmware image size.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/16662
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-12 10:13:26 +08:00
Robert Marko
f84df6d65d realtek: refresh patches
CI is saying that patches need to be refreshed, so refresh them.

Link: https://github.com/openwrt/openwrt/pull/16653
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-10-12 10:13:26 +08:00
Sean Khan
0c6c7025e7 qualcommax: NSS: refresh patches for 6.6.51
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:14 -04:00
Sean Khan
2027830ef7 qualcommax: NSS: Refresh patches against 6.6.41
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:13 -04:00
Sean Khan
5d9a513a0c qualcommax: skbuff: at latest changes from QSDK
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:13 -04:00
Sean Khan
8611b43a4f qualcommax: skbuff_recycle: add proc option to enable/disable
There are instances where `skbuff_recycle` messes up skb headers causing
various issues in network related activities. This was initially meant
to resolve issues with memory usage issues on 6.1.

Introduce a proc option to enable or disable skbuff_recycle. The default
is to have it enabled. Users on 512M platforms should test if memory
leaks still occur with this option disabled.

echo 0 > /proc/net/skb_recycler/skb_recycler_enable

echo 1 > /proc/net/skb_recycler/skb_recycler_enable

NOTE: There is a new script in `qca-nss-drv` that will automatically
manage this as an UCI configurable option.

commit 217a4fa43ba2ad0a02e8080dfde11ad23534aa8c (HEAD -> NSS-12.5-K6.x)
Author:     Sean Khan <datapronix@protonmail.com>
AuthorDate: Sat Jul 13 18:43:52 2024 -0400
Commit:     Sean Khan <datapronix@protonmail.com>
CommitDate: Sat Jul 13 18:43:52 2024 -0400

    nss-drv: add skb_recycler init script

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:13 -04:00
Sean Khan
a0c5d7feac qualcommax: Switch to upstream default config
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:12 -04:00
Sean Khan
cccefb7d6b qualcommax: NSS: Enable NSS for Asus RT-AX89X
NSS offload feature enablement for Asus RT-AX89X

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:11 -04:00
Sean Khan
a5c7dc2f73 qualcommax: skbuff_recycle: allow specifiying max size
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:11 -04:00
Sean Khan
aa89d5e95f qualcommax: add coherent_pool=2M swiotlb=noforce
Add them for all current qualcommax platforms

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:11 -04:00
Sean Khan
9998af7141 ath11k_nss: add missing NL80211_ATTR_HE_MUEDCA_PARAMS
Signed-off-by: Sean Khan <datapronix@protonmail.com>

ath11k_nss: fix missing semicolon ';'

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:11 -04:00
Sean Khan
531755b24d Revert "qualcommax: NSS: introduce helper functions for NAPI threading"
This reverts commit 5cf32cfe3edca047b7347236496c275bc23ae7fb.
2024-10-11 19:19:10 -04:00
Sean Khan
7f25553e0d qualcommax: NSS: Add default packages drv, ecm, bridge-mgr
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>
2024-10-11 19:19:09 -04:00
Sean Khan
55ede04914 qualcommax: NSS: introduce helper functions for NAPI threading
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:09 -04:00
Sean Khan
0996df5b06 qualcommax: clean up kernel config, align with QSDK
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>
2024-10-11 19:19:09 -04:00
Sean Khan
777260b609 qualcommax: Fix threaded NAPI scheduling
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>
2024-10-11 19:19:09 -04:00
Sean Khan
db9ba5cdb1 ath11k_nss: Organize patch order and formatting
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>
2024-10-11 19:19:08 -04:00
Sean Khan
e018af5fbb qualcommax: add ramoops memory region
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>
2024-10-11 19:19:08 -04:00
Sean Khan
2b4dc04a0c qualcommax: NSS: ECM: Fixes for Bridge VLAN Filtering
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>
2024-10-11 19:19:07 -04:00
Sean Khan
06e6cfb672 qualcommax: NSS: Add DTS entries for nss-macsec
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:07 -04:00
Sean Khan
259209ad06 qualcommax: NSS: Add support for sxk80, mx8500
Adding NSS support for:

Linksys MX8500
Netgear SXR80/SXS80 (SXK80 - router and satellite)

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:07 -04:00
Sean Khan
9609bb1e10 qualcommax: NSS: Set required NSS packages and options 2024-10-11 19:19:06 -04:00
Sean Khan
0d792ba783 qualcommax: NSS: Add support for all ipq807x targets
NSS offload feature should be available for all IPQ807x/IPQ817x targets.

* Arcadyan AW1000
* CMCC RM2-6
* Linksys MX4200 V1/V2
* Linksys MX5300
* Sagemcom Fast 5285 Spectrum SAXV1V1S
* Yuncore AX880
* ZBT Z800AX
* ZTE MF269

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:05 -04:00
Sean Khan
ef9b0ed4b5 qualcommax: qca-mcs support for kernel >= 6.6.29
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:05 -04:00
Sean Khan
4b6303ae4b qualcommax: disable swiotlb for 64mb in saving.
Disable software input output translation lookaside buffer (swiotlb) as
it wastes memory on low memory platforms (512m or less)

qualcommax: only disable swiotlb for platforms <= 512M

Disabling swiotlb is only required for platforms with 512M or less to save
64mb.
2024-10-11 19:19:05 -04:00
Qosmio
2bb27f8262 qualcommax: NSS: kernel 6.6 support 2024-10-11 19:19:04 -04:00
Qosmio
69aa26077f qualcommax: Move QCE to user selectable module
The performance of Qualcomm Crypto Engine is 10x slower than kernel
based encryption via ARMv8 crypto extensions. Rather than building it
into the kernel allow users to select it as module which can be tested with
other HW based crypto APIs via cryptodev-linux.
2024-10-11 19:19:04 -04:00
Qosmio
ae87e428e0 qualcommax: remove uneeded btcoex dts
not needed for NSS offload and helps save some memory
2024-10-11 19:19:04 -04:00
Sean Khan
4ba2dbda8d qualcommax: NSS: kernel 6.6 support (squash)
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:04 -04:00
Sean Khan
f99f8c2609 qualcommax: Introduce skbuff_recycle for performance
QSDK NSS builds utilize skbuff recycling for better handling of memory.

On a Dynalink DL-WRX36 (pbuf script should be set to 'auto') a significant drop in
memory usage was observed as well consistent sustained RX/TX speeds.

BEFORE:
echo 3 >! /proc/sys/vm/drop_caches

free -m
					total        used        free      shared  buff/cache   available
Mem:             867         338         547          90         101         528
Swap:              0           0           0

AFTER:
					total        used        free      shared  buff/cache   available
Mem:             867         242         594           1          81         624
Swap:              0           0           0

NOTE:

For 512MB platforms, users need to test with the following scenarios,
as the patch `999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch` is
really only testable on platforms with 512M or less RAM.

1.) Explicitly setting 'ATH11K_MEM_PROFILE_512M' on and see if system
crashes on boot.

2.) Explicitly setting 'ATH11K_MEM_PROFILE_1G'

3.) Remove patches
999-233-ath11k-Disable-rx_header-tlv-for-2K-SKB.patch
999-311-ath11k-configure-nss-thread-priority-during-pdev_ini.patch

And re-test with #1 and #2

It was incorrectly assumed that setting a 512M for 1G platforms would save
memory, instead it needs to be explicitly set to know proper memory
regions, otherwise it would cause fw crash.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:03 -04:00
Qosmio
75a259a376 ath11k-nss: Add NSS WiFi feature
Attempt at getting NSS WiFi Offload working on kernel 6.1 (backport 6.5)

These patches are a mix of @ansuel branch for 5.15 (ipq807x-5.15-ecm-wifi)
3ecaee768e

And QUIC's upstream NSS patches on [NHSS.QSDK.12.4.5.r3](https://git.codelinaro.org/clo/qsdk/oss/system/feeds/wlan-open.git)
For the actual package setup (Makfiles,ath.mk) Qualcomm's branch is under 'wlan-open/NHSS.QSDK.12.4.5.r3'

Looks like they've swtiched to using backports 6.5-rc3, and figured to
use a mix of their patches on 'NHSS.QSDK.12.4.5.r3' (nss)
'wlan-open/NHSS.QSDK.12.4.5.r3' (syncing with openwrt main).

Booting with "nss_offload=1 frame_mode=2"

Logs show:
[   16.606282] WARNING: CPU: 2 PID: 3524 at ath11k_nss_tx+0x1d4/0x1e0 [ath11k]
[   16.611060] Modules linked in: ecm pppoe ppp_async nft_fib_inet nf_flow_table_inet ath11k_ahb ath11k pptp pppox ppp_generic nft_reject_ipv6 nft_reject_ipv4 nft_reject_inet nft_reject nft_redir nft_quota nft_objref nft_numgen nft_nat nft_masq nft_log nft_limit nft_hash nft_fullcone nft_flow_offload nft_fib_ipv6 nft_fib_ipv4 nft_fib nft_ct nft_compat nft_chain_nat nf_tables nf_nat nf_flow_table nf_conntrack_netlink nf_conntrack mac80211 iptable_mangle iptable_filter ipt_REJECT ipt_ECN ip_tables cfg80211 xt_time xt_tcpudp xt_tcpmss xt_statistic xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_ecn xt_dscp xt_comment xt_TCPMSS xt_LOG xt_HL xt_DSCP xt_CLASSIFY x_tables wireguard slhc sch_cake qrtr_smd qrtr qmi_helpers nfnetlink nf_reject_ipv6 nf_reject_ipv4 nf_log_syslog nf_defrag_ipv4 mhi libcrc32c libchacha20poly1305 compat sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred act_gact qca_nss_cfi_cryptoapi
[   16.611215]  qca_nss_crypto qca_nss_qdisc qca_nss_wifi_meshmgr qca_nss_gre ledtrig_usbport qca_mcs bonding ip6_gre ip_gre gre ifb nat46 nf_defrag_ipv6 sit qca_nss_drv ip6_tunnel tunnel6 tunnel4 nls_utf8 nls_iso8859_1 nls_cp437 vxlan seqiv michael_mic uas usb_storage leds_gpio xhci_plat_hcd xhci_pci xhci_hcd dwc3 dwc3_qcom qca_nss_dp qca_ssdk ramoops reed_solomon pstore gpio_button_hotplug ext4 mbcache jbd2 aquantia hwmon crc_ccitt crc32c_generic
[   16.721723] CPU: 2 PID: 3524 Comm: hostapd Not tainted 6.1.68 #0
[   16.743958] Hardware name: Dynalink DL-WRX36 (DT)
[   16.750032] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[   16.754635] pc : ath11k_nss_tx+0x1d4/0x1e0 [ath11k]
[   16.761403] lr : ath11k_nss_tx+0x1bc/0x1e0 [ath11k]
[   16.766264] sp : ffffffc00b1db790
[   16.771122] x29: ffffffc00b1db790 x28: 0000000000000038 x27: 0000000000000000
[   16.774602] x26: ffffff8006dd7430 x25: ffffff8007ea9dc8 x24: 0000000060000012
[   16.781719] x23: ffffff8005c6a060 x22: ffffff8005c6a060 x21: ffffff80072f12d8
[   16.788837] x20: ffffff8007ea9dc8 x19: ffffff8006082800 x18: 0000000000000005
[   16.795957] x17: 6976312065707974 x16: 207061636e652062 x15: 6b73207874207373
[   16.803075] x14: ffffffc00a0dd518 x13: 000000000000018b x12: 000000000000018b
[   16.810192] x11: 00000000ffffffea x10: ffffffc00a135518 x9 : 0000000000000001
[   16.817310] x8 : 0000000000000001 x7 : 0000000000017fe8 x6 : c0000000ffffefff
[   16.824429] x5 : 0000000000000000 x4 : 0000000000000000 x3 : 0000000000000000
[   16.831547] x2 : ffffff80072f1370 x1 : 0000000000000000 x0 : 0000000000000001
[   16.838665] Call trace:
[   16.845774]  ath11k_nss_tx+0x1d4/0x1e0 [ath11k]
[   16.848035]  ath11k_mac_tx_mgmt_pending_free+0x3034/0x9600 [ath11k]
[   16.852551]  ieee80211_handle_wake_tx_queue+0x68/0xb10 [mac80211]
[   16.858801]  ieee80211_probereq_get+0xca4/0x11f0 [mac80211]
[   16.865049]  ieee80211_tx_prepare_skb+0x1dc/0x240 [mac80211]
[   16.870432]  ieee80211_xmit+0xcc/0x120 [mac80211]
[   16.876333]  __ieee80211_subif_start_xmit+0x2b8/0x380 [mac80211]
[   16.880937]  ieee80211_subif_start_xmit+0x40/0x3b0 [mac80211]
[   16.887013]  ieee80211_subif_start_xmit_8023+0xb8/0x430 [mac80211]
[   16.892656]  dev_hard_start_xmit+0x8c/0x110
[   16.898728]  __dev_queue_xmit+0x1f0/0xbc0
[   16.902808]  dev_queue_xmit+0x14/0x20
[   16.906975]  packet_sendmsg+0x768/0x1260
[   16.910620]  __sys_sendto+0xdc/0x140
[   16.914613]  __arm64_sys_sendto+0x28/0x40
[   16.918174]  invoke_syscall.constprop.0+0x5c/0x110
[   16.922081]  do_el0_svc+0x58/0x170
[   16.926765]  el0_svc+0x18/0x60
[   16.930149]  el0t_64_sync_handler+0x114/0x120
[   16.933190]  el0t_64_sync+0x174/0x178
[   16.933197] ---[ end trace 0000000000000000 ]---
[   16.933230] ath11k c000000.wifi: failed to transmit frame -22
[   17.041495] ath11k c000000.wifi: encap mismatch in nss tx skb encap type 1vif encap type 2
[   17.041578] ath11k c000000.wifi: failed to transmit frame -22

Which is confusing since the parameter is definitley set to '2'.
➤ cat /sys/module/ath11k/parameters/frame_mode
2

Booting with either "nss_offload=1 frame_mode=3" (RAW), or "nss_offload=1 frame_mode=1" (Native Wifi)
Results in:

[   15.644742] ath11k c000000.wifi: peer not found for nss peer delete
[   15.744742] ath11k c000000.wifi: peer not found for nss peer delete
[   15.745742] ath11k c000000.wifi: peer not found for nss peer delete
[   15.746682] ath11k c000000.wifi: peer not found for nss peer delete

Clients connect and then are immediately kicked off, stuck in a loop.

ath11k-nss: Wifi offloading working (unstable)

Wifi offloading seems to be working, however it is not stable. Logs will
initially show a lot of flooding.

```
[Sun Dec 17 02:43:25 2023] ath11k c000000.wifi: peer not found for nss peer delete
[Sun Dec 17 02:43:28 2023] ath11k c000000.wifi: peer not found for nss peer delete
[Sun Dec 17 02:43:30 2023] ath11k c000000.wifi: peer not found for nss peer delete
[Sun Dec 17 02:43:32 2023] ath11k c000000.wifi: peer not found for nss peer delete
[Sun Dec 17 02:43:34 2023] ath11k c000000.wifi: peer not found for nss peer delete
[Sun Dec 17 02:43:40 2023] ath11k c000000.wifi: peer not found for nss peer delete
[Sun Dec 17 02:43:41 2023] ath11k c000000.wifi: peer not found for nss peer delete
[Sun Dec 17 02:43:46 2023] ath11k c000000.wifi: peer not found for nss peer delete
```

But eventually ends up subsiding. Needs heavy testing...

ath11k_nss: Add mac address to debug `nss peer delete` warnings

also delete ath10k patch, and refresh.

ath11k_nss: FIX `nss peer delete` + encap errors

This should hopefullly fix the following errors:

```
[Sun Dec 24 22:03:21 2023] ath11k c000000.wifi: encap mismatch in nss tx skb encap type 1vif encap type 2
[Sun Dec 24 22:03:21 2023] ath11k c000000.wifi: failed to transmit frame -22
[Sun Dec 24 22:08:25 2023] ath11k c000000.wifi: encap mismatch in nss tx skb encap type 1vif encap type 2
[Sun Dec 24 22:08:25 2023] ath11k c000000.wifi: failed to transmit frame -22
```

Clients should also be able to switch between 2Ghz and 5Ghz AP, as well
as join using password (no longer required to boot with NSS off first,
connect the client to acquire PSK, and reboot back with nss wifi offload
enabled).

Uptime has been 5 hours and so far no issues.

ath11k_nss: Remove unecessary clang-tidy formatting

ath11k_nss: add 'debug_mode' flag quiet warnings

Will properly handle:
```
[Mon Dec 25 16:51:34 2023] ath11k c000000.wifi: encap mismatch in nss tx skb encap type 1 vif encap type 2
```

should take the path for native wifi encap

ath11k_nss: Rework depends, make `nss_redirect` optional

1.) Added a reworked `qca-nss-pbuf` init script from QSDK that will set sysctl
    NSS `n2hcfg` wifi options based on board type and available
    RAM.

2.) ath11k is fully capable of offloading wifi, it does not need
    mac80211 to create any NSS vifs. This lowers overhead and has actually
    shown considerable speed improvements for CPU programs on the router
    side (i.e. SMB). I believe ax3600's IoT (ath10k) would require it
    for offloading.

    I've added 2 new makemenu options, `MAC80211_NSS_SUPPORT` which enables
    NSS related features, and `MAC80211_NSS_REDIRECT` which provides the option to
    autoload the module on boot with `nss_redirect=1`.

3.) Reverted the option that deafulted `ATH11K_MEM_PROFILE_512M` to
    true. This was not required for platforms with 1GB or more memory
    (which is most of them). The default is 1GB. Select for platforms
    like Xiaomi AX3600.

ath11k_nss: remove requirement for '/sys/kernel/debug/ath11k'

ath11k_nss: set default values lower to avoid eating up memory

ath11k_nss: Add NSS VLAN support + improvements

1) tweaked qca-nss-pbuf script to better handle different board configs
2) added some QSDK NSS patches for dynamic vlan, WDS.
3) added QSDK fixes for beacon, and bt-coex

For devices that keep getting disconnected (mostly on 2G). It is
recommended to use the following settings for wifi. Change for your
country.

config wifi-device 'radio0'
	option type 'mac80211'
	option path 'platform/soc/c000000.wifi'
	option band '5g'
	option txpower '24'
	option country 'PA'
	option channel '100'
	option htmode 'HE160'
	option cell_density '0'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option encryption 'psk2'
	option key 'SOME_PASSWORD'
	option ssid 'EXAMPLE_5G'
	option dtim_period '3'
	option max_inactivity '86400'
	option disassoc_low_ack '0'

config wifi-device 'radio1'
	option type 'mac80211'
	option path 'platform/soc/c000000.wifi+1'
	option band '2g'
	option htmode 'HT20'
	option channel '1'
	option txpower '36'
	option country 'PA'
	option cell_density '0'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'EXAMPLE_2G'
	option encryption 'psk2'
	option key 'SOME_PASSWORD'
	option max_inactivity '86400'
	option dtim_period '3'
	option disassoc_low_ack '0'

WPA3 should be disabled, and left as WPA2. Experimenting with max_inactivity, dtim_period, and disassoc_low_ack to hopefully resolve the deauth disconnects.
2024-10-11 19:19:01 -04:00
bitthief
a6af12c8fd qualcommax: net: QCA NSS qdisc ifb support
Signed-off-by: bitthief <bitthief@protonmail.ch>
2024-10-11 19:19:01 -04:00
bitthief
dde77826a7 qualcommax: net: QCA NSS igs support
Signed-off-by: bitthief <bitthief@protonmail.ch>
2024-10-11 19:19:01 -04:00
bitthief
5fc90b40e6 qualcommax: dts: add NSS nodes to IPQ807x devices
Signed-off-by: bitthief <bitthief@protonmail.ch>

qualcommax: dts: provide label for NSS reserved-memory

Provide a label for the NSS reserved-memory node so it can be easily passed
to the NSS DRV instead of having to global match by name which is fragile.

Signed-off-by: bitthief <bitthief@protonmail.ch>
2024-10-11 19:19:01 -04:00