openwrt/openwrt.git
21 months agobcm53xx: enable & setup packet steering
Rafał Miłecki [Fri, 10 Jun 2022 08:51:23 +0000 (10:51 +0200)]
bcm53xx: enable & setup packet steering

Packet steering can improve NAT masquarade performance on Northstar by
40-50%. It makes reaching 940-942 Mb/s possible on BCM4708 (and
obviously BCM47094 too). Add scripts setting up the most optimal
Northstar setup.

Below are testing results for running iperf TCP traffic from LAN to WAN.
They were used to pick up golden values.

┌──────────┬──────────┬────────────────────┬────────────────────┐
│   eth0   │  br-lan  │ flow_offloading=0  │ flow_offloading=1  │
│          │          ├─────────┬──────────┼─────────┬──────────┤
│ rps_cpus │ rps_cpus │ BCM4708 │ BCM47094 │ BCM4708 │ BCM47094 │
├──────────┼──────────┼─────────┼──────────┼─────────┼──────────┤
│        0 │        0 │     387 │      671 │     707 │      941 │
│        0 │        1 │     343 │      576 │     705 │      941 │
│        0 │        2 │   ✓ 574 │    ✓ 941 │     704 │      940 │
│        1 │        0 │     320 │      549 │     561 │      941 │
│        1 │        1 │     327 │      551 │     553 │      941 │
│        1 │        2 │     523 │    ✓ 940 │     559 │      940 │
│        2 │        0 │     383 │      652 │   ✓ 940 │      941 │
│        2 │        1 │     448 │      754 │   ✓ 942 │      941 │
│        2 │        2 │     404 │      655 │   ✓ 941 │      941 │
└──────────┴──────────┴─────────┴──────────┴─────────┴──────────┘

Above tests were performed with all eth0 interrupts handled by CPU0.
Setting "echo 2 > /proc/irq/38/smp_affinity" was tested on BCM4708 but
it didn't increased speeds (just required different steering):

┌──────────┬──────────┬───────────┐
│   eth0   │  br-lan  │ flow_offl │
│   rx-0   │   rx-0   │ oading=0  │
│ rps_cpus │ rps_cpus │  BCM4708  │
├──────────┼──────────┼───────────┤
│        0 │        0 │       384 │
│        0 │        1 │     ✓ 574 │
│        0 │        2 │       348 │
│        1 │        0 │       383 │
│        1 │        1 │       412 │
│        1 │        2 │       448 │
│        2 │        0 │       321 │
│        2 │        1 │       520 │
│        2 │        2 │       327 │
└──────────┴──────────┴───────────┘

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit fcbd39689ebfef20c62fe3882d51f3af765e8028)

21 months agobcm53xx: disable GRO by default at kernel level
Rafał Miłecki [Mon, 20 Jun 2022 08:21:20 +0000 (10:21 +0200)]
bcm53xx: disable GRO by default at kernel level

This improves NAT masquarade network performance.

An alternative to kernel change would be runtime setup but that requires
ethtool and identifying relevant network interface and all related
switch ports interfaces.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 82d0dd8f8aa11249944fe39cd0d75a1524ec22ec)

21 months agobcm53xx: revert bgmac back to the old limited max frame size
Rafał Miłecki [Fri, 10 Jun 2022 12:02:19 +0000 (14:02 +0200)]
bcm53xx: revert bgmac back to the old limited max frame size

Bumping max frame size has significantly affected network performance.
It was done by upstream commit that first appeared in the 5.7 release.

This change bumps NAT masquarade speed from 196 Mb/s to 383 Mb/s for the
BCM4708 SoC.

Ref: f55f1dbaad33 ("bcm53xx: switch to the kernel 5.10")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 230c9da963aad9e1a2f8f128c30067ccad2efef8)

21 months agokernel: drop patch adding hardcoded kernel compilation flags
Rafał Miłecki [Wed, 15 Jun 2022 10:36:37 +0000 (12:36 +0200)]
kernel: drop patch adding hardcoded kernel compilation flags

1. KCFLAGS should be used for custom flags
2. Optimization flags are arch / SoC specific
3. -fno-reorder-blocks may *worsen* network performace on some SoCs
4. Usage of flags was *reversed* since 5.4 and noone reported that

If we really need custom flags then CONFIG_KERNEL_CFLAGS should get
default value adjusted properly (per target).

Ref: 4e0c54bc5bc8 ("kernel: add support for kernel 5.4")
Link: http://lists.openwrt.org/pipermail/openwrt-devel/2022-June/038853.html
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20190409093046.13401-1-zajec5@gmail.com/
Cc: Felix Fietkau <nbd@nbd.name>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Rui Salvaterra <rsalvaterra@gmail.com>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 22168ae68101b95d03741b0e9e8ad20b8a5ae5b7)

21 months agokernel: support setting extra CFLAGS for kernel compilation
Rafał Miłecki [Wed, 15 Jun 2022 10:36:36 +0000 (12:36 +0200)]
kernel: support setting extra CFLAGS for kernel compilation

They may be used e.g. to optimize kernel size or performance.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 907d7d747243044f86588f0d82993e8c106cb02c)

21 months agokernel: use KCFLAGS for passing EXTRA_OPTIMIZATION flags
Rafał Miłecki [Wed, 15 Jun 2022 08:41:37 +0000 (10:41 +0200)]
kernel: use KCFLAGS for passing EXTRA_OPTIMIZATION flags

This uses kernel's generic variable and doesn't require patching it with
a custom Makefile change. It's expected *not* to change any behaviour.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit 1d42af720c6b6dcfcdd0b89bce386fca1607dcb3)
Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
(cherry picked from commit 24e27bec9a6df1511a504cf04cd9578a23e74657)

21 months agoOpenWrt v22.03.0-rc5: revert to branch defaults
Hauke Mehrtens [Wed, 6 Jul 2022 21:01:51 +0000 (23:01 +0200)]
OpenWrt v22.03.0-rc5: revert to branch defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 months agoOpenWrt v22.03.0-rc5: adjust config defaults v22.03.0-rc5
Hauke Mehrtens [Wed, 6 Jul 2022 21:01:47 +0000 (23:01 +0200)]
OpenWrt v22.03.0-rc5: adjust config defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 months agokernel: Add missing mediatek configuration options
Hauke Mehrtens [Wed, 6 Jul 2022 18:32:11 +0000 (20:32 +0200)]
kernel: Add missing mediatek configuration options

When building the mediatek/mt7629 target in OpenWrt 22.03 the kernel
does not have a configuration option for CONFIG_CRYPTO_DEV_MEDIATEK. Add
this option to the generic kernel configuration and also add two other
configuration options which are removed when we refresh the mt7629
kernel configuration.

Fixes: 2bea35cb55d7 ("mediatek: remove crypto-hw-mtk package")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit dcc0fe24ea216d32300c0f01c8879e586d89cc1e)

21 months agoopenssl: bump to 1.1.1p
Andre Heider [Thu, 23 Jun 2022 07:08:07 +0000 (09:08 +0200)]
openssl: bump to 1.1.1p

Changes between 1.1.1o and 1.1.1p [21 Jun 2022]

  *) In addition to the c_rehash shell command injection identified in
     CVE-2022-1292, further bugs where the c_rehash script does not
     properly sanitise shell metacharacters to prevent command injection have been
     fixed.

     When the CVE-2022-1292 was fixed it was not discovered that there
     are other places in the script where the file names of certificates
     being hashed were possibly passed to a command executed through the shell.

     This script is distributed by some operating systems in a manner where
     it is automatically executed.  On such operating systems, an attacker
     could execute arbitrary commands with the privileges of the script.

     Use of the c_rehash script is considered obsolete and should be replaced
     by the OpenSSL rehash command line tool.
     (CVE-2022-2068)
     [Daniel Fiala, Tomáš Mráz]

  *) When OpenSSL TLS client is connecting without any supported elliptic
     curves and TLS-1.3 protocol is disabled the connection will no longer fail
     if a ciphersuite that does not use a key exchange based on elliptic
     curves can be negotiated.
     [Tomáš Mráz]

Signed-off-by: Andre Heider <a.heider@gmail.com>
(cherry picked from commit eb7d2abbf06f0a3fe700df5dc6b57ee90016f1f1)

21 months agomediatek: mt7622: fix white dome LED of UniFi 6 LR
Daniel Golle [Mon, 4 Jul 2022 17:42:20 +0000 (18:42 +0100)]
mediatek: mt7622: fix white dome LED of UniFi 6 LR

The recent differentiation between v1 and v2 of the UniFi 6 LR added
support for the v2 version which has GPIO-controlled LEDs instead of
using an additional microcontroller to drive an RGB led.
The polarity of the white LED, however, was inverted and the default
states didn't make a lot of sense after all. Fix that.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit f58e562b07803192d029a6be8c8c372e1ed11c68)

21 months agomvebu: cortexa72: fix ImageBuilder for IEI Puzzle devices
Daniel Golle [Mon, 4 Jul 2022 17:33:13 +0000 (18:33 +0100)]
mvebu: cortexa72: fix ImageBuilder for IEI Puzzle devices

The line trying to generate the standard sdcard.img.gz fails due to
boot.scr not being generated.
Remove the line in order to use the default sdcard.img.gz which is
exactly the same but includes generating the boot.scr file.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 1d3b57dbeeae70ab3a8f71d3bdb6fd41a00e1d22)

