Commit Graph
74240 Commits
Author SHA1 Message Date
Tianling Shen cb7c288288 Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2026-06-10 11:36:02 +08:00
Rosen PenevandJonas Jelonek c699a1ab37 ath79: mynet-wifi-rangeextender: use nvmem
Convert the last remaining userspace eeprom for ath9k to nvmem. Well,
easily converted at least.

wifi MAC has to be handled in userspace as the kernel nvram driver works
on memory mapped addresses, not mtd ones.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14666
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 12:43:26 +02:00
Rosen PenevandJonas Jelonek f93b02e545 ath79: fix label-mac-device
It appears 683-of_net-add-mac-address-to-of-tree.patch relies on the
mac-address nvmem property being present. These nodes don't need it as
they take it from the eeprom but label-mac-device needs it.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/14666
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 12:43:26 +02:00
Robert MarkoandRobert Marko 1a2d3bb23d microchipsw: lan969x: refresh config
Refresh the kernel config.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-06-09 11:30:01 +02:00
Robert MarkoandRobert Marko ce81558d33 microchipsw: use upstreamed NVMEM support
NVMEM OTP support was upstreamed, so backport those patches instead of
our downstream ones.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-06-09 11:28:27 +02:00
Robert MarkoandRobert Marko 957b042056 microchipsw: replace hwmon patch with upstreamed one
Selection of Sparx5 hwmon driver for LAN969x was upstreamed, so use that
instead of the downstream patch.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-06-09 11:10:00 +02:00
Robert MarkoandRobert Marko 849dd5d4f0 microchipsw: renumber upstreamed patches
Lets restart the numbering from 0 as most of the patches were upstreamed.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-06-09 11:02:45 +02:00
Robert MarkoandRobert Marko 5101f3f12f microchipsw: backport MDIO probe defferal silencing
Currently, MDIO driver will print the probe defferal as error.
So, instead of spaming the log, backport the upstream fix for it.

Signed-off-by: Robert Marko <robert.marko@sartura.hr>
2026-06-09 09:51:30 +02:00
Darell TanandJonas Jelonek 5584caa5b1 realtek: rtl930x: add support for Sirivision SR-ST3408F
This commit adds support for the Sirivision SR-ST3408F,
an 8-port 10G switch with 4x RJ45 ports and 4x SFP ports.

SoC:      Realtek RTL9303
RAM:      512 MiB DDR3
Flash:    SPI-NOR 16 MiB (Winbond)
Ethernet: 4x RJ45 via RTL8261BE PHY (10G/5G/2.5G/1G/100M/10M)
          4x SFP+
LEDs:     1x power, 1x system green
          2x RJ45 LEDs/port (link/act, 10G)
          1x SFP+ LED/port (link/act)
Button:   Reset
Console:  Cisco-style RJ45, 115200 8n1
Fan:      4040 12V fan (hardwired)
Power:    12V 3A internal PSU

OpenWrt installation
---------------------

1. Attach to serial console using a Cisco cable, 115200 8n1
2. Power on the switch and rapidly press Esc to interrupt U-Boot
3. Initialize the RJ45 ports by running `rtk network on`
4. Serve the initramfs-kernel.bin image on TFTP, IP 192.168.1.111
5. Use any RJ45 port to connect to your TFTP server
6. Run `tftpboot 0x81000000 initramfs-kernel.bin; bootm`
7. Use `mtd dump` or `dd` to backup the original firmware at `mtd5` first
8. Run sysupgrade to flash sysupgrade.bin into the switch and reboot

Restoring original firmware
-----------------------------

Vendor does not provide firmware images, so you should have made a backup.
Use `mtd write` to restore your backed up copy into the `mtd5` partition.

MAC Address
------------
All interfaces are assigned the same MAC address, from the U-Boot env
`ethaddr`. This MAC address is also printed on the device label.

