openwrt/staging/hauke.git
6 months agoOpenWrt v23.05.0: adjust config defaults v23.05.0
Hauke Mehrtens [Wed, 11 Oct 2023 21:06:24 +0000 (23:06 +0200)]
OpenWrt v23.05.0: adjust config defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
6 months agobsdiff: Add patches for CVEs
Hauke Mehrtens [Sat, 7 Oct 2023 19:07:20 +0000 (21:07 +0200)]
bsdiff: Add patches for CVEs

Add two patches from Debian fixing CVEs in the bsdiff application.
CVE-2014-9862: Heap vulnerability in bspatch
CVE-2020-14315: Memory Corruption Vulnerability in bspatch

Copied the patches from this location:
https://salsa.debian.org/debian/bsdiff/-/blob/debian/latest/debian/patches/20-CVE-2014-9862.patch
https://salsa.debian.org/debian/bsdiff/-/blob/debian/latest/debian/patches/33-CVE-2020-14315.patch

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

6 months agokernel: bump 5.15 to 5.15.134
John Audia [Sat, 7 Oct 2023 14:00:03 +0000 (10:00 -0400)]
kernel: bump 5.15 to 5.15.134

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

Removed upstreamed:
generic/backport-5.15/894-Fix-up-backport-for-13619703038.patch[1]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.134&id=d7acb7031758141225844bea073860b48fd92092

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>
(cherry picked from commit ac3a5911daeaecc04c6ffd03027b6b75fa4472d2)

6 months agokernel: bump 5.15 to 5.15.133
John Audia [Sat, 23 Sep 2023 14:15:37 +0000 (10:15 -0400)]
kernel: bump 5.15 to 5.15.133

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

Removed upstreamed:
bcm47xx/patches-5.15/101-v5.18-mtd-rawnand-brcmnand-Allow-SoC-to-provide-I-O-operations.patch[1]

Cherry picked build fix.[2] All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.133&id=56cf9f446b331414a15ef0e8dedf23583ec2c427
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-5.15/fix-up-backport-of-136191703038-interconnect-teach-l.patch

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>
(cherry picked from commit 89895937dd4a24446b7bfd067398b4f7e73dc7b5)

6 months agotoolchain: glibc: Update glibc 2.37 to recent HEAD
Hauke Mehrtens [Sat, 7 Oct 2023 10:29:57 +0000 (12:29 +0200)]
toolchain: glibc: Update glibc 2.37 to recent HEAD