21 months agouboot-mediatek: update UniFi 6 LR board name
Daniel Golle [Thu, 16 Jun 2022 18:55:02 +0000 (19:55 +0100)]
uboot-mediatek: update UniFi 6 LR board name

Select matching U-Boot for both v1 and v2 variants.

Fixes: 15a02471bb ("mediatek: new target mt7622-ubnt-unifi-6-lr-v1")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 2caa03ec8607fb38e11ac1ce3c7b698f80191b49)

21 months agomediatek: add Ubiquiti UniFi 6 LR v2 targets
Henrik Riomar [Tue, 31 May 2022 17:52:24 +0000 (19:52 +0200)]
mediatek: add Ubiquiti UniFi 6 LR v2 targets

Add targets:
 * Ubiquiti UniFi 6 LR v2
 * Ubiquiti UniFi 6 LR v2 (U-Boot mod)

This target does not have a RGB led bar like v1 did

Used target/linux/ramips/dts/mt7621_ubnt_unifi.dtsi as inspiration

The white dome LED is default-on, blue will turn on when the system is
in running state

Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com>
(cherry picked from commit 31d86a1a119265393db02aa66e6bc6518ee7b905)

21 months agomediatek: new target ubnt_unifi-6-lr-v1-ubootmod
Henrik Riomar [Tue, 31 May 2022 17:49:49 +0000 (19:49 +0200)]
mediatek: new target ubnt_unifi-6-lr-v1-ubootmod

based on current ubnt_unifi-6-lr-ubootmod

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[added SUPPORTED_DEVICES for compatibility with existing setups]
Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com>
(cherry picked from commit 5c8d3893a78fd81454930de30d90efaef99f8734)

21 months agomediatek: new target mt7622-ubnt-unifi-6-lr-v1
Henrik Riomar [Tue, 31 May 2022 17:18:06 +0000 (19:18 +0200)]
mediatek: new target mt7622-ubnt-unifi-6-lr-v1

Based on current mt7622-ubnt-unifi-6-lr, this is a preparation for
adding a v2 version of this target

* v1 - with led-bar
* v2 - two simple GPIO connected LEDs (in later commits)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[added SUPPORTED_DEVICES for compatibility with existing setups]
Signed-off-by: Henrik Riomar <henrik.riomar@gmail.com>
(cherry picked from commit 15a02471bb854245f8f94398c1e1d9ce29c2c341)

21 months agomediatek: build ubnt-ledbar as a module
Chuanhong Guo [Sat, 30 Apr 2022 15:08:00 +0000 (23:08 +0800)]
mediatek: build ubnt-ledbar as a module

The config for LEDS_UBNT_LEDBAR doesn't stay in mt7629 kconfig because
of its I2C dependency. Build it as a module and let buildroot handle
this config option instead.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
(cherry picked from commit d9ea9c06e98b597174e0e94e0a13934637c0c03e)

21 months agomediatek: remove crypto-hw-mtk package
Eneas U de Queiroz [Thu, 31 Mar 2022 13:38:49 +0000 (10:38 -0300)]
mediatek: remove crypto-hw-mtk package

The MediaTek's Crypto Engine module is only available for mt7623, in
which case it is built into the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 3f2d0703b60357e3ff1865783335be9f51528eb8)

21 months agomediatek: mt7622: fix banana pi r64 wps button
Nick Hainke [Fri, 1 Jul 2022 13:01:13 +0000 (15:01 +0200)]
mediatek: mt7622: fix banana pi r64 wps button

Fix the wps button to prevent wrongly detected recovery procedures.
In the official banana pi r64 git the wps button is set to
GPIO_ACTIVE_LOW and not GPIO_ACTIVE_HIGH.

Import patch to fix on boot unwanted recovery entering:

  Press the [f] key and hit [enter] to enter failsafe mode
  Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
  - failsafe button wps was pressed -
  - failsafe -

Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry-picked from commit 668619425526cb0d43f8536a2f6f15a6314e6553)

21 months agomediatek/mt7629: Activate CONFIG_ARM_ARCH_TIMER_EVTSTREAM
Hauke Mehrtens [Sun, 3 Jul 2022 20:20:54 +0000 (20:20 +0000)]
mediatek/mt7629: Activate CONFIG_ARM_ARCH_TIMER_EVTSTREAM

The kernel configuration option CONFIG_MACH_MT7629 selects
CONFIG_HAVE_ARM_ARCH_TIMER now. Handle this change in the config-5.10.

This fixes some build problems.

Fixes: 81530d69ef58 ("kernel: bump 5.10 to 5.10.121")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 months agomt76: update to the latest version
Felix Fietkau [Sun, 3 Jul 2022 17:24:48 +0000 (19:24 +0200)]
mt76: update to the latest version

93e3fce916c6 mt76: pass original queue id from __mt76_tx_queue_skb to the driver

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 06d0cc2fb365485dd1ddd32937afd5091fa4b8a8)

21 months agokernel: Refresh patches for all targets
Hauke Mehrtens [Sun, 3 Jul 2022 15:26:59 +0000 (15:26 +0000)]
kernel: Refresh patches for all targets

This refreshes the patches on top of kernel 5.4.127.

Deleted (upstreamed):
bcm27xx/patches-5.10/950-0005-Revert-mailbox-avoid-timer-start-from-callback.patch [0]
bcm27xx/patches-5.10/950-0678-bcm2711_thermal-Don-t-clamp-temperature-at-zero.patch [1]

Needed manual modifications:
bcm27xx/patches-5.10/950-0410-drm-atomic-Pass-the-full-state-to-CRTC-atomic-begin-.patch

[0]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.127&id=bb2220e0672b7433a9a42618599cd261b2629240
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.127&id=83603802954068ccd1b8a3f2ccbbaf5e0862acb0

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
21 months agomt76: update to the latest version
Felix Fietkau [Sat, 2 Jul 2022 14:55:13 +0000 (16:55 +0200)]
mt76: update to the latest version

c07f45927839 firmware: update mt7622 firmware to version 20220630
af406a2d1c36 mt76: do not use skb_set_queue_mapping for internal purposes

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 8e90abb39615e25a03f255f2c16c9203ab976ae7)

21 months agomac80211: fix mesh queue selection issue
Felix Fietkau [Sat, 2 Jul 2022 14:53:54 +0000 (16:53 +0200)]
mac80211: fix mesh queue selection issue

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 51e9d496ba7958fb9f2d3eb4bc7f257837145dd0)

21 months agoramips: improve YunCore AX820 LEDs
Thibaut VARÈNE [Thu, 30 Jun 2022 08:06:35 +0000 (10:06 +0200)]
ramips: improve YunCore AX820 LEDs

At least two AX820 hardware variants are known to exist, but they cannot
be distinguished (same hardware revision, no specific markings).

They appear to have the same LED hardware, but wired differently:

- One has a red system LED at GPIO 15, a green wlan2g LED at GPIO 14 and
  a blue wlan5g LED at GPIO 16;
- The other only offers a green system LED at GPIO 15, with GPIO 14 and
  16 being apparently not connected

Finally, a Yuncore datasheet says the canonical wiring should be:
- Blue wlan2g GPIO 14, green system GPIO 15, red wlan5g GPIO 16

All GPIOs are tied to a single RGB LED which is exposed via lightpipe on
the device front casing.

Considering the above, this patch exposes all three LEDs, preserves the
common system LED (GPIO 15) as the openwrt status LED, and removes the
color information from the LEDs names since it is not consistent across
hardware. The LED naming is made consistent with other YunCore devices.
A note is added in DTS to ensure this information is always available
and prevent unwanted changes in the future.

Fixes: #10131 "YunCore AX820: GPIO LED not correct"
Reviewed-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
21 months agokernel: bump 5.10 to 5.10.127
John Audia [Wed, 29 Jun 2022 08:22:49 +0000 (04:22 -0400)]
kernel: bump 5.10 to 5.10.127

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 433dc5892a60003753655aac6e6a4b59fb13b2e4)

21 months agokernel: bump 5.10 to 5.10.126
John Audia [Mon, 27 Jun 2022 20:40:48 +0000 (16:40 -0400)]
kernel: bump 5.10 to 5.10.126

No patches rebased, just checksum update for this refresh.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit c5882c33a78153e84acca22af3429ff6eb6c99e0)

21 months agoqoriq: enable Book-E Watchdog Timer
Stijn Tintel [Fri, 1 Jul 2022 13:17:37 +0000 (16:17 +0300)]
qoriq: enable Book-E Watchdog Timer

Enable PowerPC Book-E Watchdog Timer support. Having this enabled
in-kernel will result in procd starting it during boot.

This effectively solves the problem of the WDT in the Winbond W83793 chip
potentially resetting the system during sysupgrade, which could result
in an unbootable device. While the driver is modular, resulting in procd
not starting the WDT during boot (because that happens before kmod
load), the WDT handover during sysupgrade results in the WDT being
started. This normally shouldn't be a problem, but the W83793 WDT does
not like procd's defaults, nor the handover happening during sysupgrade.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 04071cb111f290417074de130d34ae5895fd3a7b)

21 months agoipq40xx: cut ath10k board file for mikrotik subtarget
John Thomson [Fri, 20 May 2022 22:13:21 +0000 (08:13 +1000)]
ipq40xx: cut ath10k board file for mikrotik subtarget

Avoid shipping ath10k board file in Mikrotik initram images

