openwrt/openwrt.git
9 days agoipq806x: rt4230w-rev6: fix status reporting via the LEDs openwrt-23.05
Rodrigo Balerdi [Fri, 10 May 2024 06:35:43 +0000 (03:35 -0300)]
ipq806x: rt4230w-rev6: fix status reporting via the LEDs

There is a custom LED controller between the 3 SoC GPIO outputs and
the red and blue LEDs of the device. It implements a strange mapping
that includes fixed, flashing, and breathing modes.

The current DTS configuration causes OpenWrt to flash the LEDs over
the controller's own flashing, resulting in chaotic output in boot,
failsafe, and upgrade modes.

This change fixes the LEDs in the best way possible as long as each
OpenWrt running state is limited to be signaled by a single led.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15440
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 0868268c9fd4397411e9629eedda35b1547e798e)

9 days agolibxml2: update to 2.12.5
Nick Hainke [Mon, 12 Feb 2024 22:48:46 +0000 (23:48 +0100)]
libxml2: update to 2.12.5

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

Fixes: CVE-2024-25062
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit c47b7571f0f874c746c5823f5e4d0f1b9b932697)

9 days 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>
(cherry picked from commit d82930c7c776d974e717ec958ca0c1019fea3b8f)

9 days agolibxml2: update to 2.12.3
Nick Hainke [Wed, 3 Jan 2024 23:30:57 +0000 (00:30 +0100)]
libxml2: update to 2.12.3

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

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

9 days agolibxml2: update to 2.12.1
Nick Hainke [Mon, 4 Dec 2023 16:03:21 +0000 (17:03 +0100)]
libxml2: update to 2.12.1

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

Remove patch:
- 010-iconv.patch

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

9 days agolibxml2: update to 2.11.6
Nick Hainke [Thu, 12 Oct 2023 04:23:02 +0000 (06:23 +0200)]
libxml2: update to 2.11.6

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

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

9 days agomediatek: add support for Cudy TR3000 v1
Luis Mita [Tue, 7 May 2024 15:48:37 +0000 (11:48 -0400)]
mediatek: add support for Cudy TR3000 v1

Hardware:
 - SoC: MediaTek MT7981B
 - CPU: 2x 1.3 GHz Cortex-A53
 - Flash: 128 MiB SPI NAND
 - RAM: 512 MiB
 - WLAN: 2.4 GHz, 5 GHz (MediaTek MT7976CN, 802.11ax)
 - Ethernet: 1x 10/100/1000/2500 Mbps RTL8221B WAN, 1x10/100/1000 Mbps MT7981 LAN
 - USB 3.0 port
 - Buttons: 1 Reset button, 1 slider button
 - LEDs: 1x Red, 1x White
 - Serial console: internal test points, 115200 8n1
 - Power: 5 VDC, 3 A

MAC addresses:
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| WAN     | 80:af:ca:xx:xx:x1 | label+1   |
| LAN     | 80:af:ca:xx:xx:x0 | label     |
| WLAN 2g | 80:af:ca:xx:xx:x0 | label     |
| WLAN 5g | 82:af:ca:xx:xx:x0 |           |
+---------+-------------------+-----------+

Installation:
The installation must be done via TFTP by disassembling the router. On other occasions Cudy has distributed intermediate firmware to make installation easier, and so I recommend checking the Wiki for this device if there is a more convenient solution than the one below.

To install using TFTP:
1. Connect to UART.
2. With the router off, press the RESET button. While the router is turning on, the button should continue to be pressed for at least 5 seconds.
3. A u-boot shell will automatically open.
4. Connect to LAN and set your IP to 192.168.1.88/24. Configure a TFTP server and an OpenWrt initramfs-kernel.bin firmware file.
5. Run these steps in u-boot using the name of your file.

setenv bootfile initramfs-kernel.bin
tftpboot
bootm

6. If you can reach LuCI or SSH now, just use the sysupgrade image with the 'Keep settings' option turned off.

Signed-off-by: Luis Mita <luis@luismita.com>
(cherry picked from commit 63b8d98dd0d2f7797ea5b5f25978590982bbbb5d)

9 days agomediatek: fix sysupgrade error for WR30U
Hank Moretti [Mon, 28 Aug 2023 15:45:05 +0000 (15:45 +0000)]
mediatek: fix sysupgrade error for WR30U

The NMBM-Enabled layout did not use fit image,
it just need default process. So it was been removed in platform.sh.

It will fix sysupgrade error for xiaomi,mi-router-wr30u-112m-nmbm.

Signed-off-by: Hank Moretti <mchank9999@gmail.com>
(cherry picked from commit 02214ab8dce59ee6b599f8dfdacb0297dc5dcc24)

9 days 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>
(cherry picked from commit 1b7e62b20b1735fcdc498a35e005afcd775abcf4)

9 days agomediatek: filogic: add support for Xiaomi AX3000T
Dim Fish [Mon, 27 Nov 2023 09:01:34 +0000 (12:01 +0300)]
mediatek: filogic: add support for Xiaomi AX3000T

  **SoC**: MediaTek MT7981B 2x A53
  **Flash**: ESMT F50L1G41LB 128MB
  **RAM**: NT52B128M16JR-FL 256MB
  **Ethernet**: 4x 10/100/1000 Mbps
  **Switch**: MediaTek MT7531AE
  **WiFi**: MediaTek MT7976C
  **Buttons**: Reset, Mesh
  **Power**: DC 12V 1A

1. Get ssh access. Supported stock firmware **1.0.47**
   ```
   curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=*******/api/misystem/arn_switch" -d "open=1&model=1&level=%0Anvram%20set%20ssh_en%3D1%0A"
   curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=*******/api/misystem/arn_switch" -d "open=1&model=1&level=%0Anvram%20commit%0A"
   curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=*******/api/misystem/arn_switch" -d "open=1&model=1&level=%0Ased%20-i%20's%2Fchannel%3D.*%2Fchannel%3D%22debug%22%2Fg'%20%2Fetc%2Finit.d%2Fdropbear%0A"
   curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=*******/api/misystem/arn_switch" -d "open=1&model=1&level=%0A%2Fetc%2Finit.d%2Fdropbear%20start%0A"
   curl -X POST "http://192.168.31.1/cgi-bin/luci/;stok=********/api/misystem/arn_switch" -d "open=1&model=1&level=%0Apasswd%20-d%20root%0A
   ```

2. Backup stock partitions
   ```
   nanddump -f /tmp/BL2.bin /dev/mtd1
   nanddump -f /tmp/Nvram.bin /dev/mtd2
   nanddump -f /tmp/Bdata.bin /dev/mtd3
   nanddump -f /tmp/Factory.bin /dev/mtd4
   nanddump -f /tmp/FIP.bin /dev/mtd5
   nanddump -f /tmp/ubi.bin /dev/mtd8
   nanddump -f /tmp/KF.bin /dev/mtd12
   ```
   Then transfer them to your computer in a safe place.

3. Get firmware information `cat /proc/cmdline`

4. Copy openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-initramfs-factory.ubi to **/tmp** and flash
   If **firmware=0**
   ```
   ubiformat /dev/mtd9 -y -f /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-initramfs-factory.ubi
   nvram set boot_wait=on
   nvram set uart_en=1
   nvram set flag_boot_rootfs=1
   nvram set flag_last_success=1
   nvram set flag_boot_success=1
   nvram set flag_try_sys1_failed=0
   nvram set flag_try_sys2_failed=0
   nvram commit
   reboot
   ```
   If **firmware=1**
   ```
   ubiformat /dev/mtd8 -y -f /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-initramfs-factory.ubi
   nvram set boot_wait=on
   nvram set uart_en=1
   nvram set flag_boot_rootfs=0
   nvram set flag_last_success=0
   nvram set flag_boot_success=1
   nvram set flag_try_sys1_failed=0
   nvram set flag_try_sys2_failed=0
   nvram commit
   reboot
   ```

   Then reboot your router, it should boot to the OpenWrt initramfs system now.

5. Flash openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-squashfs-sysupgrade.bin
   `sysupgrade -n /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-squashfs-sysupgrade.bin`

1. Flash openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb
   `ubiformat /dev/mtd8 -y -f /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb`

   `reboot`

2. Install kmod-mtd-rw
   `opkg update && opkg install kmod-mtd-rw`

   `insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1`

3. Format ubi and create new ubootenv volume
   ```
   ubidetach -p /dev/mtd8; ubiformat /dev/mtd8 -y; ubiattach -p /dev/mtd8
   ubimkvol /dev/ubi0 -n 0 -N ubootenv -s 128KiB
   ubimkvol /dev/ubi0 -n 1 -N ubootenv2 -s 128KiB
   ```

4. *(Optional **-10Mb** free space) Add recovery boot feature.*
   ```
   ubimkvol /dev/ubi0 -n 2 -N recovery -s 10MiB
   ubiupdatevol /dev/ubi0_2 /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb
   ```

5. Flash Openwrt U-Boot
   ```
   mtd write /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-preloader.bin BL2
   mtd write /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-bl31-uboot.fip FIP
   ```

6. Flash openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-squashfs-sysupgrade.itb
   `sysupgrade -n /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-squashfs-sysupgrade.itb`

1. Force flash openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb
   `sysupgrade -F -n /tmp/openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb`

2. Format ubi and Nvram
   ```
   ubidetach -p /dev/mtd8; ubiformat /dev/mtd8 -y; ubiattach -p /dev/mtd8
   mtd erase Nvram
   ```

3. Install kmod-mtd-rw
   `opkg update && opkg install kmod-mtd-rw`

   `insmod /lib/modules/$(uname -r)/mtd-rw.ko i_want_a_brick=1`

4. Flash stock images from backup
   ```
   mtd write /tmp/BL2.bin BL2
   mtd write /tmp/FIP.bin FIP
   mtd write /tmp/ubi.bin ubi
   ```
   Then reboot your router, waiting it finished rollback in minutes.

   `ubiformat /dev/mtd7 -y -f /tmp/ubi.bin`
   Then reboot your router, waiting it finished rollback in minutes.

Signed-off-by: Dim Fish <dimfish@gmail.com>
(cherry picked from commit 7dbcc1215a56cc1da68c81bf92d7efa174c5e051)

9 days agomediatek: filogic: fix failsafe mode on devices with no lan1
Paul Geraedts [Sat, 24 Feb 2024 08:01:01 +0000 (09:01 +0100)]
mediatek: filogic: fix failsafe mode on devices with no lan1

Default to lan4 port, instead of (missing) lan1 port,
to fix failsafe mode on Xiaomi AX3000T, WR30U, AX6000

Build system: x86/64
Build-tested: mediatek/filogic/xiaomi_mi-router-ax3000t-ubootmod
Run-tested: mediatek/filogic/xiaomi_mi-router-ax3000t-ubootmod

Signed-off-by: Paul Geraedts <p.f.j.geraedts@gmail.com>
(cherry picked from commit 8256d06933e7542ecdd427b6a0ef4e87bb37d3f4)

9 days agowifi-scripts: fix creation of IBSS in legacy (non-HT) mode
Alexandru Gagniuc [Wed, 3 Apr 2024 19:32:08 +0000 (14:32 -0500)]
wifi-scripts: fix creation of IBSS in legacy (non-HT) mode

When an IBBS interface is configured for IBSS legacy mode, wdev.htmode
is empty. This is empty string results in an empty positional argument
to the "ibbs join" command, for example:

    iw dev phy0-ibss0 ibss join crymesh 2412 '' fixed-freq beacon-interval 100

This empty argument is interpreted as an invalid HT mode by 'iw',
causing the entire command to fail and print a "usage" message:

    daemon.notice netifd: radio0 (4527): Usage:    iw [options] \
        dev <devname> ibss join <SSID> <freq in MHz> ...

Although nobody will ever need more than 640K of IBSS, explicitly use
"NOHT" if an HT mode is not given. This fixes the problem.

Fixes: e56c5f7b276a ("hostapd: add ucode support, use ucode for the main ubus object")
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name> [extend to cover more cases]
(cherry picked from commit cee9fcdb7350911f474544189817d25fd4070111)

