Commit Graph

390 Commits

Author SHA1 Message Date
Ansuel Smith
ea5a395dc2 nss-drv: add support for kernel 5.15
Add support for kernel 5.15 for nss-drv

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2022-05-15 21:44:46 +02:00
XiaoliChan
edf4a0edcb [qca-ecm init] Add if condition in start function
Without this, the "net.bridge.bridge" will append into /etc/sysctl.d/qca-nss-ecm.conf in every system reboot/startup.

Signed-off-by: Xiaoli Chan <2209553467@qq.com>
2022-04-05 13:53:33 +02:00
Robert Marko
1f3addc3a2 treewide: update GIT source URL-s
Codeaurora is now in archive-only mode as everything has been moved to the
Gitlab based git.codelinaro.org

So, update all of the source URL-s as well as update to the latest 11.4
commit if there is a newer one.

Refresh patches as well if any have offsets or fuzzes.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-04-04 13:11:12 +02:00
Robert Marko
cb73d6682b treewide: mark 5.10 only kmods
Mark kmods which only currently work on 5.10 as such.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-19 18:35:07 +01:00
Robert Marko
293ea85ef8 nss-dp: fix FDB roaming
Try and solve the roaming issue by trying to replicate what NSS bridge
module is doing, but by utilizing switchdev FDB notifiers instead of
adding new notifiers to the bridge code.

We register a new non-blocking switchdev notifier and simply wait for
notification, and then process the SWITCHDEV_FDB_DEL_TO_DEVICE
notifications.

Those tell us that a certain FDB entry should be removed, then a VSI ID
is fetched for the physical PPE port and using that VSI ID and the
notification provided MAC adress existing FDB entry gets removed.

Mark qca-nss-dp as conflicting with the old NSS bridge module so
both cant be installed at the same time.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-19 18:34:58 +01:00
Robert Marko
8987699f24 nss-dp: fix switchdev for 5.15
Apply upstream switchdev changes to allow utilizing the switchdev code
on 5.15 kernel.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-18 18:31:33 +01:00
Robert Marko
f1c646d45b nss-dp: mark as required for preinit
Mark the NSS-DP kmod as required for preinit, thus it gets loaded before
preinit.

This finally allows using failsafe as now the network interfaces are
available for preinit to configure them.

Its still required to set the correct interface in preinit script for
each board.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-14 22:46:46 +01:00
Robert Marko
7833eff264 nss-drv: enable crypto
This enables the crypto code required by nss-crypto.

Also, disable erroring out on unused variables.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-13 15:47:47 +01:00
Robert Marko
43d92e2d79 Add 11.4 NSS Crypto
Add nss-crypto from QSDK11.4.

It provides support for the EIP-197 crypto HW.
It requires the EIP-197 firmware binaries.
They are not freely distributed and have to be pulled
from the stock firmware.

Made for IPQ807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-13 15:47:47 +01:00
Robert Marko
c5e731e58d firmware: Add NSS EIP firmware package
This is just a helper package that helps ensure
that the EIP-197 firmware is installed by being
used as a dependency on nss-crypto.

Note that the package does not provide or ship
with firmware binaries itself.
Those need to be pulled from the stock firmware.
Binaries required are:
* ifpp.bin
* ipue.bin
* ofpp.bin
* opue.bin

They should be placed inside of the src folder.

Note that we add the src folder to the .gitignore to
prevent accidentally pushing the FW to a public repo.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-13 15:47:47 +01:00
Robert Marko
0012f0a236 firmware: add AQR firmware loader
This provides a way of loading the firmware to Aquantia PHY-s which require it
from userspace.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-08 12:14:40 +01:00
Robert Marko
43a2da39d5 qca-nss-dp: implement ethernet IOCTL-s
Since kernel 5.15 ethernet/PHY related IOCTL-s have been split from the
generic IOCTL netdev op.
So, implement the new op instead of the generic one which is considered
for private IOCTL-s only now for 5.15+.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-03-08 12:09:43 +01:00
Robert Marko
11ce14453b qca807x: add a LED quirk for Xiaomi AX3600
AX3600 requires the same LED quirk so that PHY LED-s will blink even
once Linux resets the PHY.