Most will only ever need to use these initram images once—to initially
load OpenWrt, but fix these images for more consistent Wi-Fi performance
between the initram and installed squashfs images.

OpenWrt BUILDBOT config ignores -cut packages in the initram images build.
This results in BUILDBOT initram images including the linux-firmware
qca4019 board-2.bin, and (initram image booted) Mikrotik devices loading
a generic BDF, rather than the intended BDF data loaded
from NOR as an api 1 board_file.

buildbot snapshot booted as initram image:
cat /etc/openwrt_version
r19679-810eac8c7f
dmesg | grep ath10k | grep -E board\|BDF
[    9.794556] ath10k_ahb a000000.wifi: Loading BDF type 0
[    9.807192] ath10k_ahb a000000.wifi: board_file api 2 bmi_id 0:16
crc32 11892f9b
[   12.457105] ath10k_ahb a800000.wifi: Loading BDF type 0
[   12.464945] ath10k_ahb a800000.wifi: board_file api 2 bmi_id 0:17
crc32 11892f9b

CC: Robert Marko <robimarko@gmail.com>
Fixes: 5eee67a72fed ("ipq40xx: mikrotik: dont include ath10k-board-qca4019 by default")
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Reviewed-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 602b5f6c60a2827bd918dfae0ffb271f8b88f4df)
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
21 months agoipq40xx: mikrotik: dont include ath10k-board-qca4019 by default
Robert Marko [Sat, 14 May 2022 18:30:44 +0000 (20:30 +0200)]
ipq40xx: mikrotik: dont include ath10k-board-qca4019 by default

Since MikroTik subtarget now uses dynamic BDF loading its crucial that it
doesnt include the board-2.bin at all which is provided by the
ath10k-board-qca4019 package.

So to resolve this dont include the ath10k-board-qca4019 package on the
MikroTik subtarget.

Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 5eee67a72fed52ac686dd467d93eea95d44c8dff)
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
21 months agoipq-wifi: remove packaged BDF-s for MikroTik devices
Robert Marko [Tue, 30 Nov 2021 09:25:52 +0000 (10:25 +0100)]
ipq-wifi: remove packaged BDF-s for MikroTik devices

Since we now provide the BDF-s for MikroTik IPQ40xx devices on the fly,
there is noneed to include package and ship them like we do now.

This also resolves the performance issues that happen as MikroTik
changes the boards and ships them under the same revision but they
actually ship with and require a different BDF.

Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit ab141a6e2cb645ff64adb107af2e8973a720c1c7)
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
21 months agoipq40xx: mikrotik: provide BDF-s on demand
Robert Marko [Tue, 30 Nov 2021 09:27:50 +0000 (10:27 +0100)]
ipq40xx: mikrotik: provide BDF-s on demand

Since we now can pass the API 1 BDF-s aka board.bin to the ath10k
driver per radio lets use that to provide the BDF-s for MikroTik devices.

This also resolves the performance issues that happen as MikroTik changes
the boards and ships them under the same revision but they actually ship
with and require a different BDF.

Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 4d4462cc2ace4b044e99e9b22a24cb4d89c7db95)
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
21 months agomac80211: ath10k: backport bus and device specific API 1 BDF selection
Robert Marko [Tue, 30 Nov 2021 09:37:41 +0000 (10:37 +0100)]
mac80211: ath10k: backport bus and device specific API 1 BDF selection

Some ath10k IPQ40xx devices like the MikroTik hAP ac2 and ac3 require the
BDF-s to be extracted from the device storage instead of shipping packaged
API 2 BDF-s.

This is required as MikroTik has started shipping boards that require BDF-s
to be updated, as otherwise their WLAN performance really suffers.
This is however impossible as the devices that require this are release under
the same revision and its not possible to differentiate them from devices
using the older BDF-s.

In OpenWrt we are extracting the calibration data during runtime and we are
able to extract the BDF-s in the same manner, however we cannot package the
BDF-s to API 2 format on the fly and can only use API 1 to provide BDF-s on
the fly.
This is an issue as the ath10k driver explicitly looks only for the board.bin
file and not for something like board-bus-device.bin like it does for pre-cal
data.
Due to this we have no way of providing correct BDF-s on the fly, so lets
extend the ath10k driver to first look for BDF-s in the board-bus-device.bin
format, for example: board-ahb-a800000.wifi.bin
If that fails, look for the default board file name as defined previously.

So, backport the upstream ath10k patch.

Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 3daf2d477ee728b5b066fe7f31808a5f19bb98a1)
[prune unrelated patch refreshes]
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
21 months agoath10k-ct: update to 2022-05-13
Robert Marko [Sat, 14 May 2022 18:14:14 +0000 (20:14 +0200)]
ath10k-ct: update to 2022-05-13

Update ath10k-ct to the latest version which includes the backported
ath10k commit for requesting API 1 BDF-s with a unique name like caldata.

Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit ab97b2a25d69215dcc0d9621e491aa7b17f315cb)
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
21 months agofirewall4: bump to git HEAD
Stijn Tintel [Fri, 17 Jun 2022 11:58:20 +0000 (14:58 +0300)]
firewall4: bump to git HEAD

  11f5c7b fw4.uc: fix zone helper assignment
  b9d35ff fw4.uc: don't skip zone for unavailable helper
  e35e26b tests: add test for zone helpers
  a063317 ruleset: fix conntrack helpers
  e1cb763 ruleset: reuse zone-jump.uc template for notrack and helper chain jumps
  11410b8 ruleset: reorder declarations & output tweaks
  880dd31 fw4: fix skipping invalid IPv6 ipset entries
  5994466 fw4: simplify `is_loopback_dev()`
  53886e5 fw4: fix crash in parse_cthelper() if no helpers are present
  11256ff fw4: add support for configurable includes
  3b5a033 tests: add test coverage for firewall includes
  d79911c fw4: support sets with timeout capability but without default expiry
  15c3831 fw4: add support for `option log` in rule and redirect sections

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit e8433fb4336b72e44a40cb667ee2eb06e0a31109)

21 months agoqoriq: enable HARDENED_USERCOPY
Stijn Tintel [Tue, 28 Jun 2022 21:51:41 +0000 (00:51 +0300)]
qoriq: enable HARDENED_USERCOPY

The random crashes observed with HARDENED_USERCOPY enabled no longer
seem to occur. Enable HARDENED_USERCOPY to improve security.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 61587c92425ecdcabb82a6c81cff698a23ffb049)

21 months agoqoriq: disable CONFIG_COMPAT
Stijn Tintel [Tue, 28 Jun 2022 21:12:23 +0000 (00:12 +0300)]
qoriq: disable CONFIG_COMPAT

We do not need support for 32 bit applications, as we're building
everything for 64 bit.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 3e1848ee0ff3b01461a9d2f772bde27a4101f3d9)

21 months agoqoriq: 02_network fix sweth globbing logic
Thibaut VARÈNE [Tue, 28 Jun 2022 14:40:05 +0000 (16:40 +0200)]
qoriq: 02_network fix sweth globbing logic

This prevents invalid configuration of non-existent sweth devices.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(cherry picked from commit 5fdbae463c57fa48709d876abaadbbbd5938f84f)

21 months agoqoriq: define reset button for Firebox M300
Thibaut VARÈNE [Tue, 14 Jun 2022 13:54:48 +0000 (15:54 +0200)]
qoriq: define reset button for Firebox M300

This patch provides support for the Firebox M300 reset button.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(cherry picked from commit 19231cf83835db563ee7431b502fe1695ef1f559)

21 months agoqoriq: define leds for Firebox M300
Thibaut VARÈNE [Tue, 14 Jun 2022 13:54:48 +0000 (15:54 +0200)]
qoriq: define leds for Firebox M300

This patch provides support for the Firebox M300 only user-controllable
bi-color LED, and makes the green "shield" LED act as the typical
OpenWrt status led.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(cherry picked from commit 4ab421b81d383c127135716f56a1e18337575516)

21 months agoath79: add support for RouterBOARD mAP
Thibaut VARÈNE [Sun, 12 Jun 2022 19:48:40 +0000 (21:48 +0200)]
ath79: add support for RouterBOARD mAP

The MikroTik mAP-2nd (sold as mAP) is an indoor 2.4Ghz AP with
802.3af/at PoE input and passive PoE passthrough.

See https://mikrotik.com/product/RBmAP2nD for more details.

Specifications:
 - SoC: QCA9533
 - RAM: 64MB
 - Storage: 16MB NOR
 - Wireless: QCA9533 802.11b/g/n 2x2
 - Ethernet: 2x 10/100 ports,
    802.3af/at PoE in port 1, 500 mA passive PoE out on port 2
 - 7 user-controllable LEDs

Note: the device is a tiny AP and does not distinguish between both
ethernet ports roles, so they are both assigned to lan.
With the current setup, ETH1 is connected to eth1 and ETH2 is connected
to eth0 via the embedded switch port 2.

Flashing:
 TFTP boot initramfs image and then perform sysupgrade. The "ETH1" port
 must be used to upload the TFTP image. Follow common MikroTik procedure
 as in https://openwrt.org/toh/mikrotik/common.

Tested-By: Andrew Powers-Holmes <aholmes@omnom.net>
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(cherry picked from commit e1223dbee332b89caf71850eb909104529595c31)

21 months agoipq40xx: mikrotik: make RouterBoot partition writeable
Thibaut VARÈNE [Fri, 17 Jun 2022 10:43:43 +0000 (12:43 +0200)]
ipq40xx: mikrotik: make RouterBoot partition writeable

