openwrt/staging/blocktrron.git
2 years agogeneric: 5.15: allow MV88E6xxx built-in when PTP support disabled
Johnny S. Lee [Thu, 15 Dec 2022 10:57:31 +0000 (18:57 +0800)]
generic: 5.15: allow MV88E6xxx built-in when PTP support disabled

As described in commit 97c77fff28cf001399f33c7bc1ec6687ba18450b
MV88E6xxx driver (NET_DSA_MV88E6XXX) cannot be built-in when PTP
(PTP_1588_CLOCK) is a module in Linux 5.15. But actually it should be
allowed to be built-in when its PTP support (NET_DSA_MV88E6XXX_PTP) is
disabled.

This adds a patch to fix that.

Signed-off-by: Johnny S. Lee <foss@jsl.io>
2 years agotools/libressl: update to 3.7.0
Linhui Liu [Thu, 15 Dec 2022 07:29:38 +0000 (15:29 +0800)]
tools/libressl: update to 3.7.0

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

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2 years agoiproute2: update to 6.1.0
Nick Hainke [Tue, 13 Dec 2022 19:17:58 +0000 (20:17 +0100)]
iproute2: update to 6.1.0

Announcement:
https://lore.kernel.org/netdev/20221214094130.7b11ec2e@hermes.local/T/#t

Refresh patch:
- 170-ip_tiny.patch

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agorules: fix broken commitcount on alpine system
Christian Marangi [Sat, 17 Dec 2022 15:39:00 +0000 (16:39 +0100)]
rules: fix broken commitcount on alpine system

To generate commitcount we use grep --max-count. This is not present on
alpine grep and cause wrong generation. Use -m as it's just the short
version of --max-count and more portable.

Fixes: #11200
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agoimage-commands.mk: Be consistent in command invocation
Olliver Schinagl [Wed, 14 Dec 2022 10:39:17 +0000 (11:39 +0100)]
image-commands.mk: Be consistent in command invocation

Most/all other tools use the staging dir prefix, gzip should as well.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agoramips: add support for SNR-CPE-W4N-MT router
Alexey Bartenev [Mon, 24 Oct 2022 15:50:33 +0000 (22:50 +0700)]
ramips: add support for SNR-CPE-W4N-MT router

General specification:
- SoC Type: MediaTek MT7620N (580MHz)
- ROM: 8 MB SPI-NOR (W25Q64FV)
- RAM: 64 MB DDR (M13S5121632A)
- Switch: MediaTek MT7530
- Ethernet: 5 ports - 5×100MbE (WAN, LAN1-4)
- Wireless 2.4 GHz: b/g/n
- Buttons: 1 button (RESET)
- Bootloader: U-Boot 1.1.3, MediaTek U-Boot: 5.0.0.5
- Power: 12 VDC, 1.0 A

Flash by the native uploader in 2 stages:
1. Use the native uploader to flash an initramfs image. Choose
 openwrt-ramips-mt7620-snr_cpe-w4n-mt-initramfs-kernel.bin file by
 "Administration/Management/Firmware update/Choose File" in vendor's
 web interface (ip: 192.168.1.10, login: Admin, password: Admin).
 Wait ~160 seconds.
2. Flash a sysupgrade image via the initramfs image. Choose
 openwrt-ramips-mt7620-snr_cpe-w4n-mt-squashfs-sysupgrade.bin
 file by "System/Backup/Flash Firmware/Flash image..." in
 LuCI web interface (ip: 192.168.1.1, login: root, no password).
 Wait ~240 seconds.

Flash by U-Boot TFTP method:
1. Configure your PC with IP 192.168.1.131
2. Set up TFTP server and put the
 openwrt-ramips-mt7620-snr_cpe-w4n-mt-squashfs-sysupgrade.bin
 image on your PC
3. Connect serial port (57600 8N1) and turn on the router.
 Then interrupt "U-Boot Boot Menu" by hitting 2 key (select "2:
 Load system code then write to Flash via TFTP.").
Press Y key when show "Warning!! Erase Linux in Flash then burn
 new one. Are you sure? (Y/N)"
Input device IP (192.168.1.1) ==:192.168.1.1
Input server IP (192.168.1.131) ==:192.168.1.131
Input Linux Kernel filename () ==:
openwrt-ramips-mt7620-snr_cpe-w4n-mt-squashfs-sysupgrade.bin
3. Wait ~120 seconds to complete flashing

Signed-off-by: Alexey Bartenev <41exey@proton.me>
2 years agogdb: Do not link against xxhash
Hauke Mehrtens [Sat, 17 Dec 2022 21:10:39 +0000 (22:10 +0100)]
gdb: Do not link against xxhash

libxxhash is now available in the OpenWrt package feed and gdb will link
against it if gdb finds this library. Explicitly deactivate the usage
of xxhash.

This should fix the build of gdb in build bots.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agoath79: add support for KuWFi C910
Davide Fioravanti [Tue, 13 Dec 2022 22:28:08 +0000 (23:28 +0100)]
ath79: add support for KuWFi C910

KuWFi C910 is an 802.11n (300N) indoor router with LTE support.

I can't find anywhere the OEM firmware. So if you want to restore the
original firmware you must do a dump before the OpenWrt flash.

According to the U-Boot, the board name is Iyunlink MINI_V2.

Hardware
--------
SoC:   Qualcomm QCA9533 650/400/200/25/25 MHz (CPU/RAM/AHB/SPI/REF)
RAM:   128 MB DDR2 16-bit CL3-4-4-10 (Nanya NT5TU64M16HG-AC)
FLASH: 16 MB Winbond W25Q128
ETH:
  - 2x 100M LAN (QCA9533 internal AR8229 switch, eth0)
  - 1x 100M WAN (QCA9533 internal PHY, eth1)
WIFI:
  - 2.4GHz: 1x QCA9533 2T2R (b/g/n)
  - 2 external non detachable antennas (near the power barrel side)
LTE:
  - Quectel EC200T-EU (or -CN or -AU depending on markets)
  - 2 external non detachable antennas (near the sim slot side)
BTN:
  - 1x Reset button
LEDS:
  - 5x White leds (Power, Wifi, Wan, Lan1, Lan2)
  - 1x RGB led (Internet)
UART: 115200-8-N-1 (Starting from lan ports in order: GND, RX, TX, VCC)

Everything works correctly.

MAC Addresses
-------------
LAN XX:XX:XX:XX:XX:48 (art@0x1002)
WAN XX:XX:XX:XX:XX:49 (art@0x1002 + 1)
WIFI XX:XX:XX:XX:XX:48

LABEL XX:XX:XX:XX:XX:48

Installation
------------
Turn the router on while pressing the reset button for 4 seconds.
You can simply count the flashes of the first lan led. (See notes)
If done correctly you should see the first lan led glowing slowly and
you should be able to enter the U-Boot web interface.

Click on the second tab ("固件") and select the -factory.bin firmware
then click "Update firmware".

A screen "Update in progress" should appear.

After few minutes the flash should be completed.

This procedure can be used also to recover the router in case of soft
brick.

Backup the original firmware
----------------------------
The following steps are intended for a linux pc. However using the
right software this guide should also work for Windows and MacOS.

1) Install a tftp server on your pc. For example tftpd-hpa.

2) Create two empty files in your tftp folder called:
kuwfi_c910_all_nor.bin
kuwfi_c910_firmware_only.bin

3) Give global write permissions to these files:
chmod 666 kuwfi_c910_all_nor.bin
chmod 666 kuwfi_c910_firmware_only.bin