9 days agomediatek: fix broken PCIe caused by update to 5.15.158
Rany Hany [Sun, 5 May 2024 22:39:58 +0000 (01:39 +0300)]
mediatek: fix broken PCIe caused by update to 5.15.158

The patch "710-pci-pcie-mediatek-add-support-for-coherent-DMA.patch"
makes use of "syscon_regmap_lookup_by_phandle" which requires that
"syscon" be in the compatible list.

Without this patch, PCIe probe will fail with the following error:

[    1.287467] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges:
[    1.294019] mtk-pcie 1a143000.pcie: Parsing ranges property...
[    1.299901] mtk-pcie 1a143000.pcie:      MEM 0x0020000000..0x0027ffffff -> 0x0020000000
[    1.307954] mtk-pcie 1a143000.pcie: missing hifsys node
[    1.313185] mtk-pcie: probe of 1a143000.pcie failed with error -22

Fixes: 01c58a0d2a ("kernel: bump 5.15 to 5.15.158")
Signed-off-by: Rany Hany <rany_hany@riseup.net>
(cherry picked from commit 8607372b410fbb24b08de97ff5941341d0870d6f)

10 days agotools: refresh all patches
Christian Marangi [Wed, 22 May 2024 10:41:10 +0000 (12:41 +0200)]
tools: refresh all patches

Refresh all tools patches now that tools/refresh correctly works.

CI now checks for them and actively complain if tools have unrefreshed
patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 days agoquilt.mk: don't error on refresh/update if patches doesn't exist
Christian Marangi [Mon, 25 Sep 2023 00:29:31 +0000 (02:29 +0200)]
quilt.mk: don't error on refresh/update if patches doesn't exist

The current code fails if we have package or host tools with no patches
to apply. The error printend is the following: (taking ubus as an
example)

make[2]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt/scripts/config'
make[2]: 'conf' is up to date.
make[2]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt/scripts/config'
make[1]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt'
make[2]: Entering directory '/home/ansuel/openwrt-ansuel/openwrt/package/system/ubus'
The source directory contains no quilt patches.
make[2]: *** [Makefile:81: quilt-check] Error 1
make[2]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt/package/system/ubus'
time: package/system/ubus/refresh#0.06#0.00#0.07
    ERROR: package/system/ubus failed to build.
make[1]: *** [package/Makefile:120: package/system/ubus/refresh] Error 1
make[1]: Leaving directory '/home/ansuel/openwrt-ansuel/openwrt'
make: *** [/home/ansuel/openwrt-ansuel/openwrt/include/toplevel.mk:232: package/ubus/refresh] Error 2

We exit 1 after saying that there are no patches because later in the
function quilt pop fails to execute.

Having no patches for a package and calling refresh should not be
a critical error and the function should just do nothing.

To handle this improve quilt.mk with the following addition.
- If we don't have any patch for the package, we print a warning and we
  create an empty series. This is useful to trick quilt and make it do
  nothing.
  We also create a status file .quilt_no_patch to detect in the other
  function that we don't have patches to handle.
- In refresh makefile target, we check if .quilt_no_patch exist and
  we skip quilt cleanup if this exist.
- In RefreshDir function we change the logic and now we delete the
  patches directory and not only the content. This is done as a cleanup
  to clean case with empty patches directory.
- In RefreshDir we check if .quilt_no_patch exist and we skip creating
  the patches directory and copying the refreshed patches.
- In RefreshDir we delete at the end any trace of .quilt_no_patch if
  present.

This is needed to support run like package/refresh that will run the
refresh process on any package present in the buildroot.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 9536446965e853231e34c4e5dc4cf13f838b9e90)

10 days agoquilt.mk: use CURDIR instead of ./ for PATCH_DIR and FILES_DIR
Christian Marangi [Mon, 25 Sep 2023 00:26:43 +0000 (02:26 +0200)]
quilt.mk: use CURDIR instead of ./ for PATCH_DIR and FILES_DIR

To better reference them for diagnostic use, reference the PATCH_DIR and
FILES_DIR with the absolute path instead of using ./ and reference by
the relative location.

No behaviour change intended.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit bb1bfb46020b38179ef97d30333c90ab00b71c97)

10 days agotools/padjffs2: use Host/Prepare/Default instead of raw commands
Christian Marangi [Wed, 22 May 2024 09:56:45 +0000 (11:56 +0200)]
tools/padjffs2: use Host/Prepare/Default instead of raw commands

Now that Host/Prepare/Default is always defined, we can use that instead
of using raw commands to move files from the src directory to
HOST_BUILD_DIR.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 01048c7456785bc4a45452c84d8f31635e1fa60b)

10 days agotools/missing-macros: install files from HOST_BUILD_DIR instead of src
Christian Marangi [Wed, 22 May 2024 09:53:52 +0000 (11:53 +0200)]
tools/missing-macros: install files from HOST_BUILD_DIR instead of src

Install files from HOST_BUILD_DIR instead of src. These files are now
correctly copied to HOST_BUILD_DIR and can be referenced from there.

(cherry picked from commit 46bcbe42236bbe058eaeb89a0d1a4f22926cfdf9)
[ rebased on top of openwrt-23.05 ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
10 days agohost-build: always define Host/Prepare/Default
Christian Marangi [Wed, 22 May 2024 09:38:49 +0000 (11:38 +0200)]
host-build: always define Host/Prepare/Default

We currently skip defining Host/Prepare/Default if HOST_UNPACK is not
defined.

This is mostly the case for Host packages that just provide files with
the src directory and don't need to be downloaded/extracted.

This was probably done lots of times ago due to quilt causing error as
the patches directory wasn't present.
This has changed now and quilt can correctly detect if no patches needs
to be applied (instead of terminating with error)

Always define Host/Prepare/Default to make tools/refresh correctly works
as HOST_QUILT is hardcoded enabled for this make target and will
complain for tool not prepared for quilt patches.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 725389b7c745b0fa68426986c9bca14171f16887)

13 days agowireless-regdb: update to 2024.05.08
Yuu Toriyama [Sat, 18 May 2024 22:08:37 +0000 (07:08 +0900)]
wireless-regdb: update to 2024.05.08

Changes:
  73529a8 Revert "wireless-regdb: Update and disable 5470-5730MHz band according to TPC requirement for Singapore (SG)"
  87941e4 wireless-regdb: Update regulatory rules for Taiwan (TW) on 6GHz
  33797ae wireless-regdb: update regulatory database based on preceding changes

Signed-off-by: Yuu Toriyama <PascalCoffeeLake@gmail.com>
(cherry picked from commit 65c1f0d433e89c794a6d22dbe474666c241f9e7b)

2 weeks agomt76: fix mt7603 compilation
Rafał Miłecki [Sat, 18 May 2024 12:56:58 +0000 (14:56 +0200)]
mt76: fix mt7603 compilation

This fixes:
mt7603/dma.c: In function 'mt7603_rx_loopback_skb':
mt7603/dma.c:60:17: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

Fixes: 2568b30285ff ("mt76: backport mt7603 fixes important for its stability")
Fixes: https://github.com/openwrt/openwrt/issues/15510
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 weeks agoipq806x: mr42/mr52: fix PCIe ports
Robert Marko [Thu, 16 May 2024 10:03:19 +0000 (12:03 +0200)]
ipq806x: mr42/mr52: fix PCIe ports

All three PCIe ports are reported non working on Meraki MR42/MR52 boards
since kernel 6.1 with the issue of PCIe PHY link never coming up thus
no WLAN cards are available on the boards.

After debugging it seems that PCIe worked on 5.15 and older purely by
accident as device DTS was using /delete-property/ perst-gpios; in each
of the 3 PCIe nodes but there was no "perst-gpios" property in the SoC DTSI
as it was still using the older "perst-gpio" property so it was not getting
removed from the device DTS.

However, in kernel 6.1 commit ("ARM: dts: qcom-*: replace deprecated
perst-gpio with perst-gpios") updated all Qualcomm DTS-es to use the newer
"perst-gpios" and thus once ipq806x moved to 6.1 PCIe stopped working as
now that property was being dropped from the device DTS.

So, since the removal of PERST pins seems to have been wrong from the start
lets drop the property removal from MR42/MR52.

Fixes: #15408
Link: https://github.com/openwrt/openwrt/pull/15509
Link: https://github.com/openwrt/openwrt/pull/15512
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agomt76: backport mt7603 fixes important for its stability
Rafał Miłecki [Thu, 16 May 2024 12:11:24 +0000 (14:11 +0200)]
mt76: backport mt7603 fixes important for its stability

Those are required for stable MT7603E & on-SoC MT7628/MT7688 wireless
support. After mt76 receiving more testing we may just update codebase
and drop those backports.

Fixes: https://github.com/openwrt/mt76/issues/865
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 weeks agomt76: update to Git HEAD (2024-02-03)
Felix Fietkau [Thu, 16 May 2024 12:06:12 +0000 (14:06 +0200)]
mt76: update to Git HEAD (2024-02-03)

a9693e1979c2 linux-firmware: add firmware for MT7996
0258dc90e3a1 wifi: mt76: mt7603: fix reading target power from eeprom
3e81173d9e2b wifi: mt76: mt7603: initialize chainmask
786a339bac36 wifi: mt76: mt7996: fix fortify warning
bc37a7ebc267 wifi: mt76: mt7996: fix fw loading timeout
027bab6a88a3 wifi: mt76: usb: create a dedicated queue for psd traffic
e8909c610c3b wifi: mt76: usb: store usb endpoint in mt76_queue
8b3d96fa4ead wifi: mt76: mt792xu: enable dmashdl support
7864d7ad0ed0 wifi: mt76: mt76x2u: add netgear wdna3100v3 to device table
27c81f7c1480 wifi: mt76: mt7925: fix connect to 80211b mode fail in 2Ghz band
b7443c63069a wifi: mt76: mt7925: fix SAP no beacon issue in 5Ghz and 6Ghz band
bab721a65f5a wifi: mt76: mt7925: fix mcu query command fail
1f0f71ed81e8 wifi: mt76: mt7925: fix wmm queue mapping
bcfe2ad966f3 wifi: mt76: mt7925: fix fw download fail
f982c3d67a29 wifi: mt76: mt7925: fix WoW failed in encrypted mode
6a72716ec213 wifi: mt76: mt7925: fix the wrong header translation config
50928b7e1359 wifi: mt76: mt7925: add flow to avoid chip bt function fail
762ab4530e8f wifi: mt76: mt7925: add support to set ifs time by mcu command
87deaf82efa4 wifi: mt76: mt7925: update PCIe DMA settings
c190c1576522 wifi: mt76: mt7925: support temperature sensor
025d5734caba wifi: mt76: mt7996: check txs format before getting skb by pid
4768bfa2baca wifi: mt76: mt7996: fix TWT issues
a65e3eced907 wifi: mt76: mt7996: disable AMSDU for non-data frames
d71716d93aee wifi: mt76: mt7996: fix incorrect interpretation of EHT MCS caps
f21728f3f4bd wifi: mt76: mt7996: ensure 4-byte alignment for beacon commands
68dad7dacd2a wifi: mt76: mt7996: fix HE beamformer phy cap for station vif
66a28f340cdc wifi: mt76: mt7996: mark GCMP IGTK unsupported
b47ad8a7764e wifi: mt76: mt7996: fix efuse reading issue
c2fc7dae7b72 wifi: mt76: mt7996: remove TXS queue setting
e0f1ed168ed5 wifi: mt76: mt7996: add locking for accessing mapped registers
d0cc92c1fd08 wifi: mt76: connac: set correct muar_idx for mt799x chipsets
ae0c62279adc wifi: mt76: mt7996: fix HIF_TXD_V2_1 value
ecc14276af54 wifi: mt76: mt792x: fix ethtool warning
9827df56b241 wifi: mt76: move wed common utilities in wed.c
dccbd2598505 wifi: mt76: mt7925: fix the wrong data type for scan command
9907f4f20261 wifi: mt76: mt792x: add the illegal value check for mtcl table of acpi
1b088a7ac06d wifi: mt76: mt7921e: fix use-after-free in free_irq()
f3c5b4820d7f wifi: mt76: mt7925e: fix use-after-free in free_irq()
d75eac9f5531 wifi: mt76: mt7921: fix incorrect type conversion for CLC command
7bd5401f5bb1 wifi: mt76: mt792x: fix a potential loading failure of the 6Ghz channel config from ACPI
ea55196bc4a0 wifi: mt76: mt792x: update the country list of EU for ACPI SAR
6124ea9135ed wifi: mt76: mt7921: fix the unfinished command of regd_notifier before suspend

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 114190d8ae61fb3a7671852fbd7f0ca3279a5625)
[rmilecki: add patches/fixes for regressions from this commit]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2 weeks agomt76: update to Git HEAD (2024-01-18)
Felix Fietkau [Thu, 16 May 2024 12:06:06 +0000 (14:06 +0200)]
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>
(cherry picked from commit a28cedbdab96be9bee39bb70098a1508c0252a8a)