Linux MTD requires the parent partition be writable for a child
partition to be allowed write permission.
In order for soft_config to be writeable (and modifiable via sysfs),
the parent RouterBoot partition must be writeable

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(cherry picked from commit bb929a0f9cbabef59eaced57d5162d112640c3cd)

21 months agoath79: mikrotik: add rw soft_config to extra devices
John Thomson [Tue, 17 May 2022 23:23:14 +0000 (09:23 +1000)]
ath79: mikrotik: add rw soft_config to extra devices

Linux MTD requires the parent partition be writable for a child
partition to be allowed write permission.

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
(cherry picked from commit 86fb287ad564e344d9630d8235104da144406d08)

21 months agokernel: fix variable erasesize patch
John Thomson [Tue, 17 May 2022 01:15:45 +0000 (11:15 +1000)]
kernel: fix variable erasesize patch

Update this pending patch to remove the untested (variable eraseregions)
section, alongside simplifying the patch.

Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
[refresh and split out unrelated refreshes]
Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
(cherry picked from commit 4f7065ed250932d6ff725ba175e734ad4c782f14)

21 months agox86: 64: Add kmod-igc to default packages
Hauke Mehrtens [Tue, 28 Jun 2022 22:15:36 +0000 (00:15 +0200)]
x86: 64: Add kmod-igc to default packages

This adds the igc driver for the Intel 2.5GBit Ethernet chip to the
default packages.

Fixes: #10064
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit aae3a8a254275f8be5c45d766ac7b5afb82a9fe6)

21 months agoiptables: default to ip(6)tables-nft
Etienne Champetier [Sun, 26 Jun 2022 04:54:45 +0000 (04:54 +0000)]
iptables: default to ip(6)tables-nft

OpenWrt now uses firewall4 (nft) by default,
so iptables should also default to nftables backend.

When multiple packages provide the same virtual package,
opkg pick the first one by alphabetical order,
so we rename iptables-legacy to iptables-zz-legacy and add
iptables-legacy in PROVIDES.

We also need to remove IPTABLES_NFTABLES config as
this cause recursive dependencies.

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
(cherry picked from commit 35fec487e30f05c81bd135326a993dad7f861812)

21 months agokernel: add missing symbol to 5.10 config
Stijn Tintel [Tue, 28 Jun 2022 21:00:51 +0000 (00:00 +0300)]
kernel: add missing symbol to 5.10 config

Kernel 5.10.124 introduced a new symbol 'LIB_MEMNEQ'. Add it to the
generic 5.10 config.

Fixes: 9e5d743422ed ("kernel: bump 5.10 to 5.10.124")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit f3caba679b812bdaa374929350548025e792eeec)

21 months agoqoriq: use FIT uImage for Firebox M300 kernel
Stijn Tintel [Tue, 26 Apr 2022 15:21:11 +0000 (18:21 +0300)]
qoriq: use FIT uImage for Firebox M300 kernel

This requires U-Boot environment changes:

  setenv OpenWrt_kernel watchguard_firebox-m300-fit-uImage.itb
  setenv loadaddr 0x20000000
  setenv wgBootSysA 'setenv bootargs root=/dev/mmcblk0p2 rw rootdelay=2 console=$consoledev,$baudrate fsl_dpaa_fman.fsl_fm_max_frm=1530; mmc dev 0; ext2load mmc 0:1 $loadaddr $OpenWrt_kernel; bootm $loadaddr'

Trying to sysupgrade an image containing this change on an M300 already
running OpenWrt will fail with the following error:

  Tue Jun 14 12:06:21 EEST 2022 upgrade: The device is supported, but the config is incompatible to the new image (1.0->1.1). Please upgrade without keeping config (sysupgrade -n).
  Tue Jun 14 12:06:21 EEST 2022 upgrade: Kernel switched to FIT uImage. Update U-Boot environment.
  Tue Jun 14 12:06:21 EEST 2022 upgrade: Reading partition table from bootdisk...
  Tue Jun 14 12:06:21 EEST 2022 upgrade: Extract boot sector from the image
  Tue Jun 14 12:06:21 EEST 2022 upgrade: Reading partition table from image...
  Image check failed.

This is to prevent rendering your device unbootable. Make the U-Boot
environment changes as instruced above, and then flash the image using
sysupgrade -F. The config can be kept, there is no need to use -n.

After the new image booted successfully, you can increase the compat_version:

  uci set system.@system[0].compat_version='1.1'
  uci commit

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit c4b499bc03ab0e2eea643c46d1d781ab64e78931)

21 months agoqoriq: use KERNEL_SUFFIX in Build/sdcard-img
Stijn Tintel [Tue, 26 Apr 2022 15:18:20 +0000 (18:18 +0300)]
qoriq: use KERNEL_SUFFIX in Build/sdcard-img

Use the KERNEL_SUFFIX variable in Build/sdcard-img, rather than
using hardcoded "-kernel.bin", to allow overriding KERNEL_SUFFIX for a
device.

Fixes: 080a769b4da8 ("qoriq: new target")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit 86948716dbc1c220d4be504cfe5433bfd9e1d630)

21 months agokernel: bump 5.10 to 5.10.125
John Audia [Sat, 25 Jun 2022 17:28:25 +0000 (13:28 -0400)]
kernel: bump 5.10 to 5.10.125

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 53d99fedc7afd96adfb6f38fc939c9ee9981c2ed)

21 months agokernel: bump 5.10 to 5.10.124
John Audia [Wed, 22 Jun 2022 15:58:33 +0000 (11:58 -0400)]
kernel: bump 5.10 to 5.10.124

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 9e5d743422edc4036cda7d96b96ba62705f382de)

21 months agokernel: bump 5.10 to 5.10.123
John Audia [Thu, 16 Jun 2022 18:47:54 +0000 (14:47 -0400)]
kernel: bump 5.10 to 5.10.123

No patches required a rebase, just updated checksum.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 5202a511cc4557303d4b77bf77ebb66e524dcddf)

21 months agokernel: bump 5.10 to 5.10.122
John Audia [Tue, 14 Jun 2022 19:31:10 +0000 (15:31 -0400)]
kernel: bump 5.10 to 5.10.122

All patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 9edc514e3dafcc36db69046a37daab818cfc1a07)

21 months agokernel: bump 5.10 to 5.10.121
John Audia [Sat, 11 Jun 2022 12:50:59 +0000 (08:50 -0400)]
kernel: bump 5.10 to 5.10.121

Manually rebased:
    oxnas/patches-5.10/100-oxnas-clk-plla-pllb.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ipq806x/R7800

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 706a4ec40cce108f484b40805bfa48619a0a7f09)

21 months agodropbear: cherry-pick upstream commit 544f28a0
Konstantin Demin [Mon, 20 Jun 2022 07:37:15 +0000 (10:37 +0300)]
dropbear: cherry-pick upstream commit 544f28a0

Resolves #10081

Reported-By: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
(cherry picked from commit f98bb1ffe5327d7309f11a3647efd8116d637b33)

21 months agowolfssl: disable AES-NI by default for x86_64
Eneas U de Queiroz [Tue, 21 Jun 2022 18:21:44 +0000 (15:21 -0300)]
wolfssl: disable AES-NI by default for x86_64

WolfSSL is crashing with an illegal opcode in some x86_64 CPUs that have
AES instructions but lack other extensions that are used by WolfSSL
when AES-NI is enabled.

Disable the option by default for now until the issue is properly fixed.
People can enable them in a custom build if they are sure it will work
for them.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 0bd536723303ccd178e289690d073740c928bb34)

21 months agox86: fix damaged config 5.10 refresh
Christian Lamparter [Fri, 24 Jun 2022 17:30:50 +0000 (19:30 +0200)]
x86: fix damaged config 5.10 refresh

Restore CONFIG_I8K + CONFIG_INTEL_INT0002_VGPIO that got
removed when I refreshed the config. Each x86 target gets
its own CONFIG_CRYPTO_BLAKE2S + LIB settings as only the
x86_64 can use the accelerated x86 version.

Also remove two extra spaces that sneaked into geode's config.

Fixes: 539e60539a2f ("generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM]")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 9fc2d58bf8b37f80e8027dc55b6007e0bfa66ebe)

21 months agogeneric: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM]
Tomasz Maciej Nowak [Mon, 20 Jun 2022 12:49:45 +0000 (14:49 +0200)]
generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM]

This is now built-in, enable so it won't propagate on target configs.

