Add support for V3 of the Engenius EWS2910P PoE switch. Like its v1
brother, This is an RTL8380 based switch with two SFP slots, and PoE
802.3af one every RJ-45 port.
Unlike its older brother, the max budget is 55W instead of 61.6 W.
Investigation into the communication protocol with the PoE controller
is ongoing, though it appears the vendor firmware configures the PSE
with a per-port budget of 30.0W.
Specifications:
---------------
* SoC: Realtek RTL8380M
* Flash: 32 MiB SPI flash Macronix MX25L25635E
* RAM: 256 MiB (As reported by bootloader)
* Ethernet: 8x 10/100/1000 Mbps with PoE
2x SFP slots
* Buttons: 1 "Reset" button on front panel
1 "LED mode: button on front panel
1 "On/Off" Toggle switch on the back
* Power: 48V-54V DC barrel jack
* UART: 1 serial header (JP1) with populated 2.54mm pitch header
Labeled GRTV for ground, rx, tx, and 3.3V respectively
* PoE: 1 STM ST32... microcontroller (U15)
1 RTL8238B PSE controller
Works:
------
- (8) RJ-45 ethernet ports
- Switch functions
- LEDs and buttons
Not yet enabled:
----------------
- Power-over-Ethernet (requires realtek-poe support for RTL8232B)
Install via web interface:
-------------------------
The factory firmware will accept and flash the initramfs image. It is
recommended to flash to "Partition 0". Flashing to "Partition 1" is
not supported at this point.
The factory web GUI will show the following warning:
" Warning: The firmware version is v0.00.00-c0.0.00
The firmware image you are uploading is older than the current
firmware of the switch. The device will reset back to default
settings. Are you sure you want to proceed?"
This is expected when flashing OpenWrt. After the initramfs image
boots, flash the -sysupgrade using either the commandline or LuCI.
Install via serial console/tftp:
--------------------------------
See commit 2cfaab4549f5 ("realtek: add support for EnGenius EWS2910P").
realtek: engenius_ews2910p: support multiple hardware versions
When the Engenius EWS-2910P was added, only v1 was known. Move the
common parts to a dtsi, and split up the support to acccount for the
hardware version.
On v3, for example, the root partition uses a different uImage magic.
Add a "engenius,ews2910p-v1" compatible, while leaving the legacy
"engenius,ews2910p" to also mean v1.
sysupgrade: create 10_disable_services w/ fixed modified time
Every time "sysupgrade -b -" runs it would generate a new
(synthetic) "/etc/uci-defaults/10_disable_services" file with
the current time as the modified time. This unfortunately
creates a non-deterministic tarball, so if you run a cron job
to save your state, you don't have a trivial way of seeing if
it changed or not without unpacking the archive, deleting this
file, and comparing the entire directory tree to the previous
backup.
Fixes: #16145 Fixes: 0ad062a21b ("base-files: sysupgrade: include uci-defaults script disabling services #2") Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
Felix Fietkau [Thu, 22 May 2025 08:09:41 +0000 (10:09 +0200)]
hostapd: tweak ACS retry behavior
When running ACS on multi-radio devices, ACS on one band can block another.
Increase the number of retries and prevent bouncing interfaces between AP
and STA mode during attempts.
realtek: enhance & harmonize dsa/phy max port patches
DSA silently drops internal phy access to ports >= 32 in dsa_user_phy_read()
and dsa_user_phy_write(). The code shows:
static int dsa_user_phy_read(struct mii_bus *bus, int addr, int reg)
{
struct dsa_switch *ds = bus->priv;
if (ds->phys_mii_mask & (1 << addr))
return ds->ops->phy_read(ds, addr, reg);
return 0xffff;
}
With ds->phys_mii_mask being a 32 bit variable the reason is clear. So do
not only increase the max values but also adapt the needed bitmasks in
the dsa and phy code. This fixes the dsa_user_ports() and dsa_cpu_ports()
too.
While we are here combine the old separated patches because dsa, mdio and
phy are tigthly coupled.
qualcommbe: v6.12: enable 2.5G and 10G phylink modes in pcs-qcom-ipq9574
The PCS driver in the 6.12 patchset is the v5 submission (see link
below). It solves a number of issues and crashes with teh pcs driver
from the 6.6 patchset. However, this new driver is missing support for
"10gbase-r", "10g-qxgmii", and 1000/2500base-x modes.
Port these modes to the 6.12 patchset. "2500base-x" in particular seems
to be needed to establish a 2.5G link on phy-mode="usxgmii";
Now that patches for v6.12 are available, add the config, and enable
6.12 as a testing kernel.
Compared to v6.6 the patches to add "10gbase-r", "2500base-x",
"1000base-x", and "10g-qxgmii" modes have not been ported yet. They do
not apply cleanly to the new PCS driver. As the currently supported
hardware does not use those modes, it is not possible to test them at
this time.
Add the second part of the PPE driver. This includes the EDMA and
network device support. This part does not appear to have been
officially submitted for upstream review. The series is taken from
target/linux/qualcommbe/patches-6.6, and had to be heavily modified
in order to compile of v6.12. Changes to patches are noted in the
respective patch body.
qualcommbe: v6.12: add pending PPE driver (part 1)
Add v3 submission of the qualcomm PPE driver. As of this writing, it
is the latest version. This lacks the EDMA driver and network device
support. That will be added in part 2.
qualcommbe: v6.12: add ethernet PCS driver for IPQ9574
Add the v5 of the PCS patch. This is the latest submission as of this
writing. THe last four patches are not part of the submission. They
make the series work with v6.12 kernel, resolve a circular dependency
with the clocks, and add the DTS node. Include them as bundle.
This driver is cherry-picked from target/linux/qualcommbe/patches-6.6.
While Qualcomm did submit past patches for QCA8084, the code has since
ben split from at803x. The existing OpenWRT version of the patch is
the cleanest version I could find. Add it here.
Add dts fixes from linux-next. Two patches from the NSSCC series are
still in -next did not yet land in mainline, as well as misc other DTS
changes. Add them here.
Add relevant patches from upstream, up to v5.16-rc6. The gaps in the
patch numbersing are either patches that were picked into the stable
kernel (6.12.y), or that are already backported in
target/linux/generic. The gaps makes it easy for me to pick these
patches from my working kernel git branch.
Generate network configuration replacing netmask with CIDR.
Depends on:
https://github.com/openwrt/openwrt/pull/13765
Using CIDR provides the following advantages:
* Consolidate notation for IPv4 and IPv6 addresses.
* Consolidate notation for IP addresses and routing targets.
* Simplify network configuration and troubleshooting.
* Follow the transition from net-tools to iproute2.
Resulting configuration example:
```
config interface 'loopback'
option device 'lo'
option proto 'static'
list ipaddr '127.0.0.1/8'
config interface 'lan'
option device 'br-lan'
option proto 'static'
list ipaddr '192.168.1.1/24'
```
Zoltan HERPAI [Wed, 28 May 2025 21:03:14 +0000 (21:03 +0000)]
sunxi: cortexa53: enable rtc drivers
RTC has been disabled so far in the cortexa53 subtarget so far, enable
it. It's also required for the crypto trng/prng drivers on these SoC
variants (to gather IOSC noise).
Zoltan HERPAI [Thu, 29 May 2025 12:05:09 +0000 (12:05 +0000)]
kernel/pistachio: Restore kernel files for v6.6
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.
For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
Antti Seppälä [Sat, 10 May 2025 10:54:56 +0000 (13:54 +0300)]
qmi: increase SIM power-cycle timeouts
Some modems and SIM cards take a bit longer to initialize after UIM has been
powered off. Waiting too little time can cause the qmi protocol to end up
in a loop repeatedly power-cycling the SIM card.
Avoid that by
a) increasing the time we unconditionally sleep after --uim-power-on
b) increasing the time we allow uqmi to wait for response for --uim-get-sim-state
base-files: treat 'ipaddr is inside range' as warning again
The call to 'ipcalc' is used in 'dnsmasq' init script to create the
configuration. If the 'ipaddr' is in the configured range then 'ipcalc' exited
with an error whereby the START/STOP variables are unavailable.
This behaviour has changed during 'ipcalc' refactoring and now leads to a
problem when starting 'dnsmasq' if the 'ipaddr' is inside this range. To
restore the old behaviour, only a warning is issued as before and the
required variables for the 'dnsmasq' are still set.
Fixes: 854739b32c7f (base-files: ipcalc.sh: Rewrite in pure shell) Signed-off-by: Florian Eckert <fe@dev.tdt.de> Link: https://github.com/openwrt/openwrt/pull/18641 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
If the uci 'dhcp' configuration for the dhcp leases is incorrect then
the call to 'ipclac' fails. However, the problem is that the dnsmasq
configuration option 'dhcp-range' is still written for this uci section
even though the information generated by ipcalc is incorrect or not set.
Due to the incorrectly generated configuration for dnsmasq, the service
cannot start.
To prevent an incorrect configuration from being written to the configuration,
a check is now made beforehand to ensure that the required variables are
present and valid. If the configuration is incorrect, a message is emitted
to the log that this configuration section is incorrect and this uci
configuration section is omitted.
Sean Khan [Wed, 28 May 2025 08:48:14 +0000 (04:48 -0400)]
wifi-scripts: add missing 'network' property to wifi-iface schema
The ucode-based wifi interface validation is based on `hostapd.conf`
specific options, which means it's missing the OpenWrt-specific
'network' property.
This causes schema validation warnings like:
```
daemon.notice netifd: radio1 (1340): wifi-scripts: network is not present in the schema
```
The description is taken from the OpenWrt wiki:
https://openwrt.org/docs/guide-user/network/wifi/basic#common_options1
Jonas Jelonek [Wed, 28 May 2025 11:33:03 +0000 (11:33 +0000)]
generic: net: add pending wireguard patch to fix build with GCC15
This patch adds __nonstring annotation to address GCC15 with
-Wunterminated-string-initialization.
It is accepted in wireguard-linux in [1] and pending for v6.16
in [2].
Shiji Yang [Wed, 28 May 2025 11:06:00 +0000 (19:06 +0800)]
kernel: reorder kernel symbol configs
Sort kernel configuration files alphabetically. Also resolve the
"CONFIG_ARM_PAN" conflict introduced in commit 057a0a075edc ("generic: Fix up the v6.12 config for ARM"). Based on
the original PR comment[1], this symbol should be disabled by default.
Tony Ambardar [Mon, 30 Dec 2024 01:12:54 +0000 (17:12 -0800)]
kernel/malta: Restore kernel files for v6.6
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.
For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
Tony Ambardar [Mon, 27 Jan 2025 14:20:36 +0000 (06:20 -0800)]
package/zram: fix up Kconfig behaviour for kernel 6.12
The initial 6.12 merge leaves package/zram menuconfig behaviour confusing.
Selecting "kmod-zram" opens a submenu of the available algorithms to build
and the actual algo to use. However, when "lzo-rle" is shown as the default
used, it still remains missing from the available list. Only enabling a
_different_ compression algo to build will also reveal "lzo-rle" as
available.
Update the Kconfig to show "lzo-rle" as available if used/referenced.
Fixes: 4708057e27 ("package/zram: update for kernel 6.12") Signed-off-by: Tony Ambardar <itugrok@yahoo.com> Link: https://github.com/openwrt/openwrt/pull/18712 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
- Update subtarget configs for kernel 6.12.
- Refresh patches for kernel 6.12.
- Drop 210-revert-macronix-nand-block-protection.patch since brcmnand no longer
implements low level ops.
- Adapt bcm63268 gpio switches for 6.12 numbering.
- Add b53 pending patches from Jonas Gorski to fix system hangs.
This is an automatically generated commit which aids following kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.
For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
Felix Fietkau [Thu, 29 May 2025 11:28:03 +0000 (13:28 +0200)]
umdns: update to Git HEAD (2025-05-29)
263a0cb87b50 udebug: use proper libudebug API ca9b8765aea3 dns: rework packet API ea40cfdf7eb0 cache: send multiple queries in a single packet d62813727e53 cache: add explicit lookup for host addresses 0ce73d80dc0c dns: add cache/queue for outgoing queries 083be33749b1 cache: improve service refresh behavior 55d0c1bc1ac5 interface: ask for unicast responses by default ce508467a533 service: add support for setting service specific hostname 632953a1582d interface: when interface properties change, reinitialise 695ac3708aa0 ubus: fix ubus announcements txt fields cecbe1c0caae Make mdns responder case-insensitive. 2b28094d31ca dns: add support for reverse address mapping queries
Agustin Lorenzo [Tue, 22 Apr 2025 20:28:51 +0000 (22:28 +0200)]
hostapd: revert "ACS: Validate 6 GHz AP criteria before ACS"
By OpenWrt's design, hostapd runs in a single global instance for all radios supported by the device, rather than one instance per radio like hostapd usually does.
Commit f025af128002 ("uml: restore 6.6 config+patches") accidentally restored
uml config and patches on the root directory instead of the proper directory.
Zoltan HERPAI [Thu, 1 May 2025 13:32:14 +0000 (13:32 +0000)]
kernel/sunxi: Restore kernel files for v6.6
This is an automatically generated commit which aids following Kernel patch
history, as git will see the move and copy as a rename thus defeating the
purpose.
For the original discussion see:
https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
Now, the situation gets more confusing. Because from what I can tell,
this was seemingly done intenionally. Upstream patches in related areas:
|commit ddd268c42871b78c75e12a5c28207fb481138f41
|Author: Niklas Schnelle <schnelle@linux.ibm.com>
|Date: Wed Apr 3 14:43:00 2024 +0200
|
| um: Select HAS_IOREMAP for UML_IOMEM_EMULATION
|
| In a future patch HAS_IOPORT=n will disable inb()/outb() and friends at
| compile time. UML supports these via its UML_IOMEM_EMULATION so let that
| select HAS_IOPORT and also reflect this in NO_IOPORT_MAP.
hint that there's ongoing work in this area. But unfortunately, this future
hasn't arrived yet. Once this future arrives, please nuke this patch.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This includes the following changes:
- The selected x86_64 CPU is switched to generic instead of K8.
A backported patch is included from 6.13.
000-v6.13-asm-generic-io.h-rework-split-ioread64-iowrite64-hel.patch
|fixed the following build error:
| CC lib/iomap.o
|lib/iomap.c:156:5: error: no previous prototype for 'ioread64_lo_hi' [-Werror=missing-prototypes]
| 156 | u64 ioread64_lo_hi(const void __iomem *addr)
| | ^~~~~~~~~~~~~~
| [...]
Note: 102-pseudo-random-mac.patch will likely go away with the next stable.
UML is switching to a new networking infrastructure. The previous implementation
using tuntap, daemon, socket, ethertap, vde are being replaced by "vector"
transports tap, hybrid, raw, EoGRE, Eol2tpv3, fd, vde (vector!).
Please see, to checkout what will change:
<https://docs.kernel.org/virt/uml/user_mode_linux_howto_v2.html#setting-up-uml-networking>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
This should have been fixed by an upstream patch in 5.12
|commit ed102bf2afed226703eaf85a704755bdbea34583
|Author: Randy Dunlap <rdunlap@infradead.org>
|Date: Thu Apr 15 10:13:52 2021 -0700
|
| um: Fix W=1 missing-include-dirs warnings
|
| Currently when using "W=1" with UML builds, there are over 700 warnings
| cc1: warning: ./arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
|
| but arch/um/ does not have include/uapi/ at all, so add that
| subdir and put one Kbuild file into it (since git does not track
| empty subdirs).
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
this symbol got picked up by the 6.12 UML conversion.
CONFIG_FBNIC = FaceBook/Meta Platforms Host Network Interface
it should be disabled by default in generic.
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
mediatek: filogic: provide custom GPT table for Arcadyan Mozart
New revision Arcadyan Mozart apply a new partition table and moved the
factory partition to a new location. This conflicts with the standard
partition layout and also make the nvmem cells to not correctly identify
the MAC address anymore.
Generate and Provide a new GPT partition table that account for the new
calibration partition.
The previous revision of the Arcadyan Mozart device is considered
pre-production devices and should not be intended for real support.
uboot-mediatek: Add GPT table write command for Arcadyan Mozart
Add an additional bootmenu option and commands to overwrite the GPT
table with the custom one for upstream U-Boot.
This is needed as the pre-installed GPT table differ and updating the
GPT table is a requirement to install the upstream U-Boot (or the old
U-Boot will be loaded)
To make the migration to new U-Boot bootloader an user can now load the
system with mtk_uartboot and select "Load GPT Table ..." in conjunction
with other update command.
Due to the lack of direct GUI based update capability and dual-firmware
partition configuration, it is recommended to use TFTP + serial console
based approach (console is available in micro USB connector):
1. Set a static IP 192.168.1.1/24 on PC and start TFTP server with the
'...-factory.ubi' image renamed to 'firmware.bin'.
2. Make sure you can access board's serial console over micro USB.
3. Power up the device, hit any key to enter U-Boot CLI and issue below
commands.
3.1 Restore U-Boot's environment to default values (double check first
the '0:APPSBLENV' partition offset using 'smem' command):
sf probe
sf erase 0x510000 0x10000
saveenv
3.2 Download and install OpenWrt in both partitions and reset the board:
Linus Walleij [Fri, 2 May 2025 09:07:36 +0000 (11:07 +0200)]
generic: Fix up the v6.12 config for ARM
This adds a few ARM-related kconfig options that makes the
configure phase smooth on ARM (32bit) systems.
We default PAN to enabled for protection, however this has
a syscall speed penalty, if your system is interacting a lot
from userspace you might want to disable it for speed vs
security. For in-kernel routing it should not be a major
issue.
Some marginal ARM system enables DRM so make sure we have
the related DRM Kconfigs set up to unselected.
Tianling Shen [Fri, 24 Jan 2025 08:15:22 +0000 (16:15 +0800)]
mediatek: add ubootmod layout for cudy tr3000 v1
This allows us to use the full size of nand, which increases ubi size
from 64M to 122.25M.
If you are at factory firmware, please refer commit 63b8d98dd0d2 ("mediatek: add support for Cudy TR3000 v1")
to boot into OpenWrt initramfs (stock layout).
Flash instructions:
1. Login into the device and backup everything, especially 'Factory' part.
1. Unlock mtd partitions:
apk update && apk add kmod-mtd-rw
insmod mtd-rw i_want_a_brick=1
3. Write new BL2 and FIP
mtd write openwrt-mediatek-filogic-cudy_tr3000-v1-ubootmod-preloader.bin BL2
mtd write openwrt-mediatek-filogic-cudy_tr3000-v1-ubootmod-bl31-uboot.fip FIP
4. Set static IP on your PC:
IP 192.168.1.254/24, GW 192.168.1.1
5. Serve OpenWrt initramfs image using TFTP server.
6. Cut off the power and re-engage, wait for TFTP recovery to complete.
7. After OpenWrt has booted, perform sysupgrade.
Antti Seppälä [Tue, 27 May 2025 08:20:09 +0000 (11:20 +0300)]
umbim: add support for wwan device class
Some MBIM devices can exist on an MHI bus (over PCIe) instead of being presented as USB devices.
In such cases the interface name lookup needs to be done from /sys/class/wwan/ instead of /sys/class/usbmisc/
Add another readlink call in case the first lookup fails.
This allows the MBIM protocol to find the interface name and then work with both type of devices provided that /etc/config/network has the right device for MBIM interface (such as /dev/wwan0mbim0 in case of MHI)
Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
Sean Khan [Thu, 20 Feb 2025 02:09:26 +0000 (21:09 -0500)]
wifi-scripts: use consistent names for Qualcomm devices
The device manufacturer name for Qualcomm Atheros is listed
as "Qualcomm, Atheros" for PCI devices but "Qualcomm Atheros" under
"compatible". This gives inconsistent results in `iwinfo` and
realtek: align declaration/static/extern function definitions for dsa driver
In 2023 upstream has tightened compiler checks with this patch
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit
/scripts/Makefile.extrawarn?h=v6.15&id=0fcb70851fbfea1776ae62f67c503fef8f0292b9
A consistent function definition is now needed. I.e.
- functions must be either declared with "static" or
- functions need an additional declaration (in the header file)
Before upgrading the Realtek target to 6.12 clean the code so that the main
6.12 PR can focus on real issues from the version bump.