openwrt/staging/linusw.git
10 months agobcm27xx: refresh bcm2711 kernel config
Álvaro Fernández Rojas [Sun, 28 Jan 2024 00:08:56 +0000 (01:08 +0100)]
bcm27xx: refresh bcm2711 kernel config

Refresh outdated bcm2711 (RPi 4B) kernel config.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
10 months agoqualcommax: switch to qca8081 upstream PHY driver
Christian Marangi [Sat, 9 Dec 2023 13:31:02 +0000 (14:31 +0100)]
qualcommax: switch to qca8081 upstream PHY driver

Switch to qca8081 upstream PHY. Update every device that have LEDs
attached to the qca8081 PHY to follow new way of defining the LEDs and
add original OEM configuration.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 months agoqca-ssdk: disable compiling qca8081 PHY driver in favor of upstream
Christian Marangi [Sat, 9 Dec 2023 13:28:15 +0000 (14:28 +0100)]
qca-ssdk: disable compiling qca8081 PHY driver in favor of upstream

Disable compiling qca8081 PHY driver in favor of upstream to better
support it and add better control of attached LEDs.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 months agogeneric: 6.1: backport patch adding more speed modes to LED netdev trigger
Christian Marangi [Sat, 27 Jan 2024 16:52:11 +0000 (17:52 +0100)]
generic: 6.1: backport patch adding more speed modes to LED netdev trigger

Backport upstream patch adding more speed modes to LED netdev trigger.

Fixes: 2c39269b6e00 ("generic: 6.1: backport qca808x LED support patch")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 months agogeneric: 6.1: backport qca808x LED support patch
Christian Marangi [Sat, 27 Jan 2024 15:31:18 +0000 (16:31 +0100)]
generic: 6.1: backport qca808x LED support patch

Backport qca808x LED support patch merged upstream needed to drop
handling of it from the SSDK for ipq807x target.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 months agomac80211: brcm: fix warning on ARCH_BCM2835
Álvaro Fernández Rojas [Sat, 27 Jan 2024 09:25:08 +0000 (10:25 +0100)]
mac80211: brcm: fix warning on ARCH_BCM2835

Completely disable dump_survey code on ARCH_BCM2835 to fix defined but not
used warning.
https://github.com/openwrt/openwrt/commit/512b762ddbb602b744f0e7a443cf4ac7422155c1?w=1#commitcomment-137899352

Fixes: 512b762ddbb6 ("mac80211: brcm: disable dump_survey on Raspberry Pi")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
10 months agolibubox: update to Git HEAD (2024-01-26)
Felix Fietkau [Fri, 26 Jan 2024 20:02:21 +0000 (21:02 +0100)]
libubox: update to Git HEAD (2024-01-26)

6339204c212b CMakeLists.txt: bump minimum cmake version
c1be505732e6 udebug: fix crash in udebug_entry_vprintf with longer strings

Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 months agoiwinfo: update to latest git HEAD
Álvaro Fernández Rojas [Fri, 26 Jan 2024 16:28:19 +0000 (17:28 +0100)]
iwinfo: update to latest git HEAD

Adds MediaTek MT7916AN and Cypress CYW43455 (Raspberry Pi 5) devices.

a34977c devices: add device id for Cypress CYW43455
3eb34df devices: add device id for MediaTek MT7916AN

There are no ABI changes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
10 months agomac80211: brcm: disable dump_survey on Raspberry Pi
Álvaro Fernández Rojas [Fri, 26 Jan 2024 16:16:29 +0000 (17:16 +0100)]
mac80211: brcm: disable dump_survey on Raspberry Pi

Enabling this causes slow iwinfo calls on Raspberry Pi and LuCI slows down
when wireless is enabled.
Fixes: https://github.com/openwrt/openwrt/issues/14013
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
10 months agomac80211: brcm: remove alternative DT firmware names patch
Álvaro Fernández Rojas [Fri, 26 Jan 2024 16:10:31 +0000 (17:10 +0100)]
mac80211: brcm: remove alternative DT firmware names patch

This patch has been reverted in the Raspberry Pi linux repository.
Also refresh the rest of the patches.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
10 months agogeneric: 5.15: backport upstream Aquantia PHY firmware loader patches
Christian Marangi [Sun, 19 Nov 2023 11:52:55 +0000 (12:52 +0100)]
generic: 5.15: backport upstream Aquantia PHY firmware loader patches

Backport merged upstream patch that adds support for firmware loader
from NVMEM or attached filesystem for Aquantia PHYs.

Refresh all kernel patches affected by this change.

Also update the path for aquantia .ko that got moved to dedicated
directory upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
[rmilecki: port to 5.15]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
10 months agoCI: formal: use shared workflow in actions-shared-workflows
Christian Marangi [Fri, 26 Jan 2024 15:14:20 +0000 (16:14 +0100)]
CI: formal: use shared workflow in actions-shared-workflows

Use shared workflow in actions-shared-workflows instead of keeping the
workflow in openwrt main branch to make it easier to maintain and update
without bloating the main repository commit history.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 months agoipq806x: drop swconfig leftovers
Aleksander Jan Bajkowski [Sat, 25 Nov 2023 22:47:08 +0000 (23:47 +0100)]
ipq806x: drop swconfig leftovers

They are unnecessary since ipq806x switched to DSA in
the commit 337e36e0ef988d850105cfa5f7588e36d90aef2b.

Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
Reviewed-by: Robert Marko <robimarko@gmail.com>
10 months agorealtek: 5.15: refresh HSGMII patch due to recent PHY backport
Christian Marangi [Fri, 26 Jan 2024 14:50:43 +0000 (15:50 +0100)]
realtek: 5.15: refresh HSGMII patch due to recent PHY backport

Refresh HSGMII patch due to recent PHY backport that cause
compilation warning for case not handled in phy_interface_num_ports.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 months agolayerscape: 5.15: refresh 2.5G-SGMII patch due to recent PHY backport
Christian Marangi [Fri, 26 Jan 2024 14:49:12 +0000 (15:49 +0100)]
layerscape: 5.15: refresh 2.5G-SGMII patch due to recent PHY backport

Refresh 2.5G-SGMII patch due to recent PHY backport that cause
compilation warning for case not handled in phy_interface_num_ports.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 months agoqualcommax: 301w: provide AQR FW via NVMEM cells
Robert Marko [Thu, 25 Jan 2024 21:19:58 +0000 (22:19 +0100)]
qualcommax: 301w: provide AQR FW via NVMEM cells

In order to get rid of having to modify U-boot bootcmd and having U-boot
load the Aquantia PHY-s firmware lets use some of the free space on SPI-NOR
to add a second ethphyfw partition and be able to load AQR FW via NVMEM
cells.

Signed-off-by: Robert Marko <robimarko@gmail.com>
10 months agoqualcommax: 301w: correct AQR reset GPIO-s
Robert Marko [Wed, 29 Nov 2023 18:24:18 +0000 (19:24 +0100)]
qualcommax: 301w: correct AQR reset GPIO-s

It seems that the reset GPIO-s defined for the two AQR PHY-s are actually
reversed.

Manually testing confirmed that GPIO44 is actually reset GPIO of AQR at 0,
while GPIO59 is reset of AQR at 8:
root@OpenWrt:~# mdio 9*
 DEV      PHY-ID  LINK
0x00  0x00000000  down
0x08  0x00000000  down
0x10  0x004dd0b1  down
0x11  0x004dd0b1  down
0x12  0x004dd0b1  down
0x13  0x004dd0b1  up
0x14  0x004dd0b1  down
0x15  0x04820a05  down
root@OpenWrt:~# gpioset gpiochip0 44=0
root@OpenWrt:~# mdio 9*
 DEV      PHY-ID  LINK
0x08  0x00000000  down
0x10  0x004dd0b1  down
0x11  0x004dd0b1  down
0x12  0x004dd0b1  down
0x13  0x004dd0b1  up
0x14  0x004dd0b1  down
0x15  0x04820a05  down
root@OpenWrt:~# gpioset gpiochip0 44=1
root@OpenWrt:~# mdio 9*
 DEV      PHY-ID  LINK
