Commit Graph

62318 Commits

Author SHA1 Message Date
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
13782dcb4e ath11k_nss: Remove generic-ndo-get_stats64 patch
already remediated upstream:
target/linux/generic/backport-6.6/612-v6.9-net-get-stats64-if-device-if-driver-is-configured.patch

Signed-off-by: Sean Khan <datapronix@protonmail.com>
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
Sean Khan
320ec212fa ath11k_nss: consistently use ath11k_sta_to_arsta
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:24:15 -04:00
Sean Khan
67ff6d4eb0 docs: Add donation links
Not obligatory at all. Just adding for folks who appreciate my work, and
wanting to contribute. :)
2024-10-12 00:24:15 -04:00
Sean Khan
a099efb23c docs: Change default branch
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:24:15 -04:00
Sean Khan
7feb6e4d7c iproute2: NSS fixup for 6.11.0
Signed-off-by: Sean Khan <datapronix@protonmail.com>
(cherry picked from commit c4781eb3c1145282bc099ec2981cbaf66f3e455c)
2024-10-12 00:24:14 -04:00
Sean Khan
6590c095a7 ath11k_nss: Refresh patches for backports 6.11.2
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:24:14 -04:00
Sean Khan
1e1d9850b1 ath11k_nss: only show peer ast warning if NSS is off
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:23:08 -04:00
Sean Khan
45fa5d8aae ath11k_nss: Enhance nss_diag to properly list ifaces
Also optimized to use more native functions

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:34 -04:00
Sean Khan
b20dcd7d26 ath11k_nss: Add diagnostic gathering utility
This is meant to ease debugging when asking for support. Just run the
command "nss_diag" and include in your issues/forum posts.