Link: https://lkml.org/lkml/2022/1/3/168
Fixes: 79e7a2552e89 ("kernel: bump 5.15 to 5.15.44")
Fixes: 0ca93670693b ("kernel: bump 5.10 to 5.10.119")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
(Link to Kernel's commit taht made it built-in,
CRYPTO_LIB_BLAKE2S[_ARM|_X86] as it's selectable, 5.10 backport)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 539e60539a2fde6531bd179c94bb9c7f8f490f2b)

21 months agoinclude/prereq-build.mk: macOS cross build improvements
Mark Mentovai [Thu, 9 Jun 2022 15:00:58 +0000 (11:00 -0400)]
include/prereq-build.mk: macOS cross build improvements

This updates prereq-build.mk to find a suitable realpath utility, and
adds another place to look for a suitable getopt utility.

realpath has been used most notably by scripts/ipkg-build since
commit bb95be9265a9 ("scripts,ipkg-build: use realpath for pkg_dir")
and there are assorted other uses of it during a build.
It is ordinarily provided by GNU coreutils. This adds a SetupHostCommand
to locate it either under its own name or under grealpath, the name that
it will be available as under MacPorts or Homebrew, which use
--program-prefix=g.

Similarly, update the SetupHostCommand for getopt to be able to locate a
util-linux getopt at the default path used by MacPorts, in the same
fashion that
commit cc16f5d73e77 ("build: try to find getopt in macOS homebrew's standard location")'
did for Homebrew. As there is no standard alternative --program-prefix
for util-linux utilities in the way that GNU packages often use a "g"
prefix, this path-based approach is required in case a non-util-linux
getopt (such as one provided by an OS) shadows the util-linux getopt
in the PATH.

Signed-off-by: Mark Mentovai <mark@moxienet.com>
(cherry picked from commit f614332197b7b09d21007af59a31920198cd4885)

21 months agobroadcom-wl: Fix compilation with kernel 5.10
Florian Fainelli [Wed, 22 Dec 2021 22:26:02 +0000 (14:26 -0800)]
broadcom-wl: Fix compilation with kernel 5.10

This adds a few fixes for compiling against Linux 5.10:

1. segment_eq() has been removed with upstream commit
   428e2976a5bf7e7f5554286d7a5a33b8147b106a ("uaccess: remove
   segment_eq") and can use uaccess_kernel() instead
2. ioremap_nocache() is removed and is now an alias for ioremap() with
   upstream commit 4bdc0d676a643140bdf17dbf7eafedee3d496a3c ("remove
   ioremap_nocache and devm_ioremap_nocache")

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
(cherry picked from commit cd3de51bb4a18f922a961fdeb42c1c8f1f80b425)

22 months ago464xlat: delete SNATed conntracks on interface teardown
Alin Nastac [Wed, 8 Jun 2022 09:58:00 +0000 (11:58 +0200)]
464xlat: delete SNATed conntracks on interface teardown

Existing conntracks will continue to be SNATed to 192.0.0.1 even after
464xlat interface gets teared down. To prevent this, matching
conntracks must be killed.

Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> [PKG_RELEASE increase]
(cherry picked from commit 289c46869b969864676cf9abde4e1e0df33bcf37)

22 months agomediatek: UniFi 6 LR: disable RTC
Daniel Golle [Sat, 18 Jun 2022 16:30:02 +0000 (17:30 +0100)]
mediatek: UniFi 6 LR: disable RTC

There is not RTC battery connected to the SoC of the UniFi 6 LR board.
Disable the RTC to prevent the system coming up with time set to
2000-01-01 00:00:00 after each reboot.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 692d87a27b44ac73c10cd511c00ee0bec1316d9f)

22 months agoramips: decrease SPI frequency for Phicomm K2P
Aviana Cruz [Sat, 11 Jun 2022 17:34:13 +0000 (01:34 +0800)]
ramips: decrease SPI frequency for Phicomm K2P

Some K2P comes with the worse boards with GD25Q128 (may be A2), which
only works with 50MHz frequency and less. Reduce spi frequency so that
these routers can boot.
remove m25p,fast-read because it isn't needed for 50MHz SPI.

Signed-off-by: Aviana Cruz <gwencroft@proton.me>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
(cherry picked from commit 857ea3f690aba8513b356926d9c430adafc7c50b)

22 months agowireless-regdb: bump to 2022.06.06
Stijn Tintel [Mon, 6 Jun 2022 16:11:33 +0000 (19:11 +0300)]
wireless-regdb: bump to 2022.06.06

  902b321 wireless-regdb: Update regulatory rules for Israel (IL)
  20f6f34 wireless-regdb: add missing spaces for US S1G rules
  25652b6 wireless-regdb: Update regulatory rules for Australia (AU)
  081873f wireless-regdb: update regulatory database based on preceding changes
  166fbdd wireless-regdb: add db files missing from previous commit
  e3f03f9 Regulatory update for 6 GHz operation in Canada (CA)
  888da5f Regulatory update for 6 GHz operation in United States (US)
  647bcaa Regulatory update for 6 GHz operation in FI
  c6b079d wireless-regdb: update regulatory rules for Bulgaria (BG) on 6GHz
  2ed39be wireless-regdb: Remove AUTO-BW from 6 GHz rules
  7a6ad1a wireless-regdb: Unify 6 GHz rules for EU contries
  68a8f2f wireless-regdb: update regulatory database based on preceding changes

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
(cherry picked from commit e3e9eb31a281643737142e8e80c6f49204b5ba18)

22 months agoprereq-build: add additional git detection
Christian 'Ansuel' Marangi [Thu, 9 Jun 2022 12:13:09 +0000 (14:13 +0200)]
prereq-build: add additional git detection

With some OS (Guix) the git submodule command is wrapped in
a script. Current logic parse the git submodule script directly.
If it's wrapped the prereq check wrongly fails while 'git submodule
--recursive' is actually available.
Add an additional check that try to directly use the 'git submodule'
command to check if the prereq is satisfied.

Fixes: #9986
Reported-by: Attila Lendvai <attila@lendvai.name>
Suggested-by: Attila Lendvai <attila@lendvai.name>
Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth@gmail.com>
(cherry picked from commit ab1f3a87063b94f485bd582f32a066b80007bac9)

22 months agomac80211: increase airtime scheduler quantum
Felix Fietkau [Sun, 26 Jun 2022 09:47:12 +0000 (11:47 +0200)]
mac80211: increase airtime scheduler quantum

improves performance by requiring fewer iterations over tx queues

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 7bf5233a2a2b1c81fae2f3a85bb971ef2a7f9b27)

22 months agomac80211: add airtime fairness improvements
Felix Fietkau [Sat, 18 Jun 2022 08:52:09 +0000 (10:52 +0200)]
mac80211: add airtime fairness improvements

This reverts the airtime scheduler back from the virtual-time based scheduler
to the deficit round robin scheduler implementation.
This reduces burstiness and improves fairness by improving interaction with AQL.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 6d49a25804d78d639e08a67c86b26991ce6485d8)

22 months agoapm821xx: WNDAP660: fix ethernet port ordering
Christian Lamparter [Fri, 24 Jun 2022 18:55:15 +0000 (20:55 +0200)]
apm821xx: WNDAP660: fix ethernet port ordering

Tim Small reported:
| Viewing the 'Network' -> 'Switch' config page in LuCI:
|
| The LuCI LAN 1 port corresponds to the port physically
|     labelled 2 at the rear of the device.
| [...]
|
| When a patch cord is attached to the port labelled 1 [...],
| the LED labelled °2 illuminates.

=> essentially, the Ports and LEDs are reversed.

Reported-by: Tim Small
Fixes: #10111
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 36483600d337ab3ec8a6dabeaa160614d07f5588)

22 months agoramips: mt7621-dts: fix claiming rgmii2 pin group for EdgeRouter X SFP
Arınç ÜNAL [Thu, 17 Mar 2022 13:10:08 +0000 (16:10 +0300)]
ramips: mt7621-dts: fix claiming rgmii2 pin group for EdgeRouter X SFP

For a TX->TX connected external phy to transmit/receive data, the rgmii2
pin group needs to be claimed with gpio function, at least for EdgeRouter X
SFP. We already claim the pin group under the pinctrl node with gpio
function on the gpio node on mt7621_ubnt_edgerouter-x.dtsi.

However, we should claim a pin group under its consumer node. It's the
ethernet node in this case, which we already claim the rgmii2 pin group
under it on mt7621.dtsi. Therefore, set the function as gpio on the rgmii2
node for EdgeRouter X SFP and get rid of claiming the rgmii2 pin group
under the pinctrl node. With this change, we also get to remove a
definition from mt7621_ubnt_edgerouter-x.dtsi which is specific to
EdgeRouter X SFP.

This change is tested on an EdgeRouter X SFP.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
(cherry picked from commit a1ad8377355c41a7cc3012b707fcecab923cbc90)

22 months agoramips: force ZyXEL NR7101 to boot from "Kernel" partition
Bjørn Mork [Fri, 29 Apr 2022 14:38:27 +0000 (16:38 +0200)]
ramips: force ZyXEL NR7101 to boot from "Kernel" partition

Make sure BootingFlag points to the system partition we install to.

The BootingFlag variable selects which system partition the system
boots from (0 => "Kernel", 1 => "Kernel2"). OpenWrt does not yet have
device specific support for this dual image scheme, and can therefore
only boot from "Kernel".

This has not been an issue until now, since all known OEM firmware
versions have ignored "Kernel2" - leaving the BootingFlag fixed at 0.
But the newest OEM firmware has a new upgrade procedure, installing
to the "inactive" system partition and setting BootingFlag accordingly.

This workaround is needed until the dual image scheme is fully
supported.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
(cherry picked from commit 79112e7d4758cc79dea506ffebdf40e00d94fa06)

22 months agoath79: fix rootfs padding for D-Link DAP-2xxx
Sebastian Schaper [Wed, 22 Jun 2022 21:38:26 +0000 (23:38 +0200)]
ath79: fix rootfs padding for D-Link DAP-2xxx

It was observed that `rootfs_data` was sometimes not correctly erased
after performing sysupgrade, resulting in previous settings to prevail.