0x00  0x00000000  down
0x08  0x00000000  down
0x10  0x004dd0b1  down
0x11  0x004dd0b1  down
0x12  0x004dd0b1  down
0x13  0x004dd0b1  up
0x14  0x004dd0b1  down
0x15  0x04820a05  down
root@OpenWrt:~# gpioset gpiochip0 59=0
root@OpenWrt:~# mdio 9*
 DEV      PHY-ID  LINK
0x00  0x00000000  down
0x10  0x004dd0b1  down
0x11  0x004dd0b1  down
0x12  0x004dd0b1  down
0x13  0x004dd0b1  up
0x14  0x004dd0b1  down
0x15  0x04820a05  down
root@OpenWrt:~# gpioset gpiochip0 59=1
root@OpenWrt:~# mdio 9*
 DEV      PHY-ID  LINK
0x00  0x00000000  down
0x08  0x00000000  down
0x10  0x004dd0b1  down
0x11  0x004dd0b1  down
0x12  0x004dd0b1  down
0x13  0x004dd0b1  up
0x14  0x004dd0b1  down
0x15  0x04820a05  down

Signed-off-by: Robert Marko <robimarko@gmail.com>
10 months agoqualcommax: 301w: populate AQR firmware name
Robert Marko [Sun, 19 Nov 2023 15:37:07 +0000 (16:37 +0100)]
qualcommax: 301w: populate AQR firmware name

Now that we have support for firmware loading via the kernel driver, it
makes sense to populate the firmware name as well, so if its present the
driver can load it.

In later patches, loading the FW via NVMEM will be added as well.

Signed-off-by: Robert Marko <robimarko@gmail.com>
10 months agomac80211: fix typo in getting path from board.json
Felix Fietkau [Fri, 26 Jan 2024 12:13:56 +0000 (13:13 +0100)]
mac80211: fix typo in getting path from board.json

Use json_get_vars in order to avoid getting bogus values when extra properties
are present

Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 months agobcm27xx: switch to bcm27xx-utils
Álvaro Fernández Rojas [Fri, 26 Jan 2024 08:52:35 +0000 (09:52 +0100)]
bcm27xx: switch to bcm27xx-utils

bcm27xx-userland is now deprecated and utils should be used instead.
https://github.com/raspberrypi/userland/commit/96a7334ae9d5fc9db7ac92e59852377df63f1848

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
10 months agokernel: 5.15: update Aquantia PHY driver to v6.1 code
Rafał Miłecki [Fri, 26 Jan 2024 05:19:42 +0000 (06:19 +0100)]
kernel: 5.15: update Aquantia PHY driver to v6.1 code

Backport few upstream changes included between v5.15 and v6.1.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
10 months agokernel: 5.15: backport v6.1 PHY changes required for Aquantia
Rafał Miłecki [Fri, 26 Jan 2024 05:35:27 +0000 (06:35 +0100)]
kernel: 5.15: backport v6.1 PHY changes required for Aquantia

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
10 months agoqualcommax: refresh 6.1 patches
Álvaro Fernández Rojas [Fri, 26 Jan 2024 09:19:40 +0000 (10:19 +0100)]
qualcommax: refresh 6.1 patches

Refresh patches for Linux 6.1 which no longer apply cleanly after
adding ipq4019 MDIO MDC rate fix pending patches.

Fixes: 53f338be43e0 ("generic: 6.1: add pending patch for ipq4019 MDIO MDC rate fix")
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
10 months agobcm27xx: add new bcm2712 subtarget
Marty Jones [Thu, 18 Jan 2024 14:52:22 +0000 (09:52 -0500)]
bcm27xx: add new bcm2712 subtarget

This patch adds support for Raspberry Pi 5.

Instead of using 16K pages like Raspberry Pi OS, OpenWrt uses 4K pages due to
incompatibilities with F2FS and other applications.
There are multiple RPi forum posts with different cases and users are forcing
kernel8.img to workaround them, which is the 64 bit kernel of the RPi 4.
However, this isn't possible in OpenWrt because we only ship one kernel and we
would have to add RPi 5 support to bcm2711 subtarget (RPi 4) for that
workaround to work in OpenWrt.

Specification:
- Processor Broadcom BCM2712 2.4GHz quad-core 64-bit Arm Cortex-A76 CPU,
  with cryptographic extension, 512KB L2 caches per core, 2048KB L3 cache
Features:
- VideoCore VII GPU, supports OpenGL ES 3.1, Vulkan 1.2
- Dual 4Kp60 HDMI display output with HDR support 4Kp60 HEVC decoder
- LPDDR4X-4267 SDRAM 4GB and 8GB
- Dual-band 802.11ac Wi-Fi
- Bluetooth 5.0 / Bluetooth Low Energy
- microSD card slot, with support for SDR104 high-speed mode
- 2 x USB 3.0 ports
- 2 x USB 2.0 ports
- Gigabit Ethernet
- 2 x 4 lane MIPI camera/display
- PCIe 2.0 x1
- 5V/5A power via USB-C
- Raspberry Pi standard 40-pin header
- Real-time clock RTC
- Power button

Build system: x86_64
Build-tested: bcm2712
Run-tested: bcm2712/RPi5

Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove device variant, improve description]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
10 months agolinux-firmware: add Raspberry Pi 5 NVRAM
Marty Jones [Tue, 7 Nov 2023 03:21:44 +0000 (22:21 -0500)]
linux-firmware: add Raspberry Pi 5 NVRAM

The RPi 5 expects the same NVRAM as the one from RPi 4 on a different file.

Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Reword commit description, add missing PKG_RELEASE bump]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
10 months agobcm27xx: update 6.1 patches to latest version
Marty Jones [Thu, 18 Jan 2024 21:23:52 +0000 (16:23 -0500)]
bcm27xx: update 6.1 patches to latest version

Add support for BCM2712 (Raspberry Pi 5).
https://github.com/raspberrypi/linux/commit/3bb5880ab3dd31f75c07c3c33bf29c5d469b28f3
Patches were generated from the diff between linux kernel branch linux-6.1.y
and rpi-6.1.y from raspberry pi kernel source:
- git format-patch linux-6.1.y...rpi-6.1.y

Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2710/RPi3B, bcm2711/RPi4B

Signed-off-by: Marty Jones <mj8263788@gmail.com>
[Remove applied and reverted patches, squash patches and config commits]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
10 months agoath79: add Ubiquiti Rocket M XW as alternate name to Bullet M XW
Lech Perczak [Sun, 21 Jan 2024 23:34:34 +0000 (00:34 +0100)]
ath79: add Ubiquiti Rocket M XW as alternate name to Bullet M XW

Ubiquiti Rocket M XW is a single-band, 2x2:2 external Wi-Fi AP, with optional
GPS receiver, with two external RP-SMA antenna connections, based on
AR9342 SoC. Two band variants exists, for 2.4GHz and 5GHz band, usable
with the same image.

Specs:
- CPU: Atheros AR9342 MIPS SoC at 535MHz
- RAM: 64MB DDR400
- ROM: 8MB SPI-NOR in SO16W package, MX25L6408E
- Wi-Fi Atheros AR9342 built-in 2x2:2 radio
- Ethernet: Atheros AR8035 PHY, limited to 100Mbps speeds due to
  magnetics
- Power: 24V passive PoE input.

Installation: please refer to Ubiquiti Bullet M2HP for documentation.

The device runs with exactly same image as the Bullet, and after fixes
in preceding commit, is fully functional again. Add the alternative name
to the build system.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
10 months agoath79: ubnt-bullet-m-xw: fix Ethernet PHY traffic
Lech Perczak [Sun, 21 Jan 2024 23:14:16 +0000 (00:14 +0100)]
ath79: ubnt-bullet-m-xw: fix Ethernet PHY traffic

Since commit 6f2e1b7485f0 ("ath79: disable delays on AT803X config init")
Ubiquiti XW boards equipped with AR8035 PHY suffered from lack of
outbound traffic on the Ethernet port. This was caused by the fact, the
U-boot has set this during boot and it wasn't reset by the PHY driver,
and the corresponding setting in device tree was wrong.