Signed-off-by: Darell Tan <darell.tan@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23686
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 09:22:07 +02:00
Thomas RichardandJonas Jelonek e005805489 kernel: iio: add kmod-iio-ad7405 package
Create kernel package for the AD7405 ADC driver.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/22989
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 09:10:23 +02:00
Thomas RichardandJonas Jelonek 61b4cb4ed0 stm32: add kmod-stm32-omm package
This adds STM32 Octo Memory Manager support.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/22989
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 09:10:22 +02:00
Thomas RichardandJonas Jelonek e4602d7a98 stm32: add kmod-stm32-csi package
This adds STM32 Camera Serial Interface (CSI) support.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/22989
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 09:10:22 +02:00
Thomas RichardandJonas Jelonek 3af95bb05e stm32: add kmod-spi-stm32-ospi and kmod-spi-stm32-qspi
This adds STM32 OCTO and QUAD SPI controller support.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/22989
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 09:10:22 +02:00
Thomas RichardandJonas Jelonek d82162bf89 stm32: 6.18: disable some unnecessary options
The COMMON_CLK_STM32MP215 option is for clock support on MP215 platforms,
and PINCTRL_STM32_HDP is for Hardware Debug Port pin control. They can be
safely removed.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/22989
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 09:10:22 +02:00
Thomas RichardandJonas Jelonek 354aed7828 stm32: enable 6.18 testing kernel
The stm32 target now supports 6.18 kernel as testing.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/22989
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 09:10:21 +02:00
Thomas RichardandJonas Jelonek 98eb8e6d99 stm32: 6.18: update kernel 6.18 config
Update stm32mp1 kernel config for 6.18.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/22989
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 09:10:21 +02:00
Thomas RichardandJonas Jelonek a7bf2ef519 stm32: fix return value of phy_power_on() in dwmac-stm32 driver
Patch 700-net-stmmac-dwmac-stm32-add-support-of-phy-supply-pro.patch
introduces phy-supply support in dwmac-stm32 driver. But the phy_power_on()
function always returns 0 even if it failed to drive the regulator. So fix
phy_power_on() to return an error if something wrong happened.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/22989
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 09:10:21 +02:00
Thomas RichardandJonas Jelonek 91642f109a stm32: 6.18: refresh kernel patches
Drop upstreamed patches and refresh remaining ones.

Manually rebased:
- 700-net-stmmac-dwmac-stm32-add-support-of-phy-supply-pro.patch

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/22989
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 09:10:20 +02:00
Thomas RichardandJonas Jelonek cd0f38dfc2 kernel/stm32: restore files for v6.12
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

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/22989
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 09:10:20 +02:00
Thomas RichardandJonas Jelonek 6d48210a90 kernel/stm32: create files for v6.18 (from v6.12)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Thomas Richard <thomas.richard@bootlin.com>
Link: https://github.com/openwrt/openwrt/pull/22989
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-09 09:10:20 +02:00
Hauke Mehrtens ab253fb4bb uclient: update to Git HEAD (2026-06-07)
f227ab4f1285 uclient: fix memory leak of url when backend alloc fails
645236607a3d uclient: free proxy_url in uclient_free
53d2d11fb00d uclient-http: fix NULL deref when digest WWW-Authenticate lacks params
0ba1b8718be5 ucode: check calloc return in uc_uclient_new
5cb19466d076 uclient-fetch: reset redirect counter per request
568c447950c1 uclient-fetch: retry short writes and surface errors
4c4a61a69ac3 uclient-fetch: use strtoull to parse Content-Length
440ca260622d uclient-http: validate Content-Length and chunk sizes from the server
8658324bd234 uclient: cast to unsigned char before ctype classifications
bf403fa0f8e5 uclient-fetch: reject CR in --header values
ec47f4176b1e uclient-fetch: always allocate auth_str and free it on exit
391dacd10d31 uclient-http: fail digest auth when the cnonce cannot be randomized
ba1f4311b099 ucode: clamp read length to the size of the static buffer
0ba47f319b09 uclient-fetch: advance to the next URL between requests
9dd0055d527d uclient: initialize *port for unknown address families
f816506651d5 uclient-http: start digest nonce count at 1
9b9b2da40835 uclient-http: fix 2-byte buffer undercount in digest add_field
80fb1e5ee68b ucode: avoid double-free of SSL context on ssl_init error
d44fb561bbcf ucode: don't clear an unrelated registry slot on free
02562403d2a3 uclient-fetch: close the output file before fetching the next URL
4a63561d0012 uclient-http: initialize fd to -1 so a failed connect can't close stdin
428ae8342118 uclient: cancel pending timers in uclient_free()
ffd8db308289 uclient-fetch: guard SSL debug setup against a missing SSL context
9f4db039a263 ucode: release callback argument references
d2af92b0aad9 uclient-http: resolve redirects against the proxy target URL
5dddda023267 uclient-utils: avoid out-of-bounds pointer in get_url_filename
8507588e7ce7 uclient-http: use the proxy target URL for HTTP authentication
322c89c6ca0a uclient-http: retry 401 auth for all body-less request methods
db3bb00ddda7 uclient-http: accept unquoted digest auth parameter values
5ce9983b2a11 uclient-http: follow 303 and 308 redirects
070c868486dc uclient-fetch: finalize request on invalid 206 Content-Range
83659a5a9bc1 uclient-fetch: concatenate multiple URLs into a single -O file
43bed2753998 ucode: don't leak string references in status()/get_headers()
03b17e4fc793 uclient-fetch: attach credentials to the proxy target, not the proxy
74c07b12f7ab uclient-fetch: don't run the progress meter in spider mode
daad21fa2c17 uclient-fetch: handle init_request failure on the 204 resume retry

