openwrt/staging/hauke.git
7 months agohostapd: fix rare crash with AP+STA and ACS enabled
Felix Fietkau [Mon, 25 Sep 2023 13:36:29 +0000 (15:36 +0200)]
hostapd: fix rare crash with AP+STA and ACS enabled

Ensure that the iface disable in uc_hostapd_iface_start also clears the ACS
state.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 months agokernel: add missing symbols
Oskari Rauta [Sun, 24 Sep 2023 05:25:03 +0000 (08:25 +0300)]
kernel: add missing symbols

CONFIG_DEVTMPFS_SAFE and CONFIG_DM_AUDIT were not
set and had to be manually selected during build
everytime kernel was updated.

Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
7 months agobase-files: ipcalc.sh: make check slightly more future-proof
Leon M. Busch-George [Wed, 20 Sep 2023 21:42:08 +0000 (23:42 +0200)]
base-files: ipcalc.sh: make check slightly more future-proof

The previous code handling the equal-condition might be removed or
altered in the future and the case might be overlooked.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
7 months agobase-files: ipcalc.sh: turn error into warning
Leon M. Busch-George [Sun, 20 Aug 2023 19:08:20 +0000 (21:08 +0200)]
base-files: ipcalc.sh: turn error into warning

Some users have their routers configured to supply a DHCP range that
includes the local interface address.
That worked with dnsmasq because it automatically skips the local
address.