This adds the following changes:
b4f76ecc9e Ignore MAP_VARIABLE in tst-mman-consts.py
f5d377c896 __check_pf: Add a cancellation cleanup handler [BZ #20975]
0e3e9dbb0e Document BZ #20975 fix
e2974d26ce io: Fix record locking contants on 32 bit arch with 64 bit default time_t (BZ#30477)
3593050c27 io: Fix F_GETLK, F_SETLK, and F_SETLKW for powerpc64
8dcb1a5181 hppa: xfail debug/tst-ssp-1 when have-ssp is yes (gcc-12 and later)
0930ff8eb3 realloc: Limit chunk reuse to only growing requests [BZ #30579]
3f4b4e2cdd elf: _dl_find_object may return 1 during early startup (bug 30515)
260d4b742b nptl: Fix tst-cancel30 on sparc64
58f7431fd7 sparc: Fix la_symbind for bind-now (BZ 23734)
1caf955269 x86: Increase `non_temporal_threshold` to roughly `sizeof_L3 / 4`
80a8c858a5 x86: Fix slight bug in `shared_per_thread` cache size calculation.
cc8243fb0b x86: Use `3/4*sizeof(per-thread-L3)` as low bound for NT threshold.
f94ff95e93 x86: Fix incorrect scope of setting `shared_per_thread` [BZ# 30745]
0d500bfdc0 hurd: Make exception subcode a long
be26b29262 io: Fix record locking contants for powerpc64 with __USE_FILE_OFFSET64
3d24d1903d elf: Do not run constructors for proxy objects
a7e34a6675 elf: Always call destructors in reverse constructor order (bug 30785)
bdb594afa5 elf: Remove unused l_text_end field from struct link_map
1a7cbe52c8 elf: Move l_init_called_next to old place of l_text_end in link map
b752934602 CVE-2023-4527: Stack read overflow with large TCP responses in no-aaaa mode
6529a7466c (HEAD) getaddrinfo: Fix use after free in getcanonname (CVE-2023-4806)
79310b45af x86/dl-cacheinfo: remove unsused parameter from handle_amd
9d5c6e27ed x86: Fix for cache computation on AMD legacy cpus.
4473d1b87d Fix leak in getaddrinfo introduced by the fix for CVE-2023-4806 [BZ #30843]
94ef701365 Document CVE-2023-4806 and CVE-2023-5156 in NEWS
2dfd8c77b5 i686: Regenerate ulps
b4e23c75ae tunables: Terminate if end of input is reached (CVE-2023-4911)

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

6 months agorealtek: 5.15: rtl93xx: support 2500baseT and 5000baseT on USXGMII links
Tobias Schramm [Sat, 23 Sep 2023 11:46:40 +0000 (13:46 +0200)]
realtek: 5.15: rtl93xx: support 2500baseT and 5000baseT on USXGMII links

The USXGMII implementation of Realtek switches can not only support
10GbE but also 2.5Gb and 5Gb on top of the usual data rates.
Mark those as supported to allow them to be negotiated.

This change has been tested on a ZyXEL XGS1250-12 with the following link
partners:
 - NWA50AX Pro (2.5Gb)
 - RTL8152 USB NIC (2.5Gb)
 - AQC111 USB NIC (2.5Gb & 5Gb)

Gbit and 10GbE has also been tested to still work fine with a variety of
devices.

Signed-off-by: Tobias Schramm <tobias@t-sys.eu>
(cherry picked from commit cd56a682326f9de4d77ee3afb99d13d25c478c08)

6 months agortl83xx: fix STP by trapping BPDUs
Rudolf Vesely [Mon, 2 Oct 2023 06:51:19 +0000 (06:51 +0000)]
rtl83xx: fix STP by trapping BPDUs

Fix Spanning Tree Protocol (STP) by changing COPY2CPU which currently
makes switch to ignore Bridge Protocol Data Units (BPDUs).

Tested on Zyxel GS1900-8, 24 and 48.

Signed-off-by: Rudolf Vesely <i@rudolfvesely.com>
[ improve commit description and add new line in different sections ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 41fcc617f94601072d304f2f68e12cf1dd058707)

6 months agouqmi: added timeout to fix hanging qmi.sh
Uwe Niethammer [Sun, 1 Oct 2023 10:26:51 +0000 (12:26 +0200)]
uqmi: added timeout to fix hanging qmi.sh

Modems which are using qmi do not reply on the 1st sync but they do
on subsequent. So qmi.sh is hanging on the first call. Since 2020 uqmi
supports a timeout parameter. Unfortunately qmi.sh didn't make use of
this parameter. So qmi.sh is now invoking an early dummy access to
unlock the modem

Signed-off-by: Uwe Niethammer <uwe@dr-niethammer.de>
(cherry picked from commit 32a696f9e419ebec5b166847a16a5a45d030acbd)

6 months agoyafut: add missing PKG_MIRROR_HASH
Christian Marangi [Mon, 2 Oct 2023 20:13:10 +0000 (22:13 +0200)]
yafut: add missing PKG_MIRROR_HASH

Add missing PKG_MIRROR_HASH. This is always needed as is used to
generate and use a tar instead of git clone and validate the hash of it.

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

6 months agogeneric: add patch for GPON-ONU-34-20BI quirk
Christian Marangi [Thu, 28 Sep 2023 20:55:08 +0000 (22:55 +0200)]
generic: add patch for GPON-ONU-34-20BI quirk

Backport patch merged upstream adding quirk for SFP GPON-ONU-34-20BI.

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

6 months agoCI: push-containers: refresh containers also on modify cmake options
Christian Marangi [Wed, 4 Oct 2023 11:28:58 +0000 (13:28 +0200)]
CI: push-containers: refresh containers also on modify cmake options

Refresh containers also on modify of cmake options in the include file.

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

6 months agoCI: push-containers: fix concurrency group
Christian Marangi [Wed, 4 Oct 2023 11:27:55 +0000 (13:27 +0200)]
CI: push-containers: fix concurrency group

Fix concurrency group for push-containers workflow to handle running on
different branches.

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

6 months agortl93xx: fix condition intended to only select internal serdes ports
Peter Körner [Sun, 24 Sep 2023 18:58:13 +0000 (20:58 +0200)]
rtl93xx: fix condition intended to only select internal serdes ports

This condition was introduced in commit 51c8f7661244 ("realtek: Improve
MAC config handling for all SoCs") to correctly report the speed of the
internal serdes ports as 10G, but instead makes all ports read 10G
because the or-operator should have been an and-operator.

Fixes: #9953
Fixes: 51c8f7661244 ("realtek: Improve MAC config handling for all SoCs")
Signed-off-by: Peter Körner <git@mazdermind.de>
[ wrap comment to 72 column and improve commit ref ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 9fb5082e258ac4672dc69636e5eb79f426defac8)

6 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 agoOpenWrt v23.05.0-rc4: revert to branch defaults
Hauke Mehrtens [Fri, 29 Sep 2023 18:28:43 +0000 (20:28 +0200)]
OpenWrt v23.05.0-rc4: revert to branch defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 months agoOpenWrt v23.05.0-rc4: adjust config defaults v23.05.0-rc4
Hauke Mehrtens [Fri, 29 Sep 2023 18:28:35 +0000 (20:28 +0200)]
OpenWrt v23.05.0-rc4: adjust config defaults

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 months agohostapd: increase PKG_RELEASE to fix builds
Nick Hainke [Fri, 29 Sep 2023 09:12:02 +0000 (11:12 +0200)]
hostapd: increase PKG_RELEASE to fix builds

Recent hostapd changes just edited the ucode files. It is required to
bump the PKG_RELEASE to include the newest changes in the latest builds.

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

7 months agohostapd: fix wpa_supplicant mac address allocation on ap+sta
Felix Fietkau [Thu, 28 Sep 2023 08:28:43 +0000 (10:28 +0200)]
hostapd: fix wpa_supplicant mac address allocation on ap+sta

If the full interface is restarted while bringing up an AP, it can trigger a
wpa_supplicant interface start before wpa_supplicant is notified of the
allocated mac addresses.
Fix this by moving the iface_update_supplicant_macaddr call to just after
the point where mac addresses are allocated.

Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit abceef120d57bf066941882630a76788eb4985a9)

7 months agompc85xx: add Enterasys WS-AP3715i reset button
David Bauer [Wed, 27 Sep 2023 14:43:54 +0000 (16:43 +0200)]
mpc85xx: add Enterasys WS-AP3715i reset button

The reset button was missing from the Enterasys WS-AP3715i DTS.
Add the node required for making the reset button work.

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

7 months agotreewide: Add extra CPE identifier
Hauke Mehrtens [Sun, 24 Sep 2023 18:16:21 +0000 (20:16 +0200)]
treewide: Add extra CPE identifier

This adds some Common Platform Enumerations (CPE) identifiers which I
found.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 months agotoolchain: musl: add PKG_CPE_ID
Arne Zachlod [Wed, 13 Sep 2023 16:20:03 +0000 (18:20 +0200)]
toolchain: musl: add PKG_CPE_ID

Vulnerabilities of musl libc are tracked as
cpe:/a:musl-libc:musl

Signed-off-by: Arne Zachlod <arne@nerdkeller.org>
7 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>
7 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>
7 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>
7 months agohostapd: fix mac address of interfaces created via wdev.uc
Felix Fietkau [Wed, 27 Sep 2023 13:03:16 +0000 (15:03 +0200)]
hostapd: fix mac address of interfaces created via wdev.uc

Use the wdev config with the generated MAC address

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

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>
(cherry picked from commit f1bb528ae7631c60b95499b7e8a1948c3e6a42f0)

7 months agompc85xx: drop WS-AP3715i label-mac
David Bauer [Mon, 25 Sep 2023 18:58:04 +0000 (20:58 +0200)]
mpc85xx: drop WS-AP3715i label-mac

Label MAC detection does not work properly, as MAC address is assigned
on preinit. Thus, remove the label-mac definition.

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

7 months agoipq806x: 5.15: revert upstream commit to fix #11676
Oskari Lemmela [Mon, 21 Aug 2023 05:41:37 +0000 (08:41 +0300)]
ipq806x: 5.15: revert upstream commit to fix #11676

Commit d5a05e69ac6e4 ("net: stmmac: Use hrtimer for TX coalescing") causes
high CPU usage due to hrtimer raw spin locks.

Fixes: #11676
Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
[ renumber and rename revert patch ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
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>
(cherry picked from commit ac422c9788fbb3510b1fddaefc8816bea6601479)
[Refresh on top of OpenWrt 23.05]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 months agokernel: bump 5.15 to 5.15.131
John Audia [Thu, 7 Sep 2023 10:55:41 +0000 (06:55 -0400)]
kernel: bump 5.15 to 5.15.131

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

All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 58bb5e147ae50391c29c53890f47e3a5420bbfad)
[Refresh on top of OpenWrt 23.05]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 months agoipq40xx: ZTE MF287 fix sysupgrade
Andreas Böhler [Mon, 25 Sep 2023 18:16:22 +0000 (20:16 +0200)]
ipq40xx: ZTE MF287 fix sysupgrade

While refactoring support for the MF287 series, an entry in platform.sh
was overlooked - this fixes sysupgrade on this devices.

Signed-off-by: Andreas Böhler <dev@aboehler.at>
(cherry picked from commit 964b576fc133019d0379983df597e4eb343cd635)

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>
(cherry picked from commit b61ac68b67427ce2eb2c81fa647a21d88ddd2a82)

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>
(cherry picked from commit bfd54529fac075eeb70f2408042e0da03b5ec8cc)

7 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>
(cherry picked from commit fdce970dbb47a6f91b08bdac21a098e77926549f)

7 months agowireless-regdb: update to 2023.09.01
Yuu Toriyama [Sat, 2 Sep 2023 07:21:09 +0000 (16:21 +0900)]
wireless-regdb: update to 2023.09.01

Changes:
    9dc0800 wireless-regdb: Update regulatory rules for Philippines (PH)
    111ba89 wireless-regdb: Update regulatory rules for Egypt (EG) from March 2022 guidelines
    ae1421f wireless-regdb: Update regulatory info for Türkiye (TR)
    20e5b73 wireless-regdb: Update regulatory rules for Australia (AU) for June 2023
    991b1ef wireless-regdb: update regulatory database based on preceding changes

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

7 months agomvebu: cortexa72: enable USB PHY
Tomasz Maciej Nowak [Wed, 20 Sep 2023 17:17:46 +0000 (19:17 +0200)]
mvebu: cortexa72: enable USB PHY

Since kernel 5.13 this is needed to enable USB ports on all devices in
subtarget. Previously TF-A and COMPHY driver might have set up this PHY,
but not anymore.

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Tested-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit eac192843030d16046a0d603284c2b4c89822431)

7 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>
(cherry picked from commit 053f8f92d1395fa5d33b0b8f2fef44a4b926c112)

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

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>
(cherry picked from commit 3a5ad6e3d74da713c0fc7d63b8026a56d16e198b)

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>
(cherry picked from commit fd6d7aafb2c3d335a3d192c308ffdace8d292e9f)

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>
(cherry picked from commit 80374177449ab7fadcf7c9cd9693cc0e92feba8d)

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>
(cherry picked from commit 4145ff4d8a29c1c7a1569bb06fa4d1fe9808c94f)

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>
(cherry picked from commit e9722aef9e84110331706f74f7de0942c8d657ed)

7 months agopackage: base-files: turn error into warning
Leon M. Busch-George [Sun, 20 Aug 2023 19:08:20 +0000 (21:08 +0200)]
package: base-files: 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 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>
(cherry picked from commit f52e008d045302976d2ff40f35e91b84a5678d12)

7 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>
(cherry picked from commit a511480368a03f754aa6ce7887633247a07ea166)

7 months agomac80211: fix AP reconfiguration on DFS channels in non-ETSI regdomain
Felix Fietkau [Thu, 14 Sep 2023 11:28:14 +0000 (13:28 +0200)]
mac80211: fix AP reconfiguration on DFS channels in non-ETSI regdomain

Allow grace period for DFS available after shutting down beacons on the channel

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

7 months agonetifd: update to the latest version
Felix Fietkau [Mon, 18 Sep 2023 11:05:30 +0000 (13:05 +0200)]
netifd: update to the latest version

f429bd94f99e system-linux: switch to new ETHTOOL_xLINKSETTINGS API
1a07f1dff32b make_ethtool_modes_h.sh: apply anti-bashism
3d425f16d6a6 wireless: rework and fix vlan/station config reload handling
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>
(cherry picked from commit a33f1d35155cf9579065ed76bd17e991d165170e)

7 months agohostapd: select libopenssl-legacy for openssl variants
Felix Fietkau [Thu, 31 Aug 2023 11:12:23 +0000 (13:12 +0200)]
hostapd: select libopenssl-legacy for openssl variants

Without it, a lot of authentication modes fail without obvious error messages

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

7 months agohostapd: remove eap-eap192 auth type value
Felix Fietkau [Thu, 31 Aug 2023 11:04:19 +0000 (13:04 +0200)]
hostapd: remove eap-eap192 auth type value

It is no longer used

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

7 months agonetifd: update to the latest version
Felix Fietkau [Thu, 31 Aug 2023 11:02:00 +0000 (13:02 +0200)]
netifd: update to the latest version

db3934d2f740 scripts/netifd-wireless.sh: properly fix WPA3 Enterprise support

Support the following values for the different WPA3 Enterprise modes:

- wpa3-mixed: WPA3 Enterprise transitional mode
This supports EAP with both SHA1 and SHA-256, with optional MFP
- wpa3: WPA3 Enterprise only mode
This supports only SHA256 with mandatory MFP
- wpa3-192: WPA3 Enterprise with mandatory 192 bit support
This uses only GCMP-256 ciphers

Disable 192 bit support and GCMP-256 ciphers for the regular "wpa3" mode.
It seems that even leaving in optional 192 bit support breaks auth on some
clients, including iOS devices.

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

7 months agohostapd: support eap-eap2 and eap2 auth_type values
Felix Fietkau [Thu, 31 Aug 2023 09:16:42 +0000 (11:16 +0200)]
hostapd: support eap-eap2 and eap2 auth_type values

WPA3 Enterprise-transitional requires optional MFP support and SHA1+SHA256
WPA3 Enterprise-only requires SHA1 support disabled and mandatory MFP.

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

7 months agohostapd: fix FILS key mgmt type for WPA3 Enterprise 192 bit
Felix Fietkau [Thu, 31 Aug 2023 09:16:04 +0000 (11:16 +0200)]
hostapd: fix FILS key mgmt type for WPA3 Enterprise 192 bit

Use the SHA384 variant to account for longer keys with more security

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

7 months agonetifd: update to the latest version
Felix Fietkau [Thu, 22 Jun 2023 13:58:30 +0000 (15:58 +0200)]
netifd: update to the latest version

077e05f2b129 vlan/vlandev: pass through extra vlan information passed via hotplug
40fad91eb5be wireless: add network_vlan config attribute
1571e18e4a69 bridge: add support for configuring extra tagged vlans on member devices
b719f189f243 bridge: make hotplug-added vlans default to tagged
edf3aced9f9a bridge: add support for adding vlan ranges via hotplug
493e1589bc8b bridge: fix coverity false positive report
03a619947717 bridge: add support for configuring extra vlans for the bridge itself
4bea6d21a9ab wireless: fix changing reconf/serialize options in configuration
255b4d5c472e wireless: fix handling config reload with reconf=1
1ab992a74b43 wireless: fix another reconf issue
e94f7a81a039 bridge: fix config reload on 32 bit systems
8c2758b4fbbb wireless: add support for replacing data blobs at runtime
0ff22a6a68ce wireless: enable dynamic reconfiguration by default
4711f74479e2 netifd: fix disabling radio via config if reconf is being used

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

7 months agohostapd: backport from master, including ucode based reload support
Felix Fietkau [Tue, 29 Aug 2023 12:32:42 +0000 (14:32 +0200)]
hostapd: backport from master, including ucode based reload support

This significantly improves config reload behavior and also fixes some
corner cases related to running AP + mesh interfaces at the same time.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 months agoubus: update to the latest version
Felix Fietkau [Thu, 10 Aug 2023 16:11:09 +0000 (18:11 +0200)]
ubus: update to the latest version

f787c97b3489 libubus: add missing uloop_fd_delete call in ubus_shutdown

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

7 months agoucode: update to the latest version
Felix Fietkau [Tue, 6 Jun 2023 13:05:27 +0000 (15:05 +0200)]
ucode: update to the latest version

9986b839595d ci: unbreak failing builds by using fixed gh-actions-openwrt-ci-sdk
77c961e20eda ci: fix broken imx6-generic SDK build
86107a647cb0 ci: cancel concurrent builds
ed543d8bf481 ci: update the workflows
11d5f8840002 Merge pull request #151 from ynezz/ynezz/unbreak-ci
b934ce815ff2 program: fix memory leak in read_sourceinfo
b0baf043e64c Merge pull request #152 from Ansuel/fix-memory-leak
740e2501fdca main: add user specified library search paths before default path
15f1a669e8e2 struct: remove state->len
29edb011caf1 ubus: add support for strings containing null bytes
2b4346bfdc67 vm: clear vm->alloc_refs in uc_gc_common
b213bd120d55 Merge pull request #150 from nbd168/misc-improvements
66520ebe27ae vm: immediately release arguments on calls with invalid spreads
07cc72a77e3b README.md: fix debian dependencies
d048ea88fe71 compiler: fix memory leak in uc_compiler_compile_import on early exit
7b7e22dcdf02 Merge pull request #155 from luizluca/luizluca-patch-1
d656d150905e types: implement ucv_object_sort()
d72eebeb168b lib: support object ordering in `uc_sort()`
ed1f0133c870 nl80211: add constants for iftypes
3ffb046c59a6 Merge pull request #156 from nbd168/nl80211-iftypes
c7d84aae0969 Merge pull request #153 from jow-/lib-sort-object-support

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

7 months agokernel: backport support for renaming netdevs while up
Felix Fietkau [Mon, 4 Sep 2023 13:28:59 +0000 (15:28 +0200)]
kernel: backport support for renaming netdevs while up

Will be used in upcoming hostapd changes

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

7 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>
(cherry picked from commit a9cc3708e0c3c4869711a9ba4b9c1437ed250721)

7 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>
(cherry picked from commit 794349a28a7b9036b54e13487a96120609db924e)

7 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>
(cherry picked from commit d2ce3a61aa1cbc53988eb640cbab48e20fbfb1aa)

7 months agokernel: ensure VFIO related suboptions are disabled
Mathew McBride [Fri, 15 Sep 2023 23:21:36 +0000 (23:21 +0000)]
kernel: ensure VFIO related suboptions are disabled

These suboptions (PLATFORM, FSL_MC and MLX5_VFIO_PCI)
may be prompted for when VFIO is enabled, regardless of
architecture.

These are not related to the main vfio use case
(passthrough of PCIe devices)

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(5.15 version of abc536f54797386156383da7269ee0d4ccc84073)

7 months agokernel: enable vfio and vfio-pci for armsr-armv8
Mathew McBride [Sun, 6 Aug 2023 21:19:44 +0000 (21:19 +0000)]
kernel: enable vfio and vfio-pci for armsr-armv8

Arm platforms with the right hardware blocks (such as
GICv3.0+ interrupt controller and SMMU/IOMMU) are
able to use vfio-pci to pass through PCI devices
to a VM.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit 9ac01aac0a820f2c48b2ab26628a8c90fb005f20)

7 months agokernel: vfio: remove unneeded enable_unsafe_noiommu_mode parameter
Mathew McBride [Fri, 25 Aug 2023 06:00:40 +0000 (06:00 +0000)]
kernel: vfio: remove unneeded enable_unsafe_noiommu_mode parameter

The vfio module only exposes the enable_unsafe_noiommu_mode parameter
if CONFIG_VFIO_NOIOMMU is enabled. When it isn't, the module
will complain about an unknown parameter:

vfio: unknown parameter 'enable_unsafe_noiommu_mode' ignored

As CONFIG_VFIO_NOIOMMU is disabled by the module package,
we can remove the module loading parameter.

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit 7ad8612a23add071608815e3c78a477c4fbad0d3)

7 months agox86: remove built-in vhost-net driver
Mathew McBride [Tue, 22 Aug 2023 04:49:32 +0000 (04:49 +0000)]
x86: remove built-in vhost-net driver

This is now available as a kmod package (kmod-vhost-net).

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit 8b1cc1582ad9c9b12d52870e0c7f9cb828aa0fbf)

7 months agokernel: add vhost-net module
Mathew McBride [Mon, 21 Aug 2023 06:10:35 +0000 (06:10 +0000)]
kernel: add vhost-net module

vhost-net is used to accelerate traffic to virtualisation
guests that use the virtio-net network card in QEMU.

Generally it is invoked by specifying "vhost=on" to a
QEMU -netdev device:

qemu-system-aarch64 -nographic -M virt -cpu host \
        --enable-kvm -bios u-boot.bin -smp 1 -m 2048 \
        -drive file=openwrt-armsr-armv8.img,format=raw,index=0,media=disk \
        -device "virtio-net,netdev=landev,disable-legacy=off,disable-modern=off" \
        -netdev "tap,id=landev,helper=/usr/lib/qemu-bridge-helper --br=br-lan,vhost=on"

Signed-off-by: Mathew McBride <matt@traverse.com.au>
(cherry picked from commit d188db8aed74547f98b905254d4f57baf225f1d6)

7 months agomvebu: add reset delays of PHYs for Fortinet FortiGate 50E
INAGAKI Hiroshi [Sat, 2 Sep 2023 14:06:20 +0000 (23:06 +0900)]
mvebu: add reset delays of PHYs for Fortinet FortiGate 50E

Add reset-(de)assert-us to ethernet PHYs on Fortinet FortiGate 50E to
solve instability after HW resetting of PHYs. (ex.: restarting "network"
service, etc...)

Fixes: #13391
Fixes: 102dc5a62506 ("mvebu: add support for Fortinet FortiGate 50E")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
(cherry picked from commit 5c65224d8f5787f6bdfaec9547637f1f2f46354f)

7 months agoipq806x: Correct OnHub sysupgrade config logic
Brian Norris [Sun, 10 Sep 2023 21:10:50 +0000 (14:10 -0700)]
ipq806x: Correct OnHub sysupgrade config logic

There's a typo in here: board_name is a function, not a variable. This
issue was pointed out on the OpenWrt forum.

Closes: #13409
Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
(cherry picked from commit 7b78a19e6a16f5c05bfc6d7925b9981048c508d7)

7 months agox86: geode: fix hwrng register accesses
Jonas Gorski [Sat, 9 Sep 2023 10:44:42 +0000 (12:44 +0200)]
x86: geode: fix hwrng register accesses

When the membase and pci_dev pointer were moved to a new struct in priv,
the actual membase users were left untouched, and they started reading
out arbitrary memory behind the struct instead of registers. This
unfortunately turned the RNG into a constant number generator, depending
on the content of what was at that offset.

To fix this, update geode_rng_data_{read,present}() to also get the
membase via amd_geode_priv, and properly read from the right addresses
again.

Closes #13417.

Reported-by: Timur I. Davletshin <timur.davletshin@gmail.com>
Tested-by: Timur I. Davletshin <timur.davletshin@gmail.com>
Suggested-by: Jo-Philipp Wich <jo@mein.io>
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
(cherry picked from commit 09d13cd8d87cc50fde67bbe81c6cca4b799b2724)

7 months agobase-files: sysupgrade: Add 2 sec sleep into process KILL loop
Hannu Nyman [Fri, 8 Sep 2023 16:47:01 +0000 (19:47 +0300)]
base-files: sysupgrade: Add 2 sec sleep into process KILL loop

Add 2 seconds sleep after each forcibly killed/tried-to-kill process
in the final process termination loop in sysupgrade stage2.

This is needed especially for qualcommax/ipq807x, where ath11k
wireless driver may have a long 10-20 seconds delay after termination
before actually getting killed. This often breaks sysupgrade.

The current KILL loop in kill_remaining does all 10 kill attempts
consecutively without any delay, as evidenced here in a failing sysupgrade.
It does not allow any time for the process to finalize its internal
termination.

Sat Sep  2 19:05:56 EEST 2023 upgrade: Sending TERM to remaining processes ...
Sat Sep  2 19:05:56 EEST 2023 upgrade: Sending signal TERM to hostapd (2122)
Sat Sep  2 19:05:56 EEST 2023 upgrade: Sending signal TERM to hostapd (2138)
Sat Sep  2 19:06:00 EEST 2023 upgrade: Sending KILL to remaining processes ...
Sat Sep  2 19:06:00 EEST 2023 upgrade: Sending signal KILL to hostapd (2122)
Sat Sep  2 19:06:00 EEST 2023 upgrade: Sending signal KILL to hostapd (2138)
Sat Sep  2 19:06:00 EEST 2023 upgrade: Sending signal KILL to hostapd (2138)
Sat Sep  2 19:06:00 EEST 2023 upgrade: Sending signal KILL to hostapd (2138)
Sat Sep  2 19:06:00 EEST 2023 upgrade: Sending signal KILL to hostapd (2138)
Sat Sep  2 19:06:00 EEST 2023 upgrade: Sending signal KILL to hostapd (2138)
Sat Sep  2 19:06:00 EEST 2023 upgrade: Sending signal KILL to hostapd (2138)
Sat Sep  2 19:06:00 EEST 2023 upgrade: Sending signal KILL to hostapd (2138)
Sat Sep  2 19:06:00 EEST 2023 upgrade: Sending signal KILL to hostapd (2138)
Sat Sep  2 19:06:00 EEST 2023 upgrade: Sending signal KILL to hostapd (2138)
Sat Sep  2 19:06:00 EEST 2023 upgrade: Sending signal KILL to hostapd (2138)
Sat Sep  2 19:06:00 EEST 2023 upgrade: Failed to kill all processes.
sysupgrade aborted with return code: 256

The change in this commit adds a 2 seconds delay after each kill attempt
in order to allow some processes to more gracefully handle their
internal termination.

The result is like this:

Sun Sep  3 11:15:10 EEST 2023 upgrade: Sending TERM to remaining processes ...
Sun Sep  3 11:15:10 EEST 2023 upgrade: Sending signal TERM to hostapd (2309)
Sun Sep  3 11:15:10 EEST 2023 upgrade: Sending signal TERM to hostapd (2324)
Sun Sep  3 11:15:14 EEST 2023 upgrade: Sending KILL to remaining processes ...
Sun Sep  3 11:15:14 EEST 2023 upgrade: Sending signal KILL to hostapd (2309)
[  699.827521] br-lan: port 7(hn5wpa2r) entered disabled state
[  699.908673] device hn5wpa2r left promiscuous mode
[  699.908721] br-lan: port 7(hn5wpa2r) entered disabled state
[  701.038029] br-lan: port 6(hn5wpa3) entered disabled state
Sun Sep  3 11:15:16 EEST 2023 upgrade: Sending signal KILL to hostapd (2324)
[  702.058256] br-lan: port 5(hn2wlan) entered disabled state
[  709.250063] stage2 (8237): drop_caches: 3
Sun Sep  3 11:15:25 EEST 2023 upgrade: Switching to ramdisk...

The delay introduced here only kicks in if there is some process that
does not get terminated by the first TERM call. Then there is at least
one 2 sec wait after the first KILL loop round.

This commit is related to discussion in PRs #12235 and #12632

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Reviewed-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 47d56ae5463f1965750d3f75390c96d69f969145)