Example of output
```
     MODEL: Linksys MX5300
   OPENWRT: r27645+154-f9a0485c99
IPQ BRANCH: qualcommax-6.x-nss-mx4300-6.11
IPQ COMMIT: 04c2d8a2db
  IPQ DATE: 2024-10-04
    NSS FW: NSS.HK.11.4.0.5-6-R
  MAC80211: v6.11.2-0-g7aa21fec187b
 ATH11K FW: WLAN.HK.2.9.0.1-01977-QCAHKSWPL_SILICONZ-1
  GRO FRAG: wan         : off
            br-lan      : off
            lan1        : off
            lan2        : off
            lan3        : off
            lan4        : off
            phy0-mesh0  : off
            phy1-ap0    : off
            phy2-ap0    : off

  NSS PKGS: kmod-qca-nss-cfi-cryptoapi - 6.6.54.12.5.2022.12.15~5cd07ce-r3
            kmod-qca-nss-crypto - 6.6.54.12.5.2022.12.15~3c5a574-r3
            kmod-qca-nss-dp - 6.6.54.2024.04.16~5bf8b91e-r1
            kmod-qca-nss-drv - 6.6.54.11.4.0.5.2021.09.13~53e5863-r14
            kmod-qca-nss-drv-bridge-mgr - 6.6.54.11.4.0.5.2021.08.17~c4049d1-r7
            kmod-qca-nss-drv-igs - 6.6.54.11.4.0.5.2021.08.17~c4049d1-r7
            kmod-qca-nss-drv-qdisc - 6.6.54.11.4.0.5.2021.08.17~c4049d1-r7
            kmod-qca-nss-drv-vlan-mgr - 6.6.54.11.4.0.5.2021.08.17~c4049d1-r7
            kmod-qca-nss-drv-wifi-meshmgr - 6.6.54.11.4.0.5.2021.08.17~c4049d1-r7
            kmod-qca-nss-ecm - 6.6.54.12.5.5.2024.09.02~bd5057b-r2
            nss-eip-firmware - 2.5.7-r3
            nss-firmware-default - 2024.08.04~794fe373-r1
            nss-firmware-ipq8074 - 2024.08.04~794fe373-r1
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
(cherry picked from commit a58914b4f788f6b5ee70ddad0a1f5c4e464a5629)
2024-10-12 00:13:34 -04:00
Sean Khan
972238704c ath11k_nss: Possible workaround to 0 wifi stats
Signed-off-by: Sean Khan <datapronix@protonmail.com>
(cherry picked from commit 0056ba46ffe980c88ab4d250eb4799cb0a632de7)
2024-10-12 00:13:34 -04:00
Sean Khan
ed6b24feee ath11k_nss: Delete 999-783-001-wifi-ath11k-Fix-BCCA-counter-for-EMA.patch
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:34 -04:00
Sean Khan
ef114845ff ath11k_nss: 6.11.2: fix 999-783-001-wifi-ath11k-Fix-BCCA-counter-for-EMA.patch
Signed-off-by: Sean Khan <datapronix@protonmail.com>

ath11k_nss: 6.11.2 refresh 999-783-001-wifi-ath11k-Fix-BCCA-counter-for-EMA.patch

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:34 -04:00
Sean Khan
f999581ad6 ath11k_nss: 6.11.2: fix 235-003-ath11k-add-AP_VLAN-vif-support-for-WDS-offload-in-NSS-offload.patch
Signed-off-by: Sean Khan <datapronix@protonmail.com>

ath11k_nss: 6.11.2 refresh 235-003-ath11k-add-AP_VLAN-vif-support-for-WDS-offload-in-NSS-offload.patch

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:33 -04:00
Sean Khan
65e72bb996 nss-setup: Make sure user selects their own target
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:33 -04:00
Sean Khan
5c5f445c0a nss-setup: change default optimization to '-O2'
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:33 -04:00
Sean Khan
279e382758 feeds: fix disable nss feed from being packaged
Fix typo in feeds name

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:33 -04:00
Sean Khan
0f982ac728 nss-setup: Add additional notes
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:33 -04:00
Sean Khan
0447f365cf nss-setup: fix led configs not generating
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:33 -04:00
Sean Khan
4341110aaa nss-setup: Refactor and add options for setting up nodes to use DHCP
* Refactor and clean up script and add more helpful docs.
* If a device's MAC doesn't match or isn't specified the following will
  be configured:
  1.) lan network will use DHCP ("lan_proto=dhcp") to retrieve an IP
  2.) device name will be "mx4300-xxxx", where "xxxx" represents the
      last 4 characters of the device MAC address found on the bottom of
      sticker.
* When in bridge mode, devices can be setup to use static or dhcp for their lan interface.
  This is specified with option "lan_proto=dhcp" under each devices's
  config, or if no suffix is specified, it is assumed the IP needs to be
  optained.
* Add fallback mgmt IP address 10.1.1.1 that can be used in case mesh
  fails to come up and hardwire connection is required. Make sure to set
  a static IP for your computer in the 10.1.1.x subnet in order to
  connect.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:33 -04:00
Sean Khan
8bb3af858c nss-setup: Add example NSS configs/scripts
Included starter config seed NSS offloading for MX4300. Although it can
be used by any compatible ipq807x NSS setup.

There is also an example 'uci-defaults' script that you can use to build
a single image for multiple nodes.

Although the script includes options to set low/high band for mesh backhaul.
Only the high-band works for offloading.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:32 -04:00
Sean Khan
6dcd937315 docs: Update README for NSS specific info
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:32 -04:00
Sean Khan
b442af7eb3 ath11k_nss: Fix iface stats showing up as 0
Generic ndo_get_stats64 was removed in kernel > 6.9. This ends up
breaking interface stats on NSS builds.

```
phy0-ap0  Link encap:Ethernet  HWaddr
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:841 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