Add call to `wrgg-pad-rootfs` in sysupgrade image recipe to ensure any
previous jffs2 will be wiped, consistent with DAP-2610 from the ipq40xx
target, which introduced the double-flashing procedure for these devices.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
(cherry picked from commit f770c33d7bb94b610d3a1c1fa84bc917678b65bc)

22 months agompc85xx: p2020: add RTC ds1307 to kernel
Josef Schlehofer [Sat, 11 Jun 2022 07:37:43 +0000 (09:37 +0200)]
mpc85xx: p2020: add RTC ds1307 to kernel

If the RTC module is compiled as a module, the hctosys fails to
initialize because ds1307 is loaded later.

Fixes:
[    2.004145] hctosys: unable to open rtc device (rtc0)
[   11.957997] rtc-ds1307 0-006f: registered as rtc0

This is similar to commit 5481ce9a1157a43d8b2c963e03fb243e70974361,
which was done for imx6 target.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit dc7f78da97c62cd6c17a75f754da5bf6b957837d)

22 months agobcm53xx: remove 07_set_preinit_iface_bcm53xx
Christian Lamparter [Fri, 10 Jun 2022 23:08:58 +0000 (01:08 +0200)]
bcm53xx: remove 07_set_preinit_iface_bcm53xx

with the switch to DSA setup, the switch gets correctly
programmed via the device-tree now. This hack is no
longer necessary.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit 554ca44730731da6fddc51e1d3027c5e666a7d0d)

22 months agotools/libressl: update to version 3.4.3
Josef Schlehofer [Mon, 6 Jun 2022 20:08:42 +0000 (22:08 +0200)]
tools/libressl: update to version 3.4.3

Release notes:
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.4.3-relnotes.txt

```
It includes the following security fix:

    * A malicious certificate can cause an infinite loop.
      Reported by and fix from Tavis Ormandy and David Benjamin, Google.
```

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit 25534d5cc20a807ff776fdb18847344167ce081d)

22 months agonetfilter: kmod-nft-xfrm
Florian Eckert [Mon, 16 May 2022 14:14:41 +0000 (16:14 +0200)]
netfilter: kmod-nft-xfrm

Add kmod-nft-xfrm package.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
(cherry picked from commit 9379bc2fcf905568ef329a121c8c8a11fc98b02c)

22 months agolibusb: fix missing link
Leo Soares [Thu, 16 Jun 2022 22:25:39 +0000 (23:25 +0100)]
libusb: fix missing link

adds `libusb-1.0.so` link on the target root again.

Fixes: 43539a6aabbe ("libusb: make InstallDev explicit")
Signed-off-by: Leo Soares <leo@hyper.ag>
(added fixed tag, reworded commit)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
(cherry picked from commit dc59a22f1d0f3a98eee9fa2043f03a764fbefe10)

22 months agomt76: update to the latest version
Felix Fietkau [Tue, 21 Jun 2022 19:16:38 +0000 (21:16 +0200)]
mt76: update to the latest version

65042bfd759c mt76: mt7915: introduce 802.11ax multi-bss support
e756ea3bd069 mt76: fix wrong HE data rate in sniffer tool
47b64131e820 mt76: mt7921: don't enable beacon filter when IEEE80211_CONF_CHANGE_MONITOR is set
7a05f4628e76 mt76: fix monitor rx FCS error in DFS channel
104dd5cb0a40 mt76: mt7915: fix DBDC default band selection on MT7915D
a7805e4e1d58 mt76: reduce tx queue lock hold time
0b1deb9292cd mt76: dma: use kzalloc instead of devm_kzalloc for txwi
2e51013b38c9 mt76: dma: reduce lock contention in mt76_dma_tx_cleanup
c96fbb86f7e5 mt76: mt7915: rework hardware/phy initialization
c2bb44cab51e mt76: mt7915: accept rx frames with non-standard VHT MCS10-11
36c23a4a8422 mt76: mt7921: accept rx frames with non-standard VHT MCS10-11
5b7dd093c8f0 mt76: fix use-after-free by removing a non-RCU wcid pointer
c692aacb9bde mt76: fix MBSS index condition in DBDC mode
fd6541905aa4 mt76: mt7921u: add suspend/resume support
201b33cf42c2 mt76: mt7921: rely on mt76_dev rxfilter in mt7921_configure_filter
9666c08228e7 mt76: mt7921: honor pm user configuration in mt7921_sniffer_interface_iter
1442710d7936 mt76: mt7915: always call mt7915_wfsys_reset() during init
ec4d9b9e8b70 mt76: mt7915: fix unbounded shift in mt7915_mcu_beacon_mbss
6b1efcd72946 mt76: mt7915: fix wfsys reset regression
376ea8152b2b mt76: mt7915: add missing chunk from wfsys reset fix
eed44048ca57 Revert "mt76: dma: reduce lock contention in mt76_dma_tx_cleanup"
5beb87716e70 mt76: dma: add wrapper macro for accessing queue registers
e0bc736d5617 mt76: add support for overriding the device used for DMA mapping
b8c842daa081 mt76: make number of tokens configurable dynamically
87a962e0608f mt76: mt7915: add Wireless Ethernet Dispatch support
2accb74e6be3 mt76: mt7915: fix using null pointer when wfsys on
e5227f2f3120 mt76: mt7921: Fix the error handling path of mt7921_pci_probe()
ec0e9f4da32f mt76: mt7915: fix possible uninitialized pointer dereference in mt7986_wmac_gpio_setup
5a87be892ba7 mt76: mt7915: fix possible NULL pointer dereference in mt7915_mac_fill_rx_vector
fe441e5d3dcf mt76: mt7915: do not pass data pointer to mt7915_mcu_muru_debug_set
f3ddfe886283 mt76: mt7915: report rx mode value in mt7915_mac_fill_rx_rate
2a0d370cb5fe mt76: mt7915: use 0xff to initialize bitrate_mask in mt7915_init_bitrate_mask
506bb0605e3e mt76: mt7921: Add AP mode support
d4937118ec4f mt76: fix rx reordering with non explicit / psmp ack policy
f50672518bcc mt76: do not attempt to reorder received 802.3 packets without agg session
75e046e3c9ae mt76: fix antenna config missing in 6G cap
64ede85f14b5 mt76: mt7915: remove SCS feature
db0a67582028 mt76: mt7915: make read-only array ppet16_ppet8_ru3_ru0 static const
68a2f68d5c01 mt76: mt7921: make read-only array ppet16_ppet8_ru3_ru0 static const
1e7b77294e97 mt76: mt7921: fix kernel crash at mt7921_pci_remove
795830a99a6c mt76: mt7915: add debugfs knob for RF registers read/write
60a8ec12a8eb mt76: mt7603: move spin_lock_bh() to spin_lock()
5ec7a2eac867 mt76: mt7915: disable RX_HDR_TRANS_SHORT
eecbb4992073 mt76: fix encap offload ethernet type check
a666d5637bc3 mt76: fix tx status related use-after-free race on station removal
6da21a0b7280 linux-firmware: update firmware for MT7921 WiFi device
4876688c41dc linux-firmware: update firmware for MT7915
79b1b86040de linux-firmware: add firmware for MT7986
784c27b159b9 linux-firmware: add firmware for MT7922
079e41dc71a1 mt76: mt7915: configure soc clocks in mt7986_wmac_init
747c70fc6c89 mt76: connac: use skb_put_data instead of open coding
e98f58815018 mt76: mt7915: update mt7986 patch in mt7986_wmac_adie_patch_7976()
b7104b4b2f2d mt76: mt7915: fix twt table_mask to u16 in mt7915_dev
d39368f336ee mt76: mt7915: reject duplicated twt flows
4718ed04a655 mt76: mt7915: limit minimum twt duration
84319691b742 mt76: mt7915: reowrk SER debugfs knob
bac5f22365a2 mt76: mt7915: introduce mt7915_mac_severe_check()
81524067686c mt76: mt7915: move MT_INT_MASK_CSR to init.c
2b7f5e85290e mt76: mt7915: add support for 6G in-band discovery
31273183ea0a mt76: mt7615/mt7915: do reset_work with mt76's work queue
bb54f5e1c115 mt76: mt7915: improve error handling for fw_debug knobs
838529da6470 mt76: mt7915: add more statistics from fw_util debugfs knobs
3a65deb93737 mt76: add gfp to mt76_mcu_msg_alloc signature
8e87669eefcf mt76: mt7921: add ipv6 NS offload support
e1b2c18eee29 mt76: mt7915: fix endianness in mt7915_rf_regval_get
0742eaeafee2 mt76: mt76x02u: fix possible memory leak in __mt76x02u_mcu_send_msg
d299ad96d867 mt76: mt7915: fix endian bug in mt7915_rf_regval_set()
380eac6f31ec mt76: add 6 GHz band support in mt76_sar_freq_ranges
268ce38e9e36 mt76: mt7921: introduce ACPI SAR support
8c27300b4271 mt76: mt7921: introduce ACPI SAR config in tx power
54b6504a3ef8 mt76: mt7915: add more ethtool stats
cdd66d642977 mt76: add DBDC rxq handlings into mac_reset_work
b284684f5cba mt76: mt7921: add PATCH_FINISH_REQ cmd response handling
f8b9be4287cc mt76: mt7921s: fix firmware download random fail
28b19d2cc53f mt76: mt7915: add missing bh-disable around tx napi enable/schedule
1d8af168e86f mt76: mt7615: add missing bh-disable around rx napi enable/schedule
4554ee652caf mt76: mt7921: fix warning Using plain integer as NULL pointer
a3f1d6ccf3ca mt76: mt7921: add missing bh-disable around rx napi schedule
9aeca2a5ce47 mt76: mt7921: get rid of mt7921_mcu_exit
fee8a5911c76 mt76: connac: move shared fw structures in connac module
db4d784ae7ba mt76: mt7921: move fw toggle in mt7921_load_firmware
16ab6bf49556 mt76: connac: move mt76_connac2_load_ram in connac module
29fd748801c6 mt76: connac: move mt76_connac2_load_patch in connac module
051c68d18214 mt76: mt7663: rely on mt76_connac2_fw_trailer
d6ae3505ac6c mt76: enable the VHT extended NSS BW feature
488a5ccc9762 mt76: mt7921: rely on mt76_dev in mt7921_mac_write_txwi signature
934029bb93e2 mt76: mt7915: rely on mt76_dev in mt7915_mac_write_txwi signature
ecefae4c7d72 mt76: connac: move mac connac2 defs in mt76_connac2_mac.h
b5eecc841df8 mt76: connac: move connac2_mac_write_txwi in mt76_connac module
012e619a07b9 mt76: connac: move mt76_connac2_mac_add_txs_skb in connac module
1b492be795ea mt76: mt7921: not support beacon offload disable command
f1f46d3b4b19 mt76: mt7921: fix command timeout in AP stop period
cae61112ef1d mt76: connac: move HE radiotap parsing in connac module
487674062643 mt76: connac: move mt76_connac2_reverse_frag0_hdr_trans in mt76-connac module
649bdc4983c4 mt76: connac: move mt76_connac2_mac_fill_rx_rate in connac module
cb75aaa39252 mt76: mt7921s: remove unnecessary goto in mt7921s_mcu_drv_pmctrl
e0eaf66eaebb mt76: mt7615: do not update pm stats in case of error
f8d125b4ea30 mt76: mt7921: do not update pm states in case of error
6329a834907e mt76: mt7921s: fix possible sdio deadlock in command fail
8a04f1b04662 mt76: mt7921: fix aggregation subframes setting to HE max
e52283439094 mt76: mt7915: disable UL MU-MIMO for mt7915
fd3958970e3d mt76: mt7921: enlarge maximum VHT MPDU length to 11454
18df38fe77f7 mt76: mt7915: get rid of unnecessary new line in mt7915_mac_write_txwi
149e95f5d7a6 mt76: connac: move mt76_connac_fw_txp in common module
899d192e8a79 mt76: move mt7615_txp_ptr in mt76_connac module
7184f0a6f6a5 mt76: connac: move mt76_connac_tx_free in shared code
c42d45278fa5 mt76: connac: move mt76_connac_tx_complete_skb in shared code
0993f4ef96f8 mt76: connac: move mt76_connac_write_hw_txp in shared code
467960fab791 mt76: connac: move mt7615_txp_skb_unmap in common code
2e758064b085 mt76: mt7915: rely on mt76_connac_tx_free
2065a7901671 mt76: move mcu_txd/mcu_rxd structures in shared code
576c1b7c472b mt76: move mt76_connac2_mcu_fill_message in mt76_connac module
7275f7758090 mt76: mt7915: fix incorrect testmode ipg on band 1 caused by wmm_idx
1696f9eb8b40 mt76: mt7915: do not copy ieee80211_ops pointer in mt7915_mmio_probe
a4db5869d660 mt76: mt7915: update mpdu density in 6g capability
500c18014d95 mt76: mt7915: add sta_rec with EXTRA_INFO_NEW for the first time only
3ef66fc7c714 mt76: do not check the ccmp pn for ONLY_MONITOR frame
dd682eead016 mt76: mt7915: update the maximum size of beacon offload
4fb991f2c997 mt76: mt7615: add sta_rec with EXTRA_INFO_NEW for the first time only
ba39ed3b44f1 mt76: mt76x02: improve reliability of the beacon hang check
fd8211cf7c59 mt76: mt7921: sync with updated patch
f2edd340ddb4 mt76: allow receiving frames with invalid CCMP PN via monitor interfaces
b6e865e2cc70 mt76: mt7615: fix throughput regression on DFS channels

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry-picked from commit 29ed58c8bee1de5b1779494e88620862edc44700)