So, just check for its compatible.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-01-26 14:55:52 +01:00
Robert Marko
1c9e256a25 Remove SSDK misplaced patch
The AX9000 quirk patch got left in the NSS root folder as well,
drop it.

Fixes: c78f42fe59 ("qca807x: add a LED quirk for Xiaomi AX9000")
Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-01-11 18:14:43 +01:00
Robert Marko
c78f42fe59 qca807x: add a LED quirk for Xiaomi AX9000
Xiaomi AX9000 has a single LED for each of 4 gigabit ethernet ports that
are connected to QCA8075, and that LED is connected to the 100M LED pin.

So, by default it will only work when in 10 or 100Mbit mode, this is quite
annoying and makes no sense(If they have connected it to the 1000Mbit LED
pin then it would have worked for 10/100 by default as well).

So, to solve this add a check for system compatible as we cant parse if
from DTS in any other way and set the 100M LED to blink on 1000Base-T
as well.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-01-11 00:44:47 +01:00
Robert Marko
afb1ac339c SSDK: add kernel 5.15 support
Add SSDK support for kernel 5.15, it just required the configuration check
and QCA8081 IRQ model update.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2022-01-01 20:01:52 +01:00
Dirk Buchwalder
f29396f467 qca-ssdk: This adds support for the AQR113C with the id
"113CB0 / 0x31c31C12" to the ssdk.

This is used in the QNAP 301w

Signed-off-by: Dirk Buchwalder <buchwalder@posteo.de>
2021-11-03 17:33:33 +01:00
psi-c
05904ca2b5 qca-nss-clients: Add bridge-mgr & vlan-mgr
Add support for bridge-mgr to fix switch-roaming issues on ipq807x.
2021-10-24 18:29:40 +02:00
Ansuel Smith
dff684e695 nss-drv: remove mismatched NSS FW support
There is no need for the mismatched 11.3 FW support on 11.4
SPF drivers, so drop the support.

This reverts commit f806309bbe.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-09-16 18:25:20 +02:00
Robert Marko
e2d6646754 nss-firmware: update to SPF 11.4
Qualcomm has finally made the firmware publicly
available, so lets update to it.

This will allow removing the compatibility patches.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-09-16 18:25:20 +02:00
Robert Marko
37a540ecd2 qca-nss-dp: fix of_get_mac_address()
Recently OpenWrt backported the updated of_get_mac_address()
function which returns and error code instead.

So, patch the SSDK to use it and fix the compilation error.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-08-13 20:14:48 +02:00
Robert Marko
28e62b1718 qca-ssdk: fix of_get_mac_address()
Recently OpenWrt backported the updated of_get_mac_address()
function which returns and error code instead.

So, patch the SSDK to use it and fix the compilation error.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-08-13 20:14:32 +02:00
Zhijun You
47bcf2b275 qca-ssdk: disable stack protector
add -fno-stack-protector to EXTRACFLAGS
so it can be compiled with GCC10

Signed-off-by: Zhijun You <hujy652@gmail.com>
2021-07-18 11:00:55 +02:00
Dirk Buchwalder
ce77000019 qca-nss-ecm: resolve the cpu high load regarding ecm
If using ECM, cpu load goes up (around 1.0) and stucks there.
This is due to using uninterruptible sleep function,
the patch changes this to interruptible sleep function.

Signed-off-by: Dirk Buchwalder buchwalder@posteo.de
2021-06-27 19:27:11 +02:00
Robert Marko
fc7b92be0f SSDK: disable parallel build
Actual code is being built in single thread mode as
SSDK enforces it, this will just cause OpenWrt buildroot
to fail sometimes as the headers it tries to use are not
yet installed by the SSDK.

So, disable parallel build as the time saving was minor
and it caused issues with parallel building.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-06-25 18:35:16 +02:00
Tiago Gaspar
884bf7fb08 qca-nss-clients: fix dependency issue
This commit fixes a dependency issue that was not allowing
qca-nss-clients to show up in menuconfig unless kmod-ppp was selected