phy1-ap0  Link encap:Ethernet  HWaddr
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
```

Until a better workaround is implemented revert the following patch.
```
commit c018411d355518a0b2a304d7543564cdd1b808b6
Author:     Breno Leitao <leitao@debian.org>
AuthorDate: Fri Jun 7 03:20:44 2024 -0700
Commit:     Johannes Berg <johannes.berg@intel.com>
CommitDate: Wed Jun 12 13:04:24 2024 +0200

    wifi: mac80211: Remove generic .ndo_get_stats64

    Commit 3e2f544dd8a33 ("net: get stats64 if device if driver is
    configured") moved the callback to dev_get_tstats64() to net core, so,
    unless the driver is doing some custom stats collection, it does not
    need to set .ndo_get_stats64.

    Since this driver is now relying in NETDEV_PCPU_STAT_TSTATS, then, it
    doesn't need to set the dev_get_tstats64() generic .ndo_get_stats64
    function pointer.

    In this driver specifically, .ndo_get_stats64 basically points to
    dev_fetch_sw_netstats(). Now it will point to dev_get_tstats64(), which
    calls netdev_stats_to_stats64() and dev_fetch_sw_netstats().
    netdev_stats_to_stats64() seems irrelevant for this driver.
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:32 -04:00
Sean Khan
351bd2c673 Revert "ath11k_nss: Revert patch for 512M + 2KB RX header"
This reverts commit 08db8048d06b9a3e45bbcb7ab49463a21c769dc7.
2024-10-12 00:13:32 -04:00
Sean Khan
969afb5c69 ath11k_nss: fix WDS instability by disabling NAWDS mode
This patch replaces the problematic NAWDS stateless mode with standard
WDS in the ath11k driver. NAWDS has shown incompatibility with WDS AP
and STA modes in ath11k, leading to issues like MAC address
duplication and unstable connections. By switching to standard WDS,
this patch aims to resolve these issues.

It also enables WDS backhaul in NSS for better handling of backhaul links.

Testing is still ongoing, but early results indicate improved
stability and fewer connection problems in affected environments

Authored-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:32 -04:00
Sean Khan
5027f4220f ath11k_nss: mac80211: fix NULL pointer access, Klocwork issue
Currently we are dereferencing dev pointer without a NULL
check.

Fix this issue by adding a NULL check.

Patch-dependency: none
Patch-work: none
Fixes: 4b7afb52c8e2 (mac80211: reorganize code to remove a forward declaration)
Note: ath.git commit id is mentioned in the Fixes tag

Signed-off-by: Monika Korada <quic_koramoni@quicinc.com>

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:32 -04:00
Sean Khan
0e34b6ef70 ath11k_nss: remove call trace while rebooting AP
When a station idles for a long time, hostapd will try to send
a QoS Null frame to the station as "poll". NL80211_CMD_PROBE_CLIENT
is used for this purpose.
And the skb will be added to ack_status_frame - waiting for a
completion via ieee80211_report_ack_skb().

But when the peer was already removed before the tx_complete arrives,
the peer will be missing. And when using dev_kfree_skb_any (instead
of going through mac80211), the entry will stay inside
ack_status_frames thus not clean up related information in its
internal data structures. This IDR will therefore run full after
8K request were generated for such clients.
At this point, the access point <M-[>48;55;187;1760;2992will then just stall and not allow
any new clients because idr_alloc() for ack_status_frame will fail.

ieee80211_free_txskb() on the other hand will (when required) call
ieee80211_report_ack_skb() and make sure that (when required) remove
the entry from the ack_status_frame and clean up related
information in its internal data structures.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:31 -04:00
Sean Khan
6ab2b6bcb0 ath11k_nss: Consolidate Allow-fast-rx-by-bypassing-stats-update
This original patch: 237-006-ath11k-Allow-fast-rx-by-bypassing-stats-update.patch
was split into two patches:

237-001-ath11k-Allow-fast-rx-by-bypassing-stats-update.patch
237-006-ath11k-Allow-fast-rx-by-bypassing-stats-update.patch

Merge them back together to avoid confusion

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:31 -04:00
Sean Khan
6cde28ac45 ath11k_nss: Revert patch for 512M + 2KB RX header
These patches should not be needed anymore. They are more problematic
than helpful.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:31 -04:00
Sean Khan
6a61560236 ath11k_nss: Refresh patches for backports 6.11
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:31 -04:00
Sean Khan
c69b60a25a ath11k_nss: Fix patches for backports 6.11
deleted: (merged upstream)
package/kernel/mac80211/patches/nss/ath11k/336-ath11k-skip-status-ring-entry-processing.patch

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:31 -04:00
Sean Khan
5b86f73550 ath11k_nss: Remove unecessary ignore frags patch
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:13:31 -04:00
Sean Khan
fdafa477c2 nat46: Bump to version 2024-08-12
Brings in following changes

```
2024-07-31|b42c37d|Fix crash when viewing nat46 kernel module config
2024-07-18|3a9f630|nat46-module: fix modpost warning
2024-07-02|cb69317| "Add network namespace awareness to nat46" - take two.
```

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:15 -04:00
Sean Khan
287b057d2e ath11k_nss: Refresh patches for 6.9.9
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:15 -04:00
Sean Khan
29f38b383b ath11k_nss: skip status ring entry processing (V5)
Update patch from latest version found on patchwork

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:15 -04:00
Sean Khan
40ea5c9086 hostapd: fix MUEDCA patch for hostapd 2024-09-15
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:15 -04: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
6ecb328fa3 ath11k_nss: utilize existing function to get arvif from dev
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:14 -04:00
Sebastian Gottschall
51c1f0de46 ath11k_nss: fix bss transition firmware crash
fixes: ath11k: fix peer addition/deletion error on sta band migration: d673cb6fe6c03b2be157cc6c5db40481828d282d

the fix for sta band migration raises a new bug which causes the wifi
firmware to crash if you switch between 2 bssid's on the same band. this is
usually caused since the firmware observes 2 stations with the same
bss

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

Update 999-900-bss-transition-handling.patch

Signed-off-by: qosmio <datapronix@protonmail.com>
2024-10-11 19:19:14 -04:00
Sean Khan
927c5abffe ath11k_nss: WAR for association failure issue with WDS
Every 100 milliseconds, the station sends an "association request" and
the AP adds the peer and the AP responds to the station with an
"association response".

But "association response" takes time to reach the station. Because of
this, the station sends another "association request" to the AP.

In the second associate request, the AP removes the peer and re-adds
the station. Meanwhile, "association response" is reached to station
and station sends "QoS NULL" frame to AP.

The moment the station sends a QoS NULL frame to the ap, the peer on
the AP is deleted and the AP sends a de-authentication to the station.

To fix this issue, increased the assoc timeout period from 100 milli-
seconds to 500 milli seconds.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:14 -04:00
Sean Khan
688e25a60a ath11k_nss: Fix RX thermal throttling on newer 2.12 firmware
There is an issue when enabling thermal support on newer ath11k firmware.
TX/RX rates are being limited, often times 50% of client's HE
capabilities.

The issue stems from a mismatch in WMI API structure. The range to
throttle is currently "-100°C" to "150°C", this essentially means
"always" throttle.

Integrate patch from dd-wrt which adds missing WMI structures and
proper thermal ranges for IPQ5018, IPQ807x, and QCN9000.

Patch-by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:14 -04:00
Sean Khan
a87a3382d4 ath11k_nss: Possible fix for WDS
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:14 -04:00
Sean Khan
b46a81392a ath11k_nss: Revert logic from coconut branch in NSS redirect
There was logic that was initially included in the coconut branch of
QSDK for older mac80211 NSS implementation. It was brought over to
address an issue with ath10k where during heavy traffic, AP would trigger
`failed to increase tx pending count: -16, dropping`.

The issue was actually caused by `skb_recyler` malforming some packets.
Disabling `skb_recyler` fixed the error, and therefore the logic
regarding `skb_queue_len(&local->pending[q]) >= 1000` can be reverted to
match what is currently upstream with QSDK.

Alsi refreshed remaning patches after rebase.

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
c867de9529 qualcommax: add notes about SKB_RECYCLER_PREALLOC and SKB_FIXED_SIZE_2K
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:13 -04:00
Sean Khan
f9f488a83f qualcommax: enable skb_recycle for IPQ > 256M
Also set SKB_FIXED_SIZE_2K if IPQ memory profile is < 512M

Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-11 19:19:13 -04:00
Sean Khan
cfd7b7ed8c iproute2: NSS: sync patch from QSDK 12.5
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