22 months agorealtek: make "u-boot-env" partition writable for Netgear 3xx series
Andreas Böhler [Sun, 19 Jun 2022 17:53:12 +0000 (19:53 +0200)]
realtek: make "u-boot-env" partition writable for Netgear 3xx series

The Netgear GS3xx devices do not properly initialise the port LEDs during
startup unless the boot command in U-Boot is changed. Making the U-Boot
env partition writable allows this modification to be done from within
OpenWrt by calling "fw_setenv bootcmd rtk network on\; boota".

Signed-off-by: Andreas Böhler <dev@aboehler.at>
(cherry picked from commit d9e12c21fa98c90d0cc355e344d90469c5fd42c1)

22 months agorealtek: make Netgear GS1xx u-boot env partition writable
Stijn Segers [Sun, 19 Jun 2022 17:55:28 +0000 (19:55 +0200)]
realtek: make Netgear GS1xx u-boot env partition writable

Make the u-boot environment partition for the NETGEAR
GS108T v3 and GS110TPP writable (they share a DTS), so
the values can be manipulated from userspace.

See https://forum.openwrt.org/t/57875/1567 for a real
world example.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
(cherry picked from commit 9c381d3386ab375a4c79812641192faef368d191)

22 months agobase-files: allow ignoring minor compat-version check
David Bauer [Fri, 13 May 2022 23:26:02 +0000 (01:26 +0200)]
base-files: allow ignoring minor compat-version check

Downstream projects might re-generate device-specific configuration
based on OpenWrt's defaults on each upgrade, thus being unaffected by
forward- as well as backwards-breaking configuration.

Add a new sysupgrade parameter, which allows sysupgrades between minor
compat-versions. Upgrades will still fail upon mismatching major compat
versions.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 34437af88867c4435add8a144417290b7fd4362a)

22 months agoramips: fix booting on ZyXEL NBG-419N v2
Piotr Dymacz [Mon, 23 May 2022 15:50:19 +0000 (17:50 +0200)]
ramips: fix booting on ZyXEL NBG-419N v2

This fixes a well known "LZMA ERROR 1" error, reported previously on
numerous of other devices from 'ramips' target.

Fixes: #9842
Fixes: #8964
Reported-by: Juergen Hench <jurgen.hench@gmail.com>
Tested-by: Juergen Hench <jurgen.hench@gmail.com>
Signed-off-by: Demetris Ierokipides <ierokipides.dem@gmail.com>
Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
(cherry picked from commit fd72e595c2b2a46bab8cbc7e9415fbfeae7b5b0d)

22 months agorealtek: add support for power LED on Netgear GS108Tv3
Pascal Ernster [Sat, 18 Jun 2022 11:28:30 +0000 (13:28 +0200)]
realtek: add support for power LED on Netgear GS108Tv3

The Netgear GS108Tv3 is already supported by OpenWrt, but is missing LED
support. After OpenWrt installation, all LEDs are off which makes the
installation quite confusing.
This enables support for the green/amber power LED to give feedback
about the current status.

This is basically just a verbatim copy of commit c4927747d25a ("realtek:
add support for power LED on Netgear GS308Tv1").

Please note that both LEDs are wired up in an anti-parallel fashion,
which means that only one of both LEDs/colors can be switched on at the
same time. If both LEDs/colors are switched on simultanously, the LED
goes dark.

Tested-by: Pascal Ernster <git@hardfalcon.net>
Signed-off-by: Pascal Ernster <git@hardfalcon.net>
[add title to commit reference]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit adbdfc9366fed2d28dbd36883ddbdb566a313f71)

22 months agorealtek: add support for power LED on Netgear GS308Tv1
Andreas Böhler [Wed, 15 Jun 2022 22:50:28 +0000 (00:50 +0200)]
realtek: add support for power LED on Netgear GS308Tv1

The Netgear GS308Tv1 is already supported by OpenWrt, but is missing LED
support. After OpenWrt installation, all LEDs are off which makes the
installation quite confusing.
This enables support for the green/amber power LED to give feedback
about the current status.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
(cherry picked from commit c4927747d25af59db8233a66a59fdf9e8c0e395d)

22 months agoRevert "mac80211: add a bug fix for a rare crash"
David Bauer [Sat, 18 Jun 2022 20:17:22 +0000 (22:17 +0200)]
Revert "mac80211: add a bug fix for a rare crash"

This reverts commit 33df033b73365487c5bb5a58b77aed04d4ca6ac1.

It was reported this commit breaks 802.11s mesh connections, failing
link establishment.

Reported-by: Andreas Ziegler <dev@andreas-ziegler.de>
Signed-off-by: David Bauer <mail@david-bauer.net>
22 months agoramips: fix RT-AC57U button level
David Bauer [Sat, 18 Jun 2022 18:46:33 +0000 (20:46 +0200)]
ramips: fix RT-AC57U button level

Both buttons on the RT-AC57U are active-low. Fix the GPIO flag for the
WPS cutton to fix button behavior.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 535b0c70b1c466733b009144f81f5207f1ecd311)

22 months agohostapd: add owe_transition_ifname
David Bauer [Wed, 15 Jun 2022 23:55:26 +0000 (01:55 +0200)]
hostapd: add owe_transition_ifname