7 months agouboot-envtools: ramips: add support for ALFA Network AX1800RM
Piotr Dymacz [Fri, 28 Jul 2023 10:21:49 +0000 (12:21 +0200)]
uboot-envtools: ramips: add support for ALFA Network AX1800RM

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
(backported from commit 69f12c2f23c6d32a5fdda2385b4156c9b8bfae22)

7 months agoramips: add support for ALFA Network AX1800RM
Piotr Dymacz [Fri, 28 Jul 2023 09:41:14 +0000 (11:41 +0200)]
ramips: add support for ALFA Network AX1800RM

ALFA Network AX1800RM (FCC ID: 2AB877621) is a dual-band Wi-Fi 6
(AX1800) router, based on MediaTek MT7621A + MT79x5D platform.

Specifications:

- SOC:      MT7621A (880 MHz)
- DRAM:     DDR3 256 MiB (Nanya NT5CC128M16JR-EK)
- Flash:    16 MiB SPI NOR (EN25QH128A-104HIP)
- Ethernet: 4x 10/100/1000 Mbps (SOC's built-in switch)
- Wi-Fi:    2x2:2 2.4/5 GHz (MT7905DAN + MT7975DN)
            (MT7905DAN doesn't support background DFS scan/BT)
- LED:      6x green, 1x green/red
- Buttons:  2x (reset, WPS)
- Antenna:  4x external, non-detachable omnidirectional
- UART:     1x 4-pin (2.54 mm pitch, J4, not populated)
- Power:    12 V DC/1 A (DC jack)

MAC addresses:

LAN:     00:c0:ca:xx:xx:4e (factory 0x4, +2)
WAN:     00:c0:ca:xx:xx:4f (factory 0x4, +3)
2.4 GHz: 00:c0:ca:xx:xx:4c (factory 0x4, device's label)
5 GHz:   00:c0:ca:xx:xx:4c (factory 0xa)

Flash instructions for web-based U-Boot recovery:

1. Power the device with WPS button pressed and wait around 10 seconds.
2. Setup static IP 192.168.1.2/24 on your PC.
3. Go to 192.168.1.1 in browser and upload 'recovery' image.

The device runs LEDE 17.01 (kernel 4.4.x) based firmware with 'failsafe'
mode available which allows alternative upgrade method:

1. Run device in 'failsafe' mode and change password for default user.
2. SSH to the device, transfer 'sysupgrade' image and perform upgrade
   in forced mode, without preserving settings: 'sysupgrade -n -F ...'.

Other notes:

If you own early version of this device, the vendor firmware might
refuse OpenWrt image because of missing custom header. In that case,
ask vendor's customer support for stock firmware without custom header
support/requirement.

Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
(backported from commit f1aaa267f0ea18ffe5840f3ce46a48be123d2f62)

7 months agoarm-trusted-firmware-mediatek: fix hang on reboot on MT7622
Daniel Golle [Sun, 10 Sep 2023 22:39:33 +0000 (23:39 +0100)]
arm-trusted-firmware-mediatek: fix hang on reboot on MT7622

With recent updates of TF-A the previously already fixed bug slipped
back into the source tree. Again, reorder bl2 init for MT7622 and
initialize WDT only after DRAM init has completed to avoid the
notorious hang.

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

7 months agouboot-mediatek: sync mtk-snand driver with SDK
Daniel Golle [Fri, 1 Sep 2023 23:54:40 +0000 (00:54 +0100)]
uboot-mediatek: sync mtk-snand driver with SDK

Sync SPI-NAND/ECC controller driver for MT7622, MT7981, MT7986 and MT7988:
 * Platform data for MT7981 was actually missing and is now added.
 * Add support for Winbond W25N01KV 1Gbit chip.

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

7 months agomac80211: fix MT7620 Wi-Fi channel scanning function
Shiji Yang [Tue, 22 Aug 2023 18:16:22 +0000 (19:16 +0100)]
mac80211: fix MT7620 Wi-Fi channel scanning function

During the channel scanning process, the driver will continuously
switch channels. It seems that the full RF calibration step in
rt2800_config_channel() caused the channel scanning function to
timeout. To fix it, move the RF calibration to rt2800_enable_radio()
so that it is only executed once. This commit also includes some
coding format adjustments to follow the Linux recommended style.

Fixes: 2824fa6963cf ("mac80211: rework MT7620 PA/LNA RF calibration")
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
(cherry picked from commit ce6ad123e76311d2a882054b4ea532d1bfb643c8)

7 months agoramips: pinctrl: support requesting different functions for same group
Shiji Yang [Sat, 29 Jul 2023 13:24:10 +0000 (21:24 +0800)]
ramips: pinctrl: support requesting different functions for same group

MT7620 wireless radio needs change the pin group function between
"gpio" and "pa" during the calibration process. However, ralink
pinctrl driver doesn't support requesting different functions for
the same group. This patch enables pinctrl consumers to perform
such operations.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
(cherry picked from commit b4ea49ad442d2884d0b86009f404f125635c4153)

7 months agomac80211: rework MT7620 PA/LNA RF calibration
Shiji Yang [Sat, 29 Jul 2023 13:24:09 +0000 (21:24 +0800)]
mac80211: rework MT7620 PA/LNA RF calibration

This patch makes some improvements to the MT7620 RF calibration.

1. Move MT7620 PA/LNA calibration code to dedicated functions.
2. Restore RF and BBP registers before R-Calibration.
3. Do Rx DCOC calibration again before RXIQ calibration.
4. Use SoC specific AGC initial LNA value.
5. Correct MAC_RX_EN mask in rt2800_r_calibration()[1].

[1] This change may fix the "BBP/RF register access failed" error:
ieee80211 phy0: rt2800_wait_bbp_rf_ready: Error - BBP/RF register access failed, aborting

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
(cherry picked from commit 2824fa6963cf245b7e0b04aa96bcbe5013524b85)

7 months agomediatek: mt7622: set DEVICE_DTC_ADDR for BPi-R64
Daniel Golle [Thu, 31 Aug 2023 18:20:49 +0000 (19:20 +0100)]
mediatek: mt7622: set DEVICE_DTC_ADDR for BPi-R64

Relocating the device tree is required for being apply to apply
device tree overylay at boot.

Fixes: 34bb33094a ("mediatek: use updated device tree overlay mechanism for BPi-R64")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit a8cbee8e2d11dd139c1dea1f7289bdf28b1e2b52)

7 months agoarm-trusted-firmware-mediatek: enable built-in 2.5G PHY on MT7988
Daniel Golle [Mon, 28 Aug 2023 22:44:52 +0000 (23:44 +0100)]
arm-trusted-firmware-mediatek: enable built-in 2.5G PHY on MT7988

Always enable built-in 2.5G PHY on MT7988 for now, so that it can be
used. In future it would be nice to be able to switch power and MDIO
access via address 0 at run-time in Linux, both, to be able to use
external PHYs at address 0 and to reduce power consumption on systems
not using the built-in 2.5G PHY.

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

7 months agouboot-mediatek: fix dependency on TF-A for MT7988 RFB (sdmmc)
Daniel Golle [Mon, 28 Aug 2023 22:41:43 +0000 (23:41 +0100)]
uboot-mediatek: fix dependency on TF-A for MT7988 RFB (sdmmc)

The U-Boot build for the MT7988 reference board booting from SD card
wrongly depended on the 'ddr4' variant of the ARM TrustedFirmware-A build
even though the 'comb' variant is used. Fix that dependency.

Fixes: 572ea68070 ("uboot-mediatek: add patches for MT7988 and builds for RFB")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 78e3adcaf993cd1a58821a69efccfca8d380f754)

7 months agomediatek: filogic: remove stray quote
Daniel Golle [Mon, 28 Aug 2023 20:54:02 +0000 (21:54 +0100)]
mediatek: filogic: remove stray quote

When adapting the network configuration for MT7988 RFB a stray quote
was left in a script. Remove it to fix generating the default network
configuration.

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

7 months agogeneric: sync MediaTek Ethernet driver with upstream
Daniel Golle [Sat, 26 Aug 2023 01:19:18 +0000 (02:19 +0100)]
generic: sync MediaTek Ethernet driver with upstream

Import commits from upstream Linux replacing some downstream patches.
Move accepted patches from pending-{5.15,6.1} to backport-{5.15,6.1}.

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

7 months agomediatek: add support for Ubiquiti UniFi 6 LR v3
Daniel Golle [Sun, 27 Aug 2023 23:14:10 +0000 (00:14 +0100)]
mediatek: add support for Ubiquiti UniFi 6 LR v3

Some recent models of the Ubiquiti Networks UniFi 6 LR access point
come with a RealTek RTL8211FS 1000M/100M/10M PHY instead of the
Aquantia AQR112 2500M/1000M/100M/10M PHY used in both v1 and v2. Add
build for this variant so we can support Ethernet with the PHY.

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

7 months agouboot-mediatek: add builds for UniFi 6 LR v2 and v3
Daniel Golle [Sun, 27 Aug 2023 23:13:05 +0000 (00:13 +0100)]
uboot-mediatek: add builds for UniFi 6 LR v2 and v3

While the v2 is nearly identical to v1, v3 uses a different PHY and
needs a different build for Ethernet to work in U-Boot.

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

7 months agomediatek: generate bootloader artifacts for mt7988_rfb
Daniel Golle [Fri, 25 Aug 2023 03:09:28 +0000 (04:09 +0100)]
mediatek: generate bootloader artifacts for mt7988_rfb

Switch to OpenWrt uImage.FIT bootmethod and include various bootloader
artifacts with the generated binaries.

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

7 months agouboot-mediatek: build fully-featured U-Boot for MT7988 RFB
Daniel Golle [Fri, 25 Aug 2023 02:58:33 +0000 (03:58 +0100)]
uboot-mediatek: build fully-featured U-Boot for MT7988 RFB

Select many potentially useful options for the MT7988 RFB U-Boot builds.
The resulting loader is intended as a development tool and intends to be
generic. It does *not* have a default bootcmd set, but allows to boot
pretty much everything, including EFI executables.

To install this U-Boot build to the eMMC:
  opkg install mmc-utils partx-utils
  mmc bootpart enable 1 1 /dev/mmcblk0
  echo 0 > /sys/block/mmcblk0boot0/force_ro
  dd if=*mediatek_mt7988a-rfb-nand-emmc-preloader.bin of=/dev/mmcblk0boot0
  dd if=*mediatek_mt7988a-rfb-nand-emmc-gpt.bin of=/dev/mmcblk0
  partx -a /dev/mmcblk0
  dd if=*mediatek_mt7988a-rfb-nand-emmc-bl31-uboot.fip of=/dev/mmcblk0p3

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

7 months agomediatek: improve mt7981.dtsi
Daniel Golle [Sun, 27 Aug 2023 14:57:00 +0000 (15:57 +0100)]
mediatek: improve mt7981.dtsi

 * re-factor WED components to boot fine also on limited loaders
 * add LEDs of integrated GE PHY

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

7 months agomediatek: filogic: improve pinctrl drivers
Daniel Golle [Sat, 26 Aug 2023 23:38:38 +0000 (00:38 +0100)]
mediatek: filogic: improve pinctrl drivers

Set correct pull-type data and add additional uart groups for MT7981.
Assign functions to configure pin bias for MT7986.

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

7 months agomediatek: i2c: mt65xx: allow optional pmic clock
Daniel Golle [Sat, 26 Aug 2023 21:26:37 +0000 (22:26 +0100)]
mediatek: i2c: mt65xx: allow optional pmic clock

Using the I2C host controller on the MT7981 SoC requires 4 clocks to
be enabled. One of them, the pmic clk, is only enabled in case
'mediatek,have-pmic' is also set which has other consequences which
are not desired in this case.

Allow defining a pmic clk even in case the 'mediatek,have-pmic' propterty
is not present and the bus is not used to connect to a pmic, but may
still require to enable the pmic clock.

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

7 months agomediatek: re-add dropped properties on BPi-R3
Daniel Golle [Fri, 25 Aug 2023 13:00:09 +0000 (14:00 +0100)]
mediatek: re-add dropped properties on BPi-R3

Unfortunately some device tree properties have slipped under the table
when switching from our downstream device tree.

Bring back 3W power for SFP cages and restore thermal trip points to
make sense again.

Fixes: 7a0ec001ff ("mediatek: sync MT7986 device trees with upstream")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 06a150aed795066ce79a623011884cc0abf290f1)

