openwrt/staging/dedeckeh.git
18 months agotools/patchelf: update to 0.18.0 master
Nick Hainke [Mon, 24 Apr 2023 06:21:20 +0000 (08:21 +0200)]
tools/patchelf: update to 0.18.0

Release Notes:
https://github.com/NixOS/patchelf/releases/tag/0.18.0

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agotools/coreutils: update to 9.3
Nick Hainke [Wed, 26 Apr 2023 10:06:07 +0000 (12:06 +0200)]
tools/coreutils: update to 9.3

Update to latest bugfix release.

Remove upstreamed patches:
- 001-copy-fix-reflink-auto-to-fallback-in-more-cases.patch
- 002-date-diagnose-f-read-errors.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
18 months agokernel: mtk_bmt: refactor to avoid deep recursion
Michał Kępień [Sat, 29 Apr 2023 06:41:32 +0000 (07:41 +0100)]
kernel: mtk_bmt: refactor to avoid deep recursion

A Linksys E8450 (mt7622) device running current master has recently
started crashing:

    [    0.562900] mtk-ecc 1100e000.ecc: probed
    [    0.570254] spi-nand spi2.0: Fidelix SPI NAND was found.
    [    0.575576] spi-nand spi2.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
    [    0.583780] mtk-snand 1100d000.spi: ECC strength: 4 bits per 512 bytes
    [    0.682930] Insufficient stack space to handle exception!
    [    0.682939] ESR: 0x0000000096000047 -- DABT (current EL)
    [    0.682946] FAR: 0xffffffc008c47fe0
    [    0.682948] Task stack:     [0xffffffc008c48000..0xffffffc008c4c000]
    [    0.682951] IRQ stack:      [0xffffffc008008000..0xffffffc00800c000]
    [    0.682954] Overflow stack: [0xffffff801feb00a0..0xffffff801feb10a0]
    [    0.682959] CPU: 1 PID: 1 Comm: swapper/0 Tainted: G S                5.15.107 #0
    [    0.682966] Hardware name: Linksys E8450 (DT)
    [    0.682969] pstate: 800000c5 (Nzcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
    [    0.682975] pc : dequeue_entity+0x0/0x250
    [    0.682988] lr : dequeue_task_fair+0x98/0x290
    [    0.682992] sp : ffffffc008c48030
    [    0.682994] x29: ffffffc008c48030 x28: 0000000000000001 x27: ffffff801feb6380
    [    0.683004] x26: 0000000000000001 x25: ffffff801feb6300 x24: ffffff8000068000
    [    0.683011] x23: 0000000000000001 x22: 0000000000000009 x21: 0000000000000000
    [    0.683017] x20: ffffff801feb6380 x19: ffffff8000068080 x18: 0000000017a740a6
    [    0.683024] x17: ffffffc008bae748 x16: ffffffc008bae6d8 x15: ffffffffffffffff
    [    0.683031] x14: ffffffffffffffff x13: 0000000000000000 x12: 0000000f00000101
    [    0.683038] x11: 0000000000000449 x10: 0000000000000127 x9 : 0000000000000000
    [    0.683044] x8 : 0000000000000125 x7 : 0000000000116da1 x6 : 0000000000116da1
    [    0.683051] x5 : 00000000001165a1 x4 : ffffff801feb6e00 x3 : 0000000000000000
    [    0.683058] x2 : 0000000000000009 x1 : ffffff8000068080 x0 : ffffff801feb6380
    [    0.683066] Kernel panic - not syncing: kernel stack overflow
    [    0.683069] SMP: stopping secondary CPUs
    [    1.648361] SMP: failed to stop secondary CPUs 0-1
    [    1.648366] Kernel Offset: disabled
    [    1.648368] CPU features: 0x00003000,00000802
    [    1.648372] Memory Limit: none

Several factors contributed to this issue:

 1. The mtk_bmt driver recursively calls its scan_bmt() helper function
    during device initialization, while looking for a valid block
    mapping table (BMT).

 2. Commit fa4dc86e98 ("kernel: backport MEMREAD ioctl"):

      - increased the size of some stack-allocated structures (like
struct mtd_oob_ops, used in bbt_nand_read(), which is indirectly
called from scan_bmt()),

      - increased the stack size for some functions (for example,
spinand_mtd_read(), which is indirectly called from scan_bmt(),
now uses an extra stack-allocated struct mtd_ecc_stats).

 3. OpenWrt currently compiles the kernel with the
    -fno-optimize-sibling-calls flag, which prevents tail-call
    optimization.

Collectively, all of these factors caused stack usage in the mtk_bmt
driver to grow excessively large, triggering stack overflows.

Recursion is not really necessary in scan_bmt() as it simply iterates
over flash memory blocks in reverse order, looking for a valid BMT.
Refactor the logic contained in the scan_bmt() and read_bmt() functions
in target/linux/generic/files/drivers/mtd/nand/mtk_bmt_v2.c so that deep
recursion is prevented (and therefore also any potential stack overflows
it may cause).

Link: https://lists.openwrt.org/pipermail/openwrt-devel/2023-April/040872.html
Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
18 months agokernel: Activate CONFIG_SCHED_STACK_END_CHECK
Hauke Mehrtens [Sat, 22 Apr 2023 17:36:22 +0000 (19:36 +0200)]
kernel: Activate CONFIG_SCHED_STACK_END_CHECK

This activates the CONFIG_SCHED_STACK_END_CHECK option.

The kernel will check if the kernel stack overflowed in the schedule()
function. This just adds a very small computational overhead.

This option is activated in Debian by default.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
18 months agokernel: Activate CONFIG_SLAB_FREELIST_HARDENED
Hauke Mehrtens [Sat, 22 Apr 2023 13:07:36 +0000 (15:07 +0200)]
kernel: Activate CONFIG_SLAB_FREELIST_HARDENED

This activates some extra checks in SLAB or SLUB to make it harder to
execute kernel heap exploits. This adds a minor performance
degradation which I haven't measured-.

Many mainstream Linux distributions also activate this option.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
18 months agokernel: Initialize RNG using CPU RNG and bootloader
Hauke Mehrtens [Sat, 22 Apr 2023 13:28:01 +0000 (15:28 +0200)]
kernel: Initialize RNG using CPU RNG and bootloader

This activates the following kernel options by default:
* CONFIG_RANDOM_TRUST_CPU
* CONFIG_RANDOM_TRUST_BOOTLOADER

With these option Linux will also use data from the CPU RNG e.g. RDRAND
and the bootloader to initialize the Linux RNG if such sources are
available.
These random bits are used in addition to the other sources, no other
sources are getting deactivated. I read that the Chacha mixer isn't
vulnerable to injected entropy, so this should not be a problem even if
these sources might inject bad random data.

The Linux kernel suggests to activate both options, Debian also
activates them. This does not increase kernel code size.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
18 months agoopenssl: fix low-severity CVE-2023-1255
Eneas U de Queiroz [Wed, 26 Apr 2023 11:35:23 +0000 (08:35 -0300)]
openssl: fix low-severity CVE-2023-1255

This applies commit 02ac9c94 to fix this OpenSSL Security Advisory
issued on 20th April 2023[1]:

Input buffer over-read in AES-XTS implementation on 64 bit ARM
(CVE-2023-1255)
==============================================================

Severity: Low

Issue summary: The AES-XTS cipher decryption implementation for 64 bit
ARM platform contains a bug that could cause it to read past the input
buffer, leading to a crash.

Impact summary: Applications that use the AES-XTS algorithm on the 64
bit ARM platform can crash in rare circumstances. The AES-XTS algorithm
is usually used for disk encryption.

The AES-XTS cipher decryption implementation for 64 bit ARM platform
will read past the end of the ciphertext buffer if the ciphertext size
is 4 mod 5 in 16 byte blocks, e.g. 144 bytes or 1024 bytes. If the
memory after the ciphertext buffer is unmapped, this will trigger a
crash which results in a denial of service.

If an attacker can control the size and location of the ciphertext
buffer being decrypted by an application using AES-XTS on 64 bit ARM,
the application is affected. This is fairly unlikely making this issue a
Low severity one.

1. https://www.openssl.org/news/secadv/20230420.txt

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
18 months agokernel: crypto: crypto-rng: select SHA512 for >= 5.14.0
Glen Huang [Wed, 26 Apr 2023 14:38:24 +0000 (22:38 +0800)]
kernel: crypto: crypto-rng: select SHA512 for >= 5.14.0

drbg swtiched to use HMAC(SHA-512) since 5.14.0
https://github.com/torvalds/linux/commit/5261cdf457ce3635bf18d393a3c1991dcfaf9d02

Signed-off-by: Glen Huang <me@glenhuang.com>
18 months agomediatek: remove mt753x driver
Felix Fietkau [Sat, 29 Apr 2023 08:25:18 +0000 (10:25 +0200)]
mediatek: remove mt753x driver

It is unused

Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 months agoramips: reduce Archer AX23 / MR70X SPI-frequency
David Bauer [Thu, 27 Apr 2023 20:24:15 +0000 (22:24 +0200)]
ramips: reduce Archer AX23 / MR70X SPI-frequency

It was brought to attention the Archer AX23 v1 fails to read jffs2 data
from time to time. While this is not reproducible on my unit, it is on
others.

Reducing the SPI frequency does the trick. While it worked with at lest
40 MHz, opt for the cautious side and choose a save frequency of 25 MHz.

Apply the same treatment to the Mercusys MR70X which uses a similar
design just in case.

Signed-off-by: David Bauer <mail@david-bauer.net>
18 months agobroadcom-sprom: update to latest version
Álvaro Fernández Rojas [Thu, 27 Apr 2023 15:46:12 +0000 (17:46 +0200)]
broadcom-sprom: update to latest version

Replaces SPROMs with the ones from bmips fixups to prevent errors such as:
https://github.com/openwrt/openwrt/pull/11474#issuecomment-1524235591

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
18 months agogeneric: Convert incorrect generic/5.15 patches again
Olliver Schinagl [Thu, 13 Apr 2023 09:38:54 +0000 (11:38 +0200)]
generic: Convert incorrect generic/5.15 patches again

OpenWrt's developer guide prefers having actual patches so they an be
sent upstream more easily.

However, in the case of hack-5.15 patches which are not meant for
upstream, adding proper fields allows for `git am` to properly function.

This commit tries to rectify that, by digging in the history to find
where and how it was first added.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
18 months agobmips: fix external interrupt controller
Álvaro Fernández Rojas [Thu, 27 Apr 2023 11:49:10 +0000 (13:49 +0200)]
bmips: fix external interrupt controller

- irq_domain_add_simple() can't be used on bmips since interrupts aren't
hardcoded with specific offsets for internal and external as opposed to
bcm63xx. This is needed to avoid collisions with other interrupts.
- remove unused bcm63xx-specific code.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
18 months agobmips: document GPIO external interrupts
Álvaro Fernández Rojas [Thu, 27 Apr 2023 11:47:24 +0000 (13:47 +0200)]
bmips: document GPIO external interrupts

BCM63xx SoCs have an external interrupt controller which can be used for
specific GPIO keys.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
18 months agobmips: increment polled keys interval to 100
Álvaro Fernández Rojas [Tue, 25 Apr 2023 19:17:52 +0000 (21:17 +0200)]
bmips: increment polled keys interval to 100

There's no need to poll the gpio keys every 20 ms and the linux kernel
documentation suggests 100 ms.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
18 months agoci: add Coverity Scan scheduled workflow
Petr Štetiar [Mon, 30 Jan 2023 07:33:16 +0000 (08:33 +0100)]
ci: add Coverity Scan scheduled workflow

Coverity Scan is a static code analysis service focused on open source
software quality and security, so lets scan various OpenWrt components
every Friday for the start.

Signed-off-by: Petr Štetiar <ynezz@true.cz>
18 months agobusybox: turn on BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT for having $RANDOM
Ilario Gelmetti [Sun, 23 Apr 2023 14:23:45 +0000 (16:23 +0200)]
busybox: turn on BUSYBOX_DEFAULT_ASH_RANDOM_SUPPORT for having $RANDOM

$RANDOM shell variable is a convenient way for getting a random number from 0 to 32767

Signed-off-by: Ilario Gelmetti <iochesonome@gmail.com>
18 months agobusybox: Activate resize tool by default
Hauke Mehrtens [Sun, 23 Apr 2023 10:24:22 +0000 (12:24 +0200)]
busybox: Activate resize tool by default

The resize tool will resize the prompt to match the current terminal
size. This is helpful when connecting to the system using UART to make
the vi or top output match the current terminal size.

This increases the busybox binary size by 136 bytes and the ipkg size by
335 bytes on aarch64.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
19 months agokernel: ssb: fallback-sprom: check bustype
Álvaro Fernández Rojas [Mon, 24 Apr 2023 18:39:55 +0000 (20:39 +0200)]
kernel: ssb: fallback-sprom: check bustype

host_pci is only defined when bustype is SSB_BUSTYPE_PCI.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agokernel: bcma: fallback-sprom: check hosttype
Álvaro Fernández Rojas [Mon, 24 Apr 2023 18:38:36 +0000 (20:38 +0200)]
kernel: bcma: fallback-sprom: check hosttype

host_pci is only defined when hosttype is BCMA_HOSTTYPE_PCI.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agokernel: bcma: fallback-sprom: align extraction with upstream
Álvaro Fernández Rojas [Mon, 24 Apr 2023 18:31:48 +0000 (20:31 +0200)]
kernel: bcma: fallback-sprom: align extraction with upstream

The current bcma SPROM extraction from upstream only supports SPROMs with
revisions from 8 to 11.
Let's align the downstream fallback driver with upstream.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agokernel: ssb: fallback-sprom: drop mac leftovers
Álvaro Fernández Rojas [Mon, 24 Apr 2023 18:13:13 +0000 (20:13 +0200)]
kernel: ssb: fallback-sprom: drop mac leftovers

This was left behind when removing the MAC extractions from PCI SPROMs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agokernel: ssb: fallback-sprom: optimize struct data
Álvaro Fernández Rojas [Mon, 24 Apr 2023 18:10:48 +0000 (20:10 +0200)]
kernel: ssb: fallback-sprom: optimize struct data

- Remove unneeded mac bytes from struct (it's already present in the SPROM).
- Convert devid_override to boolean.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agokernel: bcma: fallback-sprom: optimize struct data
Álvaro Fernández Rojas [Mon, 24 Apr 2023 18:06:49 +0000 (20:06 +0200)]
kernel: bcma: fallback-sprom: optimize struct data

- Remove unneeded mac bytes from struct (it's already present in the SPROM).
- Convert devid_override to boolean.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agoipq40xx: convert GL-AP1300 to DSA
Nick Hainke [Sat, 16 Jul 2022 08:33:24 +0000 (10:33 +0200)]
ipq40xx: convert GL-AP1300 to DSA

Convert GL-AP1300 to DSA and enable it.

While working on it rename the GL-AP1300 leds from green to white.

Tested-by: Rob White <rob@blue-wave.net>
Tested-by: Robert Sommer <frauhottelmann@gmail.com>
Signed-off-by: Nick Hainke <vincent@systemli.org>
19 months agoath79: create APBoot-compatible image for Aruba AP-175
Martin Kennedy [Thu, 20 Apr 2023 21:58:21 +0000 (17:58 -0400)]
ath79: create APBoot-compatible image for Aruba AP-175

As was done in commit e11d00d44c66 ("ath79: create Aruba AP-105 APBoot
compatible image"), alter the Aruba AP-175 image generation process so
OpenWrt can be loaded with the vendor Aruba APBoot. Since the
remainder of the explanation and installation process is identical,
continuing the quote from that commit:

This works by prepending the OpenWrt LZMA loader to the uImage and
jumping directly to the loader. Aruba does not offer bootm on these
boards.

This approach keeps compatibility to devices which had their U-Boot
replaced. Both bootloaders can boot the same image.

With this patch, new installations do not require replacing the
bootloader and can be performed from the serial console without
opening the case.

Installation
------------

1. Attach to the serial console of the AP-175.
   Interrupt autoboot and change the U-Boot env.

   $ setenv apb_rb_openwrt "setenv ipaddr 192.168.1.1;
     setenv serverip 192.168.1.66;
     netget 0x84000000 ap175.bin; go 0x84000040"
   $ setenv apb_fb_openwrt "cp.b 0xbf040000 0x84000000 0x10000;
     go 0x84000040"
   $ setenv bootcmd "run apb_fb_openwrt"
   $ saveenv

2. Load the OpenWrt initramfs image on the device using TFTP.
   Place the initramfs image as "ap175.bin" in the TFTP server
   root directory, connect it to the AP and make the server reachable
   at 192.168.1.66/24.

   $ run apb_rb_openwrt

3. Once OpenWrt booted, transfer the sysupgrade image to the device
   using scp and use sysupgrade to install the firmware.

Signed-off-by: Martin Kennedy <hurricos@gmail.com>
19 months agokernel: net: phy: realtek: fix NULL pointer dereference
Daniel Golle [Sun, 23 Apr 2023 17:46:02 +0000 (18:46 +0100)]
kernel: net: phy: realtek: fix NULL pointer dereference

The previous attempt to replace an open coded paged read in the RealTek
Ethernet PHY driver was too naive and resulted in breaking the r8169
PCIe Ethernet driver which also makes use of the RealTek Ethernet PHY
driver.
Fix this by instead of using the (not yet populated) paged operations
rather use rtl821x_write_page and protect the whole paged read operation
using the MDIO bus mutex.

Fixes: 998b973157 ("kernel: net: phy: realtek: improve RealTek 2.5G PHY driver")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
19 months agoramips: fix green LED for D-Link DAP-X1860
Sebastian Schaper [Sun, 23 Apr 2023 13:40:34 +0000 (15:40 +0200)]
ramips: fix green LED for D-Link DAP-X1860

It was found this device uses a single tri-color power/status LED
rather than individual red/orange LEDs, which also supports green.

Add GPIO for green color and use with `boot` and `running` aliases.

Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
Reviewed-by: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
19 months agoramips: Cudy X6 fixes / improvements
Felix Baumann [Fri, 21 Apr 2023 01:07:58 +0000 (03:07 +0200)]
ramips: Cudy X6 fixes / improvements

- Correct WiFi MACs, they didn't match oem firmware
- Move nvmem-cells to bdinfo partition and remove &bdinfo reference
- Add OEM device model name R13 to SUPPORTED_DEVICES
  This allows sysupgrading from Cudy's OpenWrt fork without force
- Label red_led and use it during failsafe mode and upgrades

MAC addresses as verified by OEM firmware:

use   address             source
LAN   b4:4b:d6:2d:c8:4a   label
WAN   b4:4b:d6:2d:c8:4b   label + 1
2g    b4:4b:d6:2d:c8:4a   label
5g    b6:4b:d6:3d:c8:4a   label + LA-Bit set + 4th oktet increased

The label MAC address is found in bdinfo 0xde00.

Signed-off-by: Felix Baumann <felix.bau@gmx.de>
[read wifi mac from flash offset]
Signed-off-by: David Bauer <mail@david-bauer.net>
19 months agoath79: add support for Alcatel HH40V
Andreas Böhler [Sat, 1 Apr 2023 19:57:22 +0000 (21:57 +0200)]
ath79: add support for Alcatel HH40V

The Alcatel HH40V is a CAT4 LTE router used by various ISPs.

Specifications
==============

SoC: QCA9531 650MHz
RAM: 128MiB
Flash: 32MiB SPI NOR
LAN: 1x 10/100MBit
WAN: 1x 10/100MBit
LTE: MDM9607 USB 2.0 (rndis configuration)
WiFi: 802.11n (SoC integrated)

MAC address assignment
======================

There are three MAC addresses stored in the flash ROM, the assignment
follows stock. The MAC on the label is the WiFi MAC address.

Installation (TFTP)
===================

1. Connect serial console
2. Configure static IP to 192.168.1.112
3. Put OpenWrt factory.bin file as firmware-system.bin
4. Press Power + WPS and plug in power
5. Keep buttons pressed until TFTP requests are visible
6. Wait for the system to finish flashing and wait for reboot
7. Bootup will fail as the kernel offset is wrong
8. Run "setenv bootcmd bootm 0x9f150000"
9. Reset board and enjoy OpenWrt

Installation (without UART)
===========================

Installation without UART is a bit tricky and requires several steps too
long for the commit message. Basic steps:

1. Create configure backup
2. Patch backup file to enable SSH
3. Login via SSH and configure the new bootcmd
3. Flash OpenWrt factory.bin image manually (sysupgrade doesn't work)

More detailed instructions will be provided on the Wiki page.

Tested by: Christian Heuff <christian@heuff.at>
Signed-off-by: Andreas Böhler <dev@aboehler.at>
19 months agoath79: use gpios for switch management in WZR-HP-G300NH variants
Tony Ambardar [Mon, 16 Jan 2023 11:18:00 +0000 (03:18 -0800)]
ath79: use gpios for switch management in WZR-HP-G300NH variants

The RTL8366S/RB switch node in DTS defines "mii-bus = <&mdio0>" to permit
management via SMI but this has likely never worked, instead falling back
to using GPIOs in the past:

     rtl8366s switch: cannot find mdio bus from bus handle (yet)
     rtl8366s switch: using GPIO pins 19 (SDA) and 20 (SCK)
     rtl8366s switch: RTL8366 ver. 1 chip found

Recently, the rtl8366s and rtl8366_smi drivers were changed from built-in
to loadable modules. This affected driver probing order and caused switch
initialization (and network access) to fail:

     rtl8366s switch: using MDIO bus 'ag71xx_mdio'
     rtl8366s switch: unknown chip id (ffff)
     rtl8366s switch: chip detection failed, err=-19

Force using GPIOs to manage the switch by dropping the "mii-bus" DTS
definition, which works for both built-in and loadable switch drivers.

Fixes: 6e0f0eae5b ("ath79: use rtl8366s and rtl8366_smi as a module")
Fixes: 575ec7a4b1 ("ath79: use rtl8366rb as a module")
Tested-by: Tony Ambardar <itugrok@yahoo.com> # WZR-HP-G300NH (RTL8366S)
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
19 months agoath79: fix switch support for WZR-HP-G300NH devices
Tony Ambardar [Fri, 13 Jan 2023 11:17:54 +0000 (03:17 -0800)]
ath79: fix switch support for WZR-HP-G300NH devices

Switch drivers for RTL8366S/RB were packaged as modules but not properly
added to device definitions for WZR-HP-G300NH router variants, breaking
network access to both after installation or upgrade.

Assign the correct switch driver package for each router.

Fixes: 6e0f0eae5b ("ath79: use rtl8366s and rtl8366_smi as a module")
Fixes: 575ec7a4b1 ("ath79: use rtl8366rb as a module")
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
19 months agohostapd: update to 2023-03-29
Nick Hainke [Mon, 13 Mar 2023 18:35:49 +0000 (19:35 +0100)]
hostapd: update to 2023-03-29

Add patches:
- 170-wpa_supplicant-fix-compiling-without-IEEE8021X_EAPOL.patch

Remove upstreamed:
- 170-DPP-fix-memleak-of-intro.peer_key.patch
- 461-driver_nl80211-use-new-parameters-during-ibss-join.patch
- 800-acs-don-t-select-indoor-channel-on-outdoor-operation.patch
- 992-openssl-include-rsa.patch

Automatically refreshed:
- 011-mesh-use-deterministic-channel-on-channel-switch.patch
- 021-fix-sta-add-after-previous-connection.patch
- 022-hostapd-fix-use-of-uninitialized-stack-variables.patch
- 030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
- 040-mesh-allow-processing-authentication-frames-in-block.patch
- 050-build_fix.patch
- 110-mbedtls-TLS-crypto-option-initial-port.patch
- 120-mbedtls-fips186_2_prf.patch
- 140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
- 150-add-NULL-checks-encountered-during-tests-hwsim.patch
- 160-dpp_pkex-EC-point-mul-w-value-prime.patch
- 200-multicall.patch
- 300-noscan.patch
- 310-rescan_immediately.patch
- 330-nl80211_fix_set_freq.patch
- 341-mesh-ctrl-iface-channel-switch.patch
- 360-ctrl_iface_reload.patch
- 381-hostapd_cli_UNKNOWN-COMMAND.patch
- 390-wpa_ie_cap_workaround.patch
- 410-limit_debug_messages.patch
- 420-indicate-features.patch
- 430-hostapd_cli_ifdef.patch
- 450-scan_wait.patch
- 460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
- 463-add-mcast_rate-to-11s.patch
- 465-hostapd-config-support-random-BSS-color.patch
- 500-lto-jobserver-support.patch
- 590-rrm-wnm-statistics.patch
- 710-vlan_no_bridge.patch
- 720-iface_max_num_sta.patch
- 730-ft_iface.patch
- 750-qos_map_set_without_interworking.patch
- 751-qos_map_ignore_when_unsupported.patch
- 760-dynamic_own_ip.patch
- 761-shared_das_port.patch
- 990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch

Manually refresh:
- 010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
- 301-mesh-noscan.patch
- 340-reload_freq_change.patch
- 350-nl80211_del_beacon_bss.patch
- 370-ap_sta_support.patch
- 380-disable_ctrl_iface_mib.patch
- 464-fix-mesh-obss-check.patch
- 470-survey_data_fallback.patch
- 600-ubus_support.patch
- 700-wifi-reload.patch
- 711-wds_bridge_force.patch
- 740-snoop_iface.patch

Tested-by: Packet Please <pktpls@systemli.org> [Fritzbox 4040 (ipq40xx),
           EAP225-Outdoor (ath79); 802.11s, WPA3 OWE, and WPA3 PSK]
Tested-by: Andrew Sim <andrewsimz@gmail.com> [mediatek/filogic]
Signed-off-by: Nick Hainke <vincent@systemli.org>
19 months agoramips: fix lzma-loader for buffalo_WSR_600DHP
Haoan Li [Wed, 5 Apr 2023 18:42:15 +0000 (02:42 +0800)]
ramips: fix lzma-loader for buffalo_WSR_600DHP

This fixes a well known "LZMA ERROR 1" error, reported previously on
numerous of similar devices.

Fixes: #11919
Signed-off-by: Haoan Li <lihaoan1001@163.com>
19 months agobmips: shg2500: add BCM4360 fallback SPROM
Álvaro Fernández Rojas [Sun, 23 Apr 2023 09:44:34 +0000 (11:44 +0200)]
bmips: shg2500: add BCM4360 fallback SPROM

Apart from the embedded BCM63268 wireless, this device has an external BCM4360
connected by PCIe which needs a fallback SPROM.
b43 isn't enabled for this device because BCM4360 isn't supported (AC PHY).

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agobmips: dgnd3700v2: add b43 wireless driver
Álvaro Fernández Rojas [Sun, 23 Apr 2023 09:40:39 +0000 (11:40 +0200)]
bmips: dgnd3700v2: add b43 wireless driver

Apart from the embedded BCM6362 wireless, Netgear DGND3700v2 has external
BCM43228 wireless connected by PCIe.
Fallback SPROM isn't needed for this one because it has a physical SPROM.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agobmips: leds-sercomm-msp430: improve driver
Álvaro Fernández Rojas [Thu, 20 Apr 2023 09:09:38 +0000 (11:09 +0200)]
bmips: leds-sercomm-msp430: improve driver

- Add missing module functions.
- Fix infinite pattern trigger by converting negative values to 0.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agobmips: enet: add missing module functions
Álvaro Fernández Rojas [Thu, 20 Apr 2023 08:59:08 +0000 (10:59 +0200)]
bmips: enet: add missing module functions

- Add missing MODULE_DEVICE_TABLE().
- Switch bcm6348-iudma to module_platform_driver().
- Add missing MODULE_AUTHOR, MODULE_DESCRIPTION, MODULE_LICENSE and
MODULE_ALIAS.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agobmips: pci: use standard module functions
Álvaro Fernández Rojas [Thu, 20 Apr 2023 08:51:45 +0000 (10:51 +0200)]
bmips: pci: use standard module functions

late_initcall_sync() is no longer needed so standard module functions can be
used on all bmips PCI/PCIe drivers.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agomac80211: b43: only enable bcma or ssb on bmips
Álvaro Fernández Rojas [Thu, 20 Apr 2023 08:28:04 +0000 (10:28 +0200)]
mac80211: b43: only enable bcma or ssb on bmips

By default both kmod-bcma and kmod-ssb are selected by kmod-b43.
However, only one of both modules is needed for bmips subtargets:
- bcma: bcm6318, bcm6328, bcm6362, bcm63268
- ssb: bcm6358, bcm6368

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agobmips: drop custom b43-sprom fixups
Álvaro Fernández Rojas [Thu, 20 Apr 2023 08:07:26 +0000 (10:07 +0200)]
bmips: drop custom b43-sprom fixups

b43-sprom fixups and no longer used and can be removed from bmips targets.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agobmips: switch to generic bcma/ssb fallback SPROM
Álvaro Fernández Rojas [Thu, 20 Apr 2023 08:05:52 +0000 (10:05 +0200)]
bmips: switch to generic bcma/ssb fallback SPROM

Stop using bmips b43-sprom fixups and switch to generic bcma/ssb fallback
SPROMs. This way we don't need to include the b43-sprom fixups on devices
without Broadcom wireless.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agokernel: add bcma/ssb fallback SPROM support
Álvaro Fernández Rojas [Thu, 20 Apr 2023 07:58:03 +0000 (09:58 +0200)]
kernel: add bcma/ssb fallback SPROM support

This adds generic kernel support for Broadcom Fallback SPROMs so that it can be
used in any target, even non Broadcom ones.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agobroadcom-sprom: add new package
Álvaro Fernández Rojas [Thu, 20 Apr 2023 07:54:55 +0000 (09:54 +0200)]
broadcom-sprom: add new package

This adds a new package with Broadcom SPROMs that can be used as fallback when
the devices lack physical SPROMs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agogeneric: 5.15: replace ramips AR8033 fiber patch with 5.18 patches
Daniel Kestrel [Fri, 17 Mar 2023 07:22:06 +0000 (08:22 +0100)]
generic: 5.15: replace ramips AR8033 fiber patch with 5.18 patches

A patch was added in kernel 5.4 to support the fiber operation of
AR8033 with ramips devices. In kernel 5.18 similar enhancements
were added to the kernel. Those patches are required for other
fiber based devices but when added, build fails for ramips targets.
This commit removes the ramips patch and adds the kernel 5.18 ones.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
[ split commit,refresh patch and improve commit message ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
19 months agogeneric: 5.10: replace ramips AR8033 fiber patch with 5.18 patches
Daniel Kestrel [Fri, 17 Mar 2023 07:22:06 +0000 (08:22 +0100)]
generic: 5.10: replace ramips AR8033 fiber patch with 5.18 patches

A patch was added in kernel 5.4 to support the fiber operation of
AR8033 with ramips devices. In kernel 5.18 similar enhancements
were added to the kernel. Those patches are required for other
fiber based devices but when added, build fails for ramips targets.
This commit removes the ramips patch and adds the kernel 5.18 ones.

Signed-off-by: Daniel Kestrel <kestrel1974@t-online.de>
[ split commit, refresh patch and improve commit title ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
19 months agogeneric: 5.10: replace pending 730-net-phy-at803x-fix... with upstream
Christian Marangi [Fri, 21 Apr 2023 23:59:38 +0000 (01:59 +0200)]
generic: 5.10: replace pending 730-net-phy-at803x-fix... with upstream

Replace pending 730-net-phy-at803x-fix-feature-detection.patch with
upstream version and move it to backport.

Refresh other related patch while moving it.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
19 months agoCI: check-kernel-patches: upload proposed refreshed patches
Christian Marangi [Sat, 22 Apr 2023 00:27:08 +0000 (02:27 +0200)]
CI: check-kernel-patches: upload proposed refreshed patches

Upload proposed refreshed patches if the check fails.
This should help devs refresh the patches if they don't have access to a
buildroot.

Devs should ALWAYS refresh the patches before submitting and merging
commits.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
19 months agokernel: refresh 729-net-phy-realtek-introduce-rtl822x_probe.patch
Daniel Golle [Sat, 22 Apr 2023 11:24:40 +0000 (12:24 +0100)]
kernel: refresh 729-net-phy-realtek-introduce-rtl822x_probe.patch

The patch needs to be refreshed to apply cleanly.

Fixes: 998b973157 ("kernel: net: phy: realtek: improve RealTek 2.5G PHY driver")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
19 months agomediatek: add support for TP-Link TL-XDR4288/608x
Chukun Pan [Fri, 10 Feb 2023 15:08:25 +0000 (23:08 +0800)]
mediatek: add support for TP-Link TL-XDR4288/608x

Hardware specification:
  SoC: MediaTek MT7986A 4x A53
  Flash: ESMT F50L1G41LB 128MB
  RAM: ESMT M15T4G16256A 512MB
  Ethernet (Max Speed):
    XDR4288: 1x 2.5G Wan, 1x 2.5G Lan, 4x 1G Lan
    XDR6086: 1x 2.5G Wan, 1x 2.5G Lan, 1x 1G Lan
    XDR6088: 1x 2.5G Wan, 1x 2.5G Lan, 4x 1G Lan
  WiFi:
    XDR4288: MT7976DAN (2.4G 2T2R, 5G 3T3R)
    XDR6086/XDR6088:
      WiFi1: MT7976GN 2.4GHz 4T4R
      WiFi2: MT7976AN 5GHz 4T4R
  Button: Reset, WPS, Turbo
  USB: 1 x USB 3.0
  Power: DC 12V 4A

Flash instructions:
  1. Execute the following operation to open nc shell:
     https://openwrt.org/inbox/toh/tp-link/xdr-6086#rooting
  2. Replace the stock bootloader to OpenWrt's:
     dd bs=131072 conv=sync of=/dev/mtdblock9 if=/tmp/xxx-preloader.bin
     dd bs=131072 conv=sync of=/dev/mtdblock9 seek=28 if=/tmp/xxx-bl31-uboot.fip
  3. Connect to your PC via the Gigabit port of the router,
     set a static ip on the ethernet interface of your PC.
     (ip 192.168.1.254, gateway 192.168.1.1)
  4. Download the initramfs image, and restart the router,
     waiting for tftp recovery to complete.
  5. After openwrt boots up, perform sysupgrade.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
[Add uboot build, fit and sysupgrade support, fix RealTek PHYs]
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
19 months agouboot-mediatek: add TP-Link TL-XDR4288 and TL-XDR608x
Daniel Golle [Fri, 2 Dec 2022 04:29:58 +0000 (04:29 +0000)]
uboot-mediatek: add TP-Link TL-XDR4288 and TL-XDR608x

TP-Link TL-XDR608x comes with locked vendor loader. Add U-Boot build
for replacement loader for both TL-XDR6086 and TL-XDR6088. The only
difference at U-Boot level is the different filename requested via
TFTP, matching the corresponding OpenWrt build artifacts for each
device.

The TP-Link TL-XDR4288 has the same hardware as the TP-Link TL-XDR6088
except for the wireless part. Also create a uboot for the TP-Link
TL-XDR4288.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[rebase to uboot 23.04, correct led and button]
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
19 months agokernel: net: phy: realtek: improve RealTek 2.5G PHY driver
Daniel Golle [Sat, 22 Apr 2023 00:52:04 +0000 (01:52 +0100)]
kernel: net: phy: realtek: improve RealTek 2.5G PHY driver

 * use interface mode switching only when operating in C45 mode
   Linux prevents switching the interface mode when using C22 MDIO,
   hence use rate-adapter mode in case the PHY controlled via C22.

 * use phy_read_paged where appropriate

 * use existing generic inline functions to handle 10GbE advertisements
   instead of redundantly defining register macros in realtek.c which
   are not actually vendor-specific.

 * make sure 10GbE advertisement is valid, preventing false-positive
   warning "Downshift occurred from negotiated speed 2.5Gbps to actual
   speed 1Gbps, check cabling!" with some link-partners using 1G mode.

 * Support Link Down Power Saving Mode (ALDPS)

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
19 months agolibpcap: update to 1.10.4
Nick Hainke [Fri, 14 Apr 2023 13:17:28 +0000 (15:17 +0200)]
libpcap: update to 1.10.4

Changes:
https://git.tcpdump.org/libpcap/blob/104271ba4a14de6743e43bcf87536786d8fddea4:/CHANGES

Signed-off-by: Nick Hainke <vincent@systemli.org>
19 months agotools/isl: update to 0.26
Nick Hainke [Fri, 14 Apr 2023 11:22:36 +0000 (13:22 +0200)]
tools/isl: update to 0.26

Changelog:
https://repo.or.cz/isl.git/blob/e58af07f91c94db81627fb801fa6f52c3a7201a8:/ChangeLog

Signed-off-by: Nick Hainke <vincent@systemli.org>
19 months agotools/libressl: update to 3.7.2
Nick Hainke [Sat, 15 Apr 2023 06:44:42 +0000 (08:44 +0200)]
tools/libressl: update to 3.7.2

Release Notes:
https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-3.7.2-relnotes.txt

Signed-off-by: Nick Hainke <vincent@systemli.org>
19 months agokernel: bump 5.10 to 5.10.178
John Audia [Thu, 20 Apr 2023 12:53:55 +0000 (08:53 -0400)]
kernel: bump 5.10 to 5.10.178

Removed upstreamed:
backport-5.10/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.178&id=0279e82e148407feec88466990de14bcba9e12c0

All other patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
19 months agokernel: bump 5.15 to 5.15.108
John Audia [Thu, 20 Apr 2023 12:53:12 +0000 (08:53 -0400)]
kernel: bump 5.15 to 5.15.108

Removed upstreamed:
backport-5.15/430-v6.3-ubi-Fix-failure-attaching-when-vid_hdr-offset-equals.patch[1]
backport-5.15/612-v6.3-skbuff-Fix-a-race-between-coalescing-and-releasing-S.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.108&id=85d7a7044b759d865d10395a357632af00de5867
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.108&id=906a6689bb0191ad2a44131a3377006aa098af59

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
19 months agogeneric: update nvmem cell mac-address-ascii support
Chukun Pan [Thu, 6 Apr 2023 12:21:03 +0000 (20:21 +0800)]
generic: update nvmem cell mac-address-ascii support

Instead of use mac-address-ascii in nvmem_get_mac_address
function, move it into of_get_mac_addr_nvmem function to
support more devices.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
19 months agoramips: MSG1500 X.00: switch to mac-address-ascii dts
Chukun Pan [Wed, 19 Oct 2022 15:16:30 +0000 (23:16 +0800)]
ramips: MSG1500 X.00: switch to mac-address-ascii dts

The Config partition of some machines is special, and the openwrt script
cannot read the protest_lan_mac correctly. This problem can be solved by
reading the mac address (ascii) in dts.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
19 months agomediatek: filogic: remove redundant code for tuf-ax4200
Chukun Pan [Wed, 5 Apr 2023 12:01:50 +0000 (20:01 +0800)]
mediatek: filogic: remove redundant code for tuf-ax4200

Remove redundant code in 02_network.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
19 months agomediatek: filogic: move mac address setting together
Chukun Pan [Mon, 20 Mar 2023 15:08:01 +0000 (23:08 +0800)]
mediatek: filogic: move mac address setting together

Simultaneously sort in the order of letters.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
19 months agomediatek: filogic: fix network config for mt7986a-rfb
Chukun Pan [Sun, 19 Mar 2023 15:21:35 +0000 (23:21 +0800)]
mediatek: filogic: fix network config for mt7986a-rfb

Fix the network configuration according to the device tree.

Fixes: 5faff99 ("mediatek: filogic: fix mt7986a ethernet devicetree entries")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
19 months agotools/squashfs4: backport OpenWrt extended options patch
Christian Marangi [Thu, 20 Apr 2023 19:30:52 +0000 (21:30 +0200)]
tools/squashfs4: backport OpenWrt extended options patch

Due to us keeping a patch around for years and never proposing it to
squashfs4 repository, we resulted in having the same squashfs4 version
but with different supported options. (openwrt patched -- upstream)

To workaround this problem, a non-standard option was required.

To not have surprise on tool bump, backport the patch and add the new
config option required to enable these extended non-standard options.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
19 months agoksmbd: update to latest 3.4.8 release
Andrew Sim [Tue, 18 Apr 2023 16:54:01 +0000 (18:54 +0200)]
ksmbd: update to latest 3.4.8 release

Changelog: https://github.com/cifsd-team/ksmbd/releases/tag/3.4.8

Signed-off-by: Andrew Sim <andrewsimz@gmail.com>
19 months agotools/lz4: build with meson
Rosen Penev [Thu, 20 Apr 2023 08:59:32 +0000 (01:59 -0700)]
tools/lz4: build with meson

Simplifies Makefile and speeds up compilation.

Before:
Executed in   68.00 secs    fish           external
   usr time  104.17 secs    1.33 millis  104.17 secs
   sys time    4.29 secs    0.35 millis    4.29 secs

After:
Executed in   27.98 secs    fish           external
   usr time   25.18 secs    1.32 millis   25.18 secs
   sys time    3.31 secs    0.35 millis    3.31 secs

Signed-off-by: Rosen Penev <rosenp@gmail.com>
19 months agouboot-mediatek: fix factory/reset button
Daniel Golle [Thu, 20 Apr 2023 10:31:49 +0000 (11:31 +0100)]
uboot-mediatek: fix factory/reset button

U-Boot commit ea6fdc13595 ("dm: button: add support for linux_code in
button-gpio.c driver") makes it mandatory to specify linux,code for all
buttons. As that broke handling of the reset button in U-Boot with the
update to U-Boot 2023.04, add linux,code for all butons.

Reported-by: @DragonBluep
Fixes: 50f7c5af4a ("uboot-mediatek: update to v2023.04")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
19 months agomediatek: filogic: update kernel config-5.15
Daniel Golle [Wed, 19 Apr 2023 22:38:31 +0000 (23:38 +0100)]
mediatek: filogic: update kernel config-5.15

Expose thermal-zone as hwmon sensor, remove thermal emulation driver
and add some missing symbols.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
19 months agomediatek: bpi-r3: allow up to 3W per SFP module
Daniel Golle [Tue, 18 Apr 2023 18:09:01 +0000 (19:09 +0100)]
mediatek: bpi-r3: allow up to 3W per SFP module

According to SinoVoip up to 3A @ 3.3V are available for both
SFP modules together. Raise energy limit from 1W (default) to 3W,
however, be aware that using modules consuming more than 1W will
require active cooling!

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
19 months agotools/dwarves: update to 1.25
Nick Hainke [Wed, 12 Apr 2023 19:50:29 +0000 (21:50 +0200)]
tools/dwarves: update to 1.25

Remove AUTORELEASE and HOST_BUILD_PARALLEL.

Release Notes:
https://lore.kernel.org/dwarves/ZDG4qxirpIfmbiip@kernel.org/T/#u

Signed-off-by: Nick Hainke <vincent@systemli.org>
19 months agokernel: fix up qrtr packaging after 5.15.107 bump
Stefan Lippers-Hollmann [Sun, 16 Apr 2023 09:57:42 +0000 (05:57 -0400)]
kernel: fix up qrtr packaging after 5.15.107 bump

qrtr/ns.ko is now merged into qrtr/qrtr.ko, so drop the individual module packaging.

Fixes: f4989239cc91 ("kernel: bump 5.15 to 5.15.107")
Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> #ipq807x/ax3600, x86_64/FW-7543B, mt7621/dap-x1860
19 months agokernel: bump 5.15 to 5.15.107
John Audia [Thu, 13 Apr 2023 17:28:17 +0000 (13:28 -0400)]
kernel: bump 5.15 to 5.15.107

All  patches automatically rebased.

Build system: x86_64
Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
19 months agotools/cmake: update to 3.26.3
Nick Hainke [Sun, 16 Apr 2023 21:05:05 +0000 (23:05 +0200)]
tools/cmake: update to 3.26.3

Release Notes:
- https://www.kitware.com/cmake-3-26-1-available-for-download/
- https://www.kitware.com/cmake-3-26-2-available-for-download/
- https://www.kitware.com/cmake-3-26-3-available-for-download/

Signed-off-by: Nick Hainke <vincent@systemli.org>
19 months agomwlwifi: update to version 10.3.9.0-20230311
Kabuli Chana [Tue, 11 Apr 2023 22:52:56 +0000 (16:52 -0600)]
mwlwifi: update to version 10.3.9.0-20230311

upstream PR 408 improvements:
 -Fix AMSDU packets unused
 -Removed the ASMDU packets queue
 -Add more info in the iw tool
 -fix is_hw_crypto_enabled
 -Optimization AMPDU_TX_OPERATIONAL (avoid a spinlock)

change to wongsyrone mod

Signed-off-by: Kabuli Chana <newtownBuild@gmail.com>
19 months agobmips: pci-bcm6348: load IO resource from DT ranges
Álvaro Fernández Rojas [Tue, 18 Apr 2023 18:11:28 +0000 (20:11 +0200)]
bmips: pci-bcm6348: load IO resource from DT ranges

Correctly load IO resource from DT ranges and remove the specific IO resource.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agobmips: drop unneeded ath9k fixup
Álvaro Fernández Rojas [Mon, 10 Apr 2023 10:00:02 +0000 (12:00 +0200)]
bmips: drop unneeded ath9k fixup

We no longer need the custom ath9k fixup now that we're using the standard
kmod-owl-loader.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agobmips: hg556a: switch to kmod-owl-loader
Álvaro Fernández Rojas [Mon, 10 Apr 2023 09:54:02 +0000 (11:54 +0200)]
bmips: hg556a: switch to kmod-owl-loader

Stop using custom ath9k fixup and switch to standard kmod-owl-loader

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
19 months agotools/bzip2: add `bzip2` binaries
Tony Butler [Wed, 30 Nov 2022 14:19:37 +0000 (06:19 -0800)]
tools/bzip2: add `bzip2` binaries

`bzip2` is the standard executable for bzip2 compression

this includes development includes and both static and shared libs
(libbz2) which can be used by other packages

the initramfs generator offers the BZIP2 option but there was no
executable to support it, and worked only via side effect of having a
system-installed version of bzip2, which could be less predictable

Signed-off-by: Tony Butler <spudz76@gmail.com>
[ remove unintended change ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
19 months agoRevert "tools/bzip2: add `bzip2` binaries"
Christian Marangi [Tue, 18 Apr 2023 13:22:48 +0000 (15:22 +0200)]
Revert "tools/bzip2: add `bzip2` binaries"

This reverts commit 394d7134ec42f14ddb91769c737098753fa68266.

The commit has unintentded change that cause compilation error with SDK
or LZO compression.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
19 months agomac80211: ath11k: replace 160MHz fix with upstream pending one
Robert Marko [Tue, 18 Apr 2023 08:35:47 +0000 (10:35 +0200)]
mac80211: ath11k: replace 160MHz fix with upstream pending one

QCA has finally sent a proper fixup for the 160MHz regression upstream,
so lets use the pending fix which also properly sets center frequency 2
in case 80+80 MHz is used.

Signed-off-by: Robert Marko <robimarko@gmail.com>
19 months agobuild: fix incorrect initramfs gzip compression
Tony Butler [Tue, 18 Apr 2023 02:32:18 +0000 (19:32 -0700)]
build: fix incorrect initramfs gzip compression

Requires: tools/libdeflate

fix consistency of executable to use
`$(STAGING_DIR_HOST)/bin/libdeflate-gzip`, and not system-installed ones
from the usual environment `PATH`;
this affects option `CONFIG_KERNEL_INITRAMFS_COMPRESSION_GZIP`

this may have worked in the past but only via side effect of having the
binaries on the host system (and whatever unpredictable version or
patchset those might be), and did not use the improved but totally
compatible libdeflate-gzip

Fixes: 330bd380e8b6 ("image: allow building FIT and uImage with ramdisk")
Signed-off-by: Tony Butler <spudz76@gmail.com>
19 months agobuild: fix incorrect initramfs bzip2 compression
Tony Butler [Tue, 18 Apr 2023 02:28:36 +0000 (19:28 -0700)]
build: fix incorrect initramfs bzip2 compression

Requires: tools/bzip2

fix consistency of executable to use `$(STAGING_DIR_HOST)/bin/bzip2`, and
not system-installed ones from the usual environment `PATH`;
this affects option `CONFIG_KERNEL_INITRAMFS_COMPRESSION_BZIP2`

this may have worked in the past but only via side effect of having the
binaries on the host system (and whatever unpredictable version or
patchset those might be)

Fixes: 330bd380e8b6 ("image: allow building FIT and uImage with ramdisk")
Signed-off-by: Tony Butler <spudz76@gmail.com>
19 months agotools/bzip2: add `bzip2` binaries
Tony Butler [Wed, 30 Nov 2022 14:19:37 +0000 (06:19 -0800)]
tools/bzip2: add `bzip2` binaries

`bzip2` is the standard executable for bzip2 compression

this includes development includes and both static and shared libs
(libbz2) which can be used by other packages

the initramfs generator offers the BZIP2 option but there was no
executable to support it, and worked only via side effect of having a
system-installed version of bzip2, which could be less predictable

Signed-off-by: Tony Butler <spudz76@gmail.com>
19 months agoath79: mikrotik: update kernel on NAND using Yafut
Michał Kępień [Sat, 1 Apr 2023 18:54:14 +0000 (20:54 +0200)]
ath79: mikrotik: update kernel on NAND using Yafut

Instead of erasing the entire NAND partition holding the kernel during
every system upgrade and then flashing a Yaffs file system image
prepared using kernel2minor (not accounting for bad blocks in the
process), use the Yafut utility to replace the kernel executable on
MikroTik NAND devices, preserving the existing Yaffs file system
(including bad block information) on the partition holding the kernel.

Add Yafut to DEFAULT_PACKAGES for the ath79/mikrotik target, so that the
tool is included in the initramfs images created when building for
multiple profiles.  However, exclude Yafut from the images built for
MikroTik devices with NOR flash as the tool is currently only meant to
be used on devices with NAND flash.

As this addresses the concerns for MikroTik NAND devices discussed in
commit 9d96b6fb72 ("ath79/mikrotik: disable building NAND images"),
re-enable building images for these devices.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
19 months agoyafut: add a kernel update tool for MikroTik NAND
Michał Kępień [Fri, 31 Mar 2023 10:40:31 +0000 (12:40 +0200)]
yafut: add a kernel update tool for MikroTik NAND

Commit 9d96b6fb72 ("ath79/mikrotik: disable building NAND images")
disabled building images for MikroTik devices with NAND flash due to a
less than satisfactory method used for updating the kernel on those
devices back then.

To address the problem, add support for updating the kernel on MikroTik
devices with NAND flash using a new tool, Yafut, which enables copying
files from/to Yaffs file systems even if the kernel does not have native
support for the Yaffs file system compiled in.  Instead of erasing the
entire NAND partition holding the kernel during every system upgrade
(which is what the previously-used approach employing kernel2minor
involved), Yafut preserves the Yaffs filesystem present on that
partition and only replaces the kernel executable.  This allows bad
block information to be preserved across sysupgrade runs and also
enables wear leveling on the NAND partition holding the kernel.  Yafut
does not rely on kernel2minor in any way and intends to eventually
supersede the latter for NAND devices.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
19 months agokernel: backport MEMREAD ioctl
Michał Kępień [Fri, 31 Mar 2023 10:40:31 +0000 (12:40 +0200)]
kernel: backport MEMREAD ioctl

MEMREAD is a new ioctl for MTD character devices that was first included
in Linux 6.1.  It allows userspace applications to use the Linux
kernel's OOB autoplacement mechanism while reading data from NAND
devices.  The Yafut tool needs this ioctl to do its job.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
19 months agoath79: mikrotik: drop unused files from ramdisk
Michał Kępień [Fri, 31 Mar 2023 10:40:31 +0000 (12:40 +0200)]
ath79: mikrotik: drop unused files from ramdisk

The ramdisk used by sysupgrade on MikroTik devices currently includes
U-Boot fw_* files that are not necessary for performing a system upgrade
on that platform.  The relevant lines were added to
target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh by commit
a66eee6336 ("ath79: add mikrotik subtarget"), likely because they also
existed in target/linux/ath79/nand/base-files/lib/upgrade/platform.sh,
where the platform_do_upgrade_mikrotik_nand() function moved by commit
a66eee6336 originally lived.  However, these lines were added to
target/linux/ath79/nand/base-files/lib/upgrade/platform.sh by commit
55e6c903ae ("ath79: GL-AR300M: provide NAND support; increase to 4 MB
kernel"), which is not related to MikroTik devices in any way.

Remove the code adding unused U-Boot fw_* files to the ramdisk used by
sysupgrade on MikroTik devices.

Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
19 months agomac80211: update to v6.1.24
Felix Fietkau [Mon, 17 Apr 2023 15:17:16 +0000 (17:17 +0200)]
mac80211: update to v6.1.24

Drop patches accepted upstream

Signed-off-by: Felix Fietkau <nbd@nbd.name>
19 months agoath79: create Aruba AP-105 APBoot compatible image
David Bauer [Mon, 17 Apr 2023 17:15:22 +0000 (19:15 +0200)]
ath79: create Aruba AP-105 APBoot compatible image

Alter the Aruba AP-105 image generation process so OpenWrt can be loaded
with the vendor Aruba APBoot.

This works by prepending the OpenWrt LZMA loader to the uImage and
jumping directly to the loader. Aruba does not offer bootm on these
boards.

This approach keeps compatibility to devices which had their U-Boot
replaced. Both bootloaders can boot the same image.

The same modification is most likely also possible for the Aruba AP-175.

With this patch, new installations do not require replacing the
bootloader and can be performed from the serial console without opening
the case.

Installation
------------

1. Attach to the serial console of the AP-105.
   Interrupt autoboot and change the U-Boot env.

   $ setenv apb_rb_openwrt "setenv ipaddr 192.168.1.1;
     setenv serverip 192.168.1.66;
     netget 0x84000000 ap105.bin; go 0x84000040"
   $ setenv apb_fb_openwrt "cp.b 0xbf040000 0x84000000 0x10000;
     go 0x84000040"
   $ setenv bootcmd "run apb_fb_openwrt"
   $ saveenv

2. Load the OpenWrt initramfs image on the device using TFTP.
   Place the initramfs image as "ap105.bin" in the TFTP server
   root directory, connect it to the AP and make the server reachable
   at 192.168.1.66/24.

   $ run apb_rb_openwrt

3. Once OpenWrt booted, transfer the sysupgrade image to the device
   using scp and use sysupgrade to install the firmware.

Signed-off-by: David Bauer <mail@david-bauer.net>
19 months agofirmware-utils: update to latest HEAD
David Bauer [Mon, 17 Apr 2023 16:58:15 +0000 (18:58 +0200)]
firmware-utils: update to latest HEAD

e8191eb tplink-safeloader: increase support-list size for AX23 v1

Signed-off-by: David Bauer <mail@david-bauer.net>
19 months agotools/libdeflate: update to 1.18
Nick Hainke [Thu, 6 Apr 2023 06:37:50 +0000 (08:37 +0200)]
tools/libdeflate: update to 1.18

Release Notes:
https://github.com/ebiggers/libdeflate/blob/master/NEWS.md#version-118

Signed-off-by: Nick Hainke <vincent@systemli.org>
19 months agoath79: fix LED pinout for Comfast CF-E314N v2
Mark Onstid [Fri, 7 Apr 2023 15:21:48 +0000 (11:21 -0400)]
ath79: fix LED pinout for Comfast CF-E314N v2

In addition to standardizing LED names to match the rest of the systems, this
commit fixes a possibly erroneous pinout for LEDs in Comfast CF-E314N v2.

In particular, rssimediumhigh and rssihigh are moved from pins 13 and 14 to
14 and 16 respectively. In addition to working on a test device, this pinout
better matches the one set out in the prototype support patch for the device
in Github PR #1873.

Signed-off-by: Mark Onstid <turretkeeper@mail.com>
19 months agoramips: add Xiaomi RA75 red signal led
Oleksandr Zharov [Sat, 15 Apr 2023 20:23:41 +0000 (23:23 +0300)]
ramips: add Xiaomi RA75 red signal led

RA75 has 5 physical LEDs under 2 indicators, mixed with light pipes:
Indicator "System":
  GPIO0: blue
  GPIO2: amber
Indicator "Signal":
  GPIO44: blue
  GPIO37: amber
  GPIO46: red

All except GPIO46 were already added by Jo Deisenhofer. GPIO46 is used for UART1 by
default, so it needs additional pin control change in devicetree to be operational.
Verified on my RA75.

Signed-off-by: Oleksandr Zharov <alex.zeed@gmail.com>
19 months agonetifd: update to the latest version
Felix Fietkau [Mon, 17 Apr 2023 11:14:41 +0000 (13:14 +0200)]
netifd: update to the latest version

7de5440a520f device: fix segfault when recreating devices

Signed-off-by: Felix Fietkau <nbd@nbd.name>
19 months agotcpdump: update to 4.99.4
Nick Hainke [Thu, 13 Apr 2023 09:20:05 +0000 (11:20 +0200)]
tcpdump: update to 4.99.4

Fixes CVE-2023-1801.

Changelog can be found here:
https://git.tcpdump.org/tcpdump/blob/55bc126b0216cfe409b8d6bd378f65679d136ddf:/CHANGES

Signed-off-by: Nick Hainke <vincent@systemli.org>
19 months agoipq40xx: convert AP-365 to DSA
David Bauer [Wed, 12 Apr 2023 20:06:18 +0000 (22:06 +0200)]
ipq40xx: convert AP-365 to DSA

Re-enable the Aruba AP-365 with DSA support. Changes are trvivial, as
the board design is pretty much the already updated AP-303.

Run-tested on the device.

Signed-off-by: David Bauer <mail@david-bauer.net>
19 months agokernel: backport fix for recently introduced UBI bug
Daniel Golle [Sat, 15 Apr 2023 00:35:17 +0000 (01:35 +0100)]
kernel: backport fix for recently introduced UBI bug

Import commit "ubi: Fix failure attaching when vid_hdr offset equals to
(sub)page size" which did not yet make it to stable upstream Linux trees.

Fixes: #12232
Fixes: #12339
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
19 months agouboot-mediatek: fix build for RAVPower RP-WD009
Daniel Golle [Fri, 14 Apr 2023 16:54:54 +0000 (17:54 +0100)]
uboot-mediatek: fix build for RAVPower RP-WD009

Updating to U-Boot 2023.04 broke the build for the RAVPower RP-WD009
MT7628 board. This was due to upstream conversion of CONFIG_* to CFG_*
which was not applied to our downstream patch adding support for the
RAVPower RP-WD009 device.

Apply CONFIG_* to CFG_* converion analog to what has been done also
for mt7928_rfb upstream.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
19 months agokernel: backport fix for a page pool related race condition
Felix Fietkau [Thu, 13 Apr 2023 19:28:07 +0000 (21:28 +0200)]
kernel: backport fix for a page pool related race condition

Signed-off-by: Felix Fietkau <nbd@nbd.name>
19 months agogeneric: move accepted patch to backport-5.15
Daniel Golle [Thu, 13 Apr 2023 19:16:05 +0000 (20:16 +0100)]
generic: move accepted patch to backport-5.15

The patch adding SFP quirk for MXPD 483II was accepted upstream and
will be part of Linux v6.3:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=ad651d68cee75e9ac20002254c4e5d09ee67a84b

Move the patch from pending-5.15 to backport-5.15.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
19 months agomediatek: sync pinctrl-mt7981 and pinctrl-mt7986 drivers
Daniel Golle [Thu, 13 Apr 2023 04:03:03 +0000 (05:03 +0100)]
mediatek: sync pinctrl-mt7981 and pinctrl-mt7986 drivers

Now that new pinconf features have been backported sync pinctrl-mt7981
and pinctrl-m7986 with bleeding-edge upstream versions.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>