4) Start a netcat session on your pc with this command:
nc -u -p 6666 192.168.1.1 6666

5) Set the static address on your pc: 192.168.1.2. Connect the router
to your pc.

6) Turn the router on while pressing the reset button for 8-9 seconds.
You can simply count the flashes of the first lan led. If you
press the reset button for too many seconds it will continue
the normal boot, so you have to restart the router. (See notes)

7) If done correctly you should see the U-Boot network console and you
should see the following lines on the netcat session:
Version and build date:
  U-Boot 1.1.4-55f1bca8-dirty, 2020-05-07

Modification by:
  Piotr Dymacz <piotr@dymacz.pl>
  https://github.com/pepe2k/u-boot_mod

u-boot>

8) Start the transfer of the whole NOR:
tftpput 0x9f000000 0x1000000 kuwfi_c910_all_nor.bin

9) The router should start the transfer and it should end with a
message like this (pay attention to the bytes transferred):
TFTP transfer complete!

Bytes transferred: 16777216 (0x1000000)

10) Repeat the same transfer for the firmware:
tftpput 0x9f050000 0xfa0000 kuwfi_c910_firmware_only.bin

11) The router should start the transfer and it should end with a
message like this (pay attention to the bytes transferred):
TFTP transfer complete!

Bytes transferred: 16384000 (0xfa0000)

12) Now you have the backup for the whole nor and for the firmware
partition. If you want to restore the OEM firmware from OpenWrt
you have to flash the kuwfi_c910_firmware_only.bin from the
U-Boot web interface.

WARNING: Don't use the kuwfi_c910_all_nor.bin file. This file
is only useful if you manage to hard brick the router or you
damage the art partition (ask on the forum)

Notes
-----
This router (or at least my unit) has the pepe2k's U-Boot. It's a
modded U-Boot version with a lot of cool features. You can read more
here: https://github.com/pepe2k/u-boot_mod

With this version of U-Boot, pushing the reset button while turning on
the router starts different tools:
 - 3-5 seconds: U-Boot web interface that can be used to replace the
  firmware, the art or the U-Boot itself
 - 5-7 seconds: U-Boot uart console
 - 7-10 seconds: U-Boot network console
 - 11+ seconds: Normal boot

The LTE modem can be used in cdc_ether (ECM) or RNDIS mode.
The default mode is ECM and in this commit only the ECM software is
included. In order to set RNDIS mode you must use this AT command:
AT+QCFG="usbnet",3
In order to use again the ECM mode you must use this AT command:
AT+QCFG="usbnet",1

Look for "Quectel_EC200T_Linux_USB_Driver_User_Guide_V1.0.pdf" for
other AT commands

Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
2 years agoramips: improve support for SIM SIMAX1800T and Haier HAR-20S2U1
Shiji Yang [Mon, 12 Dec 2022 11:25:45 +0000 (11:25 +0000)]
ramips: improve support for SIM SIMAX1800T and Haier HAR-20S2U1

1. Use ARTIFACTS to build factory image. This change allows users to
   generate initramfs factory image using OpenWrt ImageBuilder.

2. Override the default bootargs property defined in "mt7621.dtsi".
   Although we use the "bootargs-override" property to set bootargs,
   the default "bootargs" property will still be written into the
   device tree, so it is better to override it.

Tested on SIM SIMAX1800T

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2 years agoramips: improve support for H3C TX180x series devices
Shiji Yang [Mon, 12 Dec 2022 11:18:41 +0000 (11:18 +0000)]
ramips: improve support for H3C TX180x series devices

1. Explicitly declare gpio pin groups to ensure that gpio works properly.

2. Override bootargs in device tree to avoid modifying u-boot envs during
   initial installation.

Tested on H3C TX1801 Plus

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
2 years agosunxi: fix board_name for MarsBoard A10
Chukun Pan [Mon, 10 Oct 2022 15:08:27 +0000 (23:08 +0800)]
sunxi: fix board_name for MarsBoard A10

The compatible in the device tree is "haoyu,a10-marsboard",
modify the board_name to keep it consistent.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2 years agosunxi: fix typo in device packages for MarsBoard A10
Chukun Pan [Sun, 9 Oct 2022 15:15:28 +0000 (23:15 +0800)]
sunxi: fix typo in device packages for MarsBoard A10

The kmod prefix for sound-soc-sunxi is missing, fix it.
Also add kmod-sound-core as dependence.

Fixes: 6a35659 ("sunxi: Added profile for HAOYU Electronics Marsboard A10")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
2 years agoath79: convert WiFis based on ar7241_ubnt_unifi.dtsi to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 16:04:14 +0000 (17:04 +0100)]
ath79: convert WiFis based on ar7241_ubnt_unifi.dtsi to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

While working on it remove stale uboot partition label and merge art
into partition node.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoath79: convert Buffalo WZR-HP-G302H A1A0 WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 14:17:26 +0000 (15:17 +0100)]
ath79: convert Buffalo WZR-HP-G302H A1A0 WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Merge art into partition node.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoath79: convert OpenMesh OM2P v1 WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 17:18:16 +0000 (18:18 +0100)]
ath79: convert OpenMesh OM2P v1 WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Merge art into partition node.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoath79: convert OpenMesh OM5P-AN WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 17:13:55 +0000 (18:13 +0100)]
ath79: convert OpenMesh OM5P-AN WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Merge art into partition node.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoath79: convert boards based on ar9344_openmesh_mr600.dtsi to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 17:09:21 +0000 (18:09 +0100)]
ath79: convert boards based on ar9344_openmesh_mr600.dtsi to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Merge art into partition node.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agostrace: update to 6.1
Nick Hainke [Tue, 13 Dec 2022 19:05:07 +0000 (20:05 +0100)]
strace: update to 6.1

Release Notes:
https://github.com/strace/strace/releases/tag/v6.1

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agotools/bash: update to 5.2.15
Linhui Liu [Thu, 15 Dec 2022 12:11:16 +0000 (20:11 +0800)]
tools/bash: update to 5.2.15

Update to the latest released version.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2 years agotrace-cmd: update to v3.1.5
Nick Hainke [Thu, 15 Dec 2022 13:42:35 +0000 (14:42 +0100)]
trace-cmd: update to v3.1.5

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agolibtracefs: update to 1.6.3
Nick Hainke [Thu, 15 Dec 2022 13:40:55 +0000 (14:40 +0100)]
libtracefs: update to 1.6.3

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agolibtraceevent: update to 1.7.0
Nick Hainke [Thu, 15 Dec 2022 13:38:50 +0000 (14:38 +0100)]
libtraceevent: update to 1.7.0

Update to latest release.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agokernel: Make use of KERNEL_MAKE
Hauke Mehrtens [Wed, 14 Dec 2022 21:34:19 +0000 (22:34 +0100)]
kernel: Make use of KERNEL_MAKE

Make use of KERNEL_MAKE in kernel packages were easily possible.
This moves some more code to common places and reduces the number of
lines.

It is defined like this:
KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS)
KERNEL_MAKEOPTS = -C $(LINUX_DIR) $(KERNEL_MAKE_FLAGS)

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agokernel: Make KERNEL_MAKEOPTS recursively expanded
Hauke Mehrtens [Wed, 14 Dec 2022 15:29:16 +0000 (16:29 +0100)]
kernel: Make KERNEL_MAKEOPTS recursively expanded