Link: https://github.com/openwrt/openwrt/pull/23693
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2026-06-09 00:57:32 +02:00
Anna KiriandJonas Jelonek a5107ad58c mtd: fix buffer leak and fd leak in mtd_dump()
Two leaks in mtd_dump():

- The buffer allocated with malloc(erasesize) is never freed before
  returning, leaking erasesize bytes on every call.
- The pre-existing malloc-NULL early return path also leaked the just-
  opened fd by returning directly instead of going through cleanup.

Initialize buf to NULL, route the malloc-NULL case through the
existing 'out:' label, and add free(buf) on the cleanup path so both
fd and buf are released consistently on every exit.

Signed-off-by: Anna Kiri <bredcorn@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23706
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-08 16:18:23 +02:00
Anna KiriandJonas Jelonek 2818ac5ccd mtd: check malloc() return value in mtd_check()
After malloc(erasesize) in mtd_check(), the result was never checked
for NULL. On allocation failure, the buf pointer remained NULL and
would later be used in image_check() via read(imagefd, buf + buflen,
...), causing a NULL pointer dereference.

Add a NULL check after the allocation and return early. The early
return path also closes the just-opened fd and frees the strdup'd
colon-separated device-list copy to avoid leaks.

Signed-off-by: Anna Kiri <bredcorn@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23705
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-08 16:17:42 +02:00
Anna KiriandJonas Jelonek 2f809f9cff mtd: check return values of lseek() and write() in mtd_write_buffer()
Two ignored return values in mtd_write_buffer() caused silent failures:

- lseek() return value was ignored. A failed seek (e.g. EBADF, ESPIPE)
  followed by write() would silently write at the wrong offset.
- write() return value was ignored, silently discarding write errors.
  This could lead to data corruption on the MTD device without any
  indication.

Check both return values, report errors to stderr and return -1 on
failure.

Signed-off-by: Anna Kiri <bredcorn@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23552
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-08 16:17:02 +02:00
Tim SmallandRobert Marko e122d49577 linux-firmware: improve firmware package descriptions
Improve some descriptions so that they make the purpose of the
particular firmware package clearer to the user (e.g. as viewed in
verbose package listings).

Signed-off-by: Tim Small <tim@seoss.co.uk>
Link: https://github.com/openwrt/openwrt/pull/23688
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-06-08 14:44:12 +02:00
GrischeandRobert Marko 33ed49c948 ipq806x: ap3935: disable hibernation on LAN1
The Extreme Networks AP3935's LAN1 port (gmac0/RGMII to AR8035 at MDIO
addr 1) fails to acquire a link if no Ethernet cable is connected at
power-on; the port stays dead even after a cable is later inserted, and
only a network restart recovers it.