2 weeks agokernel: bump 5.15 to 5.15.158
Hauke Mehrtens [Sat, 11 May 2024 17:52:13 +0000 (19:52 +0200)]
kernel: bump 5.15 to 5.15.158

Removed because they are upstream:
   generic/backport-5.15/702-v5.19-01-arm64-dts-mediatek-mt7622-add-support-for-coherent-D.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=506ac5538498717fce699feaddb2ed97ae1c3ca7

   generic/backport-5.15/702-v5.19-04-arm64-dts-mediatek-mt7622-introduce-nodes-for-Wirele.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=2f83d3d2cc3c0df89f833cd8c09989187f0c3ce1

Manually adapted:
   generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 1fae75ebd968f9cc1f254dbcdf6a16b27c2b3145)

2 weeks agokernel: bump 5.15 to 5.15.157
Hauke Mehrtens [Sun, 28 Apr 2024 19:35:55 +0000 (21:35 +0200)]
kernel: bump 5.15 to 5.15.157

Removed because they are upstream:
   generic/backport-5.15/741-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=d06977b9a4109f8738bb276125eb6a0b772bc433

Removed because they are upstream:
   generic/backport-5.15/741-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=e719b52d0c56989b0f3475a03a6d64f182c85b56

Manual adapted the following patches:
   generic/pending-5.15/700-netfilter-nft_flow_offload-handle-netdevice-events-f.patch
   generic/pending-5.15/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
   generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 84d0b0b925997f8c2d1a21a60c79f76d3070ae3e)

2 weeks agokernel: bump 5.15 to 5.15.156
Hauke Mehrtens [Sun, 28 Apr 2024 10:58:23 +0000 (12:58 +0200)]
kernel: bump 5.15 to 5.15.156

No manual changes needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 1fbe41f4899aa05fceeb58100c9353b7d60cccca)

2 weeks agoipq40xx: Enable the Engenius EAP1300
Corey Minyard [Fri, 3 May 2024 13:14:31 +0000 (08:14 -0500)]
ipq40xx: Enable the Engenius EAP1300

Now that DSA is enabled and the MAC addresses are set properly, we can
use it.

Signed-off-by: Corey Minyard <minyard@acm.org>
Link: https://github.com/openwrt/openwrt/pull/15358
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15402
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoipq40xx: Properly set MAC addresses for the EAP1300
Corey Minyard [Fri, 3 May 2024 13:12:38 +0000 (08:12 -0500)]
ipq40xx: Properly set MAC addresses for the EAP1300

The code that was there was just taking whatever was left in the
registers, which was just wrong.  Set the addresses using the value from
the u-boot environment, the same way the OEM firmware does.

Signed-off-by: Corey Minyard <minyard@acm.org>
Link: https://github.com/openwrt/openwrt/pull/15358
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15402
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoipq40xx: convert Engenius EAP1300 to DSA
Corey Minyard [Wed, 1 May 2024 20:43:16 +0000 (15:43 -0500)]
ipq40xx: convert Engenius EAP1300 to DSA

This commit converts the EAP1300 to DSA setup.

Signed-off-by: Corey Minyard <minyard@acm.org>
Link: https://github.com/openwrt/openwrt/pull/15358
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15402
Signed-off-by: Robert Marko <robimarko@gmail.com>
2 weeks agoipq40xx: Enable NVMEM_U_BOOT_ENV config
Corey Minyard [Thu, 2 May 2024 19:11:04 +0000 (14:11 -0500)]
ipq40xx: Enable NVMEM_U_BOOT_ENV config

It's needed to get the MAC addresses for the Engenius EAP1300.

Signed-off-by: Corey Minyard <minyard@acm.org>
Link: https://github.com/openwrt/openwrt/pull/15358
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15402
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 weeks agompc85xx: convert WS-AP3710i to simpleImage wrapper
David Bauer [Thu, 25 Apr 2024 14:53:55 +0000 (16:53 +0200)]
mpc85xx: convert WS-AP3710i to simpleImage wrapper

Convert the Enterasys WS-AP3710i access point to use the simpleImage
wrapper.

This is necessary, as the bootlaoder does not align the DTB correctly
(and does not support altering the FDT loadaddress). Booting images with
kernels 5.15 and later can break depending on the alignment on the DTB
within the FIT image.

Compared with the patch applied to master, this compiles the loader at
the changed offset used in OpenWrt master. This is required, as U-Boot
loads the uImage at the offset the loader is currently compiled for.

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

3 weeks agorealtek: Trap LLDP packets to the CPU
Kevin Jilissen [Sat, 4 May 2024 14:12:20 +0000 (16:12 +0200)]
realtek: Trap LLDP packets to the CPU

We should setup the registers for trapping LLDP packets to the CPU.
Currently, these packets are forwarded to all ports which is not desired
behaviour.

Signed-off-by: Kevin Jilissen <info@kevinjilissen.nl>
(cherry picked from commit 5a5c52085a5bd0b1b8bc629f3586c7a93dcb4460)

3 weeks agorealtek: Change LLTP register to LLDP
Kevin Jilissen [Sat, 4 May 2024 14:11:00 +0000 (16:11 +0200)]
realtek: Change LLTP register to LLDP

These registers control the handling of Link Layer Discovery Protocol
(LLDP) packets. This seems to be a typo in the naming.

Signed-off-by: Kevin Jilissen <info@kevinjilissen.nl>
(cherry picked from commit 81ab9ef2d166f9914a33d54d4dfd00429511ccb2)

3 weeks agomt76: update to Git HEAD (2023-12-18)
Felix Fietkau [Mon, 18 Dec 2023 17:54:55 +0000 (18:54 +0100)]
mt76: update to Git HEAD (2023-12-18)

bebd9cffc2ae wifi: mt76: mt7921: fix 6GHz disabled by the missing default CLC config

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 1a57d758f229a1e8d9085cd4775ebe7e1ec5d9b2)
[rmilecki: it's a no-change for 23.05 as we had that fix backported]

3 weeks agomt76: update to Git HEAD (2023-12-11)
Felix Fietkau [Mon, 11 Dec 2023 12:15:09 +0000 (13:15 +0100)]
mt76: update to Git HEAD (2023-12-11)

f63f87cd5b45 wifi: mt76: mt7996: fix shift overflow warning on 32 bit systems

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit da7b0351fce5dd59b79ea78d34c90c66b8bd6f6e)
[rmilecki: it's a no-change for 23.05 as we had that fix backported]

3 weeks agoipq40xx: whw03v2: change LED color for 'running' state to blue
Rodrigo Balerdi [Fri, 10 May 2024 00:15:47 +0000 (21:15 -0300)]
ipq40xx: whw03v2: change LED color for 'running' state to blue

Change the RGB indicator LED color for the running state from green to
blue. There are various reasons for this change:

- In stock firmware, green means internet connection is up, red means it
  is down, and blue means indeterminate. To track stock behavior as
  closely as possible, OpenWrt should indicate blue by default.

- In the current 23.x OpenWrt releases for this router, the led glows
  blue all the time -not green- because the bootloader sets it blue
  and there is an OpenWrt bug that makes it unable to control the LED.
  The bug is fixed in master, so without this commit there would be an
  unexpected change of behavior for this device in the next release.

- The ports other closely related Linksys devices (such as EA8300 and
  MR8300) get this right and use blue for the running state.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
(cherry picked from commit c2f52e42b1e9f736edd6e4545ebe3435db6605ee)
Link: https://github.com/openwrt/openwrt/pull/15438
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 weeks agoipq40xx: whw03v2: fix handling of RGB LED
Rodrigo Balerdi [Fri, 10 May 2024 00:11:09 +0000 (21:11 -0300)]
ipq40xx: whw03v2: fix handling of RGB LED

The RGB LED should glow green in the 'running' state, but it
was glowing cyan because the blue component defaulted to 'on'.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
(cherry picked from commit fc62d66c20b9e9f52ed787d2079baab06108b959)
Link: https://github.com/openwrt/openwrt/pull/15438
Signed-off-by: Robert Marko <robimarko@gmail.com>
3 weeks agomt76: update to Git HEAD (2023-12-08)
Felix Fietkau [Mon, 29 Apr 2024 16:58:41 +0000 (18:58 +0200)]
mt76: update to Git HEAD (2023-12-08)

890ae4d717f1 wifi: mt76: mt76x02: fix MT76x0 external LNA gain handling
fcc2f3d82bc9 wifi: mt76: fix lock dependency problem for wed_lock
77cc14596202 wifi: mt76: mt792x: move mt7921_skb_add_usb_sdio_hdr in mt792x module
bc85355885d1 wifi: mt76: mt792x: move some common usb code in mt792x module
c27f01c4c834 wifi: mt76: mt7996: get tx_retries and tx_failed from txfree
30aba4c18307 wifi: mt76: mt7996: Add mcu commands for getting sta tx statistic
119bebff244b wifi: mt76: mt7996: enable PPDU-TxS to host
a4005e0e83e7 wifi: mt76: mt7996: remove periodic MPDU TXS request
d6cc20bf5913 wifi: mt76: reduce spin_lock_bh held up in mt76_dma_rx_cleanup
5d94251d641c wifi: mt76: mt7921: move connac nic capability handling to mt7921
266341b5019d wifi: mt76: mt7921: enable set txpower for UNII-4
581449ac5274 wifi: mt76: mt7921: add 6GHz power type support for clc
9bfd669e9477 wifi: mt76: mt7921: get regulatory information from the clc event
4a0f839da0f1 wifi: mt76: mt7921: update the channel usage when the regd domain changed
f4df423d3d56 wifi: mt76: add ability to explicitly forbid LED registration with DT
54d369e79972 wifi: mt76: mt7921: support 5.9/6GHz channel config in acpi
b39b6cba220f wifi: mt76: mt7996: fix uninitialized variable in parsing txfree
77194e652885 wifi: mt76: fix typo in mt76_get_of_eeprom_from_nvmem function
c37738fc9097 wifi: mt76: limit support of precal loading for mt7915 to MTD only
d6e8aa634a19 wifi: mt76: make mt76_get_of_eeprom static again
d1c671a90eba wifi: mt76: permit to use alternative cell name to eeprom NVMEM load
5539001fe4e3 wifi: mt76: permit to load precal from NVMEM cell for mt7915
48d413380685 wifi: mt76: Remove unnecessary (void*) conversions
ea2814289147 wifi: mt76: mmio: move mt76_mmio_wed_{init,release}_rx_buf in common code
9fb0277d7ee8 wifi: mt76: move mt76_mmio_wed_offload_{enable,disable} in common code
4b47145ecf44 wifi: mt76: move mt76_net_setup_tc in common code
d798d5d6f770 wifi: mt76: introduce mt76_queue_is_wed_tx_free utility routine
48b0cedbf83f wifi: mt76: introduce wed pointer in mt76_queue
c550204e347d wifi: mt76: increase MT_QFLAG_WED_TYPE size
2e7f30f22cfd wifi: mt76: mt7996: add wed tx support
ec8765a02fc8 wifi: mt76: dma: introduce __mt76_dma_queue_reset utility routine
a469aaac9784 wifi: mt76: mt7996: use u16 for val field in mt7996_mcu_set_rro signature
abca260a15c4 wifi: mt76: mt7996: add wed rx support
be2e74c0c495 wifi: mt76: move wed reset common code in mt76 module
7f17e164fbb4 wifi: mt76: mt7996: add wed reset support
0f89bf58efda wifi: mt76: mt7996: add wed rro delete session garbage collector
a58b75f863ca wifi: mt76: mt7915: fallback to non-wed mode if platform_get_resource fails in mt7915_mmio_wed_init()
36d2ddd94eeb wifi: mt76: mt7996: add support for variants with auxiliary RX path
cec7720c9341 wifi: mt76: mt7996: add TX statistics for EHT mode in debugfs
9852093062e8 wifi: mt76: connac: add thermal protection support for mt7996
955540a4df74 wifi: mt76: mt7996: add thermal sensor device support
af41374a3b8e wifi: mt76: connac: add beacon duplicate TX mode support for mt7996
3c98d7b7fa23 wifi: mt76: mt7996: fix the size of struct bss_rate_tlv
ee2169c00539 wifi: mt76: mt7996: adjust WFDMA settings to improve performance
0aead5de68a7 wifi: mt76: connac: set fixed_bw bit in TX descriptor for fixed rate frames
ab5580ff5a4f wifi: mt76: mt7996: handle IEEE80211_RC_SMPS_CHANGED
eed234afed7e wifi: mt76: mt7996: align the format of fixed rate command
d9a855285b95 wifi: mt76: mt7996: fix rate usage of inband discovery frames
47799aefe263 wifi: mt76: change txpower init to per-phy
264e1ecfe1b4 wifi: mt76: mt7996: add txpower setting support
c7b243b127eb wifi: mt76: use chainmask for power delta calculation
05f433900a02 wifi: mt76: mt7996: switch to mcu command for TX GI report
ae963198e605 wifi: mt76: mt7996: fix alignment of sta info event
d0d2e03591d6 wifi: mt76: mt7996: rework ampdu params setting
e87f4efc7638 wifi: mt76: connac: add beacon protection support for mt7996
0dfcc53a8e5d wifi: mt76: connac: fix EHT phy mode check
30c54a53bf8b wifi: mt76: mt7915: fix EEPROM offset of TSSI flag on MT7981
17297c97b737 wifi: mt76: mt7915: also MT7981 is 3T3R but nss2 on 5 GHz band
eeb48c081034 wifi: mt76: mt7996: fix mt7996_mcu_all_sta_info_event struct packing
b74ad922659c wifi: mt76: mt7996: introduce mt7996_band_valid()
51cb541c1e53 wifi: mt76: connac: add firmware support for mt7992
c0eda4d96ec8 wifi: mt76: mt7996: add DMA support for mt7992
f12471968a53 wifi: mt76: mt7996: rework register offsets for mt7992
8d11dae73eb8 wifi: mt76: mt7996: support mt7992 eeprom loading
6c2b2c37abd7 wifi: mt76: mt7996: adjust interface num and wtbl size for mt7992
df1d3b3c67e5 wifi: mt76: connac: add new definition of tx descriptor
f997e759cea5 wifi: mt76: mt7996: add PCI IDs for mt7992
94e3632e4e93 wifi: mt76: mt7925: remove iftype from mt7925_init_eht_caps signature
9c7b98c03173 net: ethernet: mtk_wed: rename mtk_rxbm_desc in mtk_wed_bm_desc
4423b4eb69fb wifi: mt76: mt7996: fix endianness in mt7996_mcu_wed_rro_event
b97d899a7907 wifi: mt76: mt7921: fix kernel panic by accessing invalid 6GHz channel info
9ef06028d4fe wifi: mt76: mt7921s: fix workqueue problem causes STA association fail
95c14207d2a9 wifi: mt76: mt7996: set DMA mask to 36 bits for boards with more than 4GB of RAM
dbea5151412b wifi: mt76: mt7921: reduce the size of MCU firmware download Rx queue
a84a355d2e0a wifi: mt76: mt7921: fix country count limitation for CLC
c498f27ad075 wifi: mt76: mt7921: fix CLC command timeout when suspend/resume
3098d968abe4 wifi: mt76: mt7921: fix wrong 6Ghz power type
7730fc91dd15 wifi: mt76: fix shift overflow warnings on 32 bit systems
f559adf1849c wifi: mt76: fix crash with WED rx support enabled

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 8f782ed07dc23b64bb24f63ce31d939ee6afb5ad)
[rmilecki: add patches/fixes for regressions from this commit]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 weeks agomt76: update to the latest version
Felix Fietkau [Mon, 29 Apr 2024 16:58:40 +0000 (18:58 +0200)]
mt76: update to the latest version