KERNEL_MAKEOPTS will get expanded when it is used and not when it is
defined in the kernel.mk file now. This fixes problems finding dependent
kernel modules when it is used by a kernel module package.

Without this change the build of packages which depend on other out of
tree modules failed when they used KERNEL_MAKE because some symbols could
not be found. This happened because KERNEL_MAKE_FLAGS which contains a
"if $(__package_mk)" was  evaluated where KERNEL_MAKEOPTS was defined
and not when the KERNEL_MAKE was used. For packages which included
kernel.mk before package.mk we saw this problem. One workaround
was to use the correct include order and the other one was to not
use KERNEL_MAKE_FLAGS, but copy its content.

Signed-off-by: Hauke Mehrtens <hmehrtens@maxlinear.com>
2 years agotools/mpc: update to 1.3.1
Linhui Liu [Fri, 16 Dec 2022 02:32:44 +0000 (10:32 +0800)]
tools/mpc: update to 1.3.1

Version 1.3.1 new features:
Bug fix: It is again possible to include mpc.h without including stdio.h.
Version 1.3.0 new features:
    New function: mpc_agm
    New rounding modes "away from zero", indicated by the letter "A" and corresponding to MPFR_RNDA on the designated real or imaginary part.
    New experimental ball arithmetic.
    New experimental function: mpc_eta_fund
    Bug fixes:
        mpc_asin for asin(z) with small |Re(z)| and tiny |Im(z)|
        mpc_pow_fr: sign of zero part of result when the base has up to sign the same real and imaginary part, and the exponent is an even positive integer
        mpc_fma: the returned int value was incorrect in some cases (indicating whether the rounded real/imaginary parts were smaller/equal/greater than the exact values), but the computed complex value was correct.
    Remove the unmaintained Makefile.vc; build files for Visual Studio are maintained independently by Brian Gladman.

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2 years agotools/ccache: update to 4.7.4
Linhui Liu [Thu, 15 Dec 2022 05:12:08 +0000 (13:12 +0800)]
tools/ccache: update to 4.7.4

Release Notes:
    https://ccache.dev/releasenotes.html#_ccache_4_7_3
    https://ccache.dev/releasenotes.html#_ccache_4_7_4

Signed-off-by: Linhui Liu <liulinhui36@gmail.com>
2 years agomediatek: redmi-ax6000: drop cs-gpios
Chuanhong Guo [Sat, 17 Dec 2022 07:07:54 +0000 (15:07 +0800)]
mediatek: redmi-ax6000: drop cs-gpios

'cs-gpios = <0>, <0>' is a hack in ath79 to override the incorrectly
specified maximum number of chipselects available in spi-ath79.c.
It's not needed here and must have been copied here by mistake.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2 years agomediatek: add alternative stock layout for Xiaomi Redmi Router AX6000
Chen Minqiang [Tue, 13 Sep 2022 05:46:20 +0000 (13:46 +0800)]
mediatek: add alternative stock layout for Xiaomi Redmi Router AX6000

In this implementation, the flash partition layout is adjusted to avoid
modifying the uboot environment of mtdparts. This ensures that the 30M
ubi_kernel partition remains aligned with the stock ubi partition, and
the kernel volume is placed in it. This allows the stock uboot to boot
from it without changing the mtdparts, which is useful for reverting back
to the stock firmware using Xiaomi Firmware Tools. In actual testing,
modifying mtdparts has been found to break Xiaomi Firmware Tools.

1. use ARTIFACTS to generate initramfs-factory.ubi for easy installation.
2. The NAND flash layout is changed to allow for reverting back to the
   stock firmware.
3. Before performing sysupgrade, do some cleanup in platform_pre_upgrade
   to ensure a clean installation of OpenWRT.
4. Setup the uboot env to ensure that the system always boot, which can
   be helpful for users who may forget to do this before sysupgrade in
   the initramfs.

New flash instructions:
1. Gain ssh access. Please refer to:
   https://openwrt.org/toh/xiaomi/redmi_ax6000#installation)

2. Check which system current u-boot is loading from:
   COMMAND: `cat /proc/cmdline`
   sample OUTPUT: `console=ttyS0,115200n1 loglevel=8 firmware=1 uart_en=1`
   if firmware=1, current system is ubi1
   if firmware=0, current system is ubi0

3. Setup nvram and write the firmware:
   If the current system is ubi1, please set it up so that the next time
   it will boot from ubi, and write the firmware to 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