The AR803x family enables hibernation mode by default, this setting
overrides it.

Signed-off-by: Grische <github@grische.xyz>
Link: https://github.com/openwrt/openwrt/pull/23208
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-06-08 09:59:19 +02:00
Tianling Shen 8db35fe4fd Merge Official Source
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2026-06-08 10:36:55 +08:00
Robert Marko e235851495 qualcommax: update qca8k fixed link patch to v2
Update the qca8k fixed link patch to v2 that is pending upstream.

Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-06-07 23:03:04 +02:00
Jonas Jelonek 9b3f3a7174 realtek: pcs: replace __free() auto-cleanup stuff
Upstream netdev maintainers disregard both variable declarations
mid-function and usage of __free() for auto-cleanup [1]. To avoid any
pain when trying to upstream the PCS driver at some point, adjust that
now before forgetting it.

[1] https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#using-device-managed-and-cleanup-h-constructs

Link: https://github.com/openwrt/openwrt/pull/23694
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 19:03:43 +02:00
John AudiaandJonas Jelonek 9fb5a25659 x86/64: config-6.18 remove obsolete options from config
Remove some dead weight from the config due to changes in the CRYPTO API
in 6.18. These are now internal library optimizations rather than selectable
algorithms, the corresponding Kconfig options were removed.

ref: https://www.mail-archive.com/linux-yocto@lists.yoctoproject.org/msg06813.html

Signed-off-by: John Audia <therealgraysky@proton.me>
Link: https://github.com/openwrt/openwrt/pull/23687
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 11:55:51 +02:00
Andre HeiderandJonas Jelonek eb315ec707 omap: drop v6.12 and default to v6.18
Switch to kernel v6.18 and drop v6.12.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22728
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 11:45:39 +02:00
Andre HeiderandJonas Jelonek 61961972ac omap: enable 6.18 testing kernel
The omap target now supports 6.18 kernel as testing.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22728
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 11:45:38 +02:00
Andre HeiderandJonas Jelonek e532be6070 omap: update kernel 6.18 config
Plain `make kernel_oldconfig`

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22728
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 11:45:38 +02:00
Andre HeiderandJonas Jelonek f86a5cb08d kernel: 6.18: update config for new knobs
These were discovered when migrating omap to 6.18.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22728
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 11:45:38 +02:00
Andre HeiderandJonas Jelonek 56c3792936 kernel/omap: restore files for v6.12
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

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22728
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 11:45:37 +02:00
Andre HeiderandJonas Jelonek 1ec061e4e2 kernel/omap: create files for v6.18 (from v6.12)
This is an automatically generated commit.

When doing `git bisect`, consider `git bisect --skip`.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22728
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 11:45:37 +02:00
Andre HeiderandJonas Jelonek 250255e897 omap: switch to the 8250 serial driver
Prepare the linux 6.18 update.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22728
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 11:45:37 +02:00
Andre HeiderandJonas Jelonek d0bc629aa4 omap: update kernel 6.12 config
Plain `make kernel_oldconfig`

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22728
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 11:45:36 +02:00
Andre HeiderandJonas Jelonek 1888d5060a uboot-omap: update to 2024.07
This is the last version supporting the boards omap3_beagle and omap4_panda.

Because we use a boot script we need to enable CONFIG_LEGACY_IMAGE_FORMAT.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/22728
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 11:45:36 +02:00
60d68afbb9 ramips: enable fw_printenv for D-Link COVR-X1860 A1
Vendor U-Boot stores its environment at offset 0x2000 inside the
"config" partition (size 0x4000). The offset is not erase-block
aligned, so the fw_env tool's alignment check rejects the natural
secsize=0x20000. Declaring secsize=0x2000 passes the check, lets
fw_printenv read the real env (factory_mac, hw_version,
bundle_number, ...), and causes fw_setenv to fail cleanly on erase
rather than corrupting anything (the kernel rejects sub-erase-block
MEMERASE).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Signed-off-by: Florian Maurer <fmaurer@disroot.org>
Link: https://github.com/openwrt/openwrt/pull/23192
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 11:29:12 +02:00
Fabian GroffenandJonas Jelonek 273b6c902a ramips: expand storage space on U6 lite
While still sufficient for the base image, space runs out quickly with
the ~15MiB available in kernel0.  The identical space in kernel1 is
unused, and standard installation instructions flash to both areas so it
isn't an easy fallback to stock either.