Signed-off-by: Tiago Gaspar <tiagogaspar8@gmail.com>
2021-06-22 12:19:15 +02:00
Tiago Gaspar
82e0e83f35 qca-nss-ecm: fix dependency issue
This commit fixes a dependency issue that was not allowing qca-nss-ecm
to show up in menuconfig unless kmod-ppp was selected


Signed-off-by: Tiago Gaspar <tiagogaspar8@gmail.com>
2021-06-21 15:18:03 +02:00
Robert Marko
4667f4acb4 nss-drv: fix NSS FW coredump
DMA functions used for NSS FW coredump are called
with NULL being passed instead of device pointer.
This will obviously cause a NULL pointer exception
and crash the kernel.

So, fix it by passing proper device structure pointer.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-06-09 12:09:49 +02:00
Robert Marko
73460a73af nss-ecm: correct physdev iptables dependency
By accident ECM depended twice on kmod-ipt-physdev
instead of depending on iptables-mod-physdev.

So fix this by replacing the duplicate dependency with
iptables-mod-physdev.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-06-06 19:41:24 +02:00
Robert Marko
beb7dc84b5 nss-ecm: enable PPoE offloading
Enable the required PPoE interface and add dependency
to the PPoE kernel module.

Note that this requires kernel patches as well as the
nss-clients PPoE client package.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-05-31 23:32:24 +02:00
Robert Marko
c688f3e24d Add 11.4 NSS PPoE client
This adds the nss-clients PPoE client from QSDK11.4.

It enables PPoE offloading via NSS ECM.
Kernel patches are required.
Made for and tested on IPQ807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-05-31 23:29:22 +02:00
Robert Marko
ff1f06d815 Add 11.4 NSS-ECM
Add NSS-ECM from QSDK11.4

NSS-ECM is the main package for NSS offloading.
It provides various hooks, classifiers and calls to
offload or not.

It includes patches to make it run on kernel 5.10.
Made for IPQ807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-05-30 20:34:01 +02:00
Ansuel Smith
f806309bbe
Add Initial support for mismatched NSS firmware version
Permit to use mismatched NSS firmware version with higher QSDK version.
As we currently have 11.3 public NSS firmware, set this version by default.
This can be expanded later to support previous NSS version or to use newer
QSDK version if they are still compatible with basic NSS firmware loading
and handling.
Tested feature and working for now are basic ipv4 and ipv6 handling, virt_if
and wifili (wifi offload).

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
2021-05-30 19:03:03 +02:00
Robert Marko
cb9191c2ab Add NSS firmware package
NSS firmware is a package to install the required NSS
firmware when using NSS-DRV and other drivers.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-05-30 18:22:39 +02:00
Robert Marko
4ae9a73646 Add 11.4 NSS-DRV
Add NSS-DRV from QSDK11.4.

NSS-DRV is the core NSS driver providing NSS firmware
loading and communication between NSS cores and
other NSS offloading drivers.

It includes patches to it in order to work under kernel 5.10.
Made for and tested on IPQ807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-05-30 18:19:16 +02:00
Robert Marko
04a30f08ee Add 11.4 NSS-DP
Add NSS-DP from QSDK11.4.

NSS-DP is the ethernet driver kernel module.
It can be used in standalone mode or with NSS offloading.

It includes patches to it in order to work under kernel 5.10.
Made for and tested only for IPQ807x.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-05-30 18:18:29 +02:00
Robert Marko
d51a5ea873 Add 11.4 SSDK shell
Add SSDK shell from QSDK 11.4

SSDK shell is a companion application for the SSDK.
It provides manual tweaking and debug features.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-05-30 18:16:34 +02:00
Robert Marko
3a9bb2b4b9 Add 11.4 SSDK
Add SSDK package from QSDK 11.4.
SSDK is the package/driver providing:
* Switch
* PHY
* Partial PPE

It includes patches to it in order to work under kernel 5.10.
Patches are made for and test on IPQ807x only.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-05-30 18:13:16 +02:00
Robert Marko
fe31540b66 README: Update
Update README with some details.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2021-05-30 18:10:46 +02:00
Robert Marko
f80898dd7d
Initial commit 2021-05-30 17:58:24 +02:00