Set the 'phy-mode = "rgmii-txid"' at the &eth0, and drop this property
from PHY node, as it is not parsed there. This causes the device to
connect using Ethernet once again.

Fixes: db4b6535f837 ("ath79: Add support for Ubiquity Bullet M (XW)")
Fixes: 6f2e1b7485f0 ("ath79: disable delays on AT803X config init")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
10 months agoath79: ubnt-bullet-m-xw: set PHY max-speed to 100Mbps
Lech Perczak [Thu, 4 Jan 2024 00:22:26 +0000 (01:22 +0100)]
ath79: ubnt-bullet-m-xw: set PHY max-speed to 100Mbps

Onboard AR8035 PHY supports 1000Base-T operation, but onboard
Ethernet magnetics do not. Reduce advertised link speeds to 100Mbps and
lower.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
10 months agoipq807x: add support for loading Aquantia FW from NVMEM for NBG7815
Christian Marangi [Thu, 25 Jan 2024 21:20:27 +0000 (22:20 +0100)]
ipq807x: add support for loading Aquantia FW from NVMEM for NBG7815

Add support for loading Aquantia FW from NVMEM for Zyxel NBG7815
restoring correct functionality of the 10g port.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 months agogeneric: 6.1: add pending patch for ipq4019 MDIO MDC rate fix
Christian Marangi [Thu, 25 Jan 2024 20:42:49 +0000 (21:42 +0100)]
generic: 6.1: add pending patch for ipq4019 MDIO MDC rate fix

Add pending patch for ipq4019 MDIO MDC rate fix. The divisor was never
actually set resulting in the MDC rate running at a very low speed.

The same MDIO is used on ipq807x where Aquantia PHY are commonly used
where MDIO is used to load the PHY firmware. Running at higher speed is
required to make the firmware load faster as it does reduce load time
from 60+ second to 5-6 seconds.

Add as pending as upstream there seems to be some conflicts with quic
and me and it might take lots of time before this is effectively merged
upstream.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 months agohostapd: fail R0KH and R1KH derivation when wpa_psk_file is used
Rany Hany [Fri, 5 Jan 2024 17:01:40 +0000 (19:01 +0200)]
hostapd: fail R0KH and R1KH derivation when wpa_psk_file is used

When wpa_psk_file is used, there is a chance that no PSK is set. This means
that the FT key will be generated using only the mobility domain which
could be considered a security vulnerability but only for a very specific
and niche config.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
10 months agohostapd: fix 11r defaults when using SAE
Jesus Fernandez Manzano [Mon, 22 Jan 2024 12:52:18 +0000 (13:52 +0100)]
hostapd: fix 11r defaults when using SAE

When using WPA3-SAE or WPA2/WPA3 Personal Mixed, we can not use
ft_psk_generate_local because it will break FT for SAE. Instead
use the r0kh and r1kh configuration approach.

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.ai>
10 months agohostapd: fix 11r defaults when using WPA
Jesus Fernandez Manzano [Mon, 22 Jan 2024 12:46:14 +0000 (13:46 +0100)]
hostapd: fix 11r defaults when using WPA

802.11r can not be used when selecting WPA. It needs at least WPA2.

This is because 802.11r advertises FT support in-part through the
Authentication and Key Management (AKM) suites in the Robust
Security Network (RSN) Information Element, which was included in
the 802.11i amendment and WPA2 certification program.

Pre-standard WPA did not include the RSN IE, but the WPA IE.
This IE can not advertise the AKM suite for FT.

Signed-off-by: Jesus Fernandez Manzano <jesus.manzano@galgus.ai>
10 months agohostapd: remove obsolete function
Felix Fietkau [Thu, 25 Jan 2024 14:04:31 +0000 (15:04 +0100)]
hostapd: remove obsolete function

Leftover from authsae, which was removed a long time ago

Signed-off-by: Felix Fietkau <nbd@nbd.name>
10 months agolibtracefs: update to 1.8
Nick Hainke [Thu, 25 Jan 2024 15:23:07 +0000 (16:23 +0100)]
libtracefs: update to 1.8

Changes:
67f3b2a libtracefs: version 1.8
8a1322f libtracefs utest: Add tests to use mapping if supported
0a65b79 libtracefs: Add tracefs_mapped_is_supported() API
805f650 libtracefs: Call mmap ioctl if a refresh happens
cf7e2a5 libtracefs: Fix tracefs_mmap() kbuf usage
3a26b26 libtracefs: Have nonblock tracefs_cpu reads set errno EAGAIN
2b5bb09 libtracefs: Have tracefs_mmap_read() include subbuf meta data
dee0448 libtracefs: Have mapping work with the other tracefs_cpu* functions
28eebc1 libtracefs: Have tracefs_cpu_flush(_buf)() use mapping
065d914 libtracefs: Use mmapping for iterating raw events
1124e0e libtracefs: Use tracefs_cpu_*_buf() calls for iterator
f43b293 libtracefs: Unmap mmap mapping on tracefs_cpu close
0d24516 libtracefs Documentation: Fix tracefs_cpu_snapshot_open() man pages
5ff31c0 libtracefs Documentation: Add tracefs_follow_events_clear() to main man page
0c7d9f7 libtracefs: Add man pages for tracefs_snapshot_*() functions
b2dc3e0 libtracefs sql: Rename TIMESTAMP_USECS_DELTA to TIMESTAMP_DELTA_USECS
585ec77 libtracefs: Force off trace mmapping
2ed14b5 libtracefs: Add ring buffer memory mapping APIs
173ffc0 libtracefs meson: Add option to disable samples
a55e2e8 libtracefs meson: Add option to disable documentation
93e20af libtracefs: Fix tracefs_instance_reset to clear synthetic events
a1ecbff libtracefs utest: Add more tests to test tracefs_sql()
975c37c libtracefs utest: Add matches to trace_sql() tests
0567e2d libtracefs synthetic: Handle hashed name variables
fcb3a83 libtracefs synthetic: Remove multiple adding of action in tracefs_synth_save()
a9dae65 libtracefs: Fix sqlhist used uninitialized error
fe7a467 libtracefs: Add updating and reading snapshot buffers
1ad57ab libtracefs: Add PID filtering API
d8726bf libtracefs: Also clear max_graph_depth on reset
eb4dd60 libtracefs: Add TIMESTAMP_USECS_DELTA to simplify SQL timestamp compares
8c57eb4 libtracefs: Add tracefs_instance_set/get_subbuf_size()
9bafb21 libtracefs: Add API to extract ring buffer statistics
141d25e libtracefs: Add tracefs_load_headers() API
ef3fae7 libtracefs: Add kerneldoc comments to tracefs_instance_set_buffer_size()
31acfe1 libtracefs utest: Add test to test tracefs_instance_set/get_buffer_percent()
3e6d975 libtracefs: Add tracefs_instance_clear() API
c4efaaf libtracefs: Add tracefs_instance_get/set_buffer_percent()
1e1cc54 libtracefs: Add API to read tracefs_cpu and return a kbuffer
7d395b1 libtracefs: Add tracefs_instance_file_write_number()
e34cbd8 libtracefs: Increase splice to use pipe max size
1f50965 libtracefs: Add API to remove followers from an instance or toplevel
576ee0b libtracefs: Reset tracing before and after unit tests
118b694 libtracefs: Free dynamic event list in utest
5159973 libtracefs: Free tracing_dir in case of remount
df563eb libtracefs: Free buf in clear_func_filter()
3cbac37 libtracefs: Free "missed_followers" of instance
0cbe56e libtracefs testing: Use one tep handle for most tests
adac30f libtracefs Documentation: Fix tracefs_event_file_exists() issues
07ab199 libtracefs: Pass enum value where expected instead of int
bb299b4 libtracefs: fix cscope makefile rule
420d677 libtracefs: Free "followers" when freeing instance
3f436fc libtracefs: Fix documentation of tracefs_trace_pipe_stream() flags
1fde9df libtracefs: Add explicit pthread dependency to meson
d1989ae tracefs-perf: Add missing headers for syscall() and SYS_* defines

