wdev_update_disabled_vifs() indexed the disabled_vifs map with the wdev
object instead of the vif name. The map is read back via
disabled_vifs[vif.name], so disabled vifs were never matched, and
coercing the wdev object into a string key triggered an infinite
escaping loop in ucv_to_string_json_encoded() during state output,
causing OOM on reboot.
Suggested-by: Shayne Chen (陳軒丞) <Shayne.Chen@mediatek.com>
Reported-by: Michael-cy Lee (李峻宇) <Michael-cy.Lee@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Remove kernel configs and patches for 6.12, now that layerscape target
was switched to 6.18. This was missed during the 6.12 -> 6.18 PR.
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
This commit bumps restool layerscape package to lf-6.18.2-1.0.0 version.
Patch to disable manpage build was dropped and replaced with MANPAGE=""
in MAKE_FLAGS.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23290
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Since there are no other active developers working on this target,
switch it to 6.18 for wider testing.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23290
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
This is an automatically generated commit.
When doing `git bisect`, consider `git bisect --skip`.
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23290
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
The DSA private structure provides an overwhelming mix of
information. L3 data is part of this. Provide a new separated
structure that is linked bidirectionally to the old data.
For the start it only contains a reference pointer and no L3
specific data.
Link: https://github.com/openwrt/openwrt/pull/23937
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
The L3 code is manually initialized and finalized in the DSA
probe/remove functions. Relocate the code into seperate helpers
that encapsule all required steps. Make no longer exposed L3
functions static.
Link: https://github.com/openwrt/openwrt/pull/23937
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
DSA is layer 2 and not layer 3. Nevertheless all routing management
needs a home. Separate it into its own source file. This first
step is far from perfect but at least it guides the DSA driver into
the right direction.
No functional changes. Just relocating, renaming and proper including.
Link: https://github.com/openwrt/openwrt/pull/23937
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Add polling setup support for RTL8264B PHY to avoid 'skip polling'
message during boot. Rely on the default register values for polling for
now, similar to RTL8261.
Link: https://github.com/openwrt/openwrt/pull/23946
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Improve the DSA receive tagging. For this convert the receive path
to METADATA_HW_PORT_MUX. This way no skb data mangling is needed.
See e.g. airoha_eth.c or mtk_eth_soc.c.
Link: https://github.com/openwrt/openwrt/pull/23948
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
This is just some reordering/simplifcation of the transmit path.
Relocate the port extraction into a separate helper for a smaller
xmit function. While we are here add some documentation and
reorder the tag and its contents. As these are only arbitrary
values that help the ethernet driver to identifiy the tag this
is just cosmetic.
Link: https://github.com/openwrt/openwrt/pull/23948
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
When sending data packets the hardware expects data size plus 4
bytes for the layer 2 checksum (FCS). This does not count into
"bytes sent" metric. Fix that.
Link: https://github.com/openwrt/openwrt/pull/23948
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Change ethernet-phy node name for alignment with reg.
This enhances the clarity and maintainability of the device-tree.
Signed-off-by: YaleiZang <yalei.zang@airoha.com>
Link: https://github.com/openwrt/openwrt/pull/23920
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Update the @ address suffix of crypto and thermal-sensor nodes
in the device tree to match the reg properties for consistency.
Signed-off-by: YaleiZang <yalei.zang@airoha.com>
Link: https://github.com/openwrt/openwrt/pull/23920
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Replace all hardcoded page values in various calls and definitions with
the previously added defines. This should help readability, giving those
various values a name and making it easier to compare and track within
the context of what is being set.
Link: https://github.com/openwrt/openwrt/pull/23915
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
To reduce having magic values all over the place in the whole driver,
add definitions for the SerDes register pages. They are equal among all
variants and can be clearly named, as already done in the debugfs output
of the realtek-otto-serdes-mdio driver. This should ease comparison,
code understanding and very likely is a step forward towards
upstream-readyness.
Also define two macros to cover the special cases for RTL931x's digital
SerDes via 0x40/0x80 page offset.
Link: https://github.com/openwrt/openwrt/pull/23915
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Backport fixes for airoha_eth driver from net tree recently merged
upstream.
Refresh all affected patch.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
[ refresh patch, improve commit title/description ]
Link: https://github.com/openwrt/openwrt/pull/23934
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
The Bazis AX3000WM is an OEM variant of the Shenzhen Jia Yan Technology
WD-R3000N-G2A (per EAEU certificate N RU Д-CN.РА04.В.23104/26). Hardware
is identical. Added for the owners of this device so they can find it
in firmware-selector.
Signed-off-by: Fil Dunsky <filipp.dunsky@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23653
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This patch is a full backport of Linux upstream commit a9c1acebfe0484343a443d082e039ca77186ed22
for rk3576-nanopi-r76s.dts device tree, resolving SD card power dropout in runtime suspend.
When runtime suspend is active, the SD power domain is shut down, wiping power control
registers and cutting card power. I/O recovery relies on mmc_blk_mq_rw_recovery(),
which results in poor performance and unstable card detection.
Implement GPIO-controlled vcc3v3_sd regulator and attach vmmc-supply to sdmmc node
to maintain SD power during suspend. Also add cd-gpios to guarantee working hotplug
when system enters idle/suspend state.
Modifications in DTS:
- vcc3v3_sd fixed regulator + sdmmc_pwren pinctrl
- vmmc-supply & vqmmc-supply for sdmmc bus power retention
- cd-gpios for SD card presence detection
Signed-off-by: xiao bo <peterwillcn@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23924
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit adds support for FudanMicro FM25G01B and FM25G02B SPI NAND
chips. This is required to:
1. Fix bootloop on new revision of Keenetic KN-1812 and Netcraze NC-1812
(with FudanMicro FM25G02B SPI NAND)
2. Add Nokia XG-040G-MD support (device has either SkyHigh or FudanMicro
SPI NAND).
Fixes: https://github.com/openwrt/openwrt/issues/23855
Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23864
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
For DHCPv6 address requests (IA_NA), odhcp6c currently uses the first eight
digits of the i/f name's MD5 hash as IAID.
In case of DHCPv6-PD, however, odhcp6c expects the IAID to be specified
explicitly for the IA_PD(s) requested, otherwise it will start counting the
IAID from "1" up for each "-P" argument.
As OpenWrt only requests a single IA_PD per interface, make sure to pass
the identical IAID for IA_PD as is used for IA_NA, unless a custom IAID
was explicitly specified in the i/f configuration.
This prevents regressions with ISPs that expect an IA_PD request to come
from the same IAID+DUID combination as the IA_NA request.
In addition, add some validation of the "reqprefix" value, in order to
catch most cases that would otherwise result in netifd or odhcp6c
malfunction.
Signed-off-by: Shine <4c.fce2@proton.me>
Link: https://github.com/openwrt/openwrt/pull/23758
Signed-off-by: Robert Marko <robimarko@gmail.com>
This patch adds support for the ASUS RT-AC85U wireless router.
It is a dual-band gigabit router based on the MediaTek MT7621AT SoC.
MAC Address Layout:
- LAN/WAN/2.4G/5G MAC addresses are derived from the
factory partition at offset 0xe000.
Hardware Specifications:
- SoC: MediaTek MT7621AT (880 MHz, 2C/4T)
- RAM: 128 MB DDR3
- Flash: 128 MB Winbond W29N01HV NAND
- WI1: MediaTek MT7615E (2.4 GHz, 4x4)
- WI2: MediaTek MT7615E (5 GHz, 4x4)
- Switch: MediaTek MT7530 (Embedded Gigabit Switch)
- Ports: 1x WAN, 4x LAN (10/100/1000 Mbps), 1x USB 3.0
- LEDs: Power, LAN, WAN, 2.4G, 5G, USB, WPS
- Buttons: WPS, Reset
Installation / Flashing guide:
1. Power off the device.
2. Hold Reset button and power on to enter ASUS Restoration mode (slow flash LED).
3. Set your computer's static IP to 192.168.1.x (e.g., 192.168.1.10).
4. Upload the OpenWrt initramfs image via ASUS Restoration tool to 192.168.1.1.
5. Wait for the device to boot into the temporary OpenWrt environment.
6. Access LuCI (192.168.1.1) and flash sysupgrade image to make it permanent.
Signed-off-by: YAJIMA Hideyuki <ursmtr@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23747
Signed-off-by: Robert Marko <robimarko@gmail.com>
-----
Hardware:
CPU: ARMADA 380 1x1332Mhz
RAM: 512MB DDR3
FLASH: 256MB MX30LF2G18AC
2x SATA III
2x USB3.0
1x USB2.0
i2c to control various states.
RTC with battery
1Gbit LAN (WoL capable)
9x LED
RESET button at back
Power button at front (gpio-poweroff)
Copy button at front
-----
Doesn't work
FAN control
buzzer
-----
UART connections
Connect UART to port J3 115200
+----+----+----+----+----+
|3.3V| TX | RX | | GND|
+----+----+----+ +----+
Depend of UART adapter board can fail to boot when adapter is attached. (all leds are dimmed) .
In that case disconnect UART for an < second and after that all leds should be white.
Stop u-boot by ctrl-c within 3s window. (bootdelay 7s or more helps)
setenv bootdelay 7
saveenv
-----
Instalation via UART
Boot initramfs-kernel.bin
setenv ethact egiga0
setenv serverip 192.168.1.11
setenv ipaddr 192.168.1.12
tftpboot 0x02000000 *initramfs-kernel.bin
bootm 0x02000000 -
Device is DHCP client by default ( as the other supported NAS)
do backup into safe space
/dev/mtd3 Kernel-1
/dev/mtd4 RootFS-1
use sysupgrade in console or via luci
-----
MAC addresses
mac stored in u-boot-env ethaddr
label mac = eth0 mac = 5c:6a:80:xx:xx:xx
-----
Setting up u-boot dual boot
u-boot contain two banks contain two OEM copies
To boot OpenWrt from bank1
setenv next_bootfrom 1
saveenv
To boot OEM from bank2
setenv next_bootfrom 2
saveenv
-----
Configuration via i2c
install i2c-tools
Enable WoL
i2cset -y 0x0 0xa 0xa 0x0006 w
Disable WoL
i2cset -y 0x0 0xa 0xa 0x0306 w
Enable auto power on
i2cset -y 0x0 0x0a 0x0a 0x0107 w
Disable auto power on
i2cset -y 0x0 0x0a 0x0a 0x0007 w
Signed-off-by: Robert Senderek <robert.senderek@10g.pl>
Link: https://github.com/openwrt/openwrt/pull/23228
Signed-off-by: Robert Marko <robimarko@gmail.com>
Split kmod-nf-nathelper-extra into separate helper packages
and keep the original package as a compatibility meta-package.
This allows selecting only the required protocol helpers
instead of installing all helper modules and dependencies.
Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com>
Link: https://github.com/openwrt/openwrt/pull/23690
Signed-off-by: Robert Marko <robimarko@gmail.com>
The patch is accepted upstream, so move it to backport-6.18 and update
its headers.
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23930
Signed-off-by: Robert Marko <robimarko@gmail.com>
The DUID-UUID was generated from a random UUID, which is regenerated on
every fresh flash and therefore does not survive reconfiguration events
such as reflashing without keeping the configuration. RFC8415/RFC6355
prefer a DUID that remains stable across such events.
Add a ucode helper that picks the first LAN port (falling back to WAN)
from /etc/board.json, resolves its MAC address and derives a stable UUID
from it, falling back to a random UUID only when that fails.
Signed-off-by: Felix Fietkau <nbd@nbd.name>
proto/dhcp.sh hardcoded `-t 0` (infinite retries) with no way
for UCI / operator to tune per-retry interval (udhcpc -T),
retry count (udhcpc -t) or failure retry-loop wait (udhcpc -A).
Add three new proto config ints (timeout, retry, tryagain)
and thread them into the udhcpc command line. Unset options
preserve existing behaviour: retry defaults to 0, timeout and
tryagain are omitted so udhcpc uses its own RFC defaults.
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
When bridge VLAN filtering is active, network_get_physdev resolves
UCI interface names to the VLAN sub-interface (e.g. br-lanv0) rather
than the bridge master. LLDP frames use reserved multicast
(01:80:c2:00:00:0e) which bridges trap to member ports, so lldpd
must listen on the physical ports to receive them.
Detect when the resolved device is a sub-interface of a bridge and
expand it to the list of bridge member ports instead.
Signed-off-by: John Crispin <john@phrozen.org>
9ff6e43bb75f service: notify instance exit details via ubus
4f42296dc4f0 jail: mount rootfs overlay with userxattr in user namespace
60fdbf00e924 jail: chown rootfs overlay dir to mapped root in user namespace
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Only print VHT/HE/EHT center frequency and channel width fields
when they are actually populated. This avoids displaying undefined
values for non-6GHz HE results where channel info is derived from
VHT/HT Operation IEs. Also fix center_chan_2 format specifier from
%s to %d.
Signed-off-by: John Crispin <john@phrozen.org>
Add a proto_dhcp_restart() handler that re-acquires the DHCP lease via a
single ubus call, releasing the previous lease and triggering a fresh
DHCPDISCOVER without bouncing the interface.
The re-acquire is implemented by sending SIGHUP to udhcpc, which releases
the current lease (if any) and immediately transitions the state machine
to INIT_SELECTING so the next main-loop iteration sends a fresh
DHCPDISCOVER. A single signal thus expresses 'release this lease and get
a new one' without exiting the client, so upstream watchdogs (e.g. a
DNS-health monitor) can request a clean re-lease without tearing down the
interface.
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Felix Fietkau <nbd@nbd.name>