Calculating the backing serdes of a given frontend serdes does not need any info about the control structure. Drop the reference.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/21157 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: dcbc872)
realtek: cleanup debugfs creation in serdes driver
debugfs_create_dir() has a proper logic to handle existing directories. Skip the manual test. Additionally quit early if directory creation fails.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/21157 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 3c073b5)
realtek: use devm_kzalloc() for serdes debugfs setup
This will free memory automatically during driver unloading.
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de> Link: https://github.com/openwrt/openwrt/pull/21157 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: a401179)
kernel: rtl836x: remove legacy platform_data support
There are no platform_data based devices using it anymore. Also move header files to the driver folder.
Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Link: https://github.com/openwrt/openwrt/pull/21138 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 852d17e)
wifi-scripts: fix broken match all case for wifi-vlan
When iface is omitted, wifi-vlan will apply to all interfaces. However, netifd.set_vlan call is not successful as it assumes that every wifi-vlan section corresponds to one VIF.
For this reason in the wifi-vlan case (cur_type == "vlan") we create a composite key in the form `${vif.name}/${vlan.name}` allowing the same vlan section to correspond to multiple VAPs. `/` was decided as a delimiter as it is an invalid character for a network interface name and UCI identifier; so it is impossible for it to cause conflicts.
It was verified that the `ubus call network.wireless status` works as expected with this change. Moreover, wifi-station is not susceptible to this problem.
This also means that it is now possible for wifi-vlan to support `list` iface similar to old shell-based wifi-scripts. This will be done in a follow-up commit.
Fixes: 98435a37a7 ("wifi-scripts: iface should be optional in wifi-vlan definition") Signed-off-by: Rany Hany <rany_hany@riseup.net> Link: https://github.com/openwrt/openwrt/pull/20977 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 211b11a)
wifi-scripts: add support for using list for iface in wifi-station/vlan
This is a trivial change to allow users to use 'list' on iface. Old wifi-scripts already implements this, so this just ensures that shell-based and ucode wifi-scripts are on-par with each other.
Signed-off-by: Rany Hany <rany_hany@riseup.net> Link: https://github.com/openwrt/openwrt/pull/20977 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 1ead4e6)
wifi-scripts: ucode: improve formatting of expected throughput
Convert to MBit/s like all other fields and specify the unit. Most users probably aren't aware that this is in kilobits/s.
Signed-off-by: Rany Hany <rany_hany@riseup.net> Link: https://github.com/openwrt/openwrt/pull/20567 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 36da03a)
mediatek: fix IPv4 address missing on interface in failsafe mode for cudy ap3000-v1
cudy ap3000-v1 did not work correctly in failsafe mode because the address 192.168.1.1 was missing on the eth0 inteface. it was reachable via it's IPv6 link-local address however. this commit fixes the issue.
sunxi: image: sync target profiles names with DT compatible
Following up with errors reported in the ASU repo, these bananapi cases do not match the DT compatible "bpi", sync with dts sources. Also some profiles were overwriting SUPPORTED_DEVICES. Sysupgrade would be failing in SUPPORTED_DEVICES check since the DT compatible(/tmp/sysinfo/board_name) is not in SUPPORTED_DEVICES. This should also fix errors when using ASU sysupgrade clients. - Sync profile makefile target names with DT compatibles. - Fix overwrites of SUPPORTED_DEVICES instead of appending. - Adapt the uboot-sunxi profiles accordingly. *bpi-p2-zero dts is still not upstream.
V2: - Include fixes for arm926ejs(ARM926EJ-S) subtarget (LicheePi Nano and PopStick v1.1) (profile rename for correct default SUPPORTED_DEVICES)
Fixes: https://forum.openwrt.org/t/luci-attended-sysupgrade-support-thread/230552/246 Fixes: https://github.com/openwrt/asu/issues/486 Fixes: https://github.com/openwrt/asu/issues/524 Fixes: 9aa66b8ce730aebff76d353392151708a897a3a0 "sunxi: add support for Banana Pi M2 Berry" Fixes: d5f615bf2a0434c15d13943b566d46f25da579bb "sunxi: add support for Sinovoip Banana Pi M2 Plus" Fixes: 3819c1638a9d300840d0f869628891f9696be112 "sunxi: Add support for Banana Pi M2 Ultra" Fixes: 6bf8193b25a147abfe3720104e63af890c1ca2b8 "sunxi: add support for Bananapi P2 Zero" Fixes: 80edfaf675364835e6d2e17d97ebec6afc6b2103 "sunxi: add support for Banana Pi M3" Fixes: 3c24a1d423a6052b101c00cb7d94e70d72702639 "sunxi: add support for NanoPi NEO Plus2 board" Fixes: a689307c970e37c247c6452ba3963be8b109eb4f "sunxi: build image/uboot for the NanoPi NEO2" Fixes: fde68cb80941a60be93ece75e808b5b407d11cc8 "sunxi: add support for FriendlyARM NanoPi R1S H5" Fixes: 3ec468ff4fa3106d459ae58ec4bc4833715118c6 "sunxi: add F1C100 (arm926ej-s) support"
qualcommax: ipq807x: use ascii-env driver for Linksys MX4200v1
Just like it has already been changed for v2, use the ascii-eq-delim-env driver to extract the label mac from the devinfo partition.
Signed-off-by: Christoph Krapp <achterin@gmail.com> Link: https://github.com/openwrt/openwrt/pull/20732 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: f0c5348)
ipq40xx: split orbi devices in router and satellite
Netgear Orbi devices are split into router and satellite units. Even though the hardware is mostly the same, the network configuration is different. Router units have a designated WAN port while satellite units have all available ports labeled as "Ethernet". This splits the device trees into both unit types and adjusts the port labels.
Signed-off-by: Christoph Krapp <achterin@gmail.com> Link: https://github.com/openwrt/openwrt/pull/20877 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 314dbb7)
The WAN port currently has the same MAC set as all the other LAN ports. Fix this by adding the missing case in ipq40xx_setup_macs().
Signed-off-by: Christoph Krapp <achterin@gmail.com> Link: https://github.com/openwrt/openwrt/pull/20877 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 0f0f578)
Add boardfile override packages for Netgear RBK40 devices.
Signed-off-by: Christoph Krapp <achterin@gmail.com> Link: https://github.com/openwrt/openwrt/pull/20877 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: e9d6015)
When support was added for the RBR40 and RBS40 it was assumed that they also share the same second 5ghz wifi chip as their bigger siblings. Turns out that instead of QCA9984 (RBx50, SRx60) these devices use QCA9886 like the RBx20 devices to. They also load different boardfiles for the IPQ4019 chip.
This moves the wifi nodes from the orbi.dtsi to each device dts file and change the RBx40 boardfile variants.
Signed-off-by: Christoph Krapp <achterin@gmail.com> Link: https://github.com/openwrt/openwrt/pull/20877 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: f0909f7)
ipq40xx: convert Orbi led labels to function/color
The eight leds controlled by the LED controller are RGB leds themselves but are flashing white by default. The color part is controlled by GPIOs 53 (green), 54 (red), 57 (blue) and 60 (white). Therefore define the led nodes of the controller as white instead of RBG as well as backlight as their function.
Signed-off-by: Christoph Krapp <achterin@gmail.com> Link: https://github.com/openwrt/openwrt/pull/20877 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 3045f20)
Commit 3c073b5cb2 cleaned up the debugfs creation in mdio-realtek-otto-serdes driver to not explicitly check if the root directory already exists. This is fine because kernel handles the case properly so there's no need to check anymore.
However, this pollutes the boot log with: [..] debugfs: 'realtek_otto_serdes' already exists in '/' [..] debugfs: 'realtek_otto_serdes' already exists in '/' [..] debugfs: 'realtek_otto_serdes' already exists in '/' [..] debugfs: 'realtek_otto_serdes' already exists in '/' [..] debugfs: 'realtek_otto_serdes' already exists in '/' [..] debugfs: 'realtek_otto_serdes' already exists in '/' [..] debugfs: 'realtek_otto_serdes' already exists in '/' [..] debugfs: 'realtek_otto_serdes' already exists in '/' [..] debugfs: 'realtek_otto_serdes' already exists in '/' [..] debugfs: 'realtek_otto_serdes' already exists in '/' [..] debugfs: 'realtek_otto_serdes' already exists in '/'
Now, the root directory creation is attempted multiple times, causing the kernel to print an error message because the directory already exists.
Fix this by moving the SerDes loop into rtsds_debug_init and only try to create the root debugfs directory once.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21179 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 8e4730f)
realtek: pcs: drop PCS creation without SerDes ref
Since the beginning, the PCS driver had the ability to call its rtpcs_create without a reference to a valid PCS node. A comment in the code mentions that this is done for RTL838X and its built-in octa-PHY which is connected directly instead of via a SerDes. Further explanations are not provided.
Drop this ability and make the rtpcs_create call in the dsa driver conditional. As the built-in PHY of RTL838X isn't attached to a SerDes, there is no obvious point of having the PCS driver in that chain. The ports are marked as internal and have no pcs-handle, thus no phylink_pcs instance should be created.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: a58e41e)
realtek: pcs: rtl930x: drop unused and broken function
Drop the unused and broken function rtpcs_930x_sds_clock_wait from the PCS driver. The proper working variant is already some lines above and called rtpcs_930x_sds_wait_clock_ready.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: decc4f6)
The Realtek SerDes mode capabilities do not map 1:1 to the PHY_INTERFACE_MODE_* modes used in the kernel and passed to the PCS. For example, some PHY chips use the proprietary XSGMII mode for which there isn't an equivalent in the kernel, or HSGMII.
In the past, this led to problems and confusion using kernel's XGMII to handle the XSGMII mode, and needed a downstream patch for HSGMII. They have been solved/worked around for now, but XSGMII is currently not implemented at all. And who knows what might come in the future.
To make our life easier, introduce a dedicated internal representation of SerDes modes which differs from kernel's PHY_INTERFACE_MODE_*. This allows us to map "external" modes to different internal modes as needed instead of carrying the PHY_INTERFACE_MODE_* through the whole SerDes configuration code. The PCS driver needs to map PHY_INTERFACE_MODE_* to RTPCS_SDS_MODE_* in pcs_config, and the latter should be used as the only one.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: a4d6e10)
Use a separate configuration field for the number of SerDes for each variant of the Realtek Otto family. Add this field to the config structure, assign it and use it during driver probe. This narrows possible error cases and is needed for upcoming extensions.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 6cf33aa)
Add a separate structure for a SerDes. This is needed to appropriately store per-SerDes information, which in turn is needed for future work. Additionally, it's intended to reduce boilerplate and several inconsistencies.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 6b3f8fb)
realtek: pcs: add helpers for even, odd, neighbor SerDes
Add dedicated helpers to get references to even, odd and neigbor SerDes if needed. This should replace the various calculations scattered throughout the code, providing a unified way to work with adjacent SerDes.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 232c1fb)
realtek: pcs: assign SerDes reference upon PCS creation
Upon creation of a phylink_pcs instance by calling rtpcs_create, assign a reference to the corresponding SerDes to the link structure. In the next step, this should be used everywhere instead of the plain SerDes number.
Rename the field used to hold the SerDes number from 'sds' to 'sds_num' and name the new field 'sds' to make clear what is what.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 69bbcc6)
Drop usage of the to-be-phased-out SerDes id stored in rtpcs_link and use the reference to the SerDes instance to use the embedded id in rtpcs_serdes instead.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 4d9400f)
realtek: pcs: make use of SerDes struct in SerDes setup
Make use of the previously added SerDes struct in SerDes setup and all functions in its call path by removing (ctrl, sds_num) being passed to every function call and instead just pass the reference to the corresponding SerDes instance.
Various SerDes calculations for even, odd and neighbor are unified by switching to previously introduced helpers.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 1fccb0e)
realtek: pcs: make use of SerDes struct in set_autoneg
Also switch set_autoneg (and related helper rtpcs_sds_modify) to the SerDes struct instead of the plain SerDes id by using just the reference to the SerDes instance instead of (ctrl, sds_id) tuple. This completes the transition.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: d8dd8bd)
realtek: pcs: drop unneeded SerDes number range checks
By using references to pre-initiated SerDes instances instead of plain SerDes number, there is no need to check for the range anymore in various places. During driver/pcs init it is ensured that only valid SerDes will reach the configuration functions.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 18eea05)
As a first real usage of the new SerDes struct, move the polarity configuration there. It was previously located in the global rtpcs_ctrl struct as an array, indexed by SerDes id. Because this is per-SerDes information, the new SerDes struct is the correct place to live in.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21146 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: 56a71f3)
realtek: mdio-serdes: use correct device table identifier
Use the correct identifier 'rtsds_of_match' instead of 'rtsds_mdio_of_match' because the latter doesn't exist.
This doesn't cause an error for 6.12. However, with 6.18 the implementation of MODULE_DEVICE_TABLE has changed to use 'static' and 'used' [1] instead of 'extern' and 'unused' [2].
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com> Link: https://github.com/openwrt/openwrt/pull/21182 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: d519a3e)
wifi-scripts: update phys after rename_phy_by_name call
This fixes a failed bring up of the radio on bootup if the model defines a rename of phy in its /etc/board.json. This specifically impacts Redmi AX6S and any router that does so in its /etc/board.json. The fix fortunately is simple, just update phy name in phys after rename.
The entry that specifically causes this issue is the following:
The issue is that after rename, referenced phy in config is going to be wl0 but in phys array it is still phy0; and so it fails to find phy and does not bring up radio.
Fixes: https://github.com/openwrt/openwrt/issues/20250 Fixes: https://github.com/openwrt/openwrt/issues/20339 Signed-off-by: Rany Hany <rany_hany@riseup.net> Link: https://github.com/openwrt/openwrt/pull/21175 Signed-off-by: Robert Marko <robimarko@gmail.com> (commit: e4d5e76)
Revert two patches from upstream Linux: https://github.com/gregkh/linux/commit/135178e90aa43ad949534e1d6e376c4034942caa https://github.com/gregkh/linux/commit/63a93d1cd6077d79735f804f5a4957bfb240280c
This fixes a boot hang on realtek rtl838x switches. This is the last printed message: Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
Thread on mips mailing list: https://lore.kernel.org/linux-mips/b35fe4b3-8f42-49f4-a6bf-9f0e56d4050c@hauke-m.de/T/#u
dropbear: bump to 2025.89 (CVE-2025-14282, CVE-2019-6111)
- Security: Avoid privilege escalation via unix stream forwarding in Dropbear server. Other programs on a system may authenticate unix sockets via SO_PEERCRED, which would be root user for Dropbear forwarded connections, allowing root privilege escalation. Reported by Turistu, and thanks for advice on the fix. This is tracked as CVE-2025-14282, and affects 2024.84 to 2025.88.
It is fixed by dropping privileges of the dropbear process after authentication. Unix stream sockets are now disallowed when a forced command is used, either with authorized_key restrictions or "dropbear -c command".
In previous affected releases running with "dropbear -j" (will also disable TCP fowarding) or building with localoptions.h/distrooptions.h "#define DROPBEAR_SVR_LOCALSTREAMFWD 0" is a mitigation.
- Security: Include scp fix for CVE-2019-6111. This allowed a malicious server to overwrite arbitrary local files. The missing fix was reported by Ashish Kunwar.
- Server dropping privileges post-auth is enabled by default. This requires setresgid() support, so some platforms such as netbsd or macos will have to disable DROPBEAR_SVR_DROP_PRIVS in localoptions.h. Unix stream forwarding is not available if DROPBEAR_SVR_DROP_PRIVS is disabled.
Remote server TCP socket forwarding will now use OS privileged port restrictions rather than having a fixed "allow >=1024 for non-root" rule.
A future release may implement privilege dropping for netbsd/macos.
- Fix a regression in 2025.87 when RSA and DSS are not built. This would lead to a crash at startup with bad_bufptr(). Reported by Dani Schmitt and Sebastian Priebe.
- Don't limit channel window to 500MB. That is could cause stuck connections if peers advise a large window and don't send an increment within 500MB. Affects SSH.NET https://github.com/sshnet/SSH.NET/issues/1671 Reported by Rob Hague.
- Ignore -g -s when passwords arent enabled. Patch from Norbert Lange. Ignore -m (disable MOTD), -j/-k (tcp forwarding) when not enabled.
- Report SIGBUS and SIGTRAP signals. Patch from Loïc Mangeonjean.
- Fix incorrect server auth delay. Was meant to be 250-350ms, it was actually 150-350ms or possibly negative (zero). Reported by pickaxprograms.
- Fix building without public key options. Thanks to Konstantin Demin
- Fix building with proxycmd but without netcat. Thanks to Konstantin Demin
- Fix incorrect path documentation for distrooptions, thanks to Todd Zullinger
- Fix SO_REUSEADDR for TCP tests, reported by vt-alt.
Dropped:
* 050-dropbear-multihop-fix.patch as its included in the release 5cc0127000db5f * 051-fix-pubkey-options.patch as its included in the release 1d4c4a542cd5df * 052-fix-missing-depends-for-sntrup761x25519-sha512.patch as its included in the release 1a2c1e649a1824 * 053-Don-t-limit-channel-window-to-500MB.patch as its included in the release a8610f7b98ad
Manually rebased:
* 110-change_user.patch
Fixes: CVE-2025-14282, CVE-2019-6111 Reviewed-by: Hauke Mehrtens <hauke@hauke-m.de> Reviewed-by: Konstantin Demin <rockdrilla@gmail.com> Tested-by: Konstantin Demin <rockdrilla@gmail.com> [mediatek/filogic (GL.iNet GL-MT6000)] Link: https://github.com/openwrt/openwrt/pull/21186 Signed-off-by: Petr Štetiar <ynezz@true.cz> (commit: 70a4da1)
1450e1e2b7ff odhcpd: remove fallback DNS search domain 5b0e5c412f6c router: remove some log spam in send_router_advert() eddd0f8f0d00 router: improve send_router_advert() 35f0e05a16a0 config: add default value for dhcpv6_pd_min_len 62113d007a6a config: allow minimum PD len up to 64 03c1468355c0 Revert "router: optimize duplicated PIO comparison" 6b88c314a59e statefiles: don't consider no hostname as broken