ubiformat /dev/mtd8 -y -f /tmp/initramfs-factory.ubi
```
   If the current system is ubi, please set it up so that the next time
   it will boot from ubi1, and write the firmware to ubi1:
```
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
ubiformat /dev/mtd9 -y -f /tmp/initramfs-factory.ubi
```

4. After rebooting, the system should now boot into the openwrt initramfs.
   Flash the squashfs-sysupgrade.bin via using ssh or luci.
```
sysupgrade -n /tmp/squashfs-sysupgrade.bin
```
Done.

For existing users of the Redmi AX6000 running OpenWrt, here are the steps to
switch to this new layout:

1. Flash initramfs-factory.ubi
```
mtd -r -e ubi write /tmp/initramfs-factory.ubi ubi
```

2. After rebooting, the system will boot into the new openwrt-initramfs.
Log in and perform a sysupgrade to complete the process.
```
sysupgrade -n /tmp/squashfs-sysupgrade.bin
```

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2 years agobase-files: sysupgrade-tar: allow separated kernel/rootfs ubi
Chuanhong Guo [Sun, 11 Dec 2022 11:56:13 +0000 (19:56 +0800)]
base-files: sysupgrade-tar: allow separated kernel/rootfs ubi

There are some devices putting kernel and rootfs on separated
ubi volumes. To make OpenWrt compatible with their bootloader,
we need to put kernel and rootfs into separated ubi volumes.
Add support for CI_KERN_UBIPART and CI_ROOT_UBIPART for this
situation.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2 years agobase-files: split ubi attaching out of nand_upgrade_prepare_ubi
Chuanhong Guo [Sun, 11 Dec 2022 10:25:42 +0000 (18:25 +0800)]
base-files: split ubi attaching out of nand_upgrade_prepare_ubi

split ubi reformat/attach into nand_attach_ubi in preparation
for reusing this code in other functions.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2 years agogeneric: add support for EON EN25QX128A spi nor flash
Christian Marangi [Fri, 14 Oct 2022 19:00:39 +0000 (21:00 +0200)]
generic: add support for EON EN25QX128A spi nor flash

Add support for EON EN25QX128A spi nor flash with no flags as it does
support SFDP parsing.

Fixes: #9442
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Tested-by: Szabolcs Hubai <szab.hu@gmail.com> [ramips/mt7621: xiaomi_mi-router-4a-gigabit]
2 years agoCI: introduce target toolchain test
Christian Marangi [Tue, 6 Dec 2022 23:52:41 +0000 (00:52 +0100)]
CI: introduce target toolchain test

Add test to build test toolchain for each target.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agoCI: build: make kernel build configurable
Christian Marangi [Wed, 7 Dec 2022 13:44:34 +0000 (14:44 +0100)]
CI: build: make kernel build configurable

Make kernel build configurable to permit to introduce toolchain testing.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agoCI: improve build naming for shared workflow
Christian Marangi [Thu, 8 Dec 2022 13:59:40 +0000 (14:59 +0100)]
CI: improve build naming for shared workflow

Impove build naming for build shared workflow to better understand what
is being test.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agomediatek: add LED support for Xiaomi Redmi AX6000
Furong Xu [Fri, 16 Dec 2022 13:21:33 +0000 (21:21 +0800)]
mediatek: add LED support for Xiaomi Redmi AX6000

add DT nodes and default package for the LEDs on Redmi AX6000

Signed-off-by: Furong Xu <xfr@outlook.com>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2 years agomediatek: enable sel_clk for spi-mt65xx
Furong Xu [Fri, 16 Dec 2022 13:13:37 +0000 (21:13 +0800)]
mediatek: enable sel_clk for spi-mt65xx

Without explicitly enabling sel_clk, clk_disable_unused() will disable
it when boot is done, causing CPU hang on SPI1 register access on MT7986.
Explicitly enable sel_clk to make SPI1 functional.

Signed-off-by: Furong Xu <xfr@outlook.com>
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2 years agokernel: add driver package for WS2812B LEDs
Chuanhong Guo [Fri, 16 Dec 2022 12:41:33 +0000 (20:41 +0800)]
kernel: add driver package for WS2812B LEDs

Two WS2812B (NeoPixel) clones are used in Xiaomi Redmi AX6000 as
indicator lights. Add a driver for controlling it using SPI MOSI.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
2 years agomac80211: fix a regression in processing management frames for AP VLAN interfaces
Felix Fietkau [Fri, 16 Dec 2022 13:31:55 +0000 (14:31 +0100)]
mac80211: fix a regression in processing management frames for AP VLAN interfaces

Fixes re-assoc of WDS stations

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agohostapd: enable coredumps
Felix Fietkau [Fri, 16 Dec 2022 12:09:36 +0000 (13:09 +0100)]
hostapd: enable coredumps

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agohostapd: always set a default for the nas identifier
Felix Fietkau [Fri, 16 Dec 2022 11:53:05 +0000 (12:53 +0100)]
hostapd: always set a default for the nas identifier

It is used for both 802.11r and WPA enterprise.
Setting it when not needed is harmless

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agomac80211: work around a race condition on detecting a phy while bringing it up
Felix Fietkau [Fri, 16 Dec 2022 10:37:30 +0000 (11:37 +0100)]
mac80211: work around a race condition on detecting a phy while bringing it up

When reloading modules and running wifi, a phy can sometimes be renamed
while in the middle of a hotplug call that tries to detect new phys
This can lead to bogus wifi-device sections being created

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agomac80211: fix uninitialized variable in rx->link/link_sta initialization fix
Felix Fietkau [Fri, 16 Dec 2022 10:12:51 +0000 (11:12 +0100)]
mac80211: fix uninitialized variable in rx->link/link_sta initialization fix

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agohostapd: add support for automatically setting RADIUS own-ip dynamically
Felix Fietkau [Thu, 15 Dec 2022 12:57:04 +0000 (13:57 +0100)]
hostapd: add support for automatically setting RADIUS own-ip dynamically

Some servers use the NAS-IP-Address attribute as a destination address

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agorpcd: update to latest Git HEAD
Jo-Philipp Wich [Thu, 15 Dec 2022 23:27:02 +0000 (00:27 +0100)]
rpcd: update to latest Git HEAD

7de4820 iwinfo: add "hwmodes_text" to the info output
b3f530b iwinfo: clean up rpc_iwinfo_call_hw_ht_mode()
c46ad61 iwinfo: reuse infos provided by libiwinfo
6c5e900 iwinfo: constify string map arg for rpc_iwinfo_call_int()

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2 years agoiwinfo: update to latest Git HEAD
Jo-Philipp Wich [Thu, 15 Dec 2022 23:18:08 +0000 (00:18 +0100)]
iwinfo: update to latest Git HEAD

8d15809 cli: print current HT mode
8f86dd6 cli: use IWINFO_HTMODE_COUNT
f36b72b cli: use IWINFO_KMGMT_NAMES
91be7e0 cli: use IWINFO_CIPHER_NAMES
49b6ec9 cli: fix printing the scan channel width
b1c8873 cli: fix marking the active channel
9e14e64 utils: add iwinfo_band2ghz() and iwinfo_ghz2band() helpers
e084781 utils: add helper functions to get names by values
d09a77a utils: add iwinfo_htmode_is_{ht|vht|he} helpers
8752977 utils: add and use iwinfo_format_hwmodes()
02f433e lib: add IWINFO_80211_COUNT and IWINFO_80211_NAMES
1d30df1 lib: add IWINFO_BAND_COUNT and IWINFO_BAND_NAMES
aefd0ef lib: use common IWINFO_CIPHER_NAMES strings
a5b30de lib: add IWINFO_OPMODE_COUNT and use it for IWINFO_OPMODE_NAMES
9f29e79 lib: constify and fixup the string array definitions
fddc015 nl80211: mark frequencies where HE operation in not allowed
6d50a7c nl80211: add support for HE htmodes
4ba5713 nl80211: properly get available bands for the hwmode
91b2ada nl80211: update the kernel header nl80211.h
3f619a5 nl80211: fix frequency/channel conversion for the 6G band
a77d915 nl80211: don't guess if a name is an ifname
c27ce71 devices: add usb device MediaTek MT7921AU
14f864e nl80211: add ability to describe USB devices
a5a75fd nl80211: remove ancient wpa_supplicant ctrl socket path
dd4e1ff nl80211: fix wpa supplicant ctrl socket permissions
d638163 fix -Wdangling-else warnings
4aa6c5a fix -Wreturn-type warning
3112726 fix -Wpointer-sign warning
ebd5f84 fix -Wmaybe-uninitialized warning
5469898 fix -Wunused-variable warnings
462b679 fix -Wduplicate-decl-specifier warnings
ccaabb4 fix -Wformat-truncation warnings
50380db enable useful compiler warnings via -Wall

Fixes: https://github.com/openwrt/openwrt/issues/10158
Fixes: https://github.com/openwrt/openwrt/issues/10687
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2 years agorealtek: add Linux Kernel 5.15 as testing version
INAGAKI Hiroshi [Tue, 29 Mar 2022 05:50:13 +0000 (14:50 +0900)]
realtek: add Linux Kernel 5.15 as testing version

Add Linux Kernel 5.15 support for testing.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[APRESIA ApresiaLightGS120GT-SS, Panasonic Switch-M24eG PN28240K, Switch-M48eG PN28480K]
Tested-by: INAGAKI Hiroshi <musashino.open@gmail.com>
TP-Link TL-SG2008P
Tested-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
[D-Link DGS-1210-20, DGS-1210-52, Zyxel XGS1010-12]
Tested-by: Markus Stockhausen <markus.stockhausen@gmx.de>
[Zyxel XGS1250-12]
Tested-by: Lucian Cristian <lucian.cristian@gmail.com> # Zyxel
[HPE 1920-8G, 1920-48G]
Tested-by: Jan Hoffmann <jan@3e8.eu>
2 years agorealtek: enable needs_standalone_vlan_filtering on DSA driver in 5.15
INAGAKI Hiroshi [Mon, 4 Apr 2022 12:25:20 +0000 (21:25 +0900)]
realtek: enable needs_standalone_vlan_filtering on DSA driver in 5.15

To configure VLAN 0, enable needs_standalone_vlan_filtering option
of dsa_switch struct.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2 years agorealtek: update dsa.c of DSA driver for 5.15
INAGAKI Hiroshi [Wed, 1 Dec 2021 09:38:11 +0000 (18:38 +0900)]
realtek: update dsa.c of DSA driver for 5.15

- rtl83xx_vlan_filtering()

  "struct switchdev_trans *trans" parameter was removed[1] and
  "struct netlink_ext_ack *extack" was added[2].

[1]: https://www.spinics.net/lists/netdev/msg712250.html
[2]: https://www.spinics.net/lists/netdev/msg722496.html

- rtl83xx_vlan_add/del()

  vlan->vid_begin and vlan->vid_end were removed and vlan->vid was
  added[3].

[3]: https://www.spinics.net/lists/netdev/msg712248.html

- rtl83xx_vlan_prepare()

  "port_vlan_prepare" member was removed from "dsa_switch_ops" struct
  in dsa.h[4] and vlan_prepare function should be called from vlan_add
  function. Also, change return type of vlan_add function to int.

[4]: https://www.spinics.net/lists/netdev/msg712252.html

- rtl83xx_port_mdb_add()

  "port_mdb_prepare" member in "dsa_switch_ops" struct was removed and
  preparation need to be done in the function of "port_mdb_add" member
  instead. And also, int type need to be returned on "port_mdb_add"
  member[5].

[5]: https://www.spinics.net/lists/netdev/msg712251.html

- rtl83xx_port_pre_bridge_flags(), rtl83xx_port_bridge_flags()

  The current "port_pre_bridge_flags" member and "port_bridge_flags"
  member in "dsa_switch_ops" in dsa.h has flags of
  "struct switchdev_brport_flags" type instead[6], so adjust to it.
  And, the changed features are passed by flags.mask[7] in
  rtl83xx_port_bridge_flags(), so check it before calling function
  to enable/disable fieature.

[6]: https://lore.kernel.org/lkml/20210212151600.3357121-7-olteanv@gmail.com/
[7]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e18f4c18ab5b0dd47caaf8377c2e36d66f632a8c

Suggested-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[shorten final return statement of rtl83xx_port_mdb_add()]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agorealtek: update platform support for 5.15
INAGAKI Hiroshi [Wed, 1 Dec 2021 03:25:54 +0000 (12:25 +0900)]
realtek: update platform support for 5.15

- fw_passed_dtb and others were replaced to get_fdt() function[1]
- __appended_dtb defined by asm/bootinfo.h[2]

[1]: https://www.spinics.net/lists/linux-mips/msg03332.html
[2]: https://www.spinics.net/lists/linux-mips/msg03332.html

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2 years agorealtek: refresh config-5.15 in all subtargets
INAGAKI Hiroshi [Fri, 9 Sep 2022 16:40:43 +0000 (01:40 +0900)]
realtek: refresh config-5.15 in all subtargets

Refresh config-5.15 in all subtargets by kernel_menuconfig.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2 years agorealtek: refresh patches in 5.15
INAGAKI Hiroshi [Fri, 9 Sep 2022 16:15:22 +0000 (01:15 +0900)]
realtek: refresh patches in 5.15

Adjust patches for kernel 5.15.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2 years agorealtek: drop patches of upstreamed fix and changes from 5.15
INAGAKI Hiroshi [Tue, 29 Mar 2022 06:15:07 +0000 (15:15 +0900)]
realtek: drop patches of upstreamed fix and changes from 5.15

- 007-5.16-gpio-realtek...: upstreamed on 5.16 and backported to 5.15.3
- 708-brflood-spi.patch   : upstreamed
- 709-lag-offloading.patch: upstreamed
- 713-v5.12-net-dsa-...   : upstreamed and some implementations are
                            replaced

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2 years agorealtek: drop patches of upstreamed drivers from 5.15
INAGAKI Hiroshi [Fri, 22 Jul 2022 13:05:51 +0000 (22:05 +0900)]
realtek: drop patches of upstreamed drivers from 5.15

The following drivers were upstreamed and available on 5.15, so drop
from OpenWrt tree.

- realtek-otto-gpio (5.13)
- realtek-rtl-spi (5.12)
- realtek-rtl-intc (5.12)

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2 years agorealtek: copy dts/files/patches/configs for 5.15
INAGAKI Hiroshi [Fri, 9 Sep 2022 13:08:16 +0000 (22:08 +0900)]
realtek: copy dts/files/patches/configs for 5.15

Copy dts/files/patches/configs from 5.10 to 5.15.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
[refresh with updated DGS-1210 dts files]
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agofirmware-utils: fix archive checksum
Sander Vanheule [Thu, 15 Dec 2022 16:44:38 +0000 (17:44 +0100)]
firmware-utils: fix archive checksum

PKG_SOURCE_DATE was modified after updating PKG_MIRROR_HASH, causing the
latter to change. This results in a warning during builds and rejected
downloads.

Fixes: 232879a7b7f8 ("firmware-utils: bump to git HEAD")
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agoath79: fix dtc warnings in ruckus zf7372
Christian Lamparter [Thu, 15 Dec 2022 14:29:04 +0000 (15:29 +0100)]
ath79: fix dtc warnings in ruckus zf7372

|:69.4-14: Warning (reg_format): beamforming-2g-gpio@0:reg: property has invalid length (4 bytes)
|:85.4-14: Warning (reg_format): beamforming-5g-gpio@0:reg: property has invalid length (4 bytes)

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoath79: fix dtc warnings in eap1750h
Christian Lamparter [Thu, 15 Dec 2022 14:25:45 +0000 (15:25 +0100)]
ath79: fix dtc warnings in eap1750h

|109.3-19: Warning (reg_format): macaddr@0:reg:property has invalid length (8 bytes)
|113.3-24: Warning (reg_format): calibration@1000:reg: property has invalid length (8 bytes)
|117.3-24: Warning (reg_format): calibration@5000:reg: property has invalid length (8 bytes)

also integrate the art-nodes nodes back into the partition-subnode
and change the calibration labels to match what everyone else is
doing.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoath79: fix dtc warnings in eap1200h
Christian Lamparter [Thu, 15 Dec 2022 14:20:26 +0000 (15:20 +0100)]
ath79: fix dtc warnings in eap1200h

|109.3-19: Warning (reg_format): macaddr@0:reg:property has invalid length (8 bytes)
|113.3-24: Warning (reg_format): calibration@1000:reg: property has invalid length (8 bytes)
|117.3-24: Warning (reg_format): calibration@5000:reg: property has invalid length (8 bytes)

also integrate the art-nodes nodes back into the partition-subnode
and change the calibration labels to match what everyone else is
doing.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoath79: replace reference to legacy qca,disable-2ghz in WatchGuard AP100
Nick Hainke [Thu, 15 Dec 2022 09:45:24 +0000 (10:45 +0100)]
ath79: replace reference to legacy qca,disable-2ghz in WatchGuard AP100

Commit 4c8dd973ef8e ("ath9k: OF: qca,disable-(2|5)ghz => ieee80211-freq-limit")
removed "qca,disable-5ghz" and "qca,disable-2ghz".

Signed-off-by: Nick Hainke <vincent@systemli.org>
(converted patch to remove the ieee80211-freq-limit property instead)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoath79: switch to upstream ieee80211-freq-limit for Araknis AN-300-AP-I-N
Nick Hainke [Thu, 15 Dec 2022 09:41:47 +0000 (10:41 +0100)]
ath79: switch to upstream ieee80211-freq-limit for Araknis AN-300-AP-I-N

Commit 4c8dd973ef8e ("ath9k: OF: qca,disable-(2|5)ghz => ieee80211-freq-limit")
removed "qca,disable-5ghz" and "qca,disable-2ghz". Switch to upstream
ieee80211-freq-limit.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoath79: convert Winchannel WB2000 WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 09:08:39 +0000 (10:08 +0100)]
ath79: convert Winchannel WB2000 WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(removed mtd-cal-data property, merged art + addr nodes back into
partition)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoath79: convert Ubiquiti UniFi AP Pro WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 08:57:28 +0000 (09:57 +0100)]
ath79: convert Ubiquiti UniFi AP Pro WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(merged art node back into partition-node)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoath79: convert OCEDO Raccoon WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 08:54:57 +0000 (09:54 +0100)]
ath79: convert OCEDO Raccoon WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(merged art into partition node, removed stale uboot label)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoath79: Mercury MW4530R v1 already uses nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 08:50:39 +0000 (09:50 +0100)]
ath79: Mercury MW4530R v1 already uses nvmem-cells

Remove the caldata extraction in userspace. The board already uses
nvmem-cells since
commit e354b01baf88 ("ath79: calibrate all ar9344 tl-WDRxxxx with nvmem")

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoath79: convert boards based on senao_ap-dual.dtsi WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 08:44:55 +0000 (09:44 +0100)]
ath79: convert boards based on senao_ap-dual.dtsi WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agoath79: convert Atheros DB120 WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 08:29:57 +0000 (09:29 +0100)]
ath79: convert Atheros DB120 WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
(merged art-node back into partition-node)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agoath79: convert Araknis AN-300-AP-I-N WiFis to nvmem-cells
Nick Hainke [Thu, 15 Dec 2022 08:20:22 +0000 (09:20 +0100)]
ath79: convert Araknis AN-300-AP-I-N WiFis to nvmem-cells

Pull the calibration data from the nvmem subsystem. This allows us to
move userspace caldata extraction into the device-tree definition.

Signed-off-by: Nick Hainke <vincent@systemli.org>
2 years agobcm27xx: bcm2711: add kmod-r8169
Johannes Heimansberg [Mon, 12 Dec 2022 14:39:58 +0000 (15:39 +0100)]
bcm27xx: bcm2711: add kmod-r8169

Some carrier boards [1][2] for the Raspberry Pi CM4 that are specifically
designed to be used as routers come with secondary NICs using a Realtek
RTL8111 Gigabit Ethernet chip.

When using such a board as a router with OpenWrt, it is very helpful
when both NICs are working by default. Since the Raspberry Pi 4 and the
CM4 have plenty of disk space, it should cause no harm to include the
kmod-r8169.

[1] https://wiki.dfrobot.com/Compute_Module_4_IoT_Router_Board_Mini_SKU_DFR0767
[2] https://www.waveshare.com/wiki/CM4-DUAL-ETH-MINI

Signed-off-by: Johannes Heimansberg <git@jhe.dedyn.io>
(r8169 should pull in the necessary dependencies.)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agobcm53xx: Patch to support BCMA rev 11
Linus Walleij [Wed, 14 Dec 2022 00:15:48 +0000 (01:15 +0100)]
bcm53xx: Patch to support BCMA rev 11

A backported patch to the BCMA driver necessary to support the
DWL-8610AP and DIR-890L. Patch will be in upstream v6.2.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agofirmware-utils: bump to git HEAD
Sander Vanheule [Thu, 15 Dec 2022 13:24:25 +0000 (14:24 +0100)]
firmware-utils: bump to git HEAD

Adds support for building TP-Link CPE605v1 factory images

    bd856eff4850 tplink-safeloader: add TP-Link CPE605 v1 Support

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2 years agokernel: bump 5.10 to 5.10.159
John Audia [Wed, 14 Dec 2022 15:13:21 +0000 (10:13 -0500)]
kernel: bump 5.10 to 5.10.159

Removed upstreamed:
backport-5.10/888-v6.1-ca8210-Fix-crash-by-zero-initializing-data.patch[1]

All patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.159&id=0a8e66e375736ea12c11f0ef238ba2a8efec460b

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

Signed-off-by: John Audia <therealgraysky@proton.me>
2 years agokernel: bump 5.15 to 5.15.83
John Audia [Wed, 14 Dec 2022 15:11:04 +0000 (10:11 -0500)]
kernel: bump 5.15 to 5.15.83

Removed upstreamed:
backport-5.15/883-v6.1-ca8210-Fix-crash-by-zero-initializing-data.patch[1]

All patches automatically rebased

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.83&id=246bcd05ba6cc43b34ac0bb4bac3ea94a4efa07c

Build system: x86_64
Build-tested: bcm2711/RPi4B
Run-tested: bcm2711/RPi4B

Signed-off-by: John Audia <therealgraysky@proton.me>
2 years agotools/dosfstools: fix PKG_SOURCE
Stijn Tintel [Wed, 14 Dec 2022 18:11:45 +0000 (20:11 +0200)]
tools/dosfstools: fix PKG_SOURCE

Both mirrors provided in the Makefile only serve gzipped tarballs.

Fixes: #10871
Fixes: 9edfe7dd13d9 ("source: Switch to xz for packages and tools where possible")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2 years agokernel: add missing symbol to 5.10 config
Stijn Tintel [Wed, 14 Dec 2022 17:17:43 +0000 (19:17 +0200)]
kernel: add missing symbol to 5.10 config

Kernel 5.10.158 added a prompt for the FUNCTION_ERROR_INJECTION symbol.
This is exposed in builds with CONFIG_KERNEL_KPROBES enabled, causing
those builds to fail due to a missing symbol. Add the symbol to fix
this.

Fixes: 6801c460b6a7 ("kernel: bump 5.10 to 5.10.158")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2 years agokernel: add missing symbol to 5.15 config
Stijn Tintel [Wed, 14 Dec 2022 17:10:48 +0000 (19:10 +0200)]
kernel: add missing symbol to 5.15 config

Kernel 5.15.82 added a prompt for the FUNCTION_ERROR_INJECTION symbol.
This is exposed in builds with CONFIG_KERNEL_KPROBES enabled, causing
those builds to fail due to a missing symbol. Add the symbol to fix
this.

Fixes: 68426e54eda4 ("kernel: bump 5.15 to 5.15.82")
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2 years agoqoriq: switch to kernel 5.15
Stijn Tintel [Wed, 14 Dec 2022 16:53:39 +0000 (18:53 +0200)]
qoriq: switch to kernel 5.15

The testing kernel has been running fine for months on a rather complex
network setup, with one exception being a crash in
__xfrm_state_delete(). This crash has been fixed in kernel 5.15.82, so
let's switch the qoriq target to kernel 5.15 by default.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2 years agomac80211: fix connecting multiple wds stations to an AP
Felix Fietkau [Wed, 14 Dec 2022 12:53:40 +0000 (13:53 +0100)]
mac80211: fix connecting multiple wds stations to an AP

A faulty check prevented the AP_VLAN interfaces from being brought up

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agoipq806x: 5.15: standardize wpq864 partition table
Christian Marangi [Wed, 14 Dec 2022 01:17:24 +0000 (02:17 +0100)]
ipq806x: 5.15: standardize wpq864 partition table

Compex WPQ864 contains a non standard partition table. Each partition
node should be named partition and should contain a valid reg.
Fix an extra "-" present after the reg for SBL2_1 partition.

Also add "0:" to each qcom default partition following smem naming.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agoipq806x: 5.15: fix wrong boot-partitions values for split partitions
Christian Marangi [Wed, 14 Dec 2022 01:11:49 +0000 (02:11 +0100)]
ipq806x: 5.15: fix wrong boot-partitions values for split partitions

The refreshed patch actually use the format of <start size start size>
instead of <start end start end>. This cause boot fail since the rootfs
can't be mounted with these wrong values.

Fix it to the correct format in each affected dts.

Fixes: #11498
Fixes: 6134ba4a34db ("ipq806x: 5.15: add boot-partitions binding to fix block warning")
Tested-by: Matt Buczko <mbuczko@hotmail.com> # Askey RT4230W
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agolibpcap: add support for B.A.T.M.A.N. Advanced
Linus Lüssing [Sun, 27 Nov 2022 15:27:47 +0000 (16:27 +0100)]
libpcap: add support for B.A.T.M.A.N. Advanced

This adds support for the layer 2 mesh routing protocol
B.A.T.M.A.N. Advanced. "batadv" can be used to filter on batman-adv
packets. It also allows later filters to look at frames inside the
tunnel when both "version" and "type" are specified.

Documentation for the batman-adv protocol can be found at the following
locations:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/batman-adv.rst
https://www.open-mesh.org/

--

This is a backport of the following upstream pull request:

https://github.com/the-tcpdump-group/libpcap/pull/980
-> "Add support for B.A.T.M.A.N. Advanced #980"

Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue>
2 years agoath79: add support for TP-Link CPE605-v1
Andrew Cameron [Sun, 6 Nov 2022 14:43:37 +0000 (14:43 +0000)]
ath79: add support for TP-Link CPE605-v1

TP-Link CPE605-v1 is an outdoor wireless CPE for 5 GHz with
one Ethernet port based on Atheros AR9344

Specifications:
 - 560/450/225 MHz (CPU/DDR/AHB)
 - 1x 10/100 Mbps Ethernet
 - 64 MB of DDR2 RAM
 - 8 MB of SPI-NOR Flash
 - 23dBi high-gain directional antenna and a dedicated metal reflector
 - Power, LAN, WLAN5G green LEDs
 - 3x green RSSI LEDs

Flashing instructions:
 Flash factory image through stock firmware WEB UI or through TFTP
 To get to TFTP recovery just hold reset button while powering on for
 around 4-5 seconds and release.
 Rename factory image to recovery.bin
 Stock TFTP server IP:192.168.0.100
 Stock device TFTP adress:192.168.0.254

Signed-off-by: Andrew Cameron <apcameron@softhome.net>
2 years agoramips: add support for Etisalat S3
Mikhail Zhilkin [Sun, 27 Nov 2022 14:01:58 +0000 (14:01 +0000)]
ramips: add support for Etisalat S3

Etisalat S3 is a wireless WiFi 5 router manufactured by Sercomm company.

Device specification
--------------------
SoC Type: MediaTek MT7621AT
RAM: 256 MiB
Flash: 128 MiB
Wireless 2.4 GHz (MT7603EN): b/g/n, 2x2
Wireless 5 GHz (MT7615E): a/n/ac, 4x4
Ethernet: 5x GbE (WAN, LAN1, LAN2, LAN3, LAN4)
USB ports: 1x USB3.0
Button: 2 buttons (Reset & WPS)
LEDs:
   - 1x Status (RGB)
   - 1x 2.4G (blue, hardware, mt76-phy0)
   - 1x 5G (blue, hardware, mt76-phy1)
Power: 12 VDC, 1.5 A
Connector type: barrel
Bootloader: U-Boot

Installation
-----------------
1.  Login to the router web interface under admin account
2.  Navigate to Settings -> Configuration -> Save to Computer
3.  Decode the configuration. For example, using cfgtool.py tool (see
    related section):
       cfgtool.py -u configurationBackup.cfg
4.  Open configurationBackup.xml and find the following line:
    <PARAMETER name="Password" type="string" value="<your router serial \
       is here>" writable="1" encryption="1" password="1"/>
5.  Insert the following line after and save:
<PARAMETER name="Enable" type="boolean" value="1" writable="1" encryption="0"/>
6.  Encode the configuration. For example, using cfgtool.py tool:
       cfgtool.py -p configurationBackup.xml
7.  Upload the changed configuration (configurationBackup_changed.cfg) to
    the router
8.  Login to the router web interface (SuperUser:ETxxxxxxxxxx, where
    ETxxxxxxxxxx is the serial number from the backplate label)
9.  Navigate to Settings -> WAN -> Add static IP interface (e.g.
    10.0.0.1/255.255.255.0)
10. Navigate to Settings -> Remote cotrol -> Add SSH, port 22,
    10.0.0.0/255.255.255.0 and interface created before
11. Change IP of your client to 10.0.0.2/255.255.255.0 and connect the
    ethernet cable to the WAN port of the router
12. Connect to the router using SSH shell under SuperUser account
13. Run in SSH shell:
       sh
14. Make a mtd backup (optional, see related section)
15. Change bootflag to Sercomm1 and reboot:
       printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3
       reboot
16. Login to the router web interface under admin account
17. Remove dots from the OpenWrt factory image filename
18. Update firmware via web using OpenWrt factory image

Revert to stock
---------------
Change bootflag to Sercomm1 in OpenWrt CLI and then reboot:
   printf 1 | dd bs=1 seek=7 count=1 of=/dev/mtdblock3

mtd backup
----------
1. Set up a tftp server (e.g. tftpd64 for windows)
2. Connect to a router using SSH shell and run the following commands:
      cd /tmp
      for i in 0 1 2 3 4 5 6 7 8 9 10; do nanddump -f mtd$i /dev/mtd$i; \
      tftp -l mtd$i -p 10.0.0.2; md5sum mtd$i >> mtd.md5; rm mtd$i; done
      tftp -l mtd.md5 -p 10.0.0.2

Recovery
--------
Use sercomm-recovery tool.
Link: https://github.com/danitool/sercomm-recovery
MAC Addresses
-------------
+-----+------------+---------+
| use | address    | example |
+-----+------------+---------+
| LAN | label      | *:50    |
| WAN | label + 11 | *:5b    |
| 2g  | label + 2  | *:52    |
| 5g  | label + 3  | *:53    |
+-----+------------+---------+
The label MAC address was found in Factory 0x21000

cfgtool.py
----------
A tool for decoding and encoding Sercomm configs.
Link: https://github.com/r3d5ky/sercomm_cfg_unpacker
Co-authored-by: Karim Dehouche <karimdplay@gmail.com>
Co-authored-by: Maximilian Weinmann <x1@disroot.org>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
2 years agomac80211: add a fix for a crash in __ieee80211_rx_h_amsdu
Felix Fietkau [Tue, 13 Dec 2022 20:14:18 +0000 (21:14 +0100)]
mac80211: add a fix for a crash in __ieee80211_rx_h_amsdu

Fix initialization of rx->link_sta

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agotreewide: remove DRIVER_11N_SUPPORT
Andre Heider [Sat, 26 Nov 2022 11:58:21 +0000 (12:58 +0100)]
treewide: remove DRIVER_11N_SUPPORT

hostapd's compile time option CONFIG_IEEE80211N was removed almost 3 years
ago, 80.211n/HT is always included since then.

Noticed because `hostapd -v11n` confusingly returned an error.

See hostapd's commit:
f3bcd69603 "Remove CONFIG_IEEE80211N build option"

Signed-off-by: Andre Heider <a.heider@gmail.com>
2 years agohostapd: fix 350-nl80211_del_beacon_bss.patch
Andre Heider [Fri, 25 Nov 2022 16:37:59 +0000 (17:37 +0100)]
hostapd: fix 350-nl80211_del_beacon_bss.patch

Pass the expected struct:

../src/drivers/driver_nl80211.c: In function 'wpa_driver_nl80211_del_beacon':
../src/drivers/driver_nl80211.c:2945:31: warning: passing argument 1 of 'nl80211_bss_msg' from incompatible pointer type [-Wincompatible-pointer-types]
 2945 |         msg = nl80211_bss_msg(drv, 0, NL80211_CMD_DEL_BEACON);
      |                               ^~~
      |                               |
      |                               struct wpa_driver_nl80211_data *
../src/drivers/driver_nl80211.c:695:50: note: expected 'struct i802_bss *' but argument is of type 'struct wpa_driver_nl80211_data *'
  695 | struct nl_msg * nl80211_bss_msg(struct i802_bss *bss, int flags, uint8_t cmd)
      |                                 ~~~~~~~~~~~~~~~~~^~~

Fixes: 35ff1affe8 "hostapd: update to 2022-05-08"
Signed-off-by: Andre Heider <a.heider@gmail.com>
2 years agohostapd: remove an unused function from ubus.c
Andre Heider [Sun, 20 Nov 2022 15:54:59 +0000 (16:54 +0100)]
hostapd: remove an unused function from ubus.c

eee80211_frequency_to_channel() isn't used anymore, which is a leftover from:
2a31e9ca97 "hostapd: add op-class to get_status output"

Signed-off-by: Andre Heider <a.heider@gmail.com>
2 years agoath9k: add missing dependency on random core
Felix Fietkau [Tue, 13 Dec 2022 09:25:26 +0000 (10:25 +0100)]
ath9k: add missing dependency on random core

Reported-by: Hartmut Birr <e9hack@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agogeneric: move pending 870 ca8210 fix crash patch to backport
Christian Marangi [Mon, 12 Dec 2022 22:47:25 +0000 (23:47 +0100)]
generic: move pending 870 ca8210 fix crash patch to backport

Patch got merged upstream in kernel 6.1. Move it to backport to better
track it.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agogeneric: fix wrong PTR_ERR use in of net mac address ascii patch
Christian Marangi [Mon, 12 Dec 2022 23:15:28 +0000 (00:15 +0100)]
generic: fix wrong PTR_ERR use in of net mac address ascii patch

nvmem_cell_read return a pointer error when an error occurs. Currently
we convert the pointer error to an int while the rest of the function
return a void* and expcet an error pointer. Fix this PTR_ERR msuse
fixing compilation warning.

Fixes the following compilation warning:
net/ethernet/eth.c: In function 'nvmem_cell_get_mac_address':
net/ethernet/eth.c:547:24: warning: returning 'long int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion]
  547 |                 return PTR_ERR(mac);
      |                        ^~~~~~~~~~~~
net/ethernet/eth.c: In function 'nvmem_cell_get_mac_address_ascii':
net/ethernet/eth.c:564:24: warning: returning 'long int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion]
  564 |                 return PTR_ERR(mac_ascii);
      |                        ^~~~~~~~~~~~~~~~~~

Fixes: 7b863af180da ("kernel: move mac-address-ascii patches to generic")
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2 years agogemini: Set proper default networks
Linus Walleij [Sun, 11 Dec 2022 23:54:16 +0000 (00:54 +0100)]
gemini: Set proper default networks

Some Gemini devices are NAS type devices and need to ask for
DHCP IP on eth0. Some has a LAN/WAN setup. Add sensible
defaults for all known devices.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2 years agouml: switch to Kernel 5.15
Christian Lamparter [Sat, 3 Dec 2022 21:20:37 +0000 (22:20 +0100)]
uml: switch to Kernel 5.15

Switch over from testing version.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agobcm53xx: remove MR32's openwrt specific patch for LEDs
Christian Lamparter [Sat, 12 Nov 2022 22:01:33 +0000 (23:01 +0100)]
bcm53xx: remove MR32's openwrt specific patch for LEDs

The patch managed to sneak into v5.15 whereas it was
properly deleted for v5.10.

Fixes: 8f6e2bb17886 ("bcm53xx: remove MR32's specific get_leds_dt code")
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agosunxi: fix sunxi-ir kconfig and description
Chukun Pan [Fri, 2 Sep 2022 15:18:10 +0000 (23:18 +0800)]
sunxi: fix sunxi-ir kconfig and description

Removed a20 in description, since it
only works for a10, a13 and a31.
Also refreshed kernel config.

Fixes: #10466
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(moved fixes, refreshed, added CONFIG_DVB_USB=n)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agosunxi: modules: remove useless AddDepends/rtc
Chukun Pan [Thu, 1 Sep 2022 15:18:19 +0000 (23:18 +0800)]
sunxi: modules: remove useless AddDepends/rtc

AddDepends/rtc has been removed in commit 3da7fe6, same here.
Fixes: 3da7fe6 ("kernel: remove useless AddDepends/rtc abstraction")
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
(RTC_SUPPORT - though this is implied by the TARGET_sunxi)
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agosunxi: fix 253-sunxi-h5-add-support-for-nanopi-r1s-h5 patch offset
Christian Lamparter [Sat, 1 Oct 2022 21:47:53 +0000 (23:47 +0200)]
sunxi: fix 253-sunxi-h5-add-support-for-nanopi-r1s-h5 patch offset

This showed up in the log:
|Hunk #1 succeeded at 555 (offset -83 lines).

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
2 years agokernel: modules/lib-lz4: add lz4hc_compress
Tony Butler [Mon, 28 Nov 2022 03:14:48 +0000 (19:14 -0800)]
kernel: modules/lib-lz4: add lz4hc_compress

enable option `CONFIG_CRYPTO_LZ4HC` to match default kernel config

this only adds the `lz4hc_compress` module, and has no effect on the
`lz4_decompress` module which already supports any flavor

Signed-off-by: Tony Butler <spudz76@gmail.com>
2 years agolantiq: vr9: include usb driver for fritz 7430
Tony Butler [Fri, 9 Dec 2022 11:13:16 +0000 (03:13 -0800)]
lantiq: vr9: include usb driver for fritz 7430

Reported by user: missing driver for USB; add to image definition
https://github.com/openwrt/openwrt/issues/11326

Resolves: #11326

Signed-off-by: Tony Butler <spudz76@gmail.com>
Acked-by: Aleksander Jan Bajkowski <olek2@wp.pl>
2 years agokernel: Refresh kernel 5.10
Hauke Mehrtens [Sun, 11 Dec 2022 15:41:34 +0000 (16:41 +0100)]
kernel: Refresh kernel 5.10

Make the patches apply cleanly again.

Fixes: 8327e0fb72f0 ("kernel: backport the dev_set_threaded export to 5.10")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2 years agortl8812au-ct: fix build with newer backports cfg80211 api
Felix Fietkau [Sun, 11 Dec 2022 08:48:18 +0000 (09:48 +0100)]
rtl8812au-ct: fix build with newer backports cfg80211 api

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2 years agowolfssl: fix build with /dev/crypto
Chukun Pan [Thu, 1 Dec 2022 15:28:38 +0000 (23:28 +0800)]
wolfssl: fix build with /dev/crypto

Backport upstream patch to fix build error when
/dev/crypto enabled.

https://github.com/wolfSSL/wolfssl/commit/dc9f46a3be00b5e82684a158605189d1278e324c

Fixes: #10944
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>