7 months agogeneric: backport initial LEDs hw control support
Christian Marangi [Sun, 4 Jun 2023 02:26:59 +0000 (04:26 +0200)]
generic: backport initial LEDs hw control support

Backport initial LEDs hw control support. Currently this is limited to
only rx/tx and link events for the netdev trigger but the API got
accepted and the additional modes are working on and will be backported
later.

Refresh every patch and add the additional config flag for QCA8K new
LEDs support.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 0a4b309f41062ef40706162ae53b6428982a0685)

7 months agokernel: bump 5.15 to 5.15.130
John Audia [Sat, 2 Sep 2023 12:42:48 +0000 (08:42 -0400)]
kernel: bump 5.15 to 5.15.130

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

No patches needed a rebased. Update to checksum only.

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>
(cherry picked from commit e793b4bde535b86aab35512c8791c805444e5aff)

7 months agokernel: bump 5.15 to 5.15.129
John Audia [Wed, 30 Aug 2023 18:44:05 +0000 (14:44 -0400)]
kernel: bump 5.15 to 5.15.129

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

All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit 1db566b6928447ff4c4f86ad1be7e0a6d5a58d16)
[Refresh on top of OpenWrt 23.05]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 months agokernel: bump 5.15 to 5.15.128
John Audia [Sat, 26 Aug 2023 16:56:53 +0000 (12:56 -0400)]
kernel: bump 5.15 to 5.15.128

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