Signed-off-by: Nick Hainke <vincent@systemli.org>
10 months agolibtraceevent: update to 1.8.2
Nick Hainke [Thu, 25 Jan 2024 15:17:27 +0000 (16:17 +0100)]
libtraceevent: update to 1.8.2

Changelog:
6f6d580 libtraceevent: 1.8.2
b29b192 kbuffer: Update kbuf->next in kbuffer_refresh
4b2286c kbuffer: Always walk the events to calculate timestamp in kbuffer_read_buffer()
ce0acec libtraceevent meson: Add libdl dependency to meson
15a0121 libtraceevent Documentation: Fix tep_kbuffer() prototype
85a2078 libtraceevent: 1.8.1
6b21b4c libtraceevent: Add tep_get_sub_buffer_data_size()
8cf5315 libtraceevent: 1.8
7a4d5b2 kbuffer: Add kbuffer_refresh() API
33bad32 kbuffer: Add kbuffer_subbuffer() API
f6bdff7 kbuffer: Add kbuffer_dup()
0582118 kbuffer: Add kbuffer_read_buffer()
014ca24 libtraceevent: Fix tep_kbuffer() to have kbuf assign long_size
afead9a libtraceevent: Add tep_get_sub_buffer_commit_offset()
3152506 libtraceevent plugins: Parse sched_switch "prev_state" field for state info
4be92aa libtraceevent: Bump meson version to >=0.58.0
9b2e543 libtraceevent: sync state char array with the kernel
5b89385 libtraceevent: Add option to disable documentation
a496a39 libtraceevent: Add tep_record_is_event() API

Signed-off-by: Nick Hainke <vincent@systemli.org>
10 months agoiproute2: update to 6.7.0
Nick Hainke [Wed, 24 Jan 2024 12:45:27 +0000 (13:45 +0100)]
iproute2: update to 6.7.0

Release Notes:
https://lwn.net/Articles/957171/

Remove patch "100-configure.patch" because support for ATM was dropped [0].

Manually refresh:
- 200-drop_libbsd_dependency.patch

Automatic refresh:
- 130-no_netem_tipc_dcb_man_vdpa.patch
- 140-keep_libmnl_optional.patch
- 145-keep_libelf_optional.patch
- 150-keep_libcap_optional.patch
- 155-keep_tirpc_optional.patch
- 190-fix-nls-rpath-link.patch
- 300-selinux-configurable.patch

[0] - https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=a66a73af6db74fdb64439316c69aa0e35dd02c47

Signed-off-by: Nick Hainke <vincent@systemli.org>
10 months agotools/mkimage: update to 2024.01
Nick Hainke [Wed, 24 Jan 2024 12:26:31 +0000 (13:26 +0100)]
tools/mkimage: update to 2024.01

Update to latest version.

Refresh patch:
- 030-allow-to-use-different-magic.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
10 months agotools/cpio: update to 2.15
Nick Hainke [Wed, 24 Jan 2024 12:18:53 +0000 (13:18 +0100)]
tools/cpio: update to 2.15

Release Notes:
https://lists.gnu.org/archive/html/info-gnu/2024-01/msg00006.html

Signed-off-by: Nick Hainke <vincent@systemli.org>
10 months agobmips: bcm6368-enetsw: Bump max MTU
Linus Walleij [Wed, 24 Jan 2024 08:23:12 +0000 (09:23 +0100)]
bmips: bcm6368-enetsw: Bump max MTU

The safe max frame size for this ethernet switch is 1532 bytes,
excluding the DSA TAG and extra VLAN header, so the maximum
outgoing frame is 1542 bytes.

The available overhead is needed when using the DSA switch with
a cascaded Marvell DSA switch, which is something that exist in
real products, in this case the Inteno XG6846.

Use defines at the top of the size for max MTU so it is clear how
we think about this, add comments.

We need to adjust the RX buffer size to fit the new max frame size,
which is 1542 when the DSA tag (6 bytes) and VLAN header (4 extra
bytes) is added.

We also drop this default MTU:

  #define ENETSW_TAG_SIZE (6 + VLAN_HLEN)
  ndev->mtu = ETH_DATA_LEN + ENETSW_TAG_SIZE;

in favor of just:

  ndev->mtu = ETH_DATA_LEN;

I don't know why the default MTU is trying to second guess the
overhead required by DSA and VLAN but the framework will also
try to bump the MTU for e.g. DSA tags, and the VLAN overhead is
not supposed to be included in the MTU, so this is clearly not
right.

Before this patch (on the lan1 DSA port in this case):
dsa_slave_change_mtu: master->max_mtu = 9724, dev->max_mtu = 10218, DSA overhead = 8
dsa_slave_change_mtu: master = extsw, dev = lan1
dsa_slave_change_mtu: master->max_mtu = 1510, dev->max_mtu = 9724, DSA overhead = 6
dsa_slave_change_mtu: master = eth0, dev = extsw
dsa_slave_change_mtu new_master_mtu 1514 > mtu_limit 1510
mdio_mux-0.1:00: nonfatal error -34 setting MTU to 1500 on port 0

My added debug prints before the nonfatal error: the first switch from the top
is the Marvell switch, the second in the bcm6368-enetsw with its 1510 limit.

After this patch the error is gone.

OpenWrt adds a VLAN to each port so we get VLAN tags on all frames. On this
setup we even have 4 more bytes left after the two DSA tags and VLAN so
we can go all the way up to 1532 as MTU.