Merge the regions for kernel0 and kernel1 so there's more space
available to the user to install packages and some data.

Signed-off-by: Fabian Groffen <grobian@bitzolder.nl>
Link: https://github.com/openwrt/openwrt/pull/22316
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 11:03:01 +02:00
Fengyu WuandJonas Jelonek 8aaa8d4013 ca-certificates: update to 20260601
changelog: https://salsa.debian.org/debian/ca-certificates/-/blob/master/debian/changelog

  * Remove ca-certificates-local example (closes: #988912, #1127101).
  * Update Mozilla certificate authority bundle to version 2.86
    The following certificate authority was added (+):
    + e-Szigno TLS Root CA 2023
    The following certificate authorities were removed (-):
    - QuoVadis Root CA 2
    - QuoVadis Root CA 3
    - DigiCert Assured ID Root CA
    - DigiCert Global Root CA
    - DigiCert High Assurance EV Root CA
    - SwissSign Gold CA - G2
    - SecureTrust CA
    - Secure Global CA
    - COMODO Certification Authority
    - Certigna
    - certSIGN ROOT CA
    - AffirmTrust Commercial
    - AffirmTrust Networking
    - AffirmTrust Premium
    - AffirmTrust Premium ECC
    - TeliaSonera Root CA v1
    - Entrust Root Certification Authority - G2
    - Entrust Root Certification Authority - EC1
    - Trustwave Global Certification Authority
    - Trustwave Global ECC P256 Certification Authority
    - Trustwave Global ECC P384 Certification Authority
    - GLOBALTRUST 2020
    - GTS Root R2
    - FIRMAPROFESIONAL CA ROOT-A WEB
    The following certificate authority was renamed (~):
    ~ "OISTE Server Root RSA G1" (removed leading space)

Signed-off-by: Fengyu Wu <saldry@proton.me>
Link: https://github.com/openwrt/openwrt/pull/23675
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 10:47:20 +02:00
Ryan LeungandJonas Jelonek b7289c13e2 ramips: yuncore 1200f: fix label-mac-device alias and remove comments
Fix label-mac-device alias (from "label-mac") and remove MAC address comments.

Fixes: 1ba7b38cfc ("ramips: add support for Yuncore 1200F")
Signed-off-by: Ryan Leung <untilscour@protonmail.com>
Link: https://github.com/openwrt/openwrt/pull/23691
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-07 10:37:40 +02:00
Markus Stockhausen a317079b57 realtek: eth: rename ring steering bits
A network interface card (NIC) hardware ring of the Realtek Otto switch
SoCs is nothing more than a list of pointers to the ring headers. I.E.

address | content   | comment
--------+-----------+------------------------
x + 0   | pointer 0 | points to ring header 0
x + 4   | pointer 1 | points to ring header 1
...
x + 4*n | pointer n | points to ring header n

Headers must be 4 byte aligend. So the lower two bits of the pointers
are unused. Hardware designers desided to give them special meanings.

- Bit 0: Owner of this ring entry, 1 = hardware, 0 = software
- Bit 1: Wrap, 1 = last ring pointer, 0 = normal ring pointer

The driver uses constant defines with slightly confusing naming. Replace
OWN_CPU with OWN_HW to make clear what it is about. Align prefix and
make the defines bitmasks for better readability.

Link: https://github.com/openwrt/openwrt/pull/23676
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-06 15:04:42 +02:00
Markus Stockhausen ecdf250d6b realtek: eth: sort structures and defines
Align indentation of defines and move structures to the top of
the source code. This is only cosmetic. No functional changes.

Link: https://github.com/openwrt/openwrt/pull/23676
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-06 15:04:42 +02:00
Markus Stockhausen 32bcc2986c realtek: mdio: backport upstream patches
This backports the upstream efforts for the mdio driver. No downstream
functionality is affected as OpenWrt still uses the mdio-realtek-otto
driver.

Link: https://github.com/openwrt/openwrt/pull/23678
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-06-06 15:03:16 +02:00
Gunther StammwitzandJonas Jelonek 1ba7b38cfc ramips: add support for Yuncore 1200F
The Yuncore 1200F is an outdoor 802.11ac access point based on the
MediaTek MT7628AN SoC with an MT7663E PCIe 5 GHz radio. The device is
also sold under the KuWFi AP1200F name.

Hardware:
- SoC: MediaTek MT7628AN
- CPU: MIPS 24KEc
- RAM: 64 MiB
- Flash: 8 MiB SPI NOR
- Ethernet: 2x 10/100 Mbps
- WiFi 2.4 GHz: MT7628AN WMAC
- WiFi 5 GHz: MT7663E PCIe
- LEDs: status, LAN, WAN
- Button: reset
- Watchdog: GPIO watchdog

MAC addresses:
- Ethernet: factory 0x0004
- 2.4 GHz WiFi: factory 0x0028
- 5 GHz WiFi: factory 0x8004

Network:
- LAN: eth0.1, switch port 4
- WAN: eth0.2, switch port 3

Installation:
- Build the sysupgrade image:
  openwrt-ramips-mt76x8-yuncore_1200f-squashfs-sysupgrade.bin
- The stock firmware provides a U-Boot recovery web interface. It can be
  entered by holding the reset button while powering on the device. Connect to
  http://192.168.0.100/ and upload openwrt-sysupgrade.bin file.

Recovery:
- Reverting to stock firmware has not been tested.

The 5 GHz radio is detected as PCI ID 14c3:7663 and uses mt7615e
together with the MT7663 AP firmware. kmod-mt76x2 is explicitly
excluded because this board uses MT7663E, not MT76x2.

Tested:
- Build succeeds for ramips/mt76x8
- Sysupgrade image boots
- Ethernet LAN/WAN work
- 2.4 GHz AP starts on phy0
- 5 GHz AP starts on phy1
- Stable MAC addresses are assigned to Ethernet, phy0 and phy1

Signed-off-by: Gunther Stammwitz <gstammw@gmx.net>
Link: https://github.com/openwrt/openwrt/pull/23613
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-06 13:39:31 +02:00
Manuel StockerandJonas Jelonek e3fdcbb8a0 realtek: rtl930x: add support for Horaco ZX-SWTGW2C8F
Device specification
--------------------
SoC Type:              Realtek RTL9303
RAM:                   128MB
Flash:                 Winbond 16MiB
Ethernet               8x SFP+ 10G
LEDs:                  1x power green hardwired
                       1x SYS green
                       8x2 LEDs per RJ45 port
                           1x green  ( 1G link/activity)
                           1x blue   (10G link/activity)
Button:                Reset
Console:               1x CISCO-style RJ45 RS232 port
Bootloader:            Realtek U-Boot 2011.12

Installing OpenWrt
------------------
Install the factory image through the web interface.

Signed-off-by: Manuel Stocker <mensi@mensi.ch>
Link: https://github.com/openwrt/openwrt/pull/23648
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-06 10:40:18 +02:00
Jonas Jelonek 5d45f53966 realtek: pcs: rtl931x: enable XSGMII setup
The setup path has been adjusted before to at least not break a working
XSGMII setup. On the currently single affected device, the U-boot
pre-init runs unconditionally anyway. Thus, we can drop the top-level
gate and let our driver "setup" this mode. This enables further
structural changes.

Link: https://github.com/openwrt/openwrt/pull/23674
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-06 09:54:58 +02:00
Jonas Jelonek ef8302fb13 realtek: pcs: rtl931x: fix media config for XSGMII
While this doesn't claim to be a standalone setup for XSGMII, at least
it doesn't break the working XSGMII setup from U-boot on Linksys
LGS352C, the currently only supported device using this mode. Later
during further refactoring, this should be improved to make sure
everything is properly set.

Link: https://github.com/openwrt/openwrt/pull/23674
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
2026-06-06 09:54:58 +02:00