Add the owe_transition_ifname config option to wifi-ifaces.

This allows to configure OWE transition VAPs without adding SSID / BSSID
to the uci conifg but instead autodiscovering these parameters from
other networks on the same PHY.

The following configuration creates a OWE transition mode network
constellation.

config wifi-iface 'open0'
option device 'radio0'
option ifname 'open0'
option network 'lan'
option mode 'ap'
option ssid 'FreeNet'
option encryption 'none'
option owe_transition_ifname 'owe0'

config wifi-iface 'owe0'
option device 'radio0'
option ifname 'owe0'
option network 'lan'
option mode 'ap'
option ssid 'owe_tm.FreeNet'
option encryption 'owe'
option hidden '1'
option owe_transition_ifname 'open0'

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 574539ee2cdbb3dd54086423c6dfdd19bb1c06a6)

22 months agompc85xx: enable error reporting for RAM and PCIe
Josef Schlehofer [Fri, 6 May 2022 17:13:05 +0000 (19:13 +0200)]
mpc85xx: enable error reporting for RAM and PCIe

All Freescale processors used in this target are capable to detect error
and correction. [1] It can not be used as kernel module. [2] This is
helpful to report hardware errors.

It enables three kernel options:

- EDAC, which is a subsystem
- EDAC_LEGACY_SYSFS, it enables sysfq nodes
- MP85XX, support for Freescale MPC8349, MPC8560, MPC8540, MPC8548, T4240

EDAC is already enabled for following targets:
qoriq, octeon, octeontx and zynq.

[1] https://cateee.net/lkddb/web-lkddb/EDAC.html
[2] https://patchwork.ozlabs.org/patch/554908/

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit bfc73f42df3189a2eb34bebc8d9e73b3389a83a2)

22 months agouboot-mvebu: update to version v2022.04
Josef Schlehofer [Thu, 28 Apr 2022 11:34:35 +0000 (13:34 +0200)]
uboot-mvebu: update to version v2022.04

Release announcement:
https://lore.kernel.org/u-boot/20220404143253.GQ14476@bill-the-cat/

Release notes between tags:
https://source.denx.de/u-boot/u-boot/-/compare/v2022.01...v2022.04?from_project_id=531

All patches were removed, since they are included in this release.

Run tested: Turris Omnia, mvebu/cortex-a9, OpenWrt daily snapshots

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit 4f51f1fc9b3597d24de442cfff253fddce478d17)

22 months agouboot-mvebu: remove enabled CONFIG_CMD_SETEXPR
Josef Schlehofer [Thu, 28 Apr 2022 13:50:20 +0000 (15:50 +0200)]
uboot-mvebu: remove enabled CONFIG_CMD_SETEXPR

We don't need to make sure that we want to have enabled
CONFIG_CMD_SETEXPR by default, since this is already done in U-boot [1].
This was actually needed only for clearfog board [2], which was added in
commit: da0005a6d08ae33d958a6d8a6c0c12dc07b5b2b8 ("uboot-mvebu: add
patch to enable setexpr for clearfog boards) and send to U-boot to fix
it properly. After a while, there was added support for Turris Omnia,
which uses setexpr as well [3], but for this board, there are no fixes
needed in U-boot and that's why we can remove this option here.

It is helpful with shell scripting. If some downstream distributions are
using it, they should correct it in defconfig for related boards.

[1] https://source.denx.de/u-boot/u-boot/-/blob/e95afa56753cebcd20a5114b6d121f281b789006/cmd/Kconfig#L1504

[2] https://github.com/openwrt/openwrt/blob/852126680e21edc71c0c66561ae5a6d7479dcc67/target/linux/mvebu/image/clearfog.bootscript#L7

[3] https://github.com/openwrt/openwrt/blob/852126680e21edc71c0c66561ae5a6d7479dcc67/target/linux/mvebu/image/turris-omnia.bootscript#L2

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit 69cef74c671cb7fa738a5a4c9a283c29f45326c7)

22 months agouboot-mvebu: add patch to enable setexpr for clearfog boards
Josef Schlehofer [Fri, 29 Apr 2022 15:52:29 +0000 (17:52 +0200)]
uboot-mvebu: add patch to enable setexpr for clearfog boards

Option CMD_SETEXPR is already default in U-boot [1], since this was
disabled since initial version for this board, there is send this
patch to U-boot mailing list to enable it.

It is required to use in OpenWrt bootscript for these boards [2].

[1] https://source.denx.de/u-boot/u-boot/-/blob/e95afa56753cebcd20a5114b6d121f281b789006/cmd/Kconfig#L1504

[2] https://github.com/openwrt/openwrt/blob/852126680e21edc71c0c66561ae5a6d7479dcc67/target/linux/mvebu/image/clearfog.bootscript#L7

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
(cherry picked from commit b3c2072504867b8ca00dde37f531edf0cfbe3359)

22 months agokernel: crypto: add kmod-crypto-chacha20poly1305
Xu Wang [Fri, 27 May 2022 22:21:43 +0000 (22:21 +0000)]
kernel: crypto: add kmod-crypto-chacha20poly1305

Needed by strongSwan IPsec VPN for strongswan-mod-chapoly. Not to be confused with
kmod-crypto-LIB-chacha20poly1305, which is an 8-byte nonce version used
by wireguard.

Signed-off-by: Xu Wang <xwang1498@gmx.com>
(cherry picked from commit 197b672c40613a53a78a568a1957f2c23c343c1f)

22 months agosunxi/cortexa53: enable armv8-CE crypto algorithms
Eneas U de Queiroz [Wed, 20 Apr 2022 18:26:32 +0000 (15:26 -0300)]
sunxi/cortexa53: enable armv8-CE crypto algorithms

This enables armv8 crypto extensions version of AES, GHASH, SHA1, and
CRC T10 algorithms in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 9be35180f43a4916f53430d8c93437d33896e860)

22 months agorockchip/armv8: enable armv8-CE crypto algorithms
Eneas U de Queiroz [Wed, 20 Apr 2022 18:26:32 +0000 (15:26 -0300)]
rockchip/armv8: enable armv8-CE crypto algorithms

This enables armv8 crypto extensions version of AES, GHASH, and CRC T10
algorithms in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit b1346d35e470662c98912efc49108733ee7c101c)

22 months agoocteontx: add armv8-CE version of CRC T10
Eneas U de Queiroz [Wed, 20 Apr 2022 19:23:47 +0000 (16:23 -0300)]
octeontx: add armv8-CE version of CRC T10

Adds the crypto extensions version of the CRC T10 algorithm that is
already built into the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 1b94e4aab8ddbe5719f1e859e064c1c5dfa4587f)

22 months agomvebu/cortexa72: enable armv8-CE crypto algos
Eneas U de Queiroz [Wed, 20 Apr 2022 18:26:32 +0000 (15:26 -0300)]
mvebu/cortexa72: enable armv8-CE crypto algos

This enables armv8 crypto extensions version of AES, GHASH, SHA1,
SHA256, and SHA512 algorithms in the kernel.

The choice of algorithms match the 32-bit versions that are enabled in
the target config-5.10 file, but were only used by the cortexa9
subtarget.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 06bb5ac1f2b62c3e10f24d7096e86f6368aaf41d)

22 months agomvebu/cortexa72: refresh kernel 5.10 config
Eneas U de Queiroz [Wed, 20 Apr 2022 19:04:33 +0000 (16:04 -0300)]
mvebu/cortexa72: refresh kernel 5.10 config

This is result of a plain make kernel_oldconfig CONFIG_TARGET=subtarget.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit 39b6af114747fbee06cf6fab3a76d7037b53a4cc)

22 months agomvebu/cortexa53: enable armv8-CE crypto algos
Eneas U de Queiroz [Wed, 20 Apr 2022 18:26:32 +0000 (15:26 -0300)]
mvebu/cortexa53: enable armv8-CE crypto algos

This enables armv8 crypto extensions version of AES, GHASH, SHA1,
SHA256, and SHA512 algorithms in the kernel.

The choice of algorithms match the 32-bit versions that are enabled in
the target config-5.10 file, but were only used by the cortexa9
subtarget.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit f5167e11bf7e0a1a3675f0563423254005d0eb2d)

22 months agomvebu/cortexa53: refresh kernel 5.10 config
Eneas U de Queiroz [Wed, 20 Apr 2022 19:04:33 +0000 (16:04 -0300)]
mvebu/cortexa53: refresh kernel 5.10 config

This is result of a plain make kernel_oldconfig CONFIG_TARGET=subtarget.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit a4c6384d930a0d0817ad12770da3abbd106e8c4d)

22 months agolayerscape/armv8_64b: enable armv8-CE crypto algos
Eneas U de Queiroz [Wed, 20 Apr 2022 18:26:32 +0000 (15:26 -0300)]
layerscape/armv8_64b: enable armv8-CE crypto algos

This enables armv8 crypto extensions version of AES, GHASH, SHA256 and
CRC T10 algorithms in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit eb33232420ea2537d8302d5ec121eed03db474d1)

22 months agobcm4908: enable armv8-CE crypto algorithms
Eneas U de Queiroz [Wed, 20 Apr 2022 18:26:32 +0000 (15:26 -0300)]
bcm4908: enable armv8-CE crypto algorithms

This enables armv8 crypto extensions version of AES and GHASH algorithms
in the kernel.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
(cherry picked from commit b2cb87bc98e8d7b5f29899b8b966990e200cfe44)