Testing the new 1532 MTU:

    eth0             ext1              enp7s0
 .--------.     .-----------.  cable  .------.
 | enetsw | <-> | mv88e6152 | <-----> | host |
 `--------´     `-----------´         `------´

On the router we set the max MTU for test:
ifconfig eth0 mtu 1520
ifconfig br-wan mtu 1520
ifconfig ext1 mtu 1506

An MTU of 1506 on ext1 is a logic consequence of the above setup:
this is the max bytes actually transferred. The framing added will be:

- 18 bytes standard ethernet header
- 4 bytes VLAN header
- 6 bytes DSA tag for enetsw
- 8 bytes DSA tag for mv88e6152

Sum: 1506 + 18 + 4 + 6 + 8 = 1542 which is out max frame size.

Test pinging from host:
ping -s 1478 -M do 192.168.1.220
PING 192.168.1.220 (192.168.1.220) 1478(1506) bytes of data.
1486 bytes from 192.168.1.220: icmp_seq=1 ttl=64 time=0.696 ms
1486 bytes from 192.168.1.220: icmp_seq=2 ttl=64 time=0.615 ms

Test pinging from router:
PING 192.168.1.2 (192.168.1.2): 1478 data bytes
1486 bytes from 192.168.1.2: seq=0 ttl=64 time=0.931 ms
1486 bytes from 192.168.1.2: seq=1 ttl=64 time=0.810 ms

The max IP packet without headers is 1478, the outgoing ICMP packet is
1506 bytes. Then the DSA, VLAN and ethernet overhead is added.

Let us verify the contents of the resulting ethernet frame of 1542 bytes.

Ping packet on router side as viewed with tcpdump:

00:54:51.900869 AF Unknown (1429722180), length 1538:
        0x0000:  3d93 bcae c56b a83d 8874 0300 0004 8100  =....k.=.t......
        0x0010:  0000 dada 0000 c020 0fff 0800 4500 05e2  ............E...
        0x0020:  0000 4000 4001 b0ec c0a8 0102 c0a8 01dc  ..@.@...........
        0x0030:  0800 7628 00c3 0001 f5da 1d65 0000 0000  ..v(.......e....
        0x0040:  ce65 0a00 0000 0000 1011 1213 1415 1617  .e..............
        0x0050:  1819 1a1b 1c1d 1e1f 2021 2223 2425 2627  .........!"#$%&'
        0x0060:  2829 2a2b 2c2d 2e2f 3031 3233 3435 3637  ()*+,-./0123456
(...)

- 3d93 = First four bytes are the last two bytes of the destination
  ethernet address I don't know why the first four are missing,
  but it sure explains why the paket is 1538 bytes and not 1542
  which is the actual max frame size.
- bcae c56b a83b = source ethernet address
- 8874 0300 0004 = Broadcom enetsw DSA tag
- 8100 0000 = VLAN 802.1Q header
- dada 0000 c020 0fff = EDSA tag for the Marvell (outer) switch,
- 0800 is the ethertype (part of the EDSA tag technically)
- Next follows the contents of the ping packet as it appears if
  we dump it on the DSA interface such as tcpdump -i lan1
  etc, there we get the stripped out packet, 1506 bytes.
- At the end 4 bytes of FCS.

This clearly illustrates that the DSA tag is included in the MTU
which we set up in Linux, but the VLAN tag and ethernet headers and
checksum is not.

Tested-by: Paul Donald <newtwen@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agolibxml2: update to 2.12.4
Nick Hainke [Wed, 24 Jan 2024 12:09:40 +0000 (13:09 +0100)]
libxml2: update to 2.12.4

Release Notes:
- https://gitlab.gnome.org/GNOME/libxml2/-/releases/v2.12.4

Signed-off-by: Nick Hainke <vincent@systemli.org>
11 months agoubox: update to Git HEAD (2024-01-24)
Christian Marangi [Wed, 24 Jan 2024 12:08:36 +0000 (13:08 +0100)]
ubox: update to Git HEAD (2024-01-24)

2c5887cb4688 kmodloader: fix invalid read outside mapped region

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agomediatek: drop NMBM layout for Xiaomi WR30U
Chuanhong Guo [Tue, 23 Jan 2024 11:20:47 +0000 (19:20 +0800)]
mediatek: drop NMBM layout for Xiaomi WR30U

This reverts commit dcdcfc15115a1038e90f21f5aa41726d9c7e2fe5.

This is a firmware for third-party u-boot mod, which should not
be carried here by us.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
11 months agorealtek: d-link dgs-1210-10p improve sfp support
Michel Thill [Sun, 7 Jan 2024 18:39:30 +0000 (19:39 +0100)]
realtek: d-link dgs-1210-10p improve sfp support

The current dts file of dgs-1210-10p doesn't support link states
for the sfp ports (they are always up).
This patch tries to give better support for this and was run tested
on dgs-1210-10p.

It was heavily inspired from Paul Fertser, RaylynnKnight
and the author of dgs-1210-10mp-f.dts

https://forum.openwrt.org/t/dlink-dgs-1210-10p-with-glc-t-co-sfp/170928

Signed-off-by: Michel Thill <jmthill@gmail.com>
11 months agoath79: fix mac address on eap2x5-1port devices
Nikolay Martynov [Sun, 21 Jan 2024 21:51:16 +0000 (16:51 -0500)]
ath79: fix mac address on eap2x5-1port devices

Commit e816591e226a ("ath79: qca: convert to nvmem-layout") mistakenly
switched the source of the mac address from the 'info' to 'art'
partition.

This patch updates all devices that share same 'parent' device tree file
and was tested to fix the problem for eap225-outdoor-v3 - device that I
actually own.

Fixes: e816591e226a ("ath79: qca: convert to nvmem-layout")
Signed-off-by: Nikolay Martynov <mar.kolya@gmail.com>
[amend commit message]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
11 months agowireguard-tools: avoid redundant jsonfilter calls
Jo-Philipp Wich [Tue, 23 Jan 2024 08:19:35 +0000 (09:19 +0100)]
wireguard-tools: avoid redundant jsonfilter calls

Use a single jsonfilter expression to yield the list of logical wireguard
interface names in shell compatible notation.

Supersedes: #12344
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
11 months agojsonfilter: update to Git HEAD (2024-01-23)
Jo-Philipp Wich [Tue, 23 Jan 2024 08:07:16 +0000 (09:07 +0100)]
jsonfilter: update to Git HEAD (2024-01-23)

013b75ab0598 jsonfilter: drop legacy json-c support
594cfa86469c main: fix spurious premature parse aborts in array mode

Fixes: https://bugs.openwrt.org/?task_id=3683
Fixes: https://github.com/openwrt/openwrt/issues/8703
Fixes: https://github.com/openwrt/openwrt/issues/11649
Fixes: https://github.com/openwrt/openwrt/issues/12344
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
11 months agolantiq: fix boot isues on danube boards
Aleksander Jan Bajkowski [Sun, 21 Jan 2024 18:02:33 +0000 (19:02 +0100)]
lantiq: fix boot isues on danube boards

Enabling SMP on Danube[1] is incompatible with a patch that
adds support for interrupt handling on all cores on other
platforms[2]. This patch fixes the mentioned issue.

1. 084c20f6c54180f2dc6b3efc1c5ba9b62afbaf26 ("lantiq: xway: kernel: enable SMP support ")
2. fbd33d61648ae8982fbada7ad3b6d8222b367ab5 ("lantiq: enable interrupts on second VPEs")

Fixes: #13934
Fixes: #14283
Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
11 months agoqualcommax: add SMP affinity script
Robert Marko [Tue, 9 Jan 2024 10:21:11 +0000 (11:21 +0100)]
qualcommax: add SMP affinity script

By default Linux will default to most IRQ-s being mapped to core 0 which
during high loads will completely swamp the core 0, so lets add the widely
used script that has been floating around forums for a long time to try and
optimize the IRQ mapping a bit.

Signed-off-by: Robert Marko <robimarko@gmail.com>
11 months agoscripts/rstrip.sh: ignore /lib/firmware
Felix Fietkau [Mon, 22 Jan 2024 12:00:41 +0000 (13:00 +0100)]
scripts/rstrip.sh: ignore /lib/firmware

On some platforms, some firmware files might look like executables.
These need to be ignored in order to avoid messing them up.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoramips: mt76x8: enable small_flash feature
Tomasz Maciej Nowak [Wed, 10 Jan 2024 15:59:48 +0000 (16:59 +0100)]
ramips: mt76x8: enable small_flash feature

Some of devices in this target have only 8 MiB space and are closing to
borders of usable space. Particularly, TP-Link RE305 v1 already suffers
from this issue[1], where with current partition layout, on release
images, there's not enough space for overlay. So activate small_flash
feature, which will remove some userspace hardening but will gain almost
1 MiB additional flash memory space. Here is small size comparison of
similar device (RE365 v1) with default config + LuCI:

kernel rootfs sysupgrade
current: 2305728 3635044 5964584
small_flash: 1713571 3320132 5047080

1. https://github.com/openwrt/openwrt/issues/14215

Suggested-by: Sander Vanheule <sander@svanheule.net>
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
11 months agofstools: update to Git HEAD (2024-01-22)
Christian Marangi [Mon, 22 Jan 2024 00:46:43 +0000 (01:46 +0100)]
fstools: update to Git HEAD (2024-01-22)

2171f6261556 libfstools: force mkfs when formatting overlay
08cd7083cac4 libfstools: fit: improve fit_volume_find string handling

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agoubox: update to Git HEAD (2024-01-22)
Christian Marangi [Mon, 22 Jan 2024 00:28:52 +0000 (01:28 +0100)]
ubox: update to Git HEAD (2024-01-22)

b2f6da671f7c kmodloader: Fix NULL pointer dereferences error
202d7c05029a kmodloader: fix memory leak in print_modinfo
6cf7d837ee7e kmodloader: fix TOCTOU problem with scan_builtin_modules

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agoipq806x: replace tsens patch with upstream version
Christian Marangi [Sun, 21 Jan 2024 21:42:54 +0000 (22:42 +0100)]
ipq806x: replace tsens patch with upstream version

Replace tsens patch with upstream version.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agoipq806x: renumber backport patches starting from 000
Christian Marangi [Sun, 21 Jan 2024 21:38:11 +0000 (22:38 +0100)]
ipq806x: renumber backport patches starting from 000

Renumber backport patches starting from 000 to tidy things up.
Also fix patch name format for the mmc backport patch.

Refresh patches affected by this renumber change.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agogeneric: 6.1: move stmmac backport fix patches to generic
Christian Marangi [Sun, 21 Jan 2024 21:07:31 +0000 (22:07 +0100)]
generic: 6.1: move stmmac backport fix patches to generic

Move stmmac backport fix patches from ipq806x to generic backport
directory as they got merged upstream and they fix wide performance
regression.

This will eventually cause performance increase on any user of the
stmmac driver.

Generic patch automatically refreshed with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agobcm27xx: drop unneeded github workflow and readme patches
Álvaro Fernández Rojas [Sun, 21 Jan 2024 12:39:33 +0000 (13:39 +0100)]
bcm27xx: drop unneeded github workflow and readme patches

These patches can be dropped since we don't care about RPi's Github CI and
READMEs.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agouboot-rockchip: Update to 2024.01
Tianling Shen [Wed, 10 Jan 2024 09:12:46 +0000 (17:12 +0800)]
uboot-rockchip: Update to 2024.01

Runtime tested on Orange Pi R1 Plus LTS and NanoPi R4S.

Removed upstreamed patches:
- 100-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus.patch
- 101-rockchip-rk3328-Add-support-for-Orange-Pi-R1-Plus-LT.patch
- 103-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch
- 104-rockchip-rk3568-Add-support-for-FriendlyARM-NanoPi-R.patch

Refreshed remaining patches.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agoarm-trusted-firmware-rockchip: Update to 2.10
Tianling Shen [Wed, 10 Jan 2024 09:10:13 +0000 (17:10 +0800)]
arm-trusted-firmware-rockchip: Update to 2.10

Runtime tested on Orange Pi R1 Plus LTS (RK3328) and NanoPi R4S (RK3399).

Changelog: https://trustedfirmware-a.readthedocs.io/en/v2.10/change-log.html

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agokernel: bump 6.1 to 6.1.74
John Audia [Sat, 20 Jan 2024 13:03:12 +0000 (08:03 -0500)]
kernel: bump 6.1 to 6.1.74

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.74

No patches needed a rebase/only updated source hash.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
11 months agoath79: generic: rework ar9342_ubnt_xw dtsi, and add support for Ubiquiti LiteBeam...
Samuele Longhi [Wed, 20 Dec 2023 18:27:15 +0000 (19:27 +0100)]
ath79: generic: rework ar9342_ubnt_xw dtsi, and add support for Ubiquiti LiteBeam M5 (XW), Ubiquiti AirGrid M5 HP (XW), Ubiquiti PowerBeam M5 300 (XW)

Add support for Ubiquiti LiteBeam M5 (XW).
The device was previously supported in ar71xx.
See commit: https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=d0988235dd277b9a832bbc4b2a100ac6e821f577

Add ALTX_MODEL for Ubiquiti AirGrid M5 HP (XW), Ubiquiti PowerBeam M5 300 (XW) in generic-ubnt.mk
This models are identical (firmware-wise) to the already supported Ubiquiti Nanostation Loco M (XW)

Add also Ubiquiti NanoBeam M5 to ALTX_MODEL of Ubiquiti Nanostation Loco M (XW) since it's another clone.

Tested on:
- Ubiquiti LiteBeam M5 (XW)
- Ubiquiti PowerBeam M5 (XW)

This also modify target/ath79/dts/ar9342_ubnt_xw.dtsi to use nvmem for calibration data
Checked that the caldata size in the eeprom partition are actually 0x440 on:
- Ubiquiti PowerBeam M5 (XW)
- Ubiquiti Nanostation M5 (XW)
- Ubiquiti LiteBeam M5 (XW)
- Ubiquiti AirGrid M5 HP (XW)

Signed-off-by: Samuele Longhi <agave@dracaena.it>
11 months agouboot-bcm53xx: bump to 2024.01
Linus Walleij [Fri, 19 Jan 2024 23:08:42 +0000 (00:08 +0100)]
uboot-bcm53xx: bump to 2024.01

Bump the U-Boot version used for BCM53xx to the 2024.01
version that includes all the needed patches upstream, so we
can get rid of those in the process.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
11 months agobusybox: switch to sha256 for passwd
Paul Spooren [Fri, 19 Jan 2024 10:49:27 +0000 (11:49 +0100)]
busybox: switch to sha256 for passwd

Right now sha256 is considered more secure than md5, use it to harden
against password decryption.

Signed-off-by: Paul Spooren <mail@aparcar.org>
11 months agobusybox: enable sha hash for /etc/shadow
Paul Spooren [Thu, 18 Jan 2024 15:25:34 +0000 (16:25 +0100)]
busybox: enable sha hash for /etc/shadow

It appears `md5` is no longer state of the art. Let's switch it to
something slightly newer to increase security.

Suggested-by: abnoeh <abnoeh@mail.com>
Signed-off-by: Paul Spooren <mail@aparcar.org>
11 months agoubox: update to Git HEAD (2024-01-15)
Christian Marangi [Fri, 19 Jan 2024 20:45:19 +0000 (21:45 +0100)]
ubox: update to Git HEAD (2024-01-15)

11cb29e15d68 kmodloader: remove unneeded uname() call
811ca6c2234a kmodloader: fix memory leak in scan_loaded_modules()
8c95fc7039cb kmodloader: support loadable module parameters in modinfo
4ffc29e4041c kmodloader: add basic support for builtin modules
ba3908351232 kmodloader: add modinfo support for builtin modules
c006dccecb6f kmodloader: cleanup duplicated mmap() code

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agomediatek: add support for JDCloud RE-CP-03
Tianling Shen [Wed, 1 Nov 2023 06:46:15 +0000 (14:46 +0800)]
mediatek: add support for JDCloud RE-CP-03

Hardware specification:
  SoC: MediaTek MT7986A 4x A53
  Flash: 128GB eMMC
  RAM: 1GB DDR4
  Ethernet: 4x 1GbE, 1x 2.5GbE (RTL8221B)
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, Joylink
  Power: DC 12V 2A

Flash instructions:
1. Download and flash the vendor migration firmware via webUI:
   https://firmware.download.immortalwrt.eu.org/cnsztl/mediatek/filogic/openwrt-mediatek-mt7986-jdcloud_re-cp-03-vendor-migration.bin
   (Default address is 192.168.68.1, user root, no password)
2. After device has booted up, write new GPT table:
   dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-gpt.bin of=/dev/mmcblk0 bs=512 seek=0 count=34 conv=fsync
3. Erase and write new BL2:
   echo 0 > /sys/block/mmcblk0boot0/force_ro
   dd if=/dev/zero of=/dev/mmcblk0boot0 bs=512 count=8192 conv=fsync
   dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-preloader.bin of=/dev/mmcblk0boot0 bs=512 conv=fsync
4. Erase and write new FIP:
   dd if=/dev/zero of=/dev/mmcblk0 bs=512 seek=13312 count=8192 conv=fsync
   dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-bl31-uboot.fip of=/dev/mmcblk0 bs=512 seek=13312 conv=fsync
5. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
6. Serve OpenWrt initramfs image using TFTP server.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt has booted, perform sysupgrade.
9. Additionally, if you want to have eMMC recovery boot feature:
     (Don't worry! You will always have TFTP recovery boot feature.)
   dd if=openwrt-mediatek-filogic-jdcloud_re-cp-03-initramfs-recovery.itb of=/dev/mmcblk0p4 bs=512 conv=fsync

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agouboot-mediatek: add support for JDCloud RE-CP-03
Tianling Shen [Wed, 1 Nov 2023 06:44:50 +0000 (14:44 +0800)]
uboot-mediatek: add support for JDCloud RE-CP-03

The vendor U-Boot has enabled signature verification, so add
a custom U-Boot build for OpenWrt.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
11 months agorockchip: fix boot from non-MMC devices
Justin Klaassen [Sat, 13 Jan 2024 20:28:57 +0000 (20:28 +0000)]
rockchip: fix boot from non-MMC devices

Booting from non-MMC devices on Rockchip targets without this
change results in a boot failure:

Model: FriendlyElec NanoPi R5S
Net:   eth0: ethernet@fe2a0000
Hit any key to stop autoboot:  0
** Booting bootflow 'nvme#0.blk#1.bootdev.part_1' with script
** No partition table - mmc 0 **
** No partition table - mmc 0 **
Couldn't find partition mmc 0:1
Can't set block device
Wrong Image Type for bootm command
ERROR -91: Protocol wrong type for socket: can't get kernel image!
Boot failed (err=1)

This change fixes the default boot script for Rockchip targets to
support booting from non-MMC devices such as NVMe or USB drives.

Some targets with only a boot rom (e.g. NanoPi R5S) may require u-boot
to be installed on the eMMC or a MicroSD card in order to boot from
non-MMC devices.

Fixes: #14420
Reviewed-by: Tianling Shen <cnsztl@immortalwrt.org>
Signed-off-by: Justin Klaassen <justin@tidylabs.app>
11 months agotoolchain: glibc: add --enable-stack-protector=all option for glibc
Cedric DOURLENT [Thu, 18 Jan 2024 09:17:21 +0000 (10:17 +0100)]
toolchain: glibc: add --enable-stack-protector=all option for glibc

Add missing configurition for glibc based on CONFIG_PKG_CC_STACKPROTECTOR_ALL

Signed-off-by: Cedric DOURLENT <cedric.dourlent@softathome.com>
11 months agobuild: add option for building with stack-protector-all
Cedric DOURLENT [Fri, 12 Jan 2024 08:23:46 +0000 (09:23 +0100)]
build: add option for building with stack-protector-all

The GCC option -fstack-protector-all is a security feature used to protect against stack-smashing attacks.
This option enhances the stack-smashing protection provided by -fstack-protector-strong.
-fstack-protector-all option applies stack protection to all functions, regardless of their characteristics.
While this offers the most comprehensive protection against stack-smashing attacks, it can significantly impact
the performance of the program because every function call includes additional checks for stack integrity.
This option can incur a performance penalty because of the extra checks added to every function call,
but it significantly enhances security, making it harder for attackers to exploit buffer overflows to execute arbitrary code.
It's particularly useful in scenarios where security is paramount and performance trade-offs are acceptable.

Signed-off-by: Cedric DOURLENT <cedric.dourlent@softathome.com>
11 months agokernel: bump 6.1 to 6.1.73
John Audia [Mon, 15 Jan 2024 19:39:17 +0000 (14:39 -0500)]
kernel: bump 6.1 to 6.1.73

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.73

Patch automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: x86/64/AMD Cezanne, filogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
11 months agokernel: bump 6.1 to 6.1.72
John Audia [Wed, 10 Jan 2024 20:54:42 +0000 (15:54 -0500)]
kernel: bump 6.1 to 6.1.72

Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.72

Manually rebased:
generic/hack-6.1/650-netfilter-add-xt_FLOWOFFLOAD-target.patch

All other patches automatically rebased.

Build system: x86/64
Build-tested: x86/64/AMD Cezanne
Run-tested: x86/64/AMD Cezanne

Signed-off-by: John Audia <therealgraysky@proton.me>
11 months agomediatek: fix WED + wifi reset
Felix Fietkau [Fri, 19 Jan 2024 13:48:05 +0000 (14:48 +0100)]
mediatek: fix WED + wifi reset

The WLAN + WED reset sequence relies on being able to receive interrupts from
the card, in order to synchronize individual steps with the firmware.
When WED is stopped, leave interrupts running and rely on the driver turning
off unwanted ones.
WED DMA also needs to be disabled before resetting.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agomt76: update to Git HEAD (2024-01-18)
Felix Fietkau [Thu, 18 Jan 2024 19:53:04 +0000 (20:53 +0100)]
mt76: update to Git HEAD (2024-01-18)

83e3947e2c52 linux-firmware: update firmware for MT7922 WiFi device
ddaa8cb6e81a linux-firmware: update firmware for MT7921 WiFi device
f83b1601cc10 linux-firmware: update firmware for MT7922 WiFi device
61d334ab0f33 linux-firmware: add firmware for MT7925
a7836e4c8a60 wifi: mt76: disable HW AMSDU when using fixed rate
a8571ebbcd95 wifi: mt76: check txs format before getting skb by pid
3d5890e2cab3 wifi: mt76: mt7915: fix error recovery with WED enabled
703c26d01197 wifi: mt76: mt7915: add locking for accessing mapped registers
f77188160441 wifi: mt76: mt7915: update mt798x_wmac_adie_patch_7976

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agohostapd: ACS: Fix typo in bw_40 frequency array
David Bauer [Thu, 18 Jan 2024 21:47:17 +0000 (22:47 +0100)]
hostapd: ACS: Fix typo in bw_40 frequency array

[Upstream Backport]

The range for the 5 GHz channel 118 was encoded with an incorrect
channel number.

Fixes: ed8e13decc71 (ACS: Extract bw40/80/160 freqs out of acs_usable_bwXXX_chan())
Signed-off-by: Michael Lee <michael-cy.lee@mediatek.com>
Signed-off-by: David Bauer <mail@david-bauer.net>
11 months agobcm27xx-utils: update to latest version
Álvaro Fernández Rojas [Thu, 18 Jan 2024 09:50:45 +0000 (10:50 +0100)]
bcm27xx-utils: update to latest version

Fixes build with GCC 13.
Disable LTO to fix build with CONFIG_USE_LTO.

Changelog:
e65f5ec eeptools: eepdump: init type before calling eepio_atom_start

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobcm27xx: config: update documentation links
Álvaro Fernández Rojas [Wed, 17 Jan 2024 09:39:37 +0000 (10:39 +0100)]
bcm27xx: config: update documentation links

The documentation links have changed and are no longer valid.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobcm27xx-utils: add new package
Álvaro Fernández Rojas [Tue, 16 Jan 2024 13:52:05 +0000 (14:52 +0100)]
bcm27xx-utils: add new package

The raspberypi/userland repository has been deprecated and the RPi tools have
been moved to the raspberrypi/utils repository.
https://github.com/raspberrypi/userland/commit/96a7334ae9d5fc9db7ac92e59852377df63f1848

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobmips: dts: remove unneeded cferom alias
Álvaro Fernández Rojas [Thu, 18 Jan 2024 07:57:43 +0000 (08:57 +0100)]
bmips: dts: remove unneeded cferom alias

This is no longer needed after nvmem-layout changes.
Same as 6f328dfe19 for NAND devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agokernel: bump 5.15 to 5.15.147
John Audia [Mon, 15 Jan 2024 20:25:53 +0000 (15:25 -0500)]
kernel: bump 5.15 to 5.15.147

Changelog: https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.147

Manually rebased:
generic/backport-5.15/005-v5.17-01-Kbuild-use-Wdeclaration-after-statement.patch

All other patches automatically rebased.

Build system: x86_64
Build-tested: ramips/tplink_archer-a6-v3
Run-tested: ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
11 months agokernel: ksmbd: only v2 leases handle the directory
Chen Minqiang [Tue, 16 Jan 2024 09:20:04 +0000 (17:20 +0800)]
kernel: ksmbd: only v2 leases handle the directory

This backport a fix for ksmbd.

Refer: https://github.com/namjaejeon/ksmbd/issues/469

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
11 months agomediatek: refresh patches-6.1
Daniel Golle [Wed, 17 Jan 2024 01:48:29 +0000 (01:48 +0000)]
mediatek: refresh patches-6.1

Refresh patches for Linux 6.1 which no longer apply cleanly after
adding patches to fix ethernet rx hang issue on MT7981/MT7986.

Fixes: ede34465de ("mediatek: fix ethernet rx hang issue on MT7981/MT7986")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agoramips: mt7621: convert Linksys devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 13:41:40 +0000 (21:41 +0800)]
ramips: mt7621: convert Linksys devices EEPROM to NVMEM format

-+-----------------------------+-
 |    Model   |       NIC      |
-+-----------------------------+-
 | EA6350 v4 | MT7603 + MT7613 |
-+-----------------------------+-
 | EA7300 v2 | MT7603 + MT7615 |
-+-----------------------------+-
 |  Others   |    MT7615 *2    |
-+-----------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoramips: mt7621: convert NETGEAR devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 13:24:41 +0000 (21:24 +0800)]
ramips: mt7621: convert NETGEAR devices EEPROM to NVMEM format

-+------------------------------+-
 |    Model   |       NIC       |
-+------------------------------+-
 | chj series | MT7603 + MT7615 |
-+------------------------------+-
 | bzv series |    MT7615 *2    |
-+------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoramips: mt7621: convert Wavlink devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 13:03:42 +0000 (21:03 +0800)]
ramips: mt7621: convert Wavlink devices EEPROM to NVMEM format

-+------------------------------+-
 |    Model   |       NIC       |
-+------------------------------+-
 | WL-WN531A6 | MT7603 + MT7615 |
-+------------------------------+-
 | WL-WN533A8 |    MT7615 *2    |
-+------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoramips: mt7621: convert Ubiquiti devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 12:57:35 +0000 (20:57 +0800)]
ramips: mt7621: convert Ubiquiti devices EEPROM to NVMEM format

-+-------------------------+-
 | Model |       NIC       |
-+-------------------------+-
 | All   | MT7603 + MT7615 |
-+-------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoramips: mt7621: convert I-O DATA devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 12:42:59 +0000 (20:42 +0800)]
ramips: mt7621: convert I-O DATA devices EEPROM to NVMEM format

-+-------------------------------------------+-
 |          Model          |       NIC       |
-+-------------------------------------------+-
 | WN-DX1167R/WN-AX1167GR2 |     MT7615D     |
-+-------------------------------------------+-
 | WN-AX2033GR/WN-DX2033GR | MT7603 + MT7615 |
-+-------------------------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoramips: mt7621: convert Xiaomi devices EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 12:21:35 +0000 (20:21 +0800)]
ramips: mt7621: convert Xiaomi devices EEPROM to NVMEM format

-+---------------------------+-
 |  Model  |       NIC       |
-+---------------------------+-
 | AC2100  | MT7603 + MT7615 |
-+---------------------------+-
 | MI4A V2 | MT7603 + MT7613 |
-+---------------------------+-
 | Others  | MT7603 + MT7612 |
-+---------------------------+-

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agoramips: mt7621: convert MT7915 EEPROM to NVMEM format
Shiji Yang [Tue, 16 Jan 2024 11:56:05 +0000 (19:56 +0800)]
ramips: mt7621: convert MT7915 EEPROM to NVMEM format

Some MT7915 calibration data consists of two parts. The first part
"eeprom" size is 0xe00. The second part "precal" size is 0x19c10.

Though some devices may not have precal data, it's better to assume
that precal data exists as no users/developers confirm it. On the
other hand, some devices definitely do not contain precal data
because the EEPROM partition size is smaller than the precal NVMEM
cell size.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
11 months agouqmi: update to git HEAD
Daniel Golle [Tue, 16 Jan 2024 22:22:17 +0000 (22:22 +0000)]
uqmi: update to git HEAD

c3488b8 uqmi: cancel all requests on SYNC indication reception
dfa612e uqmi: improve response detection

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agomediatek: fix ethernet rx hang issue on MT7981/MT7986
Felix Fietkau [Tue, 16 Jan 2024 18:29:52 +0000 (19:29 +0100)]
mediatek: fix ethernet rx hang issue on MT7981/MT7986

Add patches by Lorenzo/Daniel to use QDMA instead of ADMAv2

Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 months agoipq806x: DTS format fixup for Fortinet FAP-421E
Christian Marangi [Tue, 16 Jan 2024 14:53:16 +0000 (15:53 +0100)]
ipq806x: DTS format fixup for Fortinet FAP-421E

Small clanup and fixup for DTS format for Fortinet FAP-421E.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 months agobcm27xx-gpu-fw: update to latest version
Álvaro Fernández Rojas [Tue, 16 Jan 2024 10:58:01 +0000 (11:58 +0100)]
bcm27xx-gpu-fw: update to latest version

raspberrypi/firmware is about 40G, so getting the full history log isn't an
option.
There have been multiple improvements and also support for the RPi 5 has been
added.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobcm27xx-userland: update to latest version
Marty Jones [Mon, 25 Dec 2023 00:03:31 +0000 (19:03 -0500)]
bcm27xx-userland: update to latest version

This is the last update for bcm27xx-userland as it has been
deprecated but funcional up to raspberry pi 5.

96a7334 README: Update to make it clear that most code in this repo is deprecated
3c97f76 userland: dtoverlay: /boot/firmware is a valid path
153a235 Assorted clang static analysis fixes
eca070c bcm_host: Update kms/fkms check for pi5
06a7618 dtoverlay: Support bcm2712 as a platform
0489c07 dtoverlay: Add dtoverlay_first/next_subnode
a1c7f81 dtoverlay: Support literal assignments of path strings
44a3953 raspivid: Also flush PTS file if flush is enabled
cc1ca18 userland: dtoverlay: Use os_prefix if set
9d5250f libfdt: Add null-ptr check for prop-data to resolve clang --analyzer warning
50527c6 mmal: Only include Videocore components if not running on Videocore
df245ea tvservice: Update unsupported message to recommend kmsprint
de0cfe8 dtoverlay: Fix clang warnings
0182f05 dtoverlay: Fix various compiler warnings
2a6306b dtoverlay: Fix path rebasing and exports
d1e92d7 dtoverlay: Add support for string escape sequences
b1ee39e gencmd: Add a fallback to mailbox interface if vchiq is not available
54fd97a hello_pi: Fix some build issues

Signed-off-by: Marty Jones <mj8263788@gmail.com>
11 months agolayerscape: refresh patches-6.1
Daniel Golle [Tue, 16 Jan 2024 13:41:06 +0000 (13:41 +0000)]
layerscape: refresh patches-6.1

Patches no longer cleanly apply after commit c2c741ccce ("generic:
6.1: initial backport of at803x PHY driver cleanup"). Refresh patches
to address that.

Fixes: c2c741ccce ("generic: 6.1: initial backport of at803x PHY driver cleanup")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
11 months agobmips: drop patches/config for kernel 5.15
Álvaro Fernández Rojas [Tue, 16 Jan 2024 10:04:29 +0000 (11:04 +0100)]
bmips: drop patches/config for kernel 5.15

Drop patches/config for kernel 5.15 now that they are not used anymore.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobmips: move to kernel 6.1 by default
Álvaro Fernández Rojas [Tue, 16 Jan 2024 10:02:01 +0000 (11:02 +0100)]
bmips: move to kernel 6.1 by default

Move bmips to kernel 6.1 by default.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobmips: dts: remove unneeded cfe alias
Álvaro Fernández Rojas [Tue, 16 Jan 2024 09:59:47 +0000 (10:59 +0100)]
bmips: dts: remove unneeded cfe alias

This is no longer needed after nvmem-layout changes.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
11 months agobmips: bcm6328: add Innacomm W3400V6
Sieng-Piaw Liew [Wed, 9 Aug 2023 05:13:57 +0000 (13:13 +0800)]
bmips: bcm6328: add Innacomm W3400V6
Innacomm W3400V6 is an xDSL B/G wireless router based on Broadcom
BCM6328 SoC.

SoC: Broadcom BCM6328
CPU: BMIPS4350 V8.0, 320 MHz, 1 core
Flash: SPI-NOR 8MB, MX25L6406E
RAM: 64 MB
Ethernet: 4x 10/100 Mbps
Switch: Integrated
Wireless: 802.11b/g, BCM4312
LEDs/Buttons: 9x / 2x

Flash instruction, web UI:
1. Set a static IP on your computer compatible with 192.168.1.1, i.e
192.168.1.100.
2. Connect the ethernet cable from your computer to the router.
3. Make sure the router is powered off.
4. Press the reset button, don't release it yet!
5. While pressing reset, power on the router.
6. Wait 10 seconds or more.
Note: The power LED is red at first then turns to solid green when
ready.
7. Release the reset button.
8. Browse to 192.168.1.1
9. Select .bin file.
10. Upgrade the image.
11. Wait for it to reboot.

Signed-off-by: Sieng-Piaw Liew <liew.s.piaw@gmail.com>
[Fix cfe nvmem-layout and pinctrl_leds indentation]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>