b5d13611d35e mt76: mt7915: fix monitor mode issues
bbbac7deee3d wifi: mt76: rename mt76_packet_id_init/flush to mt76_wcid_init/cleanup
f1e1e67d97d1 wifi: mt76: fix race condition related to checking tx queue fill status
b3f739a64e6b wifi: mt76: mt7996: add eht rx rate support
ca4917062f17 wifi: mt76: mt76x0: remove dead code in mt76x0_phy_get_target_power
325a0c493199 wifi: mt76: mt7996: fill txd by host driver
cd371fcc98d4 mt76: mt7996: sync with upstream
d71f8d1b172b wifi: mt76: use atomic iface iteration for pre-TBTT work
8d5ea32d4895 wifi: mt76: remove unused error path in mt76_connac_tx_complete_skb
01860c02c505 wifi: mt76: add DMA mapping error check in mt76_alloc_txwi()
62ddb6d46a97 wifi: mt76: connac: introduce helper for mt7925 chipset
0837f37e998b wifi: mt76: mt792x: support mt7925 chip init
899ff378082b wifi: mt76: connac: export functions for mt7925
c3858b5bf347 wifi: mt76: connac: add eht support for phy mode config
5df6b26a9fc5 wifi: mt76: connac: add eht support for tx power
a8081345c636 wifi: mt76: connac: add data field in struct tlv
9b38aebecf78 wifi: mt76: connac: add more unified command IDs
84984e6dc87d wifi: mt76: connac: add more unified event IDs
6fe92398c9ce wifi: mt76: mt7996: set correct wcid in txp
2cfe2fb0bb80 wifi: mt76: mt7996: fix beamform mcu cmd configuration
e512241bb5bb wifi: mt76: mt7996: fix beamformee ss subfield in EHT PHY cap
719a98f832c7 wifi: mt76: mt7996: fix wmm queue mapping
9723562f2a5b wifi: mt76: mt7996: fix rx rate report for CBW320-2
1bb5a6a54943 wifi: mt76: mt7996: fix TWT command format
751b054891f6 wifi: mt76: mt7996: only set vif teardown cmds at remove interface
fea1e10c7741 wifi: mt76: mt7996: support more options for mt7996_set_bitrate_mask()
d497ee8aa2f5 wifi: mt76: mt7996: support per-band LED control
8ccc84111141 wifi: mt76: Use PTR_ERR_OR_ZERO() to simplify code
161f70217edf wifi: mt76: mt7921e: Support MT7992 IP in Xiaomi Redmibook 15 Pro (2023)
7d25bfc3f0cc wifi: mt76: fix clang-specific fortify warnings
5971aa968401 wifi: mt76: connac: add MBSSID support for mt7996
5a47dd323be1 wifi: mt76: update beacon size limitation
d5b4b81dcc9e wifi: mt76: check sta rx control frame to multibss capability
af0e1f6dafb5 wifi: mt76: fix potential memory leak of beacon commands
65d91a833b01 wifi: mt76: get rid of false alamrs of tx emission issues
29411e52059f wifi: mt76: fix per-band IEEE80211_CONF_MONITOR flag comparison
4da62774038a wifi: mt76: check vif type before reporting cca and csa
4a85678fe089 wifi: mt76: mt7915: update mpdu density capability
791a45cffadf wifi: mt76: mt7915: fix beamforming availability check
08e1e6cb7d41 wifi: mt76: Drop unnecessary error check for debugfs_create_dir()
d1881b1b2bf6 wifi: mt76: move struct ieee80211_chanctx_conf up to struct mt76_vif
66d5694e1898 wifi: mt76: mt7921: fix the wrong rate pickup for the chanctx driver
9fc37b0ac546 wifi: mt76: mt7921: fix the wrong rate selected in fw for the chanctx driver
2afc7285f75d wifi: mt76: mt7925: add Mediatek Wi-Fi7 driver for mt7925 chips

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit ef8e2f66f563d0d1864be37075dacf3f13defdc7)
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
3 weeks agoipq806x: swap lan leds for Meraki MR52
Mieczyslaw Nalewaj [Tue, 7 May 2024 06:46:07 +0000 (08:46 +0200)]
ipq806x: swap lan leds for Meraki MR52

LAN Leds on Meraki MR52 are wrong and needs to be swapped to actually
reflect real ports (lan1<->lan2).

Fixes: #15388
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/15410
[ wrap commit to 80 columns and improve commit title ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit bd6852185b7c7362fc5485afa961c686d9cd74b4)

4 weeks agogengetopt: backport patch fixing support for c++17
Christian Marangi [Wed, 1 May 2024 13:42:57 +0000 (15:42 +0200)]
gengetopt: backport patch fixing support for c++17

Backport patch fixing support for c++17 that got merged upstream in
gengetopt.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit a8bfdf2ed4d930ca5a31b5c4bc7061ad5ef11ba3)

4 weeks agolua: fix CVE-2014-5461
Rosen Penev [Sun, 11 Feb 2024 23:06:44 +0000 (15:06 -0800)]
lua: fix CVE-2014-5461

Patch taken from Debian.

Refresh patches

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 78b0106f7d5093641f68d37c041a5863eb9dd9a0)

4 weeks agokernel: bump 5.15 to 5.15.155
Hauke Mehrtens [Sat, 13 Apr 2024 17:22:41 +0000 (19:22 +0200)]
kernel: bump 5.15 to 5.15.155

Manual adapted the following patches:
   generic/hack-5.15/221-module_exports.patch
   bcm27xx/patches-5.15/950-0008-drm-vc4-hdmi-Use-a-mutex-to-prevent-concurrent-frame.patch
   octeontx/patches-5.15/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 9693ed6a9edb2ec9c9aa5edfa816dda3897cdfc4)

4 weeks agotoolchain/gdb: backport patch for macOS to fix invalid range
Josef Schlehofer [Sun, 28 Apr 2024 21:04:03 +0000 (23:04 +0200)]
toolchain/gdb: backport patch for macOS to fix invalid range

With the recent macOS update to Ventura, it looks like gdb could not be
compiled with clang16 and newer version, because it fails with:
./../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
    integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
                                                   ^
./../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 1] for this enumeration type [-Wenum-constexpr-conversion]
./../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
./../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
4 errors generated.

- Upstream bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=30423

- Backported upstream commit:
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ae61525fcf456ab395d55c45492a106d1275873a

Fixes: https://github.com/openwrt/openwrt/issues/15314
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15315
Signed-off-by: Robert Marko <robimarko@gmail.com>
4 weeks agoprocd: make mDNS TXT record parsing more solid
Christian Marangi [Mon, 29 Apr 2024 19:17:31 +0000 (21:17 +0200)]
procd: make mDNS TXT record parsing more solid

mDNS broadcast can't accept empty TXT record and would fail
registration.

Current procd_add_mdns_service checks only if the first passed arg is
empty but don't make any verification on the other args permittins
insertion of empty values in TXT record.

Example:

procd_add_mdns "blah" \
"tcp" "50" \
"1" \
"" \
"3"

Produce:

{ "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "", "3" ] } }

The middle empty TXT record should never be included as it's empty.

This can happen with scripts that make fragile parsing and include
variables even if they are empty.

Prevent this and make the TXT record more solid by checking every
provided TXT record and include only the non-empty ones.

The fixed JSON is the following:

{ "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "3" ] } }

Fixes: b0d9dcf84dd0 ("procd: update to latest git HEAD")
Reported-by: Paul Donald <newtwen@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15331
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 4b043047132de0b3d90619d538f103af6153fa5a)

5 weeks agoRevert "uboot-mediatek: fix build on Mac OS X"
Petr Štetiar [Mon, 30 Oct 2023 19:37:59 +0000 (19:37 +0000)]
Revert "uboot-mediatek: fix build on Mac OS X"

This reverts commit 997ff740dc44045390680eaa30b6566d40bca322.
78cbd5apick as it should be fixed in commit 78cbd5a57e11 ("tools: macOS:
types.h: fix missing unsigned types").

References: #13833
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit f691830307b484ec611f173157739e56c78f336c)

5 weeks agoRevert "uboot-sunxi: add missing type __u64"
Petr Štetiar [Mon, 30 Oct 2023 19:38:04 +0000 (19:38 +0000)]
Revert "uboot-sunxi: add missing type __u64"

This reverts commit 3cc57ba4627c9c7555f8ad86e4f78d86d8f9ddf0 as it
should be fixed in commit 78cbd5a57e11 ("tools: macOS: types.h: fix
missing unsigned types").

References: #13833
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit bc47613cf0215743cde641f962386d59b57a332a)

5 weeks agotools: macOS: types.h: fix missing unsigned types
Petr Štetiar [Mon, 30 Oct 2023 19:31:03 +0000 (19:31 +0000)]
tools: macOS: types.h: fix missing unsigned types

For some reason unsigned types were not added in commit 0a06fcf608dd
("build: fix kernel 5.4 on macos"), which led to bunch of hacks, like
commit 3cc57ba4627c ("uboot-sunxi: add missing type __u64") or
commit 997ff740dc44 ("uboot-mediatek: fix build on Mac OS X").

So lets add the missing unsigned types to workaround it in a bit more
maintainable way.

Fixes: #13833
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 4a8961f1dfba33b1e9a38dd0ecb3a8b03c46edbb)

5 weeks agotoolchain: kernel-headers: remove debugging env dump
Petr Štetiar [Thu, 20 Jul 2023 06:41:44 +0000 (08:41 +0200)]
toolchain: kernel-headers: remove debugging env dump

Remove debugging `env` dump left over as build environments might
contain some sensitive information, which then might leak into the build
logs.

Fixes: 2105acbe2804 ("kernel-headers: fix compile error caused by wrong host include path when the toolchain is already built")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit def41cf2bab825e46a31eb0a9ccf51288edfe27d)

5 weeks agotoolchain: kernel-headers: fix check target for external Git trees
Petr Štetiar [Thu, 20 Jul 2023 13:48:39 +0000 (15:48 +0200)]
toolchain: kernel-headers: fix check target for external Git trees

Executing following command currently fails:

 $ make toolchain/kernel-headers/{download,check} V=sc FIXUP=1
 ...
 include/kernel-version.mk:11: *** Missing kernel version/hash file for . Please create include/kernel-.  Stop.

So lets fix it by adding the necessary missing KERNEL_PATCHVER variable.

That additional kernel-build.mk include is needed to add another set of
missing variables:

 $ make toolchain/kernel-headers/{download,check} V=sc FIXUP=1
 ...
 Makefile:115: *** ERROR: Unknown pack format for file tmp/dl/.  Stop.

Fixes: 0765466a42f4 ("kernel: split kernel version to dedicated files")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit 6b7f1ffbad732c5e1818f9387c02dda109c2748b)

5 weeks agomac80211: backport ieee80211_set_sband_iftype_data()
Rafał Miłecki [Fri, 19 Apr 2024 11:37:22 +0000 (13:37 +0200)]
mac80211: backport ieee80211_set_sband_iftype_data()

It's needed by some drivers, e.g. mt7925, see:
mt7925/main.c:264:9: error: implicit declaration of function '_ieee80211_set_sband_iftype_data' [-Werror=implicit-function-declaration]

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 weeks agomac80211: backport ieee80211_vif_is_mld()
Rafał Miłecki [Fri, 19 Apr 2024 11:37:21 +0000 (13:37 +0200)]
mac80211: backport ieee80211_vif_is_mld()

It's needed by some drivers, e.g. mt7925, see:
mt7925/mcu.c:2181:23: error: implicit declaration of function 'ieee80211_vif_is_mld' [-Werror=implicit-function-declaration]

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 weeks agotools: b43-tools: fix compilation with GCC14
Robert Marko [Fri, 29 Mar 2024 17:57:03 +0000 (18:57 +0100)]
tools: b43-tools: fix compilation with GCC14

GCC14 no longer treats integer types and pointer types as equivalent in
assignments (including implied assignments of function arguments and return
values), and instead fails the compilation with a type error.

So, as a workaround lets disable the newly introduced error
-Werror=int-conversion and just make it print a warning to enable compiling
with GCC14 as Fedora 40 now defaults to it.

Signed-off-by: Robert Marko <robimarko@gmail.com>
5 weeks 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

Fixes: #15228
Signed-off-by: Nick Hainke <vincent@systemli.org>
Signed-off-by: Robert Marko <robimarko@gmail.com>
5 weeks agosunxi: fix network bringup on Olinuxino Micro boards
Zoltan HERPAI [Tue, 16 Apr 2024 22:42:56 +0000 (00:42 +0200)]
sunxi: fix network bringup on Olinuxino Micro boards

It's the A13-based Olinuxino Micro which has only wireless interfaces. The
A20-based board is a fully-fledged one which has an ethernet interface.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
5 weeks agokernel: backport ipeth CDC NCM support
Georgi Valkov [Fri, 19 Apr 2024 07:19:00 +0000 (10:19 +0300)]
kernel: backport ipeth CDC NCM support

Fixes no communication with tethered iOS devices in CDC NCM mode.
Freshly booted iOS devices start in legacy mode, but are put into
NCM mode by the official Apple driver.

[1] https://github.com/torvalds/linux/commit/a2d274c62e44b1995c170595db3865c6fe701226

Fixes: #12566
Tested-by: Georgi Valkov <gvalkov@gmail.com>
Signed-off-by: Foster Snowhill <forst@pen.gy>
Signed-off-by: Georgi Valkov <gvalkov@gmail.com>
[ better reference fixed issue ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 680f8738d02a1876ae4cd11aacf9cd56e520fadf)

6 weeks agobcm27xx: refresh kernel patches
Christian Marangi [Thu, 18 Apr 2024 12:14:42 +0000 (14:14 +0200)]
bcm27xx: refresh kernel patches

Refresh kernel patches with make target/linux/refresh.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 weeks agonetifd: packet-steering: silence error on applying queue mask
Christian Marangi [Thu, 18 Apr 2024 10:40:18 +0000 (12:40 +0200)]
netifd: packet-steering: silence error on applying queue mask

Some queues can't be tweaked and return -ENOENT if it's not multiqueue.

Silence any error from echo to produce a more clean bootlog.

Fixes: #12095
Suggested-by: Andris PE <neandris@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
6 weeks agoconfig: fix CONFIG_GDB appearing in main menuconfig menu
Robert Marko [Mon, 8 Apr 2024 20:05:19 +0000 (22:05 +0200)]
config: fix CONFIG_GDB appearing in main menuconfig menu

I noticed that CONFIG_GDB was suddenly appearing in the main menuconfig
menu despite the fact that it should be visible only when TOOLCHAINOPTS
is selected and under a dedicated menu.

After some trial and error, it seems that this was caused by the recent
addition of GCC_USE_DEFAULT_VERSION, and after even more trial and error
it gets fixed as soon GCC_USE_DEFAULT_VERSION is placed after GCC_VERSION.

So, lets simply put GCC_USE_DEFAULT_VERSION after GCC_VERSION.

Fixes: 501ef81040ba ("config: select KERNEL_WERROR if building with default GCC version")
Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [rebased]
(cherry picked from commit 12b2cb2ec3f1366b65caa0dbbdd83846c1c88d4e)

6 weeks agoconfig: select KERNEL_WERROR if building with default GCC version
Daniel Golle [Sun, 7 Apr 2024 18:50:04 +0000 (19:50 +0100)]
config: select KERNEL_WERROR if building with default GCC version

[ during cherry-pick GCC version was changed to default GCC 12 version ]

At the moment we have to manually follow the default GCC version
also in config/Config-kernel.in. This tends to be forgotten at GCC
version bumps (just happened when switching from version 12 to 13).
Instead, introduce a hidden Kconfig symbol which implies KERNEL_WERROR
in toolchain/gcc/Config.in where it is visible for developers changing
the default version.

Also remove the explicit default on BUILDBOT to avoid a circular
dependency and also because buildbots anyway implicitly always select
the default GCC version.

Reference: https://github.com/openwrt/openwrt/pull/15064
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [GCC 12 default]
(cherry picked from commit 501ef81040baa2ee31de6dd9f75d619de0e4c9bc)

6 weeks agokernel: introduce KERNEL_WERROR config option
Petr Štetiar [Wed, 24 May 2023 07:46:45 +0000 (09:46 +0200)]
kernel: introduce KERNEL_WERROR config option

In commit b2d1eb717b65 ("generic: 5.15: enable Werror by default for
kernel compile") CONFIG_WERROR=y was enabled and all warnings/errors
reported with GCC 12 were fixed.

Keeping this in sync with past/future GCC versions is going to be uphill
battle, so lets introduce new KERNEL_WERROR config option, enable it by
default only for tested/known working combinations and on buildbots.

References: #12687
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit ce8c639a6c539534be14a540e7c3e9933d3a34ef)

6 weeks agoipq40xx: whw03v2: enable additional 5 GHz channels
Rodrigo Balerdi [Tue, 16 Apr 2024 20:47:20 +0000 (17:47 -0300)]
ipq40xx: whw03v2: enable additional 5 GHz channels

This device supports channel ranges 36-64 and 100-165, just like
others based on the same reference design, but its current DTS is
unnecessarily restricting these ranges to 36-48 and 149-165.

Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
(cherry picked from commit 1c32cee348f54e9f64b5928ee1a1efe491eec137)

6 weeks agoipq807x: prpl-haze: enable LED driver on device tree
CheWei Chien [Mon, 19 Feb 2024 01:21:53 +0000 (09:21 +0800)]
ipq807x: prpl-haze: enable LED driver on device tree

Enable LED driver LP5562 on HAZE device tree and include its kernel
module package on default package for HAZE.

Signed-off-by: CheWei Chien <chewei.chien@wnc.com.tw>
Signed-off-by: Petr Štetiar <ynezz@true.cz> [commit facelift]
(cherry picked from commit fb45194305e6bf9b58f610c1528769320879c749)

6 weeks agokernel: add kmod-leds-lp5562 and kmod-leds-lp55xx-common
CheWei Chien [Thu, 4 Jan 2024 05:28:40 +0000 (13:28 +0800)]
kernel: add kmod-leds-lp5562 and kmod-leds-lp55xx-common

Add kernel module for lp5562 LED driver.
The kmod-leds-lp5562 depends on kmod-leds-lp55xx-common.

Signed-off-by: CheWei Chien <chewei.chien@wnc.com.tw>
(cherry picked from commit b33fa6ac9065028046016ea631f6be0926d7abd0)

6 weeks ago.gitignore: ignore link if target is included from feed
Florian Eckert [Wed, 19 Jul 2023 09:54:25 +0000 (11:54 +0200)]
.gitignore: ignore link if target is included from feed

If an out of tree target is included via a feed, then there is a link with
the name 'feed' in the target directory. Do not show this link in git.

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

6 weeks agobuild: fix kernel component in CycloneDX SBOM
Cedric DOURLENT [Fri, 1 Mar 2024 15:42:34 +0000 (16:42 +0100)]
build: fix kernel component in CycloneDX SBOM

As stated in the cycloneDX documentation, the field "type" is mandatory for all components.