Re-enable those existing configurations for the release and hint at
possible future problems.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
[ wrap commit description and remove unecessary text ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
7 months agobase-files: ipcalc.sh clarify range parameters in comment
Leon M. Busch-George [Tue, 27 Jun 2023 14:01:09 +0000 (16:01 +0200)]
base-files: ipcalc.sh clarify range parameters in comment

To avoid confusion when working with ipcalc.sh, clarify that the last two
parameters belong to the range calculation and rename 'num' to the slightly
less ambiguous 'size'.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
7 months agopackage: dnsmasq: remove off-by-one mitigation for limit
Leon M. Busch-George [Fri, 16 Jun 2023 13:12:18 +0000 (15:12 +0200)]
package: dnsmasq: remove off-by-one mitigation for limit

In the dnsmasq init script, an off-by-one in the range calculation of
ipcalc.sh was mitigated by passing the limit as if its counting started
at zero. This patch removes the mitigation as the off-by-one has been
fixed.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
7 months agopackage: avoid the use of eval to parse ipcalc.sh output
Leon M. Busch-George [Sun, 18 Jun 2023 18:17:27 +0000 (20:17 +0200)]
package: avoid the use of eval to parse ipcalc.sh output

Add a function 'ipcalc' to /lib/functions.sh that sets variables more
safely using export.
With this new function, dnsmasq also handles the return value of ipcalc
correctly.

Fixes: e4bd3de1be8e ("dnsmasq: refuse to add empty DHCP range")
Co-Authored-By: Philip Prindeville <philipp@redfish-solutions.com>
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
7 months agobase-files: ipcalc.sh: don't print broadcast addr for prefix > 30
Leon M. Busch-George [Fri, 16 Jun 2023 12:58:48 +0000 (14:58 +0200)]
base-files: ipcalc.sh: don't print broadcast addr for prefix > 30

Printing a broadcast address doesn't make any sense for /31 and /32
prefixes.
Strictly speaking, the same goes for the network address but it is useful
to get the first address in the prefix, e.g. to create a canonical
CIDR notation "$NETWORK/$PREFIX".

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
7 months agobase-files: ipcalc.sh: correctly set limit for prefix > 30
Leon M. Busch-George [Fri, 16 Jun 2023 12:56:39 +0000 (14:56 +0200)]
base-files: ipcalc.sh: correctly set limit for prefix > 30

For /31 and /32 prefixes, there are only host addresses - no network and
broadcast address with all-zero and all-one bits.
Reflect this when setting the limit.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
7 months agobase-files: ipcalc.sh: correctly interpret num parameter
Leon M. Busch-George [Fri, 16 Jun 2023 12:53:09 +0000 (14:53 +0200)]
base-files: ipcalc.sh: correctly interpret num parameter

The start and end addresses are inclusive.
Thus, adding num without substracting one results in num + 1 addresses.
Add the substraction and to implement the documented behaviour.

Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
7 months agobuild: replace SourceName with PKG_NAME compile unit name
Florian Eckert [Fri, 8 Sep 2023 12:01:15 +0000 (14:01 +0200)]
build: replace SourceName with PKG_NAME compile unit name

Currently, the same information is stored at the Packages.manifest in
the 'Package:' variable and also additionally in the 'SourceName:' variable.

So we have for Packages.manifest for strongswan-charon-cmd:
```
Package: strongswan-charon-cmd
Version: 5.9.11-1

SourceName: strongswan-charon-cmd
License: GPL-2.0-or-later
Section: net
```

This is not correct. Several installable packages are built from the same
strongswan source. Therefore it makes more sense that the source name is
really the source name. In this case the it is 'strongswan'.

After this change the Packages.manifest for strongswan-charon-cmd:
```
Package: strongswan-charon-cmd
Version: 5.9.11-1

SourceName: strongswan
License: GPL-2.0-or-later
Section: net
```

In summary. The 'Package' name is the name of the package to be installed
on the target system. The 'SourceName' is the compile unit from which the
package was build from. This must be the same for all installable
packages built from the same compile unit. This commit fixes that.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
7 months agoipq40xx: wpj428: panic on squashfs error to work around boot limbo
Leon M. Busch-George [Sat, 22 Jul 2023 08:29:56 +0000 (10:29 +0200)]
ipq40xx: wpj428: panic on squashfs error to work around boot limbo

Apparently, a few ipq40xx devices have sporadic problems when reading the
flash over SPI. When that happens, the result of the faulty SPI read is
cached and it isn't re-attempted. Depending on when it happens, the router
either panics and reboots or is left in a partially broken state (an
application wont start).
The data on the flash is alright.

This wasn't the case with Openwrt with Linux < 5.x but I wasn't able to
work out which software change was responsible.

Github user karlpip created a patch for testing that disabled the cache
entirely and added logs. Typically, only one or two SPI operations fail at
a time:

  [689200.631152] spi-nor spi0.0: SPI transfer failed: -110
  [689200.631280] spi_master spi0: failed to transfer one message from queue
  [689200.635369] jffs2: Write of 68 bytes at 0x00ffccf4 failed. returned -110, retlen 0
  [689200.642014] jffs2: Not marking the space at 0x00ffccf4 as dirty because the flash driver returned retlen zero

Because reads aren't re-attempted, squashfs can't recover:

  [3171844.279235] SQUASHFS error: Failed to read block 0x2bb912: -5
  [3171844.279284] SQUASHFS error: Unable to read fragment cache entry [2bb912]
  [3171844.283980] SQUASHFS error: Unable to read page, block 2bb912, size 14e6c
  [3171844.291650] SQUASHFS error: Unable to read fragment cache entry [2bb912]
  [3171844.297831] SQUASHFS error: Unable to read page, block 2bb912, size 14e6c

I assume there to be some kind of underlying electrical problem because,
in my experience, this happens a lot more when PoE is used.

NoTengoBattery has made an in-depth investigation:
https://forum.openwrt.org/t/patch-squashfs-data-probably-corrupt/70480

.. and created a patch that evicts the page cache and retries reading:
https://github.com/NoTengoBattery/openwrt/blob/linksys-ea6350v3-mastertrack/target/linux/ipq40xx/patches-5.4/9996-fs_squashfs_improve_squashfs_error_resistance.patch

The patch also works well with the WPJ428 but NoTengoBattery didn't try to
upstream it ("This is not the solution that should be used").

In 2020, I tried and failed to create a working patch that prevents faulty pages to
be cached in the first place. Because I needed a solution, I backported
  "squashfs: add option to panic on errors " (10dde05b89980ef)
which has since become available in Openwrt.

The 'error=panic' option has been tested on a fleet of multiple hundred
WPJ428s over multiple years. Without this patch, devices regularly went
into 'limbo' on reboot or update and required a manual reboot.
Devices with this patch don't. I was initially concerned that the kernel
panic would leave devices with a real corrupted data but I haven't seen a
case of actual corruption since (outside of people turning off the power
during upgrades).

The WPJ428 is the only device I tested this patch on - others might also
benefit.

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Leon M. Busch-George <leon@georgemail.eu>
7 months agomediatek: add support for Buffalo WSR-3200AX4S
INAGAKI Hiroshi [Sun, 27 Aug 2023 14:23:20 +0000 (23:23 +0900)]
mediatek: add support for Buffalo WSR-3200AX4S

Buffalo WSR-3200AX4S is a 2.4/5 GHz band 11ax (Wi-Fi 6) router, based on
MT7622B.

Specification:

- SoC         : MediaTek MT7622B
- RAM         : DDR3 512 MiB
- Flash       : SPI-NAND 128 MiB (Winbond W25N01GVZEIG)
- WLAN        : 2.4/5 GHz 4T4R
  - 2.4 GHz   : MediaTek MT7622B (SoC)
  - 5 GHz     : MediaTek MT7915
- Ethernet    : 5x 10/100/1000 Mbps
  - Switch    : MediaTek MT7531
- LEDs/Keys   : 6x/5x (2x: buttons, 3x: slide-switches)
- UART        : through-hole on PCB (J4)
  - assignment: 3.3V, GND, TX, RX from tri-angle marking
  - settings  : 115200n8
- Power       : 12 VDC, 1.5 A

Flash instruction using factory.bin image:

1. Boot WSR-3200AX4S with "Router" mode
2. Access to "http://192.168.11.1/" and open firmware update page
   ("ファームウェア更新")
3. Select the OpenWrt factory.bin image and click update ("更新実行")
   button
4. Wait ~120 seconds to complete flashing

Note:

- This device has 2x OS images on flash. The first one will always be
  used for booting and the secondary is for backup.

- This support generates multiple factory*.bin image:

  - factory.bin      : for flashing from OEM WebUI
  - factory-uboot.bin: for flashing from U-Boot or clean installation
                       via sysupgrade (don't use for normal sysupgrade)

Known issues:

- Wi-Fi MAC addresses won't be applied to each adapter.

MAC Addresses:

LAN    : C4:3C:EA:xx:xx:60 (board_data, mac (text))
WAN    : C4:3C:EA:xx:xx:60 (board_data, mac (text))
2.4 GHz: C4:3C:EA:xx:xx:61
5 GHz  : C4:3C:EA:xx:xx:68

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
7 months agomediatek: separate dts/dtsi for Buffalo WSR series
INAGAKI Hiroshi [Sun, 27 Aug 2023 09:21:28 +0000 (18:21 +0900)]
mediatek: separate dts/dtsi for Buffalo WSR series

Separate dts/dtsi from the dts of Buffalo WSR-2533DHP2 to prepare adding
suppport for WSR-3200AX4S.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
7 months agomediatek: expand kernel size to 6MiB for WSR-2533DHP2
INAGAKI Hiroshi [Sun, 27 Aug 2023 09:37:15 +0000 (18:37 +0900)]
mediatek: expand kernel size to 6MiB for WSR-2533DHP2

Expand kernel partition size on WSR-2533DHP2 for the kernel larger than
4 MiB.
To prevent upgrading from old firmware before this commit, bump the
compat version to 1.1 and add a message for forced sysupgrade using
factory-uboot.bin image.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
7 months agomediatek: merge trx helpers in image/mt7622.mk
INAGAKI Hiroshi [Sun, 27 Aug 2023 08:29:12 +0000 (17:29 +0900)]
mediatek: merge trx helpers in image/mt7622.mk

Merge similar helpers of trx image generation, "buffalo-kernel-trx" and
"trx-nand".

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
7 months agomediatek: drop pwm7_pins from Buffalo WSR-2533DHP2
INAGAKI Hiroshi [Sun, 27 Aug 2023 14:26:01 +0000 (23:26 +0900)]
mediatek: drop pwm7_pins from Buffalo WSR-2533DHP2

MediaTek MT7622 doesn't support ch7 of PWM and pinctrl groups were dropped from
driver source[0]. So pwm7-related groups are unavailable now, then, kernel shows a
warning.

[    0.370264] mt7622-pinctrl 10211000.pinctrl: invalid group "pwm_ch7_2" for function "pwm"

Drop that pinmux from pinctrl node.

[0]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/pinctrl/mediatek/pinctrl-mt7622.c?id=57972641810a97566ffd13e4be3f6a66d61eb3b5

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
7 months agomediatek: add label-mac-device for Buffalo WSR-2533DHP2
INAGAKI Hiroshi [Sun, 27 Aug 2023 09:04:04 +0000 (18:04 +0900)]
mediatek: add label-mac-device for Buffalo WSR-2533DHP2

Add label-mac-device with "&gmac0" phandle for Buffalo WSR-2533DHP2.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
7 months agomediatek: update NVMEM bindings for Buffalo WSR-2533DHP2
INAGAKI Hiroshi [Sun, 27 Aug 2023 06:10:53 +0000 (15:10 +0900)]
mediatek: update NVMEM bindings for Buffalo WSR-2533DHP2

Update NVMEM-related nodes and use newer binding for MAC addresses on
Buffalo WSR-2533DHP2.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
7 months agomediatek: update LED/Key bindings for Buffalo WSR-2533DHP2
INAGAKI Hiroshi [Sun, 27 Aug 2023 05:49:41 +0000 (14:49 +0900)]
mediatek: update LED/Key bindings for Buffalo WSR-2533DHP2

Update LED and key nodes with newer DeviceTree bindings for WSR-2533DHP2.

- LED
  - use led-[0-9] for node name of LEDs
  - add "color" and "function" properties
  - drop default-state = "on" from green:power LED
    - this LED will be turned on by led-running alias

- key
  - drop unnecessary poll-interval property
  - use key-[0-9] for node name of keys

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
7 months agosunxi: generalize top-level BOARDNAME and update suported SoCs
Sebastian Pflieger [Mon, 18 Sep 2023 12:04:09 +0000 (14:04 +0200)]
sunxi: generalize top-level BOARDNAME and update suported SoCs

Allwinner created to may SoC variants to list them all at top-level.

Signed-off-by: Sebastian Pflieger <sebastian@pflieger.email>
7 months agoipq806x: sync config-6.1 with latest kernel
Glen Lee [Sun, 3 Sep 2023 15:05:27 +0000 (11:05 -0400)]
ipq806x: sync config-6.1 with latest kernel

Ran "make kernel_oldconfig" to generate

Signed-off-by: Glen Lee <g2lee@yahoo.com>
7 months agomediatek: filogic: add support for Ubiquiti UniFi 6 Plus (U6+)
Elbert Mai [Sun, 17 Sep 2023 14:59:48 +0000 (07:59 -0700)]
mediatek: filogic: add support for Ubiquiti UniFi 6 Plus (U6+)

Ubiquiti U6+ is a dual-band WiFi 6 PoE access point.
It is a drop-in upgrade of the U6 lite.

Specifications
---

- SoC: MediaTek MT7981A dual-core ARM Cortex-A53 1.3 GHz
- RAM: 256 MB DDR3-2133 RAM
- Flash: 16 MB SPI NOR and 4 GB eMMC
- LAN: 1x Gigabit Ethernet with 802.3af/at support
- WLAN: MediaTek MT7976C 2x2 MIMO dual-band WiFi 6
- LEDs: 1x blue and 1x white
- Buttons: 1x reset button

Installation
---

1. Power device using a PoE injector or switch
2. Connect via Ethernet to the device with static IP 192.168.1.2
3. SSH into the device with password: ubnt

        $ ssh ubnt@192.168.1.20

4. Unlock kernel partitions for writing

        $ echo 5edfacbf > /proc/ubnthal/.uf

5. Confirm correct partitions

        $ grep PARTNAME /sys/block/mmcblk0/mmcblk0p6/uevent
        PARTNAME=kernel0
        $ grep PARTNAME /sys/block/mmcblk0/mmcblk0p7/uevent
        PARTNAME=kernel1
        $ grep PARTNAME /sys/block/mmcblk0/mmcblk0p8/uevent
        PARTNAME=bs

6. Set and confirm bootloader environment

        $ fw_setenv boot_openwrt "fdt addr \$(fdtcontroladdr); fdt rm /signature; bootubnt"
        $ fw_setenv bootcmd_real "run boot_openwrt"
        $ fw_printenv

7. Copy sysupgrade image to /tmp/openwrt.bin via scp
8. Copy kernel and rootfs to mmcblk0p6 and mmcblk0p7, respectively

        $ tar xf /tmp/openwrt.bin sysupgrade-ubnt_unifi-6-plus/kernel -O | dd of=/dev/mmcblk0p6
        $ tar xf /tmp/openwrt.bin sysupgrade-ubnt_unifi-6-plus/root -O | dd of=/dev/mmcblk0p7

9. Ensure device boots from mmcblk0p6

        $ echo -ne "\x00\x00\x00\x00\x2b\xe8\x4d\xa3" > /dev/mmcblk0p8

10. Reboot the device

        $ reboot

Signed-off-by: Elbert Mai <code@elbertmai.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
7 months agoarm-trusted-firmware-sunxi: update to version 2.9
Sebastian Pflieger [Mon, 18 Sep 2023 13:02:13 +0000 (15:02 +0200)]
arm-trusted-firmware-sunxi: update to version 2.9

- detect die revision used in variants of the Allwinner H616 SoC (H313, T507)
- support for H6 boards without PMIC

Tested on Pine64+ and Orange PI Zero2

Signed-off-by: Sebastian Pflieger <sebastian@pflieger.email>
7 months agoramips: fix Mercusys MR70X LAN port assignments
Andreas Böhler [Mon, 18 Sep 2023 09:55:57 +0000 (11:55 +0200)]
ramips: fix Mercusys MR70X LAN port assignments

A bug report in the forum found that the MR70X lists four LAN ports in LuCI
while it has only three. This adds the device to the network setup file
to fix the issue.

Identified-by: Forum User "Lexeyko"
Signed-off-by: Andreas Böhler <dev@aboehler.at>
7 months agolldpd: add lldp_syscapabilities config option
Sebastian Pflieger [Wed, 20 Sep 2023 18:13:14 +0000 (20:13 +0200)]
lldpd: add lldp_syscapabilities config option

allow to overwrite the detected system capabilities e.g. if devices
does not operate as bridge.

Signed-off-by: Sebastian Pflieger <sebastian@pflieger.email>
7 months agoipq807x: add support for Netgear WAX620
Kristian Skramstad [Mon, 21 Aug 2023 15:45:36 +0000 (17:45 +0200)]
ipq807x: add support for Netgear WAX620

```
Specifications:
* CPU: Qualcomm IPQ8072A, SoC Version: 2.0, Quad core Cortex-A53 1.6896 GHz
* RAM: 1 GiB of DDR4 600 MHz
* Flash: NAND 2x256 MiB (Macronix MX30UF2G18AC)
* 4 RGB LEDs: Power, LAN, 2.4GHz and 5GHz
* UART: Two 4-pin unpopulated headers under the LEDs.
  Use the header closest to LED 4 and 5.
  They are marked with a white stroke.
  TX RX GND, beginning from "4". 115200n8.

Lan:
* One 100/1000/2.5GBASE-T Gigabit Ethernet (QCA8081)

Wlan:
* 4x4 in 2.4GHz: 802.11b/g/n/ax
* 4x4 in 5.0GHz: 802.11a/n/ac/ax
* OFDM and OFDMA
* Bidir and MU-MIMO
* Internal antenna 3.1/4.3 dBi (2.4GHz/5GHz)

Power:
* PoE+ 802.3at/af 25.5W
* DC 12V 2.5A
```

```
Note: The OpenWrt image is setup with DHCP and not a static IP.
1.  Download the OpenWrt initramfs image. Copy the image to a TFTP server
2.  Connect to console on the AP, and connect the LAN port to your LAN
3.  Stop auto boot to get to U-boot shell, interrupt the autoboot process by pressing '0' when prompted
4.  Set active_fw in env
    # setenv active_fw 1
5.  Transfer the initramfs image with TFTP
    # setenv serverip 192.168.1.10 (IP of TFTP server host)
    # setenv ipaddr 192.168.1.1 (IP used by the router for getting the image, must be in the same subnet as the TFTP host)
    # tftpboot openwrt-qualcommax-ipq807x-netgear_wax620-initramfs-uImage.itb
6.  Reboot and load the image
    # bootm
7.  SCP factory image to the AP
    # scp openwrt-qualcommax-ipq807x-netgear_wax620-squashfs-factory.ubi root@192.168.1.1:/tmp/
8.  Connect to device using SSH (use the LAN port)
9.  Flash squashfs-factory.ubi from within the initramfs instance of OpenWRT
    Before you flash, please check your mtd partitions where mtdX is the right mtd rootfs partition.
    # cat /proc/mtd (To check MTD partitions)
    # ubiformat /dev/mtd19 -y -f /tmp/openwrt-qualcommax-ipq807x-netgear_wax620-squashfs-factory.ubi
10. Set active_fw to 0
    # /usr/sbin/fw_setenv active_fw 0
11. Reboot the AP and your done
    # reboot
```

Signed-off-by: Kristian Skramstad <kristian+github@83.no>
7 months agoarmsr: ensure kmod-fs-vfat is selected for mounting ESP
Mathew McBride [Fri, 22 Sep 2023 21:38:54 +0000 (21:38 +0000)]
armsr: ensure kmod-fs-vfat is selected for mounting ESP

vfat support is needed to mount the EFI System Partition (ESP)
during sysupgrade. If it is not available, the sysupgrade process
will not complete

Signed-off-by: Mathew McBride <matt@traverse.com.au>
7 months agoccache: add missing \
Oskari Rauta [Sun, 24 Sep 2023 08:29:39 +0000 (11:29 +0300)]
ccache: add missing \

-DREDIS_STORAGE_BACKEND=OFF option is ignored due to missing \

Signed-off-by: Oskari Rauta <oskari.rauta@gmail.com>
7 months agokernel: bump 6.1 to 6.1.55
John Audia [Sat, 23 Sep 2023 11:39:00 +0000 (07:39 -0400)]
kernel: bump 6.1 to 6.1.55

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

All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
7 months agoopenssl: update to 3.0.11
Ivan Pavlov [Sat, 23 Sep 2023 15:09:36 +0000 (18:09 +0300)]
openssl: update to 3.0.11

Changes between 3.0.10 and 3.0.11 [19 Sep 2023]
 * Fix POLY1305 MAC implementation corrupting XMM registers on Windows. ([CVE-2023-4807])

Signed-off-by: Ivan Pavlov <AuthorReflex@gmail.com>
7 months agoramips: add support for WAVLINK WL-WN573HX1
Sijia Huang [Sat, 26 Aug 2023 00:38:01 +0000 (00:38 +0000)]
ramips: add support for WAVLINK WL-WN573HX1

Hardware
--------

Specifications:
- Device: WAVLINK WL-WN573HX1 Outdoor AP
- SoC: MT7621AT
- Flash: 16MB
- RAM: 256MB
- Switch:1 LAN (10/100/1000 Mbps)
- WiFi: MT7905 2x2 2.4G + MT7975 2x2 5G
- LEDs: 1x STATUS (blue, configurable)
1x LAN (green)

Product link:
https://www.wavlink.com/en_us/product/WL-WN573HX1.html

Signed-off-by: Sijia Huang <engineer31@win-star.com>
7 months agokernel: bump 6.1 to 6.1.54
John Audia [Tue, 19 Sep 2023 18:00:07 +0000 (14:00 -0400)]
kernel: bump 6.1 to 6.1.54

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

Removed upstreamed:
generic/backport-6.1/020-v6.3-02-UPSTREAM-mm-multi-gen-LRU-rename-lrugen-lists-to-lru.patch[1]
ipq806x/patches-6.1/140-v6.5-hwspinlock-qcom-add-missing-regmap-config-for-SFPB-M.patch[2]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.54&id=a73d04c460521e45f257d28d73df096e41ece324
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.54&id=e93bc372dbc0bde133c854c03502a95617041972

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

Signed-off-by: John Audia <therealgraysky@proton.me>
7 months agokernel: bump 6.1 to 6.1.53
John Audia [Wed, 13 Sep 2023 20:01:32 +0000 (16:01 -0400)]
kernel: bump 6.1 to 6.1.53

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

Removed upstreamed:
bcm53xx/patches-6.1/032-v6.6-0005-ARM-dts-BCM53573-Drop-nonexistent-usb-cells.patch[1]
bcm53xx/patches-6.1/032-v6.6-0006-ARM-dts-BCM53573-Add-cells-sizes-to-PCIe-node.patch[2]
bcm53xx/patches-6.1/032-v6.6-0007-ARM-dts-BCM53573-Use-updated-spi-gpio-binding-proper.patch[3]
bcm53xx/patches-6.1/032-v6.6-0011-ARM-dts-BCM53573-Fix-Tenda-AC9-switch-CPU-port.patch[4]

All other patches automatically rebased.

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

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.53&id=ee1d740374aa73fb32857685eb05167ad87458cf
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.53&id=ab5154ae26c446136827451e907db45d7b92a76f
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.53&id=f5ff6897094fa161be55786cb9e5d5b1bf7a9049
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.53&id=0ef736fec61422794c4a991d46c4ec212b01d8d1

Signed-off-by: John Audia <therealgraysky@proton.me>
7 months agoconfig-6.1: disable CONFIG_VIDEO_CAMERA_SENSOR
John Audia [Sat, 16 Sep 2023 10:57:38 +0000 (06:57 -0400)]
config-6.1: disable CONFIG_VIDEO_CAMERA_SENSOR

Disable new ksym globally as it is unconditionally selecting symbols.
See: https://github.com/torvalds/linux/commit/7d3c7d2a2914e10bec3b9cdacdadb8e1f65f715a

Signed-off-by: John Audia <therealgraysky@proton.me>
7 months agomac80211: rt2x00: fix MT7620 low RSSI issue
Shiji Yang [Sat, 23 Sep 2023 01:25:15 +0000 (09:25 +0800)]
mac80211: rt2x00: fix MT7620 low RSSI issue

Introducing SoC specific RSSI base value to fix the low RSSI issue
on MT7620. With this fix[1], the RSSI value reported by MT7620 will
increase by 10 dB.

[1] https://lore.kernel.org/linux-wireless/TYAP286MB031571CDB146C414A908A66DBCFEA@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM/

Fixes: https://github.com/openwrt/openwrt/issues/11036
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
7 months agohostapd: fix patch rebase after a crash fix
Felix Fietkau [Fri, 22 Sep 2023 17:59:09 +0000 (19:59 +0200)]
hostapd: fix patch rebase after a crash fix

The patch refresh accidentally moved the hostapd_ucode_free_iface call to
the wrong function

Fixes: e9722aef9e84 ("hostapd: fix a crash when disabling an interface during channel list update")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 months agotools/libressl: update to version 3.7.3
Josef Schlehofer [Sun, 17 Sep 2023 12:31:54 +0000 (14:31 +0200)]
tools/libressl: update to version 3.7.3

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

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
7 months agohostapd: fix wpa_supplicant bringup with non-nl80211 drivers
Felix Fietkau [Fri, 22 Sep 2023 05:58:45 +0000 (07:58 +0200)]
hostapd: fix wpa_supplicant bringup with non-nl80211 drivers

Needed for wired 802.1x

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 months agomediatek: add build for MT7981 RFB
Daniel Golle [Tue, 12 Sep 2023 23:57:49 +0000 (00:57 +0100)]
mediatek: add build for MT7981 RFB

Add build for the MTK3943 reference board for MT7981B+MT7976C.

**Hardware specification:**

 - SoC: MediaTek MT7981B 2x A53
 - Flash: various options
 - RAM: 256MB DDR3
 - Ethernet: 4 x 10/100/1000 Mbps via MT7531AE switch
        EITHER 1 x 10/100/1000 Mbps built-in PHY
            OR 1 x 10/100/1000/2500 Mbps MaxLinear GPY211C
 - Switch: MediaTek MT7531AE
 - WiFi: MediaTek MT7976C
 - Button: RST, WPS

**Flash instructions for SPIM-NAND:**
 - write *mt7981-rfb-spim-nand-preloader.bin to 'BL2' partition
 - write *mt7981-rfb-spim-nand-bl31-uboot.fip to 'FIP' partition
 - erase 'ubi' partition
 - reset board
 - create ubootenv and ubootenv2 UBI volumes in U-Boot
 - edit environment and set bootcmd, e.g.
   setenv bootconf 'config-1#mt7981-rfb-spim-nand#mt7981-rfb-mxl-2p5g-phy-eth1'
   setenv bootcmd 'ubi read $loadaddr fit; bootm $loadaddr#$bootconf'
 - load initramfs image via TFTP:
   setenv serverip 192.168.1.254
   setenv ipaddr 192.168.1.1
   setenv bootfile openwrt-mediatek-filogic-mediatek_mt7981-rfb-initramfs.itb
   saveenv ; saveenv
   tftpboot
   bootm $loadaddr#$bootconf
 - Now use sysupgrade to write OpenWrt firmware to flash.

SNFI-NAND, SPIM-NOR and eMMC all work very similar, a bootable SD card image
is also being generated. However, as the board I've been provided only comes
with SPIM-NAND all other boot media are untested.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 months agouboot-mediatek: add build for mt7981 rfb
Daniel Golle [Tue, 12 Sep 2023 23:57:23 +0000 (00:57 +0100)]
uboot-mediatek: add build for mt7981 rfb

Improve and package builds for various boot media configurations of the
MediaTek MT7981 reference board.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 months agoarm-trusted-firmware-mediatek: fix copy&paste error in Makefile
Daniel Golle [Mon, 18 Sep 2023 15:40:30 +0000 (16:40 +0100)]
arm-trusted-firmware-mediatek: fix copy&paste error in Makefile

When adding builds for MT7981 the related Makefile sections for MT7986
have apparently been copied, but in one instance the rename from 7986 to
7981 has been omitted. Fix that now.

Fixes: 602cb4f325 ("arm-trusted-firmware-mediatek: add build for MT7981 DDR3")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 months agokernel: serial: 8250_mtk: track busclk state to avoid bus error
Daniel Golle [Mon, 11 Sep 2023 21:49:59 +0000 (22:49 +0100)]
kernel: serial: 8250_mtk: track busclk state to avoid bus error

UARTs not used as boot console are currently broken on some MediaTek
targets due to register access depending on the bus clock being enabled.
Add patch to make sure this dependency is always met.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
7 months agompc85xx: correct WS-AP3715i eth LED assignment
David Bauer [Wed, 20 Sep 2023 18:59:35 +0000 (20:59 +0200)]
mpc85xx: correct WS-AP3715i eth LED assignment

Ethernet LED assignments were incorrectly swapped. Fix the assignment
logic so the correct LED is illuminated for the LAN LEDs.

Signed-off-by: David Bauer <mail@david-bauer.net>
7 months agohostapd: add missing NULL pointer check in uc_hostapd_iface_stop
Felix Fietkau [Wed, 20 Sep 2023 16:40:17 +0000 (18:40 +0200)]
hostapd: add missing NULL pointer check in uc_hostapd_iface_stop

Avoid crashing if the interface has already been removed

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 months agoipq4019: add support for ZTE MF282 Plus aka DreiTube
Andreas Böhler [Sat, 9 Sep 2023 20:54:01 +0000 (22:54 +0200)]
ipq4019: add support for ZTE MF282 Plus aka DreiTube

The ZTE MF282 Plus is a LTE router used (exclusively?) by the network
operator "3". It is very similar to the MF286/MF287 but in the form factor
of the MF282.

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

SoC: IPQ4019
RAM: 256MiB
Flash: 8MiB SPI-NOR + 128MiB SPI-NAND
LAN: 1x GBit LAN
LTE: ZTE Cat6
WiFi: 802.11a/b/g/n/ac SoC-integrated

MAC addresses
=============

LAN: from config
WiFi 1: from config + 1
WiFi 2: from config + 2

Installation
============

Option 1 - TFTP
---------------

TFTP installation using UART is preferred. Disassemble the device and
connect serial. Put the initramfs image as openwrt.bin to your TFTP server
and configure a static IP of 192.168.1.100. Load the initramfs image by
typing:

  setenv serverip 192.168.1.100
  setenv ipaddr 192.168.1.1
  tftpboot 0x84000000 openwrt.bin
  bootm 0x84000000

From this intiramfs boot you can take a backup of the currently installed
partitions as no vendor firmware is available for download:

  ubiattach -m9
  cat /dev/ubi0_0 > /tmp/ubi0_0
  cat /dev/ubi0_1 > /tmp/ubi0_1

Copy the files /tmp/ubi0_0 and /tmp/ubi0_1 somewhere save.

Once booted, transfer the sysupgrade image and run sysupgrade. You might
have to delete the stock volumes first:

  ubirmvol /dev/ubi0 -N ubi_rootfs
  ubirmvol /dev/ubi0 -N kernel

Option 2 - From stock firmware
------------------------------

The installation from stock requires an exploit first. The exploit consists
of a backup file that forces the firmware to download telnetd via TFTP from
192.168.0.22 and run it. Once exploited, you can connect via telnet and
login as admin:admin.

The exploit will be available at the device wiki page.

Once inside the stock firmware, you can transfer the -factory.bin file to
/tmp by using "scp" from the stock frmware or "tftp".

ZTE has blocked writing to the NAND. Fortunately, it's easy to allow write
access - you need to read from one file in /proc. Once done, you need to
erase the UBI partition and flash OpenWrt. Before performing the operation,
make sure that mtd9 is the partition labelled "rootfs" by calling
"cat /proc/mtd".

Complete commands:

  cd /tmp
  tftp -g -r factory.bin 192.168.0.22
  cat /proc/driver/sensor_id
  flash_erase /dev/mtd9 0 0
  dd if=/tmp/factory.bin of=/dev/mtdblock9 bs=131072

Afterwards, reboot your device and you should have a working OpenWrt
installation.

Restore Stock
=============

Option 1 - via UART
-------------------

Boot an OpenWrt initramfs image via TFTP as for the initial installation.
Transfer the two backed-up files to your box to /tmp.

Then, run the following commands - replace $kernel_length and $rootfs_size
by the size of ubi0_0 and ubi0_1 in bytes.

  ubiattach -m 9
  ubirmvol /dev/ubi0 -N kernel
  ubirmvol /dev/ubi0 -N rootfs
  ubirmvol /dev/ubi0 -N rootfs_data
  ubimkvol /dev/ubi0 -N kernel -s $kernel_length
  ubimkvol /dev/ubi0 -N ubi_rootfs -s $rootfs_size
  ubiupdatevol /dev/ubi0_0 /tmp/ubi0_0
  ubiupdatevol /dev/ubi0_1 /tmp/ubi0_1

Option 2 - from within OpenWrt
------------------------------

This option requires to flash an initramfs version first so that access
to the flash is possible. This can be achieved by sysupgrading to the
recovery.bin version and rebooting. Once rebooted, you are again in a
default OpenWrt installation, but no partition is mounted.

Follow the commands from Option 1 to flash back to stock.

LTE Modem
=========

The LTE modem is similar to the MF286R, it provides an RNDIS interface
and an AT interface.

Other Notes
===========

There is one GPIO Switch "Power button blocker" which, if enabled, does not
trigger a reset of the SoC if the modem reboots. If disabled, the SoC is
rebooted along with the modem. The modem can be rebooted via the exported
GPIO "modem-reset" in /sys/class/gpio.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
7 months agokernel: bump 5.15 to 5.15.132
John Audia [Tue, 19 Sep 2023 19:04:14 +0000 (15:04 -0400)]
kernel: bump 5.15 to 5.15.132

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

Removed upstreamed:
bcm53xx/patches-5.15/037-v6.6-0006-ARM-dts-BCM53573-Add-cells-sizes-to-PCIe-node.patch[1]
bcm53xx/patches-5.15/037-v6.6-0007-ARM-dts-BCM53573-Use-updated-spi-gpio-binding-proper.patch[2]
bcm53xx/patches-5.15/037-v6.6-0008-ARM-dts-BCM5301X-Extend-RAM-to-full-256MB-for-Linksy.patch[3]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=b35f3ca1877e024887df205ede952863d65dad36
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=2840d9b9c8750be270fb1153ccd5b983cbb5d592
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.132&id=f086e859ddc252c32f0438edff241859c0f022ce

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>
7 months agohostapd: fix a crash when disabling an interface during channel list update
Felix Fietkau [Wed, 20 Sep 2023 11:43:14 +0000 (13:43 +0200)]
hostapd: fix a crash when disabling an interface during channel list update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 months agotoolchain: assign PKG_CPE_ID
Alexander Couzens [Mon, 18 Sep 2023 22:23:40 +0000 (00:23 +0200)]
toolchain: assign PKG_CPE_ID

The PKG_CPE_ID links to NIST CPE version 2.2.
Assign PKG_CPE_ID to all remaining package which have a CPE ID.
Not every package has a CPE id.

Related: https://github.com/openwrt/packages/issues/8534
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 months agotools: assign PKG_CPE_ID
Alexander Couzens [Mon, 18 Sep 2023 22:10:03 +0000 (00:10 +0200)]
tools: assign PKG_CPE_ID

The PKG_CPE_ID links to NIST CPE version 2.2.
Assign PKG_CPE_ID to all remaining tools which have a CPE ID.
Not every tool has CPE id.

Related: https://github.com/openwrt/packages/issues/8534
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 months agopackages: assign PKG_CPE_ID for all missing packages
Alexander Couzens [Mon, 18 Sep 2023 20:53:14 +0000 (22:53 +0200)]
packages: assign PKG_CPE_ID for all missing packages

The PKG_CPE_ID links to NIST CPE version 2.2.
Assign PKG_CPE_ID to all remaining package which have a CPE ID.
Not every package has CPE id.

Related: https://github.com/openwrt/packages/issues/8534
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
8 months agosdk: add cpupower to userspace sources
John Audia [Thu, 3 Aug 2023 18:18:49 +0000 (14:18 -0400)]
sdk: add cpupower to userspace sources

For https://github.com/openwrt/packages/pull/21533 to be merged,
this source tree is needed to be included.

Signed-off-by: John Audia <therealgraysky@proton.me>
8 months agomvebu: eDPU: add support for version with external switch
Robert Marko [Thu, 3 Aug 2023 11:16:05 +0000 (13:16 +0200)]
mvebu: eDPU: add support for version with external switch

New revision of eDPU uses an Marvell MV88E6361 switch to connect the SFP
cage and G.hn IC instead of connecting them directly to the ethernet
controllers.

The same image can be used on both versions as U-Boot will enable the
switch node and disable the unused ethernet controller.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
8 months agouboot-mvebu: eDPU: add support for version with external switch
Robert Marko [Fri, 18 Aug 2023 10:22:29 +0000 (12:22 +0200)]
uboot-mvebu: eDPU: add support for version with external switch

New revision of eDPU uses an Marvell MV88E6361 switch to connect the SFP
cage and G.hn IC instead of connecting them directly to the ethernet
controllers.

In order to use the same image for both boards, U-Boot is responsible for
detecting the revision and enabling/disabling DTS nodes.
So, to make it easy for users, lets add the pending U-Boot patches to build
in OpenWrt.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
8 months agogeneric: 6.1: backport support for Marvell 88E6361 switch
Robert Marko [Fri, 4 Aug 2023 12:39:18 +0000 (14:39 +0200)]
generic: 6.1: backport support for Marvell 88E6361 switch

New revision of Methode eDPU boards uses Marvell 88E6361 switch, so lets
backport it from kernel 6.5.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
8 months agogeneric: 5.15: backport support for Marvell 88E6361 switch
Robert Marko [Thu, 14 Sep 2023 10:44:02 +0000 (12:44 +0200)]
generic: 5.15: backport support for Marvell 88E6361 switch

New revision of Methode eDPU boards uses Marvell 88E6361 switch, so lets
backport it from kernel 6.5.

Since 5.15 doesnt have phylink_get_caps I had to modify the backport to
use the old mv88e6393x_phylink_validate instead.
I had to fixup one more instance of port_max_speed_mode as well that is not
present in 6.5.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
8 months agonetifd: update to the latest version
Felix Fietkau [Tue, 19 Sep 2023 09:46:16 +0000 (11:46 +0200)]
netifd: update to the latest version

7a58b995fdbe wireless: update prev_config on SET_DATA notify

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 months agohostapd: use phy name for hostapd interfaces instead of first-bss ifname
Felix Fietkau [Tue, 19 Sep 2023 09:02:54 +0000 (11:02 +0200)]
hostapd: use phy name for hostapd interfaces instead of first-bss ifname

Improves reliability in error handling

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 months agoipq40xx: ZTE MF287 series: move to gpio-export for modem-reset GPIO
Andreas Böhler [Mon, 18 Sep 2023 10:08:18 +0000 (12:08 +0200)]
ipq40xx: ZTE MF287 series: move to gpio-export for modem-reset GPIO

Turn the "gpio-restart" node into a "gpio-export" node for all MF287
variants, similar to the MF287 Pro. Unfortunately, there doesn't seem to be
a "power button blocker" GPIO for the MF287 and MF287 Plus, so a modem
reset always triggers a system reset.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
8 months agoipq40xx: refactor ZTE MF287 series
Andreas Böhler [Sat, 16 Sep 2023 19:55:01 +0000 (21:55 +0200)]
ipq40xx: refactor ZTE MF287 series

The ZTE MF287 requires a different board calibration file for ath10k than
the ZTE MF287+. The two devices receive their own DTS, thus the device tree
is slightly refactored.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
8 months agox86: add 6.1 testing kernel
Pascal Coudurier [Sun, 20 Aug 2023 13:07:34 +0000 (15:07 +0200)]
x86: add 6.1 testing kernel

Enable building with 6.1 as testing kernel

Compile-tested: x86_64, x86_generic, x86_legacy, x86_geode
Run-tested: x86_64, x86_generic (qemu), x86_legacy (qemu)

Signed-off-by: Pascal Coudurier <coudu@gmx.com>
8 months agokernel: modules: video: adapt drm-amdgpu and drm-radeon for kernel 6.1
Pascal Coudurier [Wed, 23 Aug 2023 20:45:31 +0000 (22:45 +0200)]
kernel: modules: video: adapt drm-amdgpu and drm-radeon for kernel 6.1

Package and add dependencies to drm-amdgpu and drm-radeon for 6.1
 * package acpi-video, drm-display-helper and drm-buddy
 * add acpi-video, drm-display-helper and drm-buddy as dependencies for
   drm-amdgpu
 * add acpi-video and drm-display-helper as dependencies for drm-radeon

Signed-off-by: Pascal Coudurier <coudu@gmx.com>
8 months agokernel: modules: netdevices: adapt mlx5-core for kernel 6.1
Pascal Coudurier [Mon, 21 Aug 2023 19:19:51 +0000 (21:19 +0200)]
kernel: modules: netdevices: adapt mlx5-core for kernel 6.1

Set CONFIG_MLX5_VFIO_PCI=n for kernel greater than 5.18

Signed-off-by: Pascal Coudurier <coudu@gmx.com>
8 months agokernel: modules: hwmon: adapt nct6775 for kernel 6.1
Pascal Coudurier [Sun, 20 Aug 2023 13:12:16 +0000 (15:12 +0200)]
kernel: modules: hwmon: adapt nct6775 for kernel 6.1

nct6775 module splited in 5.19 kernel:
* add nct6775-core module @ge5.19
* add regmap dependency for 6.1

Signed-off-by: Pascal Coudurier <coudu@gmx.com>
8 months agox86: refresh kernel configs for 6.1
Pascal Coudurier [Mon, 21 Aug 2023 12:23:13 +0000 (14:23 +0200)]
x86: refresh kernel configs for 6.1

refresh and add missing symbols for target and subtargets

Signed-off-by: Pascal Coudurier <coudu@gmx.com>
8 months agox86: copy 5.15 configs to 6.1
Pascal Coudurier [Sun, 20 Aug 2023 13:01:31 +0000 (15:01 +0200)]
x86: copy 5.15 configs to 6.1

Copy 5.15 configs to 6.1 as a starting point

Signed-off-by: Pascal Coudurier <coudu@gmx.com>
8 months agox86: refresh patches for 6.1
Pascal Coudurier [Sun, 20 Aug 2023 12:54:22 +0000 (14:54 +0200)]
x86: refresh patches for 6.1

Removed upstream merged patch:
113-v5.21-platform-x86-pmc_atom-Add-Lex-3I380NX-industrial-PC-.patch

Manually rebased:
103-pcengines_apu6_platform.patch

Signed-off-by: Pascal Coudurier <coudu@gmx.com>
8 months agox86: copy 5.15 patches to 6.1
Pascal Coudurier [Sun, 20 Aug 2023 12:48:42 +0000 (14:48 +0200)]
x86: copy 5.15 patches to 6.1

Copy existing patches from 5.15 to 6.1

Signed-off-by: Pascal Coudurier <coudu@gmx.com>
8 months agosunxi: add support for Bananapi P2 Zero
Zoltan HERPAI [Sun, 13 Aug 2023 00:29:06 +0000 (02:29 +0200)]
sunxi: add support for Bananapi P2 Zero

CPU:     Allwinner H2+ quad-core Cortex-A7 @ 1.2GHz
Memory:  512Mb DDR3
Storage: SDcard, 8GB eMMC
Network: 10/100M ethernet, optional PoE support, Ampak AP6212 wifi + BT
USB:     1x USB 2.0 OTG
Other:   40-pin expansion header, mini-HDMI

Flashing instructions:
  Standard sunxi SD card installation procedure - copy image to SD card,
  insert into SD card slot on the device and boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
8 months agohostapd: fix dynamically adding interfaces with 802.11ax support disabled in the...
Felix Fietkau [Mon, 18 Sep 2023 14:50:35 +0000 (16:50 +0200)]
hostapd: fix dynamically adding interfaces with 802.11ax support disabled in the build

Move an important code line outside of #ifdef CONFIG_IEEE80211AX

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 months agosunxi: refresh kernel patches
Christian Marangi [Mon, 18 Sep 2023 11:43:59 +0000 (13:43 +0200)]
sunxi: refresh kernel patches

Refresh kernel patches for sunxi target.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
8 months agomt76: update to the latest version
Felix Fietkau [Mon, 18 Sep 2023 10:46:12 +0000 (12:46 +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>
8 months agomac80211: backport upstream patch required for mt76 update
Felix Fietkau [Mon, 18 Sep 2023 10:50:45 +0000 (12:50 +0200)]
mac80211: backport upstream patch required for mt76 update

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 months agoipq40xx: add support for YYeTs LE1
Chukun Pan [Wed, 3 May 2023 15:18:48 +0000 (23:18 +0800)]
ipq40xx: add support for YYeTs LE1

Hardware Highlights:
SoC:   Qualcomm IPQ4019 717 MHz
RAM:   512M NT5CC256M16ER-EK
Flash:    32M SPI NOR MX25L25635F
WIFI1:    2.4 GHz 2T2R integrated
WIFI2:    5 GHz 2T2R integrated
Ethernet: QCA8075 (4x LAN, 1x WAN)
LEDS:     power, wlan2g, wlan5g, usb
USB:      1x 3.0
Button:   Reset

Installation:
  Upload factory.bin in stock firmware's upgrade
  page, and this will take a few minutes.

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
8 months agoipq-wifi: update to version 2023-09-16
Chukun Pan [Sun, 17 Sep 2023 15:18:05 +0000 (23:18 +0800)]
ipq-wifi: update to version 2023-09-16

Contains following updates:

 * ipq8074: add Asus RT-AX89X BDF
 * ipq8074: update RegDB in new submitted BDF
 * ipq40xx: add YYeTs LE1 BDF
 * ipq8074: add Netgear WAX620
 * qca-wireless: ipq40xx: add BDFs for ZTE MF287
 * ipq8174: Add Linksys MX4200

Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
8 months agoipq40xx: fix image building for ZTE MF287 series
Andreas Böhler [Tue, 12 Sep 2023 17:57:55 +0000 (19:57 +0200)]
ipq40xx: fix image building for ZTE MF287 series

For the ZTE MF287 series, a special recovery image is built. The Makefile
worked fine on snapshot, but created corrupt images on the 23.05 images.
By using the appropriate variable, this should be fixed.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
8 months agosunxi: add support for H616 SoC and Orangepi Zero 2
Zoltan HERPAI [Fri, 1 Sep 2023 22:18:18 +0000 (00:18 +0200)]
sunxi: add support for H616 SoC and Orangepi Zero 2

Specifications:

SoC:     Allwinner H616 @ 1.5 Ghz
DRAM:    1Gb LPDDR3
Power:   5V USB-C
Video:   HDMI (Type 2.0A - micro)
Network: 10/100/1000Mbps Ethernet (Realtek RTL8211F), AW859A BT+wifi
Storage: microSD / 2Mb SPI flash
USB:     1 USB2.0 Host
Debug    Serial UART

Flashing instructions:
  Standard sunxi SD card installation procedure - copy image to SD card,
  insert into SD card slot on the device and boot.

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
8 months agoramips: RT1800: fix invalid octal number error
Max Qian [Fri, 15 Sep 2023 04:54:30 +0000 (21:54 -0700)]
ramips: RT1800: fix invalid octal number error

This commit removes the padded zeros in the date formatting.
The padded zeros from the date command causes the numbers
to be interpreted as an octal number by printf. Months, days,
and years with the number 08 or 09 raise an error in printf as an
"invalid octal number" and get interpreted as a zero.

Signed-off-by: Max Qian <public@maxqia.com>
8 months agoipq40xx: 6.1: add missing secure QFPROM symbol
Robert Marko [Sun, 17 Sep 2023 20:19:23 +0000 (22:19 +0200)]
ipq40xx: 6.1: add missing secure QFPROM symbol

Kernel config for 6.1 on ipq40xx is missing the config for
CONFIG_NVMEM_QCOM_SEC_QFPROM which them makes the build stop with a prompt.

Symbol is there in 5.15 config but 6.1 config was based of a version that
does not yet have it set as it was introduced after the 6.1 PR.

So, disable CONFIG_NVMEM_QCOM_SEC_QFPROM to fix building on 6.1.

Fixes: 825cfa4e36cb ("ipq40xx: 6.1: refresh kernel config")
Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agoipq40xx: add 6.1 as testing kernel
Robert Marko [Mon, 14 Aug 2023 10:08:07 +0000 (12:08 +0200)]
ipq40xx: add 6.1 as testing kernel

Allow selecting 6.1 as the testing kernel.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agoipq40xx: 6.1: refresh kernel config
Robert Marko [Mon, 14 Aug 2023 16:49:37 +0000 (18:49 +0200)]
ipq40xx: 6.1: refresh kernel config

Refresh the kernel config via make kernel_menuconfig.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agoipq40xx: 6.1: use latest DSA and ethernet patches
Robert Marko [Mon, 21 Aug 2023 21:42:54 +0000 (23:42 +0200)]
ipq40xx: 6.1: use latest DSA and ethernet patches

This pulls-in the latest version of qca8k based IPQ4019 driver as well as
the latest version of IPQESS that was sent upstream.

Both qca8k and IPQESS have been improved and cleaned up compared to current
version of patches.

PSGMII PHY mode and missing reset have been upstreamed and will be in
the kernel 6.6.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
8 months agoipq40xx: 6.1: adapt and refresh patches
Robert Marko [Mon, 14 Aug 2023 16:45:59 +0000 (18:45 +0200)]
ipq40xx: 6.1: adapt and refresh patches

Adapt and refresh patches to apply.

DSA and ethernet driver patches are dropped as they will be replaced with
the latest version that was sent upstream.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agoipq40xx: qca807x: adapt for 6.1
Robert Marko [Mon, 14 Aug 2023 16:42:18 +0000 (18:42 +0200)]
ipq40xx: qca807x: adapt for 6.1

Kernel 6.1 has changed format of sfp_parse_support(), so lets adapt to
those changes so it works on newer kernels as well.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agoipq40xx: copy 5.15 patches and config to 6.1
Robert Marko [Mon, 14 Aug 2023 11:16:12 +0000 (13:16 +0200)]
ipq40xx: copy 5.15 patches and config to 6.1

Copy the 5.15 patches and config as a base for 6.1 support.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agoipq40xx: update ESS reset patch with pending upstream
Robert Marko [Mon, 14 Aug 2023 11:06:27 +0000 (13:06 +0200)]
ipq40xx: update ESS reset patch with pending upstream

Use the split version of ESS reset patch that was sent upstream.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agoipq40xx: move DSA and ethernet driver to 5.15 specific directory
Robert Marko [Mon, 14 Aug 2023 10:56:49 +0000 (12:56 +0200)]
ipq40xx: move DSA and ethernet driver to 5.15 specific directory

As a preparation to move to 6.1, we need to move the DSA and ethernet
drivers to a 5.15 specific directory as 6.1 will use the latest patchset
that was sent upstream which is too hard to backport to 5.15.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agoath79: fix packetloss on some WLR-7100
Matthijs Kooijman [Thu, 31 Aug 2023 19:10:23 +0000 (21:10 +0200)]
ath79: fix packetloss on some WLR-7100

On some WLR-7100 routers, significant packet loss was observed. This is
fixed by configuring a delay on the GMAC0 RXD and RXDV lines.

The values used in this commit are copied from the values used by the
stock firmare (based on register dumping).

Out of four test routers, the problem was consistently observed on two.
It is unclear what the relevant difference is exactly (the two working
routers were v1 001 with AR1022 and v1 002 with AR9342, the two broken
routers were both v1 002 with AR1022). All PCB routing also seems
identical, so maybe there is some stray capacitance on some of these
that adds just enough delay or so...

With this change, the packet loss disappears on the broken routers,
without introducing new packet loss on the previously working routers.

Note that the PHY *also* has delays enabled (through
`qca,ar8327-initvals`) on both RX and TX lines, but apparently that is
not enough, or it is not effective (registers have been verified to be
written).

For detailed discussion of this issue and debug history, see
https://forum.openwrt.org/t/sitecom-wlr-7100-development-progress/79641

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
8 months agomac80211: ath11k: sync with ath-next
Robert Marko [Sat, 16 Sep 2023 10:02:50 +0000 (12:02 +0200)]
mac80211: ath11k: sync with ath-next

Synchronize the ath11k backports with the current ath-next tree.

All of the changes are various bugfixes, there is no new major feature.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agomac80211: ath11k: drop upstreamed patches
Robert Marko [Sat, 16 Sep 2023 09:26:35 +0000 (11:26 +0200)]
mac80211: ath11k: drop upstreamed patches

Commit ed3725e15a154ebebf44e0c34806c57525483f92
("wifi: ath11k: Fix qmi_msg_handler data structure initialization")
has been present upstream since 6.1.2 but it seems Quilt refreshed it
wrongly so it appeared like a completely different patch.

Commit 7c15430822e71e90203d87e6d0cfe83fa058b0dc
("wifi: ath11k: allow system suspend to survive ath11k")
has been present upstream since 6.1.16 but somehow quilt still happily
applied it.

So, drop both of them.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agosunxi: use kernel 6.1 as default
Zoltan HERPAI [Sat, 16 Sep 2023 15:52:57 +0000 (17:52 +0200)]
sunxi: use kernel 6.1 as default

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
8 months agoprocd: create /dev/fd symlink
Erik Karlsson [Wed, 6 Sep 2023 10:33:17 +0000 (12:33 +0200)]
procd: create /dev/fd symlink

This is needed for ksh/bash style process substitution such as
<(command) and >(command) which was introduced in ash as of busybox
version 1.34.0 to work.

Signed-off-by: Erik Karlsson <erik.karlsson@genexis.eu>
8 months agoath79: add support for MikroTik RouterBOARD 750 r2 (hEX lite)
Roger Pueyo Centelles [Wed, 2 Jun 2021 16:45:30 +0000 (18:45 +0200)]
ath79: add support for MikroTik RouterBOARD 750 r2 (hEX lite)

This patch adds support for the MikroTik RouterBOARD 750 r2, marketed as
hEX lite, a small indoor router with 5x 10/100 Mbps Ethernet ports, one
with PoE in. The device was already supported by the ar71xx target.

Specifications:
 - SoC: Qualcomm Atheros QCA9533
 - Flash: 16 MB SPI NOR
 - RAM: 64 MB
 - Ethernet: 4x 10/100 Mbps LAN, 1x 10/100 Mbps WAN (PoE in)
 - LEDs: 5x Ethernet port activity (green), 1x user (green)
 - Buttons: 1x reset

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

Not working:
 - Serial port (already not working in ar71xx)

Flashing:
 TFTP boot initramfs image and then perform sysupgrade. Only the
 "Internet" port will ask for an initramfs image. Follow common
 MikroTik procedure as in https://openwrt.org/toh/mikrotik/common.

Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
8 months agoscripts/download.pl: Remove stale download sites and convert to https
Hannu Nyman [Wed, 13 Sep 2023 13:49:03 +0000 (16:49 +0300)]
scripts/download.pl: Remove stale download sites and convert to https

Remove the stale site definitions from @APACHE, KERNEL etc.

* Remove site that had dropped APACHE
* Remove KERNEL site leading to wrong directory
* Remove dead sites
* Convert ftp/http URLs to https, if possible. Remove duplicate

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
8 months agoipq40xx: add support for Netgear RBX40
Thomas Makin [Tue, 5 Sep 2023 00:00:14 +0000 (20:00 -0400)]
ipq40xx: add support for Netgear RBX40

This adds support for the RBR40 and RBS40 (sold together as RBK40),
two netgear routers identical to SRR60/SRS60 in all but antennae (and
hardware id). See 2cb24b3f3c for details.

Signed-off-by: Thomas Makin <halorocker89@gmail.com>
8 months agonetifd: update to the latest version
Felix Fietkau [Fri, 15 Sep 2023 18:40:59 +0000 (20:40 +0200)]
netifd: update to the latest version

88a3a9e2be07 wireless: clean up prev_config handling
afcd3825dad9 wireless: dynamically enable/disable virtual interfaces base on network interface autostart

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 months agohostapd: add missing ubus ACL entries for AP+client (#13449)
Felix Fietkau [Fri, 15 Sep 2023 18:38:45 +0000 (20:38 +0200)]
hostapd: add missing ubus ACL entries for AP+client (#13449)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 months agohostapd: support dynamic reload of vlan files when renaming interfaces
Felix Fietkau [Fri, 15 Sep 2023 12:25:23 +0000 (14:25 +0200)]
hostapd: support dynamic reload of vlan files when renaming interfaces

Avoids unnecessary AP restart on ifname changes when wifi-vlan sections
are present.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 months agonetifd: update to the latest version
Felix Fietkau [Fri, 15 Sep 2023 11:10:27 +0000 (13:10 +0200)]
netifd: update to the latest version

3d425f16d6a6 wireless: rework and fix vlan/station config reload handling

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 months agokernel: decouple 9P virtio from 9P net
Daniel Maslowski [Thu, 14 Sep 2023 19:56:58 +0000 (21:56 +0200)]
kernel: decouple 9P virtio from 9P net

General support for 9P is desirable on platforms without virtualization.
This decouples the 9P general networking support for use on more platforms.

Signed-off-by: Daniel Maslowski <info@orangecms.org>