All patches automatically rebased.

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

Signed-off-by: John Audia <therealgraysky@proton.me>
(cherry picked from commit e80a3875172178cdcc02d13826717413cc1534a8)
[Refresh on OpenWrt 23.05]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 months agokernel: allow adding devices without hw offload to a hw flowtable
Felix Fietkau [Fri, 1 Sep 2023 10:43:09 +0000 (12:43 +0200)]
kernel: allow adding devices without hw offload to a hw flowtable

This allows supporting a mix of devices with or without hw offloading support

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

8 months agourngd: update to the latest master
Rafał Miłecki [Tue, 25 Jul 2023 07:51:35 +0000 (09:51 +0200)]
urngd: update to the latest master

7aefb47 jitterentropy-rngd: update to the v1.2.0

What's interesting about jitterentropy-rngd v1.2.0 release is that it
bumps its copy of jitterentropy-library from v2.2.0 to the v3.0.0. That
bump includes a relevant commit 3130cd9 ("replace LSFR with SHA-3 256").

When initializing entropy jent calculates time delta. Time values are
obtained using clock_gettime() + CLOCK_REALTIME. There is no guarantee
from CLOCK_REALTIME of unique values and slow devices often return
duplicated ones.

A switch from jent_lfsr_time() to jent_hash_time() resulted in many less
cases of zero delta and avoids ECOARSETIME.

