Compare commits

...

225 Commits

Author SHA1 Message Date
9159abdde4 Merge remote-tracking branch 'remotes/remote/openwrt-24.10' into openwrt-24.10
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
2025-04-27 20:48:49 +08:00
Felix Fietkau
0b392b925f kernel: fix UDPv6 GSO segmentation with NAT
Fixes issues with rx-gro-list and NAT66

Fixes: https://github.com/openwrt/openwrt/issues/18387
Fixes: https://github.com/openwrt/openwrt/issues/18516
Fixes: https://github.com/openwrt/openwrt/issues/18608
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 5501a502e499e0202bdfd0feebbbedb012d5f82b)
2025-04-26 20:53:51 +02:00
08274da537 Merge branch 'openwrt-24.10' of https://nanako.site/gitea/Nanako/openwrt into openwrt-24.10 2025-04-26 03:49:32 +08:00
61b5bb280c Merge remote-tracking branch 'remotes/remote/openwrt-24.10' into openwrt-24.10 2025-04-26 03:49:15 +08:00
Robert Marko
78d517a18c toolchain: gdb: set -std=gnu17
Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks gdb compilation.

This looks like a readline issue, that was fixed in GDB 16.2 but to
not update toolchain components we can simply set the C standard back
to GNU17.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23

Link: https://github.com/openwrt/openwrt/pull/18581
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-25 10:55:04 +02:00
Robert Marko
e0069e7587 jsonfilter: update to Git HEAD (2025-04-18)
8a86fb78235b build: set GNU17 for lemon compilation

Link: https://github.com/openwrt/openwrt/pull/18525
(cherry picked from commit 891c8244f2b346b00190d25bd6970cf755a4aaa6)
Link: https://github.com/openwrt/openwrt/pull/18581
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-25 10:55:04 +02:00
John Audia
5462cba522 tools/e2fsprogs: update to 1.47.2
Release information (not yet published):
https://e2fsprogs.sourceforge.net/e2fsprogs-release.html#1.47.2

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17499
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 40e2710dfa)
Link: https://github.com/openwrt/openwrt/pull/18581
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-25 10:55:04 +02:00
Rosen Penev
a4fec25e24 tools/squashfs3-lzma: fix compilation with GCC15
Function pointers require proper types now.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18572
(cherry picked from commit d5c6452516fdc542696907e58543a549d834c630)
Link: https://github.com/openwrt/openwrt/pull/18581
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-25 10:55:04 +02:00
Robert Marko
d9fccc8e1a tools: gmp: fix compilation with GCC15
Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks GMP compilation by failing to find
a working compiler test.

Its been fixed upstream [2][3], so backport the fix to fix GCC15 compilation.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23
[2] https://gmplib.org/repo/gmp/rev/8e7bb4ae7a18
[3] https://gmplib.org/repo/gmp/rev/d66d66d82dbb

Link: https://github.com/openwrt/openwrt/pull/18506
(cherry picked from commit 31800db91d43042813b7249a09fd61c356b39767)
Link: https://github.com/openwrt/openwrt/pull/18581
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-25 10:55:03 +02:00
Robert Marko
1e51fd037d tools: elfutils: set -std=gnu17
Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks m4 compilation.

This looks like a gnulib issue, so until that is updated/fixed
lets simply set C language version back to GNU17.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23

Link: https://github.com/openwrt/openwrt/pull/18506
(cherry picked from commit f165dd2f78f7aaafa85f59f5c35264dd03e3a6ce)
Link: https://github.com/openwrt/openwrt/pull/18581
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-25 10:55:03 +02:00
Robert Marko
5531dc7109 tools: cpio: fix compilation with GCC15
Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks cpio compilation.

Its been reported upstream [2], so import the patch attached to the bug
report that fixes compilation with GCC15.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23
[2] https://savannah.gnu.org/bugs/?66297

Link: https://github.com/openwrt/openwrt/pull/18506
(cherry picked from commit c5041094ba06b3cdfb9458f1cb5acb00a9cbacd3)
Link: https://github.com/openwrt/openwrt/pull/18581
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-25 10:55:03 +02:00
Robert Marko
9b652e276f tools: m4: set -std=gnu17
Fedora 42 updated to GCC15 which now defaults to GNU23 as the default
instead of GNU17[1], and this breaks m4 compilation.

Its been reported upstream [2], so until its fixed lets simply set C
language version back to GNU17.

[1] https://gcc.gnu.org/gcc-15/porting_to.html#c23
[2] https://savannah.gnu.org/support/?111150

Link: https://github.com/openwrt/openwrt/pull/18505
(cherry picked from commit 8c141e53d720b14a1d8595e0f756f1619df6e763)
Link: https://github.com/openwrt/openwrt/pull/18581
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-04-25 10:55:03 +02:00
Felix Fietkau
274418b028 udebug: add missing dependencies
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit b0710e964df705079a09435e87b1ecc3058d33bf)
2025-04-24 14:24:20 +02:00
Weijie Gao
3a481ae21b toolchain: mold: add PKG_NAME to Makefile
In include/host-build.mk, HOST_BUILD_DIR is set by default value:
HOST_BUILD_DIR ?= $(BUILD_DIR_HOST)/$(PKG_NAME)

However the mold package has no PKG_NAME set at all. This means the
HOST_BUILD_DIR is identical to $(BUILD_DIR_HOST).

In the Host/Prepare stage, by default, the $(HOST_BUILD_DIR) will be
deleted at first unconditionally. Since HOST_BUILD_DIR is identical
to $(BUILD_DIR_HOST), the entire build_dir/toolchain-* directory will
be removed and this will cause build failure.

Adding PKG_NAME:=ld.mold can solve this issue.

Signed-off-by: Weijie Gao <hackpascal@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18567
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit b9cb07eced1de81b647608ee89a95d925c7c12a8)
2025-04-23 12:22:58 +02:00
Álvaro Fernández Rojas
49901245e5 kernel: r8168: add RSS variant
Instead of enabling RSS support, let's introduce a variant and let users
choose between both variants since it can cause network issues.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit cb3fc1aef9c01f23d7f740bf0c5f4b432d6d0e79)
2025-04-23 10:25:39 +02:00
Álvaro Fernández Rojas
da59bc0a6b kernel: r8127: rss: enable ENABLE_MULTIPLE_TX_QUEUE
We need both ENABLE_RSS_SUPPORT and ENABLE_MULTIPLE_TX_QUEUE in order to
support multiple RX and TX queues.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 7615de6ef0830d3917de66aaf4d5df6d3ff45c61)
2025-04-23 10:25:24 +02:00
Álvaro Fernández Rojas
c46ee416be kernel: r8126: rss: enable ENABLE_MULTIPLE_TX_QUEUE
We need both ENABLE_RSS_SUPPORT and ENABLE_MULTIPLE_TX_QUEUE in order to
support multiple RX and TX queues.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit a3e51a395652ec6b8b827de396b56ebc576d81e8)
2025-04-23 10:25:10 +02:00
Pavel Kubelun
a42c06d674 kernel: r8125: rss: enable ENABLE_MULTIPLE_TX_QUEUE
We need both ENABLE_RSS_SUPPORT and ENABLE_MULTIPLE_TX_QUEUE in order to
support multiple RX and TX queues.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18509
[bump release, improve commit description and package changes]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit d127963a4676909d2f58eb54859925a25cdaa063)
2025-04-23 10:24:50 +02:00
Pavel Kubelun
ec82f459c9 kernel: r8125: disable ASPM
Disable ASPM support for this NIC, fixing strange behavior problems, such as
increased latency, strange uneven throughput, etc.
With this option disabled the NIC achieves stable performance.
Upsteam r8169 driver disables ASPM by default for this NIC.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18509
[bump release, fix commit description, split 2nd tx queue part]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit f99b39fd0caf4ba5f1be06841b772557243c4546)
2025-04-23 10:24:30 +02:00
Álvaro Fernández Rojas
31292ddc10 kernel: r8127: load module at boot time
This allows the network interface naming to be stable, free from any
possible interaction from external USB network devices that might
claim usb* interface names.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit b5680bd11339b2ed489e1deeaaa2a3432691490a)
2025-04-23 10:24:10 +02:00
Álvaro Fernández Rojas
111d88e896 kernel: r8126: load module at boot time
This allows the network interface naming to be stable, free from any
possible interaction from external USB network devices that might
claim usb* interface names.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 9bb151d0c635241ceaa29525668cd225a10494d0)
2025-04-23 10:23:50 +02:00
Álvaro Fernández Rojas
50cf9bbf17 kernel: r8125: load module at boot time
This allows the network interface naming to be stable, free from any
possible interaction from external USB network devices that might
claim usb* interface names.

Signed-off-by: Pavel Kubelun <be.dissent@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18509
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit ce9f539672d2d55cea97e47a0e33459179237781)
2025-04-23 10:23:30 +02:00
Álvaro Fernández Rojas
7bef5367a7 kernel: r8168: load module at boot time
This allows the network interface naming to be stable, free from any
possible interaction from external USB network devices that might
claim usb* interface names.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 617961403c27733de5e9c11b0b2e6ea44d2dcec4)
2025-04-23 10:23:14 +02:00
Álvaro Fernández Rojas
6c15645a12 kernel: r8101: load module at boot time
This allows the network interface naming to be stable, free from any
possible interaction from external USB network devices that might
claim usb* interface names.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 7aeb837bf46acdd68b5ed373741be897bbb2067d)
2025-04-23 10:22:22 +02:00
Álvaro Fernández Rojas
1eab9b8a9b generic: 6.6: backport upstream v6.15 Realtek PHY patches
bfc17c1658353 net: phy: realtek: disable PHY-mode EEE
fabcfd6d10999 net: phy: realtek: add defines for shadowed c45 standard registers
8af2136e77989 net: phy: realtek: add helper RTL822X_VND2_C22_REG
02d3b306ac2f0 net: phy: realtek: switch from paged to MMD ops in rtl822x functions
da681ed73fb98 net: phy: realtek: improve mmd register access for internal PHY's
0bea93fdbaf86 net: phy: realtek: use string choices helpers
51773846fab24 net: phy: realtek: make HWMON support a user-visible Kconfig symbol

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 7673a165a955269773eb604d3678d86d0bb7f49c)
2025-04-23 08:38:32 +02:00
Álvaro Fernández Rojas
5663f8e166 generic: 6.6: backport upstream v6.15 r8169 patches
b48688ea3c9ac r8169: disable RTL8126 ZRX-DC timeout
3d9b8ac534126 r8169: enable RTL8168H/RTL8168EP/RTL8168FP ASPM support
473367a5ffe16 r8169: increase max jumbo packet size on RTL8125/RTL8126
853e80369cfce r8169: add PHY c45 ops for MDIO_MMD_VENDOR2 registers
d30460f42675f r8169: add support for Intel Killer E5000
faac69a4ae5ab r8169: don't scan PHY addresses > 0
135c3c86a7cef r8169: make Kconfig option for LED support user-visible

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 36623119b3e6532a3d051a37e93b2fbaa3dd1f6d)
2025-04-23 08:38:32 +02:00
Álvaro Fernández Rojas
c5abbe71d9 generic: backport pmdomain dummy release patch
Fixes the following warning trace on bcm27xx devices when bcm2835-power is
deferred:
[    0.216800] ------------[ cut here ]------------
[    0.216807] Device 'grafx' does not have a release() function, it is broken and must be fixed. See Documentation/core-api/kobject.rst.
[    0.216863] WARNING: CPU: 0 PID: 1 at drivers/base/core.c:2516 device_release+0x80/0x90
[    0.216887] Modules linked in:
[    0.216896] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.6.85 #0
[    0.216905] Hardware name: Raspberry Pi 4 Model B Rev 1.1 (DT)
[    0.216911] pstate: 60400005 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[    0.216919] pc : device_release+0x80/0x90
[    0.216928] lr : device_release+0x80/0x90
[    0.216936] sp : ffffffc080ccb6d0
[    0.216940] x29: ffffffc080ccb6d0 x28: 0000000000000000 x27: ffffff8040d49810
[    0.216953] x26: ffffff8040c904b8 x25: ffffff8040c904a0 x24: ffffffc0808a7f08
[    0.216964] x23: ffffffc080a1a6d8 x22: 0000000000000000 x21: ffffffc080a1afe0
[    0.216976] x20: 0000000000000000 x19: ffffff8040c900b8 x18: 000000000000009f
[    0.216987] x17: 206e656b6f726220 x16: 7369207469202c6e x15: ffffffc080b4ee88
[    0.216998] x14: 00000000000001dd x13: 000000000000009f x12: 00000000ffffffea
[    0.217009] x11: 00000000ffffefff x10: ffffffc080ba6e88 x9 : ffffffc080b4ee30
[    0.217020] x8 : 0000000000017fe8 x7 : c0000000ffffefff x6 : 0000000000057fa8
[    0.217031] x5 : 0000000000000fff x4 : 0000000000000000 x3 : ffffffc080ccb4d0
[    0.217042] x2 : ffffffc080b4edc8 x1 : ffffffc080b4edc8 x0 : 000000000000007a
[    0.217053] Call trace:
[    0.217058]  device_release+0x80/0x90
[    0.217067]  kobject_put+0xac/0x100
[    0.217078]  put_device+0x14/0x24
[    0.217086]  genpd_remove+0x16c/0x244
[    0.217093]  pm_genpd_remove+0x2c/0x50
[    0.217099]  bcm2835_power_probe+0x1f8/0x2b8
[    0.217107]  platform_probe+0x68/0xc4
[    0.217118]  really_probe+0x148/0x2b0
[    0.217125]  __driver_probe_device+0x78/0x128
[    0.217131]  driver_probe_device+0x40/0xdc
[    0.217138]  __device_attach_driver+0xb8/0xf8
[    0.217145]  bus_for_each_drv+0x70/0xb8
[    0.217151]  __device_attach+0xa0/0x184
[    0.217158]  device_initial_probe+0x14/0x20
[    0.217165]  bus_probe_device+0xac/0xb0
[    0.217171]  device_add+0x5a8/0x760
[    0.217177]  platform_device_add+0x184/0x240
[    0.217184]  mfd_add_device+0x3e8/0x4c0
[    0.217195]  devm_mfd_add_devices+0xa0/0x118
[    0.217202]  bcm2835_pm_probe+0x144/0x1d8
[    0.217210]  platform_probe+0x68/0xc4
[    0.217217]  really_probe+0x148/0x2b0
[    0.217224]  __driver_probe_device+0x78/0x128
[    0.217230]  driver_probe_device+0x40/0xdc
[    0.217237]  __driver_attach+0x90/0x160
[    0.217243]  bus_for_each_dev+0x64/0xa4
[    0.217249]  driver_attach+0x24/0x30
[    0.217256]  bus_add_driver+0xe4/0x208
[    0.217262]  driver_register+0x5c/0x124
[    0.217269]  __platform_driver_register+0x28/0x34
[    0.217276]  bcm2835_pm_driver_init+0x1c/0x28
[    0.217286]  do_one_initcall+0x6c/0x1fc
[    0.217294]  kernel_init_freeable+0x208/0x2e4
[    0.217306]  kernel_init+0x28/0x1e4
[    0.217313]  ret_from_fork+0x10/0x20
[    0.217320] ---[ end trace 0000000000000000 ]---

This issue was introduced in v6.6.69 with the following backport:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=36a6e8aeae4a41767bb59f56b100c8cc9ffae2cb

The upstream patch has been adapted to v6.6:
f64f610ec6

More info: https://github.com/raspberrypi/linux/issues/6777

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit f65c44f67f5d435cb552310f2d455fbfdac935c2)
2025-04-23 08:37:03 +02:00
Mieczyslaw Nalewaj
687d713e79 generic: rename backport patch 752-03 to name with correct version
Rename 752-03-v6.6-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch
to 752-03-v6.7-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch
because it is used since kernel 6.7 (https://lore.kernel.org/lkml/20231028011741.2400327-1-kuba@kernel.org/).
Link: https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.7.y&id=5c33c09c89789ea45d2aac2471a28c9f90b04c95

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18253
(cherry picked from commit a81099bca25fc6a6476d55f0ca8fa1d3f5e458e4)
Link: https://github.com/openwrt/openwrt/pull/18428
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-22 19:16:30 +02:00
Mieczyslaw Nalewaj
4ee8c2dd1b generic: rename backport patches to names containing version
Rename 770-net-introduce-napi_is_scheduled-helper.patch
to 770-v6.7-net-introduce-napi_is_scheduled-helper.patch
because it is used since kernel 6.7 (https://lore.kernel.org/lkml/20231028011741.2400327-1-kuba@kernel.org/).
Link: https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.7.y&id=7f3eb2174512fe6c9c0f062e96eccb0d3cc6d5cd

Rename 751-01-STABLE-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch
to 751-01-v6.8-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch
because it is used since kernel 6.8.12 (https://lore.kernel.org/lkml/2024053036-matron-confess-13e0@gregkh/).
Link: https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.8.y&id=b411384df5814fe6fd861d4869607577bcec73a1

Rename 751-02-STABLE-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch
to 751-02-v6.8-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch
because it is used since kernel 6.8.12 (https://lore.kernel.org/lkml/2024053036-matron-confess-13e0@gregkh/).
Link: https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.8.y&id=0849f56b5146b70f2da328b1d178d0a3c53d6846

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18253
(cherry picked from commit 0991d2f06d09f0aa5788e099e3cec15c9043bcb5)
Link: https://github.com/openwrt/openwrt/pull/18428
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-22 19:16:30 +02:00
Daniel Golle
9e9f6875bc generic: fitblk: close block device if mapping image failed
In case a broken fit image is present on flash the fitblk driver would
not map any /dev/fit* devices, but also not always close the block device
the image resides on. In case of ubiblock devices this is fatal as one
then cannot remove the ubiblock device (-EBUSY), and hence cannot replace
the broken image.
Always close the block device in case no sub-image was mapped.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 2b9c81d1cbc65eeb9304b7274058418efa8a9c78)
2025-04-14 18:32:05 +01:00
Daniel Golle
be1b254888 kernel: move accepted patch from pending-6.6 to backport-6.6
742-net-phy-air_en8811h-reset-netdev-rules-when-LED-is-s.patch has been
accepted a while ago as
https://git.kernel.org/torvalds/linux/c/87bfdbbb1992

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 7a303d861a58bdcdd37430fcbf54bdd76b7cf6e0)
2025-04-14 18:32:05 +01:00
Hauke Mehrtens
6271b14140 OpenWrt v24.10.1: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-14 01:07:39 +02:00
Hauke Mehrtens
d183d7bb78 OpenWrt v24.10.1: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-14 01:07:35 +02:00
Hannu Nyman
0425664679 ca-certificates: Update to 20241223
Update ca-certificates to version 20241223

  * Update Mozilla certificate authority bundle to version 2.70.
    The following certificate authorities were added (+):
    + Telekom Security TLS ECC Root 2020
    + Telekom Security TLS RSA Root 2023
    + FIRMAPROFESIONAL CA ROOT-A WEB
    + TWCA CYBER Root CA
    + SecureSign Root CA12
    + SecureSign Root CA14
    + SecureSign Root CA15
    The following certificate authorities were removed (-):
    - Security Communication Root CA (closes: #1063093)

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
Link: https://github.com/openwrt/openwrt/pull/18468
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit c79572210fa47d015b3bdc03f38c25ef5262a318)
2025-04-13 18:38:32 +02:00
INAGAKI Hiroshi
c0ae5d2071 ath79: fix initramfs execution for NEC Aterm devices
Fix execution of initramfs image on NEC Aterm devices by increasing
available memory for lzma extraction of lzma-loader.

The size of initramfs image of v24.10.0 exceeds available memory
(LZMA_TEXT_START - LOADADDR) and loader data running at LZMA_TEXT_START
will be overwritten by extracted data. As a result, LZMA extraction will
be broken and stuck (or unexpectedly reset).
Fix that issue by setting higher LZMA_TEXT_START address to increase
available memory for LZMA extraction by lzma-loader.

log (v24.10.0):

boot> tftpd
tftpd start 192.168.0.1
boot> start tftp load openwrt-24.10.0-ath79-generic-ne
end tftp load length = 6569768
start memory load ...
memory load complete
  begin  : 0x80040000
  length : 6567044
  startup: 0x80040000

boot> boot
begin  : 0x80040000
length : 6567044
startup: 0x80040000
option: 0x0
NEC Aterm series (QCA9558)

Calibrating SGMII
SGMII cal value = 0xe

Configuring SGMII force mode
  SGMII_CONFIG : 0x000000a2
  MR_AN_CONTROL: 0x00008140
  MR_AN_CONTROL: 0x00000140

OpenWrt kernel loader for AR7XXX/AR9XXX
Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>
Decompressing kernel... [:<syntax:value>]');retu  <--- (stuck)
IPL:SOFT-RESET                    <--- (reset by WDT)
memory test ... ok
flinstall OK

boot version: 1.0.0
...

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18476
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 10a674d27738020384a1bfcca693200999a9e406)
2025-04-13 16:55:16 +02:00
Álvaro Fernández Rojas
b4af5bbcf7 package: add kmod-r8127 ethernet driver
r8127 is an out of tree driver provided by Realtek for RTL8127 devices.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 851ea69d8ebf4bdc80b29562123b96cd94387e9e)
2025-04-10 22:39:58 +02:00
Matthias Franck
eed88d4f10 busybox: use external libtirpc when using glibc
In recent glibc versions rpc functionality has been moved to a separate
library instead of glibc itself.
Depend on this library when rpc functionality is needed and glibc is
used.

Signed-off-by: Matthias Franck <matthias.franck@softathome.com>
Link: https://github.com/openwrt/openwrt/pull/17796
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 84e090086795a45d5580138436ce74b6170584ab)
2025-04-10 20:51:56 +02:00
Ming Kuang
3f00d6ba01 wifi-scripts: mac80211.sh: add EHT and HE160 support to iw_htmode
For WIFI7 devices (such as mt7925e), the dev width is currently
always "20 MHz (no HT)" in monitor mode.

Add EHT and HE160 support to iw_htmode to fix this issue.
Additionally, the following changes are made:
1. Set iw_htmode to 160MHz for VHT160. The reason for the current
   VHT160 setting is unclear and seems to have been in place for
   over a decade (ibss_htmode [1]). If anyone knows its impact,
   please inform me so I can restore it.
2. Modify MHZ to MHz. The original matching table in the current
   iw tool uses MHz. Although the match is case-insensitive,
   correcting this won't hurt.

[1]: 768d09be87

Signed-off-by: Ming Kuang <ming@imkuang.com>
Link: https://github.com/openwrt/openwrt/pull/18319
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 86eb1c0b5add1e0b493b25508c45b2df9d722c78)
2025-04-10 20:51:56 +02:00
Shiji Yang
31c3ab3b45 ipq40xx: dts: fix "qcom,coexist-support" property type
Convert the property variable type of "qcom,coexist-support" from
u32 to u8 to match the definition in the dt-bindings document.

Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18393
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 3526dbabdc63c6ac8a932333ab989d1f99b6945b)
2025-04-10 20:51:56 +02:00
Shiji Yang
ced823497a ath10k-ct: remove "qcom,coexist-support" property type hack
The ath10k dt-binding property "qcom,coexist-support" was
explicitly defined as type uint8 since upstream commit
ed09c61eb19d ("dt-bindings: net: Convert ath10k to YAML").
Therefore, this hack patch no longer makes sense.

Link: ed09c61eb1
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18393
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit da13174aa1736f571a808173a1e8159202d7af95)
2025-04-10 20:51:18 +02:00
Shiji Yang
30c1c6d7c3 ath10k-ct: silence some harmless noisy logs
Users feel anxious about some ath10k driver logs. After further
investigation, in fact these logs are harmless. Only developers
need to care about them in order to optimize some parameters.
Let's just silence them to reduce these similar user reports.

Closes: https://github.com/openwrt/openwrt/issues/13148
Closes: https://github.com/openwrt/openwrt/issues/14422
Closes: https://github.com/openwrt/openwrt/issues/15959
Closes: https://github.com/openwrt/openwrt/issues/15997
Closes: https://github.com/openwrt/openwrt/issues/16896
Closes: https://github.com/openwrt/openwrt/issues/18046
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18368
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 88234a03bc645d327016cc807c35972fcb6834eb)
[Apply to ath10k-ct 6.10]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-10 20:50:56 +02:00
Mieczyslaw Nalewaj
7145b85295 kernel: modules: ixgbe,ixgbevf,i40e: remove unused settings and depends
Remove settings and depends that are not used anywhere.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: #18291
(cherry picked from commit b6ff3d9afa0ff8e9ae68812ac7aa6f9be168db95)
Link: https://github.com/openwrt/openwrt/pull/18431
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-10 20:32:40 +02:00
Fil Dunsky
d47f6a365f mediatek: filogic: add support for Huasifei WH3000
**Huasifei WH3000 eMMC / Fudy MT3000**
Portable Wi-Fi 6 travel router based on MediaTek MT7981A SoC.
MT7981B+MT7976CN+RTL8221B Dual Core 1.3GHZ

**Specifications**
SoC: Filogic 820 MT7981A (1.3GHz)
RAM: DDR4 1GB
Flash: eMMC 8GB
WiFi: 2.4GHz and 5GHz with 3 antennas
Ethernet:
1x WAN (10/100/1000M)
1x LAN (10/100/1000/2500M)
USB: 1x USB 3.0 port
Two buttons: power/reset and mode (BTN_0)
LEDS: blue, red, blue+red=pink
UART: 3.3V, TX, RX, GND / 115200 8N1

**Installation via U-Boot rescue**
1. Set static IP 192.168.1.2 on your computer and default route as 192.168.1.1
2. Connect to the WAN port and hold the reset button while booting the device.
3. Wait for the LED to blink 5 times, and release the reset button.
4. Open U-boot web page on your browser at http://192.168.1.1
5. Select the OpenWRT sysupgrade image, upload it, and start the upgrade.
6. Wait for the router to flash the new firmware.
7. Wait for the router to reboot itself.

**Installation via sysupgrade**
Just flash sysupgrade file via [LuCI upgrade page](http://192.168.1.1/cgi-bin/luci/admin/system/flash) without saving the settings.

**Installation via SSH**
Upload the file to the router `/tmp` directory, `ssh root@192.168.1.1` and issue a command:
```
sysupgrade -n /tmp/openwrt-mediatek-filogic-huasifei_wh3000-emmc-squashfs-sysupgrade.bin
```

**Factory MAC**
You can find your Factory MAC which is mentioned on the box at `/dev/mmcblck0p2` partition `factory` starting from `0x4`
```
dd if=/dev/mmcblk0p2 bs=1 skip=4 count=6 | hexdump -C
```

**Enlarging a partition**
Though device has 8GB eMMC, it uses only 2GB `/dev/mmcblck0p6` as `rootfs` for `/rom` and `/overlay` leaving `/dev/mmcblck0p7` as empty unused space.
```
sgdisk -p /dev/mmcblk0
```
```
Disk /dev/mmcblk0: 15269888 sectors, 7.3 GiB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 2BD17853-102B-4500-AA1A-8A21D4D7984D
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 14942174
Partitions will be aligned on 1024-sector boundaries
Total free space is 11197 sectors (5.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            8192            9215   512.0 KiB   8300  u-boot-env
   2            9216           13311   2.0 MiB     8300  factory
   3           13312           21503   4.0 MiB     8300  fip
   4           21504           29695   4.0 MiB     8300  config
   5           29696           62463   16.0 MiB    8300  kernel
   6           62464         4256767   2.0 GiB     8300  rootfs
   7         4257792        14940159   5.1 GiB     8300
```

You can fix that by loading into `initramfs-kernel`, deleting empty `mmcblck0p7` partition and resizing `mmcblck0p6`
```
sysupgrade -F /tmp/openwrt-initramfs-kernel.bin
```
Install and run cfdisk
```
opkg update && opkg install cfdisk
cfdisk /dev/mmcblck0
```
- Select `mmcblck0p7` -> Delete
- Select `mmcblck0p6` -> Resize -> Write -> yes -> Quit

You will not see any difference in `cat /proc/partitions` after that but just flash a `sysupgrade` and you'll get the whole 7.3GB space for the `/overlay`.

Co-developed-by: hecatae <horus.ra@gmail.com>
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18220
(cherry picked from commit 99ea96c297305c632a23e966df6aea1bfac241f9)
Link: https://github.com/openwrt/openwrt/pull/18434
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-10 20:29:37 +02:00
Mikhail Zhilkin
8e8cafcd0e mediatek: add support for netis NX31
This PR adds support for netis NX31 router.

Specification
-------------
- SoC       : MediaTek MT7981BA dual-core ARM Cortex-A53 1.3 GHz
- RAM       : 256 MiB DDR3
- Flash     : SPI-NAND 128 MiB (ESMT)
- WLAN      : MediaTek MT7976CN dual-band WiFi 6
  - 2.4 GHz : b/g/n/ax, MIMO 2x2
  - 5 GHz   : a/n/ac/ax, MIMO 2x2
- Ethernet  : 10/100/1000 Mbps x3 (LAN, MediaTek MT7531AE)
              10/100/1000 Mbps x1 (WAN, SoC internal phy)
- USB       : No
- Buttons   : Mesh, Reset
- LEDs      : 1x Power (blue), unmanaged
              1x Status (blue), gpio-controlled
              1x WiFi 2.4 GHz (blue), gpio-controlled
              1x WiFi 5 GHz (blue), gpio-controlled
              3x LAN activity (blue), switch-controlled
              1x WAN activity (blue), gpio-controlled
- Power     : 12 VDC, 1 A

Installation
------------
1. Connect to the router using ssh (user: admin, pass: web interface
   password)
2. Make mtd backup:
   cat /dev/mtd0 | gzip -1 -c > /tmp/mtd0_spi0.0.bin.gz
   cat /dev/mtd1 | gzip -1 -c > /tmp/mtd1_BL2.bin.gz
   cat /dev/mtd2 | gzip -1 -c > /tmp/mtd2_u-boot-env.bin.gz
   cat /dev/mtd3 | gzip -1 -c > /tmp/mtd3_Factory.bin.gz
   cat /dev/mtd4 | gzip -1 -c > /tmp/mtd4_FIP.bin.gz
   cat /dev/mtd5 | gzip -1 -c > /tmp/mtd5_ubi.bin.gz
3. Download mtd backup from the /tmp dir of the router to your PC using
   scp protocol
4. Upload OpenWrt 'bl31-uboot.fip', 'preloader.bin' images to the /tmp
   dir of the router using scp protocol
5. Write FIP and BL2 (replace bootloader):
   mtd write /tmp/openwrt-mediatek-filogic-netis_nx31-bl31-uboot.fip FIP
   mtd write /tmp/openwrt-mediatek-filogic-netis_nx31-preloader.bin BL2
6. Place OpenWrt
   'openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb' image on
   the tftp server (IP: 192.168.1.254)
7. Erase 'ubi' partition and reboot the router:
   mtd erase ubi
   reboot
8. U-Boot automatically boot OpenWrt recovery image from tftp server to
   the RAM
9. Upload OpenWrt 'sysupgrade.itb' image to the /tmp dir of the router
   (IP: 192.168.1.1) using scp protocol
10. Connect to the router using ssh and run:
    sysupgrade -n openwrt-mediatek-filogic-netis_nx31-squashfs-sysupgrade.itb

Return to stock
---------------
1. Unpack stock BL2 and FIP partitions backup
2. Upload stock BL2 and FIP partitions backup to the /tmp dir of the
   router using scp protocol
3. Connect to the router using ssh and run:
   apk update && apk add kmod-mtd-rw
   insmod mtd-rw i_want_a_brick=1
   mtd unlock BL2
   mtd unlock FIP
4. Restore backup:
   mtd write /tmp/mtd4_FIP.bin FIP
   mtd write /tmp/mtd1_BL2.bin BL2
5. Erase ubi and reboot:
   mtd erase ubi
   reboot
6. Power off the router
7. Press Reset button and power on the router. Release the button after
   ~10 sec
8. Navigate to U-Boot recovery web server (http://192.168.1.1/) and
   upload the OEM firmware

Recovery
--------
1. Place OpenWrt
   'openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb' image on
   the tftp server (IP: 192.168.1.254)
2. Press “Reset” button and power on the router. After ~10 sec release
   the button.
3. Use OpenWrt initramfs system for recovery

MAC addresses
-------------
+---------+-------------------+-----------+
|         | MAC               | Algorithm |
+---------+-------------------+-----------+
| LAN     | dc:xx:xx:d1:xx:18 | label     |
| WAN     | dc:xx:xx:d1:xx:1a | label+2   |
| WLAN 2g | de:xx:xx:11:xx:19 |           |
| WLAN 5g | de:xx:xx:71:xx:19 |           |
+---------+-------------------+-----------+
The LAN MAC was found in 'Factory', 0x1fef20
The WAN MAC was found in 'Factory', 0x1fef26
The WLAN 2g/5g MAC prototype was found in 'Factory', 0x4

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18324
(cherry picked from commit d8002cb627edcbef27dedf9768a45ab0435ac55e)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18438
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-10 20:18:23 +02:00
Mieczyslaw Nalewaj
b16a42159b kernel: bump 6.6 to 6.6.86
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.86

Removed upstreamed:
        generic/pending-6.6/155-usbnet-restore-usb%d-name-exception-for-local-mac-addresses.patch[1]

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.86&id=2beb999f73b48f3cb04d7cb9c4b5400d59f80f89

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18443
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit f7c0331c50f1bb123255e76fd544021576b4e477)
Link: https://github.com/openwrt/openwrt/pull/18451
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-10 20:14:56 +02:00
Álvaro Fernández Rojas
2b1847c781 bcm27xx: pull 6.6 patches from RPi repo
Adds latest 6.6 patches from the Raspberry Pi repository.

These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.6.y/
With the following command:
git format-patch -N v6.6.85..HEAD
(HEAD -> bba53a117a4a5c29da892962332ff1605990e17a)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 4618d09587c4e3d5fdc7643494474be602710815)
2025-04-10 13:43:36 +02:00
Matthias Schiffer
a51b1a98e0 build: bpf: fix LLVM tool paths with host toolchain
Do not assume that the various tools like llc can be found under the
same path as clang; instead, look them up through BPF_PATH (while still
preferring ones found next to clang).

This fixes build in common setups with ccache, where clang resolves to a
path like /usr/lib/ccache/bin/clang, but no other tools can be found at
that location.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Link: https://github.com/openwrt/openwrt/pull/18422
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 89f1d56a7eab7d530be4bbb5cf21dfc80b3485b1)
2025-04-09 18:30:49 +02:00
Matthias Schiffer
dc7933e77f build: bpf: drop clang-11 lookup
CLANG_MIN_VER is 12, so there is no point in looking for clang-11.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Link: https://github.com/openwrt/openwrt/pull/18422
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 45f0eb106bed8868c02e0ccfb545b7e1c4279841)
2025-04-09 18:30:48 +02:00
Matthias Schiffer
2868202df3 ipq40xx: qca8k: hook up IPQ4019 bridge flag offloading
Adds support for setting bridge port learning and isolation flags on
ipq40xx.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Link: https://github.com/openwrt/openwrt/pull/18375
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit af93874f4e5e4f6a8646964fecf385711d527e89)
2025-04-08 18:24:33 +02:00
Matthias Schiffer
eb1f411036 generic: qca8k: backport bridge port isolation support
Bridge port isolation offload support has been added to the bridge core
and many DSA drivers. mt7530 support was backported in OpenWrt commit
c4e6a147a6 ("generic: 6.6: mt7530: add support for bridge port
isolation").

Backport qca8k support as well.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Link: https://github.com/openwrt/openwrt/pull/18375
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 5d1dedd9f7fc7a7c893e14ec6c1548e2be7a1a13)
2025-04-08 18:24:33 +02:00
Jan Hoffmann
8729666926 realtek: refactor RTL930x MAC config to fix PHY ports
Currently, network ports using PHYs get a link, but there is no traffic.
Make it work again by moving the MAC config to phylink_mac_link_up.

A similiar change has been previously applied for RTL83xx in commit
cd958d945b ("realtek: 6.6: refactor mac config and link up for
RTL83xx").

Fixes: https://github.com/openwrt/openwrt/issues/17010
Signed-off-by: Jan Hoffmann <jan@3e8.eu>
Tested-by: Christoph Krapp <achterin@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18268
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit a7e1e138172a1e4f9c35db93c11d026bb3338e24)
2025-04-08 10:51:39 +02:00
cf34955a9d 修复adguardhome错误
Some checks failed
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Signed-off-by: nanako <469449812@qq.com>
2025-04-08 14:52:55 +08:00
2dceecb2be 新增luci-app-adguardhome
Signed-off-by: nanako <469449812@qq.com>
2025-04-08 14:51:09 +08:00
cd7b1dcc6a Merge remote-tracking branch 'remotes/remote/openwrt-24.10' into openwrt-24.10
Some checks failed
Build all core packages / Build all core packages for selected target (push) Waiting to run
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
2025-04-08 00:23:41 +08:00
58e7402c69 更新编译脚本 2025-04-08 00:23:08 +08:00
John Audia
cf3988c266 kernel: bump 6.6 to 6.6.85
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.85

Removed upstreamed:
        bcm27xx/patches-6.6/950-1498-dts-bcm2711-PL011-UARTs-are-actually-r1p5.patch[1]
        bcm27xx/patches-6.6/950-1551-drm-v3d-Don-t-run-jobs-that-have-errors-flagged-in-i.patch[2]

Manually rebased:
        bcm27xx/patches-6.6/950-1512-dts-bcm2711-Don-t-mark-timer-regs-unconfigured.patch

All other patches automatically rebased.

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.85&id=61820187b3ef5a15aed7ef49ed1fcc13398b449c
2. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.85&id=7cd375d46afcce906cfcddf5aec6b318199d1f16

Build system: x86/64
Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64
Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18379
(cherry picked from commit 2e71e41ce66077515a8c4f5be82c75aeeead659d)
Link: https://github.com/openwrt/openwrt/pull/18419
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-05 17:07:43 +02:00
John Audia
52870ddf62 kernel: bump 6.6 to 6.6.84
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.84

All patches automatically rebased.

Build system: x86/64
Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, x86/64
Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18326
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 314ca0387743e5d18850d9c7c959a3206ec6fbc5)
Link: https://github.com/openwrt/openwrt/pull/18419
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-05 17:07:43 +02:00
Kyle Hendry
f31675b69b bmips: add support for Actiontec T1200H
Specifications:
- SoC: Broadcom BCM63168 dual 400MHz MIPS
- Flash: 128MB NAND ESMT F59L1G81A
- RAM: 128MB DDR3
- Ethernet: 5x 1000M
- Wifi: BCM435F
- 1x USB 2.0 port
- 2x Button
- 11x LED
- Coax HPNA (unsupported)
- RJ11 xDSL (unsupported)

Install instructions:
The booloader will only install signed firmware so the image has to
be manually flashed.

- Set up a TFTP server on 192.168.1.0/24 to serve the initramfs image
- Interrupt the bootloader and run from RAM with
  r 192.168.1.100:openwrt-bmips-bcm63268-actiontec_t1200h-initramfs.elf
- On the openwrt console, copy the wfi image using wget/tftp/scp, i.e
  scp user@192.168.1.100:~/openwrt/bin/targets/bmips/bcm63268/openwrt-bmips-bcm63268-actiontec_t1200h-squashfs-cfe.bin /tmp/
- Erase half the flash partition where openwrt will be installed with
  flash_erase -j /dev/mtd1 0 491
- Flash the openwrt image with
  nandwrite -p /dev/mtd1 /tmp/openwrt-bmips-bcm63268-actiontec_t1200h-squashfs-cfe.bin
- Reboot
- Interrupt the bootloader again and use the c command to boot from
  previous firmware if vendor image is loaded

Signed-off-by: Kyle Hendry <kylehendrydev@gmail.com>
[Minor improvements to DTS file]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 65b8a978deac05894d1fd20dfe63494f4b43848d)
2025-04-02 19:11:49 +02:00
Álvaro Fernández Rojas
d70709e5fe bcm63xx-cfe: update to latest version
actiontec: t1200h: add cferam.000 file

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit c01859e4f3b28b414edc62dcb6056593558d9ad0)
2025-04-02 19:11:32 +02:00
Tim Harvey
ba66273943 mac80211: ath11k: Fix DMA buffer allocation to resolve SWIOTLB issues
Backport two commits to resolve issues with ath1kk causing it to fail
driver registration on iommuless systems with DRAM outside of 32bit
addressing such as a 4GiB imx8mm:

commit 1bcd20981834 ("wifi: ath11k: Fix DMA buffer allocation
to resolve SWIOTLB issues")
commit eeadc6baf8b3 ("wifi: ath11k: Use dma_alloc_noncoherent
for rx_tid buffer allocation")

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17751
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit fa50e53aa92e4db9dfe091e7dd55c3fc2024ad13)
2025-04-02 10:23:27 +02:00
Magnus Kroken
53ab5629c3 mbedtls: update to 3.6.3
This release of Mbed TLS provides the fix for a tls compatibility issue of handling fragmented handshake messages.
This release includes fixes for security issues.

* Potential authentication bypass in TLS handshake (CVE-2025-27810) [1]
* TLS clients may unwittingly skip server authentication (CVE-2025-27809) [2]

[1]: https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2025-03-2/
[2]: https://mbed-tls.readthedocs.io/en/latest/security-advisories/mbedtls-security-advisory-2025-03-1/

Full release announcement:
https://github.com/Mbed-TLS/mbedtls/releases/tag/mbedtls-3.6.3

Signed-off-by: Magnus Kroken <mkroken@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18353
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit 1732d81d8082163c66e5b2b3b050318922d5bb88)
2025-04-01 00:31:41 +02:00
Tomas Lara
0073a7bc93 rockchip: fix missing ".patch" file extension
Fixes missing .patch file extension in:
- de9ad11dac
- 2e7d060fd1

Signed-off-by: Tomas Lara <tl849670@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18281
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit f86476b18bb99f9f9491c30430bfa9fa110cb394)
Link: https://github.com/openwrt/openwrt/pull/18347
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-01 00:26:09 +02:00
Michel Lespinasse
8e5c9dbb17 kernel: load r8169 network module at boot time
This allows the network interface naming to be stable, free from any
possible interaction from external USB network devices that might
claim usb* interface names.

(This was a real problem I encountered with a nanopi R6S device and
an external rtl8152 usb3 network controller - the USB controller would
claim the eth1 name, causing much confusion).

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://github.com/openwrt/openwrt/pull/17638
(cherry picked from commit effcb6e4c3f6638ad4dde7a7e9218c4f7189019b)
Link: https://github.com/openwrt/openwrt/pull/18347
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-01 00:26:09 +02:00
Michel Lespinasse
092ee8bf07 rockchip: set network IRQ affinity to fast CPU cores
The nanopi R6S, R6C and nanopc T6 platforms are based on rk3588(s) SoC,
which has fast and slow CPU cores. Set up network interrupt affinity to be
on the fast CPU cores by default. This is similar to the way this was
already configured on nanopi R4S.

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://github.com/openwrt/openwrt/pull/17638
(cherry picked from commit 59215154a0eba77f0a79a6e30069a3037603ebf2)
Link: https://github.com/openwrt/openwrt/pull/18347
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-01 00:26:09 +02:00
Michel Lespinasse
f9d59735c6 rockchip: configure reset button on nanopi R6
Set up openwrt to handle the reset button appropriately (so that it
can trigger the various recovery modes) on the nanopi R6S and R6C models.

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://github.com/openwrt/openwrt/pull/17638
(cherry picked from commit 2e7d060fd1ba6160067df1a2ba303c7c2efe2a7e)
Link: https://github.com/openwrt/openwrt/pull/18347
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-01 00:26:09 +02:00
Michel Lespinasse
ec231bf564 rockchip: show boot stages on nanopi R6 system LED
Set up openwrt to show boot progress on the nanopi R6S or R6C system LED.

The LED blinking states indicate the boot stage. The LED is defined as
a power LED, but can still be set to heartbeat in /etc/config/system
after the system is done booting.

Signed-off-by: Michel Lespinasse <michel@lespinasse.org>
Link: https://github.com/openwrt/openwrt/pull/17638
(cherry picked from commit de9ad11dac094b6074c9b23341acbc28806404ae)
Link: https://github.com/openwrt/openwrt/pull/18347
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-04-01 00:26:09 +02:00
Coia Prant
76c1d0f493 ramips: Fix Hongdian H8922 v30 pinctrl default state
According to the MT7620A hardware datasheet, GPIO/14 was originally used for RIN of UARTF, but is now used as the WPS LED.

Corrected pinctrl to ensure it works properly in the future.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18278
Link: https://github.com/openwrt/openwrt/pull/18279
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 612bedaf5b0a0186e34e521ebfc122404aeff265)
2025-04-01 00:17:10 +02:00
Christian Marangi
64186283b2 mac80211: fix compilation error for old stable kernel version
Fix compilation error for old stable version caused by
genlmsg_multicast_allns backport fix pushed middle version.

Version 5.15 version 0-169, 6.1 version 0-115, 6.6 version 0-58 have the
old genlmsg_multicast_allns version with flags variable.

Compiling backport project with these version result in a compilation
error. To handle this, introduce a backport function for the affected
kernel version.

Link: https://github.com/openwrt/openwrt/pull/18373
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit 40393881491aa5fd23e715d0bedf591e3b152ddd)
2025-03-30 16:57:01 +02:00
Rui Salvaterra
1c1c373943 kernel: backport igc hw vlan patch to 24.10
Fix an abysmal out-of-the-box performance issue with igc-supported Ethernet
controllers and 802.1Q.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
2025-03-28 16:26:03 +00:00
Paul Donald
de2718b2f3 lldpd: add custom-tlv handling
Do not verify the format of TLV. Leave that to lldpd.

These lldpd config entries:

config custom-tlv
	list ports 'eth0'
	option tlv 'replace oui 33,44,55 subtype 254 oui-info 55,55,55,55,55'

config custom-tlv
	option tlv 'oui 33,44,44 subtype 232'
	list ports 'br-lan'
	list ports 'eth0'

config custom-tlv # oui-info truncated
	option tlv 'add oui 33,44,33 subtype 66 oui-info 5555555555'

config custom-tlv
	option tlv 'add oui 33,44,31 subtype 44'

config custom-tlv # invalid oui
	option tlv 'add oui 3322 subtype 79'

config custom-tlv # invalid oui
	option tlv 'oui 3312 subtype 74'

Produce the following lldpd.conf content:

configure ports eth0 lldp custom-tlv replace oui 33,44,55 subtype 254 oui-info 55,55,55,55,55
configure ports br-lan,eth0 lldp custom-tlv oui 33,44,44 subtype 232
configure lldp custom-tlv add oui 33,44,33 subtype 66 oui-info 5555555555
configure lldp custom-tlv add oui 33,44,31 subtype 44
configure lldp custom-tlv add oui 3322 subtype 79
configure lldp custom-tlv oui 3312 subtype 74

And lldpd (v1.0.13 on v22) logs the following:

Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op replace oui 33:44:55 subtype fe
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:44 subtype e8
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:33 subtype 42
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:33 subtype 42
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:31 subtype 2c
Sat Mar 16 19:11:39 2024 daemon.info lldpd[10916]: custom TLV op add oui 33:44:31 subtype 2c
Sat Mar 16 19:11:39 2024 daemon.warn lldpcli[10915]: invalid OUI value '3322'
Sat Mar 16 19:11:39 2024 daemon.info lldpcli[10915]: an error occurred while executing last command
Sat Mar 16 19:11:39 2024 daemon.warn lldpcli[10915]: invalid OUI value '3312'
Sat Mar 16 19:11:39 2024 daemon.info lldpcli[10915]: an error occurred while executing last command
Sat Mar 16 19:11:39 2024 daemon.info lldpcli[10915]: lldpd should resume operations

( The last two TLV are invalid: their oui must be three hex bytes, comma
separated. Only the first hex byte of oui-info 5555555555 is used )

Depends on #14867 and its release version bump

Tested on: 22.03.6

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14872
(cherry picked from commit 8d1fe32c2c46a8de519f9926be2bc062cef66f24)
Link: https://github.com/openwrt/openwrt/pull/18343
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-25 09:52:55 +01:00
Paul Donald
bde35a6c7d lldpd: get_config_cid_ifaces() -> get_interface_csv()
where csv = comma separated value(s)

Make the function more generic. Can use it for not only 'config'.

Now it can be used to parse interfaces for additional lldpd settings,
e.g. custom-tlv.

Tested on: 22.03.6

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14872
(cherry picked from commit a015f59880c72a1bdd07de32491f85ce7f8d2a1c)
Link: https://github.com/openwrt/openwrt/pull/18343
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-03-25 09:52:55 +01:00
Felix Fietkau
9e63e2410d libnl-tiny: update to Git HEAD (2025-03-19)
c0df580adbd4 attr.c: fix nla_reserve size check

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit ddc2ae02b3495ffcc6bb5194c777952621c46c25)
2025-03-19 13:20:21 +01:00
Christian Marangi
53479294fb generic: globally enable CONFIG_PCPU_DEV_REFCNT
Quoting the kconfig description for CONFIG_PCPU_DEV_REFCNT:

network device refcount are using per cpu variables if this option is
set. This can be forced to N to detect underflows (with a performance
drop).

This was introduced from kernel 5.13 and was wrongly set as disabled.
Some target actually enables it but this should be always enabled unless
refcount needs to be debugged (unlikely for production images)

Enable in generic and drop the entry in every other target.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18174
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit ea6f3e49d6509f3bddb43364cf7225b4935fee82)
2025-03-19 09:24:43 +01:00
Tomasz Maciej Nowak
5c533d7a89 mediatek: u7623: fix network switch enumeration
With upstream changes hitting kernel 6.4 the dtb for u7623 ends up with
both mac (gmac) disabled, since this is now the default status in
mt7623.dtsi. Fix this by including mt7623a.dtsi (which already has all
necessary bits) and enabling all revlevant ports. This will also do
a side hustle of assigning proper clocks for power controller and
specifying proper power domain for few devices.

Link: https://lore.kernel.org/all/20230210182505.24597-1-arinc.unal@arinc9.com
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250304164507.60511-2-tmn505@terefe.re/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit adc4d95c742139411c551a20d93103c9a1155ddd)
2025-03-17 16:21:23 +01:00
Tomasz Maciej Nowak
82fabe4370 uboot-mediatek: u7623: remove keys pin function
Apparently U-Boot will discard whole node if requested pin function is
unknown to the driver. This resulted in inability to interact with
U-Boot on the said board, as U-Boot always assumed the recovery key
pressed and issued recovery procedure. Log snippet:

button_gpio gpio-keys: pinctrl_select_state_full: pinctrl_config_one: err=-38
reset button found
button pushed, resetting environment

Recovery procedure also booted recovery image, which didn't affect much
the 23.05.x release, since the root fs argument was valid, so changes
persisted. But as 24.10.x hit with fitblk, the board will boot only
recovery image (initramfs) because of default bootargs will reset on each
boot and U-Boot provided bootargs took precedence.

Fixes: 42eeb22450 ("uboot-mediatek: fix factory/reset button")
Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
Link: https://patchwork.ozlabs.org/project/openwrt/patch/20250304164507.60511-1-tmn505@terefe.re/
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit f8a2e1c68b48d72234172543f4232e77f065ca4d)
2025-03-17 16:21:23 +01:00
J. S. Seldenthuis
3c1edff293 ramips: use openwrt,netdev-name to fix port name conflict on TP-Link Deco M4R v4
Since 24.10.0, eth0, used for the WAN interface, does not work. From dmesg:

...
[    1.831126] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.846204] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 19
...
[    1.933969] mt7530-mdio mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.967668] mt7530-mdio mdio-bus:1f: configuring for fixed/rgmii link mode
[    1.975999] mt7530-mdio mdio-bus:1f eth0 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7530 PHY] (irq=21)
[    1.986907] mt7530-mdio mdio-bus:1f: Link is Up - 1Gbps/Full - flow control rx/tx
[    1.987149] mtk_soc_eth 1e100000.ethernet eth0: error -17 registering interface eth0
[    2.004157] mt7530-mdio mdio-bus:1f eth1 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7530 PHY] (irq=22)
[    2.017698] mtk_soc_eth 1e100000.ethernet eth0: entered promiscuous mode
[    2.024849] DSA: tree 0 setup
...
[    4.249680] mtk_soc_eth 1e100000.ethernet dsa: renamed from eth0
...

Like #15865, it seems that gmac0 does not rename eth0 to dsa until after the
switch ports are initialized, leading to a name collision (error -17 = EEXIST).

This patch follows #17062 by using openwrt,netdev-name to fix the collision.

Signed-off-by: J. S. Seldenthuis <jseldenthuis@lely.com>
Link: https://github.com/openwrt/openwrt/pull/18082
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 4fed462454469e9af89bc92cd12d30c47d43efe4)
2025-03-17 16:21:23 +01:00
Thomas Richard
2d8bed0fa1 optee-os.mk: override default PATH to not use hostpkg python
In some cases hostpkg python from packages feed is used (hostpkg has higher
priority in PATH) which causes build failure (cryptography module is
missing). So override PATH to not use hostpkg python.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/18102
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 8c3a43be27d989ef42d4148949e43266694a5168)
2025-03-17 16:21:23 +01:00
Shiji Yang
9db716b6dc stm32: modules: fix stm32-hash package build
* Remove misplaced backslash to fix the build warning:

WARNING: can't parse line: FILES:=/drivers/crypto/stm32/stm32-hash.ko

* Add missing dependency package kmod-crypto-engine:

Package kmod-stm32-hash is missing dependencies for the following libraries:
crypto_engine.ko

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/18241
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 4efb4a26d28ecdd5fec9dc3a85bcb46a45a75f60)
2025-03-17 16:21:23 +01:00
John Audia
cfd155aab9 firmware: intel-microcode: update to 20250211
Debian Changelogs from 20240531:

 local access.
    - Mitigations for INTEL-SA-01079 (CVE-2024-23918)
      Potential security vulnerabilities in some Intel Xeon processors
      using Intel SGX may allow escalation of privilege.  Intel disclosed
      that some processor models were already fixed by a previous
      microcode update.
    - Updated mitigations for INTEL-SA-01097 (CVE-2024-24968)
      Improper finite state machines (FSMs) in hardware logic in some
      Intel Processors may allow an privileged user to potentially enable a
      denial of service via local access.
    - Mitigations for INTEL-SA-01103 (CVE-2024-23984)
      A potential security vulnerability in the Running Average Power Limit
      (RAPL) interface for some Intel Processors may allow information
      disclosure.  Added mitigations for more processor models.
  * Updated Microcodes:
    sig 0x000806f8, pf_mask 0x87, 2024-06-20, rev 0x2b000603, size 588800
    sig 0x000806f7, pf_mask 0x87, 2024-06-20, rev 0x2b000603
    sig 0x000806f6, pf_mask 0x87, 2024-06-20, rev 0x2b000603
    sig 0x000806f5, pf_mask 0x87, 2024-06-20, rev 0x2b000603
    sig 0x000806f4, pf_mask 0x87, 2024-06-20, rev 0x2b000603
    sig 0x00090672, pf_mask 0x07, 2024-05-29, rev 0x0037, size 224256
    sig 0x00090675, pf_mask 0x07, 2024-05-29, rev 0x0037
    sig 0x000b06f2, pf_mask 0x07, 2024-05-29, rev 0x0037
    sig 0x000b06f5, pf_mask 0x07, 2024-05-29, rev 0x0037
    sig 0x000906a3, pf_mask 0x80, 2024-06-03, rev 0x0435, size 223232
    sig 0x000906a4, pf_mask 0x80, 2024-06-03, rev 0x0435
    sig 0x000a06a4, pf_mask 0xe6, 2024-08-02, rev 0x0020, size 138240
    sig 0x000b06a2, pf_mask 0xe0, 2024-05-29, rev 0x4123, size 220160
    sig 0x000b06a3, pf_mask 0xe0, 2024-05-29, rev 0x4123
    sig 0x000b06a8, pf_mask 0xe0, 2024-05-29, rev 0x4123
    sig 0x000c06f2, pf_mask 0x87, 2024-06-20, rev 0x21000283, size 560128
    sig 0x000c06f1, pf_mask 0x87, 2024-06-20, rev 0x21000283
  * source: update symlinks to reflect id of the latest release, 20241112
  * Update changelog for 3.20240910.1 and 3.20240813.1 with new information:
    INTEL-SA-1103 was addressed by 3.20240813.1 for some processor models,
    and not by 3.20240910. INTEL-SA-1079 was addressed by 3.20240910.1 for
    some processor models.

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Thu, 14 Nov 2024 15:37:40 -0300

intel-microcode (3.20241029.1) UNRELEASED; urgency=medium

  * New upstream microcode datafile 20241029
    - Not relevant for operating system microcode updates
    - Only when loaded from firmware, this update fixes the critical,
      potentially hardware-damaging errata RPL061: Incorrect Internal
      Voltage Request on Raptor Lake (Core 13th/14th gen) Intel
      processors.
  * Updated Microcodes:
    sig 0x000b0671, pf_mask 0x32, 2024-08-29, rev 0x012b, size 211968

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Thu, 14 Nov 2024 14:49:03 -0300

intel-microcode (3.20240910.1) unstable; urgency=medium

  * New upstream microcode datafile 20240910 (closes: #1081363)
    - Mitigations for INTEL-SA-01097 (CVE-2024-24968)
      Improper finite state machines (FSMs) in hardware logic in some
      Intel Processors may allow an privileged user to potentially enable a
      denial of service via local access.
    - Fixes for unspecified functional issues on several processor models
    - The processor voltage limit issue on Core 13rd/14th gen REQUIRES A
      FIRMWARE UPDATE.  It is present in this release for sig 0xb0671, but
      THE VOLTAGE ISSUE FIX ONLY WORKS WHEN THE MICROCODE UPDATE IS LOADED
      THROUGH THE FIT TABLE IN FIRMWARE.  Contact your system vendor for a
      firmware update that includes the appropriate microcode update for
      your processor.
  * Updated Microcodes:
    sig 0x00090672, pf_mask 0x07, 2024-02-22, rev 0x0036, size 224256
    sig 0x00090675, pf_mask 0x07, 2024-02-22, rev 0x0036
    sig 0x000b06f2, pf_mask 0x07, 2024-02-22, rev 0x0036
    sig 0x000b06f5, pf_mask 0x07, 2024-02-22, rev 0x0036
    sig 0x000906a3, pf_mask 0x80, 2024-02-22, rev 0x0434, size 222208
    sig 0x000906a4, pf_mask 0x80, 2024-02-22, rev 0x0434
    sig 0x000a06a4, pf_mask 0xe6, 2024-06-17, rev 0x001f, size 137216
    sig 0x000b0671, pf_mask 0x32, 2024-07-18, rev 0x0129, size 215040
    sig 0x000b06a2, pf_mask 0xe0, 2024-02-22, rev 0x4122, size 220160
    sig 0x000b06a3, pf_mask 0xe0, 2024-02-22, rev 0x4122
    sig 0x000b06a8, pf_mask 0xe0, 2024-02-22, rev 0x4122
    sig 0x000b06e0, pf_mask 0x19, 2024-03-25, rev 0x001a, size 138240
  * Update changelog for 3.20240813.1 with new information
  * Update changelog for 3.20240514.1 with new information
  * source: update symlinks to reflect id of the latest release, 20240910

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Sat, 21 Sep 2024 16:40:07 -0300

intel-microcode (3.20240813.2) unstable; urgency=high

  * Merge changes from intel-microcode/3.20240531.1+nmu1, which were left out
    from 3.20240813.1 by an oversight, regressing merged-usr. Closes: #1060200

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Sat, 17 Aug 2024 11:31:32 -0300

intel-microcode (3.20240813.1) unstable; urgency=medium

  * New upstream microcode datafile 20240813 (closes: #1078742)
    - Mitigations for INTEL-SA-01083 (CVE-2024-24853)
      Incorrect behavior order in transition between executive monitor and SMI
      transfer monitor (STM) in some Intel Processors may allow a privileged
      user to potentially enable escalation of privilege via local access.
    - Mitigations for INTEL-SA-01118 (CVE-2024-25939)
      Mirrored regions with different values in 3rd Generation Intel Xeon
      Scalable Processors may allow a privileged user to potentially enable
      denial of service via local access.
    - Mitigations for INTEL-SA-01100 (CVE-2024-24980)
      Protection mechanism failure in some 3rd, 4th, and 5th Generation Intel
      Xeon Processors may allow a privileged user to potentially enable
      escalation of privilege via local access.
    - Mitigations for INTEL-SA-01038 (CVE-2023-42667)
      Improper isolation in the Intel Core Ultra Processor stream cache
      mechanism may allow an authenticated user to potentially enable
      escalation of privilege via local access.  Intel disclosed that some
      processor models were already fixed by the previous microcode update.
    - Mitigations for INTEL-SA-01046 (CVE-2023-49141)
      Improper isolation in some Intel Processors stream cache mechanism may
      allow an authenticated user to potentially enable escalation of
      privilege via local access.  Intel disclosed that some processor models
      were already fixed by the previous microcode update.
    - Mitigations for INTEL-SA-01079 (CVE-2024-23918)
      Potential security vulnerabilities in some Intel Xeon processors
      using Intel SGX may allow escalation of privilege.  Intel released this
      information during the full disclosure for the 20241112 update.
      Processor signatures 0x606a6 and 0x606c1.
    - Mitigations for INTEL-SA-01103 (CVE-2024-23984)
      A potential security vulnerability in the Running Average Power Limit
      (RAPL) interface for some Intel Processors may allow information
      disclosure. Intel released this information during the full disclosure
      for the 20240910 update.  Processor signatures 0x5065b, 0x606a6,
      0x606c1.
    - Fix for unspecified functional issues on several processor models
    - Fix for errata TGL068/ADL075/ICL088/... "Processor may hang during a
      microcode update".  It is not clear which processors were fixed by this
      release, or by one of the microcode updates from 2024-05.
    - Mitigations for INTEL-SA-01213 (CVE-2024-36293)
      Improper access control in the EDECCSSA user leaf function for some
      Intel Processors with Intel SGX may allow an authenticated user to
      potentially enable denial of service via local access.  Intel released
      this information during the full disclosure for the 20250211 update.
      Processor signature 0x906ec (9th Generation Intel Core processor).
  * Updated microcodes:
    sig 0x00050657, pf_mask 0xbf, 2024-03-01, rev 0x5003707, size 39936
    sig 0x0005065b, pf_mask 0xbf, 2024-04-01, rev 0x7002904, size 30720
    sig 0x000606a6, pf_mask 0x87, 2024-04-01, rev 0xd0003e7, size 308224
    sig 0x000606c1, pf_mask 0x10, 2024-04-03, rev 0x10002b0, size 300032
    sig 0x000706e5, pf_mask 0x80, 2024-02-15, rev 0x00c6, size 114688
    sig 0x000806c1, pf_mask 0x80, 2024-02-15, rev 0x00b8, size 112640
    sig 0x000806c2, pf_mask 0xc2, 2024-02-15, rev 0x0038, size 99328
    sig 0x000806d1, pf_mask 0xc2, 2024-02-15, rev 0x0052, size 104448
    sig 0x000806e9, pf_mask 0xc0, 2024-02-01, rev 0x00f6, size 106496
    sig 0x000806e9, pf_mask 0x10, 2024-02-01, rev 0x00f6, size 106496
    sig 0x000806ea, pf_mask 0xc0, 2024-02-01, rev 0x00f6, size 105472
    sig 0x000806eb, pf_mask 0xd0, 2024-02-01, rev 0x00f6, size 106496
    sig 0x000806ec, pf_mask 0x94, 2024-02-05, rev 0x00fc, size 106496
    sig 0x00090661, pf_mask 0x01, 2024-04-05, rev 0x001a, size 20480
    sig 0x000906ea, pf_mask 0x22, 2024-02-01, rev 0x00f8, size 105472
    sig 0x000906eb, pf_mask 0x02, 2024-02-01, rev 0x00f6, size 106496
    sig 0x000906ec, pf_mask 0x22, 2024-02-01, rev 0x00f8, size 106496
    sig 0x000906ed, pf_mask 0x22, 2024-02-05, rev 0x0100, size 106496
    sig 0x000a0652, pf_mask 0x20, 2024-02-01, rev 0x00fc, size 97280
    sig 0x000a0653, pf_mask 0x22, 2024-02-01, rev 0x00fc, size 98304
    sig 0x000a0655, pf_mask 0x22, 2024-02-01, rev 0x00fc, size 97280
    sig 0x000a0660, pf_mask 0x80, 2024-02-01, rev 0x00fe, size 97280
    sig 0x000a0661, pf_mask 0x80, 2024-02-01, rev 0x00fc, size 97280
    sig 0x000a0671, pf_mask 0x02, 2024-03-07, rev 0x0062, size 108544
    sig 0x000a06a4, pf_mask 0xe6, 2024-04-15, rev 0x001e, size 137216
  * source: update symlinks to reflect id of the latest release, 20240813
  * postinst, postrm: switch to dpkg-trigger to run update-initramfs

 -- Henrique de Moraes Holschuh <hmh@debian.org>  Thu, 15 Aug 2024 14:41:50 -0300

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18197
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit f4801cffc3697d57a6d47e325d2f43c785ce3416)
2025-03-17 16:21:23 +01:00
Tianling Shen
a748c1af75 ramips: fix reading mac address for hiwifi hc5962
The spaces in variables have been stripped since commit 551e04f3c9
("base-files: strip space and tab characters from ASCII mac address"),
resulting "Vfac_mac " matches nothing. Fix the issue by removing the
space at end.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18150
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 2091c29578ca99b468e79695149be6f4b6cccb36)
2025-03-17 16:21:23 +01:00
Mikhail Zhilkin
d5a9ec601d mediatek: Xiaomi AX3000t: enable SPI calibration
Xiaomi enabled SPI calibration in new firmware:
- 1.0.84 and newer (rd03 model)
- 1.0.76 and newer (rd23 model)

This enables SPI calibration routines in OpenWrt too.

Tested-by: Aleksandr Danilov <sc16me@gmail.com>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17976
(cherry picked from commit 043df82cea89786f1dcdfe47af1736bf8833fde9)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18270
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:14:27 +01:00
Roland Reinl
4e69539953 ramips: Add support for Cudy M1200 v1
The M1200 v1 is similar to the TR1200 series from Cudy. Differences:
- Only 1 LAN port
- No USB

Specifications:
- MT7628
- MT7628AN (2.4G b/g/n) and MT7613BE (5G ac/n) wifi
- 128 MB RAM
- 16 MB flash

MAC Addresses:
- There is one on the label, e.g. xx:xx:xx:xx:xx:A4
- LAN (bottom connector) is the same as the label, e.g. xx:xx:xx:xx:xx:A4
- WAN (top connector) is label + 1, e.g. xx:xx:xx:xx:xx:A5
- WLAN (2.4G) is the same as the label, e.g. xx:xx:xx:xx:xx:A4
- WLAN (5G) is label + 2, e.g. xx:xx:xx:xx:xx:A6

UART:
- is available via the pin holes on the board
- The pinout is printed to the board: P: VCC, G: GND, R: RX, T:TX
- RX and TX require solder bridges to be installed
- Do NOT connect VCC
- Settings: 3.3V, 115200, 8N1

GPIO:
- There are two LEDs: Red (GPIO 4) and White (GPIO 0)
- There are two buttons: Reset (GPIO 11) and WPS (GPIO 5)

Migration to OpenWrt:
- Download the migration image from the Cudy website (it should be available as soon as OpenWrt officially supports the device)
- Connect computer to LAN (bottom connector) and flash the migration image via OEM web interface
- OpenWrt is now accessible via 192.168.1.1

Revert back to OEM firmware:
- Set up a TFTP server on IP 192.168.1.88 and connect to the WAN port (upper port)
- Provide the Cudy firmware as recovery.bin in the TFTP server
- Press the reset button while powering on the device
- Recovery process is started now
- When recovery process is done, OEM firmware is accessible via 192.168.10.1 again

General information:
- No possibility to load a initramfs image via U-Boot because there is no option to interrupt U-Boot

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18233
(cherry picked from commit c13a050d5ad55ab090a592823a9f964af8614fc2)
Link: https://github.com/openwrt/openwrt/pull/18252
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-17 16:12:47 +01:00
Álvaro Fernández Rojas
5872633b9d bcm27xx: pull 6.6 patches from RPi repo
Adds latest 6.6 patches from the Raspberry Pi repository.

These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.6.y/
With the following command:
git format-patch -N v6.6.83..HEAD
(HEAD -> 08d4e8f52256bd422d8a1f876411603f627d0a82)

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 251f76c1c67d62c585d799c38dab31e1385d2ad5)
2025-03-16 21:08:29 +01:00
Álvaro Fernández Rojas
36e9edd677 bcm27xx-utils: update to latest version
Full changelog: 0c02957911...685afa8c0d

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 6403c2890cfc07e37d70c7cb5cfbc20207b5369d)
2025-03-16 21:08:29 +01:00
Álvaro Fernández Rojas
7f5659b79d bcm27xx-gpu-fw: update to v1.20250305
Full changelog: https://github.com/raspberrypi/firmware/compare/1.20241126...1.20250305

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 2804cfe553c8cb67be08599407030d522862abcb)
2025-03-16 21:08:29 +01:00
Felix Fietkau
07fb8d22e7 unetd: update to Git HEAD (2025-03-09)
d8b43985e4d7 ubus: fix token_create policy
7326459bd743 ubus: dump service information on network_get
6c9c8fbd8128 service: add @all as alias for all members, unless defined differently

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 84909c62c8455a08fb8bb29bd7809ab22c927bf0)
2025-03-16 18:53:59 +01:00
John Audia
a3213ab1b5 kernel: bump 6.6 to 6.6.83
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.83

Removed upstreamed:
	bcm27xx/patches-6.6/950-0483-usb-xhci-borrow-upstream-TRB_FETCH-quirk-on-VL805-ho.patch[1]

Manually rebased:
	bcm27xx/patches-6.6/950-0061-Revert-Revert-xhci-add-quirk-for-host-controllers-th.patch
	bcm27xx/patches-6.6/950-0485-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch
	bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch

All other patches automatically rebased.

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/usb/host/xhci-pci.c?h=linux-6.6.y&id=c401b1b4b835d66792e884b76264d742a20d931d

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

Signed-off-by: John Audia <therealgraysky@proton.me>
[fixed issues with bcm27xx patches]
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 748682e8556d27d904d3fe363228e16eff47afd9)
2025-03-16 08:10:32 +01:00
John Audia
24db615450 kernel: bump 6.6 to 6.6.82
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.82

All patches automatically rebased.

Added CONFIG_MICROCODE_INITRD32=y to x86: config-6.6[1]

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.82&id2=v6.6.81

Build system: x86/64
Build-tested: bcm27xx/bcm2712
Run-tested: bcm27xx/bcm2712

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18188
(cherry picked from commit 7cf8f61eb24c32bb47925cbd11f1cde68c9ba0b9)
Link: https://github.com/openwrt/openwrt/pull/18208
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:34:29 +01:00
John Audia
0fb8d7bc73 kernel: bump 6.6 to 6.6.81
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.81

All patches automatically rebased.

For x86, CONFIG_MICROCODE_LATE_FORCE_MINREV was introduced in this bump
with hrecommendation to enable it[1].

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.81&id2=v6.6.80

Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18188
(cherry picked from commit aabc61d93f89bf3253bad98fd2fe8d5450c352bf)
Link: https://github.com/openwrt/openwrt/pull/18208
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:34:29 +01:00
John Audia
41613c0f7b kernel: bump 6.6 to 6.6.80
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.80

Removed upstreamed:
	generic/backport-6.6/819-v6.8-0002-nvmem-Create-a-header-for-internal-sharing.patch[1]
	generic/backport-6.6/819-v6.8-0003-nvmem-Simplify-the-add_cells-hook.patch[2]
	generic/backport-6.6/819-v6.8-0004-nvmem-Move-and-rename-fixup_cell_info.patch[3]

All other patches automatically rebased.

1. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.80&id=39dfc17a38f77b14f7cb2619bd3488a18d797d5d
2. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.80&id=276dae17ad9757c3813d9e736a0210f05ccdf8b7
3. https://web.git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.80&id=a0ee898a5024f12572e4ce45202df9b149dadc05

Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18140
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 86fd00b0fb)
Link: https://github.com/openwrt/openwrt/pull/18208
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:34:29 +01:00
Roland Reinl
b16b75efba ramips: Add support for Cudy M1300 v2
The M1300 v2 is similar to the WR1300 series from Cudy. Differences:
- Only 1 LAN port
- No USB

Specifications:
- MT7621
- MT7603E (2.4G b/g/n) and MT7613BE (5G ac/n) wifi
- 128 MB RAM
- 16 MB flash

MAC Addresses:
- There is one on the label, e.g. xx:xx:xx:xx:xx:1C
- LAN (bottom connector) is the same as the label, e.g. xx:xx:xx:xx:xx:1C
- WAN (top connector) is label +2, e.g. xx:xx:xx:xx:xx:1E
- WLAN (2.4G) is the same as the label, e.g. xx:xx:xx:xx:xx:1C
- WLAN (5G) is the same as WAN, e.g. xx:xx:xx:xx:xx:1E

UART:
- is available via the pin holes on the board
- From inner to outer pin: TX, RX, GND, VCC
- Do NOT connect VCC
- Settings: 3.3V, 115200, 8N1

GPIO:
- There are two LEDs: Red (GPIO 3) and White (GPIO 4)
- There are two buttons: Reset (GPIO 8) and WPS (GPIO 10)

Migration to OpenWrt:
- Download the migration image from the Cudy website (it should be available as soon as OpenWrt officially supports the device)
- The migration image is also available here until a image is provided by Cudy: https://github.com/RolandoMagico/openwrt-build/releases/tag/M1300_Build_20240222
- File: openwrt-ramips-mt7621-cudy_m1300-v2-squashfs-flash-signed.bin
- Connect computer to LAN (bottom connector) and flash the migration image via OEM web interface
- In the migration image, LAN and WAN are swapped. Computer must be connected to the other port after flashing
- OpenWrt is now accessible via 192.168.1.1
- After flashing an up to date OpenWrt image, LAN and WAN settings are again the same as in the OEM firmware
- So use the other connector again

Revert back to OEM firmware:
- Set up a TFTP server on IP 192.168.1.88 and connect to the LAN port (lower port)
- Provide the Cudy firmware as recovery.bin in the TFTP server
- Press the reset button while powering on the device
- Recovery process is started now
- When recovery process is done, OEM firmware is accessible via 192.168.10.1 again

General information:
- No possibility to load a initramfs image via U-Boot because there is no option to interrupt U-Boot

Signed-off-by: Roland Reinl <reinlroland+github@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18139
(cherry picked from commit 8a7863767056ca0dec69a6b383b6e0c0d5fc3af7)
Link: https://github.com/openwrt/openwrt/pull/18204
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:30:44 +01:00
Michael Trinidad
2304486d60 mwlwifi: update to version 10.4.11-20250206
The fixes are only for the WRT1900X and WRT1200AC.

It contains:

Deletes the driver's ability to modify the debit table.
Remove skb_get(done_skb) in txdone
Reworking ISR
clean code
Napi replaces tasklet
Add rx_decrypt feature

Signed-off-by: Michael Trinidad <trinidude4@hotmail.com>
Link: https://github.com/openwrt/openwrt/pull/17997
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/18145
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:13:56 +01:00
Andreas Gnau
76565015f5 ramips: mt7621: Reduce hardcoded metadata for Inteno Y3 imgs
Instead of hardcoded metadata, put some sensible data instead.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/17551
(cherry picked from commit 4e3342f5f17d5d227f036b4b16e2a3721a2e8493)
Link: https://github.com/openwrt/openwrt/pull/18238
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:03:19 +01:00
Andreas Gnau
dd0c2839a8 ramips: Add support for Genexis / Inteno Pulse EX400
Add support for Genexis Pulse EX400 / Inteno Pulse EX400. A branded
variant for the Finnish ISP DNA has already been added in fea2264d9f
(ramips: mt7621: Add DNA Valokuitu Plus EX400, 2023-07-31). This commit
adds support for the generic variants with Inteno and Genexis branding.
Inteno changed its name to Genexis and both brandings exist.

In terms of electronics, there is no difference between the DNA-branded
version and other brandings. LED markings on the case are different,
though. While the DNA-version has a "software-update" LED, the other
versions have a WPS LED. To reduce user confusion, create a separate
image.

Add the different device-tree with the different LED and rename things
to work the same way for both variants.

Specifications:
- Device: Genexis Pulse EX400 / Inteno Pulse EX400
- SoC: MT7621A
- Flash: 256 MB NAND
- RAM: 256 MB
- Ethernet: Built-in, 2 x 1 GbE
- Wifi: MT7603 2.4 GHz 2x2 MIMO, MT7615 5 GHz 4x4 MU-MIMO
- USB: 1x 2.0
- LEDs (GPIO): green/red status, green WPS
- LEDs (SX9512, unsupported): Broadband, Wi-Fi 2.4G, Wi-Fi 5G
- Buttons (GPIO): Reset
- Buttons (SX9512, unsupported): Wi-Fi 2.4G, Wi-Fi 5G, WPS

MAC addresses:
- LAN:     U-Boot 'ethaddr' (label)
- WAN:     label + 1
- 2.4 GHz: label + 6
- 5 GHz:   label + 7

Serial:
 There is a black block connector next to the red ethernet connector. It
 is accessible also through holes in the casing.

Pinout (TTL 3.3V)
 +---+---+
 |Tx |Rx |
 +---+---+
 |Vcc|Gnd|
 +---+---+

Firmware:
 The vendor firmware is a fork of OpenWrt (Reboot) with a kernel version
 4.4.93. The flash is arranged as below and there is a dual boot
 mechanism alternating between rootfs_0 and rootfs_1.

 +-------+------+------+-----------+-----------+
 |       | env1 | env2 | rootfs_0  |  rootfs_1 |
 |       +------+------+-----------+-----------+
 |       |         UBI volumes                 |
 +-------+-------------------------------------+
 |U-Boot |             UBI                     |
 +-------+-------------------------------------+
 |mtd0   |             mtd1                    |
 +-------+-------------------------------------+
 |                     NAND                    |
 +---------------------------------------------+

 In OpenWrt rootfs_0 will be used as a boot partition that will contain the
 kernel and the dtb. The squashfs rootfs and overlay are standard OpenWrt
 behaviour.

 +-------+------+------+-----------+--------+------------+
 |       | env1 | env2 | rootfs_0  | rootfs | rootfs_data|
 |       +------+------+-----------+--------+------------+
 |       |         UBI volumes                           |
 +-------+-----------------------------------------------+
 |U-Boot |             UBI                               |
 +-------+-----------------------------------------------+
 |mtd0   |             mtd1                              |
 +-------+-----------------------------------------------+
 |                     NAND                              |
 +-------------------------------------------------------+

U-boot:
 With proper serial access, booting can be halted to U-boot by pressing
 any key. TFTP and flash writes are available, but only the first one has
 been tested.

 NOTE: Recovery mode can be accessed by holding down the reset button while
 powering on the device. The led 'Update' will show a solid green light
 once ready. A web server will be running at 192.168.1.1:80 and it will
 allow flashing a firmware package. You can cycle between rootfs_0 and
 rootfs_1 by pressing the reset button once.

Root password:
 With the vendor web UI create a backup of your settings and download the
 archive to your computer. Within the archive in the file
 /etc/shadow replace the password hash for root with that of a password you
 know. Restore the configuration with the vendor web UI and you will have
 changed the root password.

SSH access:
 You might need to enable the SSH service for LAN interface as by default
 it's enabled for WAN only.

Installing OpenWrt:
 With the vendor web UI, or from the U-Boot recovery UI, install the
 OpenWrt factory image. Alternatively, ssh to the device and use
 sysupgrade -n from cli.

 Finalize by installing the OpenWrt sysupgrade image to get a fully
 functioning system.

Reverting to the vendor firmware:

 Boot with OpenWrt initramfs image
  - Remove volumes rootfs_0, rootfs and rootfs_data and create vendor
    volumes.

    ubirmvol /dev/ubi0 -n 2
    ubirmvol /dev/ubi0 -n 3
    ubirmvol /dev/ubi0 -n 4
    ubimkvol /dev/ubi0 -N rootfs_0 -S 990
    ubimkvol /dev/ubi0 -N rootfs_1 -S 990

    Power off and enter to the U-boot recovery to install the vendor
    firmware.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/17551
(cherry picked from commit 3e7337feead8e0a0f5a05f5b91d7d0fd7f14ec56)
Link: https://github.com/openwrt/openwrt/pull/18238
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:03:19 +01:00
Andreas Gnau
6e27a13205 ramips: mt7621: Move common DNA EX400 defs to dtsi
Move common definitions for DNA Valokuitu Plus EX400 to a dtsi include.
This is in preparation of adding the non-branded variant of the device
produced by Genexis / Inteno in the next commit. The device with DNA
branding differs in the LED labling on the device.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
Link: https://github.com/openwrt/openwrt/pull/17551
(cherry picked from commit e8603f3b5a15856fccee2e02a5406ca9c8b2ba1d)
Link: https://github.com/openwrt/openwrt/pull/18238
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 12:03:19 +01:00
Coia Prant
55e8ac5312 ramips: add support for Hongdian H8922 v30
This is an industrial 4G router equipped with OpenWrt 14.07 OEM
customized version

WARNING: The original firmware device tree is common to multiple
boards, and the device tree name is H9350. This submitted device
tree is a modified version, which deletes the non-this-device parts
and adds GPIO watchdog.

Specification:
- SoC: MediaTek MT7620A
- Flash: 16 MB
- RAM: 128 MB
- Power: DC 5V-36V 1.5A
- Ethernet: 1x WAN, 4x LAN (10/100 Mbps)
- Wireless radio: 802.11n 2.4g-only
- LED:
  System/Power (RUN): GPIO/26 active-low
  Ethernet: 1x WAN, 4x LAN
  Modem 1: GPIO/66 active-low
  RF 1 (Modem 1 Signal): GPIO/67 active-low
  Modem 2: GPIO 71 active-low
  RF 2 (Modem 2 Signal): GPIO/24 active-low
  WLAN: GPIO/72 active-low
  WPS: GPIO/12 active-low
- Button:
  WPS / RESET: GPIO/34 active-low
- UART: 1x UART on PCB - 115200 8N1
- GPIO Watchdog: GPIO/62 mode=toggle timeout=1s
- PCIe: 2x miniPCIe for modem
- SIM Slots: 2x SIM Slots

Issue:
- No factory partition, eeprom is located
 at /lib/firmware/mt7620a.eeprom

Flash instruction:
Using UART:
1. Configure PC with a static IP address and setup an TFTP server.
2. Put rootfs into the tftp directory.
3. Connect the UART line as described on the PCB.
4. Power up the device and press Ctrl+C to break auto boot.
5. Use `system 6` command and follow the instruction to set device
   and tftp server IP address and input the rootfs file name.
   U-boot will then load the rootfs and write it into
   the flash.
6. Use `system 1` command and follow the instruction to set device
   and tftp server IP address and input the firmware file name.
   U-boot will then load the firmware once.
7. Login to LuCI and use LuCI upgrade firmware.

Original Firmware Dump / More details:
https://blog.gov.cooking/archives/research-hongdian-h8922-and-flash.html

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Tested-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17472
Link: https://github.com/openwrt/openwrt/pull/18221
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 6a1bdcf545eec8f9ed5130e7f5794fca6ee54cb3)
2025-03-15 11:54:54 +01:00
Coia Prant
40d36ac960 mac80211: rt2x00: load the eeprom data from devicetree embedded data on Ralink SoCs
It will allow loading eeprom from eeprom-data embedded in device tree.
Ported from mediatek mt76 wireless driver (drivers/net/wireless/mediatek/mt76/eeprom.c)

Signed-off-by: Coia Prant <coiaprant@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17472
Link: https://github.com/openwrt/openwrt/pull/18221
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 5d266b55ed4c4c4efe2e150b8b2326bb13bb6fb0)
2025-03-15 11:53:57 +01:00
Tianling Shen
df8679e29f mediatek: add support for CMCC A10
This board is also as known as SuperElectron ZN-M5 and ZN-M8. However,
for ZN-M5 and ZN-M8, there's another version uses ZX279128 as CPU
chip, which is unsupported.
You can check it in "高级设置" > "系统日志" > "内核日志" page from webUI.

Hardware specification:
  SoC: MediaTek MT7981B 2x A53
  Flash: 128 MB SPI-NAND
  RAM: 256MB
  Ethernet: 4x 10/100/1000 Mbps
  Switch: MediaTek MT7531AE
  WiFi: MediaTek MT7976C
  Button: Reset, WPS
  Power: DC 12V 1A

Stock layout flash instructions:
Login into webUI and upload sysupgrade firmware in "系统管理" > "升级固件" page.
Remember to unselect "保留配置" ("Keep configurations") first before doing that.

OpenWrt U-Boot layout flash instructions:
1. Flash stock layout firmware first.
2. Connect to the device via SSH, and backup everything,
   especially 'Factory' partition.
3. Unlock MTD partitions:
   opkg update && opkg install kmod-mtd-rw
   insmod mtd-rw i_want_a_brick=1
4. Write new BL2 and FIP:
   mtd write openwrt-mediatek-filogic-cmcc_a10-ubootmod-preloader.bin BL2
   mtd write openwrt-mediatek-filogic-cmcc_a10-ubootmod-bl31-uboot.fip FIP
5. Set static IP on your PC:
   IP 192.168.1.254/24, GW 192.168.1.1
6. Serve OpenWrt initramfs image using TFTP server.
7. Cut off the power and re-engage, wait for TFTP recovery to complete.
8. After OpenWrt has booted, perform sysupgrade.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18121
(cherry picked from commit 96c6608346758ceffebf30d74cab00db58874bb9)
[sync uboot defconfigs with 24.10 branch, change apk to opkg]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
Link: https://github.com/openwrt/openwrt/pull/18218
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-15 11:48:57 +01:00
Daniel Golle
3da9786da3 libpcap: backport support for various DSA tags
Trying to tcpdump DSA conduits results in errors such as
"unsupported DSA tag: mtk".
Backport two commits adding support for various DSA tags to libpcap.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit fad94e8cda)
2025-03-13 23:07:35 +00:00
Robert Marko
ff5b9059b4 libpcap: add missing PKG_CONFIG_DEPENDS entries
Currently, enabling USB, BT or Netfilter support after initial compilation
will not trigger a rebuild, so add the missing PKG_CONFIG_DEPENDS so
that rebuild gets triggered.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
(cherry picked from commit fe37574be6)
2025-03-13 23:07:35 +00:00
Mieczyslaw Nalewaj
7f512e602a ramips: mt7621: 02_network optimization
Merging repeating blocks inside the ramips_setup_interfaces() function.

Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/18146
(cherry picked from commit a0449f8cf3a53f746c409ce033a6c78065c5edde)
Link: https://github.com/openwrt/openwrt/pull/18205
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-13 21:52:51 +01:00
56463ae73e Merge remote-tracking branch 'remotes/remote/openwrt-24.10' into openwrt-24.10
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
2025-03-13 20:02:47 +08:00
e9d680743b 添加xray 2025-03-13 20:01:59 +08:00
42f4767c5b 移除golang自定义 2025-03-10 11:09:04 +08:00
040ae35b2a 修复luci-app-zerotier无法编译 2025-03-10 10:54:04 +08:00
d688179337 更新luci-app-zerotier 2025-03-10 10:43:03 +08:00
Eric ZHANG
2b0cce92ae dnsmasq: fix handlers for options filter_rr and cache_rr
According to:
- https://github.com/openwrt/luci/blob/master/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js#L700
- https://github.com/openwrt/luci/blob/master/modules/luci-mod-network/htdocs/luci-static/resources/view/network/dhcp.js#L402

These two options should be of type `MultiValue` but here there're used as single value. This results in dnsmasq crashes when either of these options are set with multiple values, which leads to an invalid space-separated value.

As these options are designed to take multiple values, I think it's better to use list format eg. `list filter_rr 'AAAA'`, instead of `option filter_rr 'AAAA,HTTPS'`.

See: https://forum.openwrt.org/t/selecting-more-than-one-filter-arbitrary-rr-or-cache-arbitrary-rr-in-v24-10-0-crashes-dnsmasq/225801

Tested on 24.10.0

Signed-off-by: Eric ZHANG <ericzhangjx@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/18149
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit d136c24f7cc9f7b5ac72259ccf9193683f4ced74)
2025-03-09 17:28:50 +01:00
7fcd80358d 新增luci-theme-design 2025-03-09 21:57:04 +08:00
dc4b830f83 Linux权限设置
Signed-off-by: nanako <469449812@qq.com>
2025-03-09 15:05:53 +08:00
795e78f4c2 Merge remote-tracking branch 'remotes/remote/openwrt-24.10' into openwrt-24.10
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
2025-03-09 14:49:04 +08:00
c2cf8af0bf 自动编译脚本 2025-03-09 14:48:08 +08:00
Martin Schiller
d00ed19ed4 mediatek: filogic: enable CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY
The Cortex-A73 in MediaTek Filogic 880 (MT7988A) is vulnerable to
multiple Spectre variants including Spectre-BHB.

Ref: https://developer.arm.com/Arm%20Security%20Center/Speculative%20Processor%20Vulnerability
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/18182
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 6af46a6984)
2025-03-08 17:04:29 +01:00
Martin Schiller
c70d0a6304 mediatek: Refresh kernel configuration
I selected one subtarget after the other and refreshed their
configuration using this command:
  make kernel_oldconfig CONFIG_TARGET=subtarget

For MT7629 I had to re-add CONFIG_LEDS_SMARTRG_LED manually.
Otherwise, building MT7629 with ALL_KMODS we get prompted for
LEDS_SMARTRG_LED and this will break CI and in future buildbot
compilation. See commit 6bdea8c7bd ("mediatek: mt7629: 6.6: disable
LEDS_SMARTRG_LED by default") for more details.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Link: https://github.com/openwrt/openwrt/pull/18182
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 5013efc4f9)
2025-03-08 17:04:20 +01:00
Ahmed Naseef
315943c616 kernel: usbnet: Restore usb%d naming for cdc-ethernet devices with local MAC
Prior to commit 8a7d12d674,
cdc-ethernet USB LTE modems (e.g. Quectel EC200A) were consistently named
usb0. After 8a7d12d67, devices began renaming to eth1 due to an assumption
that local MAC addresses originate exclusively from the kernel. Some
devices provide driver-assigned local MACs, causing point-to-point
interfaces with driver-set MACs to adopt eth%d names instead of usb%d.

Restore the naming exception for point-to-point devices: interfaces
without driver MACs or with driver-provided local MACs will retain the
usb%d convention. This addresses issues reported in [1] and fixed in [2].

[1] https://lore.kernel.org/all/Z00udyMgW6XnAw6h@atmark-techno.com/
[2] https://lore.kernel.org/all/20241203130457.904325-1-asmadeus@codewreck.org/

Tested-by: Ahmed Naseef <naseefkm@gmail.com>
Signed-off-by: Ahmed Naseef <naseefkm@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17757
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit ecd609f509)
2025-03-06 16:55:10 +01:00
Felix Fietkau
56559278b7 hostapd: add missing #ifdef to fix compile error when 802.11be support is disabled
Fixes: d65d546bce ("hostapd: add missing ctrl socket initialization on bss add")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 46c17c22cd)
2025-03-05 09:20:06 +01:00
Felix Fietkau
f0dbdf6b7f hostapd: add missing ctrl socket initialization on bss add
Fixes adding/removing individual bss interfaces

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit d65d546bce)
2025-03-05 08:04:52 +01:00
Matthew Cather
634ac2bab7 hostapd: get reference to object before removal
`ucv_array_set` releases the array's reference to the object being cleared.
If this is the last reference to the object, it will be freed, making our
pointer `val` invalid.

To avoid this, we need to obtain our own reference to the object so we
can safely return `val`.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
(cherry picked from commit 6a10da2934)
2025-03-05 08:04:52 +01:00
Matthew Cather
1af7bf38f7 hostapd: consistent reference counting for registry
Since `wpa_ucode_registry_add` collects its own reference to the values added, the
two functions `hostapd_ucode_bss_get_uval` and `hostapd_ucode_iface_get_uval` would
sometimes return a referenced object (from `uc_resource_new`) and sometimes return
an unreferenced object (from `wpa_ucode_registry_get`). Now, both functions always
return a referenced object.

This change also indirectly fixes `hostapd_ucode_bss_get_uval`, ensuring it now
always returns a referenced object.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 7729f96093)
2025-03-05 08:04:52 +01:00
Matthew Cather
af65802319 hostapd: clean-up references to local variables
Remove extra ucv_get calls when passing a referenced value to an object
without using it further.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 22eaf18647)
2025-03-05 08:04:52 +01:00
Matthew Cather
b7ab34d46c hostapd: fix ucode memory leak with strings
This fixes a common reference counting bug typically along the lines of:
```
uc_value_push(ucv_get(ucv_string_new(...)));
```
This would leave our new string with a reference count of 2, one from
the construction of the string, the other from `ucv_get`. This would
prevent the strings from being correctly cleaned up when it goes out
of scope.

Signed-off-by: Matthew Cather <mattbob4@gmail.com>
(cherry picked from commit f79968ee0f)
2025-03-05 08:04:52 +01:00
Cedric CHEDALEUX
9836836302 scripts/feeds: shallow clone submodules
When a feed has submodules, all its submodules are fully cloned whereas
the feed itself is shallowed. Let's be consistent and perform shallow clones
as well for the submodules.

Signed-off-by: Cedric CHEDALEUX <cedric.chedaleux@orange.com>
Link: https://github.com/openwrt/openwrt/pull/18003
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 9ec32cfb27)
2025-03-04 12:01:44 +01:00
Cedric CHEDALEUX
efffa8a608 scripts/feeds: shallow clone for specific commit update
When a feed is referenced with a specific commit (i.e. <git_url>^<sha1>),
a full clone was performed and a branch was created from the sha1
and named with the sha1. Other git clones operations are shallowed.

As Git does not support clone at a specific commit, let's first perform
a shallow clone to latest commit, then fetch the relevant commit and
finally checkout it (no more 'pseudo' branch).

It saves bandwith and significantly speeds up the feed update process.

Signed-off-by: Cedric CHEDALEUX <cedric.chedaleux@orange.com>
Link: https://github.com/openwrt/openwrt/pull/18003
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 32d0a57dc1)
2025-03-04 12:01:38 +01:00
Felix Fietkau
f3a210b742 unetd: update to Git HEAD (2025-02-28)
75a236be122a service: add missing null pointer check
f5341f327539 ubus: add api for generating and validating security tokens
3fab99eab4d5 add udebug support
28d86bd30e97 pex: only respond to update requests when we have network data
8e6f37cc361e pex-msg: ignore no-data responses if version is zero
12e6cf7f63e1 pex: create pex host from update responses
edc8fdae463a ubus: show the local addresses in network status

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit ce68f61cb6)
2025-02-28 17:37:24 +01:00
Daniel Golle
e664fe6a21 ethtool: work-around ETHTOOL_GRSSH/ETHTOOL_SRSSH ABI breakage
ethtool since version 6.9 introduced support for getting/setting RSS
input transformation supported in Linux since version 6.8.

The now changed kernel ioctl ABI, however, cannot be detected from
userland, and ethtool since version 6.9 simply assumes that a previously
reserved field is now used to set the input transformation.
Unfortunately the default value RXH_XFRM_NO_CHANGE (0xff) used by ethtool
userland creates an incompatibility with older kernels which cannot be
resolved easily without introducing even more ABI breakage.

Work-around the issue and fix support for --set-rxfh and --set-rxfh-indir
ethtool userland tool commands by making the support for input_xfrm
conditional on compile time, and keep it disabled for Linux 6.6.

Fixes: 8c2dcd1518 ("ethtool: update to 6.10")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Tested-by: Stijn Segers <foss@volatilesystems.org>
(cherry picked from commit 3a7467ffde)
2025-02-28 13:20:22 +00:00
Andrea Pesaresi
c9b97c0b4d ethtool: update to 6.11
Version 6.11 - October 8, 2024
	* Feature: cmis: print active and inactive firmware versions
	* Feature: flash transceiver module firmware (--flash-module-firmware)
	* Feature: add T1BRR 10Mb/s mode to link mode tables
	* Feature: support for disabling netlink from command line
	* Fix: fix lanes parameter format specifier
	* Fix: add missing clause 33 PSE manual description
	* Fix: qsf: Better handling of Page A2h netlink read failure
	* Fix: rss: retrieve ring count using ETHTOOL_GRXRINGS ioctl (-x)
	* Misc: man page formatting fix

* changelog here: https://git.kernel.org/pub/scm/network/ethtool/ethtool.git/commit/NEWS?id=c0ea4b70c71334ef038f7a3416b228a50dada406

Tested on gl.inet MT6000, retrieve ring count is now working

Signed-off-by: Andrea Pesaresi <andreapesaresi82@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17607
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 9454331b7f)
2025-02-28 13:20:21 +00:00
Álvaro Fernández Rojas
89f05e032b omcproxy: update to latest version
Changelog: bfba2aa758...582cd8d3ae

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-02-27 20:12:15 +01:00
Álvaro Fernández Rojas
abd08419de kernel: r8126: update to v10.015.00
Changelog: https://github.com/openwrt/rtl8126/compare/10.014.01...10.015.00

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 3d3328bf5f)
2025-02-27 11:58:27 +01:00
Álvaro Fernández Rojas
1ec8d8ea5c kernel: r8125: update to v9.015.00
Changelog: https://github.com/openwrt/rtl8125/compare/9.014.01...9.015.00

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit a8dea562aa)
2025-02-27 11:58:07 +01:00
Maxim Anisimov
d7d560b84b mediatek/filogic: add Keenetic KN-3811 support
Specification:
 * Mediatek MT7981BA
 * 256 MB SPI-NAND
 * 512 MB DDR4 RAM
 * MT7976CN DBDC AX Wi-Fi
 * MediaTek MT7531AE (3x LAN Gigabit ports) + Internal Gbe Phy (1x WAN Gigabit port)
 * 4x LED (power, internet, fn, wifi)
 * 3x buttons (wps, fn, reset)
 * 1x USB 3.0 port

Serial Interface:
 * 3 Pins GND, RX, TX
 * Settings: 115200, 8N1

Notes:
 * The device supports dual boot mode
 * Fn led reassigned to wlan 2.4

Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-mediatek-filogic-keenetic_kn-3811-squashfs-factory.bin"
   to "KN-3811_recovery.bin" and place it in tftp server directory.
3. Connect PC with ethernet port, press the reset button, power up
   the device and keep button pressed until status led start blinking.
4. Device will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17135
(cherry picked from commit d087a79b7b)
Link: https://github.com/openwrt/openwrt/pull/18055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-26 23:32:40 +01:00
Maxim Anisimov
895531f5c5 mediatek/filogic: add Keenetic KN-3911 support
Specification:
 - MT7981 CPU using 2.4GHz and 5GHz WiFi (both AX)
 - 512MB RAM
 - 128MB SPI NAND
 - 2 LEDs (green, orange)
 - 3 buttons (fn, reset, wps)
 - 2 2.5Gbit ethernet ports based on Airoha EN8811H phy

Serial Interface:
 - 3 Pins GND, RX, TX
 - Settings: 115200, 8N1

Notes:
 - The device supports dual boot mode

Flash instruction:
The only way to flash OpenWrt image is to use tftp recovery mode in U-Boot:

1. Configure PC with static IP 192.168.1.2/24 and tftp server.
2. Rename "openwrt-mediatek-filogic-keenetic_kn-3911-squashfs-factory.bin"
   to "KN-3911_recovery.bin" and place it in tftp server directory.
3. Connect PC with ethernet port, press the reset button, power up
   the device and keep button pressed until status led start blinking.
4. Device will download file from server, write it to flash and reboot.

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16830
(cherry picked from commit 5a4eb56a7b)
Link: https://github.com/openwrt/openwrt/pull/18055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-26 23:32:40 +01:00
Maxim Anisimov
13e9117861 mediatek/filogic: enable mtd virtual concat support
This is required for upcoming Keenetic KN-3911 support

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16830
(cherry picked from commit 0d651dd302)
Link: https://github.com/openwrt/openwrt/pull/18055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-26 23:32:40 +01:00
Maxim Anisimov
d93b6a2bc2 ramips: move zyimage creation to include/image-commands.mk
This is required for upcoming Keenetic KN-3911 support

Signed-off-by: Maxim Anisimov <maxim.anisimov.ua@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16830
(cherry picked from commit 79db5d65ca)
Link: https://github.com/openwrt/openwrt/pull/18055
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-26 23:32:40 +01:00
John Audia
3abbc15454 openssl: update to 3.0.16
Changes between 3.0.15 and 3.0.16 [11 Feb 2025]

CVE-2024-13176[1] - Fixed timing side-channel in ECDSA signature
computation.

There is a timing signal of around 300 nanoseconds when the top word of
the inverted ECDSA nonce value is zero. This can happen with significant
probability only for some of the supported elliptic curves. In
particular the NIST P-521 curve is affected. To be able to measure this
leak, the attacker process must either be located in the same physical
computer or must have a very fast network connection with low latency.

CVE-2024-9143[2] - Fixed possible OOB memory access with invalid
low-level GF(2^m) elliptic curve parameters.

Use of the low-level GF(2^m) elliptic curve APIs with untrusted explicit
values for the field polynomial can lead to out-of-bounds memory reads
or writes. Applications working with "exotic" explicit binary (GF(2^m))
curve parameters, that make it possible to represent invalid field
polynomials with a zero constant term, via the above or similar APIs,
may terminate abruptly as a result of reading or writing outside of
array bounds. Remote code execution cannot easily be ruled out.

1. https://www.openssl.org/news/vulnerabilities.html#CVE-2024-13176
2. https://www.openssl.org/news/vulnerabilities.html#CVE-2024-9143

Build system: x86/64
Build-tested: bcm27xx/bcm2712
Run-tested: bcm27xx/bcm2712

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17947
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit b4e6fd7b76)
2025-02-25 23:30:54 +01:00
Rudy Andram
88ac2caceb wireless-regdb: Update to version 2025.02.20
b43aeb5 wireless-regdb: assert and correct maximum bandwidth within frequency difference
68588bf wireless-regdb: Update regulatory info for Syria (SY) for 2020
0dda57e wireless-regdb: Update regulatory info for Moldova (MD) on 6GHz for 2022
b19ab0b wireless-regdb: Update regulatory info for Azerbaijan (AZ) on 6GHz for 2024
f67f40d wireless-regdb: Update regulatory info for Oman (OM)
bd70876 wireless-regdb: Update regulatory rules for Armenia (AM) on 2.4 and 5 GHz
6c7cbcc wireless-regdb: Permit 320 MHz bandwidth in 6 GHz band in ETSI/CEPT
f9f6b30 wireless-regdb: Update regulatory rules for Austria (AT)
39b47ea wireless-regdb: Update regulatory info for Cayman Islands (KY) for 2024
3dd7ceb wireless-regdb: allow NO-INDOOR flag in db.txt
4d754a1 wireless-regdb: Update regulatory rules for Iran (IR) on both 2.4 and 5Ghz for 2021
8c8308a wireless-regdb: Update frequency range with NO-INDOOR for Oman (OM)
c2f11e2 wireless-regdb: update regulatory database based on preceding changes

Signed-off-by: Rudy Andram <rmandrad@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17957
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit da2cc98458)
2025-02-25 23:30:54 +01:00
Mieczyslaw Nalewaj
652fe915de ramips: improve MT7621S core detection
The proposed detection method was based on reading the LAUNCH_FREADY core flag.
However, this method only works before the cores are launched.
For this reason, the core number detection method has been changed to a simpler one.
For mt6721s the 17th revision bit is zero, hence we know that it is this chip,
so the number of cores is 1.

Fixes: https://github.com/openwrt/openwrt/issues/17764
Tested-by: Enrico Mioso <mrkiko.rs@gmail.com>
Tested-by: Simon Etzlstorfer <simon@etzi.at>
Tested-by: Mauri Sandberg <maukka@ext.kapsi.fi>
Co-authored-by: Shiji Yang <yangshiji66@qq.com>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/17834
(cherry picked from commit bb84c256e7)
Link: https://github.com/openwrt/openwrt/pull/18015
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 23:20:05 +01:00
John Audia
22943245a5 kernel: bump 6.6 to 6.6.79
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.79

Manually rebased:
	ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch

All other patches automatically rebased.

Build system: x86/64
Build-tested: bcm27xx/bcm2712, filogic/glinet_gl-mt6000, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64
Run-tested: bcm27xx/bcm2712, filogic/glinet_gl-mt6000, filogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18066
Signed-off-by: Nick Hainke <vincent@systemli.org>
(cherry picked from commit d664d74669)
Link: https://github.com/openwrt/openwrt/pull/17987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 23:16:17 +01:00
John Audia
b9c6aeb628 kernel: bump 6.6 to 6.6.78
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.78

Removed upstreamed:
	bcm27xx/patches-6.6/950-0487-drivers-media-imx296-Add-standby-delay-during-probe.patch[1]
	mediatek/patches-6.6/256-clk-mediatek-mt2701-vdec-fix-conversion-to-mtk_clk_s.patch[2]
	mediatek/patches-6.6/257-clk-mediatek-mt2701-aud-fix-conversion-to-mtk_clk_si.patch[3]
	mediatek/patches-6.6/258-clk-mediatek-mt2701-bdp-add-missing-dummy-clk.patch[4]
	mediatek/patches-6.6/259-clk-mediatek-mt2701-mm-add-missing-dummy-clk.patch[5]
	mediatek/patches-6.6/260-clk-mediatek-mt2701-img-add-missing-dummy-clk.patch[6]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=25abffee5ceb6691ecd4f089be2bb28842e2d2fd
2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=b6c5237ab7af82c9f1d8d772dbf309bb4aadfdbb
3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=20210b5c775d2d96f706591c64bc2ad975c37eaf
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=a1fa3dda6bf0b7ecd95fa8f9125e5486b699a81f
5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=fc60e9357f15372698da373ee76de8f52d22aac2
6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.78&id=6f4868e6b2887b55531bc8e0a4106ef0150e6326

Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64
Run-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/18000
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 57b0304ce9)
Link: https://github.com/openwrt/openwrt/pull/17987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 23:16:17 +01:00
John Audia
9ec355a921 kernel: bump 6.6 to 6.6.77
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.77

No patches automatically rebased/checksum update only

Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17822
(cherry picked from commit 16924e55f0)
Link: https://github.com/openwrt/openwrt/pull/17987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 23:16:17 +01:00
John Audia
667b131ad1 kernel: bump 6.6 to 6.6.76
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.76

Manually rebased:
	bcm27xx/patches-6.6/950-0519-usb-dwc3-Set-DMA-and-coherent-masks-early.patch
	imx/patches-6.6/600-PCI-imx6-Start-link-at-max-gen-first-for-IMX8MM-and-IMX8MP.patch

Removed upstreamed:
	bcm27xx/patches-6.6/950-1446-media-i2c-ov9282-Correct-the-exposure-offset.patch[1]
	bcm47xx/patches-6.6/701-bgmac-reduce-max-frame-size-to-support-just-MTU-1500.patch[2]
	bcm53xx/patches-6.6/700-bgmac-reduce-max-frame-size-to-support-just-MTU-1500.patch[3]
	ramips/patches-6.6/003-v6.14-clk-ralink-mtmips-remove-duplicated-xtal-clock-for-Ralink.patch[4]

All other patches automatically rebased.

1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.76&id=11c7649c9ec3dcaf0a7760551ad30747d9e02d81
2, 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.76&id=5e6e723675e54ced5200bcc367e2526badc4070c
4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.76&id=d0edcd0d18d700d76c61c091a24568b8b8c3b387

Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
Run-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17822
(cherry picked from commit 84e370f16c)
Link: https://github.com/openwrt/openwrt/pull/17987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 23:16:17 +01:00
John Audia
b71fafbb70 kernel: bump 6.6 to 6.6.75
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.75

All patches automatically rebased.

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17822
(cherry picked from commit 9790417109)
Link: https://github.com/openwrt/openwrt/pull/17987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 23:16:17 +01:00
John Audia
81ef4bc44d kernel: bump 6.6 to 6.6.74
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.74

All patches automatically rebased.

Build system: x86/64
Build-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod
Run-tested: bcm27xx/bcm2712, flogic/xiaomi_redmi-router-ax6000-ubootmod

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/17708
(cherry picked from commit e9fad02c10)
Link: https://github.com/openwrt/openwrt/pull/17987
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 23:16:17 +01:00
Tim Harvey
c51d899790 imx: cortexa53: fix sysupgrade image device support for venice
Set the SUPPORTED_DEVICES Device var so that sysupgrade images
are supported without a force.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17964
(cherry picked from commit 5a124ff167)
Link: https://github.com/openwrt/openwrt/pull/18093
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 22:59:14 +01:00
Tim Harvey
79ba163090 imx: cortexa53: add 'gateworks,imx8m*' to sysupgrade board checks
The upstream device-tree files are now using 'gateworks' instead of 'gw'
for compatible. Add this pattern so that the newer boards support
sysupgrade.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17964
(cherry picked from commit ee73d35fbe)
Link: https://github.com/openwrt/openwrt/pull/18093
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 22:59:04 +01:00
Robert Senderek
0963a15e7c ramips: Add support for Mercusys MR1800X as alt name of MR70X
Both share the same OEM firmware but differ in product_name for safeloader
product_name:MR1800X,product_ver:1.0.0,special_id:45550000

Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
Link: https://github.com/openwrt/openwrt/pull/17965
(cherry picked from commit f93367227e)
Link: https://github.com/openwrt/openwrt/pull/18031
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 22:50:38 +01:00
Robert Senderek
b803517f90 tools: firmware-utils: update to Git HEAD (2024-02-16)
2051fe5 mktplinkfw2: Add 16MLmtk layout
5d1446b tplink-safeloader: Add more special_id's for MR70X

Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
Link: https://github.com/openwrt/openwrt/pull/17999
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 1437ff840b)
Link: https://github.com/openwrt/openwrt/pull/18030
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 22:48:00 +01:00
INAGAKI Hiroshi
2343699c8c tools: firmware-utils: update to Git HEAD (2024-01-14)
12c0b42 nosimg-enc: add new tool for XikeStor SKS8300 series

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17593
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit db0fcc0c8d)
Link: https://github.com/openwrt/openwrt/pull/18030
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-25 22:47:55 +01:00
Felix Fietkau
8c1296f157 kernel: fix IPv6 TCP GSO segmentation with NAT
Add missing checksum update

Fixes: https://github.com/openwrt/openwrt/issues/15857
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 00e4b23e27)
2025-02-24 12:27:03 +01:00
Sander Vanheule
bb6f183e93 realtek: add PoE enable line to Netgear GS310TP
By switching to the new RTL8231 driver in commit b7af54d5c1 ("realtek:
Simple conversions to RTL8231 MFD driver"), the bootloader state of the
RTL8231's pins is now maintained. As the bootloader de-asserts the PoE
enable signal, this means PoE output is no longer available.

Add a gpio-hog with high output, restoring the line value from when the
pin was configured (by default) as an input with a pull-up resistor.
This will hard-enable the PoE output, but the individual ports can still
be administratively disabled by realtek-poe or a similar tool.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 890293c13c)
2025-02-22 12:33:08 +01:00
Evan Jobling
8f3b24643b realtek: HPE 1920-48G-PoE: allow fan speed control
The JG928A has an RTL8231 on the aux mdio bus. Add it to dts to expose
the GPIO pins used to control and monitor the fan speed. To enable speed
control, add the appropriate kernel driver module to DEVICE_PACKAGES.

Of note, this does not control all fans for the unit. The power supply
fans are not controlled.

Signed-off-by: Evan Jobling <evan@jobling.au>
Link: https://github.com/openwrt/openwrt/pull/17699
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit cbd1acbad3)
2025-02-22 12:32:35 +01:00
Sander Vanheule
0ae0766f29 realtek: drop old RTL8231 driver
The old RTL8231 driver integrated the MDIO bus access with the GPIO
control ops, making this driver not very portable to newer platforms.
It depended on the SoC ID instead of the compatible to determine the
MDIO access register, further complicating portability.

A new MFD driver is now available, which offers proper pin config as
well as optional LED support, which can work on any (bitbanged) MDIO
bus. Now that all devices have been migrated, we can drop the old code.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit b410f2216c)
2025-02-22 12:32:35 +01:00
Sander Vanheule
28fb32a550 realtek: add PoE enable line to Netgear GS110TPP
By switching to the new RTL8231 driver in commit b7af54d5c1 ("realtek:
Simple conversions to RTL8231 MFD driver"), the bootloader state of the
RTL8231's pins is now maintained. As the bootloader de-asserts the PoE
enable signal, this means PoE output is no longer available.

Add a gpio-hog with high output, restoring the line value from when the
pin was configured (by default) as an input with a pull-up resistor.
This will hard-enable the PoE output, but the individual ports can still
be administratively disabled by realtek-poe or a similar tool.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 807074309d)
2025-02-22 12:32:35 +01:00
Sander Vanheule
ed4f7a6dec realtek: switch RTL8231 driver for D-Link DGS-1210
Update the common external GPIO DTSI file for the DGS-1210 devices to
use an MDIO device on the auxilairy MDIO bus, as the original driver was
doing behind the screen.

Switching to the new driver will allow for full pin-control and will no
longer reset pin config set by the bootloader.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 3d6a1a7874)
2025-02-22 12:32:35 +01:00
Sander Vanheule
94e629a3a9 realtek: Switch DGS-1210-10P DTS to gpio.dtsi
The DTS file for the DGS-1210-10P is slightly different from the other
DGS-1210 devices, in that it didn't specify a gpio-restart node when it
was added. The gpio-restart has been found to work on the DGS-1210-10P
as well, so switch it over to the common definitions.

This converts the last device from the product family to the common
definition for the (external) GPIOs.

Tested-by: Michel Thill <jmthill@gmail.com>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 7c0d1c1eb1)
2025-02-22 12:32:35 +01:00
Sander Vanheule
f31df0bbba realtek: Drop unused property on DGS-1210 gpio0
The 'indirect-access-id' property on gpio0 is a remnant from the
original GPIO driver. This property has not been relevant on the SoC's
embedded GPIO controller for a long time, so just drop it.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 022b7d80bf)
2025-02-22 12:32:35 +01:00
Sander Vanheule
e76aae2253 realtek: Simple conversions to RTL8231 MFD driver
Change devices with RTL8231 GPIO expander definition that can easily be
translated to the new RTL8231 binding and carry over any gpio-hogs. This
will let them use the new RTL8231 MFD driver, without any functional
changes.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit b7af54d5c1)
2025-02-22 12:32:35 +01:00
Sander Vanheule
abf7f15257 realtek: Split Zyxel GS1900-8 into v1 and v2
Zyxel GS1900-8 v2 devices have been produced more recently than v1
devices. As there are v1 boards with RTL8380M rev. C SoCs, it can likely
safely be assumed that all v2 devices will also have a recent SoC
revision, supporting the hardware auxiliary MDIO controller.

Make the GS1900-8 v1 use an emulated auxiliary MDIO bus, for backward
compatibility with devices containing an RTL8380M rev. A.

Since the devicetrees are otherwise identical, GS1900-8 v1 devices with
an RTL8380M rev. B or C will also be able to use the (more efficient) v2
image. This includes any currently functioning device with OpenWrt, so
include the old compatible as a supported device for the GS1900-8 v2.

Link: https://github.com/openwrt/openwrt/issues/9534
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 7322d3266d)
2025-02-22 12:32:35 +01:00
Sander Vanheule
f5b66f7651 realtek: rtl838x: Enable MDIO_GPIO driver
The mdio-gpio driver is required to support early revision of RTL8380M
slicon (rev A) where the auxilairy MDIO controller does not function
correctly. Add this driver to the rtl838x kernel so devices with old
SoCs are also able to function correctly.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit efffcfa436)
2025-02-22 12:32:35 +01:00
Sander Vanheule
8e539afa95 realtek: Move GS1900 external GPIO to new DTSI
In order to be able to define the external GPIO controller on an
emulated MDIO bus, move the controller definition outside of the main
GS1900 include for RTL838x-based devices.

Additionally, a new DTSI is provided defining the RTL8231 on the
emulated MDIO bus.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit a6a77896f4)
2025-02-22 12:32:35 +01:00
Sander Vanheule
c62bafb223 realtek: Add virtual MDIO bus on rtl838x
Some RTL8380M-based devices have been around for a long time and use an
early A revision of the RTL8380M SoC. This revision has an issue with
the auxiliary MDIO controller, causing it to malfunction. This may lead
to device reboots when the controller is used.

Provide a bit-banged MDIO bus, which muxes the auxiliary MDIO pins to
their GPIO function. Although this will result in lower performance,
there should otherwise be no functional differences.

Link: https://github.com/openwrt/openwrt/issues/9534
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit d4bf16a9e1)
2025-02-22 12:32:35 +01:00
Sander Vanheule
fd978c2e80 realtek: Enable Zyxel GS1900's RTL8231 reset line
As the bootloader is reconfiguring the RTL8231 on these devices anyway,
no pin state can be maintained over warm reboots. This results in for
example the PoE disable pin always being asserted by the bootloader.

Define the GPIO line linked to the RTL8231's reset so the MDIO subsystem
will also reset the expander on boot and ensure the line in the correct
state.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit b2d17dbb68)
2025-02-22 12:32:35 +01:00
Sander Vanheule
3d26c1cae4 realtek: Switch RTL8231 driver on Zyxel GS1900-48
Switch the Zyxel GS1900-48 over to the new MDIO-based driver for the
RTL8231 GPIO expander.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 45aafe67f3)
2025-02-22 12:32:34 +01:00
Sander Vanheule
e5ac0c7391 realtek: rtl839x: Enable RTL8231 MFD driver
Enable the RTL8231 MFD core driver, as well as the pinctrl/gpio driver
to allow RTL839x devices to use it.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit fd5797b7ce)
2025-02-22 12:32:34 +01:00
Sander Vanheule
d7631cf577 realtek: rtl839x: Enable AUX MDIO controller
Enable the driver for the Realtek Otto auxiliary MDIO driver so RTL839x
devices can use it. The related node is added to the base devicetree for
rtl839x-based devices, so they can enabled and use it when required.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit cddcc69ddf)
2025-02-22 12:32:34 +01:00
Sander Vanheule
87d3e886d5 realtek: Update aux-mdio driver
For RTL839x, the driver was producing frequent timeouts on bus accesses.
Increasing the timeout to the one from a recent Realtek SDK resolves
these timeouts. To minimize overhead on different SoCs, each controller
can specify their own timeout.

This also add support for the register format as used on RTL93xx.
Support is added for the RTL930x "ext gpio" controller.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 52ffef6471)
2025-02-22 12:32:34 +01:00
Sander Vanheule
e8e5725cee realtek: Use atomic poll for aux-mdio commands
regmap_read_poll_timeout() relies on usleep_range() to time the polling
loop. With the current, rather large, scheduling interval, a short
usleep_range() may take a lot longer than expected, causing performance
issues.

Switch the driver over to using regmap_read_poll_timeout_atomic(), which
uses udelay() to time the polling loop.

For comparision, the 'ethtool -m <dev>' command is about 10 times faster
with the atomic variant.
Using 'perf -r10 ethtool -m lan25':
  - Driver using regmap_read_poll_timeout():
      2.0117 +- 0.0118 seconds time elapsed  ( +-  0.58% )
  - Driver using regmap_read_poll_timeout_atomic():
      0.1674 +- 0.0250 seconds time elapsed  ( +- 14.95% )

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 693c1ea81a)
2025-02-22 12:32:34 +01:00
Fabian Groffen
b98d99261a realtek: HPE 1920 24G PoE+ 180W/370W move fans to hwmon
Apply the equivalent of commit f64541db02 ("realtek: HPE 1920 8G PoE+
180W move fans to hwmon") to the 24-ports variants of the HPE 1920 PoE+
switches, with model numbers JG925A and JG926A.

Copy from the original commit message:

  Move to using hwmon and gpio-fan. This is by adding gpio_fan_array to
  DTS and kmod-hwmon-gpiofan to DEVICE_PACKAGES.

  In combination with the new rtl8231 gpio driver the default fan
  behaviour will be maximum fan speed.

  Bump compat value to 1.1 due to existing config in /etc/config/system
  via gpio_switch. Also notify in device compat that fan is now going to
  be at bootloader setting (maximum in this case) by default unless turned
  down.

As the init script 03_gpio_switches does not perform any action after
removing these devices from it, the file can be dropped.

Link: https://github.com/openwrt/openwrt/pull/17598
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 0a7c8ed9d9)
2025-02-22 12:32:34 +01:00
Sander Vanheule
88d7d0d9cc realtek: switch RTL8231 driver for HPE 1920-16/24G
Update the base DTS file for the 16 and 24 port HPE 1920 devices
(JG923A, JG924A, JG925A, JG926A), causing the new RTL8231 MFD driver to
be loaded at start-up.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 96850585e5)
2025-02-22 12:32:34 +01:00
Evan Jobling
5b96d45474 realtek: HPE 1920 8G PoE+ 180W move fans to hwmon
The GPIO numbering has changed and is not stable. As a result fan
control via gpio_switch is broken, resulting in errors:
    "export_store: invalid GPIO 456"

Move to using hwmon and gpio-fan. This is by adding gpio_fan_array to
DTS and kmod-hwmon-gpiofan to DEVICE_PACKAGES.

In combination with the new rtl8231 gpio driver the default fan
behaviour will be maximum fan speed.

Bump compat value to 1.1 due to existing config in /etc/config/system
via gpio_switch. Also notify in device compat that fan is now going to
be at bootloader setting (maximum in this case) by default unless turned
down.

Signed-off-by: Evan Jobling <evan@jobling.au>
Link: https://github.com/openwrt/openwrt/pull/17605
Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit f64541db02)
2025-02-22 12:32:34 +01:00
Sander Vanheule
d6f9466196 realtek: switch RTL8231 driver for HPE 1920-8G
Update the base DTS file for the 8 port HPE 1920 devices (JG920A,
JG921A, JG922A), causing the new RTL8231 MFD driver to be loaded at
start-up.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit e5d1a501cb)
2025-02-22 12:32:34 +01:00
Sander Vanheule
60cae0e08f realtek: rtl838x: Switch GS1900 rtl8231 driver
Update the devicetree files to switch the GS1900 devices over to the new
pinctrl and GPIO driver. Enable the drivers to ensure the nodes can be
used.

This may fix issues caused by bad RMW behaviour on the GPIO data lines,
or glitches due to setting the pin direction before the pin level.

Although the driver supports retaining GPIO state after a warm boot,
some bootloaders appear to apply a default configuration on boot, which
may cause an interrupt in PoE-PSE support.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 5141e2d861)
2025-02-22 12:32:34 +01:00
Sander Vanheule
07ebd87bd1 realtek: Add pinctrl support for RTL8231
Add pending patches to add RTL8231 support as a MDIO-bus attached
multi-functional device. This includes subdrivers for the pincontrol and
GPIO features, as well as the LED matrix support.

Leave the drivers disabled until required by a device.

Cherry picked from commit 6ef6014887, but
dropped already picked patch for gpio-regmap request/free, and rebased
configs

Signed-off-by: Sander Vanheule <sander@svanheule.net>
2025-02-22 12:32:34 +01:00
Sander Vanheule
01bc33a913 realtek: rtl838x: Instantiate auxiliary MDIO bus
Add a disabled node for the auxiliary MDIO bus, used to manage the
RTL8231 expanders. A simple-mfd parent node is added, at the same
(implied) address as the switch@1b000000 node, as the switch drivers
should anyway transistion to MFD subdivices at some point.

Additionally, two pinctrl-single node are added to allow the MDX pins to
be muxed correctly, in case the bootloader leaves these unconfigured.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit 92ae8cb16c)
2025-02-22 12:32:34 +01:00
Sander Vanheule
4a7945ee84 realtek: Add driver for auxiliary MDIO busses
Add a driver that exposes the auxiliary busses, used for the RTL8231
expanders, as a proper MDIO controller. The device must be instantiated
under an MFD device, so the driver should also be compatible with SoC
managed by an external CPU via SPI.

Leave the driver disabled in builds until required.

Signed-off-by: Sander Vanheule <sander@svanheule.net>
(cherry picked from commit ae833c01b3)
2025-02-22 12:32:34 +01:00
Felix Fietkau
315facfce6 kernel: receive all bridged multicast packets if IFF_ALLMULTI is set
Fixes issues with odhcpd, especially in relay mode

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 38c21271d2)
2025-02-17 12:31:11 +01:00
Daniel Golle
bbe51e72f1 mediatek: apply bootloader work-around for affected ASUS devices
Apply "u-boot-dont-touch-spi-nand" to ASUS RT-AX59U, ASUS TUF-AX4200 as
well as ASUS TUF-AX6000 routers to prevent U-Boot from wiping MTD
child nodes from DT.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 4387de9445)
2025-02-16 20:43:53 +00:00
Daniel Golle
36bde27e79 mediatek: add work-around for ASUS bootloader MTD behavior
ASUS makes use of U-Boot's fdt_fixup_mtdparts() function which applies
the partitions defined in U-Boot's mtdparts and mtdids environment
variables to the devicetree passed over to Linux.

The undesired side-effect is that in this way also all additional
properties and child nodes get wiped, preventing NVMEM cells to be
defined for MTD partitions or UBI volumes.

To work-around this issue, add an additional compatible string
'u-boot-dont-touch-spi-nand' which can be used instead of 'spi-nand' in
case the replacement of the MTD partitions by U-Boot should be skipped
alltogether.

In practise this is mostly relevant for SPI-NAND which anyway comes only
with two partitions nowadays: 'Bootloader' and 'UBI_DEV'. Hence this
work-around is applicable for SPI-NAND only. Similar work-arounds for
other MTD devices can be created as well should they actually be needed.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit c48afca32c)
2025-02-16 20:43:53 +00:00
Paweł Owoc
4c9cae1906 qualcommax: ipq807x: add support for Linksys MX4300 (LN1301)
Hardware specification:
========
SoC: Qualcomm IPQ8174
Flash: 1GB (Micron MT29F8G08ABBCAH4 or AMD/Spansion S34MS08G2)
RAM: 2GB (2x Kingston B5116ECMDXGJD or ESMT M15T2G16128A DDR3L)
Ethernet: 4x 10/100/1000Mbps (Qualcomm QCA8075)
WiFi1: 5GHz ax 2x2 (Qualcomm QCN5054 + Skyworks SKY85755-11) - channels 36-64 (low band)
WiFi2: 2.4GHz ax 2x2 (Qualcomm QCN5024 + Skyworks SKY85340-11)
WiFi3: 5GHz ax 4x4 (Qualcomm QCN5054 + Skyworks SKY85755-11) - channels 100-177 (high band)
LED: 1x RGB status (NXP PCA9633)
USB: 1x USB 3.0
Button: WPS, Reset

Flash instructions:
========
1. Manually upgrade firmware using openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin image.
More details can be found here: https://support.linksys.com/kb/article/6564-en/
After first boot check actual partition:
- fw_printenv -n boot_part
and install firmware on second partition using command in case of 2:
- mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin kernel
and in case of 1:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin alt_kernel

2. Installation using serial connection from OEM firmware (default login: root, password: admin):
- fw_printenv -n boot_part
In case of 2:
- flash_erase /dev/mtd21 0 0
- nandwrite -p /dev/mtd21 openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin
or in case of 1:
- flash_erase /dev/mtd23 0 0
- nandwrite -p /dev/mtd23 openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin
After first boot install firmware on second partition:
- mtd -r -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin kernel
or:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin alt_kernel

3. Installation from initramfs image using USB drive:
Put the initramfs image on the USB drive:
- dd bs=1M if=openwrt-qualcommax-ipq807x-linksys_mx4300-initramfs-uImage.itb of=/dev/sdX
Stop u-boot and run:
- usb start && usbboot $loadaddr 0 && bootm $loadaddr
Write firmware to the flash from initramfs:
- mtd -e kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin kernel
and:
- mtd -r -e alt_kernel -n write openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin alt_kernel

4. Back to the OEM firmware:
- mtd -e kernel -n write FW_MX4300_1.0.4.215382_prod.img kernel
and:
- mtd -r -e alt_kernel -n write FW_MX4300_1.0.4.215382_prod.img alt_kernel

5. USB recovery:
Put the initramfs image on the USB:
- dd bs=1M if=openwrt-qualcommax-ipq807x-linksys_mx4300-initramfs-uImage.itb of=/dev/sdX
Set u-boot env:
- fw_setenv bootusb 'usb start && usbboot $loadaddr 0 && bootm $loadaddr'
- fw_setenv bootcmd 'run bootusb; if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi'

Co-authored-by: Qiyuan Zhang <zhang.github@outlook.com>
Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16070
(cherry picked from commit 4d310b176be9eea162159f2501e650ebbd6605e9)
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17889
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-16 13:03:23 +01:00
Qiyuan Zhang
082608fd2b mtd: check the return value of malloc and pread
Check the return value of malloc and pread in case they fail.

Signed-off-by: Qiyuan Zhang <zhang.github@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/16070
(cherry picked from commit 3f014543cd4bd099dc089cbb9b9b2d7b0db8a021)
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17889
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-16 13:03:23 +01:00
Qiyuan Zhang
45ce95a9b3 qualcommax: add kernel cmdline replacement hack
Add kernel command line replacement hack to qualcommax. Now we can
find and replace arguments in the kernel command line by setting
bootargs-find-1, bootargs-replace-1, bootargs-exact-match-1
and bootargs-find-2, bootargs-replace-2, bootargs-exact-match-2
under the chosen node in the device tree.

This hack replaces the first occurence of bootargs-find-X with
bootargs-replace-X. When bootargs-exact-match-X is set to "y",
then the replacement happens only if the kernel command line is
identical to bootargs-find-X.

Signed-off-by: Qiyuan Zhang <zhang.github@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/16070
(cherry picked from commit 337f6f76ca5361f45e76facd52396936b9fc25c0)
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17889
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-16 13:03:23 +01:00
Qiyuan Zhang
ab9f1011ac mtd: fix resetbc on nand w/ min I/O size > 2048
Fix a bug in linksys_bootcount.c that resetbc  won't work on nand
with min I/O size> 2048.

Check the boot-log entry's intergrity with checksum.

Signed-off-by: Qiyuan Zhang <zhang.github@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/16070
(cherry picked from commit 62da99e6d506f3517f50c1efd61e1911df507ae3)
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17889
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-16 13:03:23 +01:00
Paweł Owoc
b02cdced3f qualcommax: ipq807x: fix mac setup for Linksys MX4200v2
Currently for Linksys MX4200v2 all u-boot ethXaddr variables share the same MAC address
and there is no need to check them one by one.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16070
(cherry picked from commit 80c867815636cbf32e85b431c5d06c531e4a371e)
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17889
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-16 13:03:23 +01:00
Paweł Owoc
1252e16f77 qualcommax: ipq807x: define configuration for Linksys MX4x00 devices
Define shared configuration for Linksys MX4x00 devices.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16070
(cherry picked from commit 73fc1e0aa2d9956561915e342d098a6881ec85a3)
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17889
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-16 13:03:22 +01:00
Paweł Owoc
deccf0e37b qualcommax: ipq807x: create generic Linksys MX4x00 dts
Create a generic Linksys MX4x00 dts file and extract the specific configuration
for MX4200v1/v2 to a new file.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16070
(cherry picked from commit ff85f883ea94f562af618fb26ba8b5e85e572d64)
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17889
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-16 13:03:22 +01:00
Paweł Owoc
708a81fb8b qualcommax: ipq807x: remove unnecessary bootargs-append for MX4200
The default value for the "root" parameter is "/dev/ubiblock0_0"
and there is no need to append it to bootargs.

Signed-off-by: Paweł Owoc <frut3k7@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16070
(cherry picked from commit fee2d93b276f3c44dad83849f9959638ce495de7)
Signed-off-by: Rafal Boni <rafal.boni@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17889
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-16 13:03:22 +01:00
Felix Fietkau
b7b6ae7424 mt76: update to Git HEAD (2025-02-14)
2919ae2c0f94 wifi: mt76: mt7996: revise TXS size
1aaacd335577 wifi: mt76: mt7996: fix SER reset trigger on WED reset
e9396ad2378f wifi: mt76: mt7996: remove unnecessary key->cipher check for BIP frames
e5fef138524e mt76: only mark tx-status-failed frames as ACKed on mt76x0/2

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 3dfd1f69a7)
2025-02-14 11:31:13 +01:00
Shiji Yang
cc5bc05a0e Revert "Revert "ramips: mt7620: fix patching mac address in caldata""
This reverts commit f628467dfd.

The initial fix was correct. However, a recently introduced bug in
base-files can cause some unexpected byte overwriting in eeprom.
Since it has been fixed, let's accept this patch again.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 43bc5e6e12)
2025-02-13 00:32:30 +01:00
Shiji Yang
bccab05ac7 base-files: fix offset conversion on caldata_patch_data()
`$(( ))` will convert uninitialized variable to "0". If we want to
use "-n" to check the string length, it's necessary to make sure the
converted variable is not empty.

Fixes: 652a6677d5 ("base-files: Add new functions for ath11k caldata")
Fixes: https://github.com/openwrt/openwrt/issues/17818
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 094b6f593f)
2025-02-13 00:32:30 +01:00
Shiji Yang
9b05ca988c ramips: mt7620: add missing PA/LNA pinctrl for Linksys E1700
This device has high-power external PA and LNA[1]. So we must
configure PA/LNA pins to make the wireless work properly.

[1] https://fccid.io/Q87-E1700/Internal-Photos/Internal-Photos-pdf-2135639.pdf
Fixes: https://github.com/openwrt/openwrt/issues/7959
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 3aa9b70836)
2025-02-13 00:32:30 +01:00
Shiji Yang
2efd34dfa6 mac80211: rt2x00: fix eeprom load from PCI eFuse
When eeprom name is not defined, the file load function should
return an error code so that it can fallthrough to read eeprom
form NIC inside eFuse.

Fixes: https://github.com/openwrt/openwrt/issues/17854
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17892
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 693108a318)
2025-02-13 00:32:30 +01:00
Lech Perczak
424d758d1f ath79: mikrotik: fix reference clock of Routerboard 911G
When support for Routerboard 911G was introduced, Routerboad 912UAG
device tree was used as a base, and the common part. This led to use of
40MHz as the reference clock frequency for both [1], while RB911G uses 25MHz
crystal on the board, causing heavy system clock drift.

Split the definition, and set the reference clock frequency for RB911G
back to 25MHz.

[1] a716ac5564 ("ath79: fix reference clock for RouterBoard 912UAG")

Fixes: bcc44b1212 ("ath79: support for MikroTik RouterBOARD 911G-(2,5)HPnD")
Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17944
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 40fc6bd5cc)
2025-02-13 00:32:30 +01:00
Klaas Demter
d89527ce14 uboot-envtools: add support for ZyXEL GS-1900-24EP
It seems the that this was forgotten during initial adding of the
device in 0688cf5aeb

Thanks to
https://forum.openwrt.org/t/zyxel-gs1900-10hp-revision-b1-support-openwrt-firmware/131841/32
for putting me on the right track for this problem

Error that is being fixed - running fw_printenv results in:
"Warning: Bad CRC, using default environment"
and not showing boardmodel

Workaround, manually changing /etc/fw_env.config to
"/dev/mtd1 0x0 0x400 0x10000"

Signed-off-by: Klaas Demter <psychic-stool-cozy@duck.com>
Link: https://github.com/openwrt/openwrt/pull/17920
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 71a966c480)
2025-02-13 00:32:30 +01:00
Pietro Ameruoso
5b78205343 mediatek: filogic: fix mt7986a-zyxel-ex5601-t0-stock.dts model name and eth1 wan definition
Fix the model name to reflect the stock partitioning and the wan eth1 detection in the 02_network script.

Fixes: https://github.com/openwrt/openwrt/issues/14432
Fixes: b5df398a36 ("mediatek: add Zyxel EX5601-T0 with uboot custom partition")
Signed-off-by: Pietro Ameruoso <p.ameruoso@live.it>
Link: https://github.com/openwrt/openwrt/pull/17859
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit d023ee7439)
2025-02-13 00:32:30 +01:00
Felix Fietkau
cb4d2b3fb2 hostapd: fix sta psk index for dynamic psk auth
Depending on the config / circumstances, the get_psk call can be called
multiple times from differnt places, which can lead to wrong sta->psk_idx
values. The correct call is the one that is also interested in the vlan_id,
so use the vlan_id pointer as indication of when to set sta->psk_idx.
Also fix off-by-one error for secondary PSKs

Fixes: b2a2c28617 ("hostapd: add support for authenticating with multiple PSKs via ubus helper")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 8118b2dace)
2025-02-12 12:00:19 +01:00
Felix Fietkau
7955545469 wifi-scripts: fix mac address allocation with macaddr_base set
The 00 address_mask needs to be inverted, otherwise the mac address
allocation will modify the last byte instead of the first one.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 1ee44825ad)
2025-02-11 18:30:27 +01:00
Felix Fietkau
f47125f664 build: fix building llvm tarball
Add missing select NEED_BPF_TOOLCHAIN in order to ensure that the toolchain
actually gets built.

Fixes: https://github.com/openwrt/openwrt/issues/17926
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 04570f5ee2)
2025-02-10 22:12:06 +01:00
Felix Fietkau
5899fe220b umdns: update to Git HEAD (2025-02-10)
c0a2aa12c397 ubus: allow query without specifying interface
c5ca22a71b2e cache: improve service discovery reliability

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit dd5c598de0)
2025-02-10 21:44:00 +01:00
John Crispin
10ba7154db umdns: update to latest HEAD
93458ac dns: fix response to TYPE_PTR query
68af311 fix unicast response port and timeout
a2b4979 service: announce all services in single dns answer
4537734 display announced services in ubus call umdns browse
0b50c29 display more srv attributes in output of ubus browse function

Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit d162fd5ed4)
2025-02-10 17:09:49 +01:00
Felix Fietkau
058cf0a67d unetd: update to Git HEAD (2025-01-29)
aff192cda38b ubus: hide local private key in network_get
24e4aafaaa2f ubus: add detailed peer statistics
082b5482b97f pex: improve keepalive handling

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 087c5abdf5)
2025-02-10 17:08:18 +01:00
Felix Fietkau
b4b2f7fd80 unetd: update to Git HEAD (2025-01-27)
c293afa01c13 network: add support for the local_network option

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit c34eee5f39)
2025-02-10 17:08:18 +01:00
Felix Fietkau
3e7193933b unetd: update to Git HEAD (2025-01-26)
322500403615 service: add default group @ to match all nodes
5f7860306200 ubus: rename unetd_ubus_notify to unetd_ubus_network_notify
d13752814651 enroll: add PEX sub-protocol to support enrolling new nodes into a network

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit c0f06cb6ac)
2025-02-10 17:08:18 +01:00
Felix Fietkau
a9107e74a6 ucode: update to Git HEAD (2025-02-10)
a362263595e6 vm: fix inverted condition in uc_vm_signal_handlers_setup()
1b8660d33fb7 tests: adjust testcases after previous commit
4efad5388184 main: fix crash on printing -p output
0b80ceb29311 vm: close signal pipe in uc_vm_signal_handlers_reset()
175686c97d82 uci: eliminate usage of global variables
0f69da9c3777 struct: fix memory leak in buffer.pull()
47f3a6b69908 debian/control: Build-Depend on cmake
01efa7b92100 debian/control: Fix Standards-Version, add Bugs
f50149d67fef debian/source/format: change to native
bd001ae4f830 debian/control: libucode Recommends ucode-modules
87776a0bc2b2 docs: Mention `libmd` in macOS docs
826a5c9de7d3 docs: Fix compilation command for macOS
1fa771fc91c0 debian/copyright: fix missing dot to separate paragraphs
60c0e5eae992 debian/control: pkg-config now called pkgconf
244570db4f8e debian/changelog: switch versioning to native package scheme
fa2326fc00a0 .gitignore: ignore files generated by debuild
faec62367524 debian: ignore lintian warning no-manual-page
af881af4b0dc main: add global SCRIPT_NAME variable
5cbd32514187 socket: fix AF_PACKET recvmsg() and sockaddr formatting
6f71a35c4cfa rtnl: properly handle runtime exceptions in listener callback
6dd08716205f ci: bump actions/upload-artifact to v4
001ced17982f socket: properly support SO_ATTACH_FILTER sockopt
f0e865fe3ddd ubus: add named parameter support in functions with many params
18a2ffaf51fa fs: ioctl: export constants for direction values
0ba75bea925d fs: ioctl: improve ioctl read to avoid allocating twice
9da8b8aa4ad0 ubus: add defer.await() method
17dbf0bef4b6 ubus: add request get_fd/set_fd methods
4acb960c90f7 ubus: add support for sending file descriptors via ubus.call/defer
22b9523565a5 ubus: add support for receiving file descriptors in call and defer
c0d1654a450b ubus: add support for channels
b32321beb112 vm: fix crash due to stale frame pointer

Fixes: https://github.com/jow-/ucode/issues/254
Fixes: https://github.com/jow-/ucode/issues/255
Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 0e672e9806)
2025-02-10 17:05:55 +01:00
Robert Marko
fbf04ab999 ucode: update to Git HEAD (2024-12-06)
47b54cf5a4b6 types: introduce `ucv_array_sort_r()` and `ucv_object_sort_r()`
efeb57806552 types, vm: refactor usage of global variables
f9d2faf67de6 vm: reset signals when freeing VM
4e86847d802d lib: utilize `ucv_array_sort_r()` and `ucv_object_sort_r()`
c71444ea301f types: ucv_resource_create(): rename `typename` parameter to `type`
373df7299c79 nl80211: properly support split_wiphy_dump for single phys
9bcd25f54708 lexer: Preserve keyword, regexp flags until processing non-comment tokens
0a7ff4715cb8 main: pretty-print `-p` output by default
4c3d5b469156 struct: Add new buffer API for incremental packing/unpacking
efc4122124cb struct: do not use global variables for caching types

Fixes: https://github.com/jow-/ucode/issues/248
Fixes: https://github.com/jow-/ucode/issues/250
Fixes: https://github.com/efahl/owut/issues/25
Link: https://github.com/openwrt/openwrt/pull/17191
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit af6f1a90bb)
2025-02-10 17:05:45 +01:00
John Crispin
16070364f9 ucode: update to latest HEAD
b0b5d93 Merge pull request #234 from IdWV/fs
60e7a88 Merge pull request #232 from sebastianertz/lib-digest
1752779 digest: implement compile time option to exclude less common algorithms
c7268a1 ci: include libmd in MacOS CI builds
fcb6f70 lib: introduce digest library
1323a27 Merge pull request #246 from jow-/fix-upvalue-resolve
ed5ce8f types: resolve upvalue values in arrays and objects
a6e0641 vm: resolve upvalues before pushing them onto the stack
ef1baab ci: drop OpenWrt tests for now
63e18ea fs: eliminate the usage of global variables
b1bd7b5 types: add ucv_resource_create() helper
3408edf Merge pull request #244 from nbd168/nl80211
8af77e7 nl80211: add new attributes for multi-radio support
1423ad7 nl80211: cover extended feature and EHT rate info attributes
ee1d6d8 Merge pull request #237 from sebastianertz/math
4b18a9b Merge pull request #213 from jow-/improve-vector-macros
1f022c0 math: removed global variable for thread safety
e5fe6b1 treewide: refactor vector usage code
20307ee utils: improve vector utilities
aa18952 Merge pull request #241 from jow-/socket-local-fanout-decl
79ccd9c socket: provide local definition of `struct fanout_args`
402280d Merge pull request #239 from jow-/safe-insert-during-obj-iteration
07afe96 Merge pull request #240 from jow-/stricter-number-conversion
736d450 types: fix potential use after free on adding keys during iteration
4134e71 vallist: more thoroughly check for trailing garbage after numeric string
9cf53dd Merge pull request #226 from jow-/lexer-improvements
2b2e732 lexer: make api functions public
855854f lexer: emit comment and template statement block tokens
328a50f lexer: improve token position reporting
fa22732 Merge pull request #225 from jow-/compiler-fix-keyword-property-labels-after-spread
6e88c62 Merge pull request #224 from jow-/lib-fs-readline-leak
94d1211 compiler: properly treat property names after spread expressions
67cd123 fs: fix potential memory leak on i/o errors in .read()

Signed-off-by: John Crispin <john@phrozen.org>
(cherry picked from commit ba9cdbeea8)
2025-02-10 17:05:42 +01:00
Tim Harvey
c4f5028bdf imx: coretexa53: add network configuration for gw82xx-2x
The GW82xx-2x has two network ports. By convention, the first
port (eth0) should be the WAN port and the second port (eth1)
should be the LAN port.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17717
Signed-off-by: Robert Marko <robimarko@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit d2eaaa90d5)
2025-02-09 23:27:02 +01:00
Tim Harvey
7feb8be5e4 imx: 6.6: add a patch to work around a PCI init hang on IMX8M{M,P}
The act of attempting link at gen1 then trying to link at higher speeds
causes a hang with the specific PCIe switch used on the Gateworks Venice
boards. Work around this by linking at the highest speed first as is
common with all other PCI controller drivers.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17717
Signed-off-by: Robert Marko <robimarko@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 23a18a57cf)
2025-02-09 23:26:39 +01:00
Tim Harvey
e2b064f5a4 imx: 6.6: add some backported kernel patches for Gateworks Venice
Add several dt backports for the Gateworks Venice product family.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17717
Signed-off-by: Robert Marko <robimarko@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 1ce87cf25c)
2025-02-09 23:26:13 +01:00
Tim Harvey
fa64175e1a generic: 6.6: add backported btsdio patch for cyw437
Add a backport of a btsdio patch for the cyw437 bluetooth controller.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Link: https://github.com/openwrt/openwrt/pull/17717
Signed-off-by: Robert Marko <robimarko@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17762
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit c9f11523dd)
2025-02-09 23:25:46 +01:00
Mikhail Zhilkin
db30b60bf1 mediatek: fix nmbm configuration mismatch (Xiaomi AX3000t)
This commit fixes nmbm configuration mismatch error on Xiaomi AX3000t
with Winbond W25N01KVZEIR spi-nand:
'''
[    0.786783] NMBM configuration mismatch
'''

Root cause:
1. U-Boot W25N01KV spi-nand driver ia compiled with 64B OOB size for the
   chip and store this size in the nmbm signature;
2. Linux W25N01KV driver use 96B OOB.

The change doesn't affect AX3000t variants with other spi-nand chips
(ESMT, Foresee) because their Linux drivers use 64B OOB.

Fixes: openwrt#16972
Tested-by: Aleksandr Danilov <sc16me@gmail.com>
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17549
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 3299d19c01)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17898
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-09 23:19:11 +01:00
Mikhail Zhilkin
37cc725b1a kernel: nmbm: add mediatek,bmt-mtd-overridden-oobsize property
This commit adds new "mediatek,bmt-mtd-overridden-oobsize" property. The
property helps avoid "NMBM configuration mismatch" error if mtd "OOB size"
is not equal to the "spare size" which is stored in the nmbm signature.

Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17549
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit e585ae70d4)
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17898
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-09 23:19:11 +01:00
Felix Fietkau
122b637889 umdns: add firewall rule for configured interfaces
Makes it easier to enable MDNS on wan without having to edit the firewall
configuration for it

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 05138fe898)
2025-02-08 22:33:11 +01:00
Felix Fietkau
8cd50a6aec build: conditionally build llvm bpf toolchain by default
Unless another toolchain is present (or selected), build the bpf toolchain
whenever a package is selected that needs it.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 6605e45676)
2025-02-07 11:19:10 +01:00
Álvaro Fernández Rojas
7609571dcd kernel: r8168: update to v8.055.00
Changelog: https://github.com/openwrt/rtl8168/compare/8.054.00...8.055.00

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 5dd763680e)
2025-02-05 15:17:52 +01:00
Mieczyslaw Nalewaj
92e020b50f mt76: update to Git HEAD (2025-01-22)
3e85822b9c66 page_pool: remove PP_FLAG_PAGE_FRAG
a22d59e4ad50 tools: fix allocation check and missing memory freeing

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
(cherry picked from commit 17dc079)
Link: https://github.com/openwrt/openwrt/pull/17707
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-02-04 20:21:11 +01:00
Álvaro Fernández Rojas
e4d840b312 generic: 6.6: backport upstream r8169 patches
b11bff90f2ad r8169: add support for RTL8125BP rev.b
b3593df26ab1 r8169: add support for RTL8125D rev.b
b299ea006928 r8169: adjust version numbering for RTL8126
bb18265c3aba r8169: remove support for chip version 11
2e20bf8cc057 r8169: remove unused flag RTL_FLAG_TASK_RESET_NO_QUEUE_WAKE
e340bff27e63 r8169: copy vendor driver 2.5G/5G EEE advertisement constraints

The EEE advertisement patch has been reworked for linux v6.6 because
phy_set_eee_broken() is only present on linux >= v6.13 and eee_broken_modes
declaration has been converted to a bitmap, so linkmode_set_bit() can't be
used either.
e340bff27e
ed623fb8e3
721aa69e70

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit 084618f8db)
2025-02-04 07:30:39 +01:00
Hauke Mehrtens
9e1b04fbdc OpenWrt v24.10.0: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-04 00:10:38 +01:00
Hauke Mehrtens
1fad1b4965 OpenWrt v24.10.0: adjust config defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-02-04 00:10:35 +01:00
Hauke Mehrtens
6df0e3d02a Revert "ramips: mt7620: fix patching mac address in caldata"
This reverts commit 3295f6f1c2.

It looks like the eeprom gets broken after this change.
I think this change was not tested on a real device before it was
merged.
The MAC addresses will be broken again after this revert.

Fixes: #17818
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit f628467dfd)
2025-02-04 00:09:37 +01:00
Christian Marangi
cd747cb3aa ipq806x: fix broken WAN on Linksys EAX and Asrock G10
Fix broken WAN on Linksys EAX and Asrock G10 by incrementing the WAN
interface MAC address + 1. This caused conflicting entry in the FDB
table and caused the WAN port to malfunction with the DSA conversion.

Fixes: #17157
Fixes: #15585
Fixes: #16604
Link: https://github.com/openwrt/openwrt/pull/17839
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
(cherry picked from commit eba2fbf638)
2025-02-03 01:55:01 +01:00
Shiji Yang
4d213b2ae2 ramips: fix xtal clock registration issue on RT3883
The redundant xtal clock source caused clock registration failure.

Link: https://lore.kernel.org/all/20250108093636.265033-1-sergio.paracuellos@gmail.com/
Fixes: https://github.com/openwrt/openwrt/issues/17677
Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17830
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit cfca9d6894)
2025-02-02 20:36:41 +01:00
Daniel Golle
c1d5de0c59 mediatek: mt7622: fix SATA on BPi-R64
Two commits which made their way into Linux stable broke the SATA
support on the BPi-R64.

Fix this by reverting a node rename which broke DT-overlay application
and import a (still pending) patch re-adding the 'syscon' compatible to
the pciesys clock-controller which also contains phy-mode bits
referenced by the ahci_mtk driver expecting to access them using
syscon_regmap_lookup_by_phandle().

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit 69890e16b3)
2025-02-01 05:10:37 +00:00
Daniel Golle
81db307748 generic: net: phy: realtek: work-around hang on SerDes setup
On some but not all devices using the RTL8221B 2.5GBit/s PHY the SerDes
setup sequence may hang under some circumstances (eg. <2500M link
partner present during boot).

RTL8221B-VB-CG 2.5Gbps PHY (C45) mdio-bus:01: rtl822xb_config_init failed: -110

Work-around the issue by performing a hardware reset and subsequent
retry of the SerDes setup, which seems to always succeed.

Doing this requires moving ALDPS setup to config_init (which is anyway
the better place for that) as it otherwise doesn't survive the reset.

Also disable listening on MDIO address 0 which may be used by other PHYs
despite being spec'ed as "broadcast address", as bus activity on address
0 may otherwise confuse the RealTek PHY for good reasons.

Tested-by: Luis Mita <luis@luismita.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit c87a767801)
Link: https://github.com/openwrt/openwrt/pull/17790
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-31 21:38:34 +01:00
Hauke Mehrtens
7a916c75e8 x86: Add kmod-drm-i915 as default package
Add kmod-drm-i915 to the default packages. It was build into the kernel
before and is now build as a kernel module.

Fixes: 77cfe8fd15 ("x86: make i915 as a kmod with required firmware")
Link: https://github.com/openwrt/openwrt/pull/17781
Signed-off-by: Robert Marko <robimarko@gmail.com>
(cherry picked from commit 8390599c9a)
Link: https://github.com/openwrt/openwrt/pull/17792
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-31 21:37:05 +01:00
Shiji Yang
1a75172721 ramips: pinctrl: allow mux SDXC pins for mt76x8
The mt76x8 SDXC pin register definition is incompatible with the
mtmips generic pinctrl driver structure. This hack allows us to
mux the SDXC IO to different pin groups in device tree.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
Link: https://github.com/openwrt/openwrt/pull/17446
(cherry picked from commit 05ec3b50a8)
Link: https://github.com/openwrt/openwrt/pull/17754
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-29 22:37:05 +01:00
Álvaro Fernández Rojas
e2c2a6ed7f bmips: shg2500: add missing led controller cells
Fixes the following DT warnings:
../dts/bcm63168-sercomm-shg2500.dts:76.4-14: Warning (reg_format): /ubus/spi@10001000/led-controller@1/led@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
../dts/bcm63168-sercomm-shg2500.dts:75.9-78.5: Warning (avoid_default_addr_size): /ubus/spi@10001000/led-controller@1/led@1: Relying on default #address-cells value
../dts/bcm63168-sercomm-shg2500.dts:75.9-78.5: Warning (avoid_default_addr_size): /ubus/spi@10001000/led-controller@1/led@1: Relying on default #size-cells value

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry picked from commit fbe0bd5f64)
2025-01-28 08:35:57 +01:00
Hauke Mehrtens
c08ba0f712 OpenWrt v24.10.0-rc7: revert to branch defaults
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-01-28 00:06:50 +01:00
478 changed files with 23746 additions and 2635 deletions

1
.gitignore vendored
View File

@@ -35,3 +35,4 @@ git-src
.cproject
.ccache
.vscode*
/openwrt_logs

750
build_openwrt.sh Executable file
View File

@@ -0,0 +1,750 @@
#!/usr/bin/env bash
#====================================================
# OpenWrt 构建管理脚本
# 功能:提供交互式菜单,可选择执行特定操作
# 更新2025-04-05
#====================================================
#---------------基础配置---------------#
# 日志目录设置
LOGS_ROOT="openwrt_logs"
SESSION_DIR="${LOGS_ROOT}/$(date +%Y%m%d_%H%M%S)"
LOG_FILE="${SESSION_DIR}/main_build_script.log" # 主脚本日志文件名更改,更清晰
#---------------清理配置---------------#
# 需要移除的目录列表 (示例,根据你的需要添加)
declare -a REMOVE_DIRS=(
# "feeds/packages/net/v2ray-geodata" # 示例
)
# 需要移除的包列表 (示例,根据你的需要添加)
declare -a REMOVE_PACKAGES=(
# "package/feeds/luci/luci-app-example" # 示例
)
#---------------自定义包配置---------------#
# 定义自定义包配置,格式:[包名]=[目标目录]=[仓库URL]=[分支]=[是否使用--depth 1]
declare -A CUSTOM_PACKAGES=(
["partexp"]="package/luci-app-partexp=https://github.com/sirpdboy/luci-app-partexp=main=false"
["openclash"]="package/openclash=https://github.com/vernesong/OpenClash=dev=true"
["zerotier"]="package/luci-app-zerotier=https://github.com/Firsgith/luci-app-zerotier.git=main=false"
["5gsupport"]="package/5G-Modem-Support=https://nanako.site/gitea/Nanako/openwrt-app-actions.git=main=false"
["pcat"]="package/pcat-manager=https://github.com/photonicat/rockchip_rk3568_pcat_manager.git=master=true"
["adguardhome"]="package/adguardhome=https://github.com/xiaoxiao29/luci-app-adguardhome.git=master=false"
)
#---------------日志系统---------------#
# 保存原始的标准输出和错误输出文件描述符
exec {STDOUT_ORIG}>&1
exec {STDERR_ORIG}>&2
# 全局变量标记日志是否启用
LOGGING_ENABLED=false # 初始为 false由 init_logger 启用
# 初始化日志系统
init_logger() {
# 创建日志目录结构
mkdir -p "$SESSION_DIR" || {
echo "错误: 无法创建日志目录: $SESSION_DIR" >&2
exit 1
}
LOGGING_ENABLED=true
echo "日志将保存在: $SESSION_DIR"
echo "主脚本日志: $LOG_FILE"
# 重定向主脚本的 stdout 和 stderr 到 tee同时输出到控制台和主日志文件
# 使用 process substitution 和 tee
exec > >(tee -a "$LOG_FILE")
exec 2> >(tee -a "$LOG_FILE" >&2)
# 记录初始信息到日志
echo "[$(date "+%Y-%m-%d %H:%M:%S")] [INFO]: 日志系统初始化完成。主日志文件: $LOG_FILE"
}
# 创建新的特定构建阶段的日志文件
create_build_log() {
local build_type=$1
local timestamp=$(date +%Y%m%d_%H%M%S)
# 使用更明确的文件名
BUILD_LOG_FILE="${SESSION_DIR}/${build_type}_build_${timestamp}.log"
# 确保文件被创建,即使命令没有输出
touch "$BUILD_LOG_FILE" || {
log "ERROR" "无法创建构建日志文件: $BUILD_LOG_FILE"
return 1
}
# 返回创建的日志文件名
echo "$BUILD_LOG_FILE"
return 0
}
# 禁用日志重定向 (用于 menuconfig 等交互场景)
disable_logging() {
if [ "$LOGGING_ENABLED" = true ]; then
log "DEBUG" "禁用日志重定向,恢复原始标准输出/错误。"
exec >&$STDOUT_ORIG
exec 2>&$STDERR_ORIG
LOGGING_ENABLED=false # 标记为禁用
fi
}
# 启用日志重定向 (恢复)
enable_logging() {
# 仅在之前被禁用的情况下才重新启用
if [ "$LOGGING_ENABLED" = false ]; then
# 重新应用重定向到主日志
exec > >(tee -a "$LOG_FILE")
exec 2> >(tee -a "$LOG_FILE" >&2)
LOGGING_ENABLED=true # 标记为启用
log "DEBUG" "重新启用日志重定向到主日志。"
fi
}
# 设置终端颜色
setup_colors() {
if [[ -t 1 ]]; then # 检查标准输出是否连接到终端
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m' # No Color
else
RED='' GREEN='' YELLOW='' BLUE='' NC=''
fi
}
# 记录日志函数 - 使用此函数来明确日志级别
# 注意:此函数输出会经过 init_logger 设置的全局重定向
log() {
local level=$1
local message=$2
local timestamp
timestamp=$(date "+%Y-%m-%d %H:%M:%S")
local color="" level_str=""
case $level in
"INFO") color="$GREEN"; level_str="INFO " ;; # 加空格对齐
"WARN") color="$YELLOW"; level_str="WARN " ;;
"ERROR") color="$RED"; level_str="ERROR" ;;
"DEBUG") color="$BLUE"; level_str="DEBUG" ;;
*) color=""; level_str="LOG " ;; # 默认级别
esac
# 使用 printf 保证原子写入,减少并发问题
printf "[%s] %b[%s]%b: %s\n" "$timestamp" "$color" "$level_str" "$NC" "$message"
}
# 同时记录消息到主日志和特定的构建日志
log_to_both() {
local level=$1
local message=$2
local build_log_file=$3 # 明确参数名
# 1. 输出到主日志(通过全局重定向和 log 函数)
log "$level" "$message"
# 2. 追加到指定的构建日志文件
local timestamp
timestamp=$(date "+%Y-%m-%d %H:%M:%S")
# 直接追加,不需要颜色代码
printf "[%s] [%s]: %s\n" "$timestamp" "$level" "$message" >> "$build_log_file"
}
#---------------自定义包管理函数---------------#
# 更新单个自定义包
update_single_package() {
local pkg_name=$1
local config=$2
# 解析配置 (保持 cut 的方式,假设路径/URL/分支名不含 '=')
# 如果遇到问题,可以切换到 IFS/read
local target_dir repo_url branch use_depth
target_dir=$(echo "$config" | cut -d= -f1)
repo_url=$(echo "$config" | cut -d= -f2)
branch=$(echo "$config" | cut -d= -f3)
use_depth=$(echo "$config" | cut -d= -f4)
# 基础验证
if [ -z "$target_dir" ] || [ -z "$repo_url" ]; then
log "ERROR" "包 '$pkg_name' 的配置无效: $config"
return 1
fi
log "INFO" "更新自定义包: $pkg_name..."
# 检查目标目录的父目录是否存在
local parent_dir
parent_dir=$(dirname "$target_dir")
if [ ! -d "$parent_dir" ]; then
log "INFO" "创建父目录: $parent_dir"
mkdir -p "$parent_dir" || {
log "ERROR" "无法创建父目录: $parent_dir"
return 1
}
fi
# 移除现有目录
if [ -d "$target_dir" ]; then
log "INFO" "移除现有目录: $target_dir"
rm -rf "$target_dir" || {
log "ERROR" "无法删除目录: $target_dir"
return 1
}
fi
# 准备 git clone 命令参数数组 (移除 eval)
local git_options=("--progress") # 总是显示进度
# 处理分支
if [ -n "$branch" ] && [ "$branch" != "master" ]; then
git_options+=("-b" "$branch")
fi
# 处理 depth
if [ "$use_depth" = "true" ]; then
git_options+=("--depth" "1")
fi
# 执行克隆
log "INFO" "执行: git clone ${git_options[*]} $repo_url $target_dir"
if git clone "${git_options[@]}" "$repo_url" "$target_dir"; then
log "INFO" "包 '$pkg_name' 更新成功"
return 0
else
log "ERROR" "克隆包 '$pkg_name' 失败 (仓库: $repo_url)"
# 尝试给出更具体的错误提示
log "ERROR" "请检查网络连接、仓库 URL、分支名称以及目标目录权限。"
# 保留可能存在的空目录或部分克隆,让用户检查
# rm -rf "$target_dir" # 不再自动删除失败的克隆
return 1
fi
}
# 更新所有自定义包的主函数
update_custom_package() {
local failed_packages=()
local success_count=0
local total_packages=${#CUSTOM_PACKAGES[@]}
if [ "$total_packages" -eq 0 ]; then
log "INFO" "没有配置自定义包,跳过更新。"
return 0
fi
log "INFO" "开始更新 $total_packages 个自定义包..."
for pkg_name in "${!CUSTOM_PACKAGES[@]}"; do
# 使用 subshell 执行,避免污染当前环境的变量,但这里影响不大
if update_single_package "$pkg_name" "${CUSTOM_PACKAGES[$pkg_name]}"; then
((success_count++))
else
failed_packages+=("$pkg_name")
fi
done
# 显示更新结果
if [ ${#failed_packages[@]} -eq 0 ]; then
log "INFO" "所有自定义包更新成功 ($success_count/$total_packages)"
return 0
else
log "WARN" "部分自定义包更新失败 (成功: $success_count/$total_packages)"
log "ERROR" "更新失败的包: ${failed_packages[*]}"
return 1 # 返回失败状态码
fi
}
# 更新特定自定义包
update_specific_package() {
local pkg_name=$1
if [ -z "$pkg_name" ]; then
log "ERROR" "未指定包名"
return 1
fi
if [ -z "${CUSTOM_PACKAGES[$pkg_name]}" ]; then
log "ERROR" "未找到包配置:'$pkg_name'"
log "INFO" "可用的包名: ${!CUSTOM_PACKAGES[*]}"
return 1
fi
update_single_package "$pkg_name" "${CUSTOM_PACKAGES[$pkg_name]}"
}
#---------------基础功能函数---------------#
# 清理工作区 (make clean 的替代方案,更彻底)
clean_workspace() {
log "INFO" "开始彻底清理工作区..."
# 清理 feeds (可选,如果 feeds 内容经常变动或出问题可以启用)
# log "INFO" "执行 ./scripts/feeds clean ..."
# ./scripts/feeds clean || log "WARN" "./scripts/feeds clean 执行时遇到问题。"
# 清理编译产物和临时文件
log "INFO" "执行 rm -rf ./tmp ./logs ./staging_dir ./build_dir ./bin ./dl ..."
# 注意:这里移除了 logs 目录,但我们的脚本日志在 openwrt_logs 下,不会被删
# 如果 OpenWrt 自身有 logs 目录且需要保留,则从下面移除 ./logs
rm -rf ./tmp ./logs ./staging_dir ./build_dir ./bin ./dl || {
log "ERROR" "删除部分工作区目录失败,请检查权限或文件占用。"
return 1
}
log "INFO" "工作区清理完成。"
return 0
}
# 清理编译临时文件 (make clean 的快速版)
clean_build_temp() {
log "INFO" "开始清理编译临时文件..."
log "INFO" "执行 rm -rf ./tmp ./staging_dir ./build_dir ..."
rm -rf ./tmp ./staging_dir ./build_dir || {
log "ERROR" "删除部分编译临时目录失败。"
return 1
}
log "INFO" "编译临时文件清理完成。"
return 0
}
# 更新源码
update_source() {
log "INFO" "开始更新 OpenWrt 源码 (git pull)..."
if git pull --rebase; then # 使用 rebase 避免不必要的 merge commit
log "INFO" "源码更新完成"
return 0
else
log "ERROR" "源码更新失败 (git pull --rebase)"
log "WARN" "请检查本地是否有未提交的修改,或尝试手动解决 Git 冲突。"
return 1
fi
}
# 更新并安装 feeds
update_feeds() {
log "INFO" "开始更新 Feeds (update -a)..."
if ./scripts/feeds update -a; then
log "INFO" "Feeds 更新成功,开始安装 (install -a)..."
if ./scripts/feeds install -a; then
log "INFO" "Feeds 安装成功"
return 0
else
log "ERROR" "Feeds 安装失败 (install -a)"
return 1
fi
else
log "ERROR" "Feeds 更新失败 (update -a)"
return 1
fi
}
# 执行构建相关命令,并将 stdout 重定向到日志stderr 同时输出到控制台和日志
run_build_command() {
local cmd=$1 # 要执行的命令字符串
local log_file=$2 # 目标日志文件
local description=$3 # 操作描述
log_to_both "INFO" "开始执行: $description" "$log_file"
log "DEBUG" "命令详情: $cmd" # 只记录到主日志
# 执行命令
# stdout (>>) 追加到日志文件
# stderr (2>) 通过管道给 tee
# tee -a "$log_file" 将 stderr 追加到日志文件
# tee 默认将其标准输入复制到标准输出,这里即脚本的 stderr因此会显示在控制台
local start_time end_time duration
start_time=$(date +%s)
if eval "$cmd" >> "$log_file" 2> >(tee -a "$log_file" >&2); then
end_time=$(date +%s)
duration=$((end_time - start_time))
log_to_both "INFO" "$description 完成 (耗时: ${duration}s)" "$log_file"
return 0 # 成功返回 0
else
end_time=$(date +%s)
duration=$((end_time - start_time))
local exit_code=$? # 获取命令的退出码
# 错误信息已经通过 stderr 的 tee 输出到控制台了
log_to_both "ERROR" "$description 失败 (退出码: $exit_code, 耗时: ${duration}s)" "$log_file"
log "ERROR" "详细错误请查看控制台输出以及日志文件: $log_file"
return $exit_code # 失败返回命令的退出码
fi
}
# 编译固件
build_firmware() {
# 创建新的固件编译日志文件
local current_log
current_log=$(create_build_log "firmware") || return 1 # 创建失败则退出
log "INFO" "开始编译固件..."
log "INFO" "详细编译日志将保存在: $current_log"
# 1. 下载依赖包
local download_cmd="make download -j$(nproc) V=s"
run_build_command "$download_cmd" "$current_log" "下载依赖包" || {
log "ERROR" "依赖包下载失败,编译中止。"
# 即使下载失败,日志文件也已包含错误信息
return 1
}
# 2. 多线程编译
local cpu_cores
cpu_cores=$(nproc)
log "INFO" "检测到 $cpu_cores 个 CPU 核心,开始多线程编译..."
local build_cmd="make -j${cpu_cores} V=s"
if run_build_command "$build_cmd" "$current_log" "固件编译 (多线程)"; then
log "INFO" "${GREEN}固件编译成功完成!${NC}"
log "INFO" "固件输出目录: ./bin/targets/"
return 0 # 编译成功
else
# 多线程编译失败,询问用户是否重试
log "WARN" "多线程编译失败。"
local retry_choice
# -r: raw input, -p: prompt, -n 1: read only one char (optional but nice), -t 15: timeout (optional)
# Default to No
read -rp "$(echo -e ${YELLOW}"是否尝试使用单线程重新编译? (y/N): "${NC})" -n 1 -t 30 retry_choice
echo # Add a newline after read -n
if [[ "$retry_choice" =~ ^[Yy]$ ]]; then
log "INFO" "用户选择使用单线程重试编译..."
# 3. 单线程编译重试
local build_cmd_single="make -j1 V=s"
if run_build_command "$build_cmd_single" "$current_log" "固件编译 (单线程重试)"; then
log "INFO" "${GREEN}单线程编译成功完成!${NC}"
log "INFO" "固件输出目录: ./bin/targets/"
return 0 # 单线程编译成功
else
log "ERROR" "${RED}单线程编译也失败了。${NC}"
log "ERROR" "请仔细检查控制台错误输出以及日志文件: $current_log"
return 1 # 最终编译失败
fi
else
log "INFO" "用户选择不进行单线程重试编译。"
log "ERROR" "${RED}编译失败,未进行单线程重试。${NC}"
log "ERROR" "请仔细检查控制台错误输出以及日志文件: $current_log"
return 1 # 用户取消重试,编译失败
fi
fi
}
# 清理配置文件中指定的旧包/目录
clean_packages() {
log "INFO" "开始清理配置文件中指定的旧包和目录..."
local removed_count=0
local failed_count=0
local total_to_remove=$((${#REMOVE_DIRS[@]} + ${#REMOVE_PACKAGES[@]}))
if [ "$total_to_remove" -eq 0 ]; then
log "INFO" "配置文件中未指定需要移除的包或目录。"
return 0
fi
# 清理目录
for dir in "${REMOVE_DIRS[@]}"; do
if [ -e "$dir" ]; then # 使用 -e 检查文件或目录是否存在
log "INFO" "正在删除目录: $dir"
if rm -rf "$dir"; then
log "INFO" "已删除: $dir"
((removed_count++))
else
log "ERROR" "删除失败: $dir (请检查权限或是否被占用)"
((failed_count++))
fi
else
log "WARN" "指定的目录不存在,跳过: $dir"
fi
done
# 清理包 (通常包也是目录)
for pkg in "${REMOVE_PACKAGES[@]}"; do
if [ -e "$pkg" ]; then
log "INFO" "正在删除包/目录: $pkg"
if rm -rf "$pkg"; then
log "INFO" "已删除: $pkg"
((removed_count++))
else
log "ERROR" "删除失败: $pkg (请检查权限或是否被占用)"
((failed_count++))
fi
else
log "WARN" "指定的包/目录不存在,跳过: $pkg"
fi
done
if [ $failed_count -eq 0 ]; then
log "INFO" "旧包/目录清理完成,共处理 $removed_count 个项目。"
return 0
else
log "WARN" "旧包/目录清理部分完成 (成功: $removed_count, 失败: $failed_count)"
return 1 # 返回失败状态码
fi
}
# 更新所有组件 (源码 -> 清理旧包 -> 自定义包 -> feeds)
update_all_components() {
log "INFO" "开始更新所有组件..."
local success=true # 假设成功
# 1. 更新源码
log "INFO" "[1/4] 更新 OpenWrt 源码..."
update_source || success=false
# 2. 清理旧包 (即使上一步失败也尝试清理)
log "INFO" "[2/4] 清理配置文件指定的旧包/目录..."
clean_packages || log "WARN" "清理旧包/目录时遇到问题,继续执行..." # 清理失败通常不阻止后续
# 3. 更新自定义包 (只有在源码更新成功时才执行较好)
if [ "$success" = true ]; then
log "INFO" "[3/4] 更新自定义包..."
update_custom_package || success=false
else
log "WARN" "[3/4] 跳过更新自定义包,因为源码更新失败。"
fi
# 4. 更新 Feeds (只有在源码和自定义包都成功时执行较好)
if [ "$success" = true ]; then
log "INFO" "[4/4] 更新 Feeds..."
update_feeds || success=false
else
log "WARN" "[4/4] 跳过更新 Feeds因为之前的步骤失败。"
fi
# 总结
if [ "$success" = true ]; then
log "INFO" "所有组件更新完成!"
return 0
else
log "ERROR" "部分或全部组件更新失败,请检查上面的日志。"
return 1
fi
}
# 菜单配置 (make menuconfig)
menuconfig() {
log "INFO" "准备进入菜单配置 (make menuconfig)..."
log "INFO" "注意:日志重定向将暂时禁用以进行交互。"
# 禁用日志重定向,否则 menuconfig 界面可能显示不正常
disable_logging
# 执行 menuconfig
if make menuconfig; then
# 配置成功后重新启用日志
enable_logging
log "INFO" "菜单配置完成。新配置已保存到 .config"
# 询问是否保存 defconfig (可选)
# read -p "是否将当前配置保存为 defconfig? (y/N): " save_defconfig
# if [[ "$save_defconfig" =~ ^[Yy]$ ]]; then
# ./scripts/diffconfig.sh > my_defconfig
# log "INFO" "当前配置已保存到 my_defconfig"
# fi
return 0
else
# 配置失败或被取消,也要恢复日志
enable_logging
log "WARN" "菜单配置未完成或被取消。"
return 1 # 返回失败状态码
fi
}
#---------------组合功能函数---------------#
# 完整构建流程
full_build() {
log "INFO" "启动完整构建流程..."
local step=1
local total_steps=6 # 预估步骤数
# 1. 清理工作区
log "INFO" "[${step}/${total_steps}] 清理工作区..."
clean_workspace || { log "WARN" "工作区清理可能不完整,尝试继续..."; } # 清理失败通常不致命
((step++))
# 2. 更新源码
log "INFO" "[${step}/${total_steps}] 更新源码..."
update_source || { log "ERROR" "源码更新失败,终止构建流程。"; return 1; }
((step++))
# 3. 清理旧包
log "INFO" "[${step}/${total_steps}] 清理配置文件指定的旧包..."
clean_packages || log "WARN" "清理旧包时遇到问题,继续执行..."
((step++))
# 4. 更新自定义包
log "INFO" "[${step}/${total_steps}] 更新自定义包..."
update_custom_package || { log "ERROR" "自定义包更新失败,终止构建流程。"; return 1; }
((step++))
# 5. 更新 Feeds
log "INFO" "[${step}/${total_steps}] 更新 Feeds..."
update_feeds || { log "ERROR" "Feeds 更新失败,终止构建流程。"; return 1; }
((step++))
# 6. 菜单配置
log "INFO" "[${step}/${total_steps}] 进入菜单配置 (make menuconfig)..."
menuconfig || { log "WARN" "菜单配置未完成或取消,但继续尝试编译..."; } # 允许使用现有配置编译
((step++)) # 无论成功与否,都算一步
# 7. 编译固件 (独立步骤,不计入前面的 total_steps)
log "INFO" "所有准备工作完成,开始编译固件..."
if build_firmware; then
log "INFO" "${GREEN}完整构建流程成功完成!${NC}"
return 0
else
log "ERROR" "${RED}完整构建流程失败于编译阶段。${NC}"
return 1
fi
}
#---------------菜单函数---------------#
# 打印主菜单
print_menu() {
echo -e "\n${BLUE}======= OpenWrt 构建管理菜单 =======${NC}"
echo -e " ${YELLOW}会话日志目录: ${SESSION_DIR}${NC}"
echo -e "${GREEN} 1.${NC} ${BOLD}完整构建流程${NC} (清理 > 更新源码/包/feeds > 配置 > 编译)"
echo -e "${GREEN} 2.${NC} 清理工作区 (删除 tmp, bin, build_dir 等)"
echo -e "${GREEN} 3.${NC} 更新所有组件 (源码 + 旧包清理 + 自定义包 + feeds)"
echo -e "${GREEN} 4.${NC} 清理配置文件指定的旧包/目录"
echo -e "${GREEN} 5.${NC} ${BOLD}编译固件${NC} (make V=s)"
echo -e "${GREEN} 6.${NC} 调整配置 (make menuconfig)"
echo -e "${GREEN} 7.${NC} 更新所有自定义包"
echo -e "${GREEN} 8.${NC} 更新特定的自定义包"
echo -e "${GREEN} 9.${NC} 更新 OpenWrt 源码 (git pull)"
echo -e "${GREEN}10.${NC} 更新并安装 Feeds"
echo -e "-------------------------------------"
echo -e "${GREEN} 0.${NC} 退出脚本"
echo -e "${BLUE}====================================${NC}"
# 使用 read -p 提供提示
read -rp "请输入选项 [0-10]: " choice
}
# 打印并选择特定自定义包进行更新
select_specific_package() {
local pkg_names=("${!CUSTOM_PACKAGES[@]}") # 获取所有包名
local num_packages=${#pkg_names[@]}
if [ "$num_packages" -eq 0 ]; then
log "WARN" "没有配置任何自定义包。"
return 1
fi
echo -e "\n${BLUE}--- 选择要更新的自定义包 ---${NC}"
local i=1
# 使用 sort 命令让包名按字母排序显示
local sorted_pkg_names=($(printf "%s\n" "${pkg_names[@]}" | sort))
for pkg_name in "${sorted_pkg_names[@]}"; do
echo -e " ${GREEN}$i.${NC} $pkg_name"
((i++))
done
echo -e " ${GREEN}0.${NC} 返回主菜单"
echo -e "${BLUE}----------------------------${NC}"
local choice_pkg
read -rp "请输入包的序号 [0-$num_packages]: " choice_pkg
# 验证选择
if [[ ! "$choice_pkg" =~ ^[0-9]+$ ]]; then
log "ERROR" "无效输入,请输入数字。"
return 1
fi
if [ "$choice_pkg" -eq 0 ]; then
log "INFO" "返回主菜单。"
return 0 # 返回成功,表示正常退出选择
elif [ "$choice_pkg" -ge 1 ] && [ "$choice_pkg" -le "$num_packages" ]; then
local selected_pkg=${sorted_pkg_names[$((choice_pkg-1))]}
log "INFO" "选择更新包: $selected_pkg"
update_specific_package "$selected_pkg" # 调用更新函数
return $? # 返回更新函数的执行结果
else
log "ERROR" "无效的选择序号: $choice_pkg"
return 1
fi
}
#---------------主函数---------------#
main() {
# 0. 设置颜色变量
setup_colors
# 1. 初始化日志系统 (会进行第一次输出重定向)
init_logger || exit 1 # 初始化失败则退出
# 2. 检查运行环境和依赖
log "INFO" "检查运行环境..."
local dep_missing=false
if [ ! -f "Makefile" ] || [ ! -d "scripts" ] || [ ! -d ".git" ]; then
log "ERROR" "脚本必须在 OpenWrt 源码的根目录下运行 (需要存在 Makefile, scripts, .git)。"
dep_missing=true
fi
for cmd in git make nproc tee cut dirname mkdir rm git date printf sort read; do
if ! command -v "$cmd" &> /dev/null; then
log "ERROR" "缺少必要的系统命令: $cmd"
dep_missing=true
fi
done
if [ "$dep_missing" = true ]; then
log "ERROR" "环境或依赖检查失败,请修正后重试。"
# 恢复原始输出,避免后续可能的错误信息无法显示
exec >&$STDOUT_ORIG
exec 2>&$STDERR_ORIG
exit 1
fi
log "INFO" "环境检查通过。"
# 记录脚本启动信息
log "INFO" "${BOLD}OpenWrt 构建管理脚本已启动${NC}"
log "INFO" "PID: $$"
log "INFO" "会话日志目录: $SESSION_DIR"
# 3. 主菜单循环
local choice # 提前声明 choice
while true; do
print_menu # 显示菜单并获取输入到 choice 变量
log "DEBUG" "用户选择了: $choice" # 记录用户选择
# 根据选择执行操作
case $choice in
1) full_build ;;
2) clean_workspace ;;
3) update_all_components ;;
4) clean_packages ;;
5) build_firmware ;;
6) menuconfig ;;
7) update_custom_package ;;
8) select_specific_package ;;
9) update_source ;;
10) update_feeds ;;
0)
log "INFO" "收到退出命令,正在退出脚本..."
# 恢复原始输出流 (好习惯)
exec >&$STDOUT_ORIG
exec 2>&$STDERR_ORIG
echo -e "${GREEN}脚本已退出。${NC}"
exit 0
;;
*)
log "WARN" "无效的选项: '$choice',请输入 0 到 10 之间的数字。"
;;
esac
local last_exit_code=$? # 获取上一个命令的退出状态码
# 操作完成后暂停,给用户查看结果的时间
if [[ $choice != 0 ]]; then
if [ $last_exit_code -eq 0 ]; then
echo -e "\n${GREEN}操作 '$choice' 执行完成。${NC}"
else
echo -e "\n${RED}操作 '$choice' 执行时遇到错误 (退出码: $last_exit_code)。${NC}"
fi
echo -e "${YELLOW}按 Enter 键返回主菜单...${NC}"
read -r # 等待用户按回车
fi
done
}
#---------------脚本入口---------------#
# 将所有主逻辑放入 main 函数,并在最后调用它
# "$@" 将所有命令行参数传递给 main 函数 (虽然本脚本目前未使用)
main "$@"

View File

@@ -1,4 +1,9 @@
src-git packages https://git.openwrt.org/feed/packages.git^cf301cd92c4c501271cf6c1caf19eabef3ce0c09
src-git luci https://git.openwrt.org/project/luci.git^bdf1db5fb536b155d4b035f3bbf9590782e41cf7
src-git routing https://git.openwrt.org/feed/routing.git^e87b55c6a642947ad7e24cd5054a637df63d5dbe
src-git telephony https://git.openwrt.org/feed/telephony.git^fd605af7143165a2490681ec1752f259873b9147
src-git packages https://github.com/openwrt/packages.git;openwrt-24.10
src-git luci https://github.com/openwrt/luci.git;openwrt-24.10
src-git routing https://github.com/openwrt/routing.git;openwrt-24.10
src-git telephony https://github.com/openwrt/telephony.git;openwrt-24.10
#src-git video https://github.com/openwrt/video.git;openwrt-24.10
#src-git targets https://github.com/openwrt/targets.git
#src-git oldpackages http://git.openwrt.org/packages.git
#src-link custom /usr/src/openwrt/custom-feed
src-git-full luci_app_xray https://github.com/yichya/luci-app-xray

View File

@@ -1,30 +1,40 @@
BPF_DEPENDS := @HAS_BPF_TOOLCHAIN
LLVM_VER:=
BPF_DEPENDS := @HAS_BPF_TOOLCHAIN +@NEED_BPF_TOOLCHAIN
CLANG_MIN_VER:=12
ifneq ($(CONFIG_USE_LLVM_HOST),)
find-llvm-tool=$(firstword $(shell PATH='$(BPF_PATH)' command -v $(1) || echo '$(firstword $(1))-not-found'))
BPF_TOOLCHAIN_HOST_PATH:=$(call qstrip,$(CONFIG_BPF_TOOLCHAIN_HOST_PATH))
ifneq ($(BPF_TOOLCHAIN_HOST_PATH),)
BPF_PATH:=$(BPF_TOOLCHAIN_HOST_PATH)/bin:$(PATH)
else
BPF_PATH:=$(PATH)
endif
CLANG:=$(firstword $(shell PATH='$(BPF_PATH)' command -v clang clang-13 clang-12 clang-11))
CLANG:=$(call find-llvm-tool,clang clang-13 clang-12)
LLVM_VER:=$(subst clang,,$(notdir $(CLANG)))
endif
ifneq ($(CONFIG_USE_LLVM_PREBUILT),)
CLANG:=$(TOPDIR)/llvm-bpf/bin/clang
endif
ifneq ($(CONFIG_USE_LLVM_BUILD),)
CLANG:=$(STAGING_DIR_HOST)/llvm-bpf/bin/clang
endif
LLVM_PATH:=$(dir $(CLANG))
LLVM_LLC:=$(LLVM_PATH)/llc$(LLVM_VER)
LLVM_DIS:=$(LLVM_PATH)/llvm-dis$(LLVM_VER)
LLVM_OPT:=$(LLVM_PATH)/opt$(LLVM_VER)
LLVM_STRIP:=$(LLVM_PATH)/llvm-strip$(LLVM_VER)
BPF_PATH:=$(dir $(CLANG)):$(BPF_PATH)
LLVM_LLC:=$(call find-llvm-tool,llc$(LLVM_VER))
LLVM_DIS:=$(call find-llvm-tool,llvm-dis$(LLVM_VER))
LLVM_OPT:=$(call find-llvm-tool,opt$(LLVM_VER))
LLVM_STRIP:=$(call find-llvm-tool,llvm-strip$(LLVM_VER))
else
LLVM_PATH:=/invalid
ifneq ($(CONFIG_USE_LLVM_PREBUILT),)
LLVM_PATH:=$(TOPDIR)/llvm-bpf/bin
endif
ifneq ($(CONFIG_USE_LLVM_BUILD),)
LLVM_PATH:=$(STAGING_DIR_HOST)/llvm-bpf/bin
endif
CLANG:=$(LLVM_PATH)/clang
LLVM_LLC:=$(LLVM_PATH)/llc
LLVM_DIS:=$(LLVM_PATH)/llvm-dis
LLVM_OPT:=$(LLVM_PATH)/opt
LLVM_STRIP:=$(LLVM_PATH)/llvm-strip
endif
BPF_KARCH:=mips
BPF_ARCH:=mips$(if $(CONFIG_ARCH_64BIT),64)$(if $(CONFIG_BIG_ENDIAN),,el)

View File

@@ -732,6 +732,10 @@ define Build/zip
rm -rf $@.tmp
endef
define Build/zyimage
$(STAGING_DIR_HOST)/bin/zyimage $(1) $@
endef
define Build/zyxel-ras-image
let \
newsize="$(call exp_units,$(RAS_ROOTFS_SIZE))"; \

View File

@@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .73
LINUX_KERNEL_HASH-6.6.73 = d2028db190c201650898be8db1c705e9fe73ab44fc04290b4f7af63514122490
LINUX_VERSION-6.6 = .86
LINUX_KERNEL_HASH-6.6.86 = 49e3ad7423e40735faada0cd39665c071d47efd84ec3548acf119c9704f13e68

View File

@@ -85,7 +85,7 @@ endef
define Build/Compile/Optee-os
+$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) \
PATH=$(LINUX_DIR)/scripts/dtc/:$(PATH) \
PATH=$(LINUX_DIR)/scripts/dtc/:$(STAGING_DIR_HOST)/bin:$(PATH) \
CROSS_COMPILE=$(TARGET_CROSS) \
CROSS_COMPILE_core="$(TARGET_CROSS)" \
CROSS_COMPILE_ta_arm64="$(TARGET_CROSS)" \

View File

@@ -23,13 +23,13 @@ PKG_CONFIG_DEPENDS += \
sanitize = $(call tolower,$(subst _,-,$(subst $(space),-,$(1))))
VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10.0-rc7)
VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),24.10-SNAPSHOT)
VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r28417-daef29c75d)
VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/24.10.0-rc7)
VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/24.10-SNAPSHOT)
VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)

Submodule package/5G-Modem-Support added at da43e7a10e

View File

@@ -125,8 +125,8 @@ caldata_valid() {
caldata_patch_data() {
local data=$1
local data_count=$((${#1} / 2))
local data_offset=$(($2))
local chksum_offset=$(($3))
[ -n "$2" ] && local data_offset=$(($2))
[ -n "$3" ] && local chksum_offset=$(($3))
local target=$4
local fw_data
local fw_chksum

View File

@@ -190,7 +190,7 @@ if VERSIONOPT
config VERSION_REPO
string
prompt "Release repository"
default "https://downloads.openwrt.org/releases/24.10.0-rc7"
default "https://downloads.openwrt.org/releases/24.10-SNAPSHOT"
help
This is the repository address embedded in the image, it defaults
to the trunk snapshot repo; the url may contain the following placeholders:
@@ -266,7 +266,7 @@ if VERSIONOPT
config VERSION_CODE_FILENAMES
bool
prompt "Revision code in filenames"
default n
default y
help
Enable this to include the revision identifier or the configured
version code into the firmware image, SDK- and Image Builder archive

View File

@@ -34,10 +34,12 @@ ubootenv_add_ubi_default() {
case "$board" in
abt,asr3000|\
cmcc,a10-ubootmod|\
h3c,magic-nx30-pro|\
jcg,q30-pro|\
mercusys,mr90x-v1-ubi|\
netcore,n60|\
netis,nx31|\
nokia,ea0326gmp|\
qihoo,360t7|\
routerich,ax3000-ubootmod|\
@@ -57,7 +59,8 @@ acer,vero-w6m|\
glinet,gl-mt2500|\
glinet,gl-mt6000|\
glinet,gl-x3000|\
glinet,gl-xe3000)
glinet,gl-xe3000|\
huasifei,wh3000)
local envdev=$(find_mmc_part "u-boot-env")
ubootenv_add_uci_config "$envdev" "0x0" "0x80000"
;;

View File

@@ -37,6 +37,11 @@ linksys,mx8500)
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
;;
linksys,mx4300)
idx="$(find_mtd_index u_env)"
[ -n "$idx" ] && \
ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x40000" "1"
;;
netgear,sxr80|\
netgear,sxs80|\
tplink,eap660hd-v1)

View File

@@ -19,6 +19,7 @@ alfa-network,r36m-e4g|\
alfa-network,tube-e4g|\
engenius,epg600|\
engenius,esr600h|\
hongdian,h8922-v30|\
linksys,re7000|\
meig,slt866|\
sitecom,wlr-4100-v1-002|\
@@ -147,7 +148,8 @@ xiaomi,mi-router-cr6608|\
xiaomi,mi-router-cr6609)
ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x10000" "0x20000"
;;
dna,valokuitu-plus-ex400)
dna,valokuitu-plus-ex400|\
genexis,pulse-ex400)
ubootenv_add_uci_config "/dev/ubi0_0" "0x0" "0x1f000" "0x1f000" "1"
ubootenv_add_uci_config "/dev/ubi0_1" "0x0" "0x1f000" "0x1f000" "1"
;;

View File

@@ -28,6 +28,7 @@ zyxel,gs1900-10hp|\
zyxel,gs1900-16|\
zyxel,gs1900-24-v1|\
zyxel,gs1900-24e|\
zyxel,gs1900-24ep|\
zyxel,gs1900-24hp-v1|\
zyxel,gs1900-24hp-v2)
idx="$(find_mtd_index u-boot-env)"

View File

@@ -231,6 +231,18 @@ define U-Boot/mt7981_abt_asr3000
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
endef
define U-Boot/mt7981_cmcc_a10
NAME:=CMCC A10
BUILD_SUBTARGET:=filogic
BUILD_DEVICES:=cmcc_a10-ubootmod
UBOOT_CONFIG:=mt7981_cmcc_a10
UBOOT_IMAGE:=u-boot.fip
BL2_BOOTDEV:=spim-nand
BL2_SOC:=mt7981
BL2_DDRTYPE:=ddr3
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
endef
define U-Boot/mt7981_cmcc_rax3000m-emmc
NAME:=CMCC RAX3000M
BUILD_SUBTARGET:=filogic
@@ -303,6 +315,18 @@ define U-Boot/mt7981_jcg_q30-pro
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
endef
define U-Boot/mt7981_netis_nx31
NAME:=netis NX31
BUILD_SUBTARGET:=filogic
BUILD_DEVICES:=netis_nx31
UBOOT_CONFIG:=mt7981_netis_nx31
UBOOT_IMAGE:=u-boot.fip
BL2_BOOTDEV:=spim-nand
BL2_SOC:=mt7981
BL2_DDRTYPE:=ddr3
DEPENDS:=+trusted-firmware-a-mt7981-spim-nand-ddr3
endef
define U-Boot/mt7981_nokia_ea0326gmp
NAME:=Nokia EA0326GMP
BUILD_SUBTARGET:=filogic
@@ -832,6 +856,7 @@ UBOOT_TARGETS := \
mt7628_ravpower_rp-wd009 \
mt7629_rfb \
mt7981_abt_asr3000 \
mt7981_cmcc_a10 \
mt7981_cmcc_rax3000m-emmc \
mt7981_cmcc_rax3000m-nand \
mt7981_gatonetworks_gdsp \
@@ -839,6 +864,7 @@ UBOOT_TARGETS := \
mt7981_glinet_gl-xe3000 \
mt7981_h3c_magic-nx30-pro \
mt7981_jcg_q30-pro \
mt7981_netis_nx31 \
mt7981_nokia_ea0326gmp \
mt7981_openwrt_one-snand \
mt7981_openwrt_one-nor \

View File

@@ -187,13 +187,12 @@
leds {
compatible = "gpio-leds";
@@ -109,6 +122,19 @@
@@ -109,6 +122,18 @@
};
};
+ key_pins_a: keys-alt {
+ mux {
+ function = "gpio";
+ groups = "msdc3";
+ };
+

View File

@@ -0,0 +1,334 @@
--- /dev/null
+++ b/configs/mt7981_netis_nx31_defconfig
@@ -0,0 +1,106 @@
+CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_MEDIATEK=y
+CONFIG_TEXT_BASE=0x41e00000
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-netis_nx31"
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_TARGET_MT7981=y
+CONFIG_SYS_LOAD_ADDR=0x46000000
+CONFIG_PRE_CON_BUF_ADDR=0x4007ef00
+CONFIG_DEBUG_UART_BASE=0x11002000
+CONFIG_DEBUG_UART_CLOCK=40000000
+CONFIG_DEBUG_UART=y
+CONFIG_FIT=y
+CONFIG_BOOTDELAY=30
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_MENU_SHOW=y
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-netis_nx31.dtb"
+CONFIG_LOGLEVEL=7
+CONFIG_PRE_CONSOLE_BUFFER=y
+CONFIG_LOG=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_SMC=y
+CONFIG_CMD_UBI=y
+CONFIG_CMD_UBI_RENAME=y
+CONFIG_OF_EMBED=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_UBI=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_UBI_PART="ubi"
+CONFIG_ENV_UBI_VOLUME="ubootenv"
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_USE_DEFAULT_ENV_FILE=y
+CONFIG_DEFAULT_ENV_FILE="defenvs/netis_nx31_env"
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_VERSION_VARIABLE=y
+CONFIG_NETCONSOLE=y
+CONFIG_USE_IPADDR=y
+CONFIG_IPADDR="192.168.1.1"
+CONFIG_USE_SERVERIP=y
+CONFIG_SERVERIP="192.168.1.254"
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
+CONFIG_CLK=y
+CONFIG_GPIO_HOG=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+# CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_DM_MTD=y
+CONFIG_MTD_SPI_NAND=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_PHY_FIXED=y
+CONFIG_MEDIATEK_ETH=y
+CONFIG_PHY=y
+CONFIG_PHY_MTK_TPHY=y
+CONFIG_PINCTRL=y
+CONFIG_PINCONF=y
+CONFIG_PINCTRL_MT7981=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_MTK_POWER_DOMAIN=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_RAM=y
+CONFIG_DM_SERIAL=y
+CONFIG_SERIAL_RX_BUFFER=y
+CONFIG_MTK_SERIAL=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_MTK_SPIM=y
+CONFIG_ZSTD=y
+CONFIG_HEXDUMP=y
--- /dev/null
+++ b/arch/arm/dts/mt7981-netis_nx31.dts
@@ -0,0 +1,162 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2025
+ * Author: Mikhail Zhilkin <csharper2005@gmail.com>
+ */
+
+/dts-v1/;
+#include "mt7981.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ model = "netis NX31";
+ compatible = "netis,nx31", "mediatek,mt7981";
+
+ chosen {
+ stdout-path = &uart0;
+ tick-timer = &timer0;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0x40000000 0x10000000>;
+ };
+
+ keys {
+ compatible = "gpio-keys";
+
+ button-0 {
+ label = "mesh";
+ linux,code = <BTN_0>;
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+ };
+
+ button-1 {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ label = "blue:wlan2g";
+ gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
+ };
+
+ led-1 {
+ label = "blue:status";
+ gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
+ };
+
+ led-2 {
+ label = "blue:wan";
+ gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
+ };
+
+ led-3 {
+ label = "blue:wlan5g";
+ gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
+
+&uart0 {
+ mediatek,force-highspeed;
+ status = "okay";
+};
+
+&eth {
+ status = "okay";
+ mediatek,gmac-id = <0>;
+ phy-mode = "2500base-x";
+ mediatek,switch = "mt7531";
+ reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
+
+ fixed-link {
+ speed = <2500>;
+ full-duplex;
+ };
+};
+
+&pinctrl {
+ spi_flash_pins: spi0-pins-func-1 {
+ mux {
+ function = "flash";
+ groups = "spi0", "spi0_wp_hold";
+ };
+
+ conf-pu {
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+ };
+
+ conf-pd {
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+ };
+ };
+};
+
+&spi0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_flash_pins>;
+ status = "okay";
+ must_tx;
+ enhance_timing;
+ dma_ext;
+ ipm_design;
+ support_quad;
+ tick_dly = <2>;
+ sample_sel = <0>;
+
+ spi_nand@0 {
+ compatible = "spi-nand";
+ reg = <0>;
+ spi-max-frequency = <52000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "BL2";
+ reg = <0x0 0x100000>;
+ };
+
+ partition@100000 {
+ label = "u-boot-env (unused)";
+ reg = <0x100000 0x80000>;
+ };
+
+ partition@160000 {
+ label = "Factory";
+ reg = <0x180000 0x200000>;
+ };
+
+ partition@380000 {
+ label = "FIP";
+ reg = <0x380000 0x200000>;
+ };
+
+ partition@580000 {
+ label = "ubi";
+ reg = <0x580000 0x7a80000>;
+ };
+ };
+ };
+};
+
+&watchdog {
+ status = "disabled";
+};
--- /dev/null
+++ b/defenvs/netis_nx31_env
@@ -0,0 +1,57 @@
+ipaddr=192.168.1.1
+serverip=192.168.1.254
+loadaddr=0x46000000
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
+bootcmd=run check_buttons ; if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
+bootconf=config-1
+bootdelay=0
+bootfile=openwrt-mediatek-filogic-netis_nx31-initramfs-recovery.itb
+bootfile_bl2=openwrt-mediatek-filogic-netis_nx31-preloader.bin
+bootfile_fip=openwrt-mediatek-filogic-netis_nx31-bl31-uboot.fip
+bootfile_upg=openwrt-mediatek-filogic-netis_nx31-squashfs-sysupgrade.itb
+bootled_status=blue:status
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
+bootmenu_default=0
+bootmenu_delay=0
+bootmenu_title= ( ( ( OpenWrt ) ) )
+bootmenu_0=Initialize environment.=run _firstboot
+bootmenu_0d=Run default boot command.=run boot_default
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
+bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return
+bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
+bootmenu_8=Reboot.=reset
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
+boot_first=if button reset ; then led $bootled_status on ; run boot_default ; fi ; bootmenu
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
+boot_production=led $bootled_status on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led bootled_status off
+boot_recovery=led $bootled_status on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led bootled_status off
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
+boot_tftp_forever=led $bootled_status on ; while true ; do run boot_tftp ; sleep 1 ; done
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
+check_buttons=if button reset ; then run boot_tftp ; fi
+ethaddr_factory=mtd read Factory 0x40080000 0x1e0000 0x20000 && env readmem -b ethaddr 0x4009ef20 0x6 ; setenv ethaddr_factory
+part_default=production
+part_recovery=recovery
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
+mtd_write_fip=mtd erase FIP && mtd write FIP $loadaddr
+mtd_write_bl2=mtd erase BL2 && mtd write BL2 $loadaddr
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
+_firstboot=setenv _firstboot ; run ethaddr_factory ; run _switch_to_menu ; run _init_env ; run boot_first
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver"

View File

@@ -0,0 +1,327 @@
--- /dev/null
+++ b/configs/mt7981_cmcc_a10_defconfig
@@ -0,0 +1,107 @@
+CONFIG_ARM=y
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
+CONFIG_POSITION_INDEPENDENT=y
+CONFIG_ARCH_MEDIATEK=y
+CONFIG_TEXT_BASE=0x41e00000
+CONFIG_SYS_MALLOC_F_LEN=0x4000
+CONFIG_NR_DRAM_BANKS=1
+CONFIG_DEFAULT_DEVICE_TREE="mt7981-cmcc-a10"
+CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_TARGET_MT7981=y
+CONFIG_PRE_CON_BUF_ADDR=0x4007EF00
+CONFIG_DEBUG_UART_BASE=0x11002000
+CONFIG_DEBUG_UART_CLOCK=40000000
+CONFIG_SYS_LOAD_ADDR=0x46000000
+CONFIG_DEBUG_UART=y
+CONFIG_FIT=y
+CONFIG_BOOTDELAY=30
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_MENU_SHOW=y
+CONFIG_DEFAULT_FDT_FILE="mediatek/mt7981-cmcc-a10.dtb"
+CONFIG_LOGLEVEL=7
+CONFIG_PRE_CONSOLE_BUFFER=y
+CONFIG_LOG=y
+CONFIG_BOARD_LATE_INIT=y
+CONFIG_HUSH_PARSER=y
+CONFIG_SYS_PROMPT="MT7981> "
+CONFIG_CMD_CPU=y
+CONFIG_CMD_LICENSE=y
+CONFIG_CMD_BOOTMENU=y
+CONFIG_CMD_ASKENV=y
+CONFIG_CMD_ERASEENV=y
+CONFIG_CMD_ENV_FLAGS=y
+CONFIG_CMD_STRINGS=y
+CONFIG_CMD_DM=y
+CONFIG_CMD_GPIO=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_MTD=y
+CONFIG_CMD_PART=y
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_TFTPSRV=y
+CONFIG_CMD_RARP=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_CDP=y
+CONFIG_CMD_SNTP=y
+CONFIG_CMD_DNS=y
+CONFIG_CMD_LINK_LOCAL=y
+CONFIG_CMD_PXE=y
+CONFIG_CMD_CACHE=y
+CONFIG_CMD_PSTORE=y
+CONFIG_CMD_PSTORE_MEM_ADDR=0x42ff0000
+CONFIG_CMD_UUID=y
+CONFIG_CMD_HASH=y
+CONFIG_CMD_SMC=y
+CONFIG_CMD_UBI=y
+CONFIG_CMD_UBI_RENAME=y
+CONFIG_OF_EMBED=y
+CONFIG_ENV_OVERWRITE=y
+CONFIG_ENV_IS_IN_UBI=y
+CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
+CONFIG_ENV_UBI_PART="ubi"
+CONFIG_ENV_UBI_VOLUME="ubootenv"
+CONFIG_ENV_UBI_VOLUME_REDUND="ubootenv2"
+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
+CONFIG_USE_DEFAULT_ENV_FILE=y
+CONFIG_DEFAULT_ENV_FILE="cmcc_a10_env"
+CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
+CONFIG_VERSION_VARIABLE=y
+CONFIG_NET_RANDOM_ETHADDR=y
+CONFIG_NETCONSOLE=y
+CONFIG_USE_IPADDR=y
+CONFIG_IPADDR="192.168.1.1"
+CONFIG_USE_SERVERIP=y
+CONFIG_SERVERIP="192.168.1.254"
+CONFIG_REGMAP=y
+CONFIG_SYSCON=y
+CONFIG_BUTTON=y
+CONFIG_BUTTON_GPIO=y
+CONFIG_CLK=y
+CONFIG_GPIO_HOG=y
+CONFIG_LED=y
+CONFIG_LED_BLINK=y
+CONFIG_LED_GPIO=y
+# CONFIG_MMC is not set
+CONFIG_MTD=y
+CONFIG_DM_MTD=y
+CONFIG_MTD_SPI_NAND=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_PHY_FIXED=y
+CONFIG_MEDIATEK_ETH=y
+CONFIG_PHY=y
+CONFIG_PINCTRL=y
+CONFIG_PINCONF=y
+CONFIG_PINCTRL_MT7981=y
+CONFIG_POWER_DOMAIN=y
+CONFIG_MTK_POWER_DOMAIN=y
+CONFIG_DM_REGULATOR=y
+CONFIG_DM_REGULATOR_FIXED=y
+CONFIG_DM_REGULATOR_GPIO=y
+CONFIG_RAM=y
+CONFIG_DM_SERIAL=y
+CONFIG_MTK_SERIAL=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_MTK_SPIM=y
+CONFIG_ZSTD=y
+CONFIG_HEXDUMP=y
+CONFIG_LMB_MAX_REGIONS=64
--- /dev/null
+++ b/arch/arm/dts/mt7981-cmcc-a10.dts
@@ -0,0 +1,157 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+/dts-v1/;
+#include "mt7981.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/linux-event-codes.h>
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ model = "CMCC A10";
+ compatible = "mediatek,mt7981", "mediatek,mt7981-rfb";
+
+ chosen {
+ stdout-path = &uart0;
+ tick-timer = &timer0;
+ };
+
+ memory@40000000 {
+ device_type = "memory";
+ reg = <0x40000000 0x10000000>;
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ button-reset {
+ label = "reset";
+ linux,code = <KEY_RESTART>;
+ gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
+ };
+
+ button-wps {
+ label = "wps";
+ linux,code = <KEY_WPS_BUTTON>;
+ gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
+ };
+ };
+
+ gpio-leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ label = "blue:status";
+ gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+
+ running_led: led-1 {
+ label = "green:status";
+ gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
+ default-state = "off";
+ };
+
+ boot_led: led-2 {
+ label = "red:status";
+ gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+ default-state = "on";
+ };
+ };
+};
+
+&eth {
+ status = "okay";
+ mediatek,gmac-id = <0>;
+ phy-mode = "2500base-x";
+ mediatek,switch = "mt7531";
+ reset-gpios = <&gpio 39 GPIO_ACTIVE_HIGH>;
+
+ fixed-link {
+ speed = <2500>;
+ full-duplex;
+ };
+};
+
+&pinctrl {
+ spi_flash_pins: spi0-pins-func-1 {
+ mux {
+ function = "flash";
+ groups = "spi0", "spi0_wp_hold";
+ };
+
+ conf-pu {
+ pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-up = <MTK_PUPD_SET_R1R0_00>;
+ };
+
+ conf-pd {
+ pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+ drive-strength = <MTK_DRIVE_8mA>;
+ bias-pull-down = <MTK_PUPD_SET_R1R0_00>;
+ };
+ };
+};
+
+&spi0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&spi_flash_pins>;
+ status = "okay";
+ must_tx;
+ enhance_timing;
+ dma_ext;
+ ipm_design;
+ support_quad;
+ tick_dly = <2>;
+ sample_sel = <0>;
+
+ spi_nand@0 {
+ compatible = "spi-nand";
+ reg = <0>;
+ spi-max-frequency = <52000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ partition@0 {
+ label = "bl2";
+ reg = <0x0 0x100000>;
+ };
+
+ partition@100000 {
+ label = "u-boot-env";
+ reg = <0x100000 0x80000>;
+ };
+
+ partition@180000 {
+ label = "factory";
+ reg = <0x180000 0x200000>;
+ };
+
+ partition@380000 {
+ label = "fip";
+ reg = <0x380000 0x200000>;
+ };
+
+ partition@580000 {
+ label = "ubi";
+ reg = <0x580000 0x7a80000>;
+ compatible = "linux,ubi";
+ };
+ };
+ };
+};
+
+&uart0 {
+ mediatek,force-highspeed;
+ status = "okay";
+};
+
+&watchdog {
+ status = "disabled";
+};
--- /dev/null
+++ b/cmcc_a10_env
@@ -0,0 +1,54 @@
+ipaddr=192.168.1.1
+serverip=192.168.1.254
+loadaddr=0x46000000
+console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
+bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
+bootconf=config-1
+bootdelay=0
+bootfile=openwrt-mediatek-filogic-cmcc_a10-ubootmod-initramfs-recovery.itb
+bootfile_bl2=openwrt-mediatek-filogic-cmcc_a10-ubootmod-preloader.bin
+bootfile_fip=openwrt-mediatek-filogic-cmcc_a10-ubootmod-bl31-uboot.fip
+bootfile_upg=openwrt-mediatek-filogic-cmcc_a10-ubootmod-squashfs-sysupgrade.itb
+bootled_pwr=red:status
+bootled_rec=blue:status
+bootmenu_confirm_return=askenv - Press ENTER to return to menu ; bootmenu 60
+bootmenu_default=0
+bootmenu_delay=0
+bootmenu_title= ( ( ( OpenWrt ) ) )
+bootmenu_0=Initialize environment.=run _firstboot
+bootmenu_0d=Run default boot command.=run boot_default
+bootmenu_1=Boot system via TFTP.=run boot_tftp ; run bootmenu_confirm_return
+bootmenu_2=Boot production system from NAND.=run boot_production ; run bootmenu_confirm_return
+bootmenu_3=Boot recovery system from NAND.=run boot_recovery ; run bootmenu_confirm_return
+bootmenu_4=Load production system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_production ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
+bootmenu_5=Load recovery system via TFTP then write to NAND.=setenv noboot 1 ; setenv replacevol 1 ; run boot_tftp_recovery ; setenv noboot ; setenv replacevol ; run bootmenu_confirm_return
+bootmenu_6=Load BL31+U-Boot FIP via TFTP then write to NAND.=run boot_tftp_write_fip ; run bootmenu_confirm_return
+bootmenu_7=Load BL2 preloader via TFTP then write to NAND.=run boot_tftp_write_bl2 ; run bootmenu_confirm_return
+bootmenu_8=Reboot.=reset
+bootmenu_9=Reset all settings to factory defaults.=run reset_factory ; reset
+boot_first=if button reset ; then led $bootled_rec on ; run boot_tftp_recovery ; setenv flag_recover 1 ; run boot_default ; fi ; bootmenu
+boot_default=if env exists flag_recover ; then else run bootcmd ; fi ; run boot_recovery ; setenv replacevol 1 ; run boot_tftp_forever
+boot_production=led $bootled_pwr on ; run ubi_read_production && bootm $loadaddr#$bootconf ; led $bootled_pwr off
+boot_recovery=led $bootled_rec on ; run ubi_read_recovery && bootm $loadaddr#$bootconf ; led $bootled_rec off
+boot_ubi=run boot_production ; run boot_recovery ; run boot_tftp_forever
+boot_tftp_forever=led $bootled_rec on ; while true ; do run boot_tftp_recovery ; sleep 1 ; done
+boot_tftp_production=tftpboot $loadaddr $bootfile_upg && env exists replacevol && iminfo $loadaddr && run ubi_write_production ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
+boot_tftp_recovery=tftpboot $loadaddr $bootfile && env exists replacevol && iminfo $loadaddr && run ubi_write_recovery ; if env exists noboot ; then else bootm $loadaddr#$bootconf ; fi
+boot_tftp=tftpboot $loadaddr $bootfile && bootm $loadaddr#$bootconf
+boot_tftp_write_fip=tftpboot $loadaddr $bootfile_fip && run mtd_write_fip && run reset_factory
+boot_tftp_write_bl2=tftpboot $loadaddr $bootfile_bl2 && run mtd_write_bl2
+reset_factory=ubi part ubi ; mw $loadaddr 0x0 0x800 ; ubi write $loadaddr ubootenv 0x800 ; ubi write $loadaddr ubootenv2 0x800
+mtd_write_fip=mtd erase fip && mtd write fip $loadaddr
+mtd_write_bl2=mtd erase bl2 && mtd write bl2 $loadaddr
+ubi_create_env=ubi check ubootenv || ubi create ubootenv 0x100000 dynamic || run ubi_format ; ubi check ubootenv2 || ubi create ubootenv2 0x100000 dynamic || run ubi_format
+ubi_format=ubi detach ; mtd erase ubi && ubi part ubi ; reset
+ubi_prepare_rootfs=if ubi check rootfs_data ; then else if env exists rootfs_data_max ; then ubi create rootfs_data $rootfs_data_max dynamic || ubi create rootfs_data - dynamic ; else ubi create rootfs_data - dynamic ; fi ; fi
+ubi_read_production=ubi read $loadaddr fit && iminfo $loadaddr && run ubi_prepare_rootfs
+ubi_read_recovery=ubi check recovery && ubi read $loadaddr recovery
+ubi_remove_rootfs=ubi check rootfs_data && ubi remove rootfs_data
+ubi_write_production=ubi check fit && ubi remove fit ; run ubi_remove_rootfs ; ubi create fit $filesize dynamic && ubi write $loadaddr fit $filesize
+ubi_write_recovery=ubi check recovery && ubi remove recovery ; run ubi_remove_rootfs ; ubi create recovery $filesize dynamic && ubi write $loadaddr recovery $filesize
+_init_env=setenv _init_env ; run ubi_create_env ; saveenv ; saveenv
+_firstboot=setenv _firstboot ; run _switch_to_menu ; run _init_env ; run boot_first
+_switch_to_menu=setenv _switch_to_menu ; setenv bootdelay 3 ; setenv bootmenu_delay 3 ; setenv bootmenu_0 $bootmenu_0d ; setenv bootmenu_0d ; run _bootmenu_update_title
+_bootmenu_update_title=setenv _bootmenu_update_title ; setenv bootmenu_title "$bootmenu_title $ver"

View File

@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=intel-microcode
PKG_VERSION:=20240531
PKG_VERSION:=20250211
PKG_RELEASE:=1
PKG_SOURCE:=intel-microcode_3.$(PKG_VERSION).1.tar.xz
PKG_SOURCE_URL:=@DEBIAN/pool/non-free-firmware/i/intel-microcode/
PKG_HASH:=808cbb57a790dab7060b59b31e70e54ac47d3798d75e9784ed57a65b9f951fc4
PKG_HASH:=06b7aca49790d673623cb42f7a62a517d82555ce96371d2967b568d6e30fd787
PKG_BUILD_DIR:=$(BUILD_DIR)/intel-microcode-3.$(PKG_VERSION).1
PKG_CPE_ID:=cpe:/a:intel:microcode

1
package/firmware/mt76 Submodule

Submodule package/firmware/mt76 added at de635e1e3a

View File

@@ -1,14 +1,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=wireless-regdb
PKG_VERSION:=2024.10.07
PKG_VERSION:=2025.02.20
PKG_RELEASE:=1
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/
PKG_HASH:=f76f2bd79a653e9f9dd50548d99d03a4a4eb157da056dfd5892f403ec28fb3d5
PKG_HASH:=57f8e7721cf5a880c13ae0c202edbb21092a060d45f9e9c59bcd2a8272bfa456
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>

View File

@@ -1,60 +0,0 @@
From 630df9786fdaeb78c21f1e28c9b70ac83a1b482c Mon Sep 17 00:00:00 2001
From: Vincent Tremblay <vincent@vtremblay.dev>
Date: Sat, 31 Dec 2022 09:24:00 -0500
Subject: [PATCH] ath10k: read qcom,coexist-support as a u32
Read qcom,coexist-support as a u32 instead of a u8
When we set the property to <1> in the DT (as specified in the doc),
"of_property_read_u8" read 0 instead of 1. This is because of the data format.
By default <1> is written with 32 bits.
The problem is that the driver is trying to read a u8.
The difference can be visualized using hexdump in a running device:
Default 32 bits output:
=======================
0000000 0000 0100
0000004
8 bits output:
==============
0000000 0001
0000001
By changing "of_property_read_u8" by "of_property_read_u32", the driver
is aligned with the documentation and is able to read the value without
modifying the DT.
The other solution would be to force the value in the DT to be saved as
an 8 bits value (qcom,coexist-support = /bits/ 8 <1>),
which is against the doc and less intuitive.
Validation:
===========
The patch was tested on a real device and we can see in the debug logs
that the feature is properly initialized:
[ 109.102097] ath10k_ahb a000000.wifi: boot coex_support 1 coex_gpio_pin 52
Signed-off-by: Vincent Tremblay <vincent@vtremblay.dev>
--- a/ath10k-6.10/core.c
+++ b/ath10k-6.10/core.c
@@ -2871,14 +2871,14 @@ done:
static void ath10k_core_fetch_btcoex_dt(struct ath10k *ar)
{
struct device_node *node;
- u8 coex_support = 0;
+ u32 coex_support = 0;
int ret;
node = ar->dev->of_node;
if (!node)
goto out;
- ret = of_property_read_u8(node, "qcom,coexist-support", &coex_support);
+ ret = of_property_read_u32(node, "qcom,coexist-support", &coex_support);
if (ret) {
ar->coex_support = true;
goto out;

View File

@@ -0,0 +1,34 @@
From: Shiji Yang <yangshiji66@outlook.com>
Date: Fri, 28 Mar 2025 20:26:04 +0800
Subject: [PATCH] ath10k-ct: silence warning caused by unsupported retry_limit
value
Some retry_limit values are not supported by ath10k wave2 chips.
We can just skip config it for these chips. And it's safe to
return 0 in this case because the hardware is still working.
Suggested-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
---
ath10k-6.14/mac.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/ath10k-6.10/mac.c
+++ b/ath10k-6.10/mac.c
@@ -5395,7 +5395,7 @@ static int ath10k_config_retry_limit(str
*/
ath10k_warn(ar, "Firmware lacks feature flag indicating a retry limit of > 2 is OK, requested limit: %d\n",
limit);
- return -EINVAL;
+ goto skip_retry_limit;
}
list_for_each_entry(arvif, &ar->arvifs, list) {
@@ -5406,6 +5406,7 @@ static int ath10k_config_retry_limit(str
}
}
+skip_retry_limit:
return ret;
}

View File

@@ -0,0 +1,31 @@
From: Shiji Yang <yangshiji66@outlook.com>
Date: Fri, 28 Mar 2025 21:02:27 +0800
Subject: [PATCH] ath10k-ct: silence noisy log caused by flushing queue
.flush() is a regular mac80211 operation aims to clear all pending
frames from the hardware queue. Only developers need to care about it.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
---
ath10k-6.14/mac.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/ath10k-6.10/mac.c
+++ b/ath10k-6.10/mac.c
@@ -9061,12 +9061,12 @@ static void ath10k_flush(struct ieee8021
if (vif) {
arvif = (void *)vif->drv_priv;
vid = arvif->vdev_id;
- ath10k_info(ar, "mac flush vdev %d drop %d queues 0x%x ar->paused: 0x%lx arvif->paused: 0x%lx\n",
- arvif->vdev_id, drop, queues, ar->tx_paused, arvif->tx_paused);
+ ath10k_dbg(ar, ATH10K_DBG_MAC, "mac flush vdev %d drop %d queues 0x%x ar->paused: 0x%lx arvif->paused: 0x%lx\n",
+ arvif->vdev_id, drop, queues, ar->tx_paused, arvif->tx_paused);
}
else {
- ath10k_info(ar, "mac flush null vif, drop %d queues 0x%x\n",
- drop, queues);
+ ath10k_dbg(ar, ATH10K_DBG_MAC, "mac flush null vif, drop %d queues 0x%x\n",
+ drop, queues);
}

View File

@@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
--- a/ath10k-6.10/mac.c
+++ b/ath10k-6.10/mac.c
@@ -11316,7 +11316,6 @@ int ath10k_mac_register(struct ath10k *a
@@ -11317,7 +11317,6 @@ int ath10k_mac_register(struct ath10k *a
ieee80211_hw_set(ar->hw, CHANCTX_STA_CSA);
ieee80211_hw_set(ar->hw, QUEUE_CONTROL);
ieee80211_hw_set(ar->hw, SUPPORTS_TX_FRAG);

View File

@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=bcm27xx-gpu-fw
PKG_VERSION:=2024.11.26
PKG_VERSION:=2025.03.05
PKG_VERSION_REAL:=1.$(subst .,,$(PKG_VERSION))
PKG_RELEASE:=1
PKG_SOURCE:=raspi-firmware_$(PKG_VERSION_REAL).orig.tar.xz
PKG_SOURCE_URL:=https://github.com/raspberrypi/firmware/releases/download/$(PKG_VERSION_REAL)
PKG_HASH:=020dbcdbb30af5942a62fc3eb355449aba45276b67e864dee2522ff53fd936e6
PKG_HASH:=f697079cd15389c0d8650283eb911c53a64b22550138704eb50e1145e8330b03
PKG_FLAGS:=nonshared

View File

@@ -6,9 +6,9 @@ PKG_RELEASE:=1
PKG_SOURCE_URL:=https://github.com/openwrt/bcm63xx-cfe.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2024-06-25
PKG_SOURCE_VERSION:=6519bd2dde3535cafeea43157755f4dbef2f90c5
PKG_MIRROR_HASH:=db4da580b7a611a2b4ddd4ff812e5f8ddfd9694b6f5fd8246a341e61967c00ef
PKG_SOURCE_DATE:=2025-04-02
PKG_SOURCE_VERSION:=b8128fa4bdcdaf97549138965b00d5d7ceb7bb0f
PKG_MIRROR_HASH:=d33fad4fb5f4419bb287f3c3df6cceabab01fc7852c24cf29a15befa38cc0d45
PKG_FLAGS:=nonshared

View File

@@ -976,7 +976,7 @@ define KernelPackage/r8169
CONFIG_R8169 \
CONFIG_R8169_LEDS=y
FILES:=$(LINUX_DIR)/drivers/net/ethernet/realtek/r8169.ko
AUTOLOAD:=$(call AutoProbe,r8169)
AUTOLOAD:=$(call AutoProbe,r8169,1)
endef
define KernelPackage/r8169/description
@@ -1098,7 +1098,6 @@ define KernelPackage/ixgbe
TITLE:=Intel(R) 82598/82599 PCI-Express 10 Gigabit Ethernet support
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy +kmod-mdio-devres
KCONFIG:=CONFIG_IXGBE \
CONFIG_IXGBE_VXLAN=n \
CONFIG_IXGBE_HWMON=y \
CONFIG_IXGBE_DCA=n
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ixgbe/ixgbe.ko
@@ -1117,7 +1116,6 @@ define KernelPackage/ixgbevf
TITLE:=Intel(R) 82599 Virtual Function Ethernet support
DEPENDS:=@PCI_SUPPORT +kmod-ixgbe
KCONFIG:=CONFIG_IXGBEVF \
CONFIG_IXGBE_VXLAN=n \
CONFIG_IXGBE_HWMON=y \
CONFIG_IXGBE_DCA=n
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/ixgbevf/ixgbevf.ko
@@ -1134,10 +1132,8 @@ $(eval $(call KernelPackage,ixgbevf))
define KernelPackage/i40e
SUBMENU:=$(NETWORK_DEVICES_MENU)
TITLE:=Intel(R) Ethernet Controller XL710 Family support
DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-ptp +kmod-hwmon-core +kmod-libphy
DEPENDS:=@PCI_SUPPORT +kmod-ptp
KCONFIG:=CONFIG_I40E \
CONFIG_I40E_VXLAN=n \
CONFIG_I40E_HWMON=y \
CONFIG_I40E_DCA=n
FILES:=$(LINUX_DIR)/drivers/net/ethernet/intel/i40e/i40e.ko
AUTOLOAD:=$(call AutoProbe,i40e)

View File

@@ -0,0 +1,91 @@
wifi: ath11k: Fix DMA buffer allocation to resolve SWIOTLB issues
Currently, the driver allocates cacheable DMA buffers for rings like
HAL_REO_DST and HAL_WBM2SW_RELEASE. The buffers for HAL_WBM2SW_RELEASE
are large (1024 KiB), exceeding the SWIOTLB slot size of 256 KiB. This
leads to "swiotlb buffer is full" error messages on systems without an
IOMMU that use SWIOTLB, causing driver initialization failures. The driver
calls dma_map_single() with these large buffers obtained from kzalloc(),
resulting in ring initialization errors on systems without an IOMMU that
use SWIOTLB.
To address these issues, replace the flawed buffer allocation mechanism
with the appropriate DMA API. Specifically, use dma_alloc_noncoherent()
for cacheable DMA buffers, ensuring proper freeing of buffers with
dma_free_noncoherent().
Error log:
[ 10.194343] ath11k_pci 0000:04:00.0: swiotlb buffer is full (sz:1048583 bytes), total 32768 (slots), used 2529 (slots)
[ 10.194406] ath11k_pci 0000:04:00.0: failed to set up tcl_comp ring (0) :-12
[ 10.194781] ath11k_pci 0000:04:00.0: failed to init DP: -12
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Reported-by: Tim Harvey <tharvey@gateworks.com>
Closes: https://lore.kernel.org/all/20241210041133.GA17116@lst.de/
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
Tested-by: Tim Harvey <tharvey@gateworks.com>
Link: https://patch.msgid.link/20250119164219.647059-2-quic_ppranees@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
--- a/drivers/net/wireless/ath/ath11k/dp.c
+++ b/drivers/net/wireless/ath/ath11k/dp.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <crypto/hash.h>
@@ -104,14 +104,12 @@ void ath11k_dp_srng_cleanup(struct ath11
if (!ring->vaddr_unaligned)
return;
- if (ring->cached) {
- dma_unmap_single(ab->dev, ring->paddr_unaligned, ring->size,
- DMA_FROM_DEVICE);
- kfree(ring->vaddr_unaligned);
- } else {
+ if (ring->cached)
+ dma_free_noncoherent(ab->dev, ring->size, ring->vaddr_unaligned,
+ ring->paddr_unaligned, DMA_FROM_DEVICE);
+ else
dma_free_coherent(ab->dev, ring->size, ring->vaddr_unaligned,
ring->paddr_unaligned);
- }
ring->vaddr_unaligned = NULL;
}
@@ -249,25 +247,14 @@ int ath11k_dp_srng_setup(struct ath11k_b
default:
cached = false;
}
-
- if (cached) {
- ring->vaddr_unaligned = kzalloc(ring->size, GFP_KERNEL);
- if (!ring->vaddr_unaligned)
- return -ENOMEM;
-
- ring->paddr_unaligned = dma_map_single(ab->dev,
- ring->vaddr_unaligned,
- ring->size,
- DMA_FROM_DEVICE);
- if (dma_mapping_error(ab->dev, ring->paddr_unaligned)) {
- kfree(ring->vaddr_unaligned);
- ring->vaddr_unaligned = NULL;
- return -ENOMEM;
- }
- }
}
- if (!cached)
+ if (cached)
+ ring->vaddr_unaligned = dma_alloc_noncoherent(ab->dev, ring->size,
+ &ring->paddr_unaligned,
+ DMA_FROM_DEVICE,
+ GFP_KERNEL);
+ else
ring->vaddr_unaligned = dma_alloc_coherent(ab->dev, ring->size,
&ring->paddr_unaligned,
GFP_KERNEL);

View File

@@ -0,0 +1,255 @@
wifi: ath11k: Use dma_alloc_noncoherent for rx_tid buffer allocation
Currently, the driver allocates cacheable DMA buffers for the rx_tid
structure using kzalloc() and dma_map_single(). These buffers are
long-lived and can persist for the lifetime of the peer, which is not
advisable. Instead of using kzalloc() and dma_map_single() for allocating
cacheable DMA buffers, utilize the dma_alloc_noncoherent() helper for the
allocation of long-lived cacheable DMA buffers, such as the peer's rx_tid.
Since dma_alloc_noncoherent() returns unaligned physical and virtual
addresses, align them internally before use within the driver. This
ensures proper allocation of non-coherent memory through the kernel
helper.
Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3
Signed-off-by: P Praneesh <quic_ppranees@quicinc.com>
--- a/drivers/net/wireless/ath/ath11k/dp.h
+++ b/drivers/net/wireless/ath/ath11k/dp.h
@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: BSD-3-Clause-Clear */
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023, 2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef ATH11K_DP_H
@@ -20,7 +20,6 @@ struct ath11k_ext_irq_grp;
struct dp_rx_tid {
u8 tid;
- u32 *vaddr;
dma_addr_t paddr;
u32 size;
u32 ba_win_sz;
@@ -37,6 +36,9 @@ struct dp_rx_tid {
/* Timer info related to fragments */
struct timer_list frag_timer;
struct ath11k_base *ab;
+ u32 *vaddr_unaligned;
+ dma_addr_t paddr_unaligned;
+ u32 unaligned_size;
};
#define DP_REO_DESC_FREE_THRESHOLD 64
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: BSD-3-Clause-Clear
/*
* Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved.
*/
#include <linux/ieee80211.h>
@@ -675,11 +675,11 @@ void ath11k_dp_reo_cmd_list_cleanup(stru
list_for_each_entry_safe(cmd, tmp, &dp->reo_cmd_list, list) {
list_del(&cmd->list);
rx_tid = &cmd->data;
- if (rx_tid->vaddr) {
- dma_unmap_single(ab->dev, rx_tid->paddr,
- rx_tid->size, DMA_BIDIRECTIONAL);
- kfree(rx_tid->vaddr);
- rx_tid->vaddr = NULL;
+ if (rx_tid->vaddr_unaligned) {
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
+ rx_tid->vaddr_unaligned,
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
+ rx_tid->vaddr_unaligned = NULL;
}
kfree(cmd);
}
@@ -689,11 +689,11 @@ void ath11k_dp_reo_cmd_list_cleanup(stru
list_del(&cmd_cache->list);
dp->reo_cmd_cache_flush_count--;
rx_tid = &cmd_cache->data;
- if (rx_tid->vaddr) {
- dma_unmap_single(ab->dev, rx_tid->paddr,
- rx_tid->size, DMA_BIDIRECTIONAL);
- kfree(rx_tid->vaddr);
- rx_tid->vaddr = NULL;
+ if (rx_tid->vaddr_unaligned) {
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
+ rx_tid->vaddr_unaligned,
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
+ rx_tid->vaddr_unaligned = NULL;
}
kfree(cmd_cache);
}
@@ -708,11 +708,11 @@ static void ath11k_dp_reo_cmd_free(struc
if (status != HAL_REO_CMD_SUCCESS)
ath11k_warn(dp->ab, "failed to flush rx tid hw desc, tid %d status %d\n",
rx_tid->tid, status);
- if (rx_tid->vaddr) {
- dma_unmap_single(dp->ab->dev, rx_tid->paddr, rx_tid->size,
- DMA_BIDIRECTIONAL);
- kfree(rx_tid->vaddr);
- rx_tid->vaddr = NULL;
+ if (rx_tid->vaddr_unaligned) {
+ dma_free_noncoherent(dp->ab->dev, rx_tid->unaligned_size,
+ rx_tid->vaddr_unaligned,
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
+ rx_tid->vaddr_unaligned = NULL;
}
}
@@ -749,10 +749,10 @@ static void ath11k_dp_reo_cache_flush(st
if (ret) {
ath11k_err(ab, "failed to send HAL_REO_CMD_FLUSH_CACHE cmd, tid %d (%d)\n",
rx_tid->tid, ret);
- dma_unmap_single(ab->dev, rx_tid->paddr, rx_tid->size,
- DMA_BIDIRECTIONAL);
- kfree(rx_tid->vaddr);
- rx_tid->vaddr = NULL;
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
+ rx_tid->vaddr_unaligned,
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
+ rx_tid->vaddr_unaligned = NULL;
}
}
@@ -802,10 +802,10 @@ static void ath11k_dp_rx_tid_del_func(st
return;
free_desc:
- dma_unmap_single(ab->dev, rx_tid->paddr, rx_tid->size,
- DMA_BIDIRECTIONAL);
- kfree(rx_tid->vaddr);
- rx_tid->vaddr = NULL;
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size,
+ rx_tid->vaddr_unaligned,
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
+ rx_tid->vaddr_unaligned = NULL;
}
void ath11k_peer_rx_tid_delete(struct ath11k *ar,
@@ -831,14 +831,16 @@ void ath11k_peer_rx_tid_delete(struct at
if (ret != -ESHUTDOWN)
ath11k_err(ar->ab, "failed to send HAL_REO_CMD_UPDATE_RX_QUEUE cmd, tid %d (%d)\n",
tid, ret);
- dma_unmap_single(ar->ab->dev, rx_tid->paddr, rx_tid->size,
- DMA_BIDIRECTIONAL);
- kfree(rx_tid->vaddr);
- rx_tid->vaddr = NULL;
+ dma_free_noncoherent(ar->ab->dev, rx_tid->unaligned_size,
+ rx_tid->vaddr_unaligned,
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
+ rx_tid->vaddr_unaligned = NULL;
}
rx_tid->paddr = 0;
+ rx_tid->paddr_unaligned = 0;
rx_tid->size = 0;
+ rx_tid->unaligned_size = 0;
}
static int ath11k_dp_rx_link_desc_return(struct ath11k_base *ab,
@@ -982,10 +984,9 @@ static void ath11k_dp_rx_tid_mem_free(st
if (!rx_tid->active)
goto unlock_exit;
- dma_unmap_single(ab->dev, rx_tid->paddr, rx_tid->size,
- DMA_BIDIRECTIONAL);
- kfree(rx_tid->vaddr);
- rx_tid->vaddr = NULL;
+ dma_free_noncoherent(ab->dev, rx_tid->unaligned_size, rx_tid->vaddr_unaligned,
+ rx_tid->paddr_unaligned, DMA_BIDIRECTIONAL);
+ rx_tid->vaddr_unaligned = NULL;
rx_tid->active = false;
@@ -1000,9 +1001,8 @@ int ath11k_peer_rx_tid_setup(struct ath1
struct ath11k_base *ab = ar->ab;
struct ath11k_peer *peer;
struct dp_rx_tid *rx_tid;
- u32 hw_desc_sz;
- u32 *addr_aligned;
- void *vaddr;
+ u32 hw_desc_sz, *vaddr;
+ void *vaddr_unaligned;
dma_addr_t paddr;
int ret;
@@ -1050,37 +1050,34 @@ int ath11k_peer_rx_tid_setup(struct ath1
else
hw_desc_sz = ath11k_hal_reo_qdesc_size(DP_BA_WIN_SZ_MAX, tid);
- vaddr = kzalloc(hw_desc_sz + HAL_LINK_DESC_ALIGN - 1, GFP_ATOMIC);
- if (!vaddr) {
+ rx_tid->unaligned_size = hw_desc_sz + HAL_LINK_DESC_ALIGN - 1;
+ vaddr_unaligned = dma_alloc_noncoherent(ab->dev, rx_tid->unaligned_size, &paddr,
+ DMA_BIDIRECTIONAL, GFP_ATOMIC);
+ if (!vaddr_unaligned) {
spin_unlock_bh(&ab->base_lock);
return -ENOMEM;
}
- addr_aligned = PTR_ALIGN(vaddr, HAL_LINK_DESC_ALIGN);
-
- ath11k_hal_reo_qdesc_setup(addr_aligned, tid, ba_win_sz,
- ssn, pn_type);
-
- paddr = dma_map_single(ab->dev, addr_aligned, hw_desc_sz,
- DMA_BIDIRECTIONAL);
-
- ret = dma_mapping_error(ab->dev, paddr);
- if (ret) {
- spin_unlock_bh(&ab->base_lock);
- ath11k_warn(ab, "failed to setup dma map for peer %pM rx tid %d: %d\n",
- peer_mac, tid, ret);
- goto err_mem_free;
- }
-
- rx_tid->vaddr = vaddr;
- rx_tid->paddr = paddr;
+ rx_tid->vaddr_unaligned = vaddr_unaligned;
+ vaddr = PTR_ALIGN(vaddr_unaligned, HAL_LINK_DESC_ALIGN);
+ rx_tid->paddr_unaligned = paddr;
+ rx_tid->paddr = rx_tid->paddr_unaligned + ((unsigned long)vaddr -
+ (unsigned long)rx_tid->vaddr_unaligned);
+ ath11k_hal_reo_qdesc_setup(vaddr, tid, ba_win_sz, ssn, pn_type);
rx_tid->size = hw_desc_sz;
rx_tid->active = true;
+ /* After dma_alloc_noncoherent, vaddr is being modified for reo qdesc setup.
+ * Since these changes are not reflected in the device, driver now needs to
+ * explicitly call dma_sync_single_for_device.
+ */
+ dma_sync_single_for_device(ab->dev, rx_tid->paddr,
+ rx_tid->size,
+ DMA_TO_DEVICE);
spin_unlock_bh(&ab->base_lock);
- ret = ath11k_wmi_peer_rx_reorder_queue_setup(ar, vdev_id, peer_mac,
- paddr, tid, 1, ba_win_sz);
+ ret = ath11k_wmi_peer_rx_reorder_queue_setup(ar, vdev_id, peer_mac, rx_tid->paddr,
+ tid, 1, ba_win_sz);
if (ret) {
ath11k_warn(ar->ab, "failed to setup rx reorder queue for peer %pM tid %d: %d\n",
peer_mac, tid, ret);
@@ -1088,12 +1085,6 @@ int ath11k_peer_rx_tid_setup(struct ath1
}
return ret;
-
-err_mem_free:
- kfree(rx_tid->vaddr);
- rx_tid->vaddr = NULL;
-
- return ret;
}
int ath11k_dp_rx_ampdu_start(struct ath11k *ar,

View File

@@ -0,0 +1,121 @@
From 8dc94a59cfad70ec3a808add56718255eee39ab2 Mon Sep 17 00:00:00 2001
From: Christian Marangi <ansuelsmth@gmail.com>
Date: Sat, 29 Mar 2025 12:50:55 +0100
Subject: [PATCH] backports: handle genlmsg_multicast_allns upstream backport
changes
Better handle genlmsg_multicast_allns upstream backport changes that
dropped a flag to the function middle version. Use a backport function
if backports project is tried to be built on older kernel version.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
backport-include/net/genetlink.h | 11 +++++
compat/Makefile | 3 +-
compat/backport-genetlink.c | 60 +++++++++++++++++++++++
3 files changed, 73 insertions(+), 1 deletion(-)
--- a/backport-include/net/genetlink.h
+++ b/backport-include/net/genetlink.h
@@ -172,4 +172,15 @@ static inline int genlmsg_parse(const st
}
#endif /* LINUX_VERSION_IS_LESS(5,2,0) */
+#if LINUX_VERSION_IN_RANGE(5,15,0,5,15,169) || \
+ LINUX_VERSION_IN_RANGE(6,1,0,6,1,115) || \
+ LINUX_VERSION_IN_RANGE(6,6,0,6,6,58)
+#define genlmsg_multicast_allns LINUX_BACKPORT(genlmsg_multicast_allns)
+int backport_genlmsg_multicast_allns(const struct genl_family *family,
+ struct sk_buff *skb, u32 portid,
+ unsigned int group);
+#endif /* LINUX_VERSION_IN_RANGE(5,15,0,5,15,169) ||
+ LINUX_VERSION_IN_RANGE(6,1,0,6,1,115) ||
+ LINUX_VERSION_IN_RANGE(6,6,0,6,6,58) */
+
#endif /* __BACKPORT_NET_GENETLINK_H */
--- a/compat/Makefile
+++ b/compat/Makefile
@@ -16,7 +16,8 @@ compat-$(CPTCFG_KERNEL_5_9) += backport-
compat-$(CPTCFG_KERNEL_5_10) += backport-5.10.o
compat-$(CPTCFG_KERNEL_5_11) += backport-5.11.o
compat-$(CPTCFG_KERNEL_5_13) += backport-5.13.o
-compat-$(CPTCFG_KERNEL_5_15) += backport-5.15.o
+compat-$(CPTCFG_KERNEL_5_15) += backport-5.15.o backport-genetlink.o
+compat-$(CPTCFG_KERNEL_6_1) += backport-genetlink.o
compat-$(CPTCFG_KERNEL_6_4) += backport-6.4.o
compat-$(CPTCFG_BPAUTO_BUILD_CRYPTO_LIB_ARC4) += lib-crypto-arc4.o
--- a/compat/backport-genetlink.c
+++ b/compat/backport-genetlink.c
@@ -17,6 +17,7 @@
#include <net/netlink.h>
#include <net/sock.h>
+#if LINUX_VERSION_IS_LESS(5,2,0)
static const struct genl_family *find_family_real_ops(const struct genl_ops **ops)
{
const struct genl_family *family;
@@ -249,3 +250,63 @@ int backport_genlmsg_multicast_allns(con
return genlmsg_mcast(skb, portid, group);
}
EXPORT_SYMBOL_GPL(backport_genlmsg_multicast_allns);
+#endif /* LINUX_VERSION_IS_LESS(5,2,0) */
+
+#if LINUX_VERSION_IN_RANGE(5,15,0,5,15,169) || \
+ LINUX_VERSION_IN_RANGE(6,1,0,6,1,115) || \
+ LINUX_VERSION_IN_RANGE(6,6,0,6,6,58)
+static int genlmsg_mcast(struct sk_buff *skb, u32 portid, unsigned long group)
+{
+ struct sk_buff *tmp;
+ struct net *net, *prev = NULL;
+ bool delivered = false;
+ int err;
+
+ rcu_read_lock();
+ for_each_net_rcu(net) {
+ if (prev) {
+ tmp = skb_clone(skb, GFP_ATOMIC);
+ if (!tmp) {
+ err = -ENOMEM;
+ goto error;
+ }
+ err = nlmsg_multicast(prev->genl_sock, tmp,
+ portid, group, GFP_ATOMIC);
+ if (!err)
+ delivered = true;
+ else if (err != -ESRCH)
+ goto error;
+ }
+
+ prev = net;
+ }
+ err = nlmsg_multicast(prev->genl_sock, skb, portid, group, GFP_ATOMIC);
+
+ rcu_read_unlock();
+
+ if (!err)
+ delivered = true;
+ else if (err != -ESRCH)
+ return err;
+ return delivered ? 0 : -ESRCH;
+ error:
+ rcu_read_unlock();
+
+ kfree_skb(skb);
+ return err;
+}
+
+int backport_genlmsg_multicast_allns(const struct genl_family *family,
+ struct sk_buff *skb, u32 portid,
+ unsigned int group)
+{
+ if (WARN_ON_ONCE(group >= family->n_mcgrps))
+ return -EINVAL;
+
+ group = family->mcgrp_offset + group;
+ return genlmsg_mcast(skb, portid, group);
+}
+EXPORT_SYMBOL_GPL(backport_genlmsg_multicast_allns);
+#endif /* LINUX_VERSION_IN_RANGE(5,15,0,5,15,169) ||
+ LINUX_VERSION_IN_RANGE(6,1,0,6,1,115) ||
+ LINUX_VERSION_IN_RANGE(6,6,0,6,6,58) */

View File

@@ -151,7 +151,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
+ }
+
+ if (!ee_name)
+ return 0;
+ return -ENOENT;
+
+ rt2x00_info(rt2x00dev, "Loading EEPROM data from '%s'.\n", ee_name);
+

View File

@@ -0,0 +1,76 @@
From adf957124a115bdf3e4728e1ea8c70a632648cf0 Mon Sep 17 00:00:00 2001
From: Coia Prant <coiaprant@gmail.com>
Date: Fri, 14 Feb 2025 15:49:55 +0800
Subject: [PATCH] wifi: rt2x00: Add support for loading EEPROM from devicetree
embedded data
This patch allows rt2x00 to load eeprom from devicetree embedded data.
Example:
/* load eeprom from embedded data 'eeprom-data' */
&wmac {
ralink,eeprom-data = <0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff
0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff 0xffffffff>;
};
Signed-off-by: Coia Prant <coiaprant@gmail.com>
---
.../net/wireless/ralink/rt2x00/rt2x00eeprom.c | 25 +++++++++++++++++++
1 file changed, 25 insertions(+)
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
@@ -33,6 +33,27 @@ static void rt2800lib_eeprom_swap(struct
rt2x00dev->eeprom[i] = swab16(rt2x00dev->eeprom[i]);
}
+static int rt2800lib_read_eeprom_data(struct rt2x00_dev *rt2x00dev)
+{
+ struct device_node *np = rt2x00dev->dev->of_node;
+ unsigned int len = rt2x00dev->ops->eeprom_size;
+ const void *data;
+ int size;
+
+ data = of_get_property(np, "ralink,eeprom-data", &size);
+ if (!data)
+ return -ENOENT;
+
+ if (size != len) {
+ dev_err(rt2x00dev->dev, "invalid eeprom size, required: 0x%04x\n", len);
+ return -EINVAL;
+ }
+
+ memcpy(rt2x00dev->eeprom, data, size);
+
+ return 0;
+}
+
#if IS_ENABLED(CONFIG_MTD)
static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev)
{
@@ -193,6 +214,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
{
int ret;
+ ret = rt2800lib_read_eeprom_data(rt2x00dev);
+ if (!ret)
+ return 0;
+
#if IS_ENABLED(CONFIG_MTD)
ret = rt2800lib_read_eeprom_mtd(rt2x00dev);
if (!ret)

View File

@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/openwrt/mt76
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2025-01-14
PKG_SOURCE_VERSION:=8e4f72b682e9070108536507c5e2720b18c3816d
PKG_MIRROR_HASH:=fa8c5a2ece9e7287605910d9f906b601711c7863613addaadd666f9e3858a9e7
PKG_SOURCE_DATE:=2025-02-14
PKG_SOURCE_VERSION:=e5fef138524e63314cb96ff8314048d175294e95
PKG_MIRROR_HASH:=4d6ea8669b3034c97f5b341a5473facf4fe21262a2fde71257b57c4d1c86be5e
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_USE_NINJA:=0

View File

@@ -8,16 +8,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mwlwifi
PKG_RELEASE=2
PKG_RELEASE=1
PKG_LICENSE:=ISC
PKG_LICENSE_FILES:=
PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2024-04-19
PKG_SOURCE_VERSION:=a737d348ef4fe00434b2bc44b2b6a68ea833d95b
PKG_MIRROR_HASH:=d55f69c2fa48d02ba535b72b108fc77f5f13a52b29130a631489a053f1670d2c
PKG_SOURCE_DATE:=2025-02-06
PKG_SOURCE_VERSION:=db97edf20fadea2617805006f5230665fadc6a8c
PKG_MIRROR_HASH:=b5464cf6d57d87f6ce5f13bd2320c7e7e671a3152a74f4ef004382f898b89ecf
PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
PKG_BUILD_PARALLEL:=1

View File

@@ -20,7 +20,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
--- a/hif/fwcmd.c
+++ b/hif/fwcmd.c
@@ -3622,11 +3622,7 @@ int mwl_fwcmd_get_fw_core_dump(struct ie
@@ -3624,11 +3624,7 @@ int mwl_fwcmd_get_fw_core_dump(struct ie
core_dump->context = pcmd->cmd_data.coredump.context;
core_dump->size_kb = pcmd->cmd_data.coredump.size_kb;
core_dump->flags = pcmd->cmd_data.coredump.flags;

View File

@@ -19,7 +19,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
--- a/hif/pcie/pcie.c
+++ b/hif/pcie/pcie.c
@@ -1466,8 +1466,8 @@ static void pcie_bf_mimo_ctrl_decode(str
@@ -1449,8 +1449,8 @@ static void pcie_bf_mimo_ctrl_decode(str
&fp_data->f_pos);
filp_close(fp_data, current->files);
} else {

View File

@@ -14,7 +14,7 @@ Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
--- a/debugfs.c
+++ b/debugfs.c
@@ -1342,7 +1342,7 @@ done:
@@ -1394,7 +1394,7 @@ done:
priv->reg_value);
else
len += scnprintf(p + len, size - len,

View File

@@ -1,31 +0,0 @@
From 8e809b241695252e397bf0d7fc5f36e115c38831 Mon Sep 17 00:00:00 2001
From: Robert Marko <robert.marko@sartura.hr>
Date: Fri, 5 Mar 2021 11:47:59 +0100
Subject: [PATCH] mwlwifi: fix PCIe DT node null pointer dereference
pci_bus_to_OF_node() used to get the PCI bus DT node
returns node if found or NULL if none is found.
Since the return of pci_bus_to_OF_node() is not checked in
the DT node name print it will cause a null pointer
dereference and crash the kernel.
So first check whether the node is not NULL and then print.
Signed-off-by: Robert Marko <robert.marko@sartura.hr>
---
hif/pcie/pcie.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/hif/pcie/pcie.c
+++ b/hif/pcie/pcie.c
@@ -685,7 +685,8 @@ static struct device_node *pcie_get_devi
struct device_node *dev_node;
dev_node = pci_bus_to_OF_node(pcie_priv->pdev->bus);
- wiphy_info(priv->hw->wiphy, "device node: %s\n", dev_node->full_name);
+ if (dev_node)
+ wiphy_info(priv->hw->wiphy, "device node: %s\n", dev_node->full_name);
return dev_node;
}

View File

@@ -13,7 +13,7 @@
--- a/debugfs.c
+++ b/debugfs.c
@@ -498,9 +498,9 @@ static ssize_t mwl_debugfs_vif_read(stru
@@ -550,9 +550,9 @@ static ssize_t mwl_debugfs_vif_read(stru
switch (vif->type) {
case NL80211_IFTYPE_AP:
len += scnprintf(p + len, size - len, "type: ap\n");
@@ -26,7 +26,7 @@
len += scnprintf(p + len, size - len,
"ssid: %s\n", ssid);
len += scnprintf(p + len, size - len,
@@ -522,8 +522,8 @@ static ssize_t mwl_debugfs_vif_read(stru
@@ -574,8 +574,8 @@ static ssize_t mwl_debugfs_vif_read(stru
"type: unknown\n");
break;
}
@@ -37,7 +37,7 @@
len += scnprintf(p + len, size - len,
"channel: %d: width: %d\n",
chan_def->chan->hw_value,
@@ -596,18 +596,18 @@ static ssize_t mwl_debugfs_sta_read(stru
@@ -648,18 +648,18 @@ static ssize_t mwl_debugfs_sta_read(stru
sta_info->wds ? "true" : "false",
sta_info->ba_hist.enable ? "enable" : "disable",
sta_info->is_amsdu_allowed ? sta_info->amsdu_ctrl.cap : 0 ,
@@ -68,7 +68,7 @@
sta->tdls,
sta->tdls_initiator,
sta->wme,
@@ -1158,7 +1158,7 @@ static ssize_t mwl_debugfs_dfs_radar_wri
@@ -1210,7 +1210,7 @@ static ssize_t mwl_debugfs_dfs_radar_wri
struct mwl_priv *priv = (struct mwl_priv *)file->private_data;
wiphy_info(priv->hw->wiphy, "simulate radar detected\n");
@@ -127,7 +127,7 @@
a_band = true;
else
return -EINVAL;
@@ -2090,7 +2094,7 @@ int mwl_fwcmd_set_beacon(struct ieee8021
@@ -2092,7 +2096,7 @@ int mwl_fwcmd_set_beacon(struct ieee8021
if (mwl_fwcmd_set_wsc_ie(hw, b_inf->ie_wsc_len, b_inf->ie_wsc_ptr))
goto err;
@@ -136,7 +136,7 @@
goto err;
if (b_inf->cap_info & WLAN_CAPABILITY_SPECTRUM_MGMT)
@@ -2152,38 +2156,38 @@ int mwl_fwcmd_set_new_stn_add(struct iee
@@ -2154,38 +2158,38 @@ int mwl_fwcmd_set_new_stn_add(struct iee
ether_addr_copy(pcmd->mac_addr, sta->addr);
if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
@@ -189,7 +189,7 @@
}
pcmd->is_qos_sta = sta->wme;
@@ -2239,38 +2243,38 @@ int mwl_fwcmd_set_new_stn_add_sc4(struct
@@ -2241,38 +2245,38 @@ int mwl_fwcmd_set_new_stn_add_sc4(struct
ether_addr_copy(pcmd->mac_addr, sta->addr);
if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
@@ -242,7 +242,7 @@
}
pcmd->is_qos_sta = sta->wme;
@@ -2787,9 +2791,9 @@ int mwl_fwcmd_create_ba(struct ieee80211
@@ -2789,9 +2793,9 @@ int mwl_fwcmd_create_ba(struct ieee80211
pcmd->ba_info.create_params.flags = cpu_to_le32(ba_flags);
pcmd->ba_info.create_params.queue_id = stream->idx;
pcmd->ba_info.create_params.param_info =
@@ -254,7 +254,7 @@
IEEE80211_HT_AMPDU_PARM_DENSITY);
if (direction == BA_FLAG_DIRECTION_UP) {
pcmd->ba_info.create_params.reset_seq_no = 0;
@@ -2799,9 +2803,9 @@ int mwl_fwcmd_create_ba(struct ieee80211
@@ -2801,9 +2805,9 @@ int mwl_fwcmd_create_ba(struct ieee80211
pcmd->ba_info.create_params.current_seq = cpu_to_le16(0);
}
if (priv->chip_type == MWL8964 &&
@@ -268,16 +268,16 @@
}
--- a/hif/pcie/8864/tx.c
+++ b/hif/pcie/8864/tx.c
@@ -490,7 +490,7 @@ static void pcie_non_pfu_tx_done(struct
} else
memmove(dma_data->data - hdrlen, &dma_data->wh, hdrlen);
skb_pull(done_skb, sizeof(*dma_data) - hdrlen);
- ieee80211_tx_status(priv->hw, done_skb);
+ ieee80211_tx_status_skb(priv->hw, done_skb);
dev_kfree_skb_any(done_skb);
done_skb = NULL;
}
@@ -743,7 +743,7 @@ void pcie_8864_tx_xmit(struct ieee80211_
@@ -478,7 +478,7 @@ static void pcie_non_pfu_tx_done(struct
} else
memmove(dma_data->data - hdrlen, &dma_data->wh, hdrlen);
skb_pull(done_skb, sizeof(*dma_data) - hdrlen);
- ieee80211_tx_status(priv->hw, done_skb);
+ ieee80211_tx_status_skb(priv->hw, done_skb);
next:
tx_hndl = tx_hndl->pnext;
tx_desc = tx_hndl->pdesc;
@@ -730,7 +730,7 @@ void pcie_8864_tx_xmit(struct ieee80211_
index = SYSADPT_TX_WMM_QUEUES - index - 1;
txpriority = index;
@@ -286,7 +286,7 @@
!(xmitcontrol & EAGLE_TXD_XMITCTRL_USE_MC_RATE) &&
ieee80211_is_data_qos(wh->frame_control)) {
tid = qos & 0xf;
@@ -925,4 +925,4 @@ void pcie_8864_tx_del_sta_amsdu_pkts(str
@@ -912,4 +912,4 @@ void pcie_8864_tx_del_sta_amsdu_pkts(str
}
}
spin_unlock_bh(&sta_info->amsdu_lock);
@@ -313,7 +313,7 @@
bypass_ack:
if (++tx_done_tail >= MAX_TX_RING_DONE_SIZE)
@@ -596,13 +596,13 @@ void pcie_tx_xmit_ndp(struct ieee80211_h
@@ -593,13 +593,13 @@ void pcie_tx_xmit_ndp(struct ieee80211_h
ack_skb = skb_copy(skb, GFP_ATOMIC);
ack_info = IEEE80211_SKB_CB(ack_skb);
pcie_tx_prepare_info(priv, 0, ack_info);
@@ -340,16 +340,16 @@
pcie_priv->txbd_ring_size);
for (num = 0; num < PCIE_MAX_TXRX_BD; num++) {
@@ -444,7 +444,7 @@ static void pcie_pfu_tx_done(struct mwl_
} else
memmove(dma_data->data - hdrlen, &dma_data->wh, hdrlen);
skb_pull(done_skb, sizeof(*pfu_dma) - hdrlen);
- ieee80211_tx_status(priv->hw, done_skb);
+ ieee80211_tx_status_skb(priv->hw, done_skb);
}
@@ -431,7 +431,7 @@ static void pcie_pfu_tx_done(struct mwl_
} else
memmove(dma_data->data - hdrlen, &dma_data->wh, hdrlen);
skb_pull(done_skb, sizeof(*pfu_dma) - hdrlen);
- ieee80211_tx_status(priv->hw, done_skb);
+ ieee80211_tx_status_skb(priv->hw, done_skb);
}
next:
@@ -694,7 +694,7 @@ void pcie_8997_tx_xmit(struct ieee80211_
memset(data_buf, 0, sizeof(*data_buf));
@@ -682,7 +682,7 @@ void pcie_8997_tx_xmit(struct ieee80211_
index = SYSADPT_TX_WMM_QUEUES - index - 1;
txpriority = index;
@@ -358,7 +358,7 @@
!(xmitcontrol & EAGLE_TXD_XMITCTRL_USE_MC_RATE) &&
ieee80211_is_data_qos(wh->frame_control)) {
tid = qos & 0xf;
@@ -875,4 +875,4 @@ void pcie_8997_tx_del_sta_amsdu_pkts(str
@@ -863,4 +863,4 @@ void pcie_8997_tx_del_sta_amsdu_pkts(str
}
}
spin_unlock_bh(&sta_info->amsdu_lock);
@@ -376,7 +376,7 @@
{
mwl_fwcmd_radio_disable(hw);
@@ -368,15 +368,15 @@ static void mwl_mac80211_bss_info_change
@@ -390,15 +390,15 @@ static void mwl_mac80211_bss_info_change
}
}
@@ -395,7 +395,7 @@
{
struct mwl_priv *priv = hw->priv;
struct mwl_vif *mwl_vif;
@@ -426,8 +426,8 @@ static void mwl_mac80211_bss_info_change
@@ -448,8 +448,8 @@ static void mwl_mac80211_bss_info_change
if (changed & (BSS_CHANGED_BEACON_INT | BSS_CHANGED_BEACON)) {
struct sk_buff *skb;
@@ -406,7 +406,7 @@
(!info->hidden_ssid)) {
if (mwl_vif->broadcast_ssid != true) {
mwl_fwcmd_broadcast_ssid_enable(hw, vif, true);
@@ -441,7 +441,7 @@ static void mwl_mac80211_bss_info_change
@@ -463,7 +463,7 @@ static void mwl_mac80211_bss_info_change
}
if (!mwl_vif->set_beacon) {
@@ -415,7 +415,7 @@
if (skb) {
mwl_fwcmd_set_beacon(hw, vif, skb->data, skb->len);
@@ -458,7 +458,7 @@ static void mwl_mac80211_bss_info_change
@@ -480,7 +480,7 @@ static void mwl_mac80211_bss_info_change
static void mwl_mac80211_bss_info_changed(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_bss_conf *info,
@@ -424,7 +424,7 @@
{
switch (vif->type) {
case NL80211_IFTYPE_AP:
@@ -583,10 +583,10 @@ static int mwl_mac80211_sta_add(struct i
@@ -605,10 +605,10 @@ static int mwl_mac80211_sta_add(struct i
if (vif->type == NL80211_IFTYPE_MESH_POINT)
sta_info->is_mesh_node = true;
@@ -437,7 +437,7 @@
sta_info->amsdu_ctrl.cap = MWL_AMSDU_SIZE_8K;
sta_info->amsdu_ctrl.amsdu_allow_size = SYSADPT_AMSDU_8K_MAX_SIZE;
}
@@ -670,7 +670,7 @@ static int mwl_mac80211_sta_remove(struc
@@ -692,7 +692,7 @@ static int mwl_mac80211_sta_remove(struc
static int mwl_mac80211_conf_tx(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
@@ -446,7 +446,7 @@
const struct ieee80211_tx_queue_params *params)
{
struct mwl_priv *priv = hw->priv;
@@ -934,4 +934,9 @@ const struct ieee80211_ops mwl_mac80211_
@@ -956,4 +956,9 @@ const struct ieee80211_ops mwl_mac80211_
.pre_channel_switch = mwl_mac80211_chnl_switch,
.sw_scan_start = mwl_mac80211_sw_scan_start,
.sw_scan_complete = mwl_mac80211_sw_scan_complete,
@@ -502,16 +502,7 @@
case TX_RATE_FORMAT_LEGACY:
--- a/hif/pcie/pcie.c
+++ b/hif/pcie/pcie.c
@@ -546,7 +546,7 @@ static irqreturn_t pcie_isr_8864(struct
if (int_status & MACREG_A2HRIC_BIT_RADAR_DETECT) {
wiphy_info(hw->wiphy, "radar detected by firmware\n");
- ieee80211_radar_detected(hw);
+ ieee80211_radar_detected(hw, NULL);
}
if (int_status & MACREG_A2HRIC_BIT_CHAN_SWITCH) ieee80211_queue_work(hw, &priv->chnl_switch_handle);
@@ -593,7 +593,7 @@ static irqreturn_t pcie_isr_8997(struct
@@ -533,7 +533,7 @@ static irqreturn_t pcie_isr_8864(struct
if (int_status & MACREG_A2HRIC_BIT_RADAR_DETECT) {
wiphy_info(hw->wiphy, "radar detected by firmware\n");
@@ -520,7 +511,16 @@
}
if (int_status & MACREG_A2HRIC_BIT_CHAN_SWITCH)
@@ -1071,7 +1071,7 @@ static irqreturn_t pcie_isr_ndp(struct i
@@ -575,7 +575,7 @@ static irqreturn_t pcie_isr_8997(struct
if (int_status & MACREG_A2HRIC_BIT_RADAR_DETECT) {
wiphy_info(hw->wiphy, "radar detected by firmware\n");
- ieee80211_radar_detected(hw);
+ ieee80211_radar_detected(hw, NULL);
}
if (int_status & MACREG_A2HRIC_BIT_CHAN_SWITCH)
@@ -1053,7 +1053,7 @@ static irqreturn_t pcie_isr_ndp(struct i
if (int_status & MACREG_A2HRIC_NEWDP_DFS) {
wiphy_info(hw->wiphy, "radar detected by firmware\n");

View File

@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=r8101
PKG_VERSION:=1.039.00
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8101/releases/download/$(PKG_VERSION)
@@ -20,7 +20,7 @@ define KernelPackage/r8101
TITLE:=Realtek RTL8101 PCI Fast Ethernet driver
DEPENDS:=@PCI_SUPPORT +kmod-libphy
FILES:=$(PKG_BUILD_DIR)/src/r8101.ko
AUTOLOAD:=$(call AutoProbe,r8101)
AUTOLOAD:=$(call AutoProbe,r8101,1)
PROVIDES:=kmod-r8169
endef

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8125
PKG_VERSION:=9.014.01
PKG_RELEASE:=1
PKG_VERSION:=9.015.00
PKG_RELEASE:=4
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8125/releases/download/$(PKG_VERSION)
PKG_HASH:=f006aa95501738ca55c522812c9d1b473ac781675f3ad88ce341a09316b8aa13
PKG_HASH:=7d6906336c3ad960c3e7c0299ad655659d7110bdc933c5b568b7f2536cb8ffc3
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2
@@ -20,9 +20,10 @@ define KernelPackage/r8125
TITLE:=Realtek RTL8125 PCI 2.5 Gigabit Ethernet driver
DEPENDS:=@PCI_SUPPORT +kmod-libphy
FILES:=$(PKG_BUILD_DIR)/src/r8125.ko
AUTOLOAD:=$(call AutoProbe,r8125)
AUTOLOAD:=$(call AutoProbe,r8125,1)
PROVIDES:=kmod-r8169
VARIANT:=regular
PKG_MAKE_FLAGS += CONFIG_ASPM=n
endef
define KernelPackage/r8125-rss
@@ -33,7 +34,9 @@ $(call KernelPackage/r8125)
endef
ifeq ($(BUILD_VARIANT),rss)
PKG_MAKE_FLAGS += ENABLE_RSS_SUPPORT=y
PKG_MAKE_FLAGS += \
ENABLE_MULTIPLE_TX_QUEUE=y \
ENABLE_RSS_SUPPORT=y
endif
define Build/Compile

View File

@@ -18,11 +18,12 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/src/r8125.h
+++ b/src/r8125.h
@@ -1672,6 +1672,8 @@ enum RTL8125_register_content {
@@ -1687,6 +1687,9 @@ enum RTL8125_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
+#define RTL8125_FULL_DUPLEX_MASK (_2500bpsF | _1000bpsF | FullDup)
+#define RTL8125_SPEED_1000_MASK (_1000bpsF | _1000bpsL | _2500bpsL)
+
/* DBG_reg */
Fix_Nak_1 = (1 << 4),
@@ -37,11 +38,11 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
@@ -5116,6 +5117,38 @@ rtl8125_link_down_patch(struct net_devic
@@ -5023,6 +5024,38 @@ rtl8125_link_down_patch(struct net_devic
#endif
}
+static unsigned int rtl8125_phy_duplex(u16 status)
+static unsigned int rtl8125_phy_duplex(u32 status)
+{
+ unsigned int duplex = DUPLEX_UNKNOWN;
+
@@ -55,14 +56,14 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+ return duplex;
+}
+
+static int rtl8125_phy_speed(u16 status)
+static int rtl8125_phy_speed(u32 status)
+{
+ int speed = SPEED_UNKNOWN;
+
+ if (status & LinkStatus) {
+ if (status & _2500bpsF)
+ speed = SPEED_2500;
+ else if (status & _1000bpsF)
+ else if (status & RTL8125_SPEED_1000_MASK)
+ speed = SPEED_1000;
+ else if (status & _100bps)
+ speed = SPEED_100;
@@ -76,14 +77,14 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
static void
_rtl8125_check_link_status(struct net_device *dev, unsigned int link_state)
{
@@ -5128,11 +5161,18 @@ _rtl8125_check_link_status(struct net_de
@@ -5035,11 +5068,18 @@ _rtl8125_check_link_status(struct net_de
if (link_state == R8125_LINK_STATE_ON) {
rtl8125_link_on_patch(dev);
- if (netif_msg_ifup(tp))
- printk(KERN_INFO PFX "%s: link up\n", dev->name);
+ if (netif_msg_ifup(tp)) {
+ const u16 phy_status = RTL_R16(tp, PHYstatus);
+ const u32 phy_status = RTL_R32(tp, PHYstatus);
+ const unsigned int phy_duplex = rtl8125_phy_duplex(phy_status);
+ const int phy_speed = rtl8125_phy_speed(phy_status);
+ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n",

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8126
PKG_VERSION:=10.014.01
PKG_RELEASE:=1
PKG_VERSION:=10.015.00
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8126/releases/download/$(PKG_VERSION)
PKG_HASH:=dbb10a7abd0972e4abd1b89ea4eb22fc55d6c1dc2f711b5acf4a3bc376275e21
PKG_HASH:=fac513aa925264a95b053e7532fcda56022d29db288f6625fafee2759a8a6124
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2
@@ -20,7 +20,7 @@ define KernelPackage/r8126
TITLE:=Realtek RTL8126 PCI 5 Gigabit Ethernet driver
DEPENDS:=@PCI_SUPPORT +kmod-libphy
FILES:=$(PKG_BUILD_DIR)/src/r8126.ko
AUTOLOAD:=$(call AutoProbe,r8126)
AUTOLOAD:=$(call AutoProbe,r8126,1)
PROVIDES:=kmod-r8169
VARIANT:=regular
endef
@@ -33,7 +33,9 @@ $(call KernelPackage/r8126)
endef
ifeq ($(BUILD_VARIANT),rss)
PKG_MAKE_FLAGS += ENABLE_RSS_SUPPORT=y
PKG_MAKE_FLAGS += \
ENABLE_MULTIPLE_TX_QUEUE=y \
ENABLE_RSS_SUPPORT=y
endif
define Build/Compile

View File

@@ -18,11 +18,13 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/src/r8126.h
+++ b/src/r8126.h
@@ -1740,6 +1740,8 @@ enum RTL8126_register_content {
@@ -1756,6 +1756,10 @@ enum RTL8126_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
+#define RTL8126_FULL_DUPLEX_MASK (_5000bpsF | _2500bpsF | _1000bpsF | FullDup)
+#define RTL8126_SPEED_1000_MASK (_1000bpsF | _1000bpsL | _2500bpsL)
+#define RTL8126_SPEED_2500_MASK (_2500bpsF | _5000bpsL)
+
/* DBG_reg */
Fix_Nak_1 = (1 << 4),
@@ -37,11 +39,11 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
@@ -4744,6 +4745,40 @@ rtl8126_link_down_patch(struct net_devic
@@ -4661,6 +4662,40 @@ rtl8126_link_down_patch(struct net_devic
#endif
}
+static unsigned int rtl8126_phy_duplex(u16 status)
+static unsigned int rtl8126_phy_duplex(u32 status)
+{
+ unsigned int duplex = DUPLEX_UNKNOWN;
+
@@ -55,16 +57,16 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+ return duplex;
+}
+
+static int rtl8126_phy_speed(u16 status)
+static int rtl8126_phy_speed(u32 status)
+{
+ int speed = SPEED_UNKNOWN;
+
+ if (status & LinkStatus) {
+ if (status & _5000bpsF)
+ speed = SPEED_5000;
+ else if (status & _2500bpsF)
+ else if (status & RTL8126_SPEED_2500_MASK)
+ speed = SPEED_2500;
+ else if (status & _1000bpsF)
+ else if (status & RTL8126_SPEED_1000_MASK)
+ speed = SPEED_1000;
+ else if (status & _100bps)
+ speed = SPEED_100;
@@ -78,14 +80,14 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
static void
_rtl8126_check_link_status(struct net_device *dev, unsigned int link_state)
{
@@ -4756,11 +4791,18 @@ _rtl8126_check_link_status(struct net_de
@@ -4673,11 +4708,18 @@ _rtl8126_check_link_status(struct net_de
if (link_state == R8126_LINK_STATE_ON) {
rtl8126_link_on_patch(dev);
- if (netif_msg_ifup(tp))
- printk(KERN_INFO PFX "%s: link up\n", dev->name);
+ if (netif_msg_ifup(tp)) {
+ const u16 phy_status = RTL_R16(tp, PHYstatus);
+ const u32 phy_status = RTL_R32(tp, PHYstatus);
+ const unsigned int phy_duplex = rtl8126_phy_duplex(phy_status);
+ const int phy_speed = rtl8126_phy_speed(phy_status);
+ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n",

View File

@@ -0,0 +1,49 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8127
PKG_VERSION:=11.014.00
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8127/releases/download/$(PKG_VERSION)
PKG_HASH:=f496bc16c32d2e8f9482c57d006604c70d9e8d55b4f1f999b88c602de9104094
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2
PKG_MAINTAINER:=Alvaro Fernandez Rojas <noltari@gmail.com>
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/package.mk
define KernelPackage/r8127
SUBMENU:=Network Devices
TITLE:=Realtek RTL8127 PCI 10 Gigabit Ethernet driver
DEPENDS:=@PCI_SUPPORT +kmod-libphy
FILES:=$(PKG_BUILD_DIR)/src/r8127.ko
AUTOLOAD:=$(call AutoProbe,r8127,1)
PROVIDES:=kmod-r8169
VARIANT:=regular
endef
define KernelPackage/r8127-rss
$(call KernelPackage/r8127)
CONFLICTS:=kmod-r8127
TITLE+= (RSS)
VARIANT:=rss
endef
ifeq ($(BUILD_VARIANT),rss)
PKG_MAKE_FLAGS += \
ENABLE_MULTIPLE_TX_QUEUE=y \
ENABLE_RSS_SUPPORT=y
endif
define Build/Compile
+$(KERNEL_MAKE) $(PKG_JOBS) \
$(PKG_MAKE_FLAGS) \
M="$(PKG_BUILD_DIR)/src" \
modules
endef
$(eval $(call KernelPackage,r8127))
$(eval $(call KernelPackage,r8127-rss))

View File

@@ -0,0 +1,107 @@
From 5ca1d47e065c0318774a946ffdf76010c78cc164 Mon Sep 17 00:00:00 2001
From: Chukun Pan <amadeus@jmu.edu.cn>
Date: Sat, 10 Aug 2024 20:16:32 +0800
Subject: [PATCH] r8127: print link speed and duplex mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Like other Ethernet drivers, print link speed and duplex mode
when the interface is up. Formatting output at the same time.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
src/r8127.h | 2 ++
src/r8127_n.c | 48 +++++++++++++++++++++++++++++++++++++++++++++---
2 files changed, 47 insertions(+), 3 deletions(-)
--- a/src/r8127.h
+++ b/src/r8127.h
@@ -1753,6 +1753,11 @@ enum RTL8127_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
+#define RTL8127_FULL_DUPLEX_MASK (_10000bpsF | _5000bpsF | _2500bpsF | _1000bpsF | FullDup)
+#define RTL8127_SPEED_1000_MASK (_1000bpsF | _1000bpsL | _2500bpsL)
+#define RTL8127_SPEED_2500_MASK (_2500bpsF | _5000bpsL)
+#define RTL8127_SPEED_5000_MASK (_5000bpsF | _10000bpsL)
+
/* DBG_reg */
Fix_Nak_1 = (1 << 4),
Fix_Nak_2 = (1 << 3),
--- a/src/r8127_n.c
+++ b/src/r8127_n.c
@@ -39,6 +39,7 @@
#include <linux/module.h>
#include <linux/version.h>
#include <linux/pci.h>
+#include <linux/phy.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
@@ -4746,6 +4747,42 @@ rtl8127_link_down_patch(struct net_devic
#endif
}
+static unsigned int rtl8127_phy_duplex(u32 status)
+{
+ unsigned int duplex = DUPLEX_UNKNOWN;
+
+ if (status & LinkStatus) {
+ if (status & RTL8127_FULL_DUPLEX_MASK)
+ duplex = DUPLEX_FULL;
+ else
+ duplex = DUPLEX_HALF;
+ }
+
+ return duplex;
+}
+
+static int rtl8127_phy_speed(u32 status)
+{
+ int speed = SPEED_UNKNOWN;
+
+ if (status & LinkStatus) {
+ if (status & _10000bpsF)
+ speed = SPEED_10000;
+ else if (status & RTL8127_SPEED_5000_MASK)
+ speed = SPEED_5000;
+ else if (status & RTL8127_SPEED_2500_MASK)
+ speed = SPEED_2500;
+ else if (status & RTL8127_SPEED_1000_MASK)
+ speed = SPEED_1000;
+ else if (status & _100bps)
+ speed = SPEED_100;
+ else if (status & _10bps)
+ speed = SPEED_10;
+ }
+
+ return speed;
+}
+
static void
_rtl8127_check_link_status(struct net_device *dev, unsigned int link_state)
{
@@ -4758,11 +4795,18 @@ _rtl8127_check_link_status(struct net_de
if (link_state == R8127_LINK_STATE_ON) {
rtl8127_link_on_patch(dev);
- if (netif_msg_ifup(tp))
- printk(KERN_INFO PFX "%s: link up\n", dev->name);
+ if (netif_msg_ifup(tp)) {
+ const u32 phy_status = RTL_R32(tp, PHYstatus);
+ const unsigned int phy_duplex = rtl8127_phy_duplex(phy_status);
+ const int phy_speed = rtl8127_phy_speed(phy_status);
+ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n",
+ dev->name,
+ phy_speed_to_str(phy_speed),
+ phy_duplex_to_str(phy_duplex));
+ }
} else {
if (netif_msg_ifdown(tp))
- printk(KERN_INFO PFX "%s: link down\n", dev->name);
+ printk(KERN_INFO PFX "%s: Link is Down\n", dev->name);
rtl8127_link_down_patch(dev);
}

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8168
PKG_VERSION:=8.054.00
PKG_RELEASE:=1
PKG_VERSION:=8.055.00
PKG_RELEASE:=3
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8168/releases/download/$(PKG_VERSION)
PKG_HASH:=5480120cf823e991e8cbd325118c1ec0c57d8f42760ba1a7334bd07d291d235d
PKG_HASH:=61deb2a9cb7d6b08748ad51734b108da95d629712b64b204e2e6bd3f16d0a48f
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2
@@ -20,10 +20,24 @@ define KernelPackage/r8168
TITLE:=Realtek RTL8168 PCI Gigabit Ethernet driver
DEPENDS:=@PCI_SUPPORT +kmod-libphy
FILES:=$(PKG_BUILD_DIR)/src/r8168.ko
AUTOLOAD:=$(call AutoProbe,r8168)
AUTOLOAD:=$(call AutoProbe,r8168,1)
PROVIDES:=kmod-r8169
VARIANT:=regular
endef
define KernelPackage/r8168-rss
$(call KernelPackage/r8168)
CONFLICTS:=kmod-r8168
TITLE+= (RSS)
VARIANT:=rss
endef
ifeq ($(BUILD_VARIANT),rss)
PKG_MAKE_FLAGS += \
ENABLE_MULTIPLE_TX_QUEUE=y \
ENABLE_RSS_SUPPORT=y
endif
define Build/Compile
+$(KERNEL_MAKE) $(PKG_JOBS) \
M="$(PKG_BUILD_DIR)/src" \
@@ -31,3 +45,4 @@ define Build/Compile
endef
$(eval $(call KernelPackage,r8168))
$(eval $(call KernelPackage,r8168-rss))

View File

@@ -13,7 +13,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/src/r8168_n.c
+++ b/src/r8168_n.c
@@ -1655,9 +1655,9 @@ static int proc_dump_rx_desc_2(struct se
@@ -1668,9 +1668,9 @@ static int proc_dump_rx_desc_2(struct se
j, k);
for (i=0; i<(tp->RxDescLength/4); i++) {
if (!(i % 4))

View File

@@ -18,7 +18,7 @@ Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
--- a/src/r8168.h
+++ b/src/r8168.h
@@ -1468,6 +1468,8 @@ enum RTL8168_register_content {
@@ -1480,6 +1480,8 @@ enum RTL8168_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
@@ -37,7 +37,7 @@ Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
@@ -5369,6 +5370,36 @@ rtl8168_link_down_patch(struct net_devic
@@ -5396,6 +5397,38 @@ rtl8168_link_down_patch(struct net_devic
#endif
}
@@ -66,6 +66,8 @@ Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
+ speed = SPEED_100;
+ else if (status & _10bps)
+ speed = SPEED_10;
+ else if (eee_giga_lite)
+ speed = SPEED_1000;
+ }
+
+ return speed;
@@ -74,7 +76,7 @@ Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
static void
rtl8168_check_link_status(struct net_device *dev)
{
@@ -5388,11 +5419,18 @@ rtl8168_check_link_status(struct net_dev
@@ -5415,11 +5448,18 @@ rtl8168_check_link_status(struct net_dev
if (link_status_on) {
rtl8168_link_on_patch(dev);

View File

@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/libnl-tiny.git
PKG_SOURCE_DATE:=2023-12-05
PKG_SOURCE_VERSION:=965c4bf49658342ced0bd6e7cb069571b4a1ddff
PKG_MIRROR_HASH:=4b56499e71f5f10b123e1c7ee13dbfcd970de560bff8d16ab39dc25c9ff743cb
PKG_SOURCE_DATE:=2025-03-19
PKG_SOURCE_VERSION:=c0df580adbd4d555ecc1962dbe88e91d75b67a4e
PKG_MIRROR_HASH:=1064a27824d99a93cbf8dbc808caf2cb277f1825b378ec6076d2ecfb8866a81f
CMAKE_INSTALL:=1
PKG_LICENSE:=LGPL-2.1

View File

@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libpcap
PKG_VERSION:=1.10.5
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://www.tcpdump.org/release/
@@ -22,7 +22,11 @@ PKG_CPE_ID:=cpe:/a:tcpdump:libpcap
PKG_ASLR_PIE_REGULAR:=1
PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_rpcapd
PKG_CONFIG_DEPENDS := \
CONFIG_PACKAGE_rpcapd \
CONFIG_PCAP_HAS_USB \
CONFIG_PCAP_HAS_BT \
CONFIG_PCAP_HAS_NETFILTER
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

View File

@@ -0,0 +1,28 @@
From fcb2cbc3a306afcf7785a60a74dbea431e609d76 Mon Sep 17 00:00:00 2001
From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Date: Thu, 6 Jan 2022 15:51:54 -0300
Subject: [PATCH 1/2] Add support for Realtek (Ethertype) DSA data
Realtek switchtag rtl4a (4 bytes long, protocol 0xA) and rtl8_4 (8 bytes
long, protocol 0x04) are Ethertype DSA tags, inserted in the Ethernet
header similar to an 802.1Q tag. Both shares the same Ethertype 0x8899
as other Realtek proprietary protocols.
Realtek switchtag rtl8_4t is identical to rtl8_4 but positioned before
the CRC, at the end of the Ethernet frame.
---
pcap-linux.c | 3 +++
1 file changed, 3 insertions(+)
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -5281,6 +5281,9 @@ static struct dsa_proto {
{ "brcm-prepend", DLT_DSA_TAG_BRCM_PREPEND },
{ "dsa", DLT_DSA_TAG_DSA },
{ "edsa", DLT_DSA_TAG_EDSA },
+ { "rtl4a", DLT_EN10MB },
+ { "rtl8_4", DLT_EN10MB },
+ { "rtl8_4t", DLT_EN10MB },
};
static int

View File

@@ -0,0 +1,322 @@
From 7d298976beff0cce310fb53a430f82b53f43a394 Mon Sep 17 00:00:00 2001
From: Guy Harris <gharris@sonic.net>
Date: Fri, 14 Feb 2025 19:12:24 -0800
Subject: [PATCH 2/2] Linux: handle other DSA tags.
Many of those entries need their own LINKTYPE_/DLT_? values, including
tcpdump and Wireshark support for same, but at least this lets you see
raw hex data from a capture.
Fixes #1367.
Supercedes #1451.
---
pcap-linux.c | 284 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 280 insertions(+), 4 deletions(-)
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -5267,23 +5267,299 @@ iface_get_offload(pcap_t *handle _U_)
}
#endif /* SIOCETHTOOL */
+/*
+ * As per
+ *
+ * https://www.kernel.org/doc/html/latest/networking/dsa/dsa.html#switch-tagging-protocols
+ *
+ * Type 1 means that the tag is prepended to the Ethernet packet.
+ * LINKTYPE_ETHERNET/DLT_EN10MB doesn't work, as it would try to
+ * dissect the tag data as the Ethernet header. These should get
+ * their own LINKTYPE_DLT_ values.
+ *
+ * Type 2 means that the tag is inserted into the Ethernet header
+ * after the source address and before the type/length field.
+ *
+ * Type 3 means that tag is a packet trailer. LINKTYPE_ETHERNET/DLT_EN10MB
+ * works, unless the next-layer protocol has no length field of its own,
+ * so that the tag might be treated as part of the payload. These should
+ * get their own LINKTYPE_/DLT_ values.
+ *
+ * If you get an "unsupported DSA tag" error, please add the tag to here,
+ * complete with a full comment indicating whether it's type 1, 2, or 3,
+ * and, for type 2, indicating whether it has an Ethertype and, if so
+ * what that type is, and whether it's registered with the IEEE or is
+ * self-assigned. Also, point to *something* that indicates the format
+ * of the tag.
+ */
static struct dsa_proto {
const char *name;
bpf_u_int32 linktype;
} dsa_protos[] = {
/*
- * None is special and indicates that the interface does not have
- * any tagging protocol configured, and is therefore a standard
- * Ethernet interface.
+ * Type 1. See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_ar9331.c
+ */
+ { "ar9331", DLT_EN10MB },
+
+ /*
+ * Type 2, without an Ethertype at the beginning,
+ * assigned a LINKTYPE_/DLT_ value.
*/
- { "none", DLT_EN10MB },
{ "brcm", DLT_DSA_TAG_BRCM },
+
+ /*
+ * Type 2, with Ethertype 0x8874, assigned to Broadcom.
+ *
+ * This doies not require a LINKTYPE_/DLT_ value, it
+ * just requires that Ethertype 0x8874 be dissected
+ * properly.
+ */
+ { "brcm-legacy", DLT_EN10MB },
+
+ /*
+ * Type 1.
+ */
{ "brcm-prepend", DLT_DSA_TAG_BRCM_PREPEND },
+
+ /*
+ * Type 2, without an Etherype at he beginning,
+ * assigned a LINKTYPE_/DLT_ value.
+ */
{ "dsa", DLT_DSA_TAG_DSA },
+
+ /*
+ * Type 2, with an Ethertype field, but without
+ * an assigned Ethertype value that can be relied
+ * on; assigned a LINKTYPE_/DLT_ value.
+ */
{ "edsa", DLT_DSA_TAG_EDSA },
+
+ /*
+ * Type 1, with different transmit and receive headers,
+ * so can't really be handled well with the current
+ * libpcap API and with pcap files. Use DLT_LINUX_SLL,
+ * to get the direction?
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_gswip.c
+ */
+ { "gswip", DLT_EN10MB },
+
+ /*
+ * Type 3. See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_hellcreek.c
+ */
+ { "hellcreek", DLT_EN10MB },
+
+ /*
+ * Type 3, with different transmit and receive headers,
+ * so can't really be handled well with the current
+ * libpcap API and with pcap files. Use DLT_LINUX_SLL,
+ * to get the direction?
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_ksz.c#L102
+ */
+ { "ksz8795", DLT_EN10MB },
+
+ /*
+ * Type 3, with different transmit and receive headers,
+ * so can't really be handled well with the current
+ * libpcap API and with pcap files. Use DLT_LINUX_SLL,
+ * to get the direction?
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_ksz.c#L160
+ */
+ { "ksz9477", DLT_EN10MB },
+
+ /*
+ * Type 3, with different transmit and receive headers,
+ * so can't really be handled well with the current
+ * libpcap API and with pcap files. Use DLT_LINUX_SLL,
+ * to get the direction?
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_ksz.c#L341
+ */
+ { "ksz9893", DLT_EN10MB },
+
+ /*
+ * Type 3, with different transmit and receive headers,
+ * so can't really be handled well with the current
+ * libpcap API and with pcap files. Use DLT_LINUX_SLL,
+ * to get the direction?
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_ksz.c#L386
+ */
+ { "lan937x", DLT_EN10MB },
+
+ /*
+ * Type 2, with Ethertype 0x8100; the VID can be interpreted
+ * as per
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_lan9303.c#L24
+ *
+ * so giving its own LINKTYPE_/DLT_ value would allow a
+ * dissector to do so.
+ */
+ { "lan9303", DLT_EN10MB },
+
+ /*
+ * Type 2, without an Etherype at he beginning,
+ * should be assigned a LINKTYPE_/DLT_ value.
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_mtk.c#L15
+ */
+ { "mtk", DLT_EN10MB },
+
+ /*
+ * None is special and indicates that the interface does not have
+ * any tagging protocol configured, and is therefore a standard
+ * Ethernet interface.
+ */
+ { "none", DLT_EN10MB },
+
+ /*
+ * Type 1.
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_ocelot.c
+ */
+ { "ocelot", DLT_EN10MB },
+
+ /*
+ * Type 1.
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_ocelot.c
+ */
+ { "seville", DLT_EN10MB },
+
+ /*
+ * Type 2, with Ethertype 0x8100; the VID can be interpreted
+ * as per
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_8021q.c#L15
+ *
+ * so giving its own LINKTYPE_/DLT_ value would allow a
+ * dissector to do so.
+ */
+ { "ocelot-8021q", DLT_EN10MB },
+
+ /*
+ * Type 2, without an Etherype at he beginning,
+ * should be assigned a LINKTYPE_/DLT_ value.
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_qca.c
+ */
+ { "qca", DLT_EN10MB },
+
+ /*
+ * Type 2, with Ethertype 0x8899, assigned to Realtek;
+ * they use it for several on-the-Ethernet protocols
+ * as well, but there are fields that allow the two
+ * tag formats, and all the protocols in question,
+ * to be distinguiished from one another.
+ *
+ * This doies not require a LINKTYPE_/DLT_ value, it
+ * just requires that Ethertype 0x8899 be dissected
+ * properly.
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_rtl4_a.c
+ *
+ * http://realtek.info/pdf/rtl8306sd%28m%29_datasheet_1.1.pdf
+ *
+ * and various pages in tcpdump's print-realtek.c and Wireshark's
+ * epan/dissectors/packet-realtek.c for the other protocols.
+ */
{ "rtl4a", DLT_EN10MB },
+
+ /*
+ * Type 2, with Ethertype 0x8899, assigned to Realtek;
+ * see above.
+ */
{ "rtl8_4", DLT_EN10MB },
+
+ /*
+ * Type 3, with the same tag format as rtl8_4.
+ */
{ "rtl8_4t", DLT_EN10MB },
+
+ /*
+ * Type 2, with Ethertype 0xe001; that's probably
+ * self-assigned, so this really should ahve its
+ * own LINKTYPE_/DLT_ value.
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_rzn1_a5psw.c
+ */
+ { "a5psw", DLT_EN10MB },
+
+ /*
+ * Type 2, with Ethertype 0x8100 or the self-assigned
+ * 0xdadb, so this really should ahve its own
+ * LINKTYPE_/DLT_ value; that would also allow the
+ * VID of the tag to be dissected as per
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_8021q.c#L15
+ */
+ { "sja1105", DLT_EN10MB },
+
+ /*
+ * Type "none of the above", with both a header and trailer,
+ * with different transmit and receive tags. Has
+ * Ethertype 0xdadc, which is probably self-assigned.
+ * This should really have its own LINKTYPE_/DLT_ value.
+ */
+ { "sja1110", DLT_EN10MB },
+
+ /*
+ * Type 3, as the name suggests.
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_trailer.c
+ */
+ { "trailer", DLT_EN10MB },
+
+ /*
+ * Type 2, with Ethertype 0x8100; the VID can be interpreted
+ * as per
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_8021q.c#L15
+ *
+ * so giving its own LINKTYPE_/DLT_ value would allow a
+ * dissector to do so.
+ */
+ { "vsc73xx-8021q", DLT_EN10MB },
+
+ /*
+ * Type 3.
+ *
+ * See
+ *
+ * https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_xrs700x.c
+ */
+ { "xrs700x", DLT_EN10MB },
};
static int

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=mbedtls
PKG_VERSION:=3.6.2
PKG_VERSION:=3.6.3
PKG_RELEASE:=1
PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL=https://github.com/Mbed-TLS/$(PKG_NAME)/releases/download/$(PKG_NAME)-$(PKG_VERSION)
PKG_HASH:=8b54fb9bcf4d5a7078028e0520acddefb7900b3e66fec7f7175bb5b7d85ccdca
PKG_HASH:=64cd73842cdc05e101172f7b437c65e7312e476206e1dbfd644433d11bc56327
PKG_LICENSE:=GPL-2.0-or-later
PKG_LICENSE_FILES:=LICENSE

View File

@@ -1,6 +1,7 @@
--- a/programs/CMakeLists.txt
+++ b/programs/CMakeLists.txt
@@ -1,13 +1,9 @@
@@ -3,14 +3,10 @@ add_custom_target(${programs_target})
add_subdirectory(aes)
add_subdirectory(cipher)
-if (NOT WIN32)

View File

@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=openssl
PKG_VERSION:=3.0.15
PKG_VERSION:=3.0.16
PKG_RELEASE:=1
PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
@@ -21,7 +21,7 @@ PKG_SOURCE_URL:= \
https://www.openssl.org/source/old/$(PKG_BASE)/ \
https://github.com/openssl/openssl/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
PKG_HASH:=23c666d0edf20f14249b3d8f0368acaee9ab585b09e1de82107c66e1f3ec9533
PKG_HASH:=57e03c50feab5d31b152af2b764f10379aecd8ee92f16c985983ce4a99f7ef86
PKG_LICENSE:=Apache-2.0
PKG_LICENSE_FILES:=LICENSE

View File

@@ -51,7 +51,7 @@ define Package/udebug-cli
SECTION:=utils
CATEGORY:=Utilities
TITLE:=OpenWrt debug service CLI
DEPENDS:=+udebugd +ucode-mod-udebug
DEPENDS:=+udebugd +ucode-mod-udebug +ucode-mod-uloop +ucode-mod-ubus
endef
define Package/libudebug/install

Submodule package/luci-app-partexp added at 64eb0bd909

Submodule package/luci-app-zerotier added at 84061c8aff

Submodule package/luci-theme-design added at 80c35ef494

Submodule package/luci-theme-kucat added at 26d458e2a7

View File

@@ -740,8 +740,10 @@ mac80211_prepare_vif() {
mac80211_prepare_iw_htmode() {
case "$htmode" in
VHT20|HT20|HE20) iw_htmode=HT20;;
HT40*|VHT40|VHT160|HE40)
HT20|VHT20|HE20|EHT20)
iw_htmode=HT20
;;
HT40*|VHT40|HE40|EHT40)
case "$band" in
2g)
case "$htmode" in
@@ -765,8 +767,11 @@ mac80211_prepare_iw_htmode() {
esac
[ "$auto_channel" -gt 0 ] && iw_htmode="HT40+"
;;
VHT80|HE80)
iw_htmode="80MHZ"
VHT80|HE80|EHT80)
iw_htmode="80MHz"
;;
VHT160|HE160|EHT160)
iw_htmode="160MHz"
;;
NONE|NOHT)
iw_htmode="NOHT"

View File

@@ -213,9 +213,12 @@ const phy_proto = {
if (!base_mask)
return null;
if (base_mask == "00:00:00:00:00:00")
base_mask = "ff:ff:ff:ff:ff:ff";
if (data.macaddr_base)
base_addr = data.macaddr_base;
else if (base_mask == "00:00:00:00:00:00" &&
else if (base_mask == "ff:ff:ff:ff:ff:ff" &&
(radio_idx > 0 || idx >= num_global)) {
let addrs = split(phy_sysfs_file(phy, "addresses"), "\n");
@@ -227,8 +230,6 @@ const phy_proto = {
} else {
if (idx < length(addrs))
return addrs[idx];
base_mask = "ff:ff:ff:ff:ff:ff";
}
}

View File

@@ -226,6 +226,14 @@ append_interface_name() {
xappend "--interface-name=$1,$2"
}
append_filter_rr() {
xappend "--filter-rr=$1"
}
append_cache_rr() {
xappend "--cache-rr=$1"
}
filter_dnsmasq() {
local cfg="$1" func="$2" match_cfg="$3" found_cfg
@@ -1000,8 +1008,8 @@ dnsmasq_start()
# deprecate or remove filter-X in favor of filter-rr?
append_bool "$cfg" filter_aaaa "--filter-AAAA"
append_bool "$cfg" filter_a "--filter-A"
append_parm "$cfg" filter_rr "--filter-rr"
append_parm "$cfg" cache_rr "--cache-rr"
config_list_foreach "$cfg" filter_rr append_filter_rr
config_list_foreach "$cfg" cache_rr append_cache_rr
append_parm "$cfg" logfacility "--log-facility"
config_get logfacility "$cfg" "logfacility"

View File

@@ -816,7 +816,7 @@ as adding/removing interfaces.
if (vlan_id)
*vlan_id = 0;
if (psk_len)
@@ -446,13 +447,16 @@ static const u8 * hostapd_wpa_auth_get_p
@@ -446,13 +447,18 @@ static const u8 * hostapd_wpa_auth_get_p
* returned psk which should not be returned again.
* logic list (all hostapd_get_psk; all sta->psk)
*/
@@ -830,16 +830,23 @@ as adding/removing interfaces.
*vlan_id = 0;
psk = sta->psk->psk;
- for (pos = sta->psk; pos; pos = pos->next) {
+ if (vlan_id)
+ sta->psk_idx = psk_idx;
+ for (pos = sta->psk; pos; pos = pos->next, psk_idx++) {
if (pos->is_passphrase) {
if (pbkdf2_sha1(pos->passphrase,
hapd->conf->ssid.ssid,
@@ -469,6 +473,8 @@ static const u8 * hostapd_wpa_auth_get_p
@@ -466,9 +472,13 @@ static const u8 * hostapd_wpa_auth_get_p
}
if (pos->psk == prev_psk) {
psk = pos->next ? pos->next->psk : NULL;
+ if (vlan_id)
+ sta->psk_idx = psk_idx + 1;
break;
}
}
+ if (psk)
+ sta->psk_idx = psk_idx;
+ if (vlan_id && !psk)
+ sta->psk_idx = 0;
}
return psk;
}

View File

@@ -29,7 +29,7 @@ a VLAN interface on top of the bridge, instead of using the bridge directly
int bridge_hairpin; /* hairpin_mode on bridge members */
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -1821,8 +1821,12 @@ int hostapd_setup_wpa(struct hostapd_dat
@@ -1825,8 +1825,12 @@ int hostapd_setup_wpa(struct hostapd_dat
wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) {
const char *ft_iface;

View File

@@ -25,7 +25,7 @@
+
--- a/src/ap/sta_info.h
+++ b/src/ap/sta_info.h
@@ -409,23 +409,8 @@ int ap_sta_re_add(struct hostapd_data *h
@@ -408,23 +408,8 @@ int ap_sta_re_add(struct hostapd_data *h
void ap_free_sta_pasn(struct hostapd_data *hapd, struct sta_info *sta);

View File

@@ -23,7 +23,7 @@ hostapd_ucode_bss_get_uval(struct hostapd_data *hapd)
uc_value_t *val;
if (hapd->ucode.idx)
return wpa_ucode_registry_get(bss_registry, hapd->ucode.idx);
return ucv_get(wpa_ucode_registry_get(bss_registry, hapd->ucode.idx));
val = uc_resource_new(bss_type, hapd);
hapd->ucode.idx = wpa_ucode_registry_add(bss_registry, val);
@@ -37,7 +37,7 @@ hostapd_ucode_iface_get_uval(struct hostapd_iface *hapd)
uc_value_t *val;
if (hapd->ucode.idx)
return wpa_ucode_registry_get(iface_registry, hapd->ucode.idx);
return ucv_get(wpa_ucode_registry_get(iface_registry, hapd->ucode.idx));
val = uc_resource_new(iface_type, hapd);
hapd->ucode.idx = wpa_ucode_registry_add(iface_registry, val);
@@ -54,12 +54,11 @@ hostapd_ucode_update_bss_list(struct hostapd_iface *iface, uc_value_t *if_bss, u
list = ucv_array_new(vm);
for (i = 0; iface->bss && i < iface->num_bss; i++) {
struct hostapd_data *hapd = iface->bss[i];
uc_value_t *val = hostapd_ucode_bss_get_uval(hapd);
ucv_array_set(list, i, ucv_get(ucv_string_new(hapd->conf->iface)));
ucv_object_add(bss, hapd->conf->iface, ucv_get(val));
ucv_array_set(list, i, ucv_string_new(hapd->conf->iface));
ucv_object_add(bss, hapd->conf->iface, hostapd_ucode_bss_get_uval(hapd));
}
ucv_object_add(if_bss, iface->phy, ucv_get(list));
ucv_object_add(if_bss, iface->phy, list);
}
static void
@@ -73,13 +72,14 @@ hostapd_ucode_update_interfaces(void)
for (i = 0; i < interfaces->count; i++) {
struct hostapd_iface *iface = interfaces->iface[i];
ucv_object_add(ifs, iface->phy, ucv_get(hostapd_ucode_iface_get_uval(iface)));
ucv_object_add(ifs, iface->phy, hostapd_ucode_iface_get_uval(iface));
hostapd_ucode_update_bss_list(iface, if_bss, bss);
}
ucv_object_add(ucv_prototype_get(global), "interfaces", ucv_get(ifs));
ucv_object_add(ucv_prototype_get(global), "interface_bss", ucv_get(if_bss));
ucv_object_add(ucv_prototype_get(global), "bss", ucv_get(bss));
ucv_object_add(ucv_prototype_get(global), "interfaces", ifs);
ucv_object_add(ucv_prototype_get(global), "interface_bss", if_bss);
ucv_object_add(ucv_prototype_get(global), "bss", bss);
ucv_gc(vm);
}
@@ -362,6 +362,10 @@ uc_hostapd_iface_add_bss(uc_vm_t *vm, size_t nargs)
hapd->driver = iface->bss[0]->driver;
hapd->drv_priv = iface->bss[0]->drv_priv;
#ifdef CONFIG_IEEE80211BE
os_strlcpy(hapd->ctrl_sock_iface, hapd->conf->iface,
sizeof(hapd->ctrl_sock_iface));
#endif
if (interfaces->ctrl_iface_init &&
interfaces->ctrl_iface_init(hapd) < 0)
goto free_hapd;
@@ -721,11 +725,10 @@ int hostapd_ucode_sta_auth(struct hostapd_data *hapd, struct sta_info *sta)
if (wpa_ucode_call_prepare("sta_auth"))
return 0;
uc_value_push(ucv_get(ucv_string_new(hapd->conf->iface)));
uc_value_push(ucv_string_new(hapd->conf->iface));
snprintf(addr, sizeof(addr), MACSTR, MAC2STR(sta->addr));
val = ucv_string_new(addr);
uc_value_push(ucv_get(val));
uc_value_push(ucv_string_new(addr));
val = wpa_ucode_call(2);
@@ -787,16 +790,15 @@ void hostapd_ucode_sta_connected(struct hostapd_data *hapd, struct sta_info *sta
if (wpa_ucode_call_prepare("sta_connected"))
return;
uc_value_push(ucv_get(ucv_string_new(hapd->conf->iface)));
uc_value_push(ucv_string_new(hapd->conf->iface));
snprintf(addr, sizeof(addr), MACSTR, MAC2STR(sta->addr));
val = ucv_string_new(addr);
uc_value_push(ucv_get(val));
uc_value_push(ucv_string_new(addr));
val = ucv_object_new(vm);
if (sta->psk_idx)
ucv_object_add(val, "psk_idx", ucv_int64_new(sta->psk_idx - 1));
uc_value_push(ucv_get(val));
uc_value_push(val);
val = wpa_ucode_call(3);
if (ucv_type(val) != UC_OBJECT)
@@ -878,7 +880,7 @@ void hostapd_ucode_free(void)
void hostapd_ucode_free_iface(struct hostapd_iface *iface)
{
wpa_ucode_registry_remove(iface_registry, iface->ucode.idx);
ucv_put(wpa_ucode_registry_remove(iface_registry, iface->ucode.idx));
}
void hostapd_ucode_bss_cb(struct hostapd_data *hapd, const char *type)
@@ -889,10 +891,11 @@ void hostapd_ucode_bss_cb(struct hostapd_data *hapd, const char *type)
return;
val = hostapd_ucode_bss_get_uval(hapd);
uc_value_push(ucv_get(ucv_string_new(hapd->iface->phy)));
uc_value_push(ucv_get(ucv_string_new(hapd->conf->iface)));
uc_value_push(ucv_string_new(hapd->iface->phy));
uc_value_push(ucv_string_new(hapd->conf->iface));
uc_value_push(ucv_get(val));
ucv_put(wpa_ucode_call(3));
ucv_put(val);
ucv_gc(vm);
}
@@ -911,6 +914,8 @@ void hostapd_ucode_free_bss(struct hostapd_data *hapd)
uc_value_push(ucv_string_new(hapd->conf->iface));
uc_value_push(ucv_get(val));
ucv_put(wpa_ucode_call(2));
ucv_put(val);
ucv_gc(vm);
}
@@ -923,10 +928,11 @@ void hostapd_ucode_apup_newpeer(struct hostapd_data *hapd, const char *ifname)
return;
val = hostapd_ucode_bss_get_uval(hapd);
uc_value_push(ucv_get(ucv_string_new(hapd->conf->iface))); // BSS ifname
uc_value_push(ucv_string_new(hapd->conf->iface)); // BSS ifname
uc_value_push(ucv_get(val));
uc_value_push(ucv_get(ucv_string_new(ifname))); // APuP peer ifname
uc_value_push(ucv_string_new(ifname)); // APuP peer ifname
ucv_put(wpa_ucode_call(2));
ucv_put(val);
ucv_gc(vm);
}
#endif // def CONFIG_APUP

View File

@@ -171,7 +171,7 @@ uc_value_t *uc_wpa_freq_info(uc_vm_t *vm, size_t nargs)
ucv_object_add(ret, "op_class", ucv_int64_new(op_class));
ucv_object_add(ret, "channel", ucv_int64_new(channel));
ucv_object_add(ret, "hw_mode", ucv_int64_new(hw_mode));
ucv_object_add(ret, "hw_mode_str", ucv_get(ucv_string_new(modestr)));
ucv_object_add(ret, "hw_mode_str", ucv_string_new(modestr));
ucv_object_add(ret, "sec_channel", ucv_int64_new(sec_channel));
ucv_object_add(ret, "frequency", ucv_int64_new(freq_val));
@@ -425,7 +425,7 @@ uc_value_t *wpa_ucode_global_init(const char *name, uc_resource_type_t *global_t
uc_vm_registry_set(&vm, "hostap.global", global);
proto = ucv_prototype_get(global);
ucv_object_add(proto, "data", ucv_get(ucv_object_new(&vm)));
ucv_object_add(proto, "data", ucv_object_new(&vm));
#define ADD_CONST(x) ucv_object_add(proto, #x, ucv_int64_new(x))
ADD_CONST(MSG_EXCESSIVE);
@@ -470,6 +470,7 @@ uc_value_t *wpa_ucode_registry_remove(uc_value_t *reg, int idx)
if (!val)
return NULL;
ucv_get(val);
ucv_array_set(reg, idx - 1, NULL);
dataptr = ucv_resource_dataptr(val, NULL);
if (dataptr)

View File

@@ -20,7 +20,7 @@ wpas_ucode_iface_get_uval(struct wpa_supplicant *wpa_s)
uc_value_t *val;
if (wpa_s->ucode.idx)
return wpa_ucode_registry_get(iface_registry, wpa_s->ucode.idx);
return ucv_get(wpa_ucode_registry_get(iface_registry, wpa_s->ucode.idx));
val = uc_resource_new(iface_type, wpa_s);
wpa_s->ucode.idx = wpa_ucode_registry_add(iface_registry, val);
@@ -36,9 +36,9 @@ wpas_ucode_update_interfaces(void)
int i;
for (wpa_s = wpa_global->ifaces; wpa_s; wpa_s = wpa_s->next)
ucv_object_add(ifs, wpa_s->ifname, ucv_get(wpas_ucode_iface_get_uval(wpa_s)));
ucv_object_add(ifs, wpa_s->ifname, wpas_ucode_iface_get_uval(wpa_s));
ucv_object_add(ucv_prototype_get(global), "interfaces", ucv_get(ifs));
ucv_object_add(ucv_prototype_get(global), "interfaces", ifs);
ucv_gc(vm);
}
@@ -49,8 +49,8 @@ void wpas_ucode_add_bss(struct wpa_supplicant *wpa_s)
if (wpa_ucode_call_prepare("iface_add"))
return;
uc_value_push(ucv_get(ucv_string_new(wpa_s->ifname)));
uc_value_push(ucv_get(wpas_ucode_iface_get_uval(wpa_s)));
uc_value_push(ucv_string_new(wpa_s->ifname));
uc_value_push(wpas_ucode_iface_get_uval(wpa_s));
ucv_put(wpa_ucode_call(2));
ucv_gc(vm);
}
@@ -67,9 +67,10 @@ void wpas_ucode_free_bss(struct wpa_supplicant *wpa_s)
if (wpa_ucode_call_prepare("iface_remove"))
return;
uc_value_push(ucv_get(ucv_string_new(wpa_s->ifname)));
uc_value_push(ucv_string_new(wpa_s->ifname));
uc_value_push(ucv_get(val));
ucv_put(wpa_ucode_call(2));
ucv_put(val);
ucv_gc(vm);
}
@@ -86,9 +87,9 @@ void wpas_ucode_update_state(struct wpa_supplicant *wpa_s)
return;
state = wpa_supplicant_state_txt(wpa_s->wpa_state);
uc_value_push(ucv_get(ucv_string_new(wpa_s->ifname)));
uc_value_push(ucv_string_new(wpa_s->ifname));
uc_value_push(ucv_get(val));
uc_value_push(ucv_get(ucv_string_new(state)));
uc_value_push(ucv_string_new(state));
ucv_put(wpa_ucode_call(3));
ucv_gc(vm);
}
@@ -108,9 +109,9 @@ void wpas_ucode_event(struct wpa_supplicant *wpa_s, int event, union wpa_event_d
if (wpa_ucode_call_prepare("event"))
return;
uc_value_push(ucv_get(ucv_string_new(wpa_s->ifname)));
uc_value_push(ucv_string_new(wpa_s->ifname));
uc_value_push(ucv_get(val));
uc_value_push(ucv_get(ucv_string_new(event_to_string(event))));
uc_value_push(ucv_string_new(event_to_string(event)));
val = ucv_object_new(vm);
uc_value_push(ucv_get(val));
@@ -212,15 +213,14 @@ uc_wpas_iface_status(uc_vm_t *vm, size_t nargs)
{
struct wpa_supplicant *wpa_s = uc_fn_thisval("wpas.iface");
struct wpa_bss *bss;
uc_value_t *ret, *val;
uc_value_t *ret;
if (!wpa_s)
return NULL;
ret = ucv_object_new(vm);
val = ucv_string_new(wpa_supplicant_state_txt(wpa_s->wpa_state));
ucv_object_add(ret, "state", ucv_get(val));
ucv_object_add(ret, "state", ucv_string_new(wpa_supplicant_state_txt(wpa_s->wpa_state)));
bss = wpa_s->current_bss;
if (bss) {

View File

@@ -75,9 +75,9 @@ get_config_restart_hash() {
export -n "$var=$_hash"
}
get_config_cid_ifaces() {
get_interface_csv() {
local _ifaces
config_get _ifaces 'config' "$2"
config_get _ifaces "$2" "$3"
local _iface _ifnames=""
# Set noglob to prevent '*' capturing diverse file names in the for ... in
@@ -98,6 +98,21 @@ get_config_cid_ifaces() {
export -n "${1}=$_ifnames"
}
add_custom_tlv_callback()
{
# syntax: configure [ports ethX[,…]] lldp custom-tlv [add|replace] oui XX,XX,XX subtype XX oui-info XX[,XX,...]
# ex: configure ports br-lan,eth0 lldp custom-tlv replace oui 33,44,55 subtype 254 oui-info 55,55,55,55,55
# ex: configure lldp custom-tlv oui 33,44,44 subtype 232
local _ports
local _tlv
# CSV of device ports
get_interface_csv _ports "$1" 'ports'
config_get _tlv "$1" 'tlv'
echo "configure ${_ports:+ports $_ports }lldp custom-tlv $_tlv" >> "$LLDPD_CONF"
}
write_lldpd_conf()
{
local lldp_description
@@ -109,7 +124,7 @@ write_lldpd_conf()
config_get lldp_hostname 'config' 'lldp_hostname' "$(cat /proc/sys/kernel/hostname)"
local ifnames
get_config_cid_ifaces ifnames "interface"
get_interface_csv ifnames 'config' "interface"
local lldp_mgmt_ip
config_get lldp_mgmt_ip 'config' 'lldp_mgmt_ip'
@@ -197,6 +212,9 @@ write_lldpd_conf()
[ "$lldp_mgmt_addr_advertisements" -gt 0 ] && echo "configure lldp management-addresses-advertisements" >> "$LLDPD_CONF" ||\
echo "unconfigure lldp management-addresses-advertisements" >> "$LLDPD_CONF"
# Custom TLV handling
config_foreach add_custom_tlv_callback 'custom-tlv'
# Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR
[ -e "$LLDPD_CONFS_DIR" ] || ln -s /etc/lldpd.d "$LLDPD_CONFS_DIR"
}
@@ -335,7 +353,7 @@ start_service() {
# ChassisID interfaces
local ifnames
get_config_cid_ifaces ifnames "cid_interface"
get_interface_csv ifnames 'config' "cid_interface"
[ -n "$ifnames" ] && procd_append_param command -C "$ifnames"

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=omcproxy
PKG_RELEASE:=9
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/omcproxy.git
PKG_MIRROR_HASH:=61f03d76b14149e417360b6aaa630e920b75a31a6a497353b7160b3a374b20b2
PKG_SOURCE_DATE:=2021-11-04
PKG_SOURCE_VERSION:=bfba2aa75802ff1a70ef2fd3eba53409a8c6e93a
PKG_MIRROR_HASH:=b18c6dcc323dc35cfeb3503562dd3d8b9fb27fcf6ddd98690a64bd709920ff3d
PKG_SOURCE_DATE:=2025-02-27
PKG_SOURCE_VERSION:=582cd8d3ae7e6af0073ce1d9198387af48affd60
PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
PKG_LICENSE:=Apache-2.0

View File

@@ -12,9 +12,9 @@ PKG_RELEASE:=1
PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2024-09-17
PKG_SOURCE_VERSION:=fbaca4b6f530d4b2f361ee15c266aa19a708242b
PKG_MIRROR_HASH:=e3fc47a019ea54722b8d7dfc8158307a9fb4a9d18945a1a6794616e3b80d5d3b
PKG_SOURCE_DATE:=2025-02-10
PKG_SOURCE_VERSION:=c5ca22a71b2ecb83a2a28b46391dac443be315c2
PKG_MIRROR_HASH:=2d595fa1e58f028a7ff6813b110ee6bcbc8e6ccce81b2792200508c6db9c276a
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=LGPL-2.1

View File

@@ -35,6 +35,23 @@ start_service() {
procd_set_param command "$PROG"
[ -f /etc/seccomp/umdns.json ] && procd_set_param seccomp /etc/seccomp/umdns.json
procd_set_param respawn
procd_open_data
json_add_array firewall
for n in $network; do
json_add_object ""
json_add_string type rule
json_add_string proto udp
json_add_string src "$n"
json_add_int dest_port 5353
json_add_string target ACCEPT
json_close_object
done
json_close_array
procd_close_data
procd_open_trigger
procd_add_config_trigger "config.change" "umdns" /etc/init.d/umdns reload
for n in $network; do

View File

@@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=unetd
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/unetd.git
PKG_SOURCE_DATE:=2024-12-17
PKG_SOURCE_VERSION:=a0a2d80f3459425182a9f0e665d8ca8eff97c82f
PKG_MIRROR_HASH:=a6f07d91da40152b2af5b5b9d1d67d87a9991943147e47be6921c092ad7b49a3
PKG_SOURCE_DATE:=2025-03-09
PKG_SOURCE_VERSION:=6c9c8fbd81285a2cba7dd1c2c1ac2bf25ca99e27
PKG_MIRROR_HASH:=9dc06c945713a6a289ed0838ebe59e65b4fbb333e02d5159a8e87d29754808a6
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
@@ -32,7 +32,7 @@ define Package/unetd
SECTION:=net
CATEGORY:=Network
TITLE:=WireGuard based VPN connection manager for OpenWrt
DEPENDS:=+libubox +libubus +libblobmsg-json +libnl-tiny +kmod-wireguard +UNETD_VXLAN_SUPPORT:libbpf
DEPENDS:=+libubox +libubus +libudebug +libblobmsg-json +libnl-tiny +kmod-wireguard +UNETD_VXLAN_SUPPORT:libbpf
endef
define Package/unetd/config
@@ -40,6 +40,7 @@ define Package/unetd/config
bool "VXLAN support"
depends on PACKAGE_unetd
depends on HAS_BPF_TOOLCHAIN
select NEED_BPF_TOOLCHAIN
default y
endef

View File

@@ -18,6 +18,7 @@ proto_unet_init_config() {
proto_config_add_string domain
proto_config_add_boolean dht
proto_config_add_array "tunnels:list(string)"
proto_config_add_array "local_network:list(string)"
proto_config_add_array "connect:list(string)"
proto_config_add_array "peer_data:list(string)"
no_device=1
@@ -25,6 +26,17 @@ proto_unet_init_config() {
no_proto_task=1
}
add_array() {
local name="$1"
local val="$2"
json_add_array "$name"
for c in $val; do
json_add_string "" "$c"
done
json_close_array
}
proto_unet_setup() {
local config="$1"
@@ -33,6 +45,7 @@ proto_unet_setup() {
json_get_values tunnels tunnels
json_get_values connect connect
json_get_values peer_data peer_data
json_get_values local_network local_network
device="${device:-$config}"
[ -n "$auth_key" ] && type="${type:-dynamic}"
@@ -58,17 +71,9 @@ proto_unet_setup() {
done
json_close_object
json_add_array auth_connect
for c in $connect; do
json_add_string "" "$c"
done
json_close_array
json_add_array peer_data
for c in $peer_data; do
json_add_string "" "$c"
done
json_close_array
add_array local_network "$local_network"
add_array auth_connect "$connect"
add_array peer_data "$peer_data"
ip link del dev "$device" >/dev/null 2>&1
ip link add dev "$device" type wireguard || {

View File

@@ -8,13 +8,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ethtool
PKG_VERSION:=6.10
PKG_VERSION:=6.11
PKG_RELEASE:=1
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@KERNEL/software/network/ethtool
PKG_HASH:=cc613fe8a2bcddee17a1e6e0d763c0f3ea33c7e930658d2d7f601aa65e426a1f
PKG_HASH:=8d91f5c72ae3f25b7e88d4781279dcb320f71e30058914370b1c574c96b31202
PKG_LICENSE:=GPL-2.0
PKG_LICENSE_FILES:=COPYING
@@ -57,6 +57,11 @@ else
CONFIGURE_ARGS += --disable-netlink --disable-pretty-dump
endif
# enable support for input_xfrm with kernels newer than 6.6
ifeq ($(CONFIG_LINUX_6_6),)
CONFIGURE_ARGS += --enable-rss-input-xfrm
endif
define Package/ethtool/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ethtool $(1)/usr/sbin

View File

@@ -0,0 +1,67 @@
From c88eb6f4e9b2d8f71f3391db2bf0ec82ecccae81 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Wed, 12 Feb 2025 04:12:42 +0000
Subject: [PATCH] ethtool: make building for RSS input xfrm optional
Unfortunately there is no way to detect at runtime if the kernel the
support for RSS input transformation, and the default value
RXH_XFRM_NO_CHANGE (0xff) used by newer ethtool results in breakage
with older kernels.
As a stop-gap solution simply don't compile with support for input
xfrm by default.
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
configure.ac | 10 ++++++++++
ethtool.c | 10 ++++++++++
2 files changed, 20 insertions(+)
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,16 @@ if test x$enable_pretty_dump = xyes; the
fi
AM_CONDITIONAL([ETHTOOL_ENABLE_PRETTY_DUMP], [test x$enable_pretty_dump = xyes])
+AC_ARG_ENABLE(rss-input-xfrm,
+ [ --enable-rss-input-xfrm build with support for RSS input transformation (disabled by default)],
+ ,
+ enable_rss_input_xfrm=no)
+if test x$enable_rss_input_xfrm = xyes; then
+ AC_DEFINE(ETHTOOL_ENABLE_RSS_INPUT_XFRM, 1,
+ [Define this to enable building with support for RSS input transformation.])
+fi
+AM_CONDITIONAL([ETHTOOL_ENABLE_RSS_INPUT_XFRM], [test x$enable_rss_input_xfrm = xyes])
+
AC_ARG_WITH([bash-completion-dir],
AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
[Install the bash-completion script in this directory. @<:@default=yes@:>@]),
--- a/ethtool.c
+++ b/ethtool.c
@@ -4109,9 +4109,11 @@ static int do_grxfh(struct cmd_context *
(const char *)hfuncs->data + i * ETH_GSTRING_LEN,
(rss->hfunc & (1 << i)) ? "on" : "off");
+#ifdef ETHTOOL_ENABLE_RSS_INPUT_XFRM
printf("RSS input transformation:\n");
printf(" symmetric-xor: %s\n",
(rss->input_xfrm & RXH_XFRM_SYM_XOR) ? "on" : "off");
+#endif
out:
free(hfuncs);
@@ -4431,7 +4433,15 @@ static int do_srxfh(struct cmd_context *
rss->cmd = ETHTOOL_SRSSH;
rss->rss_context = rss_context;
rss->hfunc = req_hfunc;
+#ifdef ETHTOOL_ENABLE_RSS_INPUT_XFRM
rss->input_xfrm = req_input_xfrm;
+#else
+ if (req_input_xfrm != 0xff) {
+ perror("Compiled for kernel without support for input transformation");
+ err = 1;
+ goto free;
+ }
+#endif
if (delete) {
rss->indir_size = rss->key_size = 0;
} else {

1
package/openclash Submodule

Submodule package/openclash added at 74ce817f0a

Submodule package/openwrt-app-actions added at c9d3102b69

1
package/pcat-manager Submodule

Submodule package/pcat-manager added at 0149b47808

View File

@@ -7,7 +7,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ca-certificates
PKG_VERSION:=20240203
PKG_VERSION:=20241223
PKG_RELEASE:=1
PKG_MAINTAINER:=
@@ -16,7 +16,7 @@ PKG_LICENSE_FILES:=debian/copyright
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=@DEBIAN/pool/main/c/ca-certificates
PKG_HASH:=3286d3fc42c4d11b7086711a85f865b44065ce05cf1fb5376b2abed07622a9c6
PKG_HASH:=dd8286d0a9dd35c756fea5f1df3fed1510fb891f376903891b003cd9b1ad7e03
PKG_INSTALL:=1
include $(INCLUDE_DIR)/package.mk

View File

@@ -69,12 +69,10 @@ struct bootcounter {
uint32_t checksum;
};
static char page[2048];
int mtd_resetbc(const char *mtd)
{
struct mtd_info_user mtd_info;
struct bootcounter *curr = (struct bootcounter *)page;
struct bootcounter *curr = NULL;
unsigned int i;
unsigned int bc_offset_increment;
int last_count = 0;
@@ -108,24 +106,37 @@ int mtd_resetbc(const char *mtd)
}
num_bc = mtd_info.size / bc_offset_increment;
curr = malloc(bc_offset_increment);
if(curr == NULL) {
DLOG_ERR("Failed to allocate %u bytes from memory.", bc_offset_increment);
retval = -6;
goto out;
}
for (i = 0; i < num_bc; i++) {
pread(fd, curr, sizeof(*curr), i * bc_offset_increment);
ret = pread(fd, curr, sizeof(struct bootcounter), i * bc_offset_increment);
if(ret != sizeof(struct bootcounter)) {
DLOG_ERR("Failed to read boot-count log at offset 0x%08x.", i * bc_offset_increment);
retval = -5;
goto out;
}
/* Existing code assumes erase is to 0xff; left as-is (2019) */
if (curr->magic == 0xffffffff)
break;
if (curr->magic != BOOTCOUNT_MAGIC &&
curr->magic != 0xffffffff) {
DLOG_ERR("Unexpected magic %08x at offset %08x; aborting.",
curr->magic, i * bc_offset_increment);
if (curr->magic != BOOTCOUNT_MAGIC || curr->checksum != curr->magic + curr->count) {
DLOG_ERR("Unexpected boot-count log at offset 0x%08x: magic 0x%08x boot count 0x%08x checksum 0x%08x; aborting.",
i * bc_offset_increment, curr->magic, curr->count, curr->checksum);
retval = -2;
goto out;
}
if (curr->magic == 0xffffffff)
break;
last_count = curr->count;
}
@@ -182,6 +193,9 @@ int mtd_resetbc(const char *mtd)
}
out:
if (curr != NULL)
free(curr);
close(fd);
return retval;
}

View File

@@ -3,13 +3,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bcm27xx-utils
PKG_VERSION:=2024.12.19
PKG_VERSION:=2025.03.14
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/raspberrypi/utils.git
PKG_SOURCE_VERSION:=0c02957911da1c661be201236c4f2a2be1778b3e
PKG_MIRROR_HASH:=8bc87c929726a13d3d3e16157033d13f78a1f85d548db131c45c3a4cbdd1e402
PKG_SOURCE_VERSION:=685afa8c0d6f2310eaefe1b528627a8bf3154ca0
PKG_MIRROR_HASH:=04528742fc5b55ba31f448a27588a9df707cbcc27823c1d219b7f877dd4ac200
PKG_FLAGS:=nonshared
PKG_BUILD_FLAGS:=no-lto

View File

@@ -48,7 +48,7 @@ define Package/busybox/Default
MAINTAINER:=Felix Fietkau <nbd@nbd.name>
TITLE:=Core utilities for embedded Linux
URL:=http://busybox.net/
DEPENDS:=+BUSYBOX_CONFIG_PAM:libpam +BUSYBOX_CONFIG_NTPD:jsonfilter
DEPENDS:=+BUSYBOX_CONFIG_PAM:libpam +BUSYBOX_CONFIG_NTPD:jsonfilter +(USE_GLIBC&&BUSYBOX_CONFIG_FEATURE_MOUNT_NFS)||(USE_GLIBC&&BUSYBOX_CONFIG_FEATURE_INETD_RPC):libtirpc
USERID:=ntp=123:ntp=123
endef
@@ -104,6 +104,13 @@ ifeq ($(CONFIG_USE_GLIBC),y)
LDLIBS += $(call BUSYBOX_IF_ENABLED,NSLOOKUP,resolv)
endif
ifneq ($(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_MOUNT_NFS)$(CONFIG_BUSYBOX_$(BUSYBOX_SYM)_FEATURE_INETD_RPC),)
ifndef CONFIG_USE_MUSL
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/tirpc
LDLIBS += tirpc
endif
endif
ifeq ($(BUILD_VARIANT),selinux)
LDLIBS += selinux sepol
endif

View File

@@ -5,9 +5,9 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/jsonpath.git
PKG_SOURCE_DATE:=2024-01-23
PKG_SOURCE_VERSION:=594cfa86469c005972ba750614f5b3f1af84d0f6
PKG_MIRROR_HASH:=2f455f04fbfcdb4c81cccd23475b47395f847db44aa4bd9a1007b9aa0ab7fd19
PKG_SOURCE_DATE:=2025-04-18
PKG_SOURCE_VERSION:=8a86fb78235b5d7925b762b7b0934517890cc034
PKG_MIRROR_HASH:=06b763387d00faae0e62af68626588ff2b8f12e0e6821950ae5422033df32757
CMAKE_INSTALL:=1
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>

View File

@@ -8,17 +8,18 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ucode
PKG_RELEASE:=3
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/jow-/ucode.git
PKG_SOURCE_DATE:=2024-07-22
PKG_SOURCE_VERSION:=b610860dd4a0591ff586dd71a50f556a0ddafced
PKG_MIRROR_HASH:=a5ec51dd989174422d3b19b022ff4f863d57eb559c9f08d54c0d10651f598357
PKG_SOURCE_DATE:=2025-02-10
PKG_SOURCE_VERSION:=a8a11aea0c093d669bb3c45f604dab3c291c8d25
PKG_MIRROR_HASH:=e08c36818a72eb2953b56300207d1fb7a852ada33df36f63a495ad35ca21b88e
PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
PKG_LICENSE:=ISC
PKG_ABI_VERSION:=20230711
PKG_BUILD_DEPENDS:=libmd
HOST_BUILD_DEPENDS:=libjson-c/host
include $(INCLUDE_DIR)/package.mk
@@ -51,7 +52,8 @@ CMAKE_HOST_OPTIONS += \
-DUCI_SUPPORT=OFF \
-DULOOP_SUPPORT=OFF \
-DDEBUG_SUPPORT=ON \
-DLOG_SUPPORT=OFF
-DLOG_SUPPORT=OFF \
-DDIGEST_SUPPORT=OFF
define Package/ucode/default
@@ -178,6 +180,10 @@ $(eval $(call UcodeModule, \
uloop, ULOOP_SUPPORT, +libubox, \
The uloop module allows ucode scripts to interact with OpenWrt uloop event loop implementation.))
$(eval $(call UcodeModule, \
digest, DIGEST_SUPPORT, , \
The digest module allows ucode scripts to use libmd digests.))
$(eval $(call BuildPackage,libucode))
$(eval $(call BuildPackage,ucode))

View File

@@ -1,40 +0,0 @@
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -2868,6 +2868,9 @@ enum nl80211_commands {
* nested item, it contains attributes defined in
* &enum nl80211_if_combination_attrs.
*
+ * @NL80211_ATTR_VIF_RADIO_MASK: Bitmask of allowed radios (u32).
+ * A value of 0 means all radios.
+ *
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@@ -3416,6 +3419,8 @@ enum nl80211_attrs {
NL80211_ATTR_WIPHY_RADIOS,
NL80211_ATTR_WIPHY_INTERFACE_COMBINATIONS,
+ NL80211_ATTR_VIF_RADIO_MASK,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
--- a/lib/nl80211.c
+++ b/lib/nl80211.c
@@ -829,7 +829,7 @@ static const uc_nl_nested_spec_t nl80211
static const uc_nl_nested_spec_t nl80211_msg = {
.headsize = 0,
- .nattrs = 128,
+ .nattrs = 129,
.attrs = {
{ NL80211_ATTR_4ADDR, "4addr", DT_U8, 0, NULL },
{ NL80211_ATTR_AIRTIME_WEIGHT, "airtime_weight", DT_U16, 0, NULL },
@@ -959,6 +959,7 @@ static const uc_nl_nested_spec_t nl80211
{ NL80211_ATTR_MAX_AP_ASSOC_STA, "max_ap_assoc", DT_U16, 0, NULL },
{ NL80211_ATTR_SURVEY_INFO, "survey_info", DT_NESTED, 0, &nl80211_survey_info_nla },
{ NL80211_ATTR_WIPHY_RADIOS, "radios", DT_NESTED, DF_MULTIPLE|DF_AUTOIDX, &nl80211_wiphy_radio_nla },
+ { NL80211_ATTR_VIF_RADIO_MASK, "vif_radio_mask", DT_U32, 0, NULL },
}
};

View File

@@ -157,12 +157,12 @@ my %update_method = (
'src-git' => {
'init' => "git clone --depth 1 '%s' '%s'",
'init_branch' => "git clone --depth 1 --branch '%s' '%s' '%s'",
'init_commit' => "git clone '%s' '%s' && cd '%s' && git checkout -b '%s' '%s' && cd -",
'init_commit' => "git clone --depth 1 '%s' '%s' && cd '%s' && git fetch --depth=1 origin '%s' && git -c advice.detachedHead=false checkout '%s' && cd -",
'update' => "git pull --ff-only",
'update_rebase' => "git pull --rebase=merges",
'update_stash' => "git pull --rebase=merges --autostash",
'update_force' => "git pull --ff-only || (git reset --hard HEAD; git pull --ff-only; exit 1)",
'post_update' => "git submodule update --init --recursive",
'post_update' => "git submodule update --init --recursive --depth 1",
'controldir' => ".git",
'revision' => "git rev-parse HEAD | tr -d '\n'"},
'src-git-full' => {

View File

@@ -79,7 +79,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Disable forwarding by default on all ports */
mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
@@ -2783,6 +2788,28 @@ static void mt7988_mac_port_get_caps(str
@@ -2779,6 +2784,28 @@ static void mt7988_mac_port_get_caps(str
}
}
@@ -108,7 +108,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void
mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
phy_interface_t interface)
@@ -3220,6 +3247,16 @@ const struct mt753x_info mt753x_table[]
@@ -3216,6 +3243,16 @@ const struct mt753x_info mt753x_table[]
.phy_write_c45 = mt7531_ind_c45_phy_write,
.mac_port_get_caps = mt7988_mac_port_get_caps,
},

View File

@@ -122,7 +122,7 @@
};
/* Uart divisor latch read */
@@ -2880,6 +2888,12 @@ serial8250_do_set_termios(struct uart_po
@@ -2889,6 +2897,12 @@ serial8250_do_set_termios(struct uart_po
serial8250_set_divisor(port, baud, quot, frac);

View File

@@ -9,3 +9,7 @@
compatible = "mikrotik,routerboard-911g-xhpnd", "qca,ar9342";
model = "MikroTik RouterBOARD 911G-(2,5)HPnD";
};
&ref {
clock-frequency = <25000000>;
};

View File

@@ -146,10 +146,6 @@
};
};
&ref {
clock-frequency = <40000000>;
};
&spi {
status = "okay";

View File

@@ -10,6 +10,10 @@
model = "MikroTik RouterBOARD 912UAG-(2,5)HPnD";
};
&ref {
clock-frequency = <40000000>;
};
&pcie {
status = "okay";
};

View File

@@ -8,6 +8,7 @@ endef
define Device/nec-netbsd-aterm
DEVICE_VENDOR := NEC
LOADER_TYPE := bin
LZMA_TEXT_START := 0x82800000
KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
ARTIFACTS := uboot.bin

View File

@@ -16,16 +16,16 @@ Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
--- a/drivers/mfd/syscon.c
+++ b/drivers/mfd/syscon.c
@@ -52,7 +52,7 @@ static struct syscon *of_syscon_register
@@ -53,7 +53,7 @@ static struct syscon *of_syscon_register
int ret;
struct regmap_config syscon_config = syscon_regmap_config;
struct resource res;
- struct reset_control *reset;
+ struct reset_control *reset = NULL;
syscon = kzalloc(sizeof(*syscon), GFP_KERNEL);
if (!syscon)
@@ -134,7 +134,8 @@ static struct syscon *of_syscon_register
WARN_ON(!mutex_is_locked(&syscon_list_lock));
@@ -133,7 +133,8 @@ static struct syscon *of_syscon_register
goto err_attach_clk;
}

View File

@@ -350,7 +350,7 @@ SVN-Revision: 35130
list_for_each_entry(p, head, list) {
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -622,48 +622,53 @@ static void tcp_options_write(struct tcp
@@ -625,48 +625,53 @@ static void tcp_options_write(struct tcp
u16 options = opts->options; /* mungable copy */
if (unlikely(OPTION_MD5 & options)) {
@@ -427,7 +427,7 @@ SVN-Revision: 35130
}
if (unlikely(opts->num_sack_blocks)) {
@@ -671,16 +676,17 @@ static void tcp_options_write(struct tcp
@@ -674,16 +679,17 @@ static void tcp_options_write(struct tcp
tp->duplicate_sack : tp->selective_acks;
int this_sack;
@@ -451,7 +451,7 @@ SVN-Revision: 35130
}
tp->rx_opt.dsack = 0;
@@ -693,13 +699,14 @@ static void tcp_options_write(struct tcp
@@ -696,13 +702,14 @@ static void tcp_options_write(struct tcp
if (foc->exp) {
len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
@@ -751,7 +751,7 @@ SVN-Revision: 35130
EXPORT_SYMBOL(xfrm_parse_spi);
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4262,14 +4262,16 @@ static bool tcp_parse_aligned_timestamp(
@@ -4268,14 +4268,16 @@ static bool tcp_parse_aligned_timestamp(
{
const __be32 *ptr = (const __be32 *)(th + 1);
@@ -858,7 +858,7 @@ SVN-Revision: 35130
--- a/net/ipv4/tcp_offload.c
+++ b/net/ipv4/tcp_offload.c
@@ -63,7 +63,7 @@ static struct sk_buff *__tcpv4_gso_segme
@@ -66,7 +66,7 @@ static struct sk_buff *__tcpv4_gso_segme
th2 = tcp_hdr(seg->next);
iph2 = ip_hdr(seg->next);
@@ -867,7 +867,7 @@ SVN-Revision: 35130
iph->daddr == iph2->daddr && iph->saddr == iph2->saddr)
return segs;
@@ -264,7 +264,7 @@ struct sk_buff *tcp_gro_lookup(struct li
@@ -267,7 +267,7 @@ struct sk_buff *tcp_gro_lookup(struct li
continue;
th2 = tcp_hdr(p);
@@ -876,7 +876,7 @@ SVN-Revision: 35130
NAPI_GRO_CB(p)->same_flow = 0;
continue;
}
@@ -330,8 +330,8 @@ struct sk_buff *tcp_gro_receive(struct l
@@ -333,8 +333,8 @@ struct sk_buff *tcp_gro_receive(struct l
~(TCP_FLAG_CWR | TCP_FLAG_FIN | TCP_FLAG_PSH));
flush |= (__force int)(th->ack_seq ^ th2->ack_seq);
for (i = sizeof(*th); i < thlen; i += 4)

View File

@@ -89,7 +89,7 @@ Signed-off-by: Maxime Ripard <maxime@cerno.tech>
commit->event = kzalloc(sizeof(*commit->event),
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7280,6 +7280,19 @@ int intel_atomic_commit(struct drm_devic
@@ -7297,6 +7297,19 @@ int intel_atomic_commit(struct drm_devic
state->base.legacy_cursor_update = false;
}

Some files were not shown because too many files have changed in this diff Show More