Patch is updated to match closer to QSDK's implementation for
ath11k/12k. The null chanctx warning is likely due to the way NSS is
managing the interface. This patch (for now) is a workaround to prevent
the BUG_ON() from triggering for dynamic VLANs.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
These changes revert parts of QCom's NSS patches to bring it closer to upstream Linux.
* The structure of `hal_wbm_release_ring` is restored
* `changed` in ath11k_mac_op_nss_bss_info_changed() is set back to u64
* `ath11k_mac_op_update_vif_offload()` returns void as in mainline.
* Reverted `ath10k_update_vif_offload()` to return void.
Ideally the original patches would be updated to avoid introducing these changes in the first place
but since there are a number of patches in the series, they too will need to be updated.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Mark the `24.10-nss-mx4300` branch as deprecated since MX4300 support has been backported upstream.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Patch resolves issues where certain brodcast frames like ARP or mDNS are
not reliably transmitted after GTK key exchange.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Rebased against upstream commit 87033
mac80211: improve single-wiphy multi-radio support
Signed-off-by: Sean Khan <datapronix@protonmail.com>
ath11k_nss: Refresh patches against rebase 53eab61
Author: Felix Fietkau <nbd@nbd.name>
AuthorDate: Mon Nov 18 11:21:02 2024 +0100
Commit: Felix Fietkau <nbd@nbd.name>
CommitDate: Mon Nov 18 11:44:44 2024 +0100
mac80211: backport some upstream fixes
Fix various issues, including potential crashes
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
ath11k_nss: Fix patches for backports 6.12.6
Signed-off-by: Sean Khan <datapronix@protonmail.com>
ath11k_nss: Refresh patches for backports 6.12.6
Signed-off-by: Sean Khan <datapronix@protonmail.com>
There is a null pointer bug caused by inconsistent handling of the
`ath11k_base` structure. Previously, functions accessing
`ar->ab` internally, assumed it was always valid. If `ar->ab` was
not properly initialized, this led to null pointer dereferences.
This patch resolves the issue by:
- Explicitly passing `struct ath11k_base *ab` to functions that
require it, instead of relying on `ar->ab`.
- Replacing all instances of `ar->ab` with `ab` for direct access.
Patch by: Sebastian Gottschall <s.gottschall@dd-wrt.com>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
(cherry picked from commit 1f6f55f9c737ece5e3d8156bbe280f84ea4bd480)
- fix issue #15: minor config mistake in the new nss setup vlan readme guide
- fix formatting of primary subsection displaying too large.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Change "GRO FRAG" to "Interface" to account for additional information
of other interface features (i.e. tx-checksumming)
Signed-off-by: Sean Khan <datapronix@protonmail.com>
* 802.11 k/v/r now fully works in sae-mixed mode. So we can now switch
from psk2 (WPA2) to WPA2/WPA3 mixed mode.
* Clean up uncessary configs
* Remove WDS example as it's not applicable in this example
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Mistakenly edited the patch by hand thinking I had incorrectly imported
it from @BS.
Original patch was throwing
```
peer.c:572:1: error: label at end of compound statement is a C23 extension
```
Moved spin_unlocks into exit as that's what it would have been doing
anyways.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
The firmware for 'ct' does not support ethernet frames, which is
required for partial offload with mac80211
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Improve NSS event callback ihandling for better clarity and type safety
This patch modifies ath11k_nss_wifili_event_receive to take a context parameter
, enhancing code clarity by explicitly passing the ath11k_base.
A wrapper function, ath11k_nss_wifili_ext_callback_wrapper, retrieves
the ath11k_base from the net_device's private data, ensuring correct
context handling.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Rather than pollute `qca-nss-ecm` with logic specific to ath11k, move
into its own hotplug script managed by mac80211. Also enforce
`qca-nss-ecm` dependency.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
- Added detailed build instructions for new users,
including the use of `scripts/env` for reproducible builds.
- Updated comments to provide context for each config setting and package.
- Clarified steps for selecting target devices and running make commands.
- Included notes on SSL preferences, performance optimizations, and optional packages.
- Removed redundant or unnecessary package entries for improved readability.
Signed-off-by: Sean Khan <datapronix@protonmail.com>
Although qca-nss-ecm isn't explicitly depended on by other
nss packages, it is still required for proper offloading.
There are also a few init and hotplug scripts needed
to mitigate issues (like disabling rx-gro-list)
Signed-off-by: Sean Khan <datapronix@protonmail.com>
For NSS setups, you CANNOT enable option for vlan filtering.
This is done internally by NSS (via `kmod-qca-nss-drv-vlan-mgr`).
Check if you have it enabled by running the following command:
`uci show network | grep vlan_filtering`
If it's enabled, you might see:
`network.@device[0].vlan_filtering='1'`
Disable it by running the following commands:
```sh
uci del network.@device[0].vlan_filtering
uci commit network
service network restart
```
Or reboot the device
You also cannot use tagging in the typical way, as the NSS does not support it.
That means your config must not anything like:
```
list ports 'lan1:u*'
list ports 'lan2:t'
list ports 'lan3:t'
```
To set up VLANs you must:
1.) Set them up on specific ports
2.) Bridge them into interfaces (they can be left unmanaged)
3.) Create firewall rules
Check `nss-setup/example/04-vlans` for more examples
Signed-off-by: Sean Khan <datapronix@protonmail.com>
1.) Clarify what radio_5g_high, and radio_5g_low mean
2.) Make txpower configurable
3.) Don't hardcode radio names in the generated config, but allow
specifiying them as variables.
4.) Set `cell_density` to 0 (don't enforce rates, let driver choose)
5.) Remove `pmk_r1_push` as `ft_psk_generate_local` already deals with
generating key locally
6.) Reduce `mesh_max_peer_links` and lower ttl
Signed-off-by: Sean Khan <datapronix@protonmail.com>
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)
* 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>
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>
Signed-off-by: Sean Khan <datapronix@protonmail.com>
docs: Add donation links
Not obligatory at all. Just adding for folks who appreciate my work, and
wanting to contribute. :)
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>
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>
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>
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>