Long story short: on some system this fixes:
[    6.722725] urngd: jent-rng init failed, err: 2

This is important change for BCM53573 which doesn't include hwrng and
seems to have arch_timer running at 36,8 Hz.

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

8 months agonettle: update to 3.9.1
Nick Hainke [Wed, 19 Jul 2023 06:33:32 +0000 (08:33 +0200)]
nettle: update to 3.9.1

Announcement:
https://lists.gnu.org/archive/html/info-gnu/2023-06/msg00000.html

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

8 months agoRevert "ath11k-firmware: update to stable WLAN.HK.2.9.0.1-01837"
Robert Marko [Sun, 27 Aug 2023 10:18:45 +0000 (12:18 +0200)]
Revert "ath11k-firmware: update to stable WLAN.HK.2.9.0.1-01837"

This reverts commit 23953cfa5afa2e8cd9e1c1475d065cb954d8ceb6.

01837 seems to be having multiple issues, one being broken multicast so
lets revert to the last version that was better for the stable branch.

Signed-off-by: Robert Marko <robimarko@gmail.com>
8 months agomt76: update to the latest version
Felix Fietkau [Wed, 26 Jul 2023 11:20:43 +0000 (13:20 +0200)]
mt76: update to the latest version

bdf7ca5db707 wifi: mt76: mt7921: move common register definition in mt792x_regs.h
ae15d5c6b567 wifi: mt76: mt7921: convert acpisar and clc pointers to void
02515b6b90f0 wifi: mt76: mt7921: rename mt7921_vif in mt792x_vif
6ed8a8bdc7b6 wifi: mt76: mt7921: rename mt7921_sta in mt792x_sta
80234e64e7c5 wifi: mt76: mt7921: rename mt7921_phy in mt792x_phy
2485b4222d3d wifi: mt76: mt7921: rename mt7921_dev in mt792x_dev
c6fd7cde77e0 wifi: mt76: mt7921: rename mt7921_hif_ops in mt792x_hif_ops
1a1a57b5f8c4 wifi: mt76: mt792x: move shared structure definition in mt792x.h
68508aab4241 wifi: mt76: mt7921: move mt792x_mutex_{acquire/release} in mt792x.h
ff306af07e65 wifi: mt76: mt7921: move mt792x_hw_dev in mt792x.h
4b49d659acab wifi: mt76: mt7921: Replace fake flex-arrays with flexible-array members
93f821cce8f5 wifi: mt76: mt792x: introduce mt792x-lib module
de7b90721280 wifi: mt76: mt7921: move mac shared code in mt792x-lib module
c68ee8a64bef wifi: mt76: mt7921: move dma shared code in mt792x-lib module
8d561811f271 wifi: mt76: mt7921: move debugfs shared code in mt792x-lib module
0034ae289046 wifi: mt76: mt7921: move init shared code in mt792x-lib module
8419c4e793a7 wifi: mt76: mt792x: introduce mt792x_irq_map
b7c7fadf228c wifi: mt76: mt792x: move more dma shared code in mt792x_dma
0b1603ce707c wifi: mt76: mt7921: move hif_ops macro in mt792x.h
e07540abe87a wifi: mt76: mt7921: move shared runtime-pm code on mt792x-lib
3d65cd7a8dad wifi: mt76: mt7921: move runtime-pm pci code in mt792x-lib
4551f8c838e6 wifi: mt76: mt7921: move acpi_sar code in mt792x-lib module
bd84b8ebaff8 wifi: mt76: mt792x: introduce mt792x-usb module
7067ea0f1bab wifi: mt76: mt792x: move mt7921_load_firmware in mt792x-lib module
cf752af84c35 wifi: mt76: mt76_connac3: move lmac queue enumeration in mt76_connac3_mac.h
700041dcf773 wifi: mt76: mt792x: move MT7921_PM_TIMEOUT and MT7921_HW_SCAN_TIMEOUT in common code
58b2b90ad89b wifi: mt76: mt7921: move mt7921_dma_init in pci.c
9e4cb87a04cf wifi: mt76: mt7921: move mt7921u_disconnect mt792x-lib
c19b62fe6b68 wifi: mt76: testmode: add nla_policy for MT76_TM_ATTR_TX_LENGTH
4904ab2f87cd wifi: mt76: fix return value check in mt76x02_mac_process_rx
1f0fbbee359c wifi: mt76: mt7915: fix tlv length of mt7915_mcu_get_chan_mib_info
24a54ee3a5ec wifi: mt76: mt7915: fix power-limits while chan_switch
80b8bcf0e3ea wifi: mt76: mt7603: rework/fix rx pse hang check
a8d9553d8fc4 wifi: mt76: mt7603: improve watchdog reset reliablity
c03d84c0d018 wifi: mt76: mt7603: improve stuck beacon handling
85cc58378d25 wifi: mt76: mt7603: add missing register initialization for MT7628
b14c2351ddb8 wifi: mt76: mt7603: disable A-MSDU tx support on MT7628

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

8 months agomediatek: enable NMBM remapping for NWA50AX Pro UBI
David Bauer [Fri, 25 Aug 2023 19:38:13 +0000 (21:38 +0200)]
mediatek: enable NMBM remapping for NWA50AX Pro UBI

Don't skip remapping of the UBI area for the ZyXEL NWA50AX Pro. This is
due to the kernel being loaded from the UBI partition by U-Boot.

Link: https://github.com/openwrt/openwrt/pull/13335
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 6dc0675e5b9d59a882972b8d478ee9fa8496ae51)