More details here (https://cyclonedx.org/docs/1.5/json/#components_items_type)

Signed-off-by: Cedric DOURLENT <cedric.dourlent@softathome.com>
(cherry picked from commit 84331215e57090a9cdae4af75af2539c39cd7de7)

7 weeks agomvebu: puzzle-m90x: wipe rootfs_data on sysupgrade
Daniel Golle [Tue, 9 Jan 2024 19:54:51 +0000 (19:54 +0000)]
mvebu: puzzle-m90x: wipe rootfs_data on sysupgrade

The sysupgrade formware of the Puzzle series is a slightly strange
dual-boot approach while remaining compatible with Marvell's SDK
firmware upgrade binary format -- which happens to be a full-disk
image with GPT partition table. Hence that /lib/upgrade/emmc-puzzle.sh
script is like an exotic disease which results from those decisions,
and as we also want to somehow stay compatible with the IEI-World
stock firmware we got to use it in that same way (we are not
compatible with the QNAP-branded identical hardware device anyway).

Currently, on sysupgrade the result is that one ends up with the old
content of rootfs_data (a GPT partition on those devices) as nothing
ever wipes or in any way re-creates the filesystem there. As a simple
work-around, let's kill the filesystem on rootfs_data so fstools
re-formats it on the next boot.

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

7 weeks agosdk: include lib/crtsavres.o for powerpc
Robert Marko [Mon, 8 Apr 2024 15:52:22 +0000 (17:52 +0200)]
sdk: include lib/crtsavres.o for powerpc

Trying to link certain kernel modules like dahdi-linux when building with
the OpenWrt SDK will fail with:
openwrt-sdk-apm821xx-sata_gcc-13.2.0_musl.Linux-x86_64/staging_dir/toolchain-powerpc_464fp_gcc-13.2.0_musl/bin/powerpc-openwrt-linux-musl-ld: cannot find arch/powerpc/lib/crtsavres.o: No such file or directory

Previously this worked with the PowerPC SDK since we carried a hack that
was passing --save-restore-funcs to module LDFLAGS so the linker provided
the required functions automatically as without --save-restore-funcs it
doesnt do so automatically on relocatable links and as a sideffect did not
require the kernel provided crtsaves.o to link against.

Now that hack has been removed as upstream kernel now compiles crtsaves.o
by default so it can be linked against but its not included in the SDK.

So, lets include lib/crtsavres.o when SDK is generated for PowerPC.

Fixes: 1c28058710fd ("kernel: bump 5.15 to 5.15.148")
Signed-off-by: Robert Marko <robimarko@gmail.com>
7 weeks agokernel: backport upstream mediatek WED changes
Felix Fietkau [Fri, 29 Mar 2024 21:21:51 +0000 (22:21 +0100)]
kernel: backport upstream mediatek WED changes

Reorder and update existing patches

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 6407ef8d2bcb4a0a6284de09cd77bd1868c1d6ea)
[rmilecki: rebase & fix mt76 compilation]
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
7 weeks agomac80211: backport some upstream EHT patches
Rafał Miłecki [Mon, 1 Apr 2024 20:59:10 +0000 (22:59 +0200)]
mac80211: backport some upstream EHT patches

Those changes are needed by Wi-Fi 7 drivers.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
8 weeks agorealtek: support common GPIOs on D-Link DGS-1210-16
Richard Kunze [Wed, 20 Mar 2024 18:26:27 +0000 (19:26 +0100)]
realtek: support common GPIOs on D-Link DGS-1210-16

D-Link DGS-1210-16 hangs when rebooting and has no support for the reset
button.

Fix both by enabling the same GPIOs for reboot and the reset button as
already used for D-Link DGS-1210-20 and D-Link DGS-1210-28.

Signed-off-by: Richard Kunze <kunze@tivano.de>
(cherry picked from commit 92c21b2e18f0c53f45cca9731e131568cddcbbd5)

8 weeks agoath79: add support for Huawei AP5030DN
Marco von Rosenberg [Sun, 31 Mar 2024 15:07:39 +0000 (17:07 +0200)]
ath79: add support for Huawei AP5030DN

Huawei AP5030DN is a dual-band, dual-radio 802.11ac Wave 1 3x3 MIMO
enterprise access point with two Gigabit Ethernet ports and PoE
support.

Hardware highlights:
- CPU: QCA9550 SoC at 720MHz
- RAM: 256MB DDR2
- Flash: 32MB SPI-NOR
- Wi-Fi 2.4GHz: QCA9550-internal radio
- Wi-Fi 5GHz: QCA9880 PCIe WLAN SoC
- Ethernet 1: 10/100/1000 Mbps Ethernet through Broadcom B50612E PHY
- Ethernet 2: 10/100/1000 Mbps Ethernet through Marvell 88E1510 PHY
- PoE: input through Ethernet 1 port
- Standalone 12V/2A power input
- Serial console externally available through RJ45 port
- External watchdog: SGM706 (1.6s timeout)

Serial console:
  9600n8 (9600 baud, no stop bits, no parity, 8 data bits)

MAC addresses:
  Each device has 32 consecutive MAC addresses allocated by
  the vendor, which don't overlap between devices.
  This was confirmed with multiple devices with consecutive
  serial numbers.
  The MAC address range starts with the address on the label.
  To be able to distinguish between the interfaces,
  the following MAC address scheme is used:
    - eth0 = label MAC
    - eth1 = label MAC + 1
    - radio0 (Wi-Fi 5GHz) = label MAC + 2
    - radio1 (Wi-Fi 2.4GHz) = label MAC + 3

Installation:
0. Connect some sort of RJ45-to-USB adapter to "Console" port of the AP

1. Power up the AP

2. At prompt "Press f or F  to stop Auto-Boot in 3 seconds",
   do what they say.
   Log in with default admin password "admin@huawei.com".

3. Boot the OpenWrt initramfs from TFTP using the hidden script
   "run ramboot". Replace IP address as needed:

   > setenv serverip 192.168.1.10
   > setenv ipaddr 192.168.1.1
   > setenv rambootfile
     openwrt-ath79-generic-huawei_ap5030dn-initramfs-kernel.bin
   > saveenv
   > run ramboot

4. Optional but recommended as the factory firmware cannot
   be downloaded publicly:
   Back up contents of "firmware" partition using the web interface or ssh:

   $ ssh root@192.168.1.1 cat /dev/mtd11 > huawei_ap5030dn_fw_backup.bin

5. Run sysupgrade using sysupgrade image. OpenWrt
   shall boot from flash afterwards.

Return to factory firmware (using firmware upgrade package downloaded from
non-public Huawei website):
1. Start a TFTP server in the directory where
   the firmware upgrade package is located

2. Boot to u-boot as described above

3. Install firmware upgrade package and format the config partitions:

   > update system FatAP5X30XN_SOMEVERSION.bin
   > format_fs

Return to factory firmware (from previously created backup):
1. Copy over the firmware partition backup to /tmp,
   for example using scp

2. Use sysupgrade with force to restore the backup:
   sysupgrade -F huawei_ap5030dn_fw_backup.bin

3. Boot AP to U-Boot as described above

Quirks and known issues
-----------------------

- On initial power-up, the Huawei-modified bootloader suspends both
ethernet PHYs (it sets the "Power Down" bit in the MII control
register). Unfortunately, at the time of the initial port, the kernel
driver for the B50612E/BCM54612E PHY behind eth0 doesn't have a resume
callback defined which would clear this bit. This makes the PHY unusable
since it remains suspended forever. This is why the backported kernel
patches in this commit are required which add this callback and for
completeness also a suspend callback.

- The stock firmware has a semi dual boot concept where the primary
kernel uses a squashfs as root partition and the secondary kernel uses
an initramfs. This dual boot concept is circumvented on purpose to gain
more flash space and since the stock firmware's flash layout isn't
compatible with mtdsplit.

- The external watchdog's timeout of 1.6s is very hard to satisfy
during bootup. This is why the GPIO15 pin connected to the watchdog input
is configured directly in the LZMA loader to output the CPU_CLK/4 signal
which keeps the watchdog happy until the wdt-gpio kernel driver takes
over. Because it would also take too long to read the whole kernel image
from flash, the uImage header only includes the loader which then reads
the kernel image from flash after GPIO15 is configured.

Signed-off-by: Marco von Rosenberg <marcovr@selfnet.de>
[fixed 6.6 backport patch naming]
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 06cdc07f8cc703ef7dcb3e7b329b9abff0806a6e)

2 months agokernel: bump 5.15 to 5.15.153
Hauke Mehrtens [Fri, 29 Mar 2024 22:15:41 +0000 (23:15 +0100)]
kernel: bump 5.15 to 5.15.153

Removed because they are upstream:
generic/backport-5.15/704-15-v5.19-net-mtk_eth_soc-move-MAC_MCR-setting-to-mac_finish.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=c5c0760adc260d55265c086b9efb350ea6dda38b

generic/pending-5.15/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=448cc8b5f743985f6d1d98aa4efb386fef4c3bf2

generic/pending-5.15/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=9fcadd125044007351905d40c405fadc2d3bb6d6

Add new configuration symbols for tegra target.

Tested-by: Stijn Segers <foss@volatilesystems.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit fb2c6e9d4da8753b91f79f4ab2d00c0fd8efa038)

2 months agomediatek: filogic: add Unielec U7981-01 support
Allen Zhao [Sat, 9 Mar 2024 02:44:58 +0000 (10:44 +0800)]
mediatek: filogic: add Unielec U7981-01 support

Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 8GB eMMC or 128 MB SPI-NAND
  RAM: 256MB
  Ethernet: 5x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset
  USB: M.2(B-key) for 4G/5G Module
  Power: DC 12V 1A
  UART: 3.3v, 115200n8
  --------------------------
  |         Layout         |
  |   -----------------    |
  | 4 | VCC RX TX GND | <= |
  |   -----------------    |
  --------------------------

The U-boot menu will automatically appear at startup, and then select
the required options through UP/DOWN Key.

NAND Flash and eMMC Flash instructions:
1. Set your computers IP adress to 192.168.1.2.
2. Run a TFTP server providing the sysupgrade.bin image.
3. Power on the router, into the U-Boot menu.
4. Select "2. Upgrade firmware"
5. Update sysupgrade.bin file name, input server IP and input device
   IP (if they deviate from the defaults)
6. Wait for automatic startup after burning

Signed-off-by: Allen Zhao <allenzhao@unielecinc.com>
(cherry picked from commit 640b0b79ff05c42991e99a49ed81efb3fac25045)

2 months agorockchip: remove redundant 'console' parameter from boot script
Tianling Shen [Mon, 25 Mar 2024 18:25:42 +0000 (02:25 +0800)]
rockchip: remove redundant 'console' parameter from boot script

ttyS2 is the default console used for all rockchip boards.
The redundant 'console=tty1' parameter now breaks the console due to
recent procd update.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 163c3d0bde28664058656ce1c2bd97f80e4dbe2d)

2 months agorockchip: remove 'swiotlb' parameter from boot script
Tianling Shen [Mon, 25 Mar 2024 16:40:37 +0000 (00:40 +0800)]
rockchip: remove 'swiotlb' parameter from boot script

We have hardware IOMMU support and this is totally unnecessary.
The given value is also unreasonable, it's too small and causes
kernel panic in some cases:

[ 5706.856473] sdhci-dwcmshc fe310000.mmc: swiotlb buffer is full (sz: 28672 bytes), total 512 (slots), used 498 (slots)
[ 5706.864451] sdhci-dwcmshc fe310000.mmc: swiotlb buffer is full (sz: 65536 bytes), total 512 (slots), used 464 (slots)

This parameter seems to be added by mistake, so remove it.

Fixes: e35c7ab51fd1 ("rockchip: merge bootscript")
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 50e6c8ae8df55532fb70c281bd238b9b1cf1fdaf)

2 months agounetd: update to Git HEAD (2024-03-31)
Felix Fietkau [Sun, 31 Mar 2024 17:57:03 +0000 (19:57 +0200)]
unetd: update to Git HEAD (2024-03-31)

52144f723bec pex: after receiving data update req, notify peer of local address/port
29aacb9386e0 pex: track indirect hosts (reachable via gateway) as peers without adding them to wg
48049524d4fc pex: do not send peer notifications for hosts with a gateway
12ac684ee22a pex: do not query for hosts with a gateway
203c88857354 pex: fix endian issues on config transfer
a29d45c71bca network: fix endian issue in converting port to network id
cbbe9d337a17 unet-cli: emit id by default
806457664ab6 unet-cli: strip initial newline in usage message

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

2 months agokernel: bump 5.15 to 5.15.152
Hauke Mehrtens [Tue, 26 Mar 2024 00:18:15 +0000 (01:18 +0100)]
kernel: bump 5.15 to 5.15.152

Removed because it is upstream:
generic/backport-5.15/081-v5.17-regmap-allow-to-define-reg_update_bits-for-no-bus.patch
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=fbddd48f1456db32b675fad95a902de38345902a

Manual changes needed:
bcm27xx/patches-5.15/950-0470-sound-usb-add-device-quirks-for-A4Tech-FHD-1080p-web.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 2ec025d5547182da07bdd8299d2e97d05f695537)

2 months agokernel: bump 5.15 to 5.15.151
Hauke Mehrtens [Mon, 25 Mar 2024 22:54:57 +0000 (23:54 +0100)]
kernel: bump 5.15 to 5.15.151

No manual changes needed.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 030757112413760bdb5941776d6ca35d3c7e0833)

2 months agokirkwood: add ix4-200d support to uboot-envtools
Sander van Deijck [Tue, 12 Mar 2024 00:54:38 +0000 (01:54 +0100)]
kirkwood: add ix4-200d support to uboot-envtools

This adds support for the Iomega ix4-200d device in uboot-envtools.

Signed-off-by: Sander van Deijck <sander@vandeijck.com>
(cherry picked from commit 2cfe86d383c9eb74b6d37d8e33bb726f7d6cbb8a)

2 months agoOpenWrt v23.05.3: revert to branch defaults
Hauke Mehrtens [Fri, 22 Mar 2024 22:26:12 +0000 (23:26 +0100)]
OpenWrt v23.05.3: revert to branch defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agoOpenWrt v23.05.3: adjust config defaults v23.05.3
Hauke Mehrtens [Fri, 22 Mar 2024 22:26:03 +0000 (23:26 +0100)]
OpenWrt v23.05.3: adjust config defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomt76: Fix PKG_MIRROR_HASH
Hauke Mehrtens [Fri, 22 Mar 2024 22:09:42 +0000 (23:09 +0100)]
mt76: Fix PKG_MIRROR_HASH

Fix the PKG_MIRROR_HASH after the last upgrade.

Fixes: 5ef41b1f9159 ("mt76: update to latest HEAD")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 months agomt76: update to latest HEAD
David Bauer [Fri, 16 Feb 2024 22:12:00 +0000 (23:12 +0100)]
mt76: update to latest HEAD

f1e1e67d wifi: mt76: fix race condition related to checking tx queue fill status
bbbac7de wifi: mt76: rename mt76_packet_id_init/flush to mt76_wcid_init/cleanup
b5d13611 mt76: mt7915: fix monitor mode issues

Signed-off-by: David Bauer <mail@david-bauer.net>
2 months agomediatek: mt7622: linksys-e8450: set driving strength for SPI-NAND
Daniel Golle [Sun, 10 Mar 2024 23:14:33 +0000 (23:14 +0000)]
mediatek: mt7622: linksys-e8450: set driving strength for SPI-NAND

Set 12mA driving strength for SPI-NAND pins like the stock firmware's
bootloader does as well.

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

2 months agodnsmasq: Backport 2 upstream patches
Hauke Mehrtens [Mon, 18 Mar 2024 21:39:56 +0000 (22:39 +0100)]
dnsmasq: Backport 2 upstream patches

These two patches are fixing minor problems with DNSSEC found shortly
after the dnsmasq 2.90 release.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 28c87d7ecd142a31772572faac079b77163ceeca)

2 months agodnsmasq: reset PKG_RELEASE
Robert Marko [Wed, 13 Mar 2024 11:47:31 +0000 (12:47 +0100)]
dnsmasq: reset PKG_RELEASE

dnsmasq was recently updated to 2.90, but PKG_RELEASE was not reset to 1.

Fixes: 838a27f64f56 ("dnsmasq: version 2.90")
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 694e6477848eade21851ec27d90c173b373099fc)

2 months agodnsmasq: version 2.90
Nathaniel Wesley Filardo [Sun, 18 Feb 2024 13:12:10 +0000 (13:12 +0000)]
dnsmasq: version 2.90

Bump to 2.90 to get upstream's fix for DNSSEC KeyTrap (CVE-2023-50387,
CVE-2023-50868) among many other goodies and fixes (notably, upstream
568fb024... fixes a UAF in cache_remove_uid that was routinely crashing
dnsmasq in my deployment).

Catch up our 200-ubus_dns.patch, too.

Signed-off-by: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
(cherry picked from commit 838a27f64f56e75aae98a3ab2556856224d48d8b)

2 months agodnsmasq: mark global ubus context as closed after fork
Sven Eckelmann [Sat, 18 Nov 2023 15:29:09 +0000 (16:29 +0100)]
dnsmasq: mark global ubus context as closed after fork

If the dnsmasq process forks to handle TCP connections, it closes the ubus
context. But instead of changing the daemon wide pointer to NULL, only the
local variable was adjusted - and this portion of the code was even dropped
(dead store) by some optimizing compilers.

It makes more sense to change the daemon->ubus pointer because various
functions are already checking it for NULL. It is also the behavior which
ubus_destroy() implements.

Fixes: d8b33dad0bb7 ("dnsmasq: add support for monitoring and modifying dns lookup results via ubus")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
(cherry picked from commit 711dcb77630e96e75413b5cdbe3ddb5432f394f6)

2 months agomediatek: filogic: replace built-in Aquantia driver with module
Rafał Miłecki [Wed, 17 Jan 2024 21:20:15 +0000 (22:20 +0100)]
mediatek: filogic: replace built-in Aquantia driver with module

Some Aquantia PHYs (e.g. AQR113C) require firmware to be uploaded by
host system. With built-in drivers this doesn't work in OpenWrt /
embeddded as filesystem isn't available during PHY probe. That results
in delays like:
[    1.588068] Aquantia AQR113C mdio-bus:00: Falling back to sysfs fallback for: Rhe-05.06-Candidate9-AQR_Mediatek_23B_P5_ID45824_LCLVER1.cld
[   64.526387] Aquantia AQR113C mdio-bus:00: failed to find FW file Rhe-05.06-Candidate9-AQR_Mediatek_23B_P5_ID45824_LCLVER1.cld (-110)

Switch to module to postpone PHY probe to init state.

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

2 months agomvebu: enable thermal zone polling for IEI Puzzle devices
Daniel Golle [Sun, 17 Mar 2024 15:55:09 +0000 (15:55 +0000)]
mvebu: enable thermal zone polling for IEI Puzzle devices

Marvell's thermal sensors do not support interrupts, so we need to
poll them. Reading temperature every second should be enough to
control the fan.
While at it, also make sure fan speed is reduced again if temperature
goes down.

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

2 months agofirmware: intel-microcode: update to 20240312
Christian Lamparter [Thu, 14 Mar 2024 06:13:37 +0000 (07:13 +0100)]
firmware: intel-microcode: update to 20240312

Debian changelog:

intel-microcode (3.20240312.1) unstable; urgency=medium

  * New upstream microcode datafile 20240312 (closes: #1066108)
    - Mitigations for INTEL-SA-INTEL-SA-00972 (CVE-2023-39368):
      Protection mechanism failure of bus lock regulator for some Intel
      Processors may allow an unauthenticated user to potentially enable
      denial of service via network access.
    - Mitigations for INTEL-SA-INTEL-SA-00982 (CVE-2023-38575):
      Non-transparent sharing of return predictor targets between contexts in
      some Intel Processors may allow an authorized user to potentially
      enable information disclosure via local access.  Affects SGX as well.
    - Mitigations for INTEL-SA-INTEL-SA-00898 (CVE-2023-28746), aka RFDS:
      Information exposure through microarchitectural state after transient
      execution from some register files for some Intel Atom Processors and
      E-cores of Intel Core Processors may allow an authenticated user to
      potentially enable information disclosure via local access.  Enhances
      VERW instruction to clear stale register buffers.  Affects SGX as well.
      Requires kernel update to be effective.
    - Mitigations for INTEL-SA-INTEL-SA-00960 (CVE-2023-22655), aka TECRA:
      Protection mechanism failure in some 3rd and 4th Generation Intel Xeon
      Processors when using Intel SGX or Intel TDX may allow a privileged
      user to potentially enable escalation of privilege via local access.
      NOTE: effective only when loaded by firmware.  Allows SMM firmware to
      attack SGX/TDX.
    - Mitigations for INTEL-SA-INTEL-SA-01045 (CVE-2023-43490):
      Incorrect calculation in microcode keying mechanism for some Intel
      Xeon D Processors with Intel SGX may allow a privileged user to
      potentially enable information disclosure via local access.
  * Fixes for other unspecified functional issues on many processors
  * Updated microcodes:
    sig 0x00050653, pf_mask 0x97, 2023-07-28, rev 0x1000191, size 36864
    sig 0x00050656, pf_mask 0xbf, 2023-07-28, rev 0x4003605, size 38912
    sig 0x00050657, pf_mask 0xbf, 2023-07-28, rev 0x5003605, size 37888
    sig 0x0005065b, pf_mask 0xbf, 2023-08-03, rev 0x7002802, size 30720
    sig 0x00050665, pf_mask 0x10, 2023-08-03, rev 0xe000015, size 23552
    sig 0x000506f1, pf_mask 0x01, 2023-10-05, rev 0x003e, size 11264
    sig 0x000606a6, pf_mask 0x87, 2023-09-14, rev 0xd0003d1, size 307200
    sig 0x000606c1, pf_mask 0x10, 2023-12-05, rev 0x1000290, size 299008
    sig 0x000706a1, pf_mask 0x01, 2023-08-25, rev 0x0040, size 76800
    sig 0x000706a8, pf_mask 0x01, 2023-08-25, rev 0x0024, size 76800
    sig 0x000706e5, pf_mask 0x80, 2023-09-14, rev 0x00c4, size 114688
    sig 0x000806c1, pf_mask 0x80, 2023-09-13, rev 0x00b6, size 111616
    sig 0x000806c2, pf_mask 0xc2, 2023-09-13, rev 0x0036, size 98304
    sig 0x000806d1, pf_mask 0xc2, 2023-09-13, rev 0x0050, size 104448
    sig 0x000806ec, pf_mask 0x94, 2023-07-16, rev 0x00fa, size 106496
    sig 0x000806f8, pf_mask 0x87, 2024-01-03, rev 0x2b000590, size 579584
    sig 0x000806f7, pf_mask 0x87, 2024-01-03, rev 0x2b000590
    sig 0x000806f6, pf_mask 0x87, 2024-01-03, rev 0x2b000590
    sig 0x000806f5, pf_mask 0x87, 2024-01-03, rev 0x2b000590
    sig 0x000806f4, pf_mask 0x87, 2024-01-03, rev 0x2b000590
    sig 0x00090661, pf_mask 0x01, 2023-09-26, rev 0x0019, size 20480
    sig 0x00090672, pf_mask 0x07, 2023-09-19, rev 0x0034, size 224256
    sig 0x00090675, pf_mask 0x07, 2023-09-19, rev 0x0034
    sig 0x000b06f2, pf_mask 0x07, 2023-09-19, rev 0x0034
    sig 0x000b06f5, pf_mask 0x07, 2023-09-19, rev 0x0034
    sig 0x000906a3, pf_mask 0x80, 2023-09-19, rev 0x0432, size 222208
    sig 0x000906a4, pf_mask 0x80, 2023-09-19, rev 0x0432
    sig 0x000906c0, pf_mask 0x01, 2023-09-26, rev 0x24000026, size 20480
    sig 0x000906e9, pf_mask 0x2a, 2023-09-28, rev 0x00f8, size 108544
    sig 0x000906ea, pf_mask 0x22, 2023-07-26, rev 0x00f6, size 105472
    sig 0x000906ec, pf_mask 0x22, 2023-07-26, rev 0x00f6, size 106496
    sig 0x000906ed, pf_mask 0x22, 2023-07-27, rev 0x00fc, size 106496
    sig 0x000a0652, pf_mask 0x20, 2023-07-16, rev 0x00fa, size 97280
    sig 0x000a0653, pf_mask 0x22, 2023-07-16, rev 0x00fa, size 97280
    sig 0x000a0655, pf_mask 0x22, 2023-07-16, rev 0x00fa, size 97280
    sig 0x000a0660, pf_mask 0x80, 2023-07-16, rev 0x00fa, size 97280
    sig 0x000a0661, pf_mask 0x80, 2023-07-16, rev 0x00fa, size 96256
    sig 0x000a0671, pf_mask 0x02, 2023-09-14, rev 0x005e, size 108544
    sig 0x000b0671, pf_mask 0x32, 2023-12-14, rev 0x0122, size 215040
    sig 0x000b06a2, pf_mask 0xe0, 2023-12-07, rev 0x4121, size 220160
    sig 0x000b06a3, pf_mask 0xe0, 2023-12-07, rev 0x4121
    sig 0x000b06e0, pf_mask 0x11, 2023-09-25, rev 0x0015, size 138240
  * New microcodes:
    sig 0x000a06a4, pf_mask 0xe6, 2024-01-03, rev 0x001c, size 136192
    sig 0x000b06a8, pf_mask 0xe0, 2023-12-07, rev 0x4121, size 220160
    sig 0x000c06f2, pf_mask 0x87, 2023-11-20, rev 0x21000200, size 549888
    sig 0x000c06f1, pf_mask 0x87, 2023-11-20, rev 0x21000200
  * source: update symlinks to reflect id of the latest release, 20240312
  * changelog, debian/changelog: fix typos

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Tue, 12 Mar 2024 20:28:17 -0300

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

2 months agofirmware: intel-microcode: update to 20231114
Christian Lamparter [Fri, 8 Mar 2024 20:16:44 +0000 (21:16 +0100)]
firmware: intel-microcode: update to 20231114

Debian changelog:

intel-microcode (3.20231114.1) unstable; urgency=medium

  * New upstream microcode datafile 20231114 (closes: #1055962)
    Mitigations for "reptar", INTEL-SA-00950 (CVE-2023-23583)
    Sequence of processor instructions leads to unexpected behavior for some
    Intel(R) Processors, may allow an authenticated user to potentially enable
    escalation of privilege and/or information disclosure and/or denial of
    service via local access.
    Note: "retvar" on 4th gen Xeon Scalable (sig 0x806f8 pfm 0x87), 12th gen
    Core mobile (sig 0x906a4 pfm 0x80), 13th gen Core desktop (sig 0xb0671 pfm
    0x01) were already mitigated by a previous microcode update.
  * Fixes for unspecified functional issues
  * Updated microcodes:
    sig 0x000606a6, pf_mask 0x87, 2023-09-01, rev 0xd0003b9, size 299008
    sig 0x000606c1, pf_mask 0x10, 2023-09-08, rev 0x1000268, size 290816
    sig 0x000706e5, pf_mask 0x80, 2023-09-03, rev 0x00c2, size 113664
    sig 0x000806c1, pf_mask 0x80, 2023-09-07, rev 0x00b4, size 111616
    sig 0x000806c2, pf_mask 0xc2, 2023-09-07, rev 0x0034, size 98304
    sig 0x000806d1, pf_mask 0xc2, 2023-09-07, rev 0x004e, size 104448
    sig 0x000806f8, pf_mask 0x87, 2023-06-16, rev 0x2b0004d0, size 572416
    sig 0x000806f8, pf_mask 0x87, 2023-06-16, rev 0x2b0004d0
    sig 0x000806f7, pf_mask 0x87, 2023-06-16, rev 0x2b0004d0
    sig 0x000806f6, pf_mask 0x87, 2023-06-16, rev 0x2b0004d0
    sig 0x000806f5, pf_mask 0x87, 2023-06-16, rev 0x2b0004d0
    sig 0x000806f4, pf_mask 0x87, 2023-06-16, rev 0x2b0004d0
    sig 0x000806f8, pf_mask 0x10, 2023-06-26, rev 0x2c000290, size 605184
    sig 0x000806f8, pf_mask 0x10, 2023-06-26, rev 0x2c000290
    sig 0x000806f6, pf_mask 0x10, 2023-06-26, rev 0x2c000290
    sig 0x000806f5, pf_mask 0x10, 2023-06-26, rev 0x2c000290
    sig 0x000806f4, pf_mask 0x10, 2023-06-26, rev 0x2c000290
    sig 0x00090672, pf_mask 0x07, 2023-06-07, rev 0x0032, size 222208
    sig 0x00090672, pf_mask 0x07, 2023-06-07, rev 0x0032
    sig 0x00090675, pf_mask 0x07, 2023-06-07, rev 0x0032
    sig 0x000b06f2, pf_mask 0x07, 2023-06-07, rev 0x0032
    sig 0x000b06f5, pf_mask 0x07, 2023-06-07, rev 0x0032
    sig 0x000906a3, pf_mask 0x80, 2023-06-07, rev 0x0430, size 220160
    sig 0x000906a3, pf_mask 0x80, 2023-06-07, rev 0x0430
    sig 0x000906a4, pf_mask 0x80, 2023-06-07, rev 0x0430
    sig 0x000906a4, pf_mask 0x40, 2023-05-05, rev 0x0005, size 117760
    sig 0x000a0671, pf_mask 0x02, 2023-09-03, rev 0x005d, size 104448
    sig 0x000b0671, pf_mask 0x32, 2023-08-29, rev 0x011d, size 210944
    sig 0x000b06a2, pf_mask 0xe0, 2023-08-30, rev 0x411c, size 216064
    sig 0x000b06a2, pf_mask 0xe0, 2023-08-30, rev 0x411c
    sig 0x000b06a3, pf_mask 0xe0, 2023-08-30, rev 0x411c
    sig 0x000b06e0, pf_mask 0x11, 2023-06-26, rev 0x0012, size 136192
  * Updated 2023-08-08 changelog entry:
    Mitigations for "retvar" on a few processors, refer to the 2023-11-14
    entry for details.  This information was disclosed in 2023-11-14.
  * source: update symlinks to reflect id of the latest release, 20231114

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Thu, 16 Nov 2023 08:09:43 -0300

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

2 months agodropbear: cherry-pick upstream patches
Konstantin Demin [Tue, 9 Jan 2024 00:40:01 +0000 (03:40 +0300)]
dropbear: cherry-pick upstream patches

critical fixes:
- libtommath: possible integer overflow (CVE-2023-36328)
- implement Strict KEX mode (CVE-2023-48795)

various fixes:
- fix DROPBEAR_DSS and DROPBEAR_RSA config options
- y2038 issues
- remove SO_LINGER socket option
- make banner reading failure non-fatal
- fix "noremotetcp" behavior
- don't try to shutdown a pty
- fix test for multiuser kernels

adds new features:
- option to bind to interface
- allow inetd with non-syslog
- ignore unsupported command line options with dropbearkey

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
(cherry picked from commit b5cde260487eae86db1661a53e5e5e0823936aab)
[Only add the patches fixing security problems]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Tested-by: Stijn Segers <foss@volatilesystems.org>
2 months agomediatek: filogic: Asus TUF AX6000 fix inverted LED for 2.5Gb LAN port
Patryk Kowalczyk [Tue, 2 Jan 2024 09:37:47 +0000 (10:37 +0100)]
mediatek: filogic: Asus TUF AX6000 fix inverted LED for 2.5Gb LAN port

Router Asus TUF AX6000 have second MaxLinear GPY211 PHY controller for 2.5Gb LAN port.
The 5'th LAN port have inverted status of the LED.
Based on the commit from main branch 90fbec8 we could set proper status of the LED.

Signed-off-by: Patryk Kowalczyk <patryk@kowalczyk.ws>
(cherry picked from commit b22539b5fef9572f9ce2bedcd01d083c918d82f1)
Signed-off-by: Tom Herbers <mail@tomherbers.de>
2 months agokernel: hack: support inverted LEDs on MaxLinear GPY211 PHY
Daniel Golle [Sun, 10 Dec 2023 01:15:36 +0000 (01:15 +0000)]
kernel: hack: support inverted LEDs on MaxLinear GPY211 PHY

Add downstream DT property to setup the PHY LEDs of the MaxLinear
GPY211 PHY in such way that the VDD of the LED is driven by the SoC
pin rather than the GND (which is the default).

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 90fbec89be263a3838558c5b674f3c4072cc2f1d)
[removed patches for kernel 6.1]
Signed-off-by: Tom Herbers <mail@tomherbers.de>
2 months agofilogic: fix wifi eeprom filename for tuf-ax6000 The router use mt7986_eeprom_mt7976_...
Patryk Kowalczyk [Thu, 2 Nov 2023 08:46:36 +0000 (09:46 +0100)]
filogic: fix wifi eeprom filename for tuf-ax6000 The router use mt7986_eeprom_mt7976_dual.bin

Fixes: d522ccecb2 ("filogic: add support for ASUS TUF AX6000")
Signed-off-by: Patryk Kowalczyk <patryk@kowalczyk.ws>
(cherry picked from commit 0c3f4bd85ee6067588a81843a403850ab0082270)
Signed-off-by: Tom Herbers <mail@tomherbers.de>
2 months agoramips: add support for Z-ROUTER ZR-2660
Mikhail Zhilkin [Sat, 2 Mar 2024 19:58:40 +0000 (19:58 +0000)]
ramips: add support for Z-ROUTER ZR-2660

This commit adds support for Z-ROUTER ZR-2660 (also known as Routerich
AX1800) wireless WiFi 6 router.

Specification
-------------
- SoC       : MediaTek MT7621AT, MIPS, 880 MHz
- RAM       : 256 MiB
- Flash     : NAND 128 MiB (AMD/Spansion S34ML01G2)
- WLAN      :
  - 2.4 GHz : MediaTek MT7905D/MT7975 (14c3:7916), b/g/n/ax, MIMO 2x2
  - 5 GHz   : MediaTek MT7915E (14c3:7915), a/n/ac/ax, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x4 (1x WAN, 3x LAN)
- USB       : 1x 2.0
- UART      : 3.3V, 115200n8, pins are silkscreened on the pcb
- Buttons   : 1x Reset
- LEDs      : 1x WiFi 2.4 GHz (green)
              1x WiFi 5 GHz (green)
              1x LAN (green)
              1x WAN (green)
              1x WAN no-internet (red)
- Power     : 12 VDC, 1 A

Installation
------------
1. Run tftp server on your PC (IP: 192.168.2.2) and put OpenWrt initramfs
   image (initramfs.bin) to the tftp root dir
2. Open the following link in the browser to enable telnet:
http://192.168.2.1/cgi-bin/telnet_ssh
3. Connect to the router (default IP: 192.168.2.1) using telnet shell
   (credentials - user:admin)
4. Run the following commands in the telnet shell (this will install
   OpenWrt initramfs image on nand flash):
cd /tmp
tftp -g -r initramfs.bin 192.168.2.2
mtd write initramfs.bin firmware
mtd erase firmware_backup
reboot
5. Copy OpenWrt sysupgrade image (sysupgrade.bin) to the /tmp dir of the
   router
6. Connect to the router (IP: 192.168.1.1) using ssh shell and run
   sysupgrade command:
sysupgrade -n /tmp/sysupgrade.bin

Return to stock
---------------
1. Copy stock firmware (stock.bin) to the /tmp dir of the router using scp
2. Run following command in the router shell:
cd /tmp
mtd write stock.bin firmware
reboot

Recovery
--------
Connect uart (pins are silkscreened on the pcb), interrupt boot process by
pressing any key, use u-boot menu to flash stock firmware image or OpenWrt
initramfs image.

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| LAN     | 24:0f:5e:xx:xx:4c | label     |
| WAN     | 24:0f:5e:xx:xx:4d | label+1   |
| WLAN 2g | 24:0f:5e:xx:xx:4e | label+2   |
| WLAN 5g | 24:0f:5e:xx:xx:4f | label+3   |
+---------+-------------------+-----------+
The WLAN 2.4 MAC was found in 'factory', 0x4
The LAN MAC was found in 'factory', 0xfff4
The WAN MAC was found in 'factory', 0xfffa

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
(cherry picked from commit 1d3d6ef8269aca7ee34fb6ddd1c11d3fe45e785b)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>