From lede-commits at lists.infradead.org  Fri Aug  1 09:29:46 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 01 Aug 2025 12:29:46 -0400
Subject: [openwrt/openwrt]  util-linux: add last util
In-Reply-To: <175406578634.569045.9496019408063828795@git-01.infra.openwrt.org>
References: <175406578634.569045.9496019408063828795@git-01.infra.openwrt.org>
Message-ID: <mailman.110010.1754065790.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/765d6429e1ada4957d80ff8b8cd1d9f0c4ee2b03

commit 765d6429e1ada4957d80ff8b8cd1d9f0c4ee2b03
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Mon Jul 28 15:18:01 2025 -0400

    util-linux: add last util
    
    Add a package for the last util needed to query /var/log/wtmp
    
    Build system: x86/64
    Build-tested: x86/64-glibc
    Run-tested: x86/64-glibc
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
    Link: https://github.com/openwrt/openwrt/pull/19586
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 package/utils/util-linux/Makefile | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/package/utils/util-linux/Makefile b/package/utils/util-linux/Makefile
index be7c968cdc..52dca78e3d 100644
--- a/package/utils/util-linux/Makefile
+++ b/package/utils/util-linux/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=util-linux
 PKG_VERSION:=2.41.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.41
@@ -317,6 +317,18 @@ define Package/ipcs/description
   semaphore arrays.
 endef
 
+define Package/last
+$(call Package/util-linux/Default)
+  TITLE:=display history of user logins and logout sessions
+  LICENSE=BSD-4-Clause-UC
+  LICENSE_FILES:=Documentation/licenses/COPYING.BSD-4-Clause-UC
+endef
+
+define Package/last/description
+ last utility displays a history of user login and logout sessions, system reboots,
+ and other events recorded in /var/log/wtmp (or a specified file)
+endef
+
 define Package/logger
 $(call Package/util-linux/Default)
   TITLE:=a shell command interface to the syslog system log module
@@ -706,7 +718,6 @@ MESON_ARGS += \
 	-Dbuild-rfkill=disabled \
 	-Dbuild-tunelp=disabled \
 	-Dbuild-kill=disabled \
-	-Dbuild-last=disabled \
 	-Dbuild-utmpdump=disabled \
 	-Dbuild-line=disabled \
 	-Dbuild-mesg=disabled \
@@ -862,6 +873,11 @@ define Package/ipcs/install
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ipcs $(1)/usr/bin/
 endef
 
+define Package/last/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/last $(1)/usr/bin/
+endef
+
 define Package/logger/install
 	$(INSTALL_DIR) $(1)/usr/bin
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/logger $(1)/usr/bin/util-linux-logger
@@ -1032,6 +1048,7 @@ $(eval $(call BuildPackage,fstrim))
 $(eval $(call BuildPackage,getopt))
 $(eval $(call BuildPackage,hwclock))
 $(eval $(call BuildPackage,ipcs))
+$(eval $(call BuildPackage,last))
 $(eval $(call BuildPackage,logger))
 $(eval $(call BuildPackage,look))
 $(eval $(call BuildPackage,losetup))



From lede-commits at lists.infradead.org  Fri Aug  1 13:14:14 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 01 Aug 2025 16:14:14 -0400
Subject: [openwrt/openwrt]  hostapd: fix logging of configuration content
In-Reply-To: <175407925478.977631.7943422525928835240@git-01.infra.openwrt.org>
References: <175407925478.977631.7943422525928835240@git-01.infra.openwrt.org>
Message-ID: <mailman.110057.1754079258.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/682de550a0e7592842dbc941f962e002b0218847

commit 682de550a0e7592842dbc941f962e002b0218847
Author: Christian Korber <ck at dev.tdt.de>
AuthorDate: Wed May 21 14:36:00 2025 +0200

    hostapd: fix logging of configuration content
    
    As discussed in openwrt#17517, there are contents of hostapd's configuration file logged in syslog.
    This includes critical information like `passphrase`. To circumvent this condition,
    this commit logs only "inline" if config_fname is inline data.
    
    Otherwise the upstream logic of hostapd applies.
    
    Fixes: openwrt#14049
    
    Signed-off-by: Christian Korber <ck at dev.tdt.de>
    Link: https://github.com/openwrt/openwrt/pull/17718
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../hostapd/patches/701-reload_config_inline.patch | 37 +++++++++++++++++++++-
 1 file changed, 36 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/patches/701-reload_config_inline.patch b/package/network/services/hostapd/patches/701-reload_config_inline.patch
index 9c142d1ab6..236337979a 100644
--- a/package/network/services/hostapd/patches/701-reload_config_inline.patch
+++ b/package/network/services/hostapd/patches/701-reload_config_inline.patch
@@ -8,7 +8,7 @@ as adding/removing interfaces.
 
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -4981,7 +4981,12 @@ struct hostapd_config * hostapd_config_r
+@@ -4981,7 +4981,14 @@ struct hostapd_config * hostapd_config_r
  	int errors = 0;
  	size_t i;
  
@@ -19,6 +19,8 @@ as adding/removing interfaces.
 +	} else {
 +		f = fopen(fname, "r");
 +	}
++	wpa_printf(MSG_INFO, "Configuration file: Reading configuration file '%s'",
++	     fname);
  	if (f == NULL) {
  		wpa_printf(MSG_ERROR, "Could not open configuration file '%s' "
  			   "for reading.", fname);
@@ -39,3 +41,36 @@ as adding/removing interfaces.
  	if (f == NULL) {
  		wpa_printf(MSG_ERROR, "Failed to open config file '%s', "
  			   "error: %s", name, strerror(errno));
+--- a/hostapd/main.c
++++ b/hostapd/main.c
+@@ -406,7 +406,11 @@ hostapd_interface_init(struct hapd_inter
+ 	struct hostapd_iface *iface;
+ 	int k;
+ 
+-	wpa_printf(MSG_DEBUG, "Configuration file: %s", config_fname);
++	if (!strncmp(config_fname, "data:", 5)) {
++		wpa_printf(MSG_DEBUG, "Configuration file: %s", "<inline>");
++	} else {
++		wpa_printf(MSG_DEBUG, "Configuration file: %s", config_fname);
++	}
+ 	iface = hostapd_init(interfaces, config_fname);
+ 	if (!iface)
+ 		return NULL;
+--- a/src/ap/hostapd.c
++++ b/src/ap/hostapd.c
+@@ -3380,8 +3380,13 @@ hostapd_interface_init_bss(struct hapd_i
+ 		}
+ 	}
+ 
+-	wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
+-		   config_fname, phy, iface ? "" : " --> new PHY");
++	if (!strncmp(config_fname, "data:", 5)) {
++		wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
++		     "<inline>", phy, iface ? "" : " --> new PHY");
++	} else {
++		wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
++		     config_fname, phy, iface ? "" : " --> new PHY");
++	}
+ 
+ 	conf = interfaces->config_read_cb(config_fname);
+ 	if (!conf)



From lede-commits at lists.infradead.org  Fri Aug  1 14:47:50 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 01 Aug 2025 17:47:50 -0400
Subject: [openwrt/openwrt]  uboot-mvebu: update to version 2025.07
In-Reply-To: <175408487009.1176381.18056689677897078741@git-01.infra.openwrt.org>
References: <175408487009.1176381.18056689677897078741@git-01.infra.openwrt.org>
Message-ID: <mailman.110073.1754084873.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3544a067666aed34a24894026166a283176c5a49

commit 3544a067666aed34a24894026166a283176c5a49
Author: Stefan Kalscheuer <stefan at stklcode.de>
AuthorDate: Fri Aug 1 14:57:27 2025 +0200

    uboot-mvebu: update to version 2025.07
    
    Update package to the latest stable version.
    All patches automatically refreshed.
    
    Signed-off-by: Stefan Kalscheuer <stefan at stklcode.de>
    Link: https://github.com/openwrt/openwrt/pull/19621
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 package/boot/uboot-mvebu/Makefile                                     | 4 ++--
 .../102-arm-mvebu-add-support-for-MikroTik-RB5009UG-S-IN.patch        | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile
index c0357de0d6..561963fbe7 100644
--- a/package/boot/uboot-mvebu/Makefile
+++ b/package/boot/uboot-mvebu/Makefile
@@ -8,10 +8,10 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
-PKG_VERSION:=2025.04
+PKG_VERSION:=2025.07
 PKG_RELEASE:=1
 
-PKG_HASH:=439d3bef296effd54130be6a731c5b118be7fddd7fcc663ccbc5fb18294d8718
+PKG_HASH:=0f933f6c5a426895bf306e93e6ac53c60870e4b54cda56d95211bec99e63bec7
 
 include $(INCLUDE_DIR)/u-boot.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/boot/uboot-mvebu/patches/102-arm-mvebu-add-support-for-MikroTik-RB5009UG-S-IN.patch b/package/boot/uboot-mvebu/patches/102-arm-mvebu-add-support-for-MikroTik-RB5009UG-S-IN.patch
index 950e935755..b9c56c7841 100644
--- a/package/boot/uboot-mvebu/patches/102-arm-mvebu-add-support-for-MikroTik-RB5009UG-S-IN.patch
+++ b/package/boot/uboot-mvebu/patches/102-arm-mvebu-add-support-for-MikroTik-RB5009UG-S-IN.patch
@@ -31,7 +31,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
 
 --- a/arch/arm/dts/Makefile
 +++ b/arch/arm/dts/Makefile
-@@ -165,6 +165,7 @@ dtb-$(CONFIG_ARCH_MVEBU) +=			\
+@@ -172,6 +172,7 @@ dtb-$(CONFIG_ARCH_MVEBU) +=			\
  	armada-3720-uDPU.dtb			\
  	armada-7040-db-nand.dtb			\
  	armada-7040-db.dtb			\



From lede-commits at lists.infradead.org  Sat Aug  2 02:42:52 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 02 Aug 2025 05:42:52 -0400
Subject: [openwrt/openwrt]  realtek: mdio: RTL838x: create new SerDes phy
 register layout
In-Reply-To: <175412777290.2806928.4074460067806729876@git-01.infra.openwrt.org>
References: <175412777290.2806928.4074460067806729876@git-01.infra.openwrt.org>
Message-ID: <mailman.110592.1754127778.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9dddc0bed096b655f792a29043912e8f0d07b754

commit 9dddc0bed096b655f792a29043912e8f0d07b754
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Wed Jul 30 06:41:28 2025 -0400

    realtek: mdio: RTL838x: create new SerDes phy register layout
    
    When a SerDes directly drives a SFP module there is no clear rule of
    how to handle its register set that consists of two parts:
    
    - c22 phy registers 0-15 live in the fiber page (2) of the SerDes
    - other SerDes specific registers exist in pages before and after
    
    The mdio bus and other SerDes functions are a wild mix of directly
    looking into page 2 or just using self defined methods to access
    data.
    
    Provide a consistent phy interface that mixes the SerDes register
    set like classic Realtek phys do it.
    
    - Use register 31 as page select (already in the bus)
    - Always keep the common registers 0-15 in place and read fiber page
    - Map the SerDes internal registers into the upper vendor specific
      registers 16-23 according to the page select register (31).
    
    That gives a register mapping as follows:
    
    +-----------------------+-----------------------+---------------+-------------+
    | reg 0x00-0x0f         | reg 0x10-0x17         | reg 0x18-0x1e | reg 0x1f    |
    +-----------------------+-----------------------+---------------+-------------+
    | SerDes fiber page (3) | real SerDes registers | zero          | SerDes page |
    | registers 0 - 15      | in packages of 8      |               | select reg  |
    +-----------------------+-----------------------+---------------+-------------+
    
    Example to make it as clear as possible.
    
    SerDes registers on a RTL838x show
    
    Page / Reg   | 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B ...
    -------------+----------------------------------------------------------------
    0 - SDS      | 0C03 0F00 7060 7106 074D 0EBF 0F0F 0359 5248 0000 0F80 0000 ...
    1 - SDS_EXT  | 0000 0000 85FA 8C6D 5CCC 0000 20D8 0003 79AA 8C64 00C3 1482 ...
    2 - FIB      | 1140 6189 001C CA40 01A0 0000 0000 0004 0000 0000 0000 0000 ...
    3 - FIB_EXT  | 1140 6109 001C CA40 01A0 0000 0000 0004 0000 0000 0000 0000 ...
    
    This translates to this phy layout
    
                 | SerDes fiber registers  normal SerDes registers  zero     p.sel
    Page / Reg   | 0x00 0x01 0x02 0x03 ... 0x10 0x11 0x12 0x13 ...  0x18 ... 0x1f
    -------------+---------------------------------------------------------------
    0            | 1140 6189 001C CA40 ... 0C03 0F00 7060 7106 ...  0000 ... 0000
    1            | 1140 6189 001C CA40 ... 5248 0000 0F80 0000 ...  0000 ... 0001
    ...
    4            | 1140 6189 001C CA40 ... 0000 0000 85FA 8C6D ...  0000 ... 0004
    
    For now just do it for RTL838x devices.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19604
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../files-6.12/drivers/net/ethernet/rtl838x_eth.c  | 125 +++++++++++++++++----
 1 file changed, 106 insertions(+), 19 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
index 5c6d79d19b..c6e03ba571 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
@@ -83,6 +83,8 @@ extern int rtl931x_write_sds_phy(int phy_addr, int page, int phy_reg, u16 v);
 #define RTMDIO_ABS		BIT(2)
 #define RTMDIO_PKG		BIT(3)
 
+#define RTMDIO_838X_BASE	(0xe780)
+
 struct p_hdr {
 	uint8_t		*buf;
 	uint16_t	reserved;
@@ -1647,7 +1649,7 @@ struct rtmdio_bus_priv {
 	bool raw[RTMDIO_MAX_PORT];
 	int smi_bus[RTMDIO_MAX_PORT];
 	u8 smi_addr[RTMDIO_MAX_PORT];
-	u32 sds_id[RTMDIO_MAX_PORT];
+	int sds_id[RTMDIO_MAX_PORT];
 	bool smi_bus_isc45[RTMDIO_MAX_SMI_BUS];
 	bool phy_is_internal[RTMDIO_MAX_PORT];
 	phy_interface_t interfaces[RTMDIO_MAX_PORT];
@@ -1655,6 +1657,8 @@ struct rtmdio_bus_priv {
 	int (*write_mmd_phy)(u32 port, u32 addr, u32 reg, u32 val);
 	int (*read_phy)(u32 port, u32 page, u32 reg, u32 *val);
 	int (*write_phy)(u32 port, u32 page, u32 reg, u32 val);
+	int (*read_sds_phy)(int sds, int page, int regnum);
+	int (*write_sds_phy)(int sds, int page, int regnum, u16 val);
 };
 
 /*
@@ -1750,18 +1754,43 @@ int phy_port_read_paged(struct phy_device *phydev, int port, int page, u32 regnu
 
 /* SerDes reader/writer functions for the ports without external phy. */
 
-static int rtmdio_838x_read_sds(int addr, int regnum)
+/*
+ * The RTL838x has 6 SerDes. The 16 bit registers start at 0xbb00e780 and are mapped directly into
+ * 32 bit memory addresses. High 16 bits are always empty. A "lower" memory block serves pages 0/3
+ * a "higher" memory block pages 1/2.
+ */
+
+static int rtmdio_838x_reg_offset(int sds, int page, int regnum)
 {
-	int offset = addr == 26 ? 0x100 : 0x0;
+	if (sds < 0 || sds > 5)
+		return -EINVAL;
+
+	if (page == 0 || page == 3)
+		return (sds << 9) + (page << 7) + (regnum << 2);
+	else if (page == 1 || page == 2)
+		return 0xb80 + (sds << 8) + (page << 7) + (regnum << 2);
+
+	return -EINVAL;
+}
+
+static int rtmdio_838x_read_sds_phy(int sds, int page, int regnum)
+{
+	int offset = rtmdio_838x_reg_offset(sds, page, regnum);
+
+	if (offset < 0)
+		return offset;
 
-	return sw_r32(RTL838X_SDS4_FIB_REG0 + offset + (regnum << 2)) & 0xffff;
+	return sw_r32(RTMDIO_838X_BASE + offset) & GENMASK(15, 0);
 }
 
-static int rtmdio_838x_write_sds(int addr, int regnum, u16 val)
+static int rtmdio_838x_write_sds_phy(int sds, int page, int regnum, u16 val)
 {
-	int offset = addr == 26 ? 0x100 : 0x0;
+	int offset = rtmdio_838x_reg_offset(sds, page, regnum);
 
-	sw_w32(val, RTL838X_SDS4_FIB_REG0 + offset + (regnum << 2));
+	if (offset < 0)
+		return offset;
+
+	sw_w32(val, RTMDIO_838X_BASE + offset);
 
 	return 0;
 }
@@ -1950,6 +1979,58 @@ static int rtmdio_read_c45(struct mii_bus *bus, int addr, int devnum, int regnum
 	return err ? err : val;
 }
 
+static int rtmdio_map_sds_register(int page, int regnum, int *sds_page, int *sds_regnum)
+{
+	/*
+	 * For the SerDes PHY simulate a register mapping like common RealTek PHYs do. Always
+	 * keep the common registers 0x00-0x0f in place and map the SerDes registers into the
+	 * upper vendor specific registers 0x10-0x17 according to the page select register
+	 * (0x1f). That gives a register mapping as follows:
+	 *
+	 * +-----------------------+-----------------------+---------------+-----------------+
+	 * | reg 0x00-0x0f         | reg 0x10-0x17         | reg 0x18-0x1e | reg 0x1f        |
+	 * +-----------------------+-----------------------+---------------+-----------------+
+	 * | SerDes fiber page (2) | real SerDes registers | zero          | SerDes page     |
+	 * | registers 0x00-0x0f   | in packages of 8      |               | select register |
+	 * +-----------------------+-----------------------+---------------+-----------------+
+	 */
+
+	if (regnum < 16) {
+		*sds_page = 2;
+		*sds_regnum = regnum;
+	} else if (regnum < 24) {
+		*sds_page = page / 4;
+		*sds_regnum = 8 * (page % 4) + (regnum - 16);
+	} else
+		return 0;
+
+	return 1;
+}
+
+static int rtmdio_read_sds_phy(struct rtmdio_bus_priv *priv, int sds, int page, int regnum)
+{
+	int ret, sds_page, sds_regnum;
+
+	ret = rtmdio_map_sds_register(page, regnum, &sds_page, &sds_regnum);
+	if (ret)
+		ret = priv->read_sds_phy(sds, sds_page, sds_regnum);
+	pr_debug("rd_SDS(sds=%d, pag=%d, reg=%d) = %d\n", sds, page, regnum, ret);
+
+	return ret;
+}
+
+static int rtmdio_write_sds_phy(struct rtmdio_bus_priv *priv, int sds, int page, int regnum, u16 val)
+{
+	int ret, sds_page, sds_regnum;
+
+	ret = rtmdio_map_sds_register(page, regnum, &sds_page, &sds_regnum);
+	if (ret)
+		ret = priv->write_sds_phy(sds, sds_page, sds_regnum, val);
+	pr_debug("wr_SDS(sds=%d, pag=%d, reg=%d, val=%d) err = %d\n", sds, page, regnum, val, ret);
+
+	return ret;
+}
+
 static int rtmdio_83xx_read(struct mii_bus *bus, int addr, int regnum)
 {
 	struct rtmdio_bus_priv *priv = bus->priv;
@@ -1961,16 +2042,18 @@ static int rtmdio_83xx_read(struct mii_bus *bus, int addr, int regnum)
 	if (addr >= priv->cpu_port)
 		return -ENODEV;
 
-	if (addr >= 24 && addr <= 27 && priv->id == 0x8380)
-		return rtmdio_838x_read_sds(addr, regnum);
-
-	if (priv->family_id == RTL8390_FAMILY_ID && priv->phy_is_internal[addr])
-		return rtl839x_read_sds_phy(addr, regnum);
-
 	if (regnum == RTMDIO_PAGE_SELECT && priv->page[addr] != priv->rawpage)
 		return priv->page[addr];
 
 	priv->raw[addr] = (priv->page[addr] == priv->rawpage);
+	if ((priv->phy_is_internal[addr]) && (priv->sds_id[addr] >=0)) {
+		if (priv->family_id == RTL8380_FAMILY_ID)
+			return rtmdio_read_sds_phy(priv, priv->sds_id[addr],
+						   priv->page[addr], regnum);
+		else
+			return rtl839x_read_sds_phy(addr, regnum);
+	}
+
 	err = (*priv->read_phy)(addr, priv->page[addr], regnum, &val);
 	pr_debug("rd_PHY(adr=%d, pag=%d, reg=%d) = %d, err = %d\n",
 		 addr, priv->page[addr], regnum, val, err);
@@ -2042,17 +2125,19 @@ static int rtmdio_83xx_write(struct mii_bus *bus, int addr, int regnum, u16 val)
 
 	page = priv->page[addr];
 
-	if (addr >= 24 && addr <= 27 && priv->id == 0x8380)
-		return rtmdio_838x_write_sds(addr, regnum, val);
-
-	if (priv->family_id == RTL8390_FAMILY_ID && priv->phy_is_internal[addr])
-		return rtl839x_write_sds_phy(addr, regnum, val);
-
 	if (regnum == RTMDIO_PAGE_SELECT)
 		priv->page[addr] = val;
 
 	if (!priv->raw[addr] && (regnum != RTMDIO_PAGE_SELECT || page == priv->rawpage)) {
 		priv->raw[addr] = (page == priv->rawpage);
+		if (priv->phy_is_internal[addr] && priv->sds_id[addr] >=0 ) {
+			if (priv->family_id == RTL8380_FAMILY_ID)
+				return rtmdio_write_sds_phy(priv, priv->sds_id[addr],
+							    priv->page[addr], regnum, val);
+			else
+				return rtl839x_write_sds_phy(addr, regnum, val);
+		}
+
 		err = (*priv->write_phy)(addr, page, regnum, val);
 		pr_debug("wr_PHY(adr=%d, pag=%d, reg=%d, val=%d) err = %d\n",
 			 addr, page, regnum, val, err);
@@ -2377,6 +2462,8 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv)
 		priv->mii_bus->read = rtmdio_83xx_read;
 		priv->mii_bus->write = rtmdio_83xx_write;
 		priv->mii_bus->reset = rtmdio_838x_reset;
+		bus_priv->read_sds_phy = rtmdio_838x_read_sds_phy;
+		bus_priv->write_sds_phy = rtmdio_838x_write_sds_phy;
 		bus_priv->read_mmd_phy = rtmdio_838x_read_mmd_phy;
 		bus_priv->write_mmd_phy = rtmdio_838x_write_mmd_phy;
 		bus_priv->read_phy = rtmdio_838x_read_phy;



From lede-commits at lists.infradead.org  Sat Aug  2 08:44:54 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 02 Aug 2025 11:44:54 -0400
Subject: [openwrt/openwrt]  hostapd: maintain ucode hostapd.bss list per
 interface
In-Reply-To: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
References: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
Message-ID: <mailman.110640.1754149496.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/bcd3d62834e39cce35043aec5542094b92c9043d

commit bcd3d62834e39cce35043aec5542094b92c9043d
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Jun 26 12:54:36 2025 +0200

    hostapd: maintain ucode hostapd.bss list per interface
    
    Preparation for MLO support
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/hostapd/files/hostapd.uc  | 26 ++++++++++++++--------
 .../network/services/hostapd/src/src/ap/ucode.c    | 18 +++++++--------
 2 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc
index 3e941ae415..bdcba4880a 100644
--- a/package/network/services/hostapd/files/hostapd.uc
+++ b/package/network/services/hostapd/files/hostapd.uc
@@ -471,18 +471,26 @@ function bss_find_existing(config, prev_config, prev_hash)
 	return -1;
 }
 
-function get_config_bss(config, idx)
+function get_config_bss(name, config, idx)
 {
 	if (!config.bss[idx]) {
 		hostapd.printf(`Invalid bss index ${idx}`);
-		return null;
+		return;
 	}
 
 	let ifname = config.bss[idx].ifname;
-	if (!ifname)
+	if (!ifname) {
 		hostapd.printf(`Could not find bss ${config.bss[idx].ifname}`);
+		return;
+	}
+
+	let if_bss = hostapd.bss[name];
+	if (!if_bss) {
+		hostapd.printf(`Could not find interface ${name} bss list`);
+		return;
+	}
 
-	return hostapd.bss[ifname];
+	return if_bss[ifname];
 }
 
 function iface_reload_config(name, phydev, config, old_config)
@@ -508,7 +516,7 @@ function iface_reload_config(name, phydev, config, old_config)
 		return false;
 	}
 
-	let first_bss = hostapd.bss[iface_name];
+	let first_bss = get_config_bss(name, old_config, 0);
 	if (!first_bss) {
 		hostapd.printf(`Could not find bss of previous interface ${iface_name}`);
 		return false;
@@ -543,7 +551,7 @@ function iface_reload_config(name, phydev, config, old_config)
 		let cur_config = config.bss[i];
 		let prev_config = old_config.bss[prev];
 
-		let prev_bss = get_config_bss(old_config, prev);
+		let prev_bss = get_config_bss(name, old_config, prev);
 		if (!prev_bss)
 			return false;
 
@@ -576,7 +584,7 @@ function iface_reload_config(name, phydev, config, old_config)
 			config.bss[0].bssid = old_config.bss[0].bssid;
 		}
 
-		let prev_bss = get_config_bss(old_config, 0);
+		let prev_bss = get_config_bss(name, old_config, 0);
 		if (!prev_bss)
 			return false;
 
@@ -591,7 +599,7 @@ function iface_reload_config(name, phydev, config, old_config)
 		if (!prev_bss_hash[i])
 			continue;
 
-		let prev_bss = get_config_bss(old_config, i);
+		let prev_bss = get_config_bss(name, old_config, i);
 		if (!prev_bss)
 			return false;
 
@@ -612,7 +620,7 @@ function iface_reload_config(name, phydev, config, old_config)
 		if (old_ifname == new_ifname)
 			continue;
 
-		if (hostapd.bss[new_ifname]) {
+		if (hostapd.bss[name][new_ifname]) {
 			new_ifname = "tmp_" + substr(hostapd.sha1(new_ifname), 0, 8);
 			push(rename_list, i);
 		}
diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c
index d54ab63d8e..5204559d43 100644
--- a/package/network/services/hostapd/src/src/ap/ucode.c
+++ b/package/network/services/hostapd/src/src/ap/ucode.c
@@ -47,39 +47,37 @@ hostapd_ucode_iface_get_uval(struct hostapd_iface *hapd)
 }
 
 static void
-hostapd_ucode_update_bss_list(struct hostapd_iface *iface, uc_value_t *if_bss, uc_value_t *bss)
+hostapd_ucode_update_bss_list(struct hostapd_iface *iface, uc_value_t *bss)
 {
 	uc_value_t *list;
 	int i;
 
-	list = ucv_array_new(vm);
+	list = ucv_object_new(vm);
 	for (i = 0; iface->bss && i < iface->num_bss; i++) {
 		struct hostapd_data *hapd = iface->bss[i];
+		uc_value_t *uval = hostapd_ucode_bss_get_uval(hapd);
 
-		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(list, hapd->conf->iface, uval);
 	}
-	ucv_object_add(if_bss, iface->phy, list);
+	ucv_object_add(bss, iface->phy, list);
 }
 
 static void
 hostapd_ucode_update_interfaces(void)
 {
 	uc_value_t *ifs = ucv_object_new(vm);
-	uc_value_t *if_bss = ucv_array_new(vm);
-	uc_value_t *bss = ucv_object_new(vm);
+	uc_value_t *if_bss = ucv_object_new(vm);
 	int i;
 
 	for (i = 0; i < interfaces->count; i++) {
 		struct hostapd_iface *iface = interfaces->iface[i];
 
 		ucv_object_add(ifs, iface->phy, hostapd_ucode_iface_get_uval(iface));
-		hostapd_ucode_update_bss_list(iface, if_bss, bss);
+		hostapd_ucode_update_bss_list(iface, if_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_object_add(ucv_prototype_get(global), "bss", if_bss);
 
 	ucv_gc(vm);
 }



From lede-commits at lists.infradead.org  Sat Aug  2 08:44:57 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 02 Aug 2025 11:44:57 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: add MLO interface support
In-Reply-To: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
References: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
Message-ID: <mailman.110643.1754149497.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/217c31542330ad47907fb153d3232a15833698b1

commit 217c31542330ad47907fb153d3232a15833698b1
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Jun 27 22:42:30 2025 +0200

    wifi-scripts: ucode: add MLO interface support
    
    MLO can be enabled by configuring a wifi-iface section with multiple
    radios, like this:
    
      config wifi-iface
        list radio 'radio0'
        list radio 'radio1'
        option mlo '1'
        option ssid 'OpenWrt'
        option mode 'ap'
        option network 'lan'
        ...
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../files-ucode/lib/netifd/wireless/mac80211.sh    | 37 +++++++++++++++++++++-
 .../files-ucode/usr/share/ucode/wifi/ap.uc         |  6 ++++
 .../files-ucode/usr/share/ucode/wifi/hostapd.uc    |  2 +-
 .../wifi-scripts/files/lib/netifd/wireless.uc      |  8 +++--
 .../wifi-scripts/files/usr/share/hostap/common.uc  |  4 ++-
 5 files changed, 52 insertions(+), 5 deletions(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh b/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh
index 249c7a4596..8ef2dd9b2b 100755
--- a/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh
+++ b/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh
@@ -157,9 +157,39 @@ function config_add_mesh_params(config, data) {
 		config_add(config, param, data[param]);
 }
 
+function setup_mlo(data) {
+	let config = {};
+	let idx = 0;
+
+	for (let k, v in data.interfaces) {
+		let ifname = v.config.ifname;
+		if (!ifname)
+			ifname = 'ap-mld' + idx++;
+
+		delete v.config.ifname;
+		config[ifname] = v.config;
+		netifd.set_vif(k, ifname);
+
+		v.config.phy = find_phy(v.config.radio_config[0], true);
+		delete v.config.radio_config;
+	}
+
+	let ret = ubus.call('hostapd', 'mld_set', { config });
+	if (type(ret) != "object")
+		return netifd.setup_failed('HOSTAPD_START_FAILED');
+
+	netifd.add_process('/usr/sbin/hostapd', ret.pid, true, true);
+	netifd.set_up();
+
+	return 0;
+}
+
 function setup() {
 	let data = json(ARGV[3]);
 
+	if (ARGV[2] == "#mlo")
+		return setup_mlo(data);
+
 	data.phy = find_phy(data.config, true);
 	if (!data.phy) {
 		log('Bug: PHY is undefined for device');
@@ -200,6 +230,7 @@ function setup() {
 		}
 
 		switch (mode) {
+		case 'link':
 		case 'ap':
 			has_ap = true;
 			// fallthrough
@@ -210,7 +241,8 @@ function setup() {
 				data.config.noscan = true;
 			validate('iface', v.config);
 			iface.prepare(v.config, data.phy + data.phy_suffix, data.config.num_global_macaddr, data.config.macaddr_base);
-			netifd.set_vif(k, v.config.ifname);
+			if (mode != "link")
+				netifd.set_vif(k, v.config.ifname);
 			break;
 		}
 
@@ -277,6 +309,9 @@ function setup() {
 function teardown() {
 	let data = json(ARGV[3]);
 
+	if (ARGV[2] == "#mlo")
+		return 0;
+
 	if (!data.data?.phy) {
 		log('Bug: PHY is undefined for device');
 		return 1;
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
index 47049f30bb..62e3ec0afb 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
@@ -488,6 +488,12 @@ export function generate(interface, data, config, vlans, stas, phy_features) {
 	for (let raw in config.hostapd_options)
 		append_raw(raw);
 
+	if (config.mode == 'link') {
+		append_raw('mld_ap=1');
+		if (data.config.radio != null)
+			append_raw('mld_link_id=' + data.config.radio);
+	}
+
 	if (config.default_macaddr)
 		append_raw('#default_macaddr');
 };
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
index cc174cda50..a31b2955eb 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
@@ -548,7 +548,7 @@ export function setup(data) {
 		append('\n#macaddr_base', data.config.macaddr_base);
 
 	for (let k, interface in data.interfaces) {
-		if (interface.config.mode != 'ap')
+		if (interface.config.mode != 'ap' && interface.config.mode != 'link')
 			continue;
 
 		interface.config.network_bridge = interface.bridge;
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
index de67bd5d94..b63ec239c7 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
@@ -108,6 +108,7 @@ function config_init(uci)
 		let mlo_vif = parse_bool(data.mlo);
 		let radios = map(dev_names, (v) => radio_idx[v]);
 		radios = filter(radios, (v) => v != null);
+		let radio_config = map(dev_names, (v) => devices[v].config);
 		if (mlo_vif)
 			dev_names = [ wdev.mlo_name, ...dev_names ];
 		for (let dev_name in dev_names) {
@@ -120,8 +121,11 @@ function config_init(uci)
 				continue;
 
 			let config = parse_attribute_list(data, handler.iface);
-			if (mlo_vif && dev_name != wdev.mlo_name)
-				config.mode = "link";
+			if (mlo_vif)
+				if (dev_name == wdev.mlo_name)
+					config.radio_config = radio_config;
+				else
+					config.mode = "link";
 			config.radios = radios;
 
 			let vif = {
diff --git a/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc b/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc
index caab14bcab..f801c4940c 100644
--- a/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc
+++ b/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc
@@ -101,7 +101,9 @@ function wdev_create(phy, name, data)
 		req["4addr"] = data["4addr"];
 	if (data.macaddr)
 		req.mac = data.macaddr;
-	if (data.radio != null && data.radio >= 0)
+	if (data.radio_mask > 0)
+		req.vif_radio_mask = data.radio_mask;
+	else if (data.radio != null && data.radio >= 0)
 		req.vif_radio_mask = 1 << data.radio;
 
 	nl80211.error();



From lede-commits at lists.infradead.org  Sat Aug  2 08:44:58 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 02 Aug 2025 11:44:58 -0400
Subject: [openwrt/openwrt]  hostapd: fix bss config reload while in DFS state
In-Reply-To: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
References: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
Message-ID: <mailman.110644.1754149497.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3786d15561f6e3923eac9cdff4246226a96b589a

commit 3786d15561f6e3923eac9cdff4246226a96b589a
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Jul 5 20:45:48 2025 +0200

    hostapd: fix bss config reload while in DFS state
    
    Only start a BSS after a config change if it was started before.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/hostapd/src/src/ap/ucode.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c
index cbe2ee9506..081872ebe8 100644
--- a/package/network/services/hostapd/src/src/ap/ucode.c
+++ b/package/network/services/hostapd/src/src/ap/ucode.c
@@ -256,6 +256,7 @@ uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
 	uc_value_t *files_only = uc_fn_arg(2);
 	unsigned int i, idx = 0;
 	int ret = -1;
+	bool started;
 
 	if (!hapd || ucv_type(file) != UC_STRING)
 		goto out;
@@ -287,6 +288,7 @@ uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
 		goto free;
 	}
 
+	started = hapd->started;
 	__uc_hostapd_bss_stop(hapd);
 
 	old_bss = hapd->conf;
@@ -299,7 +301,10 @@ uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
 	if (hapd == iface->bss[0])
 		memcpy(hapd->own_addr, hapd->conf->bssid, ETH_ALEN);
 
-	ret = __uc_hostapd_bss_start(hapd);
+	if (started)
+		ret = __uc_hostapd_bss_start(hapd);
+	else
+		ret = 0;
 	hostapd_ucode_update_interfaces();
 
 free:



From lede-commits at lists.infradead.org  Sat Aug  2 08:44:52 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 02 Aug 2025 11:44:52 -0400
Subject: [openwrt/openwrt]  build: stricter hash validation on download
In-Reply-To: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
References: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
Message-ID: <mailman.110645.1754149497.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/042996b46bd41292ef1fa2d58e3b824a547f4c55

commit 042996b46bd41292ef1fa2d58e3b824a547f4c55
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Jul 21 18:32:50 2025 +0200

    build: stricter hash validation on download
    
    Check the hash after packing the checkout and fail the build if it
    does not match.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 include/download.mk | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/include/download.mk b/include/download.mk
index 518a14e035..be0c9a31f1 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -154,7 +154,17 @@ endef
 # $(2): "PKG_" if <name> as in Download/<name> is "default", otherwise "Download/<name>:"
 # $(3): shell command sequence to do the download
 define wrap_mirror
-$(if $(if $(MIRROR),$(filter-out x,$(MIRROR_HASH))),$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_HASH)" "" || ( $(3) ),$(3)) \
+$(if $(if $(MIRROR), \
+	$(filter-out x,$(MIRROR_HASH))),$(SCRIPT_DIR)/download.pl "$(DL_DIR)" "$(FILE)" "$(MIRROR_HASH)" "" || \
+		( $(3) ) \
+		$(if $(filter-out x,$(MIRROR_HASH)), && ( \
+			file_hash="$$$$($(MKHASH) sha256 "$(DL_DIR)/$(FILE)")"; \
+			[ "$$$$file_hash" = "$(MIRROR_HASH)" ] || { \
+				echo "Hash mismatch for file $(FILE): expected $(MIRROR_HASH), got $$$$file_hash"; \
+				false; \
+			}; \
+		)),
+	$(3)) \
 $(if $(filter check,$(1)), \
 	$(call check_hash,$(FILE),$(MIRROR_HASH),$(2)MIRROR_$(call hash_var,$(MIRROR_MD5SUM))) \
 	$(call check_md5,$(MIRROR_MD5SUM),$(2)MIRROR_MD5SUM,$(2)MIRROR_HASH) \



From lede-commits at lists.infradead.org  Sat Aug  2 08:44:55 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 02 Aug 2025 11:44:55 -0400
Subject: [openwrt/openwrt]  hostapd: remove unnecessary ucv_gc calls
In-Reply-To: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
References: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
Message-ID: <mailman.110646.1754149499.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/be2916b1d45a05094c8ee01f6c9c1c98ba1d16ed

commit be2916b1d45a05094c8ee01f6c9c1c98ba1d16ed
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Jun 26 14:36:10 2025 +0200

    hostapd: remove unnecessary ucv_gc calls
    
    They should not be needed, since the code doesn't use circular references
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/hostapd/src/src/ap/ucode.c         |  8 --------
 package/network/services/hostapd/src/src/utils/ucode.c      | 10 ----------
 package/network/services/hostapd/src/wpa_supplicant/ucode.c |  6 ------
 3 files changed, 24 deletions(-)

diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c
index 5204559d43..d3eadba15a 100644
--- a/package/network/services/hostapd/src/src/ap/ucode.c
+++ b/package/network/services/hostapd/src/src/ap/ucode.c
@@ -78,8 +78,6 @@ hostapd_ucode_update_interfaces(void)
 
 	ucv_object_add(ucv_prototype_get(global), "interfaces", ifs);
 	ucv_object_add(ucv_prototype_get(global), "bss", if_bss);
-
-	ucv_gc(vm);
 }
 
 static uc_value_t *
@@ -331,7 +329,6 @@ uc_hostapd_bss_delete(uc_vm_t *vm, size_t nargs)
 	os_free(hapd);
 
 	hostapd_ucode_update_interfaces();
-	ucv_gc(vm);
 
 	return NULL;
 }
@@ -780,7 +777,6 @@ int hostapd_ucode_sta_auth(struct hostapd_data *hapd, struct sta_info *sta)
 		ret = ucv_int64_get(cur);
 
 	ucv_put(val);
-	ucv_gc(vm);
 
 	return ret;
 }
@@ -906,7 +902,6 @@ int hostapd_ucode_init(struct hapd_interfaces *ifaces)
 
 	if (wpa_ucode_run(HOSTAPD_UC_PATH "hostapd.uc"))
 		goto free_vm;
-	ucv_gc(vm);
 
 	return 0;
 
@@ -940,7 +935,6 @@ void hostapd_ucode_bss_cb(struct hostapd_data *hapd, const char *type)
 	uc_value_push(ucv_get(val));
 	ucv_put(wpa_ucode_call(3));
 	ucv_put(val);
-	ucv_gc(vm);
 }
 
 void hostapd_ucode_free_bss(struct hostapd_data *hapd)
@@ -960,7 +954,6 @@ void hostapd_ucode_free_bss(struct hostapd_data *hapd)
 	ucv_put(wpa_ucode_call(2));
 
 	ucv_put(val);
-	ucv_gc(vm);
 }
 
 #ifdef CONFIG_APUP
@@ -977,6 +970,5 @@ void hostapd_ucode_apup_newpeer(struct hostapd_data *hapd, const char *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
diff --git a/package/network/services/hostapd/src/src/utils/ucode.c b/package/network/services/hostapd/src/src/utils/ucode.c
index a7cc2c7059..b5fdf6676c 100644
--- a/package/network/services/hostapd/src/src/utils/ucode.c
+++ b/package/network/services/hostapd/src/src/utils/ucode.c
@@ -14,7 +14,6 @@
 
 static uc_value_t *registry;
 static uc_vm_t vm;
-static struct uloop_timeout gc_timer;
 static struct udebug ud;
 static struct udebug_buf ud_log, ud_nl[3];
 static const struct udebug_buf_meta meta_log = {
@@ -71,11 +70,6 @@ static struct udebug_ubus_ring udebug_rings[] = {
 char *udebug_service;
 struct udebug_ubus ud_ubus;
 
-static void uc_gc_timer(struct uloop_timeout *timeout)
-{
-	ucv_gc(&vm);
-}
-
 uc_value_t *uc_wpa_printf(uc_vm_t *vm, size_t nargs)
 {
 	uc_value_t *level = uc_fn_arg(0);
@@ -254,7 +248,6 @@ uc_vm_t *wpa_ucode_create_vm(void)
 
 	uc_stdlib_load(uc_vm_scope_get(&vm));
 	eloop_add_uloop();
-	gc_timer.cb = uc_gc_timer;
 
 	return &vm;
 }
@@ -486,9 +479,6 @@ uc_value_t *wpa_ucode_call(size_t nargs)
 	if (uc_vm_call(&vm, true, nargs) != EXCEPTION_NONE)
 		return NULL;
 
-	if (!gc_timer.pending)
-		uloop_timeout_set(&gc_timer, 10);
-
 	return uc_vm_stack_pop(&vm);
 }
 
diff --git a/package/network/services/hostapd/src/wpa_supplicant/ucode.c b/package/network/services/hostapd/src/wpa_supplicant/ucode.c
index 8335a27e89..8ba4db01de 100644
--- a/package/network/services/hostapd/src/wpa_supplicant/ucode.c
+++ b/package/network/services/hostapd/src/wpa_supplicant/ucode.c
@@ -39,7 +39,6 @@ wpas_ucode_update_interfaces(void)
 		ucv_object_add(ifs, wpa_s->ifname, wpas_ucode_iface_get_uval(wpa_s));
 
 	ucv_object_add(ucv_prototype_get(global), "interfaces", ifs);
-	ucv_gc(vm);
 }
 
 void wpas_ucode_add_bss(struct wpa_supplicant *wpa_s)
@@ -52,7 +51,6 @@ void wpas_ucode_add_bss(struct wpa_supplicant *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);
 }
 
 void wpas_ucode_free_bss(struct wpa_supplicant *wpa_s)
@@ -71,7 +69,6 @@ void wpas_ucode_free_bss(struct wpa_supplicant *wpa_s)
 	uc_value_push(ucv_get(val));
 	ucv_put(wpa_ucode_call(2));
 	ucv_put(val);
-	ucv_gc(vm);
 }
 
 void wpas_ucode_update_state(struct wpa_supplicant *wpa_s)
@@ -91,7 +88,6 @@ void wpas_ucode_update_state(struct wpa_supplicant *wpa_s)
 	uc_value_push(ucv_get(val));
 	uc_value_push(ucv_string_new(state));
 	ucv_put(wpa_ucode_call(3));
-	ucv_gc(vm);
 }
 
 void wpas_ucode_event(struct wpa_supplicant *wpa_s, int event, union wpa_event_data *data)
@@ -124,7 +120,6 @@ void wpas_ucode_event(struct wpa_supplicant *wpa_s, int event, union wpa_event_d
 	}
 
 	ucv_put(wpa_ucode_call(4));
-	ucv_gc(vm);
 }
 
 static const char *obj_stringval(uc_value_t *obj, const char *name)
@@ -310,7 +305,6 @@ int wpas_ucode_init(struct wpa_global *gl)
 	if (wpa_ucode_run(HOSTAPD_UC_PATH "wpa_supplicant.uc"))
 		goto free_vm;
 
-	ucv_gc(vm);
 	return 0;
 
 free_vm:



From lede-commits at lists.infradead.org  Sat Aug  2 08:44:53 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 02 Aug 2025 11:44:53 -0400
Subject: [openwrt/openwrt]  netifd: update to Git HEAD (2025-08-02)
In-Reply-To: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
References: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
Message-ID: <mailman.110647.1754149499.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/96fa769937cfce5a076f4425c4b6dc1fd12a77a4

commit 96fa769937cfce5a076f4425c4b6dc1fd12a77a4
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Aug 2 16:45:39 2025 +0200

    netifd: update to Git HEAD (2025-08-02)
    
    3a7878065829 system-dummy: add missing vrf functions
    471d9d6abb6d CMakeLists.txt: bump minimum required version
    c3a0255e2150 scripts: fix dummy mode on systems where libubox is in /usr/local
    7a3b281230e4 update example mac80211 script and wireless config
    d9f2dd2614f2 wireless: replace with ucode scripts
    74c22601baad wireless: add MLO support to example scripts
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/Makefile             |   6 +-
 .../network/config/netifd/files/lib/netifd/main.uc |  80 +++
 .../config/netifd/files/lib/netifd/utils.uc        | 131 +++++
 .../files/lib/netifd/wireless-device.uc            | 637 +++++++++++++++++++++
 .../wifi-scripts/files/lib/netifd/wireless.uc      | 450 +++++++++++++++
 5 files changed, 1301 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 86a2713e81..790619b6a3 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2025-05-23
-PKG_SOURCE_VERSION:=7901e66c5f273bceee8981bc8a0c8b0e60945f60
-PKG_MIRROR_HASH:=8b85ec64e446ae065b1466c520b2d3aae329b6167221e425af903777278f557e
+PKG_SOURCE_DATE:=2025-08-02
+PKG_SOURCE_VERSION:=74c22601baad83cc9bc0fddb98f15d7abaa52c67
+PKG_MIRROR_HASH:=3841d17a0e59bab8dbcf0433bbc326f5b7b9b54dbb79b8759c20bdb5f0340227
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0
diff --git a/package/network/config/netifd/files/lib/netifd/main.uc b/package/network/config/netifd/files/lib/netifd/main.uc
new file mode 100644
index 0000000000..6c2e38fd6a
--- /dev/null
+++ b/package/network/config/netifd/files/lib/netifd/main.uc
@@ -0,0 +1,80 @@
+import * as uci from "uci";
+import * as uloop from "uloop";
+import * as libubus from "ubus";
+import { access, dirname } from "fs";
+
+function ex_handler(e)
+{
+	netifd.log(netifd.L_WARNING, `Exception: ${e}\n${e.stacktrace[0].context}\n`);
+}
+
+uloop.guard(ex_handler);
+libubus.guard(ex_handler);
+
+let ubus = netifd.ubus = libubus.connect();
+let wireless;
+
+function uci_ctx()
+{
+	let savedir = netifd.dummy_mode ? "./tmp" : null;
+	let ctx = uci.cursor(netifd.config_path, savedir, null, {
+		strict: false
+	});
+	return ctx;
+}
+
+function config_init()
+{
+	let ctx = uci_ctx();
+
+	if (wireless)
+		wireless.config_init(ctx);
+}
+
+function config_start()
+{
+	if (wireless)
+		wireless.config_start();
+}
+
+function check_interfaces()
+{
+	if (wireless)
+		wireless.check_interfaces();
+}
+
+function hotplug(name, add)
+{
+	if (wireless)
+		wireless.hotplug(name, add);
+}
+
+function ex_wrap(cb)
+{
+	let fn = cb;
+	return (...args) => {
+		try {
+			return fn(...args);
+		} catch (e) {
+			netifd.log(netifd.L_WARNING, `${e}\n${e.stacktrace[0].context}`);
+		}
+	};
+}
+
+netifd.cb = {
+	hotplug: ex_wrap(hotplug),
+	config_init: ex_wrap(config_init),
+	config_start: ex_wrap(config_start),
+	check_interfaces: ex_wrap(check_interfaces),
+};
+
+const wireless_module = dirname(sourcepath()) + "/wireless.uc";
+if (access(wireless_module, "r")) {
+	try {
+		wireless = loadfile(wireless_module)();
+	} catch (e) {
+		netifd.log(netifd.L_WARNING, `Error loading wireless module: ${e}\n${e.stacktrace[0].context}\n`);
+	}
+} else {
+	netifd.log(netifd.L_WARNING, `Wireless module not found\n`);
+}
diff --git a/package/network/config/netifd/files/lib/netifd/utils.uc b/package/network/config/netifd/files/lib/netifd/utils.uc
new file mode 100644
index 0000000000..84db69d2fa
--- /dev/null
+++ b/package/network/config/netifd/files/lib/netifd/utils.uc
@@ -0,0 +1,131 @@
+'use strict';
+
+import { glob, basename, realpath, chdir, mkstemp } from "fs";
+
+export const TYPE_ARRAY = 1;
+export const TYPE_STRING = 3;
+export const TYPE_INT = 5;
+export const TYPE_BOOL = 7;
+
+export function parse_bool(val)
+{
+	switch (val) {
+	case "1":
+	case "true":
+		return true;
+	case "0":
+	case "false":
+		return false;
+	}
+};
+
+export function parse_array(val)
+{
+	if (type(val) != "array")
+		val = split(val, /\s+/);
+	return val;
+};
+
+function __type_parsers()
+{
+	let ret = [];
+
+	ret[TYPE_ARRAY] = parse_array;
+	ret[TYPE_STRING] = function(val) {
+		return val;
+	};
+	ret[TYPE_INT] = function(val) {
+		return +val;
+	};
+	ret[TYPE_BOOL] = parse_bool;
+
+	return ret;
+}
+export const type_parser = __type_parsers();
+
+export function handler_load(path, cb)
+{
+	for (let script in glob(path + "/*.sh")) {
+		script = basename(script);
+
+		let f = mkstemp();
+		let prev_dir = realpath(".");
+		chdir(path);
+		system(`./${script} "" "dump" >&${f.fileno()}`);
+		chdir(prev_dir);
+		f.seek();
+		while (!f.error()) {
+			let data = trim(f.read("line"));
+			try {
+				data = json(data);
+			} catch (e) {
+				continue;
+			}
+
+			if (type(data) != "object")
+				continue;
+
+			cb(script, data);
+		}
+		f.close();
+	}
+};
+
+export function handler_attributes(data, extra, validate)
+{
+	let ret = { ...extra };
+	for (let cur in data) {
+		let name_data = split(cur[0], ":", 2);
+		let name = name_data[0];
+		ret[name] = cur[1];
+		if (validate && name_data[1])
+			validate[name] = name_data[1];
+	}
+	return ret;
+};
+
+export function parse_attribute_list(data, spec)
+{
+	let ret = {};
+
+	for (let name, type_id in spec) {
+		if (!(name in data))
+			continue;
+
+		let val = data[name];
+		let parser = type_parser[type_id];
+		if (parser)
+			val = parser(val);
+		ret[name] = val;
+	}
+
+	return ret;
+};
+
+export function is_equal(val1, val2) {
+	let t1 = type(val1);
+
+	if (t1 != type(val2))
+		return false;
+
+	if (t1 == "array") {
+		if (length(val1) != length(val2))
+			return false;
+
+		for (let i = 0; i < length(val1); i++)
+			if (!is_equal(val1[i], val2[i]))
+				return false;
+
+		return true;
+	} else if (t1 == "object") {
+		for (let key in val1)
+			if (!is_equal(val1[key], val2[key]))
+				return false;
+		for (let key in val2)
+			if (val1[key] == null)
+				return false;
+		return true;
+	} else {
+		return val1 == val2;
+	}
+};
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
new file mode 100644
index 0000000000..b0faef1a0a
--- /dev/null
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
@@ -0,0 +1,637 @@
+'use strict';
+import * as libubus from "ubus";
+import * as uloop from "uloop";
+import { is_equal } from "./utils.uc";
+import { access } from "fs";
+
+const NOTIFY_CMD_UP = 0;
+const NOTIFY_CMD_SET_DATA = 1;
+const NOTIFY_CMD_PROCESS_ADD = 2;
+const NOTIFY_CMD_SET_RETRY = 4;
+
+const DEFAULT_RETRY = 3;
+const DEFAULT_SCRIPT_TIMEOUT = 30 * 1000;
+
+export const mlo_name = "#mlo";
+
+let mlo_wdev;
+let wdev_cur;
+let wdev_handler = {};
+let wdev_script_task, wdev_script_timeout;
+let handler_timer;
+
+function delete_wdev(name)
+{
+	delete netifd.wireless.devices[name];
+	gc();
+}
+
+function handle_link(dev, data, up)
+{
+	let config = data.config;
+	let bridge_isolate;
+	let ap = false;
+	if (dev == data.ifname)
+		ap = data.type == "vlan" ||
+		     (data.type == "vif" && config.mode == "ap");
+
+	let dev_data = {
+		isolate: !!config.bridge_isolate,
+		wireless: true,
+		wireless_ap: ap,
+	};
+
+	if (ap && config.multicast_to_unicast != null)
+		dev_data.multicast_to_unicast = config.multicast_to_unicast;
+
+	if (data.type == "vif" && config.mode == "ap") {
+		dev_data.wireless_proxyarp = !!config.proxy_arp;
+		dev_data.wireless_isolate = !!config.isolate;
+	}
+
+	if (up)
+		netifd.device_set(dev, dev_data);
+
+	for (let net in config.network)
+		netifd.interface_handle_link({
+			name: net,
+			ifname: dev,
+			vlan: config.network_vlan,
+			link_ext: true,
+			up,
+		});
+}
+
+function wdev_mlo_fixup(config)
+{
+	if (!mlo_wdev)
+		return;
+
+	for (let name, iface in config.interfaces) {
+		let config = iface.config;
+
+		if (config.mode != "link")
+			continue;
+
+		let mlo_config = mlo_wdev.handler_data[iface.name];
+		if (mlo_config && mlo_config.ifname)
+			config.ifname = mlo_config.ifname;
+	}
+}
+
+function wdev_config_init(wdev)
+{
+	let data = wdev.data;
+	let config = data.config;
+	let interfaces = {};
+
+	let vif_idx = 0;
+	for (let vif in data.vif) {
+		let vlan_idx = 0, sta_idx = 0;
+		let vlans = {}, stas = {};
+
+		if (wdev.disabled_vifs[vif.name])
+			continue;
+		for (let vlan in vif.vlan) {
+			let vlan_name = sprintf("%02d", ++vlan_idx);
+			let cur_vlan = vlans[vlan_name] = {
+				name: vlan.name,
+				config: vlan.config,
+			};
+
+			if (wdev.disabled_vifs[vif.name])
+				continue;
+			for (let net in vlan.config.network)
+				if (netifd.interface_get_bridge(net, cur_vlan))
+					break;
+		}
+
+		for (let sta in vif.sta) {
+			let sta_name = sprintf("%02d", ++sta_idx);
+			stas[sta_name] = {
+				name: sta.name,
+				config: sta.config,
+			};
+		}
+
+		let vif_name = sprintf("%02d", ++vif_idx);
+		let iface = interfaces[vif_name] = {
+			name: vif.name,
+			config: vif.config,
+			vlans, stas,
+		};
+
+		for (let net in vif.config.network)
+			if (netifd.interface_get_bridge(net, iface))
+				break;
+	}
+
+	wdev.handler_config = {
+		config,
+		interfaces,
+	};
+
+	let prev = wdev.handler_data;
+	wdev.handler_data = {};
+
+	if (prev && prev[wdev.name])
+		wdev.handler_data[wdev.name] = prev[wdev.name];
+}
+
+function wdev_setup_cb(wdev)
+{
+	if (wdev.state != "setup")
+		return;
+
+	if (wdev.retry > 0)
+		wdev.retry--;
+	else
+		wdev.retry_setup_failed = true;
+
+	wdev.teardown();
+}
+
+function wdev_teardown_cb(wdev)
+{
+	for (let section, data in wdev.handler_data) {
+		if (data.ifname)
+			handle_link(data.ifname, data, false);
+	}
+
+	wdev.handler_data = {};
+	wdev.state = "down";
+
+	if (wdev.delete) {
+		delete_wdev(wdev.data.name);
+		return;
+	}
+
+	wdev.setup();
+}
+
+function run_handler_cb(wdev, cb)
+{
+	if (wdev != wdev_cur.wdev)
+		return;
+
+	wdev.dbg("complete " + wdev_cur.op);
+	if (wdev_script_timeout)
+		wdev_script_timeout.cancel();
+	wdev_script_timeout = null;
+	wdev_script_task = null;
+	wdev_cur = null;
+	handler_timer.set(1);
+	cb(wdev);
+}
+
+function run_handler_timeout(wdev, cb)
+{
+	wdev_script_task.cancel();
+	run_handler_cb(wdev, cb);
+}
+
+function handler_sort_fn(a, b)
+{
+	return wdev_handler[a].time - wdev_handler[b].time
+}
+
+function __run_next_handler_name()
+{
+	if (wdev_handler[mlo_name])
+		return mlo_name;
+
+	return sort(keys(wdev_handler), handler_sort_fn)[0];
+}
+
+function __run_next_handler()
+{
+	let name = __run_next_handler_name();
+	if (!name)
+		return;
+
+	wdev_cur = wdev_handler[name];
+	delete wdev_handler[name];
+
+	let wdev = wdev_cur.wdev;
+	let op = wdev_cur.op;
+	let cb = wdev_cur.cb;
+
+	wdev.dbg("run " + op);
+	if (name != mlo_name)
+		wdev_mlo_fixup(wdev.handler_config);
+	wdev.handler_config.data = wdev.handler_data[wdev.name];
+	wdev_script_task = netifd.process({
+		cb: () => run_handler_cb(wdev, cb),
+		dir: netifd.wireless.path,
+		argv: [ './' + wdev.script, wdev.data.config.type, op, wdev.name, "" + wdev.handler_config ],
+		log_prefix: wdev.name,
+	});
+
+	if (!wdev_script_task)
+		return run_handler_cb(wdev, cb);
+
+	wdev_script_timeout = uloop.timer(DEFAULT_SCRIPT_TIMEOUT,
+		() => run_handler_timeout(wdev, cb)
+	);
+}
+
+function run_next_handler()
+{
+	while (!wdev_cur && length(wdev_handler) > 0)
+		__run_next_handler();
+}
+
+function run_handler(wdev, op, cb)
+{
+	wdev.dbg("queue " + op);
+	wdev_handler[wdev.name] = {
+		op, wdev, cb,
+		time: time()
+	};
+
+	run_next_handler();
+}
+
+function wdev_proc_reset(wdev)
+{
+	if (wdev.proc_timer) {
+		wdev.proc_timer.cancel();
+		delete wdev.proc_timer;
+	}
+
+	wdev.procs = [];
+}
+
+function __wdev_proc_check(wdev, proc)
+{
+	if (netifd.process_check(proc.pid, proc.exe))
+		return;
+
+	wdev.dbg(`process ${proc.exe}(${proc.pid}) no longer active`);
+	wdev.teardown();
+	return true;
+}
+
+function wdev_proc_check(wdev)
+{
+	for (let proc in wdev.procs)
+		if (__wdev_proc_check(wdev, proc))
+			break;
+}
+
+function wdev_proc_add(wdev, data)
+{
+	if (!data.pid || !data.exe)
+		return;
+
+	push(wdev.procs, data);
+
+	if (!wdev.proc_timer)
+		wdev.proc_timer = uloop.interval(1000, () => wdev_proc_check(wdev));
+}
+
+
+function setup()
+{
+	if (this.state != "up" && this.state != "down")
+		return;
+
+	this.dbg("setup, state=" + this.state);
+	if (!this.autostart || this.retry_setup_failed || this.data.config.disabled)
+		return;
+
+	wdev_proc_reset(this);
+	delete this.config_change;
+	this.state = "setup";
+	run_handler(this, "setup", wdev_setup_cb);
+}
+
+function teardown()
+{
+	delete this.cancel_setup;
+
+	this.dbg("teardown, state=" + this.state);
+	if (this.state == "teardown" || this.state == "down")
+		return;
+
+	wdev_proc_reset(this);
+	this.state = "teardown";
+	run_handler(this, "teardown", wdev_teardown_cb);
+}
+
+function wdev_update_disabled_vifs(wdev)
+{
+	let cache = wdev.ifindex_cache;
+	let prev_disabled = wdev.disabled_vifs;
+	let disabled = wdev.disabled_vifs = {};
+	let changed;
+
+	let vifs = [];
+	for (let vif in wdev.data.vif)
+		push(vifs, vif, ...vif.vlan);
+
+	for (let vif in vifs) {
+		let enabled, ifindex;
+
+		for (let net in vif.config.network) {
+			let state = netifd.interface_get_enabled(net);
+			if (!state)
+				continue;
+
+			if (state.enabled)
+				enabled = true;
+			else if (enabled == null)
+				enabled = false;
+			if (state.ifindex)
+				ifindex = state.ifindex;
+		}
+
+		let name = vif.name;
+		if (enabled == false)
+			disabled[wdev] = true;
+		else if (ifindex != cache[name])
+			changed = true;
+
+		if (ifindex)
+			cache[name] = ifindex;
+		else
+			delete cache[name];
+	}
+
+	if (changed || !is_equal(prev_disabled, disabled))
+		wdev.config_change = true;
+
+	return wdev.config_change;
+}
+
+function wdev_reset(wdev)
+{
+	wdev.retry = DEFAULT_RETRY;
+	delete wdev.retry_setup_failed;
+}
+
+function update(data)
+{
+	if (is_equal(this.data, data))
+		return;
+
+	if (data) {
+		this.data = data;
+		this.ifindex_cache = {};
+		delete this.retry_setup_failed;
+		delete this.delete;
+	}
+
+	wdev_reset(this);
+	this.config_change = true;
+	this.check();
+}
+
+function start()
+{
+	if (this.delete || this.data.config.disabled)
+		return;
+
+	this.dbg("start, state=" + this.state);
+	this.autostart = true;
+	wdev_reset(this);
+
+	if (this.state != "down")
+		return;
+
+	if (wdev_update_disabled_vifs(this))
+		wdev_config_init(this);
+	this.setup();
+}
+
+function stop()
+{
+	this.dbg("stop, state=" + this.state);
+	this.autostart = false;
+
+	switch (this.state) {
+	case "setup":
+		this.cancel_setup = true;
+		break;
+	case "up":
+		this.teardown();
+		break;
+	}
+}
+
+function check()
+{
+	if (!wdev_update_disabled_vifs(this))
+		return;
+
+	wdev_config_init(this);
+	this.setup();
+}
+
+function wdev_mark_up(wdev)
+{
+	wdev.dbg("mark up, state=" + wdev.state);
+	if (wdev.state != "setup")
+		return;
+
+	if (wdev.name == mlo_name)
+		mlo_wdev = wdev;
+
+	if (wdev.config_change) {
+		wdev.setup();
+		return;
+	}
+
+	for (let section, data in wdev.handler_data) {
+		if (data.ifname)
+			handle_link(data.ifname, data, true);
+	}
+	wdev.state = "up";
+
+	return 0;
+}
+
+function wdev_set_data(wdev, vif, vlan, data)
+{
+	let config = wdev.handler_config;
+	let cur = wdev;
+	let cur_type = "device";
+	if (!config)
+		return libubus.STATUS_INVALID_ARGUMENT;
+
+	if (vif) {
+		cur = vif = config.interfaces[vif];
+		if (!vif)
+			return libubus.STATUS_NOT_FOUND;
+		cur_type = "vif";
+	}
+
+	if (vlan) {
+		if (!vif)
+			return libubus.STATUS_INVALID_ARGUMENT;
+
+		cur = vlan = vif.vlans[vlan];
+		if (!vlan)
+			return libubus.STATUS_NOT_FOUND;
+
+		cur_type = "vlan";
+	}
+
+	wdev.handler_data[cur.name] = {
+		...cur,
+		...data,
+		type: cur_type,
+		config: cur.config,
+	};
+
+	return 0;
+}
+
+function notify(req)
+{
+	let vif = req.args.interface;
+	let vlan = req.args.vlan;
+	let data = req.args.data;
+
+	switch (req.args.command) {
+	case NOTIFY_CMD_UP:
+		if (vif || vlan || this.state != "setup")
+			return libubus.STATUS_INVALID_ARGUMENT;
+
+		return wdev_mark_up(this);
+	case NOTIFY_CMD_SET_DATA:
+		return wdev_set_data(this, vif, vlan, data);
+	case NOTIFY_CMD_PROCESS_ADD:
+		if (this.state != "setup" && this.state != "up")
+			return 0;
+
+		wdev_proc_add(this, data);
+		return 0;
+	case NOTIFY_CMD_SET_RETRY:
+		if (data.retry != null)
+			this.retry = data.retry;
+		else
+			this.retry = DEFAULT_RETRY;
+		return 0;
+	default:
+		return libubus.STATUS_INVALID_ARGUMENT;
+	}
+}
+
+function hotplug(name, add)
+{
+	let dev = name;
+	let m = match(name, /(.+)\.sta.+/);
+	if (m)
+		name = m[1];
+
+	for (let section, data in this.handler_data) {
+		if (data.ifname != name ||
+		    data.type != "vif" && data.type != "vlan")
+			continue;
+
+		handle_link(dev, data, up);
+	}
+}
+
+function get_status_data(wdev, vif)
+{
+	let hdata = wdev.handler_data[vif.name];
+	let data = {
+		section: vif.name,
+		config: vif.config
+	};
+	if (hdata && hdata.ifname)
+		data.ifname = hdata.ifname;
+	return data;
+}
+
+function get_status_vlans(wdev, vif)
+{
+	let vlans = [];
+	for (let vlan in vif.vlan)
+		push(vlans, get_status_data(wdev, vlan));
+	return vlans;
+}
+
+function get_status_stations(wdev, vif)
+{
+	let vlans = [];
+	for (let vlan in vif.sta)
+		push(vlans, get_status_data(wdev, vlan));
+	return vlans;
+}
+
+function status()
+{
+	let interfaces = [];
+	for (let vif in this.data.vif) {
+		let vlans = get_status_vlans(this, vif);
+		let stations = get_status_stations(this, vif);
+		let data = get_status_data(this, vif);
+		push(interfaces, {
+			...data,
+			vlans, stations
+		});
+	}
+	return {
+		up: this.state == "up",
+		pending: this.state == "setup" || this.state == "teardown",
+		autostart: this.autostart,
+		disabled: !!this.data.config.disabled,
+		retry_setup_failed: !!this.retry_setup_failed,
+		config: this.data.config,
+		interfaces
+	};
+}
+
+function destroy()
+{
+	this.dbg("destroy");
+	this.autostart = false;
+	this.delete = true;
+	if (this.state != "down") {
+		this.stop();
+		return;
+	}
+
+	delete_wdev(this.data.name);
+}
+
+function dbg(msg)
+{
+	netifd.log(netifd.L_DEBUG, `wireless: ${this.name}: ${msg}\n`);
+}
+
+const wdev_proto = {
+	update,
+	destroy,
+	start,
+	stop,
+	setup,
+	status,
+	teardown,
+	check,
+	notify,
+	hotplug,
+	dbg,
+};
+
+export function new(data, script, driver)
+{
+	let wdev = {
+		name: data.name,
+		script, data,
+		procs: [],
+		vifs: {},
+		disabled_vifs: {},
+		ifindex_cache: {},
+
+		autostart: true,
+		state: "down",
+	};
+	wdev_update_disabled_vifs(wdev);
+	wdev_config_init(wdev);
+	handler_timer = uloop.timer(1, run_next_handler);
+	return proto(wdev, wdev_proto);
+};
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
new file mode 100644
index 0000000000..de67bd5d94
--- /dev/null
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
@@ -0,0 +1,450 @@
+'use strict';
+
+import * as libubus from "ubus";
+import { realpath } from "fs";
+import {
+	handler_load, handler_attributes,
+	parse_attribute_list, parse_bool, parse_array,
+	TYPE_ARRAY, TYPE_STRING, TYPE_INT, TYPE_BOOL
+} from "./utils.uc";
+import * as wdev from "./wireless-device.uc";
+
+let ubus = netifd.ubus;
+let wireless = netifd.wireless = {
+	handlers: {},
+	devices: {},
+	path: realpath(netifd.main_path + "/wireless"),
+};
+
+function update_config(new_devices)
+{
+	for (let name, dev in wireless.devices)
+		if (!new_devices[name])
+			dev.destroy();
+
+	for (let name, dev in new_devices) {
+		let cur_dev = wireless.devices[name];
+		if (cur_dev) {
+			cur_dev.update(dev);
+			continue;
+		}
+
+		let handler = wireless.handlers[dev.config.type];
+		cur_dev = wdev.new(dev, handler.script);
+		if (!cur_dev)
+			continue;
+
+		wireless.devices[name] = cur_dev;
+	}
+}
+
+function config_init(uci)
+{
+	let config = uci.get_all("wireless");
+
+	let handlers = {};
+	let devices = {};
+	let vifs = {};
+	let mlo_device;
+
+	let sections = {
+		device: {},
+		iface: {},
+		vlan: {},
+		station: {},
+	};
+	let radio_idx = {};
+
+	for (let name, data in config) {
+		let type = data[".type"];
+		if (parse_bool(data.disabled) && type != "wifi-device")
+			continue;
+
+		if (substr(type, 0, 5) != "wifi-")
+			continue;
+
+		let list = sections[substr(type, 5)];
+		if (list)
+			list[name] = data;
+
+		if (type == "wifi-iface" && parse_bool(data.mlo))
+			mlo_device = true;
+	}
+
+	if (mlo_device) {
+		devices[wdev.mlo_name] = {
+			name: wdev.mlo_name,
+			config: {
+				type: "mac80211",
+			},
+			vif: [],
+		};
+		handlers[wdev.mlo_name] = wireless.handlers.mac80211;
+	}
+
+	for (let name, data in sections.device) {
+		if (!data.type)
+			continue;
+
+		let handler = wireless.handlers[data.type];
+		if (!handler)
+			continue;
+
+		if (data.radio != null)
+			radio_idx[name] = +data.radio;
+
+		let config = parse_attribute_list(data, handler.device);
+		devices[name] = {
+			name,
+			config,
+
+			vif: [],
+		};
+		handlers[name] = handler;
+	}
+
+	for (let name, data in sections.iface) {
+		let dev_names = parse_array(data.device);
+		let mlo_vif = parse_bool(data.mlo);
+		let radios = map(dev_names, (v) => radio_idx[v]);
+		radios = filter(radios, (v) => v != null);
+		if (mlo_vif)
+			dev_names = [ wdev.mlo_name, ...dev_names ];
+		for (let dev_name in dev_names) {
+			let dev = devices[dev_name];
+			if (!dev)
+				continue;
+
+			let handler = handlers[dev_name];
+			if (!handler)
+				continue;
+
+			let config = parse_attribute_list(data, handler.iface);
+			if (mlo_vif && dev_name != wdev.mlo_name)
+				config.mode = "link";
+			config.radios = radios;
+
+			let vif = {
+				name, config,
+				device: dev_name,
+
+				vlan: [],
+				sta: [],
+			};
+			push(dev.vif, vif);
+
+			vifs[name] ??= [];
+			push(vifs[name], vif);
+		}
+	}
+
+	for (let name, data in sections.vlan) {
+		if (!data.iface || !vifs[data.iface])
+			continue;
+
+		for (let vif in vifs[data.iface]) {
+			let dev = devices[vif.device];
+			let handler = handlers[vif.device];
+			if (!dev || !handler)
+				continue;
+
+			let config = parse_attribute_list(data, handler.vlan);
+
+			let vlan = {
+				name,
+				config
+			};
+			push(vif.vlan, vlan);
+		}
+	}
+
+	for (let name, data in sections.station) {
+		if (!data.iface || !vifs[data.iface])
+			continue;
+
+		for (let vif in vifs[data.iface]) {
+			let dev = devices[vif.device];
+			let handler = handlers[vif.device];
+			if (!dev || !handler)
+				continue;
+
+			let config = parse_attribute_list(data, handler.station);
+
+			let sta = {
+				name,
+				config
+			};
+			push(vif.sta, sta);
+		}
+	}
+
+	let udata = ubus.call({
+		object: "service",
+		method: "get_data",
+		data: {
+			type: "wifi-iface"
+		},
+	});
+
+	for (let svcname, svc in udata) {
+		for (let typename, data in svc) {
+			for (let radio, vifs in data) {
+				for (let name, vif in vifs) {
+					let devs = vif.device;
+					if (type(devs) != "array")
+						devs = [ devs ];
+					let config = vif.config;
+					if (!config)
+						continue;
+					for (let device in devs) {
+						let dev = devices[device];
+						if (!dev)
+							continue;
+
+						let vif_data = {
+							name, device, config,
+							vlan: [],
+							sta: []
+						};
+						if (vif.vlans)
+							vif_data.vlans = vif.vlans;
+						if (vif.stations)
+							vif_data.sta = vif.stations;
+						vifs[name] ??= [];
+						push(vifs[name], vif_data);
+						push(dev.vif, vif_data);
+					}
+				}
+			}
+		}
+	}
+
+	update_config(devices);
+}
+
+function config_start()
+{
+	for (let name, dev in wireless.devices)
+		if (dev.autostart)
+			dev.start();
+
+}
+
+function check_interfaces()
+{
+	for (let name, dev in wireless.devices)
+		if (dev.autostart)
+			dev.check();
+}
+
+function hotplug(name, add)
+{
+	for (let name, dev in wireless.devices)
+		if (dev.autostart)
+			dev.hotplug(name, add);
+}
+
+const network_config_attr = {
+	network: TYPE_ARRAY,
+	network_vlan: TYPE_ARRAY,
+	bridge_isolate: TYPE_BOOL,
+	isolate: TYPE_BOOL,
+	proxy_arp: TYPE_BOOL,
+	multicast_to_unicast: TYPE_BOOL,
+};
+
+const default_config_attr = {
+	device: {
+		disabled: TYPE_BOOL,
+		type: TYPE_STRING,
+	},
+	iface: {
+		...network_config_attr,
+		device: TYPE_STRING,
+		mode: TYPE_STRING,
+	},
+	station: {
+		iface: TYPE_STRING,
+
+		mac: TYPE_STRING,
+		key: TYPE_STRING,
+		vid: TYPE_STRING,
+	},
+	vlan: {
+		...network_config_attr,
+		iface: TYPE_STRING,
+		name: TYPE_STRING,
+		vid: TYPE_STRING,
+	},
+};
+
+const wdev_args = {
+	device: ""
+};
+
+function wdev_call(req, cb)
+{
+	let dev = req.args.device;
+	if (dev) {
+		dev = wireless.devices[dev];
+		if (!dev)
+			return libubus.STATUS_NOT_FOUND;
+
+		return cb(dev);
+	}
+
+	for (let name, dev in wireless.devices) {
+		if (name == wdev.mlo_name)
+			continue;
+		cb(dev);
+	}
+
+	return 0;
+}
+
+function attr_validate(attr_type, validate)
+{
+	if (validate)
+		return validate;
+	switch (attr_type) {
+	case TYPE_STRING:
+		return "string";
+	case TYPE_ARRAY:
+		return "list(string)";
+	case TYPE_INT:
+		return "uinteger";
+	case TYPE_BOOL:
+		return "bool";
+	}
+}
+
+function get_validate_info(ret, handler)
+{
+	for (let kind in default_config_attr) {
+		let cur = ret[kind == "iface" ? "interface" : kind] = {};
+		let validate = handler[kind + "_validate"];
+
+		for (let attr, attr_type in handler[kind]) {
+			let val = attr_validate(attr_type, validate[attr]);
+			if (val != null)
+				cur[attr] = val;
+		}
+	}
+
+	return ret;
+}
+
+const ubus_obj = {
+	up: {
+		args: wdev_args,
+		call: function(req) {
+			let mlo_dev = wireless.devices[wdev.mlo_name];
+			if (mlo_dev)
+				mlo_dev.start();
+
+			return wdev_call(req, (dev) => {
+				dev.start();
+				return 0;
+			});
+		}
+	},
+	down: {
+		args: wdev_args,
+		call: function(req) {
+			let mlo_dev = wireless.devices[wdev.mlo_name];
+			if (mlo_dev)
+				mlo_dev.config_change = true;
+
+			return wdev_call(req, (dev) => {
+				dev.stop();
+				return 0;
+			});
+		}
+	},
+	reconf: {
+		args: wdev_args,
+		call: function(req) {
+			let mlo_dev = wireless.devices[wdev.mlo_name];
+			if (mlo_dev)
+				mlo_dev.update();
+
+			return wdev_call(req, (dev) => {
+				dev.update();
+				return 0;
+			});
+		}
+	},
+	status: {
+		args: wdev_args,
+		call: function(req) {
+			let ret = {};
+			let err = wdev_call(req, (dev) => {
+				ret[dev.data.name] = dev.status();
+				return 0;
+			});
+			if (err != 0)
+				return err;
+
+			return ret;
+		}
+	},
+	notify: {
+		args: {
+			...wdev_args,
+			command: 0,
+			interface: "",
+			vlan: "",
+			data: {},
+		},
+		call: function(req) {
+			let dev = req.args.device;
+			if (!dev)
+				return libubus.STATUS_INVALID_ARGUMENT;
+
+			dev = wireless.devices[dev];
+			if (!dev)
+				return libubus.STATUS_NOT_FOUND;
+
+			return dev.notify(req);
+		}
+	},
+	get_validate: {
+		args: wdev_args,
+		call: function(req) {
+			let ret = {};
+			let err = wdev_call(req, (dev) => {
+				let dev_type = dev.data.config.type;
+				let cur = ret[dev.data.name] = {};
+				get_validate_info(cur, wireless.handlers[dev_type]);
+				return 0;
+			});
+			if (err != 0)
+				return err;
+
+			return ret;
+		}
+	},
+};
+
+
+handler_load(wireless.path, (script, data) => {
+	if (!data.name)
+		return;
+
+	let handler = wireless.handlers[data.name] = {
+		script,
+	};
+	for (let kind, attr in default_config_attr) {
+		let validate = handler[kind + "_validate"] = {};
+		handler[kind] = handler_attributes(data[kind], attr, validate);
+	}
+});
+
+wireless.obj = ubus.publish("network.wireless", ubus_obj);
+
+return {
+	hotplug,
+	config_init,
+	config_start,
+	check_interfaces,
+};



From lede-commits at lists.infradead.org  Sat Aug  2 08:44:59 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 02 Aug 2025 11:44:59 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: fix ssid handling
In-Reply-To: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
References: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
Message-ID: <mailman.110650.1754149499.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/287f1ea3dd5b76bc778b3d375d271fd24815e05b

commit 287f1ea3dd5b76bc778b3d375d271fd24815e05b
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Aug 2 17:43:26 2025 +0200

    wifi-scripts: ucode: fix ssid handling
    
    Add proper escaping for ssid values.
    Use it to fix multi-ap backhaul ssid.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../files-ucode/usr/share/ucode/wifi/ap.uc         | 18 ++++++------
 .../files-ucode/usr/share/ucode/wifi/common.uc     | 32 ++++++++++++++++++++++
 .../files-ucode/usr/share/ucode/wifi/supplicant.uc |  6 ++--
 3 files changed, 44 insertions(+), 12 deletions(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
index 62e3ec0afb..8296f01195 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
@@ -4,7 +4,7 @@ import * as libuci from 'uci';
 import { md5 } from 'digest';
 import * as fs from 'fs';
 
-import { append, append_raw, append_value, append_vars, comment, push_config, set_default, touch_file } from 'wifi.common';
+import { append, append_raw, append_value, append_vars, append_string_vars, comment, push_config, set_default, touch_file } from 'wifi.common';
 import * as netifd from 'wifi.netifd';
 import * as iface from 'wifi.iface';
 
@@ -44,17 +44,19 @@ function iface_setup(config) {
 		config.ap_isolate = 1;
 
 	append('bssid', config.macaddr);
+	config.ssid2 = config.ssid;
+	append_string_vars(config, [ 'ssid2' ]);
 
-append_vars(config, [
+	append_vars(config, [
 		'ctrl_interface', 'ap_isolate', 'max_num_sta', 'ap_max_inactivity', 'airtime_bss_weight',
 		'airtime_bss_limit', 'airtime_sta_weight', 'bss_load_update_period', 'chan_util_avg_period',
 		'disassoc_low_ack', 'skip_inactivity_poll', 'ignore_broadcast_ssid', 'uapsd_advertisement_enabled',
-		'utf8_ssid', 'multi_ap', 'ssid', 'tdls_prohibit', 'bridge', 'wds_sta', 'wds_bridge',
+		'utf8_ssid', 'multi_ap', 'tdls_prohibit', 'bridge', 'wds_sta', 'wds_bridge',
 		'snoop_iface', 'vendor_elements', 'nas_identifier', 'radius_acct_interim_interval',
 		'ocv', 'multicast_to_unicast', 'preamble', 'wmm_enabled', 'proxy_arp', 'per_sta_vif', 'mbo',
 		'bss_transition', 'wnm_sleep_mode', 'wnm_sleep_mode_no_keys', 'qos_map_set', 'max_listen_int',
 		'dtim_period',
-	 ]);
+	]);
 }
 
 function iface_authentication_server(config) {
@@ -102,11 +104,9 @@ function iface_auth_type(config) {
 		config.wps_possible = 1;
 		config.wps_state = 1;
 
-		if (config.owe_transition_ssid)
-			config.owe_transition_ssid = `"${config.owe_transition_ssid}"`;
-
+		append_string_vars(config, [ 'owe_transition_ssid' ]);
 		append_vars(config, [
-			'owe_transition_ssid', 'owe_transition_bssid', 'owe_transition_ifname',
+			'owe_transition_bssid', 'owe_transition_ifname',
 		]);
 		break;
 
@@ -200,7 +200,7 @@ function iface_wps(config) {
 			set_default(config, 'upnp_iface', config.network_bridge);
 
 		if (config.multi_ap && config.multi_ap_backhaul_ssid) {
-			append_vars(config, [ 'multi_ap_backhaul_ssid' ]);
+			append_string_vars(config, [ 'multi_ap_backhaul_ssid' ]);
 			if (length(config.multi_ap_backhaul_key) == 64)
 				append('multi_ap_backhaul_wpa_psk', config.multi_ap_backhaul_key);
 			else if (length(config.multi_ap_backhaul_key) > 8)
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/common.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/common.uc
index 2dc11f50b9..0418fe8b76 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/common.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/common.uc
@@ -32,11 +32,31 @@ export function append(key, value) {
 	append_raw(key + '=' + value);
 };
 
+function escape_string(value) {
+	let chars = map(split(value, ''), (v) => ord(v));
+	if (length(filter(chars, (v) => (v < 32 || v >= 128))) > 0)
+		return hexenc(value);
+
+	return `"${value}"`;
+}
+
+export function append_string(key, value) {
+	if (value == null)
+		return;
+
+	append(key, escape_string(value));
+};
+
 export function append_vars(dict, keys) {
 	for (let key in keys)
 		append(key, dict[key]);
 };
 
+export function append_string_vars(dict, keys) {
+	for (let key in keys)
+		append_string(key, dict[key]);
+};
+
 export function network_append_raw(value) {
 	network_data += value + '\n';
 };
@@ -57,11 +77,23 @@ export function network_append(key, value) {
 	network_append_raw('\t' + key + '=' + value);
 };
 
+export function network_append_string(key, value) {
+	if (value == null)
+		return;
+
+	network_append_raw('\t' + key + '=' + escape_string(value));
+};
+
 export function network_append_vars(dict, keys) {
 	for (let key in keys)
 		network_append(key, dict[key]);
 };
 
+export function network_append_string_vars(dict, keys) {
+	for (let key in keys)
+		network_append_string(key, dict[key]);
+};
+
 export function set_default(dict, key, value) {
 	if (dict[key] == null)
 		dict[key] = value;
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
index 2942767f0b..a006550efa 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
@@ -1,7 +1,7 @@
 'use strict';
 
 import { append, append_raw, append_vars, network_append, network_append_raw, network_append_vars,
-	 set_default, dump_network, flush_network } from 'wifi.common';
+	 network_append_string_vars, set_default, dump_network, flush_network } from 'wifi.common';
 import * as netifd from 'wifi.netifd';
 import * as iface from 'wifi.iface';
 import * as fs from 'fs';
@@ -157,14 +157,14 @@ function setup_sta(data, config) {
 
 	config.basic_rate = ratelist(config.basic_rate);
 	config.mcast_rate = ratestr(config.mcast_rate);
-	config.ssid = `"${config.ssid}"`;
 
+	network_append_string_vars(config, [ 'ssid' ]);
 	network_append_vars(config, [
 		'scan_ssid', 'noscan', 'disabled', 'multi_ap_backhaul_sta',
 		'ocv', 'key_mgmt', 'psk', 'sae_password', 'pairwise', 'group', 'bssid',
 		'proto', 'mesh_fwding', 'mesh_rssi_threshold', 'frequency', 'fixed_freq',
 		'disable_ht', 'disable_ht40', 'disable_vht', 'vht', 'max_oper_chwidth',
-		'ht40', 'ssid', 'beacon_int', 'ieee80211w', 'basic_rate', 'mcast_rate',
+		'ht40', 'beacon_int', 'ieee80211w', 'basic_rate', 'mcast_rate',
 		'bssid_blacklist', 'bssid_whitelist', 'erp', 'ca_cert', 'identity',
 		'anonymous_identity', 'client_cert', 'private_key', 'private_key_passwd',
 		'subject_match', 'altsubject_match', 'domain_match', 'domain_suffix_match',



From lede-commits at lists.infradead.org  Sat Aug  2 08:44:56 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 02 Aug 2025 11:44:56 -0400
Subject: [openwrt/openwrt]  hostapd: add support for MLO interfaces in ucode
In-Reply-To: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
References: <175414949255.3645103.15947670476943701054@git-01.infra.openwrt.org>
Message-ID: <mailman.110651.1754149499.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/816c2d86e749de23abd1803a292178e4ad38626a

commit 816c2d86e749de23abd1803a292178e4ad38626a
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Jul 6 18:50:00 2025 +0200

    hostapd: add support for MLO interfaces in ucode
    
    MLO interface config is provided in a separate ubus call before
    adding regular per-phy interfaces.
    Preparation for full MLO support.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../wifi-scripts/files/usr/share/hostap/common.uc  |   2 +-
 package/network/services/hostapd/files/hostapd.uc  | 286 +++++++++++++++++++--
 ...-Fix-hostapd-crash-if-setup-a-iface-with-.patch |  46 ++++
 ...-support-for-specifying-the-link-id-in-th.patch |  58 +++++
 .../services/hostapd/patches/300-noscan.patch      |   2 +-
 .../hostapd/patches/600-ubus_support.patch         |   2 +-
 .../hostapd/patches/601-ucode_support.patch        |  87 ++++++-
 .../hostapd/patches/701-reload_config_inline.patch |   4 +-
 .../hostapd/patches/720-iface_max_num_sta.patch    |   4 +-
 .../hostapd/patches/770-radius_server.patch        |   2 +-
 ...Implement-APuP-Access-Point-Micro-Peering.patch |   4 +-
 .../network/services/hostapd/src/src/ap/ucode.c    |  74 +++++-
 12 files changed, 520 insertions(+), 51 deletions(-)

diff --git a/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc b/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc
index 31b526b6ae..caab14bcab 100644
--- a/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc
+++ b/package/network/config/wifi-scripts/files/usr/share/hostap/common.uc
@@ -315,7 +315,7 @@ const phy_proto = {
 			if (wdev.iftype == nl80211.const.NL80211_IFTYPE_AP_VLAN)
 				continue;
 			if (this.radio != null && wdev.vif_radio_mask != null &&
-			    !(wdev.vif_radio_mask & (1 << this.radio)))
+			    wdev.vif_radio_mask != (1 << this.radio))
 				continue;
 			mac_wdev[wdev.mac] = wdev;
 		}
diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc
index bdcba4880a..a28c282493 100644
--- a/package/network/services/hostapd/files/hostapd.uc
+++ b/package/network/services/hostapd/files/hostapd.uc
@@ -1,6 +1,6 @@
 let libubus = require("ubus");
 import { open, readfile } from "fs";
-import { wdev_remove, is_equal, vlist_new, phy_is_fullmac, phy_open, wdev_set_radio_mask } from "common";
+import { wdev_remove, is_equal, vlist_new, phy_is_fullmac, phy_open, wdev_set_radio_mask, wdev_set_up } from "common";
 
 let ubus = libubus.connect(null, 60);
 
@@ -50,13 +50,16 @@ hostapd.data.bss_info_fields = {
 	owe_transition_ifname: true,
 };
 
+hostapd.data.mld = {};
+
 function iface_remove(cfg)
 {
 	if (!cfg || !cfg.bss || !cfg.bss[0] || !cfg.bss[0].ifname)
 		return;
 
 	for (let bss in cfg.bss)
-		wdev_remove(bss.ifname);
+		if (!bss.mld_ap)
+			wdev_remove(bss.ifname);
 }
 
 function iface_gen_config(config, start_disabled)
@@ -70,10 +73,12 @@ channel=${config.radio.channel}
 		let bss = config.bss[i];
 		let type = i > 0 ? "bss" : "interface";
 		let nasid = bss.nasid ?? replace(bss.bssid, ":", "");
-
+		let bssid = bss.bssid;
+		if (bss.mld_ap)
+			bssid += "\nmld_addr=" + bss.mld_bssid;
 		str += `
 ${type}=${bss.ifname}
-bssid=${bss.bssid}
+bssid=${bssid}
 ${join("\n", bss.data)}
 nas_identifier=${nasid}
 `;
@@ -142,6 +147,9 @@ function iface_add(phy, config, phy_status)
 function iface_config_macaddr_list(config)
 {
 	let macaddr_list = {};
+	for (let name, mld in hostapd.data.mld)
+		if (mld.macaddr)
+			macaddr_list[mld.macaddr] = -1;
 	for (let i = 0; i < length(config.bss); i++) {
 		let bss = config.bss[i];
 		if (!bss.default_macaddr)
@@ -154,8 +162,11 @@ function iface_config_macaddr_list(config)
 function iface_update_supplicant_macaddr(phydev, config)
 {
 	let macaddr_list = [];
-	for (let i = 0; i < length(config.bss); i++)
-		push(macaddr_list, config.bss[i].bssid);
+	for (let name, mld in hostapd.data.mld)
+		if (mld.macaddr)
+			push(macaddr_list, mld.macaddr);
+	for (let bss in config.bss)
+		push(macaddr_list, bss.bssid);
 	ubus.defer("wpa_supplicant", "phy_set_macaddr_list", {
 		phy: phydev.name,
 		radio: phydev.radio ?? -1,
@@ -178,13 +189,15 @@ function __iface_pending_next(pending, state, ret, data)
 		iface_update_supplicant_macaddr(phydev, config);
 		return "create_bss";
 	case "create_bss":
-		let err = phydev.wdev_add(bss.ifname, {
-			mode: "ap",
-			radio: phydev.radio,
-		});
-		if (err) {
-			hostapd.printf(`Failed to create ${bss.ifname} on phy ${phy}: ${err}`);
-			return null;
+		if (!bss.mld_ap) {
+			let err = phydev.wdev_add(bss.ifname, {
+				mode: "ap",
+				radio: phydev.radio,
+			});
+			if (err) {
+				hostapd.printf(`Failed to create ${bss.ifname} on phy ${phy}: ${err}`);
+				return null;
+			}
 		}
 
 		pending.call("wpa_supplicant", "phy_status", {
@@ -550,6 +563,10 @@ function iface_reload_config(name, phydev, config, old_config)
 
 		let cur_config = config.bss[i];
 		let prev_config = old_config.bss[prev];
+		if (prev_config.force_reload) {
+			delete prev_config.force_reload;
+			continue;
+		}
 
 		let prev_bss = get_config_bss(name, old_config, prev);
 		if (!prev_bss)
@@ -606,7 +623,8 @@ function iface_reload_config(name, phydev, config, old_config)
 		let ifname = old_config.bss[i].ifname;
 		hostapd.printf(`Remove bss '${ifname}' on phy '${name}'`);
 		prev_bss.delete();
-		wdev_remove(ifname);
+		if (!old_config.bss[i].mld_ap)
+			wdev_remove(ifname);
 	}
 
 	// Step 4: rename preserved interfaces, use temporary name on duplicates
@@ -737,17 +755,78 @@ function iface_reload_config(name, phydev, config, old_config)
 	return true;
 }
 
+function bss_check_mld(phydev, iface_name, bss)
+{
+	if (!bss.ifname)
+		return;
+
+	let mld_data = hostapd.data.mld[bss.ifname];
+	if (!mld_data || !mld_data.ifname || !mld_data.macaddr)
+		return;
+
+	bss.mld_bssid = mld_data.macaddr;
+	mld_data.iface[iface_name] = true;
+	if (mld_data.has_wdev)
+		return true;
+
+	hostapd.printf(`Create MLD interface ${bss.ifname} on phy ${phydev.name}, radio mask: ${mld_data.radio_mask}`);
+	let err = phydev.wdev_add(bss.ifname, {
+		mode: "ap",
+		macaddr: mld_data.macaddr,
+		radio_mask: mld_data.radio_mask,
+	});
+	wdev_set_up(bss.ifname, true);
+	if (err) {
+		hostapd.printf(`Failed to create MLD ${bss.ifname} on phy ${phydev.name}: ${err}`);
+		delete mld_data.iface[iface_name];
+		return;
+	}
+
+	mld_data.has_wdev = true;
+
+	return true;
+}
+
+function iface_check_mld(phydev, name, config)
+{
+	phydev = phy_open(phydev.phy);
+
+	for (let mld_name, mld_data in hostapd.data.mld)
+		delete mld_data.iface[name];
+
+	for (let i = 0; i < length(config.bss); i++) {
+		let bss = config.bss[i];
+		if (!bss.mld_ap)
+			continue;
+
+		if (!bss_check_mld(phydev, name, bss)) {
+			hostapd.printf(`Skip MLD interface ${name} on phy ${phydev.name}`);
+			splice(config.bss, i--, 1);
+		}
+	}
+
+	for (let mld_name, mld_data in hostapd.data.mld) {
+		if (length(mld_data.iface) > 0)
+			continue;
+
+		hostapd.printf(`Remove MLD interface ${mld_name}`);
+		wdev_remove(mld_name);
+		delete mld_data.has_wdev;
+	}
+}
+
+function iface_config_remove(name, old_config)
+{
+	hostapd.remove_iface(name);
+	return iface_remove(old_config);
+}
+
 function iface_set_config(name, config)
 {
 	let old_config = hostapd.data.config[name];
 
 	hostapd.data.config[name] = config;
 
-	if (!config) {
-		hostapd.remove_iface(name);
-		return iface_remove(old_config);
-	}
-
 	let phy = config.phy;
 	let phydev = phy_open(phy, config.radio_idx);
 	if (!phydev) {
@@ -755,6 +834,11 @@ function iface_set_config(name, config)
 		return false;
 	}
 
+	config.orig_bss = [ ...config.bss ];
+	iface_check_mld(phydev, name, config);
+	if (!length(config.bss))
+		return iface_config_remove(name, old_config);
+
 	try {
 		let ret = iface_reload_config(name, phydev, config, old_config);
 		if (ret) {
@@ -787,10 +871,6 @@ function config_add_bss(config, name)
 
 function iface_load_config(phy, radio, filename)
 {
-	let f = open(filename, "r");
-	if (!f)
-		return null;
-
 	if (radio < 0)
 		radio = null;
 
@@ -804,6 +884,10 @@ function iface_load_config(phy, radio, filename)
 		orig_file: filename,
 	};
 
+	let f = open(filename, "r");
+	if (!f)
+		return config;
+
 	let bss;
 	let line;
 	while ((line = rtrim(f.read("line"), "\n")) != null) {
@@ -847,6 +931,9 @@ function iface_load_config(phy, radio, filename)
 		if (val[0] == "nas_identifier")
 			bss.nasid = val[1];
 
+		if (val[0] == "mld_ap")
+			bss[val[0]] = int(val[1]);
+
 		if (val[0] == "bss") {
 			bss = config_add_bss(config, val[1]);
 			continue;
@@ -901,6 +988,134 @@ function bss_config(bss_name) {
 	}
 }
 
+function mld_rename_bss(data, name)
+{
+	if (data.ifname == name)
+		return true;
+
+	// TODO: handle rename gracefully
+	return false;
+}
+
+function mld_add_bss(name, data, phy_list, i)
+{
+	let config = data.config;
+	if (!config.phy)
+		return;
+
+	wdev_remove(name);
+	let phydev = phy_list[config.phy];
+	if (!phydev) {
+		phydev = phy_open(config.phy, 0);
+		if (!phydev)
+			return;
+
+		let macaddr_list = {};
+		let phy_config = hostapd.data.config[phy_name(config.phy, 0)];
+		if (phy_config)
+			macaddr_list = iface_config_macaddr_list(phy_config);
+		iface_macaddr_init(phydev, data.config, macaddr_list);
+
+		phy_list[config.phy] = phydev;
+	}
+
+	data.macaddr = config.macaddr;
+	if (!data.macaddr) {
+		data.macaddr = phydev.macaddr_next();
+		data.default_macaddr = true;
+	}
+
+	let radio_mask = 0;
+	for (let r in config.radios)
+		if (r != null)
+			radio_mask |= 1 << r;
+
+	data.radio_mask = radio_mask;
+	data.ifname = name;
+}
+
+function mld_find_matching_config(list, config)
+{
+	for (let name, data in list)
+		if (is_equal(data.config, config))
+			return name;
+}
+
+function mld_reload_interface(name)
+{
+	let config = hostapd.data.config[name];
+	if (!config)
+		return;
+
+	config = { ...config };
+	config.bss = config.orig_bss;
+
+	iface_set_config(name, config);
+}
+
+function mld_set_config(config)
+{
+	let prev_mld = { ...hostapd.data.mld };
+	let new_mld = {};
+	let phy_list = {};
+	let new_config = !length(prev_mld);
+
+	hostapd.printf(`Set MLD config: ${keys(config)}`);
+
+	// find renamed/new interfaces
+	for (let name, data in config) {
+		let prev = mld_find_matching_config(prev_mld, data);
+		if (prev) {
+			let data = prev_mld[prev];
+			if (mld_rename_bss(data, name)) {
+				new_mld[name] = data;
+				delete prev_mld[prev];
+				continue;
+			}
+		}
+
+		new_mld[name] = {
+			config: data,
+			iface: {},
+		};
+	}
+
+	let reload_iface = {};
+	for (let name, data in prev_mld) {
+		delete hostapd.data.mld[name];
+
+		if (!data.ifname)
+			continue;
+
+		for (let iface, bss_list in hostapd.bss) {
+			if (!bss_list[name])
+				continue;
+			reload_iface[iface] = true;
+		}
+	}
+
+	for (let name in reload_iface)
+		mld_reload_interface(name);
+
+	for (let name, data in prev_mld) {
+		if (data.ifname)
+			hostapd.printf(`Remove MLD interface ${name}`);
+		wdev_remove(name);
+	}
+
+	// add new interfaces
+	hostapd.data.mld = new_mld;
+	for (let name, data in new_mld)
+		mld_add_bss(name, data, phy_list);
+
+	if (!new_config)
+		return;
+
+	hostapd.printf(`Reload all interfaces`);
+	for (let name in hostapd.data.config)
+		mld_reload_interface(name);
+}
+
 let main_obj = {
 	reload: {
 		args: {
@@ -988,6 +1203,31 @@ let main_obj = {
 			return ret;
 		})
 	},
+	mld_set: {
+		args: {
+			config: {}
+		},
+		call: ex_wrap(function(req) {
+			if (!req.args.config)
+				return libubus.STATUS_INVALID_ARGUMENT;
+
+			mld_set_config(req.args.config);
+
+			return {
+				pid: hostapd.getpid()
+			};
+		})
+	},
+	config_reset: {
+		args: {
+		},
+		call: ex_wrap(function(req) {
+			for (let name in hostapd.data.config)
+				iface_set_config(name);
+			mld_set_config({});
+			return 0;
+		})
+	},
 	config_set: {
 		args: {
 			phy: "",
diff --git a/package/network/services/hostapd/patches/190-hostapd-Fix-hostapd-crash-if-setup-a-iface-with-.patch b/package/network/services/hostapd/patches/190-hostapd-Fix-hostapd-crash-if-setup-a-iface-with-.patch
new file mode 100644
index 0000000000..d05f272afe
--- /dev/null
+++ b/package/network/services/hostapd/patches/190-hostapd-Fix-hostapd-crash-if-setup-a-iface-with-.patch
@@ -0,0 +1,46 @@
+From c14e53ea013415a29e9c493e9dacafb6dc5b31ee Mon Sep 17 00:00:00 2001
+From: Michael-CY Lee <michael-cy.lee at mediatek.com>
+Date: Fri, 8 Nov 2024 10:20:03 +0800
+Subject: [PATCH] hostapd: Fix hostapd crash if setup a iface with a link bss failed
+
+The crash occurs while some link bsses is traversing all the links by using
+for_each_mld_link(), and hostapd access to the link bss which is already
+been freed.
+
+If hostapd setup a link bss failed, the link should be removed from
+its hostapd_mld. However, the function hostapd_bss_link_deinit
+doesn't remove the link bss correctly if it is the first bss and
+hapd->drv_priv is null. Therefore we should refator the remove iface flow
+as hostapd_remove_iface (used in wifi down cmd).
+
+There are some cases that setup a bss may fail (e.g. afc query failed) or
+trigger channel switch while hostapd is setting up other links.
+The failed link would be add into hostapd_mld while driver_init().
+
+Signed-off-by: Allen Ye <allen.ye at mediatek.com>
+Signed-off-by: Michael-CY Lee <michael-cy.lee at mediatek.com>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+ src/ap/hostapd.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/src/ap/hostapd.c
++++ b/src/ap/hostapd.c
+@@ -3878,6 +3878,7 @@ int hostapd_add_iface(struct hapd_interf
+ 			}
+ 
+ 			if (hostapd_setup_interface(hapd_iface)) {
++				hostapd_bss_link_deinit(hapd_iface->bss[0]);
+ 				hostapd_deinit_driver(
+ 					hapd_iface->bss[0]->driver,
+ 					hapd_iface->bss[0]->drv_priv,
+@@ -5135,6 +5136,9 @@ int hostapd_mld_remove_link(struct hosta
+ 	if (!mld)
+ 		return -1;
+ 
++	if (!hapd->link.next)
++		return 0;
++
+ 	dl_list_del(&hapd->link);
+ 	mld->num_links--;
+ 
diff --git a/package/network/services/hostapd/patches/191-hostapd-add-support-for-specifying-the-link-id-in-th.patch b/package/network/services/hostapd/patches/191-hostapd-add-support-for-specifying-the-link-id-in-th.patch
new file mode 100644
index 0000000000..fa44875aa6
--- /dev/null
+++ b/package/network/services/hostapd/patches/191-hostapd-add-support-for-specifying-the-link-id-in-th.patch
@@ -0,0 +1,58 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Thu, 3 Jul 2025 11:22:26 +0200
+Subject: [PATCH] hostapd: add support for specifying the link id in the config
+
+Makes it easier to dynamically manage links for a MLD at run time.
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/hostapd/config_file.c
++++ b/hostapd/config_file.c
+@@ -4934,6 +4934,8 @@ static int hostapd_config_fill(struct ho
+ 		conf->punct_acs_threshold = val;
+ 	} else if (os_strcmp(buf, "mld_ap") == 0) {
+ 		bss->mld_ap = !!atoi(pos);
++	} else if (os_strcmp(buf, "mld_link_id") == 0) {
++		bss->mld_link_id = atoi(pos);
+ 	} else if (os_strcmp(buf, "mld_addr") == 0) {
+ 		if (hwaddr_aton(pos, bss->mld_addr)) {
+ 			wpa_printf(MSG_ERROR, "Line %d: Invalid mld_addr",
+--- a/src/ap/ap_config.c
++++ b/src/ap/ap_config.c
+@@ -177,6 +177,10 @@ void hostapd_config_defaults_bss(struct
+ 	bss->pasn_comeback_after = 10;
+ 	bss->pasn_noauth = 1;
+ #endif /* CONFIG_PASN */
++
++#ifdef CONFIG_IEEE80211BE
++	bss->mld_link_id = -1;
++#endif
+ }
+ 
+ 
+--- a/src/ap/ap_config.h
++++ b/src/ap/ap_config.h
+@@ -967,6 +967,8 @@ struct hostapd_bss_config {
+ 	/* The AP's MLD MAC address within the AP MLD */
+ 	u8 mld_addr[ETH_ALEN];
+ 
++	s8 mld_link_id;
++
+ #ifdef CONFIG_TESTING_OPTIONS
+ 	/*
+ 	 * If set indicate the AP as disabled in the RNR element included in the
+--- a/src/ap/hostapd.c
++++ b/src/ap/hostapd.c
+@@ -3105,7 +3105,10 @@ struct hostapd_iface * hostapd_alloc_ifa
+ #ifdef CONFIG_IEEE80211BE
+ static void hostapd_bss_alloc_link_id(struct hostapd_data *hapd)
+ {
+-	hapd->mld_link_id = hapd->mld->next_link_id++;
++	if (hapd->conf->mld_link_id >= 0)
++		hapd->mld_link_id = hapd->conf->mld_link_id;
++	else
++		hapd->mld_link_id = hapd->mld->next_link_id++;
+ 	wpa_printf(MSG_DEBUG, "AP MLD: %s: Link ID %d assigned.",
+ 		   hapd->mld->name, hapd->mld_link_id);
+ }
diff --git a/package/network/services/hostapd/patches/300-noscan.patch b/package/network/services/hostapd/patches/300-noscan.patch
index 6d97691855..314f0eff1b 100644
--- a/package/network/services/hostapd/patches/300-noscan.patch
+++ b/package/network/services/hostapd/patches/300-noscan.patch
@@ -18,7 +18,7 @@ Subject: [PATCH] Add noscan, no_ht_coex config options
  	} else if (os_strcmp(buf, "ht_capab") == 0) {
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1105,6 +1105,8 @@ struct hostapd_config {
+@@ -1107,6 +1107,8 @@ struct hostapd_config {
  
  	int ht_op_mode_fixed;
  	u16 ht_capab;
diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch
index 0368726c81..b66d61bad5 100644
--- a/package/network/services/hostapd/patches/600-ubus_support.patch
+++ b/package/network/services/hostapd/patches/600-ubus_support.patch
@@ -159,7 +159,7 @@ probe/assoc/auth requests via object subscribe.
  
  	if (iface->is_no_ir) {
  		hostapd_set_state(iface, HAPD_IFACE_NO_IR);
-@@ -3527,6 +3532,7 @@ void hostapd_interface_deinit_free(struc
+@@ -3530,6 +3535,7 @@ void hostapd_interface_deinit_free(struc
  		   (unsigned int) iface->conf->num_bss);
  	driver = iface->bss[0]->driver;
  	drv_priv = iface->bss[0]->drv_priv;
diff --git a/package/network/services/hostapd/patches/601-ucode_support.patch b/package/network/services/hostapd/patches/601-ucode_support.patch
index ec25cd4084..a5aa2e6a79 100644
--- a/package/network/services/hostapd/patches/601-ucode_support.patch
+++ b/package/network/services/hostapd/patches/601-ucode_support.patch
@@ -113,6 +113,15 @@ as adding/removing interfaces.
  	hostapd_ubus_free_bss(hapd);
  	accounting_deinit(hapd);
  	hostapd_deinit_wpa(hapd);
+@@ -625,7 +628,7 @@ void hostapd_free_hapd_data(struct hosta
+  * If the BSS being removed is the first link, the next link becomes the first
+  * link.
+  */
+-static void hostapd_bss_link_deinit(struct hostapd_data *hapd)
++void hostapd_bss_link_deinit(struct hostapd_data *hapd)
+ {
+ #ifdef CONFIG_IEEE80211BE
+ 	int i;
 @@ -737,6 +740,7 @@ void hostapd_cleanup_iface_partial(struc
  static void hostapd_cleanup_iface(struct hostapd_iface *iface)
  {
@@ -139,7 +148,47 @@ as adding/removing interfaces.
  {
  	struct hostapd_bss_config *conf = hapd->conf;
  	u8 ssid[SSID_MAX_LEN + 1];
-@@ -1518,6 +1522,8 @@ setup_mld:
+@@ -1434,7 +1438,13 @@ static int hostapd_setup_bss(struct host
+ 
+ 	if (!first || first == -1) {
+ 		u8 *addr = hapd->own_addr;
++		bool use_existing = first == -1;
+ 
++#ifdef CONFIG_IEEE80211BE
++		if (hapd->conf->mld_ap) {
++			addr = NULL;
++		} else
++#endif /* CONFIG_IEEE80211BE */
+ 		if (!is_zero_ether_addr(conf->bssid)) {
+ 			/* Allocate the configured BSSID. */
+ 			os_memcpy(hapd->own_addr, conf->bssid, ETH_ALEN);
+@@ -1469,6 +1479,7 @@ static int hostapd_setup_bss(struct host
+ 					   hapd->mld_link_id, hapd->conf->iface);
+ 				goto setup_mld;
+ 			}
++			use_existing = true;
+ 		}
+ #endif /* CONFIG_IEEE80211BE */
+ 
+@@ -1477,7 +1488,7 @@ static int hostapd_setup_bss(struct host
+ 				   conf->iface, addr, hapd,
+ 				   &hapd->drv_priv, force_ifname, if_addr,
+ 				   conf->bridge[0] ? conf->bridge : NULL,
+-				   first == -1)) {
++				   use_existing)) {
+ 			wpa_printf(MSG_ERROR, "Failed to add BSS (BSSID="
+ 				   MACSTR ")", MAC2STR(hapd->own_addr));
+ 			hapd->interface_added = 0;
+@@ -1500,7 +1511,7 @@ static int hostapd_setup_bss(struct host
+ 
+ #ifdef CONFIG_IEEE80211BE
+ setup_mld:
+-	if (hapd->conf->mld_ap && !first) {
++	if (hapd->conf->mld_ap && first != 1) {
+ 		wpa_printf(MSG_DEBUG,
+ 			   "MLD: Set link_id=%u, mld_addr=" MACSTR
+ 			   ", own_addr=" MACSTR,
+@@ -1518,6 +1529,8 @@ setup_mld:
  	}
  #endif /* CONFIG_IEEE80211BE */
  
@@ -148,7 +197,16 @@ as adding/removing interfaces.
  	if (conf->wmm_enabled < 0)
  		conf->wmm_enabled = hapd->iconf->ieee80211n |
  			hapd->iconf->ieee80211ax;
-@@ -2516,7 +2522,7 @@ static int hostapd_owe_iface_iter2(struc
+@@ -1843,7 +1856,7 @@ int hostapd_set_acl(struct hostapd_data
+ }
+ 
+ 
+-static int hostapd_set_ctrl_sock_iface(struct hostapd_data *hapd)
++int hostapd_set_ctrl_sock_iface(struct hostapd_data *hapd)
+ {
+ #ifdef CONFIG_IEEE80211BE
+ 	int ret;
+@@ -2516,7 +2529,7 @@ static int hostapd_owe_iface_iter2(struc
  #endif /* CONFIG_OWE */
  
  
@@ -157,7 +215,7 @@ as adding/removing interfaces.
  {
  #ifdef CONFIG_OWE
  	/* Check whether the enabled BSS can complete OWE transition mode
-@@ -2986,7 +2992,7 @@ hostapd_alloc_bss_data(struct hostapd_if
+@@ -2986,7 +2999,7 @@ hostapd_alloc_bss_data(struct hostapd_if
  }
  
  
@@ -166,7 +224,16 @@ as adding/removing interfaces.
  {
  	if (!hapd)
  		return;
-@@ -4070,7 +4076,8 @@ int hostapd_remove_iface(struct hapd_int
+@@ -3194,7 +3207,7 @@ fail:
+ }
+ 
+ 
+-static void hostapd_cleanup_unused_mlds(struct hapd_interfaces *interfaces)
++void hostapd_cleanup_unused_mlds(struct hapd_interfaces *interfaces)
+ {
+ #ifdef CONFIG_IEEE80211BE
+ 	struct hostapd_mld *mld, **all_mld;
+@@ -4074,7 +4087,8 @@ int hostapd_remove_iface(struct hapd_int
  		hapd_iface = interfaces->iface[i];
  		if (hapd_iface == NULL)
  			return -1;
@@ -213,16 +280,24 @@ as adding/removing interfaces.
  	void *owner;
  	char *config_fname;
  	struct hostapd_config *conf;
-@@ -787,6 +794,8 @@ struct hostapd_iface * hostapd_init(stru
+@@ -787,11 +794,16 @@ struct hostapd_iface * hostapd_init(stru
  struct hostapd_iface *
  hostapd_interface_init_bss(struct hapd_interfaces *interfaces, const char *phy,
  			   const char *config_fname, int debug);
++int hostapd_set_ctrl_sock_iface(struct hostapd_data *hapd);
 +int hostapd_setup_bss(struct hostapd_data *hapd, int first, bool start_beacon);
++void hostapd_bss_link_deinit(struct hostapd_data *hapd);
 +void hostapd_bss_deinit(struct hostapd_data *hapd);
  void hostapd_bss_setup_multi_link(struct hostapd_data *hapd,
  				  struct hapd_interfaces *interfaces);
  void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
-@@ -817,6 +826,7 @@ hostapd_switch_channel_fallback(struct h
+ 			   int reassoc);
+ void hostapd_interface_deinit_free(struct hostapd_iface *iface);
++void hostapd_cleanup_unused_mlds(struct hapd_interfaces *interfaces);
+ int hostapd_enable_iface(struct hostapd_iface *hapd_iface);
+ int hostapd_reload_iface(struct hostapd_iface *hapd_iface);
+ int hostapd_reload_bss_only(struct hostapd_data *bss);
+@@ -817,6 +829,7 @@ hostapd_switch_channel_fallback(struct h
  void hostapd_cleanup_cs_params(struct hostapd_data *hapd);
  void hostapd_periodic_iface(struct hostapd_iface *iface);
  int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
diff --git a/package/network/services/hostapd/patches/701-reload_config_inline.patch b/package/network/services/hostapd/patches/701-reload_config_inline.patch
index 236337979a..b91ff62e05 100644
--- a/package/network/services/hostapd/patches/701-reload_config_inline.patch
+++ b/package/network/services/hostapd/patches/701-reload_config_inline.patch
@@ -8,7 +8,7 @@ as adding/removing interfaces.
 
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -4981,7 +4981,14 @@ struct hostapd_config * hostapd_config_r
+@@ -4983,7 +4983,14 @@ struct hostapd_config * hostapd_config_r
  	int errors = 0;
  	size_t i;
  
@@ -58,7 +58,7 @@ as adding/removing interfaces.
  		return NULL;
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -3380,8 +3380,13 @@ hostapd_interface_init_bss(struct hapd_i
+@@ -3400,8 +3400,13 @@ hostapd_interface_init_bss(struct hapd_i
  		}
  	}
  
diff --git a/package/network/services/hostapd/patches/720-iface_max_num_sta.patch b/package/network/services/hostapd/patches/720-iface_max_num_sta.patch
index 5dfe839e5a..f0e3da9f59 100644
--- a/package/network/services/hostapd/patches/720-iface_max_num_sta.patch
+++ b/package/network/services/hostapd/patches/720-iface_max_num_sta.patch
@@ -25,7 +25,7 @@ full device, e.g. in order to deal with hardware/driver limitations
  	} else if (os_strcmp(buf, "extended_key_id") == 0) {
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1069,6 +1069,8 @@ struct hostapd_config {
+@@ -1071,6 +1071,8 @@ struct hostapd_config {
  	unsigned int track_sta_max_num;
  	unsigned int track_sta_max_age;
  
@@ -79,7 +79,7 @@ full device, e.g. in order to deal with hardware/driver limitations
  {
 --- a/src/ap/hostapd.h
 +++ b/src/ap/hostapd.h
-@@ -828,6 +828,7 @@ void hostapd_periodic_iface(struct hosta
+@@ -831,6 +831,7 @@ void hostapd_periodic_iface(struct hosta
  int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
  void hostapd_owe_update_trans(struct hostapd_iface *iface);;
  void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx);
diff --git a/package/network/services/hostapd/patches/770-radius_server.patch b/package/network/services/hostapd/patches/770-radius_server.patch
index d6fdb167f6..fdf5fed397 100644
--- a/package/network/services/hostapd/patches/770-radius_server.patch
+++ b/package/network/services/hostapd/patches/770-radius_server.patch
@@ -29,7 +29,7 @@ handle reload.
  
  #ifndef CONFIG_NO_HOSTAPD_LOGGER
  static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
-@@ -834,6 +835,11 @@ int main(int argc, char *argv[])
+@@ -838,6 +839,11 @@ int main(int argc, char *argv[])
  	if (os_program_init())
  		return -1;
  
diff --git a/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch b/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch
index 9528900e46..271b88c7c0 100644
--- a/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch
+++ b/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch
@@ -53,7 +53,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6
  
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -4974,6 +4974,15 @@ static int hostapd_config_fill(struct ho
+@@ -4976,6 +4976,15 @@ static int hostapd_config_fill(struct ho
  		bss->mld_indicate_disabled = atoi(pos);
  #endif /* CONFIG_TESTING_OPTIONS */
  #endif /* CONFIG_IEEE80211BE */
@@ -71,7 +71,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6
  			   "Line %d: unknown configuration item '%s'",
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -982,6 +982,35 @@ struct hostapd_bss_config {
+@@ -984,6 +984,35 @@ struct hostapd_bss_config {
  	int mbssid_index;
  
  	bool spp_amsdu;
diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c
index d3eadba15a..cbe2ee9506 100644
--- a/package/network/services/hostapd/src/src/ap/ucode.c
+++ b/package/network/services/hostapd/src/src/ap/ucode.c
@@ -201,6 +201,49 @@ bss_reload_vlans(struct hostapd_data *hapd, struct hostapd_bss_config *bss)
 	return 0;
 }
 
+static void
+__uc_hostapd_bss_stop(struct hostapd_data *hapd)
+{
+	struct hostapd_iface *iface = hapd->iface;
+
+	if (!hapd->started)
+		return;
+
+	hostapd_bss_deinit_no_free(hapd);
+	hostapd_drv_stop_ap(hapd);
+	hostapd_bss_link_deinit(hapd);
+
+#ifdef CONFIG_IEEE80211BE
+	if (hapd == iface->bss[0])
+	        hostapd_if_link_remove(hapd, WPA_IF_AP_BSS, hapd->conf->iface,
+                       hapd->mld_link_id);
+#endif
+
+	hostapd_free_hapd_data(hapd);
+}
+
+static int
+__uc_hostapd_bss_start(struct hostapd_data *hapd)
+{
+	struct hostapd_iface *iface = hapd->iface;
+	bool first = hapd == iface->bss[0];
+	int ret;
+
+	if (hapd->started)
+		return 0;
+
+#ifdef CONFIG_IEEE80211BE
+	if (hapd->conf->mld_ap)
+		first = false;
+#endif
+
+	ret = hostapd_setup_bss(hapd, first, true);
+	hostapd_neighbor_set_own_report(hapd);
+	hostapd_owe_update_trans(iface);
+
+	return ret;
+}
+
 static uc_value_t *
 uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
 {
@@ -241,12 +284,10 @@ uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
 
 		swap_field(ssid.wpa_psk_file);
 		ret = bss_reload_vlans(hapd, bss);
-		goto done;
+		goto free;
 	}
 
-	hostapd_bss_deinit_no_free(hapd);
-	hostapd_drv_stop_ap(hapd);
-	hostapd_free_hapd_data(hapd);
+	__uc_hostapd_bss_stop(hapd);
 
 	old_bss = hapd->conf;
 	for (i = 0; i < iface->conf->num_bss; i++)
@@ -258,13 +299,9 @@ uc_hostapd_bss_set_config(uc_vm_t *vm, size_t nargs)
 	if (hapd == iface->bss[0])
 		memcpy(hapd->own_addr, hapd->conf->bssid, ETH_ALEN);
 
-	hostapd_setup_bss(hapd, hapd == iface->bss[0], true);
-	hostapd_neighbor_set_own_report(hapd);
+	ret = __uc_hostapd_bss_start(hapd);
 	hostapd_ucode_update_interfaces();
-	hostapd_owe_update_trans(iface);
 
-done:
-	ret = 0;
 free:
 	hostapd_config_free(conf);
 out:
@@ -326,8 +363,13 @@ uc_hostapd_bss_delete(uc_vm_t *vm, size_t nargs)
 	hostapd_bss_deinit(hapd);
 	hostapd_remove_iface_bss_conf(iface->conf, hapd->conf);
 	hostapd_config_free_bss(hapd->conf);
+#ifdef CONFIG_IEEE80211BE
+	if (hapd->mld)
+		hapd->mld->refcount--;
+#endif
 	os_free(hapd);
 
+	hostapd_cleanup_unused_mlds(iface->interfaces);
 	hostapd_ucode_update_interfaces();
 
 	return NULL;
@@ -365,7 +407,12 @@ uc_hostapd_iface_add_bss(uc_vm_t *vm, size_t nargs)
 #ifdef CONFIG_IEEE80211BE
 	os_strlcpy(hapd->ctrl_sock_iface, hapd->conf->iface,
 		   sizeof(hapd->ctrl_sock_iface));
+	if (hapd->conf->mld_ap) {
+		hostapd_bss_setup_multi_link(hapd, iface->interfaces);
+		hostapd_set_ctrl_sock_iface(hapd);
+	}
 #endif
+
 	if (interfaces->ctrl_iface_init &&
 	    interfaces->ctrl_iface_init(hapd) < 0)
 		goto free_hapd;
@@ -673,6 +720,7 @@ uc_hostapd_bss_rename(uc_vm_t *vm, size_t nargs)
 {
 	struct hostapd_data *hapd = uc_fn_thisval("hostapd.bss");
 	uc_value_t *ifname_arg = uc_fn_arg(0);
+	uc_value_t *skip_rename = uc_fn_arg(1);
 	char prev_ifname[IFNAMSIZ + 1];
 	struct sta_info *sta;
 	const char *ifname;
@@ -688,9 +736,11 @@ uc_hostapd_bss_rename(uc_vm_t *vm, size_t nargs)
 	if (interfaces->ctrl_iface_deinit)
 		interfaces->ctrl_iface_deinit(hapd);
 
-	ret = hostapd_drv_if_rename(hapd, WPA_IF_AP_BSS, NULL, ifname);
-	if (ret)
-		goto out;
+	if (!ucv_is_truish(skip_rename)) {
+		ret = hostapd_drv_if_rename(hapd, WPA_IF_AP_BSS, NULL, ifname);
+		if (ret)
+			goto out;
+	}
 
 	for (sta = hapd->sta_list; sta; sta = sta->next) {
 		char cur_name[IFNAMSIZ + 1], new_name[IFNAMSIZ + 1];



From lede-commits at lists.infradead.org  Sat Aug  2 15:41:30 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 02 Aug 2025 18:41:30 -0400
Subject: [openwrt/openwrt]  tools: gnulib: do not cache C standard option test
 results
In-Reply-To: <175417449043.249880.7237904143374996979@git-01.infra.openwrt.org>
References: <175417449043.249880.7237904143374996979@git-01.infra.openwrt.org>
Message-ID: <mailman.110667.1754174494.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ba76da4fe9fc07e62c7d94d2fb4e123e6f0c56c8

commit ba76da4fe9fc07e62c7d94d2fb4e123e6f0c56c8
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Sat Aug 2 04:12:17 2025 -0400

    tools: gnulib: do not cache C standard option test results
    
    After eliminating the possibility of automake having a bug
    by testing a revert to the recent updates to automake,
    the problems regarding autoreconf with some packages
    was bisected to the gnulib update instead, through aclocal macros.
    
    With the new module, std-gnu23, some packages are failing build
    due to both the host compiler and cross compiler being tested for
    availability of C23 standard features with the configure script.
    The results of one is being cached and used for the other,
    while the two compilers are different versions and may or may not
    both support C23 options and would otherwise have conflicting results.
    
    A similar patch may have to be done
    for the next release of Autoconf
    if upstream GNU does not accept this solution.
    
    Reported-by: Georgi Valkov <gvalkov at gmail.com>
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Link: https://github.com/openwrt/openwrt/pull/19627
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 tools/gnulib/patches/190-stdc-m4-no-cache.patch | 59 +++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/tools/gnulib/patches/190-stdc-m4-no-cache.patch b/tools/gnulib/patches/190-stdc-m4-no-cache.patch
new file mode 100644
index 0000000000..1505da8402
--- /dev/null
+++ b/tools/gnulib/patches/190-stdc-m4-no-cache.patch
@@ -0,0 +1,59 @@
+--- a/m4/std-gnu11.m4
++++ b/m4/std-gnu11.m4
+@@ -185,8 +185,7 @@ AC_LANG_POP(C++)dnl
+ # else ACTION-IF-UNAVAILABLE.
+ AC_DEFUN([_AC_C_STD_TRY],
+ [AC_MSG_CHECKING([for $CC option to enable ]m4_translit($1, [c], [C])[ features])
+-AC_CACHE_VAL(ac_cv_prog_cc_$1,
+-[ac_cv_prog_cc_$1=no
++ac_cv_prog_cc_$1=no
+ ac_save_CC=$CC
+ AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])])
+ for ac_arg in '' $4
+@@ -197,7 +196,6 @@ do
+ done
+ rm -f conftest.$ac_ext
+ CC=$ac_save_CC
+-])# AC_CACHE_VAL
+ ac_prog_cc_stdc_options=
+ case "x$ac_cv_prog_cc_$1" in
+   x)
+@@ -523,8 +521,7 @@ fi
+ AC_DEFUN([_AC_CXX_STD_TRY],
+ [AC_MSG_CHECKING([for $CXX option to enable ]m4_translit(m4_translit($1, [x], [+]), [a-z], [A-Z])[ features])
+ AC_LANG_PUSH(C++)dnl
+-AC_CACHE_VAL(ac_cv_prog_cxx_$1,
+-[ac_cv_prog_cxx_$1=no
++ac_cv_prog_cxx_$1=no
+ ac_save_CXX=$CXX
+ AC_LANG_CONFTEST([AC_LANG_PROGRAM([$2], [$3])])
+ for ac_arg in '' $4
+@@ -535,7 +532,6 @@ do
+ done
+ rm -f conftest.$ac_ext
+ CXX=$ac_save_CXX
+-])# AC_CACHE_VAL
+ ac_prog_cxx_stdcxx_options=
+ case "x$ac_cv_prog_cxx_$1" in
+   x)
+--- a/m4/std-gnu23.m4
++++ b/m4/std-gnu23.m4
+@@ -696,8 +696,7 @@ AC_DEFUN([_AC_PROG_CC_STDC_EDITION_TRY],
+ [AC_REQUIRE([_AC_C_C$1_TEST_PROGRAM])]dnl
+ [AS_IF([test x$ac_prog_cc_stdc = xno],
+ [AC_MSG_CHECKING([for $CC option to enable C$1 features])
+-AC_CACHE_VAL([ac_cv_prog_cc_c$1],
+-[ac_cv_prog_cc_c$1=no
++ac_cv_prog_cc_c$1=no
+ ac_save_CC=$CC
+ AC_LANG_CONFTEST([AC_LANG_DEFINES_PROVIDED][$][ac_c_conftest_c$1_program])
+ for ac_arg in '' m4_normalize(m4_defn([_AC_C_C$1_OPTIONS]))
+@@ -707,7 +706,7 @@ do
+   test "x$ac_cv_prog_cc_c$1" != "xno" && break
+ done
+ rm -f conftest.$ac_ext
+-CC=$ac_save_CC])
++CC=$ac_save_CC
+ AS_IF([test "x$ac_cv_prog_cc_c$1" = xno],
+   [AC_MSG_RESULT([unsupported])],
+   [AS_IF([test "x$ac_cv_prog_cc_c$1" = x],



From lede-commits at lists.infradead.org  Sat Aug  2 16:15:20 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 02 Aug 2025 19:15:20 -0400
Subject: [openwrt/openwrt]  tools: firmware-utils: update to Git HEAD
 (2025-08-03)
In-Reply-To: <175417652003.327268.12571118531137621429@git-01.infra.openwrt.org>
References: <175417652003.327268.12571118531137621429@git-01.infra.openwrt.org>
Message-ID: <mailman.110668.1754176524.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f0746741f832403aa2fb31e3468af3f8e5418ec0

commit f0746741f832403aa2fb31e3468af3f8e5418ec0
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Aug 3 01:07:33 2025 +0200

    tools: firmware-utils: update to Git HEAD (2025-08-03)
    
    3346d77 build: add mkqdimg
    950f834 iptime-crc32: add support for ipTIME AX7800M-6E
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 tools/firmware-utils/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
index 691505c36d..96146637b3 100644
--- a/tools/firmware-utils/Makefile
+++ b/tools/firmware-utils/Makefile
@@ -11,9 +11,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
-PKG_SOURCE_DATE:=2025-07-24
-PKG_SOURCE_VERSION:=f29de74ecd7d952ee1f9a20577fec9f37c0d6f4a
-PKG_MIRROR_HASH:=6abf06a2243acb1a9820a8c4d7c9a1f03f5b920fecf86ac2353d257e7963f7bb
+PKG_SOURCE_DATE:=2025-08-03
+PKG_SOURCE_VERSION:=950f83405a935395492d61c9972b5e5ca826eeee
+PKG_MIRROR_HASH:=19f5b7547dc6f9460e25183c83d55aca9d1f18148466c09b64504a64379a34ae
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk



From lede-commits at lists.infradead.org  Sat Aug  2 21:23:13 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 03 Aug 2025 00:23:13 -0400
Subject: [openwrt/openwrt]  netifd: update to Git HEAD (2025-08-03)
In-Reply-To: <175419499262.938137.9593945795862444028@git-01.infra.openwrt.org>
References: <175419499262.938137.9593945795862444028@git-01.infra.openwrt.org>
Message-ID: <mailman.110799.1754202878.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/da370c7b96e3ee733453b86f84da0d536ebcb889

commit da370c7b96e3ee733453b86f84da0d536ebcb889
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 3 06:20:41 2025 +0200

    netifd: update to Git HEAD (2025-08-03)
    
    b563d7b2e65a ucode: add missing return code checks for fchdir/chdir
    c3cfd8df02af system-linux: add variable initialization to avoid compiler warnings on older gcc
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 790619b6a3..2bf01dae76 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2025-08-02
-PKG_SOURCE_VERSION:=74c22601baad83cc9bc0fddb98f15d7abaa52c67
-PKG_MIRROR_HASH:=3841d17a0e59bab8dbcf0433bbc326f5b7b9b54dbb79b8759c20bdb5f0340227
+PKG_SOURCE_DATE:=2025-08-03
+PKG_SOURCE_VERSION:=c3cfd8df02af6b66c7aeceb61ffc2ac948fa008a
+PKG_MIRROR_HASH:=09c4422181d1ae1ef5f4a648757693bd912418013fad2840e5b4bcd1bdf0860f
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Sat Aug  2 21:23:12 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 03 Aug 2025 00:23:12 -0400
Subject: [openwrt/openwrt]  kernel: improve pppoe performance
In-Reply-To: <175419499262.938137.9593945795862444028@git-01.infra.openwrt.org>
References: <175419499262.938137.9593945795862444028@git-01.infra.openwrt.org>
Message-ID: <mailman.110800.1754202878.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/991dd403d3f71d355ad1fbaf7b3b941e8e7a871b

commit 991dd403d3f71d355ad1fbaf7b3b941e8e7a871b
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Jul 15 12:56:57 2025 +0200

    kernel: improve pppoe performance
    
    - drop tx qdisc
    - implement rx GRO support
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...pp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch |  79 +++++++
 ...pp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch |  79 +++++++
 .../650-net-pppoe-implement-GRO-support.patch      | 248 +++++++++++++++++++++
 .../650-net-pppoe-implement-GRO-support.patch      | 248 +++++++++++++++++++++
 4 files changed, 654 insertions(+)

diff --git a/target/linux/generic/backport-6.12/620-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch b/target/linux/generic/backport-6.12/620-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
new file mode 100644
index 0000000000..64effc5ec8
--- /dev/null
+++ b/target/linux/generic/backport-6.12/620-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
@@ -0,0 +1,79 @@
+From: Qingfang Deng <dqfext at gmail.com>
+Date: Sat, 1 Mar 2025 21:55:16 +0800
+Subject: [PATCH] ppp: use IFF_NO_QUEUE in virtual interfaces
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+For PPPoE, PPTP, and PPPoL2TP, the start_xmit() function directly
+forwards packets to the underlying network stack and never returns
+anything other than 1. So these interfaces do not require a qdisc,
+and the IFF_NO_QUEUE flag should be set.
+
+Introduces a direct_xmit flag in struct ppp_channel to indicate when
+IFF_NO_QUEUE should be applied. The flag is set in ppp_connect_channel()
+for relevant protocols.
+
+While at it, remove the usused latency member from struct ppp_channel.
+
+Signed-off-by: Qingfang Deng <dqfext at gmail.com>
+Reviewed-by: Toke H?iland-J?rgensen <toke at redhat.com>
+Link: https://patch.msgid.link/20250301135517.695809-1-dqfext at gmail.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+
+--- a/drivers/net/ppp/ppp_generic.c
++++ b/drivers/net/ppp/ppp_generic.c
+@@ -3500,6 +3500,10 @@ ppp_connect_channel(struct channel *pch,
+ 		ret = -ENOTCONN;
+ 		goto outl;
+ 	}
++	if (pch->chan->direct_xmit)
++		ppp->dev->priv_flags |= IFF_NO_QUEUE;
++	else
++		ppp->dev->priv_flags &= ~IFF_NO_QUEUE;
+ 	spin_unlock_bh(&pch->downl);
+ 	if (pch->file.hdrlen > ppp->file.hdrlen)
+ 		ppp->file.hdrlen = pch->file.hdrlen;
+--- a/drivers/net/ppp/pppoe.c
++++ b/drivers/net/ppp/pppoe.c
+@@ -693,6 +693,7 @@ static int pppoe_connect(struct socket *
+ 		po->chan.mtu = dev->mtu - sizeof(struct pppoe_hdr) - 2;
+ 		po->chan.private = sk;
+ 		po->chan.ops = &pppoe_chan_ops;
++		po->chan.direct_xmit = true;
+ 
+ 		error = ppp_register_net_channel(dev_net(dev), &po->chan);
+ 		if (error) {
+--- a/drivers/net/ppp/pptp.c
++++ b/drivers/net/ppp/pptp.c
+@@ -465,6 +465,7 @@ static int pptp_connect(struct socket *s
+ 	po->chan.mtu -= PPTP_HEADER_OVERHEAD;
+ 
+ 	po->chan.hdrlen = 2 + sizeof(struct pptp_gre_header);
++	po->chan.direct_xmit = true;
+ 	error = ppp_register_channel(&po->chan);
+ 	if (error) {
+ 		pr_err("PPTP: failed to register PPP channel (%d)\n", error);
+--- a/include/linux/ppp_channel.h
++++ b/include/linux/ppp_channel.h
+@@ -42,8 +42,7 @@ struct ppp_channel {
+ 	int		hdrlen;		/* amount of headroom channel needs */
+ 	void		*ppp;		/* opaque to channel */
+ 	int		speed;		/* transfer rate (bytes/second) */
+-	/* the following is not used at present */
+-	int		latency;	/* overhead time in milliseconds */
++	bool		direct_xmit;	/* no qdisc, xmit directly */
+ };
+ 
+ #ifdef __KERNEL__
+--- a/net/l2tp/l2tp_ppp.c
++++ b/net/l2tp/l2tp_ppp.c
+@@ -806,6 +806,7 @@ static int pppol2tp_connect(struct socke
+ 	po->chan.private = sk;
+ 	po->chan.ops	 = &pppol2tp_chan_ops;
+ 	po->chan.mtu	 = pppol2tp_tunnel_mtu(tunnel);
++	po->chan.direct_xmit	= true;
+ 
+ 	error = ppp_register_net_channel(sock_net(sk), &po->chan);
+ 	if (error) {
diff --git a/target/linux/generic/backport-6.6/624-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch b/target/linux/generic/backport-6.6/624-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
new file mode 100644
index 0000000000..ad98807a6f
--- /dev/null
+++ b/target/linux/generic/backport-6.6/624-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
@@ -0,0 +1,79 @@
+From: Qingfang Deng <dqfext at gmail.com>
+Date: Sat, 1 Mar 2025 21:55:16 +0800
+Subject: [PATCH] ppp: use IFF_NO_QUEUE in virtual interfaces
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+For PPPoE, PPTP, and PPPoL2TP, the start_xmit() function directly
+forwards packets to the underlying network stack and never returns
+anything other than 1. So these interfaces do not require a qdisc,
+and the IFF_NO_QUEUE flag should be set.
+
+Introduces a direct_xmit flag in struct ppp_channel to indicate when
+IFF_NO_QUEUE should be applied. The flag is set in ppp_connect_channel()
+for relevant protocols.
+
+While at it, remove the usused latency member from struct ppp_channel.
+
+Signed-off-by: Qingfang Deng <dqfext at gmail.com>
+Reviewed-by: Toke H?iland-J?rgensen <toke at redhat.com>
+Link: https://patch.msgid.link/20250301135517.695809-1-dqfext at gmail.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+
+--- a/drivers/net/ppp/ppp_generic.c
++++ b/drivers/net/ppp/ppp_generic.c
+@@ -3500,6 +3500,10 @@ ppp_connect_channel(struct channel *pch,
+ 		ret = -ENOTCONN;
+ 		goto outl;
+ 	}
++	if (pch->chan->direct_xmit)
++		ppp->dev->priv_flags |= IFF_NO_QUEUE;
++	else
++		ppp->dev->priv_flags &= ~IFF_NO_QUEUE;
+ 	spin_unlock_bh(&pch->downl);
+ 	if (pch->file.hdrlen > ppp->file.hdrlen)
+ 		ppp->file.hdrlen = pch->file.hdrlen;
+--- a/drivers/net/ppp/pppoe.c
++++ b/drivers/net/ppp/pppoe.c
+@@ -693,6 +693,7 @@ static int pppoe_connect(struct socket *
+ 		po->chan.mtu = dev->mtu - sizeof(struct pppoe_hdr) - 2;
+ 		po->chan.private = sk;
+ 		po->chan.ops = &pppoe_chan_ops;
++		po->chan.direct_xmit = true;
+ 
+ 		error = ppp_register_net_channel(dev_net(dev), &po->chan);
+ 		if (error) {
+--- a/drivers/net/ppp/pptp.c
++++ b/drivers/net/ppp/pptp.c
+@@ -465,6 +465,7 @@ static int pptp_connect(struct socket *s
+ 	po->chan.mtu -= PPTP_HEADER_OVERHEAD;
+ 
+ 	po->chan.hdrlen = 2 + sizeof(struct pptp_gre_header);
++	po->chan.direct_xmit = true;
+ 	error = ppp_register_channel(&po->chan);
+ 	if (error) {
+ 		pr_err("PPTP: failed to register PPP channel (%d)\n", error);
+--- a/include/linux/ppp_channel.h
++++ b/include/linux/ppp_channel.h
+@@ -42,8 +42,7 @@ struct ppp_channel {
+ 	int		hdrlen;		/* amount of headroom channel needs */
+ 	void		*ppp;		/* opaque to channel */
+ 	int		speed;		/* transfer rate (bytes/second) */
+-	/* the following is not used at present */
+-	int		latency;	/* overhead time in milliseconds */
++	bool		direct_xmit;	/* no qdisc, xmit directly */
+ };
+ 
+ #ifdef __KERNEL__
+--- a/net/l2tp/l2tp_ppp.c
++++ b/net/l2tp/l2tp_ppp.c
+@@ -820,6 +820,7 @@ static int pppol2tp_connect(struct socke
+ 	po->chan.private = sk;
+ 	po->chan.ops	 = &pppol2tp_chan_ops;
+ 	po->chan.mtu	 = pppol2tp_tunnel_mtu(tunnel);
++	po->chan.direct_xmit	= true;
+ 
+ 	error = ppp_register_net_channel(sock_net(sk), &po->chan);
+ 	if (error) {
diff --git a/target/linux/generic/pending-6.12/650-net-pppoe-implement-GRO-support.patch b/target/linux/generic/pending-6.12/650-net-pppoe-implement-GRO-support.patch
new file mode 100644
index 0000000000..d7260296bd
--- /dev/null
+++ b/target/linux/generic/pending-6.12/650-net-pppoe-implement-GRO-support.patch
@@ -0,0 +1,248 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 15 Jul 2025 12:37:45 +0200
+Subject: [PATCH] net: pppoe: implement GRO support
+
+Only handles packets where the pppoe header length field matches the exact
+packet length. Significantly improves rx throughput.
+
+When running NAT traffic through a MediaTek MT7621 devices from a host
+behind PPPoE to a host directly connected via ethernet, the TCP throughput
+that the device is able to handle improves from ~130 Mbit/s to ~630 Mbit/s,
+using fraglist GRO.
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/drivers/net/ppp/pppoe.c
++++ b/drivers/net/ppp/pppoe.c
+@@ -77,6 +77,7 @@
+ #include <net/net_namespace.h>
+ #include <net/netns/generic.h>
+ #include <net/sock.h>
++#include <net/gro.h>
+ 
+ #include <linux/uaccess.h>
+ 
+@@ -435,7 +436,7 @@ static int pppoe_rcv(struct sk_buff *skb
+ 	if (skb->len < len)
+ 		goto drop;
+ 
+-	if (pskb_trim_rcsum(skb, len))
++	if (!skb_is_gso(skb) && pskb_trim_rcsum(skb, len))
+ 		goto drop;
+ 
+ 	ph = pppoe_hdr(skb);
+@@ -1173,6 +1174,161 @@ static struct pernet_operations pppoe_ne
+ 	.size = sizeof(struct pppoe_net),
+ };
+ 
++static u16
++compare_pppoe_header(struct pppoe_hdr *phdr, struct pppoe_hdr *phdr2)
++{
++	return (__force __u16)((phdr->sid ^ phdr2->sid) |
++			       (phdr->tag[0].tag_type ^ phdr2->tag[0].tag_type));
++}
++
++static __be16 pppoe_hdr_proto(struct pppoe_hdr *phdr)
++{
++	switch (phdr->tag[0].tag_type) {
++	case cpu_to_be16(PPP_IP):
++		return cpu_to_be16(ETH_P_IP);
++	case cpu_to_be16(PPP_IPV6):
++		return cpu_to_be16(ETH_P_IPV6);
++	default:
++		return 0;
++	}
++
++}
++
++static struct sk_buff *pppoe_gro_receive(struct list_head *head,
++					 struct sk_buff *skb)
++{
++	const struct packet_offload *ptype;
++	unsigned int hlen, off_pppoe;
++	struct sk_buff *pp = NULL;
++	struct pppoe_hdr *phdr;
++	struct sk_buff *p;
++	int flush = 1;
++	__be16 type;
++
++	off_pppoe = skb_gro_offset(skb);
++	hlen = off_pppoe + sizeof(*phdr);
++	phdr = skb_gro_header(skb, hlen + 2, off_pppoe);
++	if (unlikely(!phdr))
++		goto out;
++
++	/* ignore packets with padding or invalid length */
++	if (skb_gro_len(skb) != be16_to_cpu(phdr->length) + hlen)
++		goto out;
++
++	type = pppoe_hdr_proto(phdr);
++	if (!type)
++		goto out;
++
++	ptype = gro_find_receive_by_type(type);
++	if (!ptype)
++		goto out;
++
++	flush = 0;
++
++	list_for_each_entry(p, head, list) {
++		struct pppoe_hdr *phdr2;
++
++		if (!NAPI_GRO_CB(p)->same_flow)
++			continue;
++
++		phdr2 = (struct pppoe_hdr *)(p->data + off_pppoe);
++		if (compare_pppoe_header(phdr, phdr2))
++			NAPI_GRO_CB(p)->same_flow = 0;
++	}
++
++	skb_gro_pull(skb, sizeof(*phdr) + 2);
++	skb_gro_postpull_rcsum(skb, phdr, sizeof(*phdr) + 2);
++
++	pp = indirect_call_gro_receive_inet(ptype->callbacks.gro_receive,
++					    ipv6_gro_receive, inet_gro_receive,
++					    head, skb);
++
++out:
++	skb_gro_flush_final(skb, pp, flush);
++
++	return pp;
++}
++
++static int pppoe_gro_complete(struct sk_buff *skb, int nhoff)
++{
++	struct pppoe_hdr *phdr = (struct pppoe_hdr *)(skb->data + nhoff);
++	__be16 type = pppoe_hdr_proto(phdr);
++	struct packet_offload *ptype;
++	int len, err;
++
++	ptype = gro_find_complete_by_type(type);
++	if (!ptype)
++		return -ENOENT;
++
++	err = INDIRECT_CALL_INET(ptype->callbacks.gro_complete,
++				 ipv6_gro_complete, inet_gro_complete,
++				 skb, nhoff + sizeof(*phdr) + 2);
++	if (err)
++		return err;
++
++	len = skb->len - (nhoff + sizeof(*phdr));
++	phdr->length = cpu_to_be16(len);
++
++	return 0;
++}
++
++static struct sk_buff *pppoe_gso_segment(struct sk_buff *skb,
++					 netdev_features_t features)
++{
++	unsigned int pppoe_hlen = sizeof(struct pppoe_hdr) + 2;
++	struct sk_buff *segs = ERR_PTR(-EINVAL);
++	u16 mac_offset = skb->mac_header;
++	struct packet_offload *ptype;
++	u16 mac_len = skb->mac_len;
++	struct pppoe_hdr *phdr;
++	__be16 orig_type, type;
++	int len, nhoff;
++
++	skb_reset_network_header(skb);
++	nhoff = skb_network_header(skb) - skb_mac_header(skb);
++
++	if (unlikely(!pskb_may_pull(skb, pppoe_hlen)))
++		goto out;
++
++	phdr = (struct pppoe_hdr *)skb_network_header(skb);
++	type = pppoe_hdr_proto(phdr);
++	ptype = gro_find_complete_by_type(type);
++	if (!ptype)
++		goto out;
++
++	orig_type = skb->protocol;
++	__skb_pull(skb, pppoe_hlen);
++	segs = ptype->callbacks.gso_segment(skb, features);
++	if (IS_ERR_OR_NULL(segs)) {
++		skb_gso_error_unwind(skb, orig_type, pppoe_hlen, mac_offset,
++				     mac_len);
++		goto out;
++	}
++
++	skb = segs;
++	do {
++		phdr = (struct pppoe_hdr *)(skb_mac_header(skb) + nhoff);
++		len = skb->len - (nhoff + sizeof(*phdr));
++		phdr->length = cpu_to_be16(len);
++		skb->network_header = (u8 *)phdr - skb->head;
++		skb->protocol = orig_type;
++		skb_reset_mac_len(skb);
++	} while ((skb = skb->next));
++
++out:
++	return segs;
++}
++
++static struct packet_offload pppoe_packet_offload __read_mostly = {
++	.type = cpu_to_be16(ETH_P_PPP_SES),
++	.priority = 20,
++	.callbacks = {
++		.gro_receive = pppoe_gro_receive,
++		.gro_complete = pppoe_gro_complete,
++		.gso_segment = pppoe_gso_segment,
++	},
++};
++
+ static int __init pppoe_init(void)
+ {
+ 	int err;
+@@ -1189,6 +1345,7 @@ static int __init pppoe_init(void)
+ 	if (err)
+ 		goto out_unregister_pppoe_proto;
+ 
++	dev_add_offload(&pppoe_packet_offload);
+ 	dev_add_pack(&pppoes_ptype);
+ 	dev_add_pack(&pppoed_ptype);
+ 	register_netdevice_notifier(&pppoe_notifier);
+@@ -1208,6 +1365,7 @@ static void __exit pppoe_exit(void)
+ 	unregister_netdevice_notifier(&pppoe_notifier);
+ 	dev_remove_pack(&pppoed_ptype);
+ 	dev_remove_pack(&pppoes_ptype);
++	dev_remove_offload(&pppoe_packet_offload);
+ 	unregister_pppox_proto(PX_PROTO_OE);
+ 	proto_unregister(&pppoe_sk_proto);
+ 	unregister_pernet_device(&pppoe_net_ops);
+--- a/net/ipv4/af_inet.c
++++ b/net/ipv4/af_inet.c
+@@ -1546,6 +1546,7 @@ out:
+ 
+ 	return pp;
+ }
++EXPORT_INDIRECT_CALLABLE(inet_gro_receive);
+ 
+ static struct sk_buff *ipip_gro_receive(struct list_head *head,
+ 					struct sk_buff *skb)
+@@ -1631,6 +1632,7 @@ int inet_gro_complete(struct sk_buff *sk
+ out:
+ 	return err;
+ }
++EXPORT_INDIRECT_CALLABLE(inet_gro_complete);
+ 
+ static int ipip_gro_complete(struct sk_buff *skb, int nhoff)
+ {
+--- a/net/ipv6/ip6_offload.c
++++ b/net/ipv6/ip6_offload.c
+@@ -304,6 +304,7 @@ out:
+ 
+ 	return pp;
+ }
++EXPORT_INDIRECT_CALLABLE(ipv6_gro_receive);
+ 
+ static struct sk_buff *sit_ip6ip6_gro_receive(struct list_head *head,
+ 					      struct sk_buff *skb)
+@@ -386,6 +387,7 @@ INDIRECT_CALLABLE_SCOPE int ipv6_gro_com
+ out:
+ 	return err;
+ }
++EXPORT_INDIRECT_CALLABLE(ipv6_gro_complete);
+ 
+ static int sit_gro_complete(struct sk_buff *skb, int nhoff)
+ {
diff --git a/target/linux/generic/pending-6.6/650-net-pppoe-implement-GRO-support.patch b/target/linux/generic/pending-6.6/650-net-pppoe-implement-GRO-support.patch
new file mode 100644
index 0000000000..1c6849bf22
--- /dev/null
+++ b/target/linux/generic/pending-6.6/650-net-pppoe-implement-GRO-support.patch
@@ -0,0 +1,248 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 15 Jul 2025 12:37:45 +0200
+Subject: [PATCH] net: pppoe: implement GRO support
+
+Only handles packets where the pppoe header length field matches the exact
+packet length. Significantly improves rx throughput.
+
+When running NAT traffic through a MediaTek MT7621 devices from a host
+behind PPPoE to a host directly connected via ethernet, the TCP throughput
+that the device is able to handle improves from ~130 Mbit/s to ~630 Mbit/s,
+using fraglist GRO.
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/drivers/net/ppp/pppoe.c
++++ b/drivers/net/ppp/pppoe.c
+@@ -77,6 +77,7 @@
+ #include <net/net_namespace.h>
+ #include <net/netns/generic.h>
+ #include <net/sock.h>
++#include <net/gro.h>
+ 
+ #include <linux/uaccess.h>
+ 
+@@ -435,7 +436,7 @@ static int pppoe_rcv(struct sk_buff *skb
+ 	if (skb->len < len)
+ 		goto drop;
+ 
+-	if (pskb_trim_rcsum(skb, len))
++	if (!skb_is_gso(skb) && pskb_trim_rcsum(skb, len))
+ 		goto drop;
+ 
+ 	ph = pppoe_hdr(skb);
+@@ -1173,6 +1174,161 @@ static struct pernet_operations pppoe_ne
+ 	.size = sizeof(struct pppoe_net),
+ };
+ 
++static u16
++compare_pppoe_header(struct pppoe_hdr *phdr, struct pppoe_hdr *phdr2)
++{
++	return (__force __u16)((phdr->sid ^ phdr2->sid) |
++			       (phdr->tag[0].tag_type ^ phdr2->tag[0].tag_type));
++}
++
++static __be16 pppoe_hdr_proto(struct pppoe_hdr *phdr)
++{
++	switch (phdr->tag[0].tag_type) {
++	case cpu_to_be16(PPP_IP):
++		return cpu_to_be16(ETH_P_IP);
++	case cpu_to_be16(PPP_IPV6):
++		return cpu_to_be16(ETH_P_IPV6);
++	default:
++		return 0;
++	}
++
++}
++
++static struct sk_buff *pppoe_gro_receive(struct list_head *head,
++					 struct sk_buff *skb)
++{
++	const struct packet_offload *ptype;
++	unsigned int hlen, off_pppoe;
++	struct sk_buff *pp = NULL;
++	struct pppoe_hdr *phdr;
++	struct sk_buff *p;
++	int flush = 1;
++	__be16 type;
++
++	off_pppoe = skb_gro_offset(skb);
++	hlen = off_pppoe + sizeof(*phdr);
++	phdr = skb_gro_header(skb, hlen + 2, off_pppoe);
++	if (unlikely(!phdr))
++		goto out;
++
++	/* ignore packets with padding or invalid length */
++	if (skb_gro_len(skb) != be16_to_cpu(phdr->length) + hlen)
++		goto out;
++
++	type = pppoe_hdr_proto(phdr);
++	if (!type)
++		goto out;
++
++	ptype = gro_find_receive_by_type(type);
++	if (!ptype)
++		goto out;
++
++	flush = 0;
++
++	list_for_each_entry(p, head, list) {
++		struct pppoe_hdr *phdr2;
++
++		if (!NAPI_GRO_CB(p)->same_flow)
++			continue;
++
++		phdr2 = (struct pppoe_hdr *)(p->data + off_pppoe);
++		if (compare_pppoe_header(phdr, phdr2))
++			NAPI_GRO_CB(p)->same_flow = 0;
++	}
++
++	skb_gro_pull(skb, sizeof(*phdr) + 2);
++	skb_gro_postpull_rcsum(skb, phdr, sizeof(*phdr) + 2);
++
++	pp = indirect_call_gro_receive_inet(ptype->callbacks.gro_receive,
++					    ipv6_gro_receive, inet_gro_receive,
++					    head, skb);
++
++out:
++	skb_gro_flush_final(skb, pp, flush);
++
++	return pp;
++}
++
++static int pppoe_gro_complete(struct sk_buff *skb, int nhoff)
++{
++	struct pppoe_hdr *phdr = (struct pppoe_hdr *)(skb->data + nhoff);
++	__be16 type = pppoe_hdr_proto(phdr);
++	struct packet_offload *ptype;
++	int len, err;
++
++	ptype = gro_find_complete_by_type(type);
++	if (!ptype)
++		return -ENOENT;
++
++	err = INDIRECT_CALL_INET(ptype->callbacks.gro_complete,
++				 ipv6_gro_complete, inet_gro_complete,
++				 skb, nhoff + sizeof(*phdr) + 2);
++	if (err)
++		return err;
++
++	len = skb->len - (nhoff + sizeof(*phdr));
++	phdr->length = cpu_to_be16(len);
++
++	return 0;
++}
++
++static struct sk_buff *pppoe_gso_segment(struct sk_buff *skb,
++					 netdev_features_t features)
++{
++	unsigned int pppoe_hlen = sizeof(struct pppoe_hdr) + 2;
++	struct sk_buff *segs = ERR_PTR(-EINVAL);
++	u16 mac_offset = skb->mac_header;
++	struct packet_offload *ptype;
++	u16 mac_len = skb->mac_len;
++	struct pppoe_hdr *phdr;
++	__be16 orig_type, type;
++	int len, nhoff;
++
++	skb_reset_network_header(skb);
++	nhoff = skb_network_header(skb) - skb_mac_header(skb);
++
++	if (unlikely(!pskb_may_pull(skb, pppoe_hlen)))
++		goto out;
++
++	phdr = (struct pppoe_hdr *)skb_network_header(skb);
++	type = pppoe_hdr_proto(phdr);
++	ptype = gro_find_complete_by_type(type);
++	if (!ptype)
++		goto out;
++
++	orig_type = skb->protocol;
++	__skb_pull(skb, pppoe_hlen);
++	segs = ptype->callbacks.gso_segment(skb, features);
++	if (IS_ERR_OR_NULL(segs)) {
++		skb_gso_error_unwind(skb, orig_type, pppoe_hlen, mac_offset,
++				     mac_len);
++		goto out;
++	}
++
++	skb = segs;
++	do {
++		phdr = (struct pppoe_hdr *)(skb_mac_header(skb) + nhoff);
++		len = skb->len - (nhoff + sizeof(*phdr));
++		phdr->length = cpu_to_be16(len);
++		skb->network_header = (u8 *)phdr - skb->head;
++		skb->protocol = orig_type;
++		skb_reset_mac_len(skb);
++	} while ((skb = skb->next));
++
++out:
++	return segs;
++}
++
++static struct packet_offload pppoe_packet_offload __read_mostly = {
++	.type = cpu_to_be16(ETH_P_PPP_SES),
++	.priority = 20,
++	.callbacks = {
++		.gro_receive = pppoe_gro_receive,
++		.gro_complete = pppoe_gro_complete,
++		.gso_segment = pppoe_gso_segment,
++	},
++};
++
+ static int __init pppoe_init(void)
+ {
+ 	int err;
+@@ -1189,6 +1345,7 @@ static int __init pppoe_init(void)
+ 	if (err)
+ 		goto out_unregister_pppoe_proto;
+ 
++	dev_add_offload(&pppoe_packet_offload);
+ 	dev_add_pack(&pppoes_ptype);
+ 	dev_add_pack(&pppoed_ptype);
+ 	register_netdevice_notifier(&pppoe_notifier);
+@@ -1208,6 +1365,7 @@ static void __exit pppoe_exit(void)
+ 	unregister_netdevice_notifier(&pppoe_notifier);
+ 	dev_remove_pack(&pppoed_ptype);
+ 	dev_remove_pack(&pppoes_ptype);
++	dev_remove_offload(&pppoe_packet_offload);
+ 	unregister_pppox_proto(PX_PROTO_OE);
+ 	proto_unregister(&pppoe_sk_proto);
+ 	unregister_pernet_device(&pppoe_net_ops);
+--- a/net/ipv4/af_inet.c
++++ b/net/ipv4/af_inet.c
+@@ -1587,6 +1587,7 @@ out:
+ 
+ 	return pp;
+ }
++EXPORT_INDIRECT_CALLABLE(inet_gro_receive);
+ 
+ static struct sk_buff *ipip_gro_receive(struct list_head *head,
+ 					struct sk_buff *skb)
+@@ -1672,6 +1673,7 @@ int inet_gro_complete(struct sk_buff *sk
+ out:
+ 	return err;
+ }
++EXPORT_INDIRECT_CALLABLE(inet_gro_complete);
+ 
+ static int ipip_gro_complete(struct sk_buff *skb, int nhoff)
+ {
+--- a/net/ipv6/ip6_offload.c
++++ b/net/ipv6/ip6_offload.c
+@@ -319,6 +319,7 @@ out:
+ 
+ 	return pp;
+ }
++EXPORT_INDIRECT_CALLABLE(ipv6_gro_receive);
+ 
+ static struct sk_buff *sit_ip6ip6_gro_receive(struct list_head *head,
+ 					      struct sk_buff *skb)
+@@ -401,6 +402,7 @@ INDIRECT_CALLABLE_SCOPE int ipv6_gro_com
+ out:
+ 	return err;
+ }
++EXPORT_INDIRECT_CALLABLE(ipv6_gro_complete);
+ 
+ static int sit_gro_complete(struct sk_buff *skb, int nhoff)
+ {



From lede-commits at lists.infradead.org  Sat Aug  2 21:50:48 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 03 Aug 2025 00:50:48 -0400
Subject: [openwrt/openwrt]  hostapd: add missing MLO check on ucode bss stop
In-Reply-To: <175419664887.1004122.1722380661401734694@git-01.infra.openwrt.org>
References: <175419664887.1004122.1722380661401734694@git-01.infra.openwrt.org>
Message-ID: <mailman.110803.1754202878.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a2c361c5204883a154fc2fbc46505b37ce3925d6

commit a2c361c5204883a154fc2fbc46505b37ce3925d6
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 3 06:50:23 2025 +0200

    hostapd: add missing MLO check on ucode bss stop
    
    Fixes a crash on some config reload types
    
    Fixes: 816c2d86e749 ("hostapd: add support for MLO interfaces in ucode")
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/hostapd/src/src/ap/ucode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c
index 081872ebe8..ecd7203590 100644
--- a/package/network/services/hostapd/src/src/ap/ucode.c
+++ b/package/network/services/hostapd/src/src/ap/ucode.c
@@ -214,7 +214,7 @@ __uc_hostapd_bss_stop(struct hostapd_data *hapd)
 	hostapd_bss_link_deinit(hapd);
 
 #ifdef CONFIG_IEEE80211BE
-	if (hapd == iface->bss[0])
+	if (hapd == iface->bss[0] && hapd->conf->mld_ap)
 	        hostapd_if_link_remove(hapd, WPA_IF_AP_BSS, hapd->conf->iface,
                        hapd->mld_link_id);
 #endif



From lede-commits at lists.infradead.org  Sun Aug  3 06:35:59 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 03 Aug 2025 09:35:59 -0400
Subject: [openwrt/openwrt]  realtek: Zyxel GS1900-48 dts fixes
In-Reply-To: <175422815948.2154360.3237401636479609893@git-01.infra.openwrt.org>
References: <175422815948.2154360.3237401636479609893@git-01.infra.openwrt.org>
Message-ID: <mailman.110830.1754228165.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c95a08b1c565e29a986f4eda5d35ea0613d35095

commit c95a08b1c565e29a986f4eda5d35ea0613d35095
Author: Joe Holden <jwh at zorins.us>
AuthorDate: Tue Jul 29 19:19:22 2025 +0000

    realtek: Zyxel GS1900-48 dts fixes
    
     * Use SDS for phy 48/49
     * Use correct link/phy settings for SFP ports
     * Remove read-only flag from u-boot env so fw_setenv actually works
    
    Signed-off-by: Joe Holden <jwh at zorins.us>
    Link: https://github.com/openwrt/openwrt/pull/19596
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/realtek/dts/rtl8393_zyxel_gs1900-48.dts  | 30 ++++++----------------
 1 file changed, 8 insertions(+), 22 deletions(-)

diff --git a/target/linux/realtek/dts/rtl8393_zyxel_gs1900-48.dts b/target/linux/realtek/dts/rtl8393_zyxel_gs1900-48.dts
index 8790c3997b..d267cd28fd 100644
--- a/target/linux/realtek/dts/rtl8393_zyxel_gs1900-48.dts
+++ b/target/linux/realtek/dts/rtl8393_zyxel_gs1900-48.dts
@@ -54,7 +54,7 @@
 		#size-cells = <0>;
 	};
 
-	sfp0: sfp-p9 {
+	sfp0: sfp-p49 {
 		compatible = "sff,sfp";
 		i2c-bus = <&i2c0>;
 		los-gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>;
@@ -73,7 +73,7 @@
 		#size-cells = <0>;
 	};
 
-	sfp1: sfp-p10 {
+	sfp1: sfp-p50 {
 		compatible = "sff,sfp";
 		i2c-bus = <&i2c1>;
 		los-gpio = <&gpio1 33 GPIO_ACTIVE_HIGH>;
@@ -121,12 +121,10 @@
 			partition at 40000 {
 				label = "u-boot-env";
 				reg = <0x40000 0x10000>;
-				read-only;
 			};
 			partition at 50000 {
 				label = "u-boot-env2";
 				reg = <0x50000 0x10000>;
-				read-only;
 			};
 			partition at 60000 {
 				label = "jffs";
@@ -214,8 +212,8 @@
 		EXTERNAL_PHY(47)
 
 		/* RTL8393 Internal SerDes */
-		INTERNAL_PHY(48)
-		INTERNAL_PHY(49)
+		INTERNAL_PHY_SDS(48, 12)
+		INTERNAL_PHY_SDS(49, 13)
 	};
 };
 
@@ -282,31 +280,19 @@
 		port at 48 {
 			reg = <48>;
 			label = "lan49";
-			phy-mode = "sgmii";
+			phy-mode = "1000base-x";
 			phy-handle = <&phy48>;
+			managed = "in-band-status";
 			sfp = <&sfp0>;
-
-			fixed-link {
-				speed = <1000>;
-				full-duplex;
-				pause;
-			};
-
 		};
 
 		port at 49 {
 			reg = <49>;
 			label = "lan50";
-			phy-mode = "sgmii";
+			phy-mode = "1000base-x";
 			phy-handle = <&phy49>;
+			managed = "in-band-status";
 			sfp = <&sfp1>;
-
-			fixed-link {
-				speed = <1000>;
-				full-duplex;
-				pause;
-			};
-
 		};
 
 		/* CPU-Port */



From lede-commits at lists.infradead.org  Sun Aug  3 06:36:00 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 03 Aug 2025 09:36:00 -0400
Subject: [openwrt/openwrt]  uboot-envtools: gs1900-48: set fw_env/sys.config
In-Reply-To: <175422815948.2154360.3237401636479609893@git-01.infra.openwrt.org>
References: <175422815948.2154360.3237401636479609893@git-01.infra.openwrt.org>
Message-ID: <mailman.110831.1754228165.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/966bd308eb2e9a713baa1dbecc47df0d728e1286

commit 966bd308eb2e9a713baa1dbecc47df0d728e1286
Author: Joe Holden <jwh at zorins.us>
AuthorDate: Wed Jul 30 12:18:28 2025 +0000

    uboot-envtools: gs1900-48: set fw_env/sys.config
    
    GS1900-48 is missing from package/boot/uboot-tools/uboot-envtools/files/realtek, so add it to be consistent.
    
    Signed-off-by: Joe Holden <jwh at zorins.us>
    Link: https://github.com/openwrt/openwrt/pull/19596
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/boot/uboot-tools/uboot-envtools/files/realtek | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/boot/uboot-tools/uboot-envtools/files/realtek b/package/boot/uboot-tools/uboot-envtools/files/realtek
index 49921da151..9b8bf90c27 100644
--- a/package/boot/uboot-tools/uboot-envtools/files/realtek
+++ b/package/boot/uboot-tools/uboot-envtools/files/realtek
@@ -26,7 +26,8 @@ zyxel,gs1900-24-v1|\
 zyxel,gs1900-24e|\
 zyxel,gs1900-24ep|\
 zyxel,gs1900-24hp-v1|\
-zyxel,gs1900-24hp-v2)
+zyxel,gs1900-24hp-v2|\
+zyxel,gs1900-48)
 	ubootenv_add_mtd "u-boot-env" "0x0" "0x400" "0x10000"
 	ubootenv_add_sys_mtd "u-boot-env2" "0x0" "0x1000" "0x10000"
 	;;



From lede-commits at lists.infradead.org  Sun Aug  3 06:47:36 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 03 Aug 2025 09:47:36 -0400
Subject: [openwrt/openwrt]  ipq40xx: Refresh kernel patches
In-Reply-To: <175422885612.2179136.13576474993815459789@git-01.infra.openwrt.org>
References: <175422885612.2179136.13576474993815459789@git-01.infra.openwrt.org>
Message-ID: <mailman.110832.1754228859.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b1ce49292c7e6f1e13a4b23519b31b0f537ebdae

commit b1ce49292c7e6f1e13a4b23519b31b0f537ebdae
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Aug 3 15:44:57 2025 +0200

    ipq40xx: Refresh kernel patches
    
    Make the patches apply cleanly again.
    
    Fixes: 991dd403d3f7 ("kernel: improve pppoe performance")
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../ipq40xx/patches-6.12/999-atm-mpoa-intel-dsl-phy-support.patch     | 4 ++--
 .../ipq40xx/patches-6.6/999-atm-mpoa-intel-dsl-phy-support.patch      | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/linux/ipq40xx/patches-6.12/999-atm-mpoa-intel-dsl-phy-support.patch b/target/linux/ipq40xx/patches-6.12/999-atm-mpoa-intel-dsl-phy-support.patch
index 6a9bd44ab1..38e8cc1e0e 100644
--- a/target/linux/ipq40xx/patches-6.12/999-atm-mpoa-intel-dsl-phy-support.patch
+++ b/target/linux/ipq40xx/patches-6.12/999-atm-mpoa-intel-dsl-phy-support.patch
@@ -27,7 +27,7 @@ Subject: [PATCH] UGW_SW-29163: ATM oam support
  
  /*
   * Disconnect a channel from the generic layer.
-@@ -3624,6 +3640,7 @@ EXPORT_SYMBOL(ppp_unregister_channel);
+@@ -3628,6 +3644,7 @@ EXPORT_SYMBOL(ppp_unregister_channel);
  EXPORT_SYMBOL(ppp_channel_index);
  EXPORT_SYMBOL(ppp_unit_number);
  EXPORT_SYMBOL(ppp_dev_name);
@@ -37,7 +37,7 @@ Subject: [PATCH] UGW_SW-29163: ATM oam support
  EXPORT_SYMBOL(ppp_output_wakeup);
 --- a/include/linux/ppp_channel.h
 +++ b/include/linux/ppp_channel.h
-@@ -76,6 +76,9 @@ extern int ppp_unit_number(struct ppp_ch
+@@ -75,6 +75,9 @@ extern int ppp_unit_number(struct ppp_ch
  /* Get the device name associated with a channel, or NULL if none */
  extern char *ppp_dev_name(struct ppp_channel *);
  
diff --git a/target/linux/ipq40xx/patches-6.6/999-atm-mpoa-intel-dsl-phy-support.patch b/target/linux/ipq40xx/patches-6.6/999-atm-mpoa-intel-dsl-phy-support.patch
index 6a9bd44ab1..38e8cc1e0e 100644
--- a/target/linux/ipq40xx/patches-6.6/999-atm-mpoa-intel-dsl-phy-support.patch
+++ b/target/linux/ipq40xx/patches-6.6/999-atm-mpoa-intel-dsl-phy-support.patch
@@ -27,7 +27,7 @@ Subject: [PATCH] UGW_SW-29163: ATM oam support
  
  /*
   * Disconnect a channel from the generic layer.
-@@ -3624,6 +3640,7 @@ EXPORT_SYMBOL(ppp_unregister_channel);
+@@ -3628,6 +3644,7 @@ EXPORT_SYMBOL(ppp_unregister_channel);
  EXPORT_SYMBOL(ppp_channel_index);
  EXPORT_SYMBOL(ppp_unit_number);
  EXPORT_SYMBOL(ppp_dev_name);
@@ -37,7 +37,7 @@ Subject: [PATCH] UGW_SW-29163: ATM oam support
  EXPORT_SYMBOL(ppp_output_wakeup);
 --- a/include/linux/ppp_channel.h
 +++ b/include/linux/ppp_channel.h
-@@ -76,6 +76,9 @@ extern int ppp_unit_number(struct ppp_ch
+@@ -75,6 +75,9 @@ extern int ppp_unit_number(struct ppp_ch
  /* Get the device name associated with a channel, or NULL if none */
  extern char *ppp_dev_name(struct ppp_channel *);
  



From lede-commits at lists.infradead.org  Sun Aug  3 12:55:17 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 03 Aug 2025 15:55:17 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: enforce MFP for SAE
 connections
In-Reply-To: <175425091712.2983785.8084147611974872808@git-01.infra.openwrt.org>
References: <175425091712.2983785.8084147611974872808@git-01.infra.openwrt.org>
Message-ID: <mailman.110874.1754250922.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f26d13443670d9842bab6e4e9347f11fb745d132

commit f26d13443670d9842bab6e4e9347f11fb745d132
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 3 18:36:22 2025 +0200

    wifi-scripts: ucode: enforce MFP for SAE connections
    
    Avoids connection failures
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
index a006550efa..499d4a91f6 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
@@ -56,9 +56,9 @@ function setup_sta(data, config) {
 	iface.parse_encryption(config);
 
 	if (config.auth_type in [ 'sae', 'owe', 'eap2', 'eap192' ])
-		set_default(config, 'ieee80211w', 2);
+		config.ieee80211w = 2;
 	else if (config.auth_type in [ 'psk-sae' ])
-		set_default(config, 'ieee80211w', 1);
+		config.ieee80211w = 1;
 
 	set_default(config, 'ieee80211r', 0);
 	set_default(config, 'multi_ap', 0);



From lede-commits at lists.infradead.org  Sun Aug  3 12:55:20 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 03 Aug 2025 15:55:20 -0400
Subject: [openwrt/openwrt]  wifi-scripts: fix handling hotplug-added wireless
 vifs
In-Reply-To: <175425091712.2983785.8084147611974872808@git-01.infra.openwrt.org>
References: <175425091712.2983785.8084147611974872808@git-01.infra.openwrt.org>
Message-ID: <mailman.110875.1754250922.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7d570a489b12e997b5500b4b22516ecdba51fbab

commit 7d570a489b12e997b5500b4b22516ecdba51fbab
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 3 21:52:06 2025 +0200

    wifi-scripts: fix handling hotplug-added wireless vifs
    
    Pass the correct ifname and state
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../network/config/wifi-scripts/files/lib/netifd/wireless-device.uc   | 2 +-
 package/network/config/wifi-scripts/files/lib/netifd/wireless.uc      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
index a33b57cf37..8d2ea051fe 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
@@ -532,7 +532,7 @@ function hotplug(name, add)
 		    data.type != "vif" && data.type != "vlan")
 			continue;
 
-		handle_link(dev, data, up);
+		handle_link(dev, data, add);
 	}
 }
 
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
index b63ec239c7..a1ec40d79e 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
@@ -241,11 +241,11 @@ function check_interfaces()
 			dev.check();
 }
 
-function hotplug(name, add)
+function hotplug(ifname, add)
 {
 	for (let name, dev in wireless.devices)
 		if (dev.autostart)
-			dev.hotplug(name, add);
+			dev.hotplug(ifname, add);
 }
 
 const network_config_attr = {



From lede-commits at lists.infradead.org  Sun Aug  3 12:55:19 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 03 Aug 2025 15:55:19 -0400
Subject: [openwrt/openwrt]  wifi-scripts: fix setup of vifs on multi-radio
 devices
In-Reply-To: <175425091712.2983785.8084147611974872808@git-01.infra.openwrt.org>
References: <175425091712.2983785.8084147611974872808@git-01.infra.openwrt.org>
Message-ID: <mailman.110876.1754250922.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/844489106421eb8552c926349b6951a4c476ce28

commit 844489106421eb8552c926349b6951a4c476ce28
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 3 21:45:11 2025 +0200

    wifi-scripts: fix setup of vifs on multi-radio devices
    
    Ensure that the vlan name check is bypassed
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
index b0faef1a0a..a33b57cf37 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
@@ -36,6 +36,8 @@ function handle_link(dev, data, up)
 		     (data.type == "vif" && config.mode == "ap");
 
 	let dev_data = {
+		external: 2,
+		check_vlan: false,
 		isolate: !!config.bridge_isolate,
 		wireless: true,
 		wireless_ap: ap,



From lede-commits at lists.infradead.org  Sun Aug  3 12:55:18 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 03 Aug 2025 15:55:18 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: remove leftover debug comment
In-Reply-To: <175425091712.2983785.8084147611974872808@git-01.infra.openwrt.org>
References: <175425091712.2983785.8084147611974872808@git-01.infra.openwrt.org>
Message-ID: <mailman.110877.1754250925.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cbc23f1eb0a6130d6793812babb7a762d7a895d7

commit cbc23f1eb0a6130d6793812babb7a762d7a895d7
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 3 18:37:21 2025 +0200

    wifi-scripts: ucode: remove leftover debug comment
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc   | 1 -
 1 file changed, 1 deletion(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
index 499d4a91f6..49c6888d01 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
@@ -64,7 +64,6 @@ function setup_sta(data, config) {
 	set_default(config, 'multi_ap', 0);
 	set_default(config, 'default_disabled', 0);
 
-//multiap_flag_file="${_config}.is_multiap"
 	config.scan_ssid = 1;
 
 	switch(config.mode) {



From lede-commits at lists.infradead.org  Mon Aug  4 01:43:21 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 04 Aug 2025 04:43:21 -0400
Subject: [openwrt/openwrt]  realtek: RTL839x: reorganize mdio functions and
 SerDes register layout
In-Reply-To: <175429700118.538845.4494410561761495094@git-01.infra.openwrt.org>
References: <175429700118.538845.4494410561761495094@git-01.infra.openwrt.org>
Message-ID: <mailman.111108.1754297364.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/afa4662ed092193c48c1ecc01687c815f6cb5805

commit afa4662ed092193c48c1ecc01687c815f6cb5805
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Sat Aug 2 10:22:39 2025 -0400

    realtek: RTL839x: reorganize mdio functions and SerDes register layout
    
    The RTL839x mdio functions are scattered around the code. Relocate
    them to the bus (still inside the ethernet driver).
    
    Additionally provide a consistent SerDes register access through the
    mdio bus. Until now when a SerDes directly drives a SFP module there
    is no clear rule of how to handle its register set that consists of
    two parts:
    
    - c22 phy registers 0-15 live in the fiber page (2) of the SerDes
    - other SerDes specific registers exist in pages before and after
    
    The mdio bus and other SerDes functions are a wild mix of directly
    looking into page 2 or just using self defined methods to access
    data.
    
    Adapt the bus to the new consistent phy interface that mixes the
    SerDes register set like classic Realtek phys do it.
    
    - Use register 31 as page select (already in the bus)
    - Always keep the common registers 0-15 in place and read fiber page
    - Map the SerDes internal registers into the upper vendor specific
      registers 16-23 according to the page select register (31).
    
    That gives a register mapping as follows:
    
    +-----------------------+-----------------------+---------------+-------------+
    | reg 0x00-0x0f         | reg 0x10-0x17         | reg 0x18-0x1e | reg 0x1f    |
    +-----------------------+-----------------------+---------------+-------------+
    | SerDes fiber page (3) | real SerDes registers | zero          | SerDes page |
    | registers 0 - 15      | in packages of 8      |               | select reg  |
    +-----------------------+-----------------------+---------------+-------------+
    
    Example to make it as clear as possible.
    
    SerDes registers on a RTL839x show
    
    Page / Reg   | 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B ...
    -------------+----------------------------------------------------------------
    0 - SDS      | 0C03 0F00 7060 7106 074D 0EBF 0F0F 0359 5248 0000 0F80 0000 ...
    1 - SDS_EXT  | 0000 0000 85FA 8C6D 5CCC 0000 20D8 0003 79AA 8C64 00C3 1482 ...
    2 - FIB      | 1140 6189 001C CA40 01A0 0000 0000 0004 0000 0000 0000 0000 ...
    3 - FIB_EXT  | 1140 6109 001C CA40 01A0 0000 0000 0004 0000 0000 0000 0000 ...
    
    This translates to this phy layout
    
                 | SerDes fiber registers  normal SerDes registers  zero     p.sel
    Page / Reg   | 0x00 0x01 0x02 0x03 ... 0x10 0x11 0x12 0x13 ...  0x18 ... 0x1f
    -------------+---------------------------------------------------------------
    0            | 1140 6189 001C CA40 ... 0C03 0F00 7060 7106 ...  0000 ... 0000
    1            | 1140 6189 001C CA40 ... 5248 0000 0F80 0000 ...  0000 ... 0001
    ...
    4            | 1140 6189 001C CA40 ... 0000 0000 85FA 8C6D ...  0000 ... 0004
    ...
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19634
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c   | 160 -----------
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h   |   3 -
 .../files-6.12/drivers/net/ethernet/rtl838x_eth.c  | 295 +++++++++++++++++++--
 .../files-6.12/drivers/net/phy/rtl83xx-phy.c       |  61 -----
 .../files-6.12/drivers/net/phy/rtl83xx-phy.h       |   3 -
 5 files changed, 270 insertions(+), 252 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c
index 48c83812b4..cec6e27c37 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c
@@ -644,166 +644,6 @@ int rtl8390_sds_power(int mac, int val)
 	return 0;
 }
 
-static int rtl839x_smi_wait_op(int timeout)
-{
-	int ret = 0;
-	u32 val;
-
-	ret = readx_poll_timeout(sw_r32, RTL839X_PHYREG_ACCESS_CTRL,
-				 val, !(val & 0x1), 20, timeout);
-	if (ret)
-		pr_err("%s: timeout\n", __func__);
-
-	return ret;
-}
-
-int rtl839x_read_phy(u32 port, u32 page, u32 reg, u32 *val)
-{
-	u32 v;
-	int err = 0;
-
-	if (port > 63 || page > 8191 || reg > 31)
-		return -ENOTSUPP;
-
-	/* Take bug on RTL839x Rev <= C into account */
-	if (port >= RTL839X_CPU_PORT)
-		return -EIO;
-
-	mutex_lock(&smi_lock);
-
-	sw_w32_mask(0xffff0000, port << 16, RTL839X_PHYREG_DATA_CTRL);
-	v = reg << 5 | page << 10 | ((page == 0x1fff) ? 0x1f : 0) << 23;
-	sw_w32(v, RTL839X_PHYREG_ACCESS_CTRL);
-
-	sw_w32(0x1ff, RTL839X_PHYREG_CTRL);
-
-	v |= 1;
-	sw_w32(v, RTL839X_PHYREG_ACCESS_CTRL);
-
-	err = rtl839x_smi_wait_op(100000);
-	if (err)
-		goto errout;
-
-	*val = sw_r32(RTL839X_PHYREG_DATA_CTRL) & 0xffff;
-
-errout:
-	mutex_unlock(&smi_lock);
-
-	return err;
-}
-
-int rtl839x_write_phy(u32 port, u32 page, u32 reg, u32 val)
-{
-	u32 v;
-	int err = 0;
-
-	val &= 0xffff;
-	if (port > 63 || page > 8191 || reg > 31)
-		return -ENOTSUPP;
-
-	/* Take bug on RTL839x Rev <= C into account */
-	if (port >= RTL839X_CPU_PORT)
-		return -EIO;
-
-	mutex_lock(&smi_lock);
-
-	/* Set PHY to access */
-	rtl839x_set_port_reg_le(BIT_ULL(port), RTL839X_PHYREG_PORT_CTRL);
-
-	sw_w32_mask(0xffff0000, val << 16, RTL839X_PHYREG_DATA_CTRL);
-
-	v = reg << 5 | page << 10 | ((page == 0x1fff) ? 0x1f : 0) << 23;
-	sw_w32(v, RTL839X_PHYREG_ACCESS_CTRL);
-
-	sw_w32(0x1ff, RTL839X_PHYREG_CTRL);
-
-	v |= BIT(3) | 1; /* Write operation and execute */
-	sw_w32(v, RTL839X_PHYREG_ACCESS_CTRL);
-
-	err = rtl839x_smi_wait_op(100000);
-	if (err)
-		goto errout;
-
-	if (sw_r32(RTL839X_PHYREG_ACCESS_CTRL) & 0x2)
-		err = -EIO;
-
-errout:
-	mutex_unlock(&smi_lock);
-
-	return err;
-}
-
-/* Read an mmd register of the PHY */
-int rtl839x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val)
-{
-	int err = 0;
-	u32 v;
-
-	/* Take bug on RTL839x Rev <= C into account */
-	if (port >= RTL839X_CPU_PORT)
-		return -EIO;
-
-	mutex_lock(&smi_lock);
-
-	/* Set PHY to access */
-	sw_w32_mask(0xffff << 16, port << 16, RTL839X_PHYREG_DATA_CTRL);
-
-	/* Set MMD device number and register to write to */
-	sw_w32(devnum << 16 | (regnum & 0xffff), RTL839X_PHYREG_MMD_CTRL);
-
-	v = BIT(2) | BIT(0); /* MMD-access | EXEC */
-	sw_w32(v, RTL839X_PHYREG_ACCESS_CTRL);
-
-	err = rtl839x_smi_wait_op(100000);
-	if (err)
-		goto errout;
-
-	/* There is no error-checking via BIT 1 of v, as it does not seem to be set correctly */
-	*val = (sw_r32(RTL839X_PHYREG_DATA_CTRL) & 0xffff);
-	pr_debug("%s: port %d, regnum: %x, val: %x (err %d)\n", __func__, port, regnum, *val, err);
-
-errout:
-	mutex_unlock(&smi_lock);
-
-	return err;
-}
-
-/* Write to an mmd register of the PHY */
-int rtl839x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val)
-{
-	int err = 0;
-	u32 v;
-
-	/* Take bug on RTL839x Rev <= C into account */
-	if (port >= RTL839X_CPU_PORT)
-		return -EIO;
-
-	mutex_lock(&smi_lock);
-
-	/* Set PHY to access */
-	rtl839x_set_port_reg_le(BIT_ULL(port), RTL839X_PHYREG_PORT_CTRL);
-
-	/* Set data to write */
-	sw_w32_mask(0xffff << 16, val << 16, RTL839X_PHYREG_DATA_CTRL);
-
-	/* Set MMD device number and register to write to */
-	sw_w32(devnum << 16 | (regnum & 0xffff), RTL839X_PHYREG_MMD_CTRL);
-
-	v = BIT(3) | BIT(2) | BIT(0); /* WRITE | MMD-access | EXEC */
-	sw_w32(v, RTL839X_PHYREG_ACCESS_CTRL);
-
-	err = rtl839x_smi_wait_op(100000);
-	if (err)
-		goto errout;
-
-	pr_debug("%s: port %d, regnum: %x, val: %x (err %d)\n", __func__, port, regnum, val, err);
-
-errout:
-	mutex_unlock(&smi_lock);
-
-	return err;
-}
-
 void rtl8390_get_version(struct rtl838x_switch_priv *priv)
 {
 	u32 info, model;
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
index 8e298f8601..0d81c707af 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
@@ -194,9 +194,6 @@ int rtl83xx_lag_del(struct dsa_switch *ds, int group, int port);
 
 /* phy functions that will need to be moved to the future mdio driver */
 
-int rtl839x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val);
-int rtl839x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val);
-
 int rtl930x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val);
 int rtl930x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val);
 
diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
index c6e03ba571..c264f998b3 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
@@ -27,13 +27,6 @@ extern struct rtl83xx_soc_info soc_info;
 
 extern int rtl83xx_setup_tc(struct net_device *dev, enum tc_setup_type type, void *type_data);
 
-extern int rtl839x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val);
-extern int rtl839x_read_phy(u32 port, u32 page, u32 reg, u32 *val);
-extern int rtl839x_read_sds_phy(int phy_addr, int phy_reg);
-extern int rtl839x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val);
-extern int rtl839x_write_phy(u32 port, u32 page, u32 reg, u32 val);
-extern int rtl839x_write_sds_phy(int phy_addr, int phy_reg, u16 v);
-
 extern int rtl930x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val);
 extern int rtl930x_read_phy(u32 port, u32 page, u32 reg, u32 *val);
 extern int rtl930x_read_sds_phy(int phy_addr, int page, int phy_reg);
@@ -84,6 +77,7 @@ extern int rtl931x_write_sds_phy(int phy_addr, int page, int phy_reg, u16 v);
 #define RTMDIO_PKG		BIT(3)
 
 #define RTMDIO_838X_BASE	(0xe780)
+#define RTMDIO_839X_BASE	(0xa000)
 
 struct p_hdr {
 	uint8_t		*buf;
@@ -1960,6 +1954,263 @@ errout:
 	return err;
 }
 
+/*
+ * The RTL839x has 14 SerDes starting at 0xbb00a000. 0-7, 10, 11 are 5GBit, 8, 9, 12, 13 are
+ * 10 GBit. Two adjacent SerDes are tightly coupled and share a 1024 bytes register area. Per 32
+ * bit address two registers are stored. The first register is stored in the lower 2 bytes ("on
+ * the right" due to big endian) and the second register in the upper 2 bytes. The following
+ * register areas are known:
+ *
+ * - XSG0	(4 pages @ offset 0x000): for even SerDes
+ * - XSG1	(4 pages @ offset 0x100): for odd SerDes
+ * - TGRX	(4 pages @ offset 0x200): for even 10G SerDes
+ * - ANA_RG	(2 pages @ offset 0x300): for even 5G SerDes
+ * - ANA_RG	(2 pages @ offset 0x380): for odd 5G SerDes
+ * - ANA_TG	(2 pages @ offset 0x300): for even 10G SerDes
+ * - ANA_TG	(2 pages @ offset 0x380): for odd 10G SerDes
+ *
+ * The most consistent mapping that aligns to the RTL93xx devices is:
+ *
+ *		even 5G SerDes	odd 5G SerDes	even 10G SerDes	odd 10G SerDes
+ * Page 0:	XSG0/0		XSG1/0		XSG0/0		XSG1/0
+ * Page 1:	XSG0/1		XSG1/1		XSG0/1		XSG1/1
+ * Page 2:	XSG0/2		XSG1/2		XSG0/2		XSG1/2
+ * Page 3:	XSG0/3		XSG1/3		XSG0/3		XSG1/3
+ * Page 4:	<zero>		<zero>		TGRX/0		<zero>
+ * Page 5:	<zero>		<zero>		TGRX/1		<zero>
+ * Page 6:	<zero>		<zero>		TGRX/2		<zero>
+ * Page 7:	<zero>		<zero>		TGRX/3		<zero>
+ * Page 8:	ANA_RG		ANA_RG		<zero>		<zero>
+ * Page 9:	ANA_RG_EXT	ANA_RG_EXT	<zero>		<zero>
+ * Page 10:	<zero>		<zero>		ANA_TG		ANA_TG
+ * Page 11:	<zero>		<zero>		ANA_TG_EXT	ANA_TG_EXT
+ */
+
+static int rtmdio_839x_reg_offset(int sds, int page, int regnum)
+{
+	int offset = ((sds & 0xfe) << 9) + ((regnum & 0xfe) << 1) + (page << 6);
+	int sds5g = (GENMASK(11, 10) | GENMASK(7, 0)) & BIT(sds);
+
+	if (sds < 0 || sds > 13 || page < 0 || page > 11 || regnum < 0 || regnum > 31)
+		return -EIO;
+
+	if (page < 4)
+		return offset + ((sds & 1) << 8);
+	else if ((page & 4) && (sds == 8 || sds == 12))
+		return offset + 0x100;
+	else if (page >= 8 && page <= 9 && sds5g)
+		return offset + 0x100 + ((sds & 1) << 7);
+	else if (page >= 10 && !sds5g)
+		return offset + 0x80 + ((sds & 1) << 7);
+
+	return -EINVAL; /* hole */
+}
+
+static int rtmdio_839x_read_sds_phy(int sds, int page, int regnum)
+{
+	int bitpos = ((regnum << 4) & 0x10);
+	int offset;
+	u32 val;
+
+	offset = rtmdio_839x_reg_offset(sds, page, regnum);
+	if (offset == -EINVAL)
+		return 0;
+
+	if (offset < 0)
+		return offset;
+
+	/* phy id is empty so simulate one */
+	if (page == 2 && regnum == 2)
+		return 0x1c;
+	if (page == 2 && regnum == 3)
+		return 0x8393;
+
+	val = sw_r32(RTMDIO_839X_BASE + offset);
+	val = (val >> bitpos) & 0xffff;
+
+	return val;
+}
+
+static int rtmdio_839x_write_sds_phy(int sds, int page, int regnum, u16 val)
+{
+	u32 neighbor;
+	int offset;
+	u32 set;
+
+	offset = rtmdio_839x_reg_offset(sds, page, regnum);
+	if (offset == -EINVAL)
+		return 0;
+
+	if (offset < 0)
+		return 0;
+
+	neighbor = rtmdio_839x_read_sds_phy(sds, page, regnum ^ 1);
+	if (regnum & 1)
+		set = (val << 16) + neighbor;
+	else
+		set = (neighbor << 16) + val;
+
+	sw_w32(set, RTMDIO_839X_BASE + offset);
+
+	return 0;
+}
+
+/* RTL839x specific MDIO functions */
+
+static int rtmdio_839x_smi_wait_op(int timeout)
+{
+	int ret = 0;
+	u32 val;
+
+	ret = readx_poll_timeout(sw_r32, RTL839X_PHYREG_ACCESS_CTRL,
+				 val, !(val & 0x1), 20, timeout);
+	if (ret)
+		pr_err("%s: timeout\n", __func__);
+
+	return ret;
+}
+
+static int rtmdio_839x_read_phy(u32 port, u32 page, u32 reg, u32 *val)
+{
+	int err = 0;
+	u32 v;
+
+	if (port >= RTL839X_CPU_PORT || page > 8191 || reg > 31)
+		return -ENOTSUPP;
+
+	mutex_lock(&rtmdio_lock);
+
+	sw_w32_mask(0xffff0000, port << 16, RTL839X_PHYREG_DATA_CTRL);
+	v = reg << 5 | page << 10 | ((page == 0x1fff) ? 0x1f : 0) << 23;
+	sw_w32(v, RTL839X_PHYREG_ACCESS_CTRL);
+
+	sw_w32(0x1ff, RTL839X_PHYREG_CTRL);
+
+	v |= 1;
+	sw_w32(v, RTL839X_PHYREG_ACCESS_CTRL);
+
+	err = rtmdio_839x_smi_wait_op(100000);
+	if (err)
+		goto errout;
+
+	*val = sw_r32(RTL839X_PHYREG_DATA_CTRL) & 0xffff;
+
+errout:
+	mutex_unlock(&rtmdio_lock);
+
+	return err;
+}
+
+static int rtmdio_839x_write_phy(u32 port, u32 page, u32 reg, u32 val)
+{
+	int err = 0;
+	u32 v;
+
+	val &= 0xffff;
+	if (port >= RTL839X_CPU_PORT || page > 8191 || reg > 31)
+		return -ENOTSUPP;
+
+	mutex_lock(&rtmdio_lock);
+
+	/* Set PHY to access */
+	sw_w32(BIT_ULL(port), RTL839X_PHYREG_PORT_CTRL);
+	sw_w32(BIT_ULL(port) >> 32, RTL839X_PHYREG_PORT_CTRL + 4);
+
+	sw_w32_mask(0xffff0000, val << 16, RTL839X_PHYREG_DATA_CTRL);
+
+	v = reg << 5 | page << 10 | ((page == 0x1fff) ? 0x1f : 0) << 23;
+	sw_w32(v, RTL839X_PHYREG_ACCESS_CTRL);
+
+	sw_w32(0x1ff, RTL839X_PHYREG_CTRL);
+
+	v |= BIT(3) | 1; /* Write operation and execute */
+	sw_w32(v, RTL839X_PHYREG_ACCESS_CTRL);
+
+	err = rtmdio_839x_smi_wait_op(100000);
+	if (err)
+		goto errout;
+
+	if (sw_r32(RTL839X_PHYREG_ACCESS_CTRL) & 0x2)
+		err = -EIO;
+
+errout:
+	mutex_unlock(&rtmdio_lock);
+
+	return err;
+}
+
+/* Read an mmd register of the PHY */
+static int rtmdio_839x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val)
+{
+	int err = 0;
+	u32 v;
+
+	/* Take bug on RTL839x Rev <= C into account */
+	if (port >= RTL839X_CPU_PORT)
+		return -EIO;
+
+	mutex_lock(&rtmdio_lock);
+
+	/* Set PHY to access */
+	sw_w32_mask(0xffff << 16, port << 16, RTL839X_PHYREG_DATA_CTRL);
+
+	/* Set MMD device number and register to write to */
+	sw_w32(devnum << 16 | (regnum & 0xffff), RTL839X_PHYREG_MMD_CTRL);
+
+	v = BIT(2) | BIT(0); /* MMD-access | EXEC */
+	sw_w32(v, RTL839X_PHYREG_ACCESS_CTRL);
+
+	err = rtmdio_839x_smi_wait_op(100000);
+	if (err)
+		goto errout;
+
+	/* There is no error-checking via BIT 1 of v, as it does not seem to be set correctly */
+	*val = (sw_r32(RTL839X_PHYREG_DATA_CTRL) & 0xffff);
+	pr_debug("%s: port %d, regnum: %x, val: %x (err %d)\n", __func__, port, regnum, *val, err);
+
+errout:
+	mutex_unlock(&rtmdio_lock);
+
+	return err;
+}
+
+/* Write to an mmd register of the PHY */
+static int rtmdio_839x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val)
+{
+	int err = 0;
+	u32 v;
+
+	/* Take bug on RTL839x Rev <= C into account */
+	if (port >= RTL839X_CPU_PORT)
+		return -EIO;
+
+	mutex_lock(&rtmdio_lock);
+
+	/* Set PHY to access */
+	sw_w32(BIT_ULL(port), RTL839X_PHYREG_PORT_CTRL);
+	sw_w32(BIT_ULL(port) >> 32, RTL839X_PHYREG_PORT_CTRL + 4);
+
+	/* Set data to write */
+	sw_w32_mask(0xffff << 16, val << 16, RTL839X_PHYREG_DATA_CTRL);
+
+	/* Set MMD device number and register to write to */
+	sw_w32(devnum << 16 | (regnum & 0xffff), RTL839X_PHYREG_MMD_CTRL);
+
+	v = BIT(3) | BIT(2) | BIT(0); /* WRITE | MMD-access | EXEC */
+	sw_w32(v, RTL839X_PHYREG_ACCESS_CTRL);
+
+	err = rtmdio_839x_smi_wait_op(100000);
+	if (err)
+		goto errout;
+
+	pr_debug("%s: port %d, regnum: %x, val: %x (err %d)\n", __func__, port, regnum, val, err);
+
+errout:
+	mutex_unlock(&rtmdio_lock);
+
+	return err;
+}
+
 /* These are the core functions of our new Realtek SoC MDIO bus. */
 
 static int rtmdio_read_c45(struct mii_bus *bus, int addr, int devnum, int regnum)
@@ -2046,13 +2297,9 @@ static int rtmdio_83xx_read(struct mii_bus *bus, int addr, int regnum)
 		return priv->page[addr];
 
 	priv->raw[addr] = (priv->page[addr] == priv->rawpage);
-	if ((priv->phy_is_internal[addr]) && (priv->sds_id[addr] >=0)) {
-		if (priv->family_id == RTL8380_FAMILY_ID)
-			return rtmdio_read_sds_phy(priv, priv->sds_id[addr],
-						   priv->page[addr], regnum);
-		else
-			return rtl839x_read_sds_phy(addr, regnum);
-	}
+	if ((priv->phy_is_internal[addr]) && (priv->sds_id[addr] >= 0))
+		return rtmdio_read_sds_phy(priv, priv->sds_id[addr],
+					   priv->page[addr], regnum);
 
 	err = (*priv->read_phy)(addr, priv->page[addr], regnum, &val);
 	pr_debug("rd_PHY(adr=%d, pag=%d, reg=%d) = %d, err = %d\n",
@@ -2130,13 +2377,9 @@ static int rtmdio_83xx_write(struct mii_bus *bus, int addr, int regnum, u16 val)
 
 	if (!priv->raw[addr] && (regnum != RTMDIO_PAGE_SELECT || page == priv->rawpage)) {
 		priv->raw[addr] = (page == priv->rawpage);
-		if (priv->phy_is_internal[addr] && priv->sds_id[addr] >=0 ) {
-			if (priv->family_id == RTL8380_FAMILY_ID)
-				return rtmdio_write_sds_phy(priv, priv->sds_id[addr],
-							    priv->page[addr], regnum, val);
-			else
-				return rtl839x_write_sds_phy(addr, regnum, val);
-		}
+		if (priv->phy_is_internal[addr] && priv->sds_id[addr] >= 0)
+			return rtmdio_write_sds_phy(priv, priv->sds_id[addr],
+						    priv->page[addr], regnum, val);
 
 		err = (*priv->write_phy)(addr, page, regnum, val);
 		pr_debug("wr_PHY(adr=%d, pag=%d, reg=%d, val=%d) err = %d\n",
@@ -2476,10 +2719,12 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv)
 		priv->mii_bus->read = rtmdio_83xx_read;
 		priv->mii_bus->write = rtmdio_83xx_write;
 		priv->mii_bus->reset = rtmdio_839x_reset;
-		bus_priv->read_mmd_phy = rtl839x_read_mmd_phy;
-		bus_priv->write_mmd_phy = rtl839x_write_mmd_phy;
-		bus_priv->read_phy = rtl839x_read_phy;
-		bus_priv->write_phy = rtl839x_write_phy;
+		bus_priv->read_sds_phy = rtmdio_839x_read_sds_phy;
+		bus_priv->write_sds_phy = rtmdio_839x_write_sds_phy;
+		bus_priv->read_mmd_phy = rtmdio_839x_read_mmd_phy;
+		bus_priv->write_mmd_phy = rtmdio_839x_write_mmd_phy;
+		bus_priv->read_phy = rtmdio_839x_read_phy;
+		bus_priv->write_phy = rtmdio_839x_write_phy;
 		bus_priv->cpu_port = RTL839X_CPU_PORT;
 		bus_priv->rawpage = 0x1fff;
 		break;
diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index 68680b211b..b90aeeba43 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -292,44 +292,6 @@ static u32 rtl9300_sds_mode_get(int sds_num)
 	return v & RTL930X_SDS_MASK;
 }
 
-/* On the RTL839x family of SoCs with inbuilt SerDes, these SerDes are accessed through
- * a 2048 bit register that holds the contents of the PHY being simulated by the SoC.
- */
-int rtl839x_read_sds_phy(int phy_addr, int phy_reg)
-{
-	int offset = 0;
-	int reg;
-	u32 val;
-
-	if (phy_addr == 49)
-		offset = 0x100;
-
-	/* For the RTL8393 internal SerDes, we simulate a PHY ID in registers 2/3
-	 * which would otherwise read as 0.
-	 */
-	if (soc_info.id == 0x8393) {
-		if (phy_reg == MII_PHYSID1)
-			return 0x1c;
-		if (phy_reg == MII_PHYSID2)
-			return 0x8393;
-	}
-
-	/* Register RTL839X_SDS12_13_XSG0 is 2048 bit broad, the MSB (bit 15) of the
-	 * 0th PHY register is bit 1023 (in byte 0x80). Because PHY-registers are 16
-	 * bit broad, we offset by reg << 1. In the SoC 2 registers are stored in
-	 * one 32 bit register.
-	 */
-	reg = (phy_reg << 1) & 0xfc;
-	val = sw_r32(RTL839X_SDS12_13_XSG0 + offset + 0x80 + reg);
-
-	if (phy_reg & 1)
-		val = (val >> 16) & 0xffff;
-	else
-		val &= 0xffff;
-
-	return val;
-}
-
 /* On the RTL930x family of SoCs, the internal SerDes are accessed through an IO
  * register which simulates commands to an internal MDIO bus.
  */
@@ -424,29 +386,6 @@ int rtl931x_write_sds_phy(int phy_addr, int page, int phy_reg, u16 v)
 	return 0;
 }
 
-int rtl839x_write_sds_phy(int phy_addr, int phy_reg, u16 v)
-{
-	int offset = 0;
-	int reg;
-	u32 val;
-
-	if (phy_addr == 49)
-		offset = 0x100;
-
-	reg = (phy_reg << 1) & 0xfc;
-	val = v;
-	if (phy_reg & 1) {
-		val = val << 16;
-		sw_w32_mask(0xffff0000, val,
-			    RTL839X_SDS12_13_XSG0 + offset + 0x80 + reg);
-	} else {
-		sw_w32_mask(0xffff, val,
-			    RTL839X_SDS12_13_XSG0 + offset + 0x80 + reg);
-	}
-
-	return 0;
-}
-
 /* Read the link and speed status of the 2 internal SGMII/1000Base-X
  * ports of the RTL838x SoCs
  */
diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
index a081d0fdf7..6229ef6556 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
@@ -68,9 +68,6 @@ struct __attribute__ ((__packed__)) fw_header {
 #define RTL931X_PS_SERDES_OFF_MODE_CTRL_ADDR	(0x13F4)
 #define RTL931X_MAC_SERDES_MODE_CTRL(sds)	(0x136C + (((sds) << 2)))
 
-int rtl839x_read_sds_phy(int phy_addr, int phy_reg);
-int rtl839x_write_sds_phy(int phy_addr, int phy_reg, u16 v);
-
 int rtl9300_serdes_setup(int port, int sds_num, phy_interface_t phy_mode);
 int rtl930x_read_sds_phy(int phy_addr, int page, int phy_reg);
 int rtl930x_write_sds_phy(int phy_addr, int page, int phy_reg, u16 v);



From lede-commits at lists.infradead.org  Mon Aug  4 02:46:49 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 04 Aug 2025 05:46:49 -0400
Subject: [openwrt/openwrt]  wifi-scripts: fix handling changes to the wifi
 device disabled flag
In-Reply-To: <175430080855.708973.690174041026442470@git-01.infra.openwrt.org>
References: <175430080855.708973.690174041026442470@git-01.infra.openwrt.org>
Message-ID: <mailman.111164.1754300812.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/de447b93e084862a105ecbddac1ea4d56309f888

commit de447b93e084862a105ecbddac1ea4d56309f888
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Aug 4 11:46:05 2025 +0200

    wifi-scripts: fix handling changes to the wifi device disabled flag
    
    Allow toggling autostart even for disabled devices
    When switching from enabled to disabled, call teardown instead of setup
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../config/wifi-scripts/files/lib/netifd/wireless-device.uc    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
index 8d2ea051fe..22f5ee54d9 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
@@ -391,11 +391,14 @@ function update(data)
 
 function start()
 {
-	if (this.delete || this.data.config.disabled)
+	if (this.delete)
 		return;
 
 	this.dbg("start, state=" + this.state);
 	this.autostart = true;
+	if (this.data.config.disabled)
+		return;
+
 	wdev_reset(this);
 
 	if (this.state != "down")
@@ -427,7 +430,10 @@ function check()
 		return;
 
 	wdev_config_init(this);
-	this.setup();
+	if (this.data.config.disabled)
+		this.teardown();
+	else
+		this.setup();
 }
 
 function wdev_mark_up(wdev)



From lede-commits at lists.infradead.org  Mon Aug  4 02:46:48 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 04 Aug 2025 05:46:48 -0400
Subject: [openwrt/openwrt]  wifi-scripts: make wifi/utils.uc available in the
 legacy scripts variant
In-Reply-To: <175430080855.708973.690174041026442470@git-01.infra.openwrt.org>
References: <175430080855.708973.690174041026442470@git-01.infra.openwrt.org>
Message-ID: <mailman.111165.1754300812.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f3dd291b62c0578db2982c58cf5105aad54be1d7

commit f3dd291b62c0578db2982c58cf5105aad54be1d7
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Aug 4 11:31:05 2025 +0200

    wifi-scripts: make wifi/utils.uc available in the legacy scripts variant
    
    It can be used to look up the phy name from uci data in ucode scripts
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../wifi-scripts/{files-ucode => files}/usr/share/ucode/wifi/utils.uc     | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/utils.uc b/package/network/config/wifi-scripts/files/usr/share/ucode/wifi/utils.uc
similarity index 100%
rename from package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/utils.uc
rename to package/network/config/wifi-scripts/files/usr/share/ucode/wifi/utils.uc



From lede-commits at lists.infradead.org  Mon Aug  4 03:40:30 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 04 Aug 2025 06:40:30 -0400
Subject: [openwrt/openwrt]  wifi-scripts: set rsn_overriding for client mode
 interfaces
In-Reply-To: <175430402928.848883.5140825830562251311@git-01.infra.openwrt.org>
References: <175430402928.848883.5140825830562251311@git-01.infra.openwrt.org>
Message-ID: <mailman.111215.1754304760.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/adb1fce19b6cf462860e3ecc19a1ca260972aeb5

commit adb1fce19b6cf462860e3ecc19a1ca260972aeb5
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Aug 4 12:39:23 2025 +0200

    wifi-scripts: set rsn_overriding for client mode interfaces
    
    Unless HE/EHT is enabled, the client should not process the RSN override IE.
    This prevents picking up unsupported ciphers
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../files-ucode/usr/share/ucode/wifi/supplicant.uc             |  7 ++++++-
 .../network/config/wifi-scripts/files/lib/netifd/hostapd.sh    | 10 +++++++++-
 .../config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh  |  2 +-
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
index 49c6888d01..f2d51ed349 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
@@ -59,6 +59,11 @@ function setup_sta(data, config) {
 		config.ieee80211w = 2;
 	else if (config.auth_type in [ 'psk-sae' ])
 		config.ieee80211w = 1;
+	if ((wildcard(data.htmode, 'EHT*') || wildcard(data.htmode, 'HE*')) &&
+		config.rsn_override)
+		config.rsn_overriding = 1;
+	else
+		config.rsn_overriding = 0;
 
 	set_default(config, 'ieee80211r', 0);
 	set_default(config, 'multi_ap', 0);
@@ -159,7 +164,7 @@ function setup_sta(data, config) {
 
 	network_append_string_vars(config, [ 'ssid' ]);
 	network_append_vars(config, [
-		'scan_ssid', 'noscan', 'disabled', 'multi_ap_backhaul_sta',
+		'rsn_overriding', 'scan_ssid', 'noscan', 'disabled', 'multi_ap_backhaul_sta',
 		'ocv', 'key_mgmt', 'psk', 'sae_password', 'pairwise', 'group', 'bssid',
 		'proto', 'mesh_fwding', 'mesh_rssi_threshold', 'frequency', 'fixed_freq',
 		'disable_ht', 'disable_ht40', 'disable_vht', 'vht', 'max_oper_chwidth',
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh
index c0fcf8dba0..dabb534cf4 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh
+++ b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh
@@ -1316,7 +1316,7 @@ wpa_supplicant_add_network() {
 	wireless_vif_parse_encryption
 
 	json_get_vars \
-		ssid bssid key \
+		ssid bssid key rsn_override \
 		mcast_rate \
 		ieee80211w ieee80211r fils ocv \
 		multi_ap \
@@ -1324,6 +1324,8 @@ wpa_supplicant_add_network() {
 
 	json_get_values basic_rate_list basic_rate
 
+	set_default rsn_override 1
+
 	case "$auth_type" in
 		sae|owe|eap2|eap192)
 			set_default ieee80211w 2
@@ -1374,6 +1376,12 @@ wpa_supplicant_add_network() {
 
 	[ -n "$ocv" ] && append network_data "ocv=$ocv" "$N$T"
 
+	rsn_overriding=0
+	case "$htmode" in
+	EHT*|HE*) [ "$rsn_override" -gt 0 ] && rsn_overriding=1;;
+	esac
+	append network_data "rsn_overriding=$rsn_overriding" "$N$T"
+
 	case "$auth_type" in
 		none) ;;
 		owe)
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
index c9fa2b5fa0..2e939852b6 100755
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
@@ -1015,7 +1015,7 @@ mac80211_setup_supplicant() {
 	wpa_supplicant_prepare_interface "$ifname" nl80211 || return 1
 
 	if [ "$mode" = "sta" ]; then
-		wpa_supplicant_add_network "$ifname"
+		wpa_supplicant_add_network "$ifname" "" "$htmode"
 	else
 		wpa_supplicant_add_network "$ifname" "$freq" "$htmode" "$hostapd_noscan"
 	fi



From lede-commits at lists.infradead.org  Mon Aug  4 03:40:29 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 04 Aug 2025 06:40:29 -0400
Subject: [openwrt/openwrt]  wifi-scripts: add support for passing wifi-device
 settings via procd
In-Reply-To: <175430402928.848883.5140825830562251311@git-01.infra.openwrt.org>
References: <175430402928.848883.5140825830562251311@git-01.infra.openwrt.org>
Message-ID: <mailman.111216.1754304760.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/640c3984e31670be2aff1b60dd15c04a84bbbb7f

commit 640c3984e31670be2aff1b60dd15c04a84bbbb7f
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Aug 4 12:08:27 2025 +0200

    wifi-scripts: add support for passing wifi-device settings via procd
    
    Allows either overriding individual device settings, or passing complete devices
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../wifi-scripts/files/lib/netifd/wireless.uc      | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
index a1ec40d79e..956ca54413 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
@@ -183,6 +183,41 @@ function config_init(uci)
 	}
 
 	let udata = ubus.call({
+		object: "service",
+		method: "get_data",
+		data: {
+			type: "wifi-device"
+		},
+	});
+	for (let svcname, svc in udata) {
+		for (let typename, data in svc) {
+			for (let radio, config in data) {
+				if (type(config) != "object")
+					continue;
+
+				let dev = devices[radio];
+				if (dev) {
+					dev.config = { ...dev.config, ...config };
+					continue;
+				}
+
+				let handler = wireless.handlers[config.type];
+				if (!handler)
+					continue;
+
+				dev = devices[radio] = {
+					name,
+					config,
+
+					vif: [],
+				};
+				handlers[radio] = handler;
+			}
+		}
+	}
+
+
+	udata = ubus.call({
 		object: "service",
 		method: "get_data",
 		data: {
@@ -193,6 +228,9 @@ function config_init(uci)
 	for (let svcname, svc in udata) {
 		for (let typename, data in svc) {
 			for (let radio, vifs in data) {
+				if (type(vifs) != "object")
+					continue;
+
 				for (let name, vif in vifs) {
 					let devs = vif.device;
 					if (type(devs) != "array")



From lede-commits at lists.infradead.org  Mon Aug  4 07:01:52 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 04 Aug 2025 10:01:52 -0400
Subject: [openwrt/openwrt]  realtek: rtl930x: enable SMP
In-Reply-To: <175431611265.1318560.18298798855984576863@git-01.infra.openwrt.org>
References: <175431611265.1318560.18298798855984576863@git-01.infra.openwrt.org>
Message-ID: <mailman.111431.1754319111.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5584e2f6a79306c5c447729c3b575c97f894da25

commit 5584e2f6a79306c5c447729c3b575c97f894da25
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Fri Aug 1 16:02:54 2025 -0400

    realtek: rtl930x: enable SMP
    
    Like RTL839x the RTL930x SoCs have multithreading built in.
    Activate it in the kernel configuration.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19624
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/realtek/rtl930x/config-6.12 | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/target/linux/realtek/rtl930x/config-6.12 b/target/linux/realtek/rtl930x/config-6.12
index 74eeac1f00..76f1907503 100644
--- a/target/linux/realtek/rtl930x/config-6.12
+++ b/target/linux/realtek/rtl930x/config-6.12
@@ -25,6 +25,8 @@ CONFIG_CPU_MIPS32=y
 # CONFIG_CPU_MIPS32_R1 is not set
 CONFIG_CPU_MIPS32_R2=y
 CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_MIPSR2_IRQ_VI=y
+CONFIG_CPU_MIPSR2_IRQ_EI=y
 CONFIG_CPU_MITIGATIONS=y
 CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
 CONFIG_CPU_R4K_CACHE_TLB=y
@@ -127,8 +129,12 @@ CONFIG_MIPS_CMDLINE_FROM_DTB=y
 CONFIG_MIPS_CPU_SCACHE=y
 CONFIG_MIPS_EXTERNAL_TIMER=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
-# CONFIG_MIPS_MT_SMP is not set
+CONFIG_MIPS_MT=y
+# CONFIG_MIPS_MT_FPAFF is not set
+CONFIG_MIPS_MT_SMP=y
 # CONFIG_MIPS_NO_APPENDED_DTB is not set
+CONFIG_MIPS_NR_CPU_NR_MAP=2
+CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
 CONFIG_MIPS_RAW_APPENDED_DTB=y
 CONFIG_MIPS_SPRAM=y
 CONFIG_MMU_LAZY_TLB_REFCOUNT=y
@@ -151,12 +157,14 @@ CONFIG_NET_DSA=y
 CONFIG_NET_DSA_RTL83XX=y
 CONFIG_NET_DSA_TAG_TRAILER=y
 CONFIG_NET_EGRESS=y
+CONFIG_NET_FLOW_LIMIT=y
 CONFIG_NET_INGRESS=y
 CONFIG_NET_RTL838X=y
 CONFIG_NET_SELFTESTS=y
 CONFIG_NET_XGRESS=y
 CONFIG_NO_EXCEPT_FILL=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NR_CPUS=2
 CONFIG_NVMEM=y
 CONFIG_NVMEM_LAYOUTS=y
 CONFIG_OF=y
@@ -196,6 +204,8 @@ CONFIG_REGMAP_I2C=y
 CONFIG_REGMAP_MDIO=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_RESET_CONTROLLER=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
 CONFIG_RTL8261N_PHY=y
 # CONFIG_RTL838X is not set
 # CONFIG_RTL839X is not set
@@ -204,12 +214,15 @@ CONFIG_RTL930X=y
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SFP=y
+CONFIG_SMP=y
+CONFIG_SMP_UP=y
 CONFIG_SPI=y
 CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 CONFIG_SPI_REALTEK_SNAND=y
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 CONFIG_SWPHY=y
+CONFIG_SYNC_R4K=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
 CONFIG_SYS_HAS_CPU_MIPS32_R1=y
 CONFIG_SYS_HAS_CPU_MIPS32_R2=y
@@ -220,6 +233,8 @@ CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
 CONFIG_SYS_SUPPORTS_HIGHMEM=y
 CONFIG_SYS_SUPPORTS_MIPS16=y
 CONFIG_SYS_SUPPORTS_MULTITHREADING=y
+CONFIG_SYS_SUPPORTS_SMP=y
+CONFIG_SYS_SUPPORTS_SCHED_SMT=y
 CONFIG_TARGET_ISA_REV=2
 CONFIG_THERMAL=y
 # CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set



From lede-commits at lists.infradead.org  Mon Aug  4 22:01:33 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 05 Aug 2025 01:01:33 -0400
Subject: [openwrt/openwrt]  tools: lz4: update to 1.10.0
In-Reply-To: <175437009398.3801900.3648827982116830331@git-01.infra.openwrt.org>
References: <175437009398.3801900.3648827982116830331@git-01.infra.openwrt.org>
Message-ID: <mailman.111706.1754370098.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/bf917ea792d890f7ea431bd3dffb763c231857e0

commit bf917ea792d890f7ea431bd3dffb763c231857e0
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Sun Jul 27 18:49:43 2025 +0200

    tools: lz4: update to 1.10.0
    
    Changelog:
    https://github.com/lz4/lz4/blob/08bfdbe222fe2681600bdbef6fea885745583e61/NEWS
    
    Switch the lz4 source from codeload to git.
    
    Link: https://github.com/openwrt/openwrt/pull/19560
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 tools/lz4/Makefile | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tools/lz4/Makefile b/tools/lz4/Makefile
index cf1738a52f..aea66328e3 100644
--- a/tools/lz4/Makefile
+++ b/tools/lz4/Makefile
@@ -8,11 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lz4
-PKG_VERSION:=1.9.4
+PKG_VERSION:=1.10.0
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/lz4/lz4/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=0b0e3aa07c8c063ddf40b082bdf7e37a1562bda40a0ff5272957f3e987e0e54b
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL:=https://github.com/lz4/lz4.git
+PKG_SOURCE_VERSION:=ebb370ca83af193212df4dcbadcc5d87bc0de2f0
+PKG_MIRROR_HASH:=b168683fbeee4182f6f64bc216ad23f3b94edefbca9b8792dcd99ecd0a49f20f
 
 PKG_LICENSE:=BSD-2-Clause
 PKG_LICENSE_FILES:=LICENSE lib/LICENSE
@@ -21,7 +22,7 @@ PKG_CPE_ID:=cpe:/a:lz4_project:lz4
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/meson.mk
 
-MESON_HOST_BUILD_DIR:=$(HOST_BUILD_DIR)/contrib/meson/openwrt-build
+MESON_HOST_BUILD_DIR:=$(HOST_BUILD_DIR)/build/meson/openwrt-build
 
 # Always optimize for speed
 HOST_CFLAGS := $(filter-out -O%,$(HOST_CFLAGS)) -O3



From lede-commits at lists.infradead.org  Tue Aug  5 14:25:48 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 05 Aug 2025 17:25:48 -0400
Subject: [openwrt/openwrt]  lantiq: switch to kernel 6.12
In-Reply-To: <175442914847.2181271.3715998715353960938@git-01.infra.openwrt.org>
References: <175442914847.2181271.3715998715353960938@git-01.infra.openwrt.org>
Message-ID: <mailman.112394.1754429163.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1ab585faf0d57ce046663303728c45df8807634b

commit 1ab585faf0d57ce046663303728c45df8807634b
Author: Aleksander Jan Bajkowski <olek2 at wp.pl>
AuthorDate: Tue Aug 5 18:58:54 2025 +0200

    lantiq: switch to kernel 6.12
    
    Let's switch the lantiq target to use kernel 6.12 by default.
    
    Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
    Link: https://github.com/openwrt/openwrt/pull/19682
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/lantiq/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/lantiq/Makefile b/target/linux/lantiq/Makefile
index 08b5018fe4..26b7a0af12 100644
--- a/target/linux/lantiq/Makefile
+++ b/target/linux/lantiq/Makefile
@@ -9,8 +9,7 @@ BOARDNAME:=Lantiq
 FEATURES:=squashfs
 SUBTARGETS:=xrx200 xrx200_legacy xway xway_legacy falcon ase
 
-KERNEL_PATCHVER:=6.6
-KERNEL_TESTING_PATCHVER:=6.12
+KERNEL_PATCHVER:=6.12
 
 define Target/Description
 	Build firmware images for Lantiq SoC



From lede-commits at lists.infradead.org  Tue Aug  5 21:40:07 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 00:40:07 -0400
Subject: [openwrt/openwrt]  ead: replace legacy RETSIGTYPE with void in signal
 handler
In-Reply-To: <175445520731.3104373.18132908657061051250@git-01.infra.openwrt.org>
References: <175445520731.3104373.18132908657061051250@git-01.infra.openwrt.org>
Message-ID: <mailman.112512.1754455212.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6719bf56727f873dbd62d63fe023b4cca64fb786

commit 6719bf56727f873dbd62d63fe023b4cca64fb786
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Tue Aug 5 18:21:55 2025 +0200

    ead: replace legacy RETSIGTYPE with void in signal handler
    
    The RETSIGTYPE macro was historically used for signal handler return types,
    defaulting to int on some legacy systems. This is no longer needed,
    so we now use void as the return type.
    
    Fixes a compiler error:
      error: assignment to 'void (*)(int)' from incompatible pointer type 'int (*)()' [-Wincompatible-pointer-types]
    
    Link: https://github.com/openwrt/openwrt/pull/19681
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 package/network/services/ead/src/tinysrp/t_getpass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/ead/src/tinysrp/t_getpass.c b/package/network/services/ead/src/tinysrp/t_getpass.c
index 6ae7fca4de..a7d571d5de 100644
--- a/package/network/services/ead/src/tinysrp/t_getpass.c
+++ b/package/network/services/ead/src/tinysrp/t_getpass.c
@@ -44,7 +44,7 @@ static  struct  sigaction sigact;
 #endif
 
 /*ARGSUSED*/
-static RETSIGTYPE
+static void
 sig_catch (sig)
 int     sig;
 {



From lede-commits at lists.infradead.org  Wed Aug  6 01:11:02 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 04:11:02 -0400
Subject: [openwrt/openwrt]  realtek: rtl930x: move serdes functions over to
 mdio bus
In-Reply-To: <175446786212.3648872.3514800612711478728@git-01.infra.openwrt.org>
References: <175446786212.3648872.3514800612711478728@git-01.infra.openwrt.org>
Message-ID: <mailman.112608.1754468029.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e0ba4cf0867f616c0c6a35d990763069bac7e868

commit e0ba4cf0867f616c0c6a35d990763069bac7e868
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Mon Aug 4 09:52:54 2025 -0400

    realtek: rtl930x: move serdes functions over to mdio bus
    
    The migration of the RTL930x mdio/serdes access functions over to the
    mdio bus is a little more complicated than for RTL83xx. There are several
    places where the serdes is accessed directly. So do it in two steps. With
    this first step:
    
    - use the rtmdio prefix for the serdes reader/writer functions
    - move the functions over to the bus (inside the ethernet driver)
    - Adapt all callers.
    
    This is not only a copy/paste but the serdes access will be hardened too.
    For this:
    
    - put a mutex around the read/write functions because we have only
      indirect register access through a mdio style bus.
    - Verify input values to avoid data mess.
    
    Tested-by: Bj?rn Mork <bjorn at mork.no>
    Tested-by: Jan Hoffmann <jan at 3e8.eu>
    Tested-by: Jonas Jelonek <jelonek.jonas at gmail.com>
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19662
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../files-6.12/drivers/net/ethernet/rtl838x_eth.c  |  81 ++++++++++++--
 .../files-6.12/drivers/net/ethernet/rtl838x_eth.h  |   3 +
 .../files-6.12/drivers/net/phy/rtl83xx-phy.c       | 124 +++++++--------------
 .../files-6.12/drivers/net/phy/rtl83xx-phy.h       |   4 -
 4 files changed, 116 insertions(+), 96 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
index c264f998b3..bcc8f39286 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
@@ -29,10 +29,8 @@ extern int rtl83xx_setup_tc(struct net_device *dev, enum tc_setup_type type, voi
 
 extern int rtl930x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val);
 extern int rtl930x_read_phy(u32 port, u32 page, u32 reg, u32 *val);
-extern int rtl930x_read_sds_phy(int phy_addr, int page, int phy_reg);
 extern int rtl930x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val);
 extern int rtl930x_write_phy(u32 port, u32 page, u32 reg, u32 val);
-extern int rtl930x_write_sds_phy(int phy_addr, int page, int phy_reg, u16 v);
 
 extern int rtl931x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val);
 extern int rtl931x_read_phy(u32 port, u32 page, u32 reg, u32 *val);
@@ -76,8 +74,10 @@ extern int rtl931x_write_sds_phy(int phy_addr, int page, int phy_reg, u16 v);
 #define RTMDIO_ABS		BIT(2)
 #define RTMDIO_PKG		BIT(3)
 
-#define RTMDIO_838X_BASE	(0xe780)
-#define RTMDIO_839X_BASE	(0xa000)
+#define RTMDIO_838X_BASE		(0xe780)
+#define RTMDIO_839X_BASE		(0xa000)
+#define RTMDIO_930X_SDS_INDACS_CMD	(0x03B0)
+#define RTMDIO_930X_SDS_INDACS_DATA	(0x03B4)
 
 struct p_hdr {
 	uint8_t		*buf;
@@ -1632,6 +1632,7 @@ static int rtl838x_set_link_ksettings(struct net_device *ndev,
  */
 
 DEFINE_MUTEX(rtmdio_lock);
+DEFINE_MUTEX(rtmdio_lock_sds);
 
 struct rtmdio_bus_priv {
 	u16 id;
@@ -2211,6 +2212,70 @@ errout:
 	return err;
 }
 
+/*
+ * The RTL930x family has 12 SerDes of three types. They are accessed through two IO registers at
+ * 0xbb0003b0 which simulate commands to an internal MDIO bus:
+ *
+ * - SerDes 0-1 exist on the RTL9301 and 9302B and are QSGMII capable
+ * - SerDes 2-9 are USXGMII capabable with either quad or single configuration
+ * - SerDes 10-11 are 10GBase-R capable
+ */
+
+int rtmdio_930x_read_sds_phy(int sds, int page, int regnum)
+{
+        int i, ret = -EIO;
+        u32 cmd;
+
+	if (sds < 0 || sds > 11 || page < 0 || page > 63 || regnum < 0 || regnum > 31)
+		return -EIO;
+
+	mutex_lock(&rtmdio_lock_sds);
+
+	cmd = sds << 2 | page << 7 | regnum << 13 | 1;
+	sw_w32(cmd, RTMDIO_930X_SDS_INDACS_CMD);
+
+	for (i = 0; i < 100; i++) {
+		if (!(sw_r32(RTMDIO_930X_SDS_INDACS_CMD) & 0x1))
+			break;
+		mdelay(1);
+	}
+
+        if (i < 100)
+		ret = sw_r32(RTMDIO_930X_SDS_INDACS_DATA) & 0xffff;
+
+	mutex_unlock(&rtmdio_lock_sds);
+
+	return ret;
+}
+
+int rtmdio_930x_write_sds_phy(int sds, int page, int regnum, u16 val)
+{
+	int i, ret = -EIO;
+	u32 cmd;
+
+	if (sds < 0 || sds > 11 || page < 0 || page > 63 || regnum < 0 || regnum > 31)
+		return -EIO;
+
+	mutex_lock(&rtmdio_lock_sds);
+
+	cmd = sds << 2 | page << 7 | regnum << 13 | 0x3;
+	sw_w32(val, RTMDIO_930X_SDS_INDACS_DATA);
+	sw_w32(cmd, RTMDIO_930X_SDS_INDACS_CMD);
+
+	for (i = 0; i < 100; i++) {
+		if (!(sw_r32(RTMDIO_930X_SDS_INDACS_CMD) & 0x1))
+			break;
+		mdelay(1);
+	}
+
+	mutex_unlock(&rtmdio_lock_sds);
+
+	if (i < 100)
+		ret = 0;
+
+	return ret;
+}
+
 /* These are the core functions of our new Realtek SoC MDIO bus. */
 
 static int rtmdio_read_c45(struct mii_bus *bus, int addr, int devnum, int regnum)
@@ -2324,8 +2389,8 @@ static int rtmdio_93xx_read(struct mii_bus *bus, int addr, int regnum)
 	priv->raw[addr] = (priv->page[addr] == priv->rawpage);
 	if (priv->phy_is_internal[addr]) {
 		if (priv->family_id == RTL9300_FAMILY_ID)
-			return rtl930x_read_sds_phy(priv->sds_id[addr],
-						    priv->page[addr], regnum);
+			return rtmdio_930x_read_sds_phy(priv->sds_id[addr],
+							priv->page[addr], regnum);
 		else
 			return rtl931x_read_sds_phy(priv->sds_id[addr],
 						    priv->page[addr], regnum);
@@ -2416,8 +2481,8 @@ static int rtmdio_93xx_write(struct mii_bus *bus, int addr, int regnum, u16 val)
 		priv->raw[addr] = (page == priv->rawpage);
 		if (priv->phy_is_internal[addr]) {
 			if (priv->family_id == RTL9300_FAMILY_ID)
-				return rtl930x_write_sds_phy(priv->sds_id[addr],
-							     page, regnum, val);
+				return rtmdio_930x_write_sds_phy(priv->sds_id[addr],
+								 page, regnum, val);
 			else
 				return rtl931x_write_sds_phy(priv->sds_id[addr],
 							     page, regnum, val);
diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
index 720c22fdd3..ef79eec5bf 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
@@ -456,4 +456,7 @@ int phy_port_write_paged(struct phy_device *phydev, int port, int page, u32 regn
 int rtmdio_838x_read_phy(u32 port, u32 page, u32 reg, u32 *val);
 int rtmdio_838x_write_phy(u32 port, u32 page, u32 reg, u32 val);
 
+int rtmdio_930x_read_sds_phy(int sds, int page, int regnum);
+int rtmdio_930x_write_sds_phy(int sds, int page, int regnum, u16 val);
+
 #endif /* _RTL838X_ETH_H */
diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index b90aeeba43..82e81e1519 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -25,6 +25,9 @@ extern int phy_package_write_paged(struct phy_device *phydev, int page, u32 regn
 extern int phy_package_port_read_paged(struct phy_device *phydev, int port, int page, u32 regnum);
 extern int phy_package_read_paged(struct phy_device *phydev, int page, u32 regnum);
 
+extern int rtmdio_930x_read_sds_phy(int sds, int page, int regnum);
+extern int rtmdio_930x_write_sds_phy(int sds, int page, int regnum, u16 val);
+
 #define PHY_PAGE_2	2
 #define PHY_PAGE_4	4
 
@@ -292,53 +295,6 @@ static u32 rtl9300_sds_mode_get(int sds_num)
 	return v & RTL930X_SDS_MASK;
 }
 
-/* On the RTL930x family of SoCs, the internal SerDes are accessed through an IO
- * register which simulates commands to an internal MDIO bus.
- */
-int rtl930x_read_sds_phy(int phy_addr, int page, int phy_reg)
-{
-	int i;
-	u32 cmd = phy_addr << 2 | page << 7 | phy_reg << 13 | 1;
-
-	sw_w32(cmd, RTL930X_SDS_INDACS_CMD);
-
-	for (i = 0; i < 100; i++) {
-		if (!(sw_r32(RTL930X_SDS_INDACS_CMD) & 0x1))
-			break;
-		mdelay(1);
-	}
-
-	if (i >= 100)
-		return -EIO;
-
-	return sw_r32(RTL930X_SDS_INDACS_DATA) & 0xffff;
-}
-
-int rtl930x_write_sds_phy(int phy_addr, int page, int phy_reg, u16 v)
-{
-	int i;
-	u32 cmd;
-
-	sw_w32(v, RTL930X_SDS_INDACS_DATA);
-	cmd = phy_addr << 2 | page << 7 | phy_reg << 13 | 0x3;
-
-	sw_w32(cmd, RTL930X_SDS_INDACS_CMD);
-
-	for (i = 0; i < 100; i++) {
-		if (!(sw_r32(RTL930X_SDS_INDACS_CMD) & 0x1))
-			break;
-		mdelay(1);
-	}
-
-
-	if (i >= 100) {
-		pr_info("%s ERROR !!!!!!!!!!!!!!!!!!!!\n", __func__);
-		return -EIO;
-	}
-
-	return 0;
-}
-
 int rtl931x_read_sds_phy(int phy_addr, int page, int phy_reg)
 {
 	int i;
@@ -1461,18 +1417,18 @@ static void rtl9300_sds_field_w(int sds, u32 page, u32 reg, int end_bit, int sta
 	if (l < 32) {
 		u32 mask = BIT(l) - 1;
 
-		data = rtl930x_read_sds_phy(sds, page, reg);
+		data = rtmdio_930x_read_sds_phy(sds, page, reg);
 		data &= ~(mask << start_bit);
 		data |= (v & mask) << start_bit;
 	}
 
-	rtl930x_write_sds_phy(sds, page, reg, data);
+	rtmdio_930x_write_sds_phy(sds, page, reg, data);
 }
 
 static u32 rtl9300_sds_field_r(int sds, u32 page, u32 reg, int end_bit, int start_bit)
 {
 	int l = end_bit - start_bit + 1;
-	u32 v = rtl930x_read_sds_phy(sds, page, reg);
+	u32 v = rtmdio_930x_read_sds_phy(sds, page, reg);
 
 	if (l >= 32)
 		return v;
@@ -1626,7 +1582,7 @@ static int rtsds_930x_wait_clock_ready(int sds)
 	for (i = 0; i < 20; i++) {
 		usleep_range(10000, 15000);
 
-		rtl930x_write_sds_phy(base_sds, 0x1f, 0x02, 53);
+		rtmdio_930x_write_sds_phy(base_sds, 0x1f, 0x02, 53);
 		ready = rtl9300_sds_field_r(base_sds, 0x1f, 0x14, bit, bit);
 
 		ready_cnt = ready ? ready_cnt + 1 : 0;
@@ -1876,8 +1832,8 @@ static void rtl9300_serdes_mac_link_config(int sds, bool tx_normal, bool rx_norm
 {
 	u32 v10, v1;
 
-	v10 = rtl930x_read_sds_phy(sds, 6, 2); /* 10GBit, page 6, reg 2 */
-	v1 = rtl930x_read_sds_phy(sds, 0, 0); /* 1GBit, page 0, reg 0 */
+	v10 = rtmdio_930x_read_sds_phy(sds, 6, 2); /* 10GBit, page 6, reg 2 */
+	v1 = rtmdio_930x_read_sds_phy(sds, 0, 0); /* 1GBit, page 0, reg 0 */
 	pr_info("%s: registers before %08x %08x\n", __func__, v10, v1);
 
 	v10 &= ~(BIT(13) | BIT(14));
@@ -1889,11 +1845,11 @@ static void rtl9300_serdes_mac_link_config(int sds, bool tx_normal, bool rx_norm
 	v10 |= tx_normal ? 0 : BIT(14);
 	v1 |= tx_normal ? 0 : BIT(8);
 
-	rtl930x_write_sds_phy(sds, 6, 2, v10);
-	rtl930x_write_sds_phy(sds, 0, 0, v1);
+	rtmdio_930x_write_sds_phy(sds, 6, 2, v10);
+	rtmdio_930x_write_sds_phy(sds, 0, 0, v1);
 
-	v10 = rtl930x_read_sds_phy(sds, 6, 2);
-	v1 = rtl930x_read_sds_phy(sds, 0, 0);
+	v10 = rtmdio_930x_read_sds_phy(sds, 6, 2);
+	v1 = rtmdio_930x_read_sds_phy(sds, 0, 0);
 	pr_info("%s: registers after %08x %08x\n", __func__, v10, v1);
 }
 
@@ -1967,9 +1923,9 @@ void rtl9300_sds_rxcal_dcvs_get(u32 sds_num, u32 dcvs_id, u32 dcvs_list[])
 	bool dcvs_manual;
 
 	if (!(sds_num % 2))
-		rtl930x_write_sds_phy(sds_num, 0x1f, 0x2, 0x2f);
+		rtmdio_930x_write_sds_phy(sds_num, 0x1f, 0x2, 0x2f);
 	else
-		rtl930x_write_sds_phy(sds_num - 1, 0x1f, 0x2, 0x31);
+		rtmdio_930x_write_sds_phy(sds_num - 1, 0x1f, 0x2, 0x31);
 
 	/* ##Page0x2E, Reg0x15[9], REG0_RX_EN_TEST=[1] */
 	rtl9300_sds_field_w(sds_num, 0x2e, 0x15, 9, 9, 0x1);
@@ -2107,9 +2063,9 @@ static u32 rtl9300_sds_rxcal_leq_read(int sds_num)
 	bool leq_manual;
 
 	if (!(sds_num % 2))
-		rtl930x_write_sds_phy(sds_num, 0x1f, 0x2, 0x2f);
+		rtmdio_930x_write_sds_phy(sds_num, 0x1f, 0x2, 0x2f);
 	else
-		rtl930x_write_sds_phy(sds_num - 1, 0x1f, 0x2, 0x31);
+		rtmdio_930x_write_sds_phy(sds_num - 1, 0x1f, 0x2, 0x31);
 
 	/* ##Page0x2E, Reg0x15[9], REG0_RX_EN_TEST=[1] */
 	rtl9300_sds_field_w(sds_num, 0x2e, 0x15, 9, 9, 0x1);
@@ -2148,9 +2104,9 @@ static void rtl9300_sds_rxcal_vth_get(u32  sds_num, u32 vth_list[])
 	/* ##Page0x1F, Reg0x02[15 0], REG_DBGO_SEL=[0x002F]; */ /* Lane0 */
 	/* ##Page0x1F, Reg0x02[15 0], REG_DBGO_SEL=[0x0031]; */ /* Lane1 */
 	if (!(sds_num % 2))
-		rtl930x_write_sds_phy(sds_num, 0x1f, 0x2, 0x2f);
+		rtmdio_930x_write_sds_phy(sds_num, 0x1f, 0x2, 0x2f);
 	else
-		rtl930x_write_sds_phy(sds_num - 1, 0x1f, 0x2, 0x31);
+		rtmdio_930x_write_sds_phy(sds_num - 1, 0x1f, 0x2, 0x31);
 
 	/* ##Page0x2E, Reg0x15[9], REG0_RX_EN_TEST=[1] */
 	rtl9300_sds_field_w(sds_num, 0x2e, 0x15, 9, 9, 0x1);
@@ -2230,9 +2186,9 @@ static void rtl9300_sds_rxcal_tap_get(u32 sds_num, u32 tap_id, u32 tap_list[])
 	bool tap_manual;
 
 	if (!(sds_num % 2))
-		rtl930x_write_sds_phy(sds_num, 0x1f, 0x2, 0x2f);
+		rtmdio_930x_write_sds_phy(sds_num, 0x1f, 0x2, 0x2f);
 	else
-		rtl930x_write_sds_phy(sds_num - 1, 0x1f, 0x2, 0x31);
+		rtmdio_930x_write_sds_phy(sds_num - 1, 0x1f, 0x2, 0x31);
 
 	/* ##Page0x2E, Reg0x15[9], REG0_RX_EN_TEST=[1] */
 	rtl9300_sds_field_w(sds_num, 0x2e, 0x15, 9, 9, 0x1);
@@ -2304,7 +2260,7 @@ static void rtl9300_do_rx_calibration_1(int sds, phy_interface_t phy_mode)
 	int vth_min       = 0x0;
 
 	pr_info("start_1.1.1 initial value for sds %d\n", sds);
-	rtl930x_write_sds_phy(sds, 6,  0, 0);
+	rtmdio_930x_write_sds_phy(sds, 6,  0, 0);
 
 	/* FGCAL */
 	rtl9300_sds_field_w(sds, 0x2e, 0x01, 14, 14, 0x00);
@@ -2422,9 +2378,9 @@ static void rtl9300_do_rx_calibration_2_3(int sds_num)
 
 	while(1) {
 		if (!(sds_num % 2))
-			rtl930x_write_sds_phy(sds_num, 0x1f, 0x2, 0x2f);
+			rtmdio_930x_write_sds_phy(sds_num, 0x1f, 0x2, 0x2f);
 		else
-			rtl930x_write_sds_phy(sds_num -1 , 0x1f, 0x2, 0x31);
+			rtmdio_930x_write_sds_phy(sds_num -1 , 0x1f, 0x2, 0x31);
 
 		/* ##Page0x2E, Reg0x15[9], REG0_RX_EN_TEST=[1] */
 		rtl9300_sds_field_w(sds_num, 0x2e, 0x15, 9, 9, 0x1);
@@ -2668,8 +2624,8 @@ static int rtl9300_sds_sym_err_reset(int sds_num, phy_interface_t phy_mode)
 
 	case PHY_INTERFACE_MODE_10GBASER:
 		/* Read twice to clear */
-		rtl930x_read_sds_phy(sds_num, 5, 1);
-		rtl930x_read_sds_phy(sds_num, 5, 1);
+		rtmdio_930x_read_sds_phy(sds_num, 5, 1);
+		rtmdio_930x_read_sds_phy(sds_num, 5, 1);
 		break;
 
 	case PHY_INTERFACE_MODE_1000BASEX:
@@ -2698,7 +2654,7 @@ static u32 rtl9300_sds_sym_err_get(int sds_num, phy_interface_t phy_mode)
 	case PHY_INTERFACE_MODE_1000BASEX:
 	case PHY_INTERFACE_MODE_SGMII:
 	case PHY_INTERFACE_MODE_10GBASER:
-		v = rtl930x_read_sds_phy(sds_num, 5, 1);
+		v = rtmdio_930x_read_sds_phy(sds_num, 5, 1);
 		return v & 0xff;
 
 	default:
@@ -2748,24 +2704,24 @@ static void rtl9300_phy_enable_10g_1g(int sds_num)
 	u32 v;
 
 	/* Enable 1GBit PHY */
-	v = rtl930x_read_sds_phy(sds_num, PHY_PAGE_2, MII_BMCR);
+	v = rtmdio_930x_read_sds_phy(sds_num, PHY_PAGE_2, MII_BMCR);
 	pr_info("%s 1gbit phy: %08x\n", __func__, v);
 	v &= ~BMCR_PDOWN;
-	rtl930x_write_sds_phy(sds_num, PHY_PAGE_2, MII_BMCR, v);
+	rtmdio_930x_write_sds_phy(sds_num, PHY_PAGE_2, MII_BMCR, v);
 	pr_info("%s 1gbit phy enabled: %08x\n", __func__, v);
 
 	/* Enable 10GBit PHY */
-	v = rtl930x_read_sds_phy(sds_num, PHY_PAGE_4, MII_BMCR);
+	v = rtmdio_930x_read_sds_phy(sds_num, PHY_PAGE_4, MII_BMCR);
 	pr_info("%s 10gbit phy: %08x\n", __func__, v);
 	v &= ~BMCR_PDOWN;
-	rtl930x_write_sds_phy(sds_num, PHY_PAGE_4, MII_BMCR, v);
+	rtmdio_930x_write_sds_phy(sds_num, PHY_PAGE_4, MII_BMCR, v);
 	pr_info("%s 10gbit phy after: %08x\n", __func__, v);
 
 	/* dal_longan_construct_mac_default_10gmedia_fiber */
-	v = rtl930x_read_sds_phy(sds_num, 0x1f, 11);
+	v = rtmdio_930x_read_sds_phy(sds_num, 0x1f, 11);
 	pr_info("%s set medium: %08x\n", __func__, v);
 	v |= BIT(1);
-	rtl930x_write_sds_phy(sds_num, 0x1f, 11, v);
+	rtmdio_930x_write_sds_phy(sds_num, 0x1f, 11, v);
 	pr_info("%s set medium after: %08x\n", __func__, v);
 }
 
@@ -2947,15 +2903,15 @@ static void rtl9300_serdes_patch(int sds_num)
 {
 	if (sds_num % 2) {
 		for (int i = 0; i < sizeof(rtl9300_a_sds_10gr_lane1) / sizeof(sds_config); ++i) {
-			rtl930x_write_sds_phy(sds_num, rtl9300_a_sds_10gr_lane1[i].page,
-					      rtl9300_a_sds_10gr_lane1[i].reg,
-					      rtl9300_a_sds_10gr_lane1[i].data);
+			rtmdio_930x_write_sds_phy(sds_num, rtl9300_a_sds_10gr_lane1[i].page,
+						  rtl9300_a_sds_10gr_lane1[i].reg,
+						  rtl9300_a_sds_10gr_lane1[i].data);
 		}
 	} else {
 		for (int i = 0; i < sizeof(rtl9300_a_sds_10gr_lane0) / sizeof(sds_config); ++i) {
-			rtl930x_write_sds_phy(sds_num, rtl9300_a_sds_10gr_lane0[i].page,
-					      rtl9300_a_sds_10gr_lane0[i].reg,
-					      rtl9300_a_sds_10gr_lane0[i].data);
+			rtmdio_930x_write_sds_phy(sds_num, rtl9300_a_sds_10gr_lane0[i].page,
+						  rtl9300_a_sds_10gr_lane0[i].reg,
+						   rtl9300_a_sds_10gr_lane0[i].data);
 		}
 	}
 }
@@ -2975,7 +2931,7 @@ int rtl9300_sds_cmu_band_get(int sds)
 
 	en = rtl9300_sds_field_r(sds, page, 27, 1, 1);
 	if(!en) { /* Auto mode */
-		rtl930x_write_sds_phy(sds, 0x1f, 0x02, 31);
+		rtmdio_930x_write_sds_phy(sds, 0x1f, 0x02, 31);
 
 		cmu_band = rtl9300_sds_field_r(sds, 0x1f, 0x15, 5, 1);
 	} else {
diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
index 6229ef6556..7fca3bb8c5 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
@@ -57,8 +57,6 @@ struct __attribute__ ((__packed__)) fw_header {
 #define RTL839X_SDS12_13_XSG0			(0xB800)
 
 /* Registers of the internal Serdes of the 9300 */
-#define RTL930X_SDS_INDACS_CMD			(0x03B0)
-#define RTL930X_SDS_INDACS_DATA			(0x03B4)
 #define RTL930X_MAC_FORCE_MODE_CTRL		(0xCA1C)
 
 /* Registers of the internal SerDes of the 9310 */
@@ -69,8 +67,6 @@ struct __attribute__ ((__packed__)) fw_header {
 #define RTL931X_MAC_SERDES_MODE_CTRL(sds)	(0x136C + (((sds) << 2)))
 
 int rtl9300_serdes_setup(int port, int sds_num, phy_interface_t phy_mode);
-int rtl930x_read_sds_phy(int phy_addr, int page, int phy_reg);
-int rtl930x_write_sds_phy(int phy_addr, int page, int phy_reg, u16 v);
 
 int rtl931x_read_sds_phy(int phy_addr, int page, int phy_reg);
 int rtl931x_write_sds_phy(int phy_addr, int page, int phy_reg, u16 v);



From lede-commits at lists.infradead.org  Wed Aug  6 01:29:18 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 04:29:18 -0400
Subject: [openwrt/openwrt]  realtek: use lzma recipe for TP-Link TL-ST1008F
 v2.0
In-Reply-To: <175446895875.3726808.8451121536894982989@git-01.infra.openwrt.org>
References: <175446895875.3726808.8451121536894982989@git-01.infra.openwrt.org>
Message-ID: <mailman.112638.1754469330.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/bd861f05cc529031fb7d89c9497db2b6e39f2c50

commit bd861f05cc529031fb7d89c9497db2b6e39f2c50
Author: Jonas Jelonek <jelonek.jonas at gmail.com>
AuthorDate: Mon Aug 4 09:17:55 2025 +0000

    realtek: use lzma recipe for TP-Link TL-ST1008F v2.0
    
    Use the lzma recipe for the device for both initramfs and sysupgrade to
    save some flash space due to smaller image. U-Boot build on this device
    has native lzma support.
    
    Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19657
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/realtek/image/rtl930x.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/realtek/image/rtl930x.mk b/target/linux/realtek/image/rtl930x.mk
index 436a67d848..6f4b4148e8 100644
--- a/target/linux/realtek/image/rtl930x.mk
+++ b/target/linux/realtek/image/rtl930x.mk
@@ -26,6 +26,7 @@ define Device/tplink_tl-st1008f_v2
   DEVICE_VARIANT := v2.0
   DEVICE_PACKAGES := kmod-gpio-pca953x
   IMAGE_SIZE := 31808k
+  $(Device/kernel-lzma)
 endef
 TARGET_DEVICES += tplink_tl-st1008f_v2
 



From lede-commits at lists.infradead.org  Wed Aug  6 02:18:20 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 05:18:20 -0400
Subject: [openwrt/openwrt]  mac80211: backport upstream fixes
In-Reply-To: <175447190001.3891785.9588033148661240534@git-01.infra.openwrt.org>
References: <175447190001.3891785.9588033148661240534@git-01.infra.openwrt.org>
Message-ID: <mailman.112677.1754472598.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1e84b91634535e638a7f26ebd22fa5e81c6b48ec

commit 1e84b91634535e638a7f26ebd22fa5e81c6b48ec
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Aug 4 19:19:29 2025 +0200

    mac80211: backport upstream fixes
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...ifi-mac80211-Do-not-schedule-stopped-TXQs.patch | 36 ++++++++++++++++++++++
 ...11-Don-t-call-fq_flow_idx-for-management-.patch | 33 ++++++++++++++++++++
 ...11-Check-802.11-encaps-offloading-in-ieee.patch | 32 +++++++++++++++++++
 ...i-mac80211-Update-skb-s-control-block-key.patch | 27 ++++++++++++++++
 4 files changed, 128 insertions(+)

diff --git a/package/kernel/mac80211/patches/subsys/330-wifi-mac80211-Do-not-schedule-stopped-TXQs.patch b/package/kernel/mac80211/patches/subsys/330-wifi-mac80211-Do-not-schedule-stopped-TXQs.patch
new file mode 100644
index 0000000000..668315477a
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/330-wifi-mac80211-Do-not-schedule-stopped-TXQs.patch
@@ -0,0 +1,36 @@
+From: Alexander Wetzel <Alexander at wetzel-home.de>
+Date: Thu, 17 Jul 2025 18:25:46 +0200
+Subject: [PATCH] wifi: mac80211: Do not schedule stopped TXQs
+
+Ignore TXQs with the flag IEEE80211_TXQ_STOP when scheduling a queue.
+
+The flag is only set after all fragments have been dequeued and won't
+allow dequeueing other frames as long as the flag is set.
+
+For drivers using ieee80211_txq_schedule_start() this prevents an
+loop trying to push the queued frames while IEEE80211_TXQ_STOP is set:
+
+After setting IEEE80211_TXQ_STOP the driver will call
+ieee80211_return_txq(). Which calls __ieee80211_schedule_txq(), detects
+that there sill are frames in the queue and immediately restarts the
+stopped TXQ. Which can't dequeue any frame and thus starts over the loop.
+
+Signed-off-by: Alexander Wetzel <Alexander at wetzel-home.de>
+Fixes: ba8c3d6f16a1 ("mac80211: add an intermediate software queue implementation")
+Link: https://patch.msgid.link/20250717162547.94582-2-Alexander at wetzel-home.de
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -4116,7 +4116,9 @@ void __ieee80211_schedule_txq(struct iee
+ 
+ 	spin_lock_bh(&local->active_txq_lock[txq->ac]);
+ 
+-	has_queue = force || txq_has_queue(txq);
++	has_queue = force ||
++		    (!test_bit(IEEE80211_TXQ_STOP, &txqi->flags) &&
++		     txq_has_queue(txq));
+ 	if (list_empty(&txqi->schedule_order) &&
+ 	    (has_queue || ieee80211_txq_keep_active(txqi))) {
+ 		/* If airtime accounting is active, always enqueue STAs at the
diff --git a/package/kernel/mac80211/patches/subsys/331-wifi-mac80211-Don-t-call-fq_flow_idx-for-management-.patch b/package/kernel/mac80211/patches/subsys/331-wifi-mac80211-Don-t-call-fq_flow_idx-for-management-.patch
new file mode 100644
index 0000000000..e0c27a9225
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/331-wifi-mac80211-Don-t-call-fq_flow_idx-for-management-.patch
@@ -0,0 +1,33 @@
+From: Alexander Wetzel <Alexander at wetzel-home.de>
+Date: Thu, 17 Jul 2025 18:25:47 +0200
+Subject: [PATCH] wifi: mac80211: Don't call fq_flow_idx() for management
+ frames
+
+skb_get_hash() can only be used when the skb is linked to a netdev
+device.
+
+Signed-off-by: Alexander Wetzel <Alexander at wetzel-home.de>
+Fixes: 73bc9e0af594 ("mac80211: don't apply flow control on management frames")
+Link: https://patch.msgid.link/20250717162547.94582-3-Alexander at wetzel-home.de
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -1444,7 +1444,7 @@ static void ieee80211_txq_enqueue(struct
+ {
+ 	struct fq *fq = &local->fq;
+ 	struct fq_tin *tin = &txqi->tin;
+-	u32 flow_idx = fq_flow_idx(fq, skb);
++	u32 flow_idx;
+ 
+ 	ieee80211_set_skb_enqueue_time(skb);
+ 
+@@ -1460,6 +1460,7 @@ static void ieee80211_txq_enqueue(struct
+ 			IEEE80211_TX_INTCFL_NEED_TXPROCESSING;
+ 		__skb_queue_tail(&txqi->frags, skb);
+ 	} else {
++		flow_idx = fq_flow_idx(fq, skb);
+ 		fq_tin_enqueue(fq, tin, flow_idx, skb,
+ 			       fq_skb_free_func);
+ 	}
diff --git a/package/kernel/mac80211/patches/subsys/332-wifi-mac80211-Check-802.11-encaps-offloading-in-ieee.patch b/package/kernel/mac80211/patches/subsys/332-wifi-mac80211-Check-802.11-encaps-offloading-in-ieee.patch
new file mode 100644
index 0000000000..ac6f67bc35
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/332-wifi-mac80211-Check-802.11-encaps-offloading-in-ieee.patch
@@ -0,0 +1,32 @@
+From: Remi Pommarel <repk at triplefau.lt>
+Date: Thu, 17 Jul 2025 17:45:28 +0200
+Subject: [PATCH] wifi: mac80211: Check 802.11 encaps offloading in
+ ieee80211_tx_h_select_key()
+
+With 802.11 encapsulation offloading, ieee80211_tx_h_select_key() is
+called on 802.3 frames. In that case do not try to use skb data as
+valid 802.11 headers.
+
+Reported-by: Bert Karwatzki <spasswolf at web.de>
+Closes: https://lore.kernel.org/linux-wireless/20250410215527.3001-1-spasswolf at web.de
+Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue")
+Signed-off-by: Remi Pommarel <repk at triplefau.lt>
+Link: https://patch.msgid.link/1af4b5b903a5fca5ebe67333d5854f93b2be5abe.1752765971.git.repk at triplefau.lt
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -622,6 +622,12 @@ ieee80211_tx_h_select_key(struct ieee802
+ 	else
+ 		tx->key = NULL;
+ 
++	if (info->flags & IEEE80211_TX_CTL_HW_80211_ENCAP) {
++		if (tx->key && tx->key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)
++			info->control.hw_key = &tx->key->conf;
++		return TX_CONTINUE;
++	}
++
+ 	if (tx->key) {
+ 		bool skip_hw = false;
+ 
diff --git a/package/kernel/mac80211/patches/subsys/333-Reapply-wifi-mac80211-Update-skb-s-control-block-key.patch b/package/kernel/mac80211/patches/subsys/333-Reapply-wifi-mac80211-Update-skb-s-control-block-key.patch
new file mode 100644
index 0000000000..ba7d0b6bc4
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/333-Reapply-wifi-mac80211-Update-skb-s-control-block-key.patch
@@ -0,0 +1,27 @@
+From: Remi Pommarel <repk at triplefau.lt>
+Date: Thu, 17 Jul 2025 17:45:29 +0200
+Subject: [PATCH] Reapply "wifi: mac80211: Update skb's control block key in
+ ieee80211_tx_dequeue()"
+
+This reverts commit 0937cb5f345c ("Revert "wifi: mac80211: Update
+skb's control block key in ieee80211_tx_dequeue()"").
+
+This commit broke TX with 802.11 encapsulation HW offloading, now that
+this is fixed, reapply it.
+
+Fixes: bb42f2d13ffc ("mac80211: Move reorder-sensitive TX handlers to after TXQ dequeue")
+Signed-off-by: Remi Pommarel <repk at triplefau.lt>
+Link: https://patch.msgid.link/66b8fc39fb0194fa06c9ca7eeb6ffe0118dcb3ec.1752765971.git.repk at triplefau.lt
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -3900,6 +3900,7 @@ begin:
+ 	 * The key can be removed while the packet was queued, so need to call
+ 	 * this here to get the current key.
+ 	 */
++	info->control.hw_key = NULL;
+ 	r = ieee80211_tx_h_select_key(&tx);
+ 	if (r != TX_CONTINUE) {
+ 		ieee80211_free_txskb(&local->hw, skb);



From lede-commits at lists.infradead.org  Wed Aug  6 02:18:21 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 05:18:21 -0400
Subject: [openwrt/openwrt]  mac80211: estimate expected throughput if not
 provided by driver/rc
In-Reply-To: <175447190001.3891785.9588033148661240534@git-01.infra.openwrt.org>
References: <175447190001.3891785.9588033148661240534@git-01.infra.openwrt.org>
Message-ID: <mailman.112678.1754472598.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f10732fb5632091452c5b091d3bbd3102d1148da

commit f10732fb5632091452c5b091d3bbd3102d1148da
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Aug 6 11:09:57 2025 +0200

    mac80211: estimate expected throughput if not provided by driver/rc
    
    Estimate the tx throughput based on the expected per-packet tx time.
    This is useful for mesh implementations that rely on expected throughput,
    e.g. 802.11s or batman-adv.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...ctor-out-part-of-ieee80211_calc_expected_.patch | 140 +++++++++++++++++++++
 ...timate-expected-throughput-if-not-provide.patch |  51 ++++++++
 2 files changed, 191 insertions(+)

diff --git a/package/kernel/mac80211/patches/subsys/360-mac80211-factor-out-part-of-ieee80211_calc_expected_.patch b/package/kernel/mac80211/patches/subsys/360-mac80211-factor-out-part-of-ieee80211_calc_expected_.patch
new file mode 100644
index 0000000000..b5d5a72f87
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/360-mac80211-factor-out-part-of-ieee80211_calc_expected_.patch
@@ -0,0 +1,140 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 6 Aug 2025 10:49:54 +0200
+Subject: [PATCH] mac80211: factor out part of
+ ieee80211_calc_expected_tx_airtime
+
+Create ieee80211_rate_expected_tx_airtime helper function, which returns
+the expected tx airtime for a given rate and packet length in units of
+1024 usec, for more accuracy.
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/mac80211/airtime.c
++++ b/net/mac80211/airtime.c
+@@ -685,7 +685,7 @@ static int ieee80211_fill_rx_status(stru
+ 	if (ieee80211_fill_rate_info(hw, stat, band, ri))
+ 		return 0;
+ 
+-	if (!ieee80211_rate_valid(rate))
++	if (!rate || !ieee80211_rate_valid(rate))
+ 		return -1;
+ 
+ 	if (rate->flags & IEEE80211_TX_RC_160_MHZ_WIDTH)
+@@ -753,6 +753,53 @@ u32 ieee80211_calc_tx_airtime(struct iee
+ }
+ EXPORT_SYMBOL_GPL(ieee80211_calc_tx_airtime);
+ 
++u32 ieee80211_rate_expected_tx_airtime(struct ieee80211_hw *hw,
++				       struct ieee80211_tx_rate *tx_rate,
++				       struct rate_info *ri,
++				       enum nl80211_band band,
++				       bool ampdu, int len)
++{
++	struct ieee80211_rx_status stat;
++	u32 duration, overhead;
++	u8 agg_shift;
++
++	if (ieee80211_fill_rx_status(&stat, hw, tx_rate, ri, band, len))
++		return 0;
++
++	if (stat.encoding == RX_ENC_LEGACY || !ampdu)
++		return ieee80211_calc_rx_airtime(hw, &stat, len) * 1024;
++
++	duration = ieee80211_get_rate_duration(hw, &stat, &overhead);
++
++	/*
++	 * Assume that HT/VHT transmission on any AC except VO will
++	 * use aggregation. Since we don't have reliable reporting
++	 * of aggregation length, assume an average size based on the
++	 * tx rate.
++	 * This will not be very accurate, but much better than simply
++	 * assuming un-aggregated tx in all cases.
++	 */
++	if (duration > 400 * 1024) /* <= VHT20 MCS2 1S */
++		agg_shift = 1;
++	else if (duration > 250 * 1024) /* <= VHT20 MCS3 1S or MCS1 2S */
++		agg_shift = 2;
++	else if (duration > 150 * 1024) /* <= VHT20 MCS5 1S or MCS2 2S */
++		agg_shift = 3;
++	else if (duration > 70 * 1024) /* <= VHT20 MCS5 2S */
++		agg_shift = 4;
++	else if (stat.encoding != RX_ENC_HE ||
++		 duration > 20 * 1024) /* <= HE40 MCS6 2S */
++		agg_shift = 5;
++	else
++		agg_shift = 6;
++
++	duration *= len;
++	duration /= AVG_PKT_SIZE;
++	duration += (overhead * 1024 >> agg_shift);
++
++	return duration;
++}
++
+ u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw,
+ 				       struct ieee80211_vif *vif,
+ 				       struct ieee80211_sta *pubsta,
+@@ -775,45 +822,13 @@ u32 ieee80211_calc_expected_tx_airtime(s
+ 	if (pubsta) {
+ 		struct sta_info *sta = container_of(pubsta, struct sta_info,
+ 						    sta);
+-		struct ieee80211_rx_status stat;
+ 		struct ieee80211_tx_rate *tx_rate = &sta->deflink.tx_stats.last_rate;
+ 		struct rate_info *ri = &sta->deflink.tx_stats.last_rate_info;
+-		u32 duration, overhead;
+-		u8 agg_shift;
+-
+-		if (ieee80211_fill_rx_status(&stat, hw, tx_rate, ri, band, len))
+-			return 0;
+-
+-		if (stat.encoding == RX_ENC_LEGACY || !ampdu)
+-			return ieee80211_calc_rx_airtime(hw, &stat, len);
+-
+-		duration = ieee80211_get_rate_duration(hw, &stat, &overhead);
+-		/*
+-		 * Assume that HT/VHT transmission on any AC except VO will
+-		 * use aggregation. Since we don't have reliable reporting
+-		 * of aggregation length, assume an average size based on the
+-		 * tx rate.
+-		 * This will not be very accurate, but much better than simply
+-		 * assuming un-aggregated tx in all cases.
+-		 */
+-		if (duration > 400 * 1024) /* <= VHT20 MCS2 1S */
+-			agg_shift = 1;
+-		else if (duration > 250 * 1024) /* <= VHT20 MCS3 1S or MCS1 2S */
+-			agg_shift = 2;
+-		else if (duration > 150 * 1024) /* <= VHT20 MCS5 1S or MCS2 2S */
+-			agg_shift = 3;
+-		else if (duration > 70 * 1024) /* <= VHT20 MCS5 2S */
+-			agg_shift = 4;
+-		else if (stat.encoding != RX_ENC_HE ||
+-			 duration > 20 * 1024) /* <= HE40 MCS6 2S */
+-			agg_shift = 5;
+-		else
+-			agg_shift = 6;
++		u32 duration;
+ 
+-		duration *= len;
+-		duration /= AVG_PKT_SIZE;
++		duration = ieee80211_rate_expected_tx_airtime(hw, tx_rate, ri,
++							      band, true, len);
+ 		duration /= 1024;
+-		duration += (overhead >> agg_shift);
+ 
+ 		return max_t(u32, duration, 4);
+ 	}
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -2756,6 +2756,11 @@ u8 *ieee80211_get_bssid(struct ieee80211
+ 
+ extern const struct ethtool_ops ieee80211_ethtool_ops;
+ 
++u32 ieee80211_rate_expected_tx_airtime(struct ieee80211_hw *hw,
++				       struct ieee80211_tx_rate *tx_rate,
++				       struct rate_info *ri,
++				       enum nl80211_band band,
++				       bool ampdu, int len);
+ u32 ieee80211_calc_expected_tx_airtime(struct ieee80211_hw *hw,
+ 				       struct ieee80211_vif *vif,
+ 				       struct ieee80211_sta *pubsta,
diff --git a/package/kernel/mac80211/patches/subsys/361-mac80211-estimate-expected-throughput-if-not-provide.patch b/package/kernel/mac80211/patches/subsys/361-mac80211-estimate-expected-throughput-if-not-provide.patch
new file mode 100644
index 0000000000..9bcaf86504
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/361-mac80211-estimate-expected-throughput-if-not-provide.patch
@@ -0,0 +1,51 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 6 Aug 2025 10:52:03 +0200
+Subject: [PATCH] mac80211: estimate expected throughput if not provided by
+ driver/rc
+
+Estimate the tx throughput based on the expected per-packet tx time.
+This is useful for mesh implementations that rely on expected throughput,
+e.g. 802.11s or batman-adv.
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/mac80211/sta_info.c
++++ b/net/mac80211/sta_info.c
+@@ -2621,6 +2621,27 @@ static inline u64 sta_get_stats_bytes(st
+ 	return value;
+ }
+ 
++static u32 sta_estimate_expected_throughput(struct sta_info *sta,
++					    struct station_info *sinfo)
++{
++	struct ieee80211_sub_if_data *sdata = sta->sdata;
++	struct ieee80211_local *local = sdata->local;
++	struct rate_info *ri = &sinfo->txrate;
++	struct ieee80211_hw *hw = &local->hw;
++	struct ieee80211_chanctx_conf *conf;
++	u32 duration;
++	u8 band = 0;
++
++	conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
++	if (conf)
++			band = conf->def.chan->band;
++
++	duration = ieee80211_rate_expected_tx_airtime(hw, NULL, ri, band, true, 1024);
++	duration += duration >> 4; /* add assumed packet error rate of ~6% */
++
++	return ((1024 * USEC_PER_SEC) / duration) * 8;
++}
++
+ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
+ 		   bool tidstats)
+ {
+@@ -2865,6 +2886,8 @@ void sta_set_sinfo(struct sta_info *sta,
+ 		sinfo->sta_flags.set |= BIT(NL80211_STA_FLAG_TDLS_PEER);
+ 
+ 	thr = sta_get_expected_throughput(sta);
++	if (!thr && (sinfo->filled & BIT_ULL(NL80211_STA_INFO_TX_BITRATE)))
++	    thr = sta_estimate_expected_throughput(sta, sinfo);
+ 
+ 	if (thr != 0) {
+ 		sinfo->filled |= BIT_ULL(NL80211_STA_INFO_EXPECTED_THROUGHPUT);



From lede-commits at lists.infradead.org  Wed Aug  6 03:29:11 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 06:29:11 -0400
Subject: [openwrt/openwrt]  netifd: update to Git HEAD (2025-08-06)
In-Reply-To: <175447615141.4159309.10636658963468304966@git-01.infra.openwrt.org>
References: <175447615141.4159309.10636658963468304966@git-01.infra.openwrt.org>
Message-ID: <mailman.112733.1754476647.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6014be3f0f2f222903251777de5975ff8876973b

commit 6014be3f0f2f222903251777de5975ff8876973b
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Aug 6 12:29:03 2025 +0200

    netifd: update to Git HEAD (2025-08-06)
    
    964c9aa3ec2b ucode: fix passing network vlan on handle_link
    3d140ec0b834 examples: sync scripts with openwrt
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 2bf01dae76..0677d36da0 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2025-08-03
-PKG_SOURCE_VERSION:=c3cfd8df02af6b66c7aeceb61ffc2ac948fa008a
-PKG_MIRROR_HASH:=09c4422181d1ae1ef5f4a648757693bd912418013fad2840e5b4bcd1bdf0860f
+PKG_SOURCE_DATE:=2025-08-06
+PKG_SOURCE_VERSION:=3d140ec0b834e3764e8abe9d33989b76544f8ee9
+PKG_MIRROR_HASH:=de5488d34698699644d11ab697e51d5651a6b6bac92bfc1469ee16139aa2e0a7
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Wed Aug  6 04:41:58 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 07:41:58 -0400
Subject: [openwrt/openwrt]  realtek: move and clean up CHIP_INFO register
 definitions
In-Reply-To: <175448051792.236807.18275633594008808310@git-01.infra.openwrt.org>
References: <175448051792.236807.18275633594008808310@git-01.infra.openwrt.org>
Message-ID: <mailman.112793.1754480521.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/368dab7c7a19a6246762361f29b2051e74656555

commit 368dab7c7a19a6246762361f29b2051e74656555
Author: Jan Hoffmann <jan at 3e8.eu>
AuthorDate: Tue Aug 5 02:41:32 2025 +0200

    realtek: move and clean up CHIP_INFO register definitions
    
    Move the definitions to mach-rtl83xx.h, so they can be used during init
    to read more detailed SoC information. Also rename the RTL931X register,
    as it has the same address on all RTL93xx.
    
    Signed-off-by: Jan Hoffmann <jan at 3e8.eu>
    Link: https://github.com/openwrt/openwrt/pull/19653
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h    | 4 +++-
 target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h   | 2 --
 target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h  | 1 -
 target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c       | 6 +++---
 4 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h b/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
index d53414fec7..e611b7aebc 100644
--- a/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
+++ b/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
@@ -222,9 +222,11 @@
 #define RTL930X_GPIO_PCD_IMR            (RTL930X_GPIO_CTRL_REG_BASE + 0x18)
 
 #define RTL838X_MODEL_NAME_INFO		(0x00D4)
+#define RTL838X_CHIP_INFO		(0x00D8)
 #define RTL839X_MODEL_NAME_INFO		(0x0FF0)
+#define RTL839X_CHIP_INFO		(0x0FF4)
 #define RTL93XX_MODEL_NAME_INFO		(0x0004)
-#define RTL931X_CHIP_INFO_ADDR		(0x0008)
+#define RTL93XX_CHIP_INFO		(0x0008)
 
 #define RTL838X_LED_GLB_CTRL		(0xA000)
 #define RTL839X_LED_GLB_CTRL		(0x00E4)
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
index 311f110589..896e9ab24b 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
@@ -25,8 +25,6 @@
 #define RTL838X_SDS_MODE_SEL			(0x0028)
 #define RTL838X_SDS_CFG_REG			(0x0034)
 #define RTL838X_INT_MODE_CTRL			(0x005c)
-#define RTL838X_CHIP_INFO			(0x00d8)
-#define RTL839X_CHIP_INFO			(0x0ff4)
 #define RTL838X_PORT_ISO_CTRL(port)		(0x4100 + ((port) << 2))
 #define RTL839X_PORT_ISO_CTRL(port)		(0x1400 + ((port) << 3))
 
diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
index ef79eec5bf..c28a94ed9f 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
@@ -94,7 +94,6 @@
 #define RTL838X_SDS_MODE_SEL			(0x0028)
 #define RTL838X_SDS_CFG_REG			(0x0034)
 #define RTL838X_INT_MODE_CTRL			(0x005c)
-#define RTL838X_CHIP_INFO			(0x00d8)
 #define RTL838X_SDS4_REG28			(0xef80)
 #define RTL838X_SDS4_DUMMY0			(0xef8c)
 #define RTL838X_SDS5_EXT_REG6			(0xf18c)
diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index 82e81e1519..98066bf233 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -3461,8 +3461,8 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 			rtl931x_write_sds_phy(asds, 0x2E, 0x1, board_sds_tx_type1[sds - 2]);
 		else {
 			val = 0xa0000;
-			sw_w32(val, RTL931X_CHIP_INFO_ADDR);
-			val = sw_r32(RTL931X_CHIP_INFO_ADDR);
+			sw_w32(val, RTL93XX_CHIP_INFO);
+			val = sw_r32(RTL93XX_CHIP_INFO);
 			if (val & BIT(28)) /* consider 9311 etc. RTL9313_CHIP_ID == HWP_CHIP_ID(unit)) */
 			{
 				rtl931x_write_sds_phy(asds, 0x2E, 0x1, board_sds_tx2[sds - 2]);
@@ -3470,7 +3470,7 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 				rtl931x_write_sds_phy(asds, 0x2E, 0x1, board_sds_tx[sds - 2]);
 			}
 			val = 0;
-			sw_w32(val, RTL931X_CHIP_INFO_ADDR);
+			sw_w32(val, RTL93XX_CHIP_INFO);
 		}
 	}
 



From lede-commits at lists.infradead.org  Wed Aug  6 04:41:59 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 07:41:59 -0400
Subject: [openwrt/openwrt]  realtek: extend SoC information
In-Reply-To: <175448051792.236807.18275633594008808310@git-01.infra.openwrt.org>
References: <175448051792.236807.18275633594008808310@git-01.infra.openwrt.org>
Message-ID: <mailman.112794.1754480521.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2a9f0db76fdfbb9b167b6afc8c22d59bc2fecca7

commit 2a9f0db76fdfbb9b167b6afc8c22d59bc2fecca7
Author: Jan Hoffmann <jan at 3e8.eu>
AuthorDate: Sat Aug 2 20:31:39 2025 +0200

    realtek: extend SoC information
    
    Add SoC revision, CPU part number, and a flag for engineering samples to
    the rtl83xx_soc_info structure.
    
    Also extend the system type string to include this information.
    
    Signed-off-by: Jan Hoffmann <jan at 3e8.eu>
    Link: https://github.com/openwrt/openwrt/pull/19653
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../mips/include/asm/mach-rtl838x/mach-rtl83xx.h   |  5 ++
 .../realtek/files-6.12/arch/mips/rtl838x/prom.c    | 74 +++++++++++++++++++++-
 2 files changed, 77 insertions(+), 2 deletions(-)

diff --git a/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h b/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
index e611b7aebc..263f246275 100644
--- a/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
+++ b/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
@@ -7,6 +7,8 @@
 #define _MACH_RTL838X_H_
 
 #include <asm/types.h>
+#include <linux/types.h>
+
 /*
  * Register access macros
  */
@@ -393,6 +395,9 @@ struct rtl83xx_soc_info {
 	unsigned char *name;
 	unsigned int id;
 	unsigned int family;
+	unsigned int revision;
+	unsigned int cpu;
+	bool testchip;
 	unsigned char *compatible;
 	volatile void *sw_base;
 	volatile void *icu_base;
diff --git a/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c b/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c
index 32e7a064fe..fe2d86883d 100644
--- a/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c
+++ b/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c
@@ -21,7 +21,7 @@ struct rtl83xx_soc_info soc_info;
 const void *fdt;
 
 static char soc_name[16];
-static char rtl83xx_system_type[32];
+static char rtl83xx_system_type[48];
 
 #ifdef CONFIG_MIPS_MT_SMP
 
@@ -102,6 +102,62 @@ const char *get_system_type(void)
 	return rtl83xx_system_type;
 }
 
+static void __init rtl838x_read_details(uint32_t model)
+{
+	uint32_t chip_info, ext_version, tmp;
+
+	sw_w32(0x3, RTL838X_INT_RW_CTRL);
+	sw_w32(0xa << 28, RTL838X_CHIP_INFO);
+
+	chip_info = sw_r32(RTL838X_CHIP_INFO);
+	soc_info.cpu = chip_info & 0xffff;
+
+	ext_version = sw_r32(RTL838X_EXT_VERSION);
+	tmp = ext_version & 0x1f;
+
+	if (tmp == 2) {
+		soc_info.revision = 1;
+	} else {
+		tmp = (chip_info >> 16) & 0x1f;
+		if (soc_info.cpu == 0x0477) {
+			soc_info.revision = tmp;
+			soc_info.testchip = true;
+		} else {
+			soc_info.revision = tmp - 1;
+		}
+	}
+}
+
+static void __init rtl839x_read_details(uint32_t model)
+{
+	uint32_t chip_info;
+
+	sw_w32(0xa << 28, RTL839X_CHIP_INFO);
+
+	chip_info = sw_r32(RTL839X_CHIP_INFO);
+	soc_info.cpu = chip_info & 0xffff;
+
+	soc_info.revision = (model >> 1) & 0x1f;
+
+	if (!(model & 0x3e))
+		soc_info.testchip = true;
+}
+
+static void __init rtl93xx_read_details(uint32_t model)
+{
+	uint32_t chip_info;
+
+	sw_w32(0xa << 16, RTL93XX_CHIP_INFO);
+
+	chip_info = sw_r32(RTL93XX_CHIP_INFO);
+	soc_info.cpu = chip_info & 0xffff;
+
+	soc_info.revision = model & 0xf;
+
+	if (model & 0x30)
+		soc_info.testchip = true;
+}
+
 static uint32_t __init read_model(void)
 {
 	uint32_t model, id;
@@ -111,6 +167,7 @@ static uint32_t __init read_model(void)
 	if ((id >= 0x8380 && id <= 0x8382) || id == 0x8330 || id == 0x8332) {
 		soc_info.id = id;
 		soc_info.family = RTL8380_FAMILY_ID;
+		rtl838x_read_details(model);
 		return model;
 	}
 
@@ -119,6 +176,7 @@ static uint32_t __init read_model(void)
 	if ((id >= 0x8391 && id <= 0x8396) || (id >= 0x8351 && id <= 0x8353)) {
 		soc_info.id = id;
 		soc_info.family = RTL8390_FAMILY_ID;
+		rtl839x_read_details(model);
 		return model;
 	}
 
@@ -127,10 +185,12 @@ static uint32_t __init read_model(void)
 	if (id >= 0x9301 && id <= 0x9303) {
 		soc_info.id = id;
 		soc_info.family = RTL9300_FAMILY_ID;
+		rtl93xx_read_details(model);
 		return model;
 	} else if (id >= 0x9311 && id <= 0x9313) {
 		soc_info.id = id;
 		soc_info.family = RTL9310_FAMILY_ID;
+		rtl93xx_read_details(model);
 		return model;
 	}
 
@@ -153,8 +213,18 @@ static void __init parse_model(uint32_t model)
 }
 
 static void __init rtl83xx_set_system_type(void) {
+	char revision = '?';
+	char *es = "";
+
+	if (soc_info.revision >= 0 && soc_info.revision < 26)
+		revision = 'A' + soc_info.revision;
+
+	if (soc_info.testchip)
+		es = " ES";
+
 	snprintf(rtl83xx_system_type, sizeof(rtl83xx_system_type),
-		 "Realtek %s", soc_info.name);
+		 "Realtek %s%s rev %c (%04X)",
+		 soc_info.name, es, revision, soc_info.cpu);
 }
 
 void __init prom_init(void)



From lede-commits at lists.infradead.org  Wed Aug  6 04:41:57 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 07:41:57 -0400
Subject: [openwrt/openwrt]  realtek: simplify SoC detection
In-Reply-To: <175448051792.236807.18275633594008808310@git-01.infra.openwrt.org>
References: <175448051792.236807.18275633594008808310@git-01.infra.openwrt.org>
Message-ID: <mailman.112795.1754480523.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d469690b838c2fca627e5b871a73f04775b81851

commit d469690b838c2fca627e5b871a73f04775b81851
Author: Jan Hoffmann <jan at 3e8.eu>
AuthorDate: Sat Aug 2 20:28:50 2025 +0200

    realtek: simplify SoC detection
    
    Read model name from the register instead of using hard-coded values.
    
    Also remove detection of the unsupported Realtek ESW/SSW SoCs. The Fast
    Ethernet variants of the Maple and Cypress series stay for now, but are
    moved to the RTL8380/RTL8390 families.
    
    Signed-off-by: Jan Hoffmann <jan at 3e8.eu>
    Link: https://github.com/openwrt/openwrt/pull/19653
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../mips/include/asm/mach-rtl838x/mach-rtl83xx.h   |   6 +-
 .../realtek/files-6.12/arch/mips/rtl838x/prom.c    | 160 +++++++--------------
 2 files changed, 55 insertions(+), 111 deletions(-)

diff --git a/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h b/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
index 8ea580f3d1..d53414fec7 100644
--- a/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
+++ b/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
@@ -373,12 +373,8 @@
 #define RTL931X_ISR_PORT_LINK_STS_CHG	(0x12B8)
 
 /* Definition of family IDs */
-#define RTL8389_FAMILY_ID   (0x8389)
-#define RTL8328_FAMILY_ID   (0x8328)
-#define RTL8390_FAMILY_ID   (0x8390)
-#define RTL8350_FAMILY_ID   (0x8350)
 #define RTL8380_FAMILY_ID   (0x8380)
-#define RTL8330_FAMILY_ID   (0x8330)
+#define RTL8390_FAMILY_ID   (0x8390)
 #define RTL9300_FAMILY_ID   (0x9300)
 #define RTL9310_FAMILY_ID   (0x9310)
 
diff --git a/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c b/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c
index 68b4e5c144..32e7a064fe 100644
--- a/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c
+++ b/target/linux/realtek/files-6.12/arch/mips/rtl838x/prom.c
@@ -20,6 +20,9 @@
 struct rtl83xx_soc_info soc_info;
 const void *fdt;
 
+static char soc_name[16];
+static char rtl83xx_system_type[32];
+
 #ifdef CONFIG_MIPS_MT_SMP
 
 extern const struct plat_smp_ops vsmp_smp_ops;
@@ -96,125 +99,70 @@ void __init device_tree_init(void)
 
 const char *get_system_type(void)
 {
-	return soc_info.name;
+	return rtl83xx_system_type;
 }
 
-static void __init identify_rtl9302(void)
+static uint32_t __init read_model(void)
 {
-	switch (sw_r32(RTL93XX_MODEL_NAME_INFO) & 0xfffffff0) {
-	case 0x93020810:
-		soc_info.name = "RTL9302A 12x2.5G";
-		break;
-	case 0x93021010:
-		soc_info.name = "RTL9302B 8x2.5G";
-		break;
-	case 0x93021810:
-		soc_info.name = "RTL9302C 16x2.5G";
-		break;
-	case 0x93022010:
-		soc_info.name = "RTL9302D 24x2.5G";
-		break;
-	case 0x93020800:
-		soc_info.name = "RTL9302A";
-		break;
-	case 0x93021000:
-		soc_info.name = "RTL9302B";
-		break;
-	case 0x93021800:
-		soc_info.name = "RTL9302C";
-		break;
-	case 0x93022000:
-		soc_info.name = "RTL9302D";
-		break;
-	case 0x93023001:
-		soc_info.name = "RTL9302F";
-		break;
-	default:
-		soc_info.name = "RTL9302";
-	}
-}
-
-void __init prom_init(void)
-{
-	uint32_t model;
+	uint32_t model, id;
 
 	model = sw_r32(RTL838X_MODEL_NAME_INFO);
-	pr_info("RTL838X model is %x\n", model);
-	model = model >> 16 & 0xFFFF;
-
-	if ((model != 0x8328) && (model != 0x8330) && (model != 0x8332)
-	    && (model != 0x8380) && (model != 0x8382)) {
-		model = sw_r32(RTL839X_MODEL_NAME_INFO);
-		pr_info("RTL839X model is %x\n", model);
-		model = model >> 16 & 0xFFFF;
+	id = model >> 16 & 0xffff;
+	if ((id >= 0x8380 && id <= 0x8382) || id == 0x8330 || id == 0x8332) {
+		soc_info.id = id;
+		soc_info.family = RTL8380_FAMILY_ID;
+		return model;
 	}
 
-	if ((model & 0x8390) != 0x8380 && (model & 0x8390) != 0x8390) {
-		model = sw_r32(RTL93XX_MODEL_NAME_INFO);
-		pr_info("RTL93XX model is %x\n", model);
-		model = model >> 16 & 0xFFFF;
+	model = sw_r32(RTL839X_MODEL_NAME_INFO);
+	id = model >> 16 & 0xffff;
+	if ((id >= 0x8391 && id <= 0x8396) || (id >= 0x8351 && id <= 0x8353)) {
+		soc_info.id = id;
+		soc_info.family = RTL8390_FAMILY_ID;
+		return model;
 	}
 
-	soc_info.id = model;
-
-	switch (model) {
-	case 0x8328:
-		soc_info.name = "RTL8328";
-		soc_info.family = RTL8328_FAMILY_ID;
-		break;
-	case 0x8332:
-		soc_info.name = "RTL8332";
-		soc_info.family = RTL8380_FAMILY_ID;
-		break;
-	case 0x8380:
-		soc_info.name = "RTL8380";
-		soc_info.family = RTL8380_FAMILY_ID;
-		break;
-	case 0x8382:
-		soc_info.name = "RTL8382";
-		soc_info.family = RTL8380_FAMILY_ID;
-		break;
-	case 0x8390:
-		soc_info.name = "RTL8390";
-		soc_info.family = RTL8390_FAMILY_ID;
-		break;
-	case 0x8391:
-		soc_info.name = "RTL8391";
-		soc_info.family = RTL8390_FAMILY_ID;
-		break;
-	case 0x8392:
-		soc_info.name = "RTL8392";
-		soc_info.family = RTL8390_FAMILY_ID;
-		break;
-	case 0x8393:
-		soc_info.name = "RTL8393";
-		soc_info.family = RTL8390_FAMILY_ID;
-		break;
-	case 0x9301:
-		soc_info.name = "RTL9301";
-		soc_info.family = RTL9300_FAMILY_ID;
-		break;
-	case 0x9302:
-		identify_rtl9302();
+	model = sw_r32(RTL93XX_MODEL_NAME_INFO);
+	id = model >> 16 & 0xffff;
+	if (id >= 0x9301 && id <= 0x9303) {
+		soc_info.id = id;
 		soc_info.family = RTL9300_FAMILY_ID;
-		break;
-	case 0x9303:
-		soc_info.name = "RTL9303";
-		soc_info.family = RTL9300_FAMILY_ID;
-		break;
-	case 0x9311:
-		soc_info.name = "RTL9311";
-		soc_info.family = RTL9310_FAMILY_ID;
-		break;
-	case 0x9313:
-		soc_info.name = "RTL9313";
+		return model;
+	} else if (id >= 0x9311 && id <= 0x9313) {
+		soc_info.id = id;
 		soc_info.family = RTL9310_FAMILY_ID;
-		break;
-	default:
-		soc_info.name = "DEFAULT";
-		soc_info.family = 0;
+		return model;
 	}
 
+	return 0;
+}
+
+static void __init parse_model(uint32_t model)
+{
+	int val;
+	char suffix = 0;
+
+	val = (model >> 11) & 0x1f;
+	if (val > 0 && val <= 26)
+		suffix = 'A' + (val - 1);
+
+	snprintf(soc_name, sizeof(soc_name), "RTL%04X%c",
+		 soc_info.id, suffix);
+
+	soc_info.name = soc_name;
+}
+
+static void __init rtl83xx_set_system_type(void) {
+	snprintf(rtl83xx_system_type, sizeof(rtl83xx_system_type),
+		 "Realtek %s", soc_info.name);
+}
+
+void __init prom_init(void)
+{
+	uint32_t model = read_model();
+	parse_model(model);
+	rtl83xx_set_system_type();
+
 	pr_info("SoC Type: %s\n", get_system_type());
 
 	/*



From lede-commits at lists.infradead.org  Wed Aug  6 06:22:56 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 09:22:56 -0400
Subject: [openwrt/openwrt]  realtek: rtl930x: convert Hasivo S1100W to lzma
 only.
In-Reply-To: <175448657628.608562.11040624239107004260@git-01.infra.openwrt.org>
References: <175448657628.608562.11040624239107004260@git-01.infra.openwrt.org>
Message-ID: <mailman.112855.1754486582.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2c501d9db93b780b961caf99c8dc8c6bfdcc7d05

commit 2c501d9db93b780b961caf99c8dc8c6bfdcc7d05
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Mon Aug 4 15:34:23 2025 -0400

    realtek: rtl930x: convert Hasivo S1100W to lzma only.
    
    The current build recipe creates a lzma based initramfs and
    a gzip based sysupgrade (installation) image. No need to
    use different compression methods. Use lzma for both.
    
    Tested-by: Andrew LaMarche <andrewjlamarche at gmail.com>
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19669
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/realtek/image/rtl930x.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/target/linux/realtek/image/rtl930x.mk b/target/linux/realtek/image/rtl930x.mk
index 6f4b4148e8..1887f9a488 100644
--- a/target/linux/realtek/image/rtl930x.mk
+++ b/target/linux/realtek/image/rtl930x.mk
@@ -10,11 +10,7 @@ define Device/hasivo_s1100w-8xgt-se
   DEVICE_VENDOR := Hasivo
   DEVICE_MODEL := S1100W-8XGT-SE
   IMAGE_SIZE := 12288k
-  KERNEL_INITRAMFS := \
-	kernel-bin | \
-	append-dtb | \
-	lzma | \
-	uImage lzma
+  $(Device/kernel-lzma)
 endef
 TARGET_DEVICES += hasivo_s1100w-8xgt-se
 



From lede-commits at lists.infradead.org  Wed Aug  6 14:41:05 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 17:41:05 -0400
Subject: [openwrt/openwrt]  kernel/modules: add MCP342x I2C ADCs kernel module
 support
In-Reply-To: <175451646505.2313108.15598946148843807205@git-01.infra.openwrt.org>
References: <175451646505.2313108.15598946148843807205@git-01.infra.openwrt.org>
Message-ID: <mailman.113280.1754517962.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/77132c2fc1f6a417094497f3c62d6190069c1175

commit 77132c2fc1f6a417094497f3c62d6190069c1175
Author: Ondrej Kolar <ondrej at kolarovo.cz>
AuthorDate: Fri Aug 1 15:12:39 2025 +0200

    kernel/modules: add MCP342x I2C ADCs kernel module support
    
    This commit adds kernel module support for Microchip MCP342x family of I2C ADCs.
    
    Tested on a custom board based on Hi-Link HLK-7628N.
    
    Signed-off-by: Ondrej Kolar <ondrej at kolarovo.cz>
    Link: https://github.com/openwrt/openwrt/pull/19619
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/kernel/linux/modules/iio.mk | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/package/kernel/linux/modules/iio.mk b/package/kernel/linux/modules/iio.mk
index 99fe30b96c..a8327f54d0 100644
--- a/package/kernel/linux/modules/iio.mk
+++ b/package/kernel/linux/modules/iio.mk
@@ -149,6 +149,20 @@ endef
 
 $(eval $(call KernelPackage,iio-ads1015))
 
+define KernelPackage/iio-mcp3422
+  TITLE:=Microchip MCP342x ADC driver
+  KCONFIG:=CONFIG_MCP3422
+  FILES:=$(LINUX_DIR)/drivers/iio/adc/mcp3422.ko
+  AUTOLOAD:=$(call AutoProbe,mcp3422)
+  $(call AddDepends/iio, +kmod-i2c-core)
+endef
+
+define KernelPackage/iio-mcp3422/description
+  Kernel module for the Microchip MCP342x I2C ADCs.
+endef
+
+$(eval $(call KernelPackage,iio-mcp3422))
+
 define KernelPackage/iio-hmc5843
   DEPENDS:=+kmod-i2c-core +kmod-regmap-i2c +kmod-industrialio-triggered-buffer
   TITLE:=Honeywell HMC58x3 Magnetometer



From lede-commits at lists.infradead.org  Wed Aug  6 14:42:49 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 17:42:49 -0400
Subject: [openwrt/openwrt]  lantiq: use nvmem for bthomehub v5a
In-Reply-To: <175451656854.2320310.1584544802713832585@git-01.infra.openwrt.org>
References: <175451656854.2320310.1584544802713832585@git-01.infra.openwrt.org>
Message-ID: <mailman.113281.1754517962.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/03542312f7d8fdd1dd624ae29c8403560da83acb

commit 03542312f7d8fdd1dd624ae29c8403560da83acb
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Mon Dec 16 16:55:55 2024 -0800

    lantiq: use nvmem for bthomehub v5a
    
    Userspace handling of both calibration and mac addresses is deprecated.
    
    Also fixed calibration size for ath9k. AR9287 uses 3d8 for its size.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/17289
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../files/arch/mips/boot/dts/lantiq/vr9.dtsi       |  2 +-
 .../mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts    | 62 +++++++++++++++++++++-
 .../xrx200/base-files/etc/board.d/02_network       |  3 +-
 .../etc/hotplug.d/firmware/11-ath10k-caldata       | 20 -------
 .../etc/hotplug.d/firmware/12-ath9k-eeprom         |  4 --
 target/linux/lantiq/xrx200/config-6.12             |  1 +
 6 files changed, 63 insertions(+), 29 deletions(-)

diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi
index e0e49f377a..10fb8d4934 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9.dtsi
@@ -509,7 +509,7 @@
 			interrupts = <63>;
 		};
 
-		ppe at e234000 {
+		ppe: ppe at e234000 {
 			compatible = "lantiq,ppe-xrx200";
 			reg = <0xe234000 0x3ffd>;
 			interrupt-parent = <&icu0>;
diff --git a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts
index cb6cb74af8..994b508323 100644
--- a/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts
+++ b/target/linux/lantiq/files/arch/mips/boot/dts/lantiq/vr9_bt_homehub-v5a.dts
@@ -151,6 +151,11 @@
 	};
 };
 
+&eth0 {
+	nvmem-cells = <&macaddr_caldata_110c 0>;
+	nvmem-cell-names = "mac-address";
+};
+
 &gswip {
 	pinctrl-0 = <&mdio_pins>;
 	pinctrl-names = "default";
@@ -210,9 +215,17 @@
 		tx-internal-delay-ps = <1500>;
 		rx-internal-delay-ps = <1500>;
 		phy-handle = <&phy5>;
+
+		nvmem-cells = <&macaddr_caldata_110c 4>;
+		nvmem-cell-names = "mac-address";
 	};
 };
 
+&ppe {
+	nvmem-cells = <&macaddr_caldata_110c 5>;
+	nvmem-cell-names = "mac-address";
+};
+
 &localbus {
 	flash at 1 {
 		compatible = "lantiq,nand-xway";
@@ -248,8 +261,35 @@
 				reg = <0xc0000 0x40000>;
 			};
 			partition at 100000 {
+				compatible = "linux,ubi";
 				label = "ubi";
 				reg = <0x100000 0x7e80000>;
+
+				volumes {
+					ubi-volume-caldata {
+						volname = "caldata";
+
+						nvmem-layout {
+							compatible = "fixed-layout";
+							#address-cells = <1>;
+							#size-cells = <1>;
+
+							cal_caldata_1000: calibration at 1000 {
+								reg = <0x1000 0x3d8>;
+							};
+
+							macaddr_caldata_110c: macaddr at 110c {
+								compatible = "mac-base";
+								reg = <0x110c 0x6>;
+								#nvmem-cell-cells = <1>;
+							};
+
+							cal_caldata_5000: calibration at 5000 {
+								reg = <0x5000 0x844>;
+							};
+						};
+					};
+				};
 			};
 			/*
 			 * last 512 KiB are for the bad block table, not writable
@@ -262,14 +302,32 @@
 	status = "okay";
 	reset-gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
 
-	wifi at 168c,002d {
+	wifi at 0,0 {
 		compatible = "pci168c,002d";
 		reg = <0x7000 0 0 0 0>;
-		qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:00:0e.0.bin */
+		nvmem-cells = <&cal_caldata_1000>, <&macaddr_caldata_110c 2>;
+		nvmem-cell-names = "calibration", "mac-address";
 		ieee80211-freq-limit = <2402000 2482000>;
 	};
 };
 
+&pcie0 {
+	pcie at 0 {
+		reg = <0x0000 0 0 0 0>;
+		#interrupt-cells = <1>;
+		#size-cells = <2>;
+		#address-cells = <3>;
+		device_type = "pci";
+
+		wifi at 0,0 {
+			compatible = "qcom,ath10k";
+			reg = <0x0000 0 0 0 0>;
+			nvmem-cells = <&cal_caldata_5000>, <&macaddr_caldata_110c 3>;
+			nvmem-cell-names = "calibration", "mac-address";
+		};
+	};
+};
+
 &usb_phy0 {
 	status = "okay";
 };
diff --git a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network
index bf90757897..ca40c9cbd6 100644
--- a/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network
+++ b/target/linux/lantiq/xrx200/base-files/etc/board.d/02_network
@@ -128,8 +128,7 @@ lantiq_setup_macs()
 		label_mac=$lan_mac
 		;;
 	bt,homehub-v5a)
-		lan_mac=$(mtd_get_mac_binary_ubi caldata 0x110c)
-		wan_mac=$(macaddr_add "$lan_mac" 1)
+		wan_mac=$(macaddr_add "$(mtd_get_mac_binary_ubi caldata 0x110c)" 5)
 		;;
 	buffalo,wbmr-300hpd)
 		lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
diff --git a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
deleted file mode 100644
index c555aa2c12..0000000000
--- a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/11-ath10k-caldata
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-
-[ -e /lib/firmware/$FIRMWARE ] && exit 0
-
-. /lib/functions/caldata.sh
-
-case "$FIRMWARE" in
-"ath10k/cal-pci-0000:02:00.0.bin")
-	board=$(board_name)
-	case $board in
-		bt,homehub-v5a)
-			caldata_extract_ubi "caldata" 0x5000 0x844
-			ath10k_patch_mac $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) 3)
-			;;
-		*)
-			caldata_die "board $board is not supported yet"
-			;;
-	esac
-	;;
-esac
diff --git a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
index cb3fef9168..a3968b2303 100644
--- a/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
+++ b/target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom
@@ -27,10 +27,6 @@ case "$FIRMWARE" in
 				/usr/bin/fritz_cal_extract -r -i 4 -s 0x1e000 -e 0x207 -l 5120 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader") || \
 				/usr/bin/fritz_cal_extract -r -i 4 -s 0x1e800 -e 0x207 -l 5120 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader")
 				;;
-			bt,homehub-v5a)
-				caldata_extract_ubi "caldata" 0x1000 0x1000
-				ath9k_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary_ubi caldata 0x110c) 2) 0x10c
-				;;
 			*)
 				caldata_die "board $board is not supported yet"
 				;;
diff --git a/target/linux/lantiq/xrx200/config-6.12 b/target/linux/lantiq/xrx200/config-6.12
index ab46229c0e..ad8a4544ce 100644
--- a/target/linux/lantiq/xrx200/config-6.12
+++ b/target/linux/lantiq/xrx200/config-6.12
@@ -44,6 +44,7 @@ CONFIG_MTD_RAW_NAND=y
 CONFIG_MTD_UBI=y
 CONFIG_MTD_UBI_BEB_LIMIT=20
 CONFIG_MTD_UBI_BLOCK=y
+CONFIG_MTD_UBI_NVMEM=y
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_NEED_SRCU_NMI_SAFE=y
 CONFIG_NET_DEVLINK=y



From lede-commits at lists.infradead.org  Wed Aug  6 14:42:48 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 06 Aug 2025 17:42:48 -0400
Subject: [openwrt/openwrt]  ltq-ptm: add NVMEM MAC support
In-Reply-To: <175451656854.2320310.1584544802713832585@git-01.infra.openwrt.org>
References: <175451656854.2320310.1584544802713832585@git-01.infra.openwrt.org>
Message-ID: <mailman.113282.1754517962.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fcc48204d2ea1e555e72d2cc6d22b59b1ec0e618

commit fcc48204d2ea1e555e72d2cc6d22b59b1ec0e618
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sun Feb 9 16:52:51 2025 -0800

    ltq-ptm: add NVMEM MAC support
    
    This will be used in the following commit to move MAC assignment of the
    DSL interface to NVMEM.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/17289
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/kernel/lantiq/ltq-ptm/Makefile             |  2 +-
 .../kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c   | 32 +++++++++++++++-------
 2 files changed, 23 insertions(+), 11 deletions(-)

diff --git a/package/kernel/lantiq/ltq-ptm/Makefile b/package/kernel/lantiq/ltq-ptm/Makefile
index c3ab47c1b3..f4d5f766c7 100644
--- a/package/kernel/lantiq/ltq-ptm/Makefile
+++ b/package/kernel/lantiq/ltq-ptm/Makefile
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ltq-ptm
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_MAINTAINER:=John Crispin <john at phrozen.org>
 PKG_LICENSE:=GPL-2.0+
diff --git a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
index 65c9833a0a..f580105505 100644
--- a/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
+++ b/package/kernel/lantiq/ltq-ptm/src/ifxmips_ptm_vdsl.c
@@ -35,6 +35,7 @@
 #include <linux/netdevice.h>
 #include <linux/platform_device.h>
 #include <linux/of_device.h>
+#include <linux/of_net.h>
 
 #include "ifxmips_ptm_vdsl.h"
 #include <lantiq_soc.h>
@@ -69,7 +70,7 @@ unsigned long cgu_get_pp32_clock(void)
 	return rate;
 }
 
-static void ptm_setup(struct net_device *, int);
+static int ptm_setup(struct device_node* np, struct net_device *, int);
 static struct net_device_stats *ptm_get_stats(struct net_device *);
 static int ptm_open(struct net_device *);
 static int ptm_stop(struct net_device *);
@@ -144,9 +145,10 @@ unsigned int ifx_ptm_dbg_enable = DBG_ENABLE_MASK_ERR;
  * ####################################
  */
 
-static void ptm_setup(struct net_device *dev, int ndev)
+static int ptm_setup(struct device_node *np, struct net_device *dev, int ndev)
 {
     u8 addr[ETH_ALEN];
+    int err;
 
     netif_carrier_off(dev);
 
@@ -160,13 +162,20 @@ static void ptm_setup(struct net_device *dev, int ndev)
 #endif
     dev->watchdog_timeo  = ETH_WATCHDOG_TIMEOUT;
 
-    addr[0] = 0x00;
-    addr[1] = 0x20;
-    addr[2] = 0xda;
-    addr[3] = 0x86;
-    addr[4] = 0x23;
-    addr[5] = 0x75 + ndev;
-    eth_hw_addr_set(dev, addr);
+    err = of_get_ethdev_address(np, dev);
+    if (err == -EPROBE_DEFER)
+        return err;
+    if (err) {
+        addr[0] = 0x00;
+        addr[1] = 0x20;
+        addr[2] = 0xda;
+        addr[3] = 0x86;
+        addr[4] = 0x23;
+        addr[5] = 0x75 + ndev;
+        eth_hw_addr_set(dev, addr);
+    }
+
+    return 0;
 }
 
 static struct net_device_stats *ptm_get_stats(struct net_device *dev)
@@ -986,6 +995,7 @@ static int ltq_ptm_probe(struct platform_device *pdev)
     int i;
     char ver_str[256];
     struct port_cell_info port_cell = {0};
+    struct device_node *np = pdev->dev.of_node;
 
     ret = init_priv_data();
     if ( ret != 0 ) {
@@ -1006,7 +1016,9 @@ static int ltq_ptm_probe(struct platform_device *pdev)
         g_net_dev[i] = alloc_netdev(0, g_net_dev_name[i], NET_NAME_UNKNOWN, ether_setup);
         if ( g_net_dev[i] == NULL )
             goto ALLOC_NETDEV_FAIL;
-        ptm_setup(g_net_dev[i], i);
+        ret = ptm_setup(np, g_net_dev[i], i);
+        if (ret == -EPROBE_DEFER)
+            goto INIT_TABLES_FAIL;
     }
 
     for ( i = 0; i < ARRAY_SIZE(g_net_dev); i++ ) {



From lede-commits at lists.infradead.org  Thu Aug  7 04:39:45 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 07:39:45 -0400
Subject: [openwrt/openwrt]  lantiq: replace patches with upstream version
In-Reply-To: <175456678578.960762.15626348347633145135@git-01.infra.openwrt.org>
References: <175456678578.960762.15626348347633145135@git-01.infra.openwrt.org>
Message-ID: <mailman.113600.1754566908.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a0e3998b489c1767d2a4423f374f2a15d8f1fd27

commit a0e3998b489c1767d2a4423f374f2a15d8f1fd27
Author: Aleksander Jan Bajkowski <olek2 at wp.pl>
AuthorDate: Mon Aug 4 15:35:47 2025 +0200

    lantiq: replace patches with upstream version
    
    Patches 12 and 13 have been superseded by patch 12. Other patches
    have no significant changes.
    
    Signed-off-by: Aleksander Jan Bajkowski <olek2 at wp.pl>
    Link: https://github.com/openwrt/openwrt/pull/19675
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...MIPS-lantiq-xway-mark-dma_init-as-static.patch} |  7 +--
 ...-pci-lantiq-marks-pcibios_init-as-static.patch} |  7 +--
 ...IPS-lantiq-xway-mark-dcdc_init-as-static.patch} |  7 +--
 ...irq-fix-misc-missing-prototypes-warnings.patch} |  7 +--
 ...antiq-xway-mark-ltq_ar9_sys_hz-as-static.patch} |  7 +--
 ...antiq-xway-gptu-mark-gptu_init-as-static.patch} |  7 +--
 ...-xway-add-prototype-for-ltq_get_cp1_base.patch} |  7 +--
 ...falcon-fix-misc-missing-prototypes-warni.patch} |  7 +--
 ...falcon-sysctrl-remove-unused-falcon_trig.patch} |  7 +--
 ...falcon-sysctrl-add-missing-header-prom.h.patch} |  7 +--
 ...falcon-sysctrl-fix-request-memory-check-.patch} |  7 +--
 ...e-mt-mark-vpe_free-and-vpe_stop-as-static.patch | 52 -------------------
 ...-add-missing-prototypes-for-vpe_-alloc-st.patch | 44 ++++++++++++++++
 ...-drop-unused-functions-vpe_alloc-and-vpe_.patch | 59 ----------------------
 ...way-mark-xway_pinconf_group_set-as-static.patch | 34 -------------
 ...nctrl-xway-statify-xway_pinconf_group_set.patch | 31 ++++++++++++
 ...alcon-mark-pinctrl_falcon_init-as-static.patch} |  8 +--
 ...falcon-mark-falcon_sflash_xfer-as-static.patch} |  8 +--
 .../linux/lantiq/patches-6.12/152-lantiq-VPE.patch | 16 +++---
 19 files changed, 137 insertions(+), 192 deletions(-)

diff --git a/target/linux/lantiq/patches-6.12/102-02-MIPS-lantiq-xway-mark-dma_init-as-static.patch b/target/linux/lantiq/patches-6.12/102-01-v6.17-MIPS-lantiq-xway-mark-dma_init-as-static.patch
similarity index 73%
rename from target/linux/lantiq/patches-6.12/102-02-MIPS-lantiq-xway-mark-dma_init-as-static.patch
rename to target/linux/lantiq/patches-6.12/102-01-v6.17-MIPS-lantiq-xway-mark-dma_init-as-static.patch
index 0f8b7ef32e..e06eff24d1 100644
--- a/target/linux/lantiq/patches-6.12/102-02-MIPS-lantiq-xway-mark-dma_init-as-static.patch
+++ b/target/linux/lantiq/patches-6.12/102-01-v6.17-MIPS-lantiq-xway-mark-dma_init-as-static.patch
@@ -1,7 +1,7 @@
-From ada0c7fd1b2e6daaf64bf8649cc58afaceed1a3d Mon Sep 17 00:00:00 2001
+From cff836f0bb0c53fcf43c12e32ee499cdf7e4a584 Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Thu, 8 May 2025 18:11:41 +0800
-Subject: [PATCH 02/16] MIPS: lantiq: xway: mark dma_init() as static
+Date: Wed, 18 Jun 2025 22:53:15 +0800
+Subject: [PATCH 01/11] MIPS: lantiq: xway: mark dma_init() as static
 
 Fix the following missing-prototypes build warning:
 
@@ -10,6 +10,7 @@ arch/mips/lantiq/xway/dma.c:293:1: error: no previous prototype for 'dma_init' [
       | ^~~~~~~~
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
 ---
  arch/mips/lantiq/xway/dma.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/linux/lantiq/patches-6.12/102-06-MIPS-pci-lantiq-marks-pcibios_init-as-static.patch b/target/linux/lantiq/patches-6.12/102-02-v6.17-0002-MIPS-pci-lantiq-marks-pcibios_init-as-static.patch
similarity index 75%
rename from target/linux/lantiq/patches-6.12/102-06-MIPS-pci-lantiq-marks-pcibios_init-as-static.patch
rename to target/linux/lantiq/patches-6.12/102-02-v6.17-0002-MIPS-pci-lantiq-marks-pcibios_init-as-static.patch
index 575b8aba68..b9cefb88fd 100644
--- a/target/linux/lantiq/patches-6.12/102-06-MIPS-pci-lantiq-marks-pcibios_init-as-static.patch
+++ b/target/linux/lantiq/patches-6.12/102-02-v6.17-0002-MIPS-pci-lantiq-marks-pcibios_init-as-static.patch
@@ -1,7 +1,7 @@
-From 156977363d9ed39d80062044704932d8c11d1611 Mon Sep 17 00:00:00 2001
+From 50162a0c6e014c4954ee4443109b7a4251b377fc Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Thu, 8 May 2025 20:31:33 +0800
-Subject: [PATCH 06/16] MIPS: pci: lantiq: marks pcibios_init() as static
+Date: Wed, 18 Jun 2025 22:53:19 +0800
+Subject: [PATCH 02/11] MIPS: pci: lantiq: marks pcibios_init() as static
 
 Fix the following missing-prototypes build warning:
 
@@ -10,6 +10,7 @@ arch/mips/pci/pci-lantiq.c:239:12: error: no previous prototype for 'pcibios_ini
       |            ^~~~~~~~~~~~
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
 ---
  arch/mips/pci/pci-lantiq.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/linux/lantiq/patches-6.12/102-03-MIPS-lantiq-xway-mark-dcdc_init-as-static.patch b/target/linux/lantiq/patches-6.12/102-03-v6.17-MIPS-lantiq-xway-mark-dcdc_init-as-static.patch
similarity index 74%
rename from target/linux/lantiq/patches-6.12/102-03-MIPS-lantiq-xway-mark-dcdc_init-as-static.patch
rename to target/linux/lantiq/patches-6.12/102-03-v6.17-MIPS-lantiq-xway-mark-dcdc_init-as-static.patch
index 762d19145e..d25e099088 100644
--- a/target/linux/lantiq/patches-6.12/102-03-MIPS-lantiq-xway-mark-dcdc_init-as-static.patch
+++ b/target/linux/lantiq/patches-6.12/102-03-v6.17-MIPS-lantiq-xway-mark-dcdc_init-as-static.patch
@@ -1,7 +1,7 @@
-From d27f9ab0f53886152b717e44eeca0217519ad323 Mon Sep 17 00:00:00 2001
+From c714186debb45fc88098b666d46cb29ff728e06d Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Thu, 8 May 2025 18:18:26 +0800
-Subject: [PATCH 03/16] MIPS: lantiq: xway: mark dcdc_init() as static
+Date: Wed, 18 Jun 2025 22:53:16 +0800
+Subject: [PATCH 03/11] MIPS: lantiq: xway: mark dcdc_init() as static
 
 Fix the following missing-prototypes build warning:
 
@@ -10,6 +10,7 @@ arch/mips/lantiq/xway/dcdc.c:49:12: error: no previous prototype for 'dcdc_init'
       |            ^~~~~~~~~
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
 ---
  arch/mips/lantiq/xway/dcdc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/linux/lantiq/patches-6.12/102-04-MIPS-lantiq-irq-fix-misc-missing-prototypes-warnings.patch b/target/linux/lantiq/patches-6.12/102-04-v6.17-MIPS-lantiq-irq-fix-misc-missing-prototypes-warnings.patch
similarity index 85%
rename from target/linux/lantiq/patches-6.12/102-04-MIPS-lantiq-irq-fix-misc-missing-prototypes-warnings.patch
rename to target/linux/lantiq/patches-6.12/102-04-v6.17-MIPS-lantiq-irq-fix-misc-missing-prototypes-warnings.patch
index ba5d7680ed..2c282d28e2 100644
--- a/target/linux/lantiq/patches-6.12/102-04-MIPS-lantiq-irq-fix-misc-missing-prototypes-warnings.patch
+++ b/target/linux/lantiq/patches-6.12/102-04-v6.17-MIPS-lantiq-irq-fix-misc-missing-prototypes-warnings.patch
@@ -1,7 +1,7 @@
-From 9729233d2ef318cdb6954c8b5cb032d7d0f03473 Mon Sep 17 00:00:00 2001
+From d97394bf381eda85d04bec68b72dbc397744fcc3 Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Thu, 8 May 2025 19:53:12 +0800
-Subject: [PATCH 04/16] MIPS: lantiq: irq: fix misc missing-prototypes warnings
+Date: Wed, 18 Jun 2025 22:53:17 +0800
+Subject: [PATCH 04/11] MIPS: lantiq: irq: fix misc missing-prototypes warnings
 
 Fix the following build warnings:
 
@@ -16,6 +16,7 @@ arch/mips/lantiq/irq.c:424:14: error: no previous prototype for 'get_c0_compare_
       |              ^~~~~~~~~~~~~~~~~~
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
 ---
  arch/mips/lantiq/irq.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/target/linux/lantiq/patches-6.12/102-01-MIPS-lantiq-xway-mark-ltq_ar9_sys_hz-as-static.patch b/target/linux/lantiq/patches-6.12/102-05-v6.17-MIPS-lantiq-xway-mark-ltq_ar9_sys_hz-as-static.patch
similarity index 76%
rename from target/linux/lantiq/patches-6.12/102-01-MIPS-lantiq-xway-mark-ltq_ar9_sys_hz-as-static.patch
rename to target/linux/lantiq/patches-6.12/102-05-v6.17-MIPS-lantiq-xway-mark-ltq_ar9_sys_hz-as-static.patch
index 6454bf85c0..47e0a046de 100644
--- a/target/linux/lantiq/patches-6.12/102-01-MIPS-lantiq-xway-mark-ltq_ar9_sys_hz-as-static.patch
+++ b/target/linux/lantiq/patches-6.12/102-05-v6.17-MIPS-lantiq-xway-mark-ltq_ar9_sys_hz-as-static.patch
@@ -1,7 +1,7 @@
-From 3004522ddba0a23941222d2044badd4436ce776f Mon Sep 17 00:00:00 2001
+From de521c6d99d755bbdfa0f1f35299a3e2b02b0dfe Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Thu, 8 May 2025 18:08:35 +0800
-Subject: [PATCH 01/16] MIPS: lantiq: xway: mark ltq_ar9_sys_hz() as static
+Date: Wed, 18 Jun 2025 22:53:14 +0800
+Subject: [PATCH 05/11] MIPS: lantiq: xway: mark ltq_ar9_sys_hz() as static
 
 Fix the following missing-prototypes warning:
 
@@ -10,6 +10,7 @@ arch/mips/lantiq/xway/clk.c:77:15: error: no previous prototype for 'ltq_ar9_sys
       |               ^~~~~~~~~~~~~~
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
 ---
  arch/mips/lantiq/xway/clk.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/linux/lantiq/patches-6.12/102-11-MIPS-lantiq-xway-gptu-mark-gptu_init-as-static.patch b/target/linux/lantiq/patches-6.12/102-06-v6.17-MIPS-lantiq-xway-gptu-mark-gptu_init-as-static.patch
similarity index 75%
rename from target/linux/lantiq/patches-6.12/102-11-MIPS-lantiq-xway-gptu-mark-gptu_init-as-static.patch
rename to target/linux/lantiq/patches-6.12/102-06-v6.17-MIPS-lantiq-xway-gptu-mark-gptu_init-as-static.patch
index d857978515..d6925e5558 100644
--- a/target/linux/lantiq/patches-6.12/102-11-MIPS-lantiq-xway-gptu-mark-gptu_init-as-static.patch
+++ b/target/linux/lantiq/patches-6.12/102-06-v6.17-MIPS-lantiq-xway-gptu-mark-gptu_init-as-static.patch
@@ -1,7 +1,7 @@
-From 2caf57c67c6c3228b7a2ff1510e7671539ad31d3 Mon Sep 17 00:00:00 2001
+From e23bd7f95a86c4fc5da5499a3bdc95aa7518f7eb Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Fri, 9 May 2025 22:29:34 +0800
-Subject: [PATCH 11/16] MIPS: lantiq: xway: gptu: mark gptu_init() as static
+Date: Wed, 18 Jun 2025 22:53:24 +0800
+Subject: [PATCH 06/11] MIPS: lantiq: xway: gptu: mark gptu_init() as static
 
 Fix the following missing-prototypes warning:
 
@@ -10,6 +10,7 @@ arch/mips/lantiq/xway/gptu.c:197:12: error: no previous prototype for 'gptu_init
       |            ^~~~~~~~~
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
 ---
  arch/mips/lantiq/xway/gptu.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/linux/lantiq/patches-6.12/102-05-MIPS-lantiq-xway-add-prototype-for-ltq_get_cp1_base.patch b/target/linux/lantiq/patches-6.12/102-07-v6.17-MIPS-lantiq-xway-add-prototype-for-ltq_get_cp1_base.patch
similarity index 80%
rename from target/linux/lantiq/patches-6.12/102-05-MIPS-lantiq-xway-add-prototype-for-ltq_get_cp1_base.patch
rename to target/linux/lantiq/patches-6.12/102-07-v6.17-MIPS-lantiq-xway-add-prototype-for-ltq_get_cp1_base.patch
index b5431ee7b4..cf75dbb731 100644
--- a/target/linux/lantiq/patches-6.12/102-05-MIPS-lantiq-xway-add-prototype-for-ltq_get_cp1_base.patch
+++ b/target/linux/lantiq/patches-6.12/102-07-v6.17-MIPS-lantiq-xway-add-prototype-for-ltq_get_cp1_base.patch
@@ -1,7 +1,7 @@
-From 5759385fb2b1fafcb0073add3cf4dc7a918ac7f2 Mon Sep 17 00:00:00 2001
+From 3f8565be1e848de86c1cc98285ac27a4a9bcb161 Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Thu, 8 May 2025 20:19:15 +0800
-Subject: [PATCH 05/16] MIPS: lantiq: xway: add prototype for
+Date: Wed, 18 Jun 2025 22:53:18 +0800
+Subject: [PATCH 07/11] MIPS: lantiq: xway: add prototype for
  ltq_get_cp1_base()
 
 ltq_get_cp1_base() is an exported function, we must define
@@ -12,6 +12,7 @@ arch/mips/lantiq/xway/vmmc.c:22:15: error: no previous prototype for 'ltq_get_cp
       |               ^~~~~~~~~~~~~~~~
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
 ---
  arch/mips/include/asm/mach-lantiq/xway/lantiq_soc.h | 3 +++
  1 file changed, 3 insertions(+)
diff --git a/target/linux/lantiq/patches-6.12/102-07-MIPS-lantiq-falcon-fix-misc-missing-prototypes-warni.patch b/target/linux/lantiq/patches-6.12/102-08-v6.17-MIPS-lantiq-falcon-fix-misc-missing-prototypes-warni.patch
similarity index 83%
rename from target/linux/lantiq/patches-6.12/102-07-MIPS-lantiq-falcon-fix-misc-missing-prototypes-warni.patch
rename to target/linux/lantiq/patches-6.12/102-08-v6.17-MIPS-lantiq-falcon-fix-misc-missing-prototypes-warni.patch
index 50705d3d6e..0ef02dff57 100644
--- a/target/linux/lantiq/patches-6.12/102-07-MIPS-lantiq-falcon-fix-misc-missing-prototypes-warni.patch
+++ b/target/linux/lantiq/patches-6.12/102-08-v6.17-MIPS-lantiq-falcon-fix-misc-missing-prototypes-warni.patch
@@ -1,7 +1,7 @@
-From 6900665e987f7c76dff709d63be4df4171c02ab2 Mon Sep 17 00:00:00 2001
+From d97930fbf2d2aa00e7da9be7f128754920486953 Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Fri, 9 May 2025 20:15:36 +0800
-Subject: [PATCH 07/16] MIPS: lantiq: falcon: fix misc missing-prototypes
+Date: Wed, 18 Jun 2025 22:53:20 +0800
+Subject: [PATCH 08/11] MIPS: lantiq: falcon: fix misc missing-prototypes
  warnings
 
 Fix the following build warnings:
@@ -14,6 +14,7 @@ arch/mips/lantiq/falcon/prom.c:46:13: error: no previous prototype for 'ltq_soc_
       |             ^~~~~~~~~~~~~~~~~~~
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
 ---
  arch/mips/lantiq/falcon/prom.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/target/linux/lantiq/patches-6.12/102-08-MIPS-lantiq-falcon-sysctrl-remove-unused-falcon_trig.patch b/target/linux/lantiq/patches-6.12/102-09-v6.17-MIPS-lantiq-falcon-sysctrl-remove-unused-falcon_trig.patch
similarity index 79%
rename from target/linux/lantiq/patches-6.12/102-08-MIPS-lantiq-falcon-sysctrl-remove-unused-falcon_trig.patch
rename to target/linux/lantiq/patches-6.12/102-09-v6.17-MIPS-lantiq-falcon-sysctrl-remove-unused-falcon_trig.patch
index ddf3ef8a46..abe3580513 100644
--- a/target/linux/lantiq/patches-6.12/102-08-MIPS-lantiq-falcon-sysctrl-remove-unused-falcon_trig.patch
+++ b/target/linux/lantiq/patches-6.12/102-09-v6.17-MIPS-lantiq-falcon-sysctrl-remove-unused-falcon_trig.patch
@@ -1,7 +1,7 @@
-From b145074ce653a895201bf8a2ba70719a107ad580 Mon Sep 17 00:00:00 2001
+From 01432b513638b0ffb080aa211b5b7f7ecf316f24 Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Fri, 9 May 2025 20:15:36 +0800
-Subject: [PATCH 08/16] MIPS: lantiq: falcon: sysctrl: remove unused
+Date: Wed, 18 Jun 2025 22:53:21 +0800
+Subject: [PATCH 09/11] MIPS: lantiq: falcon: sysctrl: remove unused
  falcon_trigger_hrst()
 
 This is a defined but unused function. Fix warning:
@@ -11,6 +11,7 @@ arch/mips/lantiq/falcon/sysctrl.c:75:6: error: no previous prototype for 'falcon
       |      ^~~~~~~~~~~~~~~~~~~
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
 ---
  arch/mips/lantiq/falcon/sysctrl.c | 5 -----
  1 file changed, 5 deletions(-)
diff --git a/target/linux/lantiq/patches-6.12/102-09-MIPS-lantiq-falcon-sysctrl-add-missing-header-prom.h.patch b/target/linux/lantiq/patches-6.12/102-10-v6.17-MIPS-lantiq-falcon-sysctrl-add-missing-header-prom.h.patch
similarity index 75%
rename from target/linux/lantiq/patches-6.12/102-09-MIPS-lantiq-falcon-sysctrl-add-missing-header-prom.h.patch
rename to target/linux/lantiq/patches-6.12/102-10-v6.17-MIPS-lantiq-falcon-sysctrl-add-missing-header-prom.h.patch
index b0f1934cad..5b137a25ac 100644
--- a/target/linux/lantiq/patches-6.12/102-09-MIPS-lantiq-falcon-sysctrl-add-missing-header-prom.h.patch
+++ b/target/linux/lantiq/patches-6.12/102-10-v6.17-MIPS-lantiq-falcon-sysctrl-add-missing-header-prom.h.patch
@@ -1,7 +1,7 @@
-From cc7803436c2419009aaf702d96fc1d717ca52279 Mon Sep 17 00:00:00 2001
+From 8a6156bd26240177e710fd8623bc2eb0ef0092cf Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Fri, 9 May 2025 20:15:36 +0800
-Subject: [PATCH 09/16] MIPS: lantiq: falcon: sysctrl: add missing header
+Date: Wed, 18 Jun 2025 22:53:22 +0800
+Subject: [PATCH 10/11] MIPS: lantiq: falcon: sysctrl: add missing header
  prom.h
 
 "prom.h" includes the prototype of ltq_soc_init(). Fix warning:
@@ -11,6 +11,7 @@ arch/mips/lantiq/falcon/sysctrl.c:185:13: error: no previous prototype for 'ltq_
       |             ^~~~~~~~~~~~
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
 ---
  arch/mips/lantiq/falcon/sysctrl.c | 1 +
  1 file changed, 1 insertion(+)
diff --git a/target/linux/lantiq/patches-6.12/102-10-MIPS-lantiq-falcon-sysctrl-fix-request-memory-check-.patch b/target/linux/lantiq/patches-6.12/102-11-v6.17-MIPS-lantiq-falcon-sysctrl-fix-request-memory-check-.patch
similarity index 92%
rename from target/linux/lantiq/patches-6.12/102-10-MIPS-lantiq-falcon-sysctrl-fix-request-memory-check-.patch
rename to target/linux/lantiq/patches-6.12/102-11-v6.17-MIPS-lantiq-falcon-sysctrl-fix-request-memory-check-.patch
index e3f2ff81cd..13c72d826b 100644
--- a/target/linux/lantiq/patches-6.12/102-10-MIPS-lantiq-falcon-sysctrl-fix-request-memory-check-.patch
+++ b/target/linux/lantiq/patches-6.12/102-11-v6.17-MIPS-lantiq-falcon-sysctrl-fix-request-memory-check-.patch
@@ -1,7 +1,7 @@
-From ccdf5d58c4f3330a83393641d4e4334994fc91af Mon Sep 17 00:00:00 2001
+From 9c9a7ff9882fc6ba7d2f4050697e8bb80383e8dc Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Fri, 9 May 2025 20:53:58 +0800
-Subject: [PATCH 10/16] MIPS: lantiq: falcon: sysctrl: fix request memory check
+Date: Wed, 18 Jun 2025 22:53:23 +0800
+Subject: [PATCH 11/11] MIPS: lantiq: falcon: sysctrl: fix request memory check
  logic
 
 request_mem_region() will return NULL instead of error code
@@ -26,6 +26,7 @@ arch/mips/lantiq/falcon/sysctrl.c:225:50: error: ordered comparison of pointer w
       |
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
 ---
  arch/mips/lantiq/falcon/sysctrl.c | 23 ++++++++++-------------
  1 file changed, 10 insertions(+), 13 deletions(-)
diff --git a/target/linux/lantiq/patches-6.12/102-12-MIPS-vpe-mt-mark-vpe_free-and-vpe_stop-as-static.patch b/target/linux/lantiq/patches-6.12/102-12-MIPS-vpe-mt-mark-vpe_free-and-vpe_stop-as-static.patch
deleted file mode 100644
index 5e95111f5e..0000000000
--- a/target/linux/lantiq/patches-6.12/102-12-MIPS-vpe-mt-mark-vpe_free-and-vpe_stop-as-static.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 6faade177216b41a8112e33c6e73377e78dd1f92 Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Thu, 8 May 2025 18:32:11 +0800
-Subject: [PATCH 12/16] MIPS: vpe-mt: mark vpe_free() and vpe_stop() as static
-
-These functions are only used in the current source file "vpe-mt.c".
-Do not export them and mark them as static to silence the missing
-prototypes warnings:
-
-arch/mips/kernel/vpe-mt.c:208:5: error: no previous prototype for 'vpe_stop' [-Werror=missing-prototypes]
-  208 | int vpe_stop(void *vpe)
-      |     ^~~~~~~~
-arch/mips/kernel/vpe-mt.c:229:5: error: no previous prototype for 'vpe_free' [-Werror=missing-prototypes]
-  229 | int vpe_free(void *vpe)
-      |     ^~~~~~~~
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
----
- arch/mips/kernel/vpe-mt.c | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
---- a/arch/mips/kernel/vpe-mt.c
-+++ b/arch/mips/kernel/vpe-mt.c
-@@ -202,7 +202,7 @@ int vpe_start(void *vpe, unsigned long s
- EXPORT_SYMBOL(vpe_start);
- 
- /* halt it for now */
--int vpe_stop(void *vpe)
-+static int vpe_stop(void *vpe)
- {
- 	struct vpe *v = vpe;
- 	struct tc *t;
-@@ -220,10 +220,9 @@ int vpe_stop(void *vpe)
- 
- 	return 0;
- }
--EXPORT_SYMBOL(vpe_stop);
- 
- /* I've done with it thank you */
--int vpe_free(void *vpe)
-+static int vpe_free(void *vpe)
- {
- 	struct vpe *v = vpe;
- 	struct tc *t;
-@@ -255,7 +254,6 @@ int vpe_free(void *vpe)
- 
- 	return 0;
- }
--EXPORT_SYMBOL(vpe_free);
- 
- static ssize_t store_kill(struct device *dev, struct device_attribute *attr,
- 			  const char *buf, size_t len)
diff --git a/target/linux/lantiq/patches-6.12/102-12-v6.17-MIPS-vpe-mt-add-missing-prototypes-for-vpe_-alloc-st.patch b/target/linux/lantiq/patches-6.12/102-12-v6.17-MIPS-vpe-mt-add-missing-prototypes-for-vpe_-alloc-st.patch
new file mode 100644
index 0000000000..d3ed482bad
--- /dev/null
+++ b/target/linux/lantiq/patches-6.12/102-12-v6.17-MIPS-vpe-mt-add-missing-prototypes-for-vpe_-alloc-st.patch
@@ -0,0 +1,44 @@
+From 844615dd0f2d95c018ec66b943e08af22b62aff3 Mon Sep 17 00:00:00 2001
+From: Shiji Yang <yangshiji66 at outlook.com>
+Date: Thu, 3 Jul 2025 21:06:32 +0800
+Subject: [PATCH] MIPS: vpe-mt: add missing prototypes for
+ vpe_{alloc,start,stop,free}
+
+These functions are exported but their prototypes are not defined.
+This patch adds the missing function prototypes to fix the following
+compilation warnings:
+
+arch/mips/kernel/vpe-mt.c:180:7: error: no previous prototype for 'vpe_alloc' [-Werror=missing-prototypes]
+  180 | void *vpe_alloc(void)
+      |       ^~~~~~~~~
+arch/mips/kernel/vpe-mt.c:198:5: error: no previous prototype for 'vpe_start' [-Werror=missing-prototypes]
+  198 | int vpe_start(void *vpe, unsigned long start)
+      |     ^~~~~~~~~
+arch/mips/kernel/vpe-mt.c:208:5: error: no previous prototype for 'vpe_stop' [-Werror=missing-prototypes]
+  208 | int vpe_stop(void *vpe)
+      |     ^~~~~~~~
+arch/mips/kernel/vpe-mt.c:229:5: error: no previous prototype for 'vpe_free' [-Werror=missing-prototypes]
+  229 | int vpe_free(void *vpe)
+      |     ^~~~~~~~
+
+Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
+---
+ arch/mips/include/asm/vpe.h | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/arch/mips/include/asm/vpe.h
++++ b/arch/mips/include/asm/vpe.h
+@@ -119,4 +119,12 @@ void cleanup_tc(struct tc *tc);
+ 
+ int __init vpe_module_init(void);
+ void __exit vpe_module_exit(void);
++
++#ifdef CONFIG_MIPS_VPE_LOADER_MT
++void *vpe_alloc(void);
++int vpe_start(void *vpe, unsigned long start);
++int vpe_stop(void *vpe);
++int vpe_free(void *vpe);
++#endif /* CONFIG_MIPS_VPE_LOADER_MT */
++
+ #endif /* _ASM_VPE_H */
diff --git a/target/linux/lantiq/patches-6.12/102-13-MIPS-vpe-mt-drop-unused-functions-vpe_alloc-and-vpe_.patch b/target/linux/lantiq/patches-6.12/102-13-MIPS-vpe-mt-drop-unused-functions-vpe_alloc-and-vpe_.patch
deleted file mode 100644
index 1528f1202e..0000000000
--- a/target/linux/lantiq/patches-6.12/102-13-MIPS-vpe-mt-drop-unused-functions-vpe_alloc-and-vpe_.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From e6fab4c05f655b834587bc06f0274f69cdc43171 Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Thu, 8 May 2025 18:32:11 +0800
-Subject: [PATCH 13/16] MIPS: vpe-mt: drop unused functions vpe_alloc() and
- vpe_start()
-
-These two functions are defined but unused. Removing them to silence
-the missing prototypes warnings:
-
-arch/mips/kernel/vpe-mt.c:180:7: error: no previous prototype for 'vpe_alloc' [-Werror=missing-prototypes]
-  180 | void *vpe_alloc(void)
-      |       ^~~~~~~~~
-arch/mips/kernel/vpe-mt.c:198:5: error: no previous prototype for 'vpe_start' [-Werror=missing-prototypes]
-  198 | int vpe_start(void *vpe, unsigned long start)
-      |     ^~~~~~~~~
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
----
- arch/mips/kernel/vpe-mt.c | 29 -----------------------------
- 1 file changed, 29 deletions(-)
-
---- a/arch/mips/kernel/vpe-mt.c
-+++ b/arch/mips/kernel/vpe-mt.c
-@@ -172,35 +172,6 @@ void cleanup_tc(struct tc *tc)
- 	local_irq_restore(flags);
- }
- 
--/* module wrapper entry points */
--/* give me a vpe */
--void *vpe_alloc(void)
--{
--	int i;
--	struct vpe *v;
--
--	/* find a vpe */
--	for (i = 1; i < MAX_VPES; i++) {
--		v = get_vpe(i);
--		if (v != NULL) {
--			v->state = VPE_STATE_INUSE;
--			return v;
--		}
--	}
--	return NULL;
--}
--EXPORT_SYMBOL(vpe_alloc);
--
--/* start running from here */
--int vpe_start(void *vpe, unsigned long start)
--{
--	struct vpe *v = vpe;
--
--	v->__start = start;
--	return vpe_run(v);
--}
--EXPORT_SYMBOL(vpe_start);
--
- /* halt it for now */
- static int vpe_stop(void *vpe)
- {
diff --git a/target/linux/lantiq/patches-6.12/102-14-pinctrl-xway-mark-xway_pinconf_group_set-as-static.patch b/target/linux/lantiq/patches-6.12/102-14-pinctrl-xway-mark-xway_pinconf_group_set-as-static.patch
deleted file mode 100644
index f3b15769e4..0000000000
--- a/target/linux/lantiq/patches-6.12/102-14-pinctrl-xway-mark-xway_pinconf_group_set-as-static.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 7d8878668dfe011f33b92a0f9aa3e0d46c1b77ca Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Thu, 8 May 2025 20:36:56 +0800
-Subject: [PATCH 14/16] pinctrl: xway: mark xway_pinconf_group_set() as static
-
-Fix the following missing-prototypes build warning:
-
-drivers/pinctrl/pinctrl-xway.c:1231:5: error: no previous prototype for 'xway_pinconf_group_set' [-Werror=missing-prototypes]
- 1231 | int xway_pinconf_group_set(struct pinctrl_dev *pctldev,
-      |     ^~~~~~~~~~~~~~~~~~~~~~
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
----
- drivers/pinctrl/pinctrl-xway.c | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
---- a/drivers/pinctrl/pinctrl-xway.c
-+++ b/drivers/pinctrl/pinctrl-xway.c
-@@ -1228,10 +1228,11 @@ static int xway_pinconf_set(struct pinct
- 	return 0;
- }
- 
--int xway_pinconf_group_set(struct pinctrl_dev *pctldev,
--			unsigned selector,
--			unsigned long *configs,
--			unsigned num_configs)
-+static int
-+xway_pinconf_group_set(struct pinctrl_dev *pctldev,
-+		       unsigned selector,
-+		       unsigned long *configs,
-+		       unsigned num_configs)
- {
- 	struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctldev);
- 	int i, ret = 0;
diff --git a/target/linux/lantiq/patches-6.12/102-14-v6.17-pinctrl-xway-statify-xway_pinconf_group_set.patch b/target/linux/lantiq/patches-6.12/102-14-v6.17-pinctrl-xway-statify-xway_pinconf_group_set.patch
new file mode 100644
index 0000000000..5e1113b879
--- /dev/null
+++ b/target/linux/lantiq/patches-6.12/102-14-v6.17-pinctrl-xway-statify-xway_pinconf_group_set.patch
@@ -0,0 +1,31 @@
+From e62acaef5d3b67648a7161b329ae8a5afce8c682 Mon Sep 17 00:00:00 2001
+From: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
+Date: Thu, 12 Jun 2025 15:15:16 +0200
+Subject: [PATCH] pinctrl: xway: statify xway_pinconf_group_set()
+
+This function is not exported and is only used locally. Make it static.
+
+Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
+Link: https://lore.kernel.org/20250612-gpiochip-set-rv-pinctrl-remaining-v1-7-556b0a530cd4 at linaro.org
+Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
+---
+ drivers/pinctrl/pinctrl-xway.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/pinctrl/pinctrl-xway.c
++++ b/drivers/pinctrl/pinctrl-xway.c
+@@ -1228,10 +1228,10 @@ static int xway_pinconf_set(struct pinct
+ 	return 0;
+ }
+ 
+-int xway_pinconf_group_set(struct pinctrl_dev *pctldev,
+-			unsigned selector,
+-			unsigned long *configs,
+-			unsigned num_configs)
++static int xway_pinconf_group_set(struct pinctrl_dev *pctldev,
++				  unsigned int selector,
++				  unsigned long *configs,
++				  unsigned int num_configs)
+ {
+ 	struct ltq_pinmux_info *info = pinctrl_dev_get_drvdata(pctldev);
+ 	int i, ret = 0;
diff --git a/target/linux/lantiq/patches-6.12/102-15-pinctrl-falcon-mark-pinctrl_falcon_init-as-static.patch b/target/linux/lantiq/patches-6.12/102-15-v6.17-pinctrl-falcon-mark-pinctrl_falcon_init-as-static.patch
similarity index 69%
rename from target/linux/lantiq/patches-6.12/102-15-pinctrl-falcon-mark-pinctrl_falcon_init-as-static.patch
rename to target/linux/lantiq/patches-6.12/102-15-v6.17-pinctrl-falcon-mark-pinctrl_falcon_init-as-static.patch
index 9cf08a5901..74586c6096 100644
--- a/target/linux/lantiq/patches-6.12/102-15-pinctrl-falcon-mark-pinctrl_falcon_init-as-static.patch
+++ b/target/linux/lantiq/patches-6.12/102-15-v6.17-pinctrl-falcon-mark-pinctrl_falcon_init-as-static.patch
@@ -1,7 +1,7 @@
-From 9dec40b4f01a2aa92311b077ef45ecaa335d45a2 Mon Sep 17 00:00:00 2001
+From 4b443bbcd113cad6ec041a4f9f09179e2342ad60 Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Fri, 9 May 2025 20:16:49 +0800
-Subject: [PATCH 15/16] pinctrl: falcon: mark pinctrl_falcon_init() as static
+Date: Wed, 18 Jun 2025 22:53:28 +0800
+Subject: [PATCH] pinctrl: falcon: mark pinctrl_falcon_init() as static
 
 Fix the following missing-prototypes build warning:
 
@@ -10,6 +10,8 @@ drivers/pinctrl/pinctrl-falcon.c:508:12: error: no previous prototype for 'pinct
       |            ^~~~~~~~~~~~~~~~~~~
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Link: https://lore.kernel.org/OSBPR01MB167014AF54EF9818CB98C83BBC72A at OSBPR01MB1670.jpnprd01.prod.outlook.com
+Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
 ---
  drivers/pinctrl/pinctrl-falcon.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/linux/lantiq/patches-6.12/102-16-spi-falcon-mark-falcon_sflash_xfer-as-static.patch b/target/linux/lantiq/patches-6.12/102-16-v6.17-spi-falcon-mark-falcon_sflash_xfer-as-static.patch
similarity index 74%
rename from target/linux/lantiq/patches-6.12/102-16-spi-falcon-mark-falcon_sflash_xfer-as-static.patch
rename to target/linux/lantiq/patches-6.12/102-16-v6.17-spi-falcon-mark-falcon_sflash_xfer-as-static.patch
index ad50f396a1..f9b643b79d 100644
--- a/target/linux/lantiq/patches-6.12/102-16-spi-falcon-mark-falcon_sflash_xfer-as-static.patch
+++ b/target/linux/lantiq/patches-6.12/102-16-v6.17-spi-falcon-mark-falcon_sflash_xfer-as-static.patch
@@ -1,7 +1,7 @@
-From 28b20e002412bcadd4de74235faff275efb9e2cd Mon Sep 17 00:00:00 2001
+From 5fc2c383125c2b4b6037e02ad8796b776b25e6d0 Mon Sep 17 00:00:00 2001
 From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Fri, 9 May 2025 20:21:02 +0800
-Subject: [PATCH 16/16] spi: falcon: mark falcon_sflash_xfer() as static
+Date: Wed, 18 Jun 2025 22:53:29 +0800
+Subject: [PATCH] spi: falcon: mark falcon_sflash_xfer() as static
 
 Fix the following missing-prototypes build warning:
 
@@ -10,6 +10,8 @@ drivers/spi/spi-falcon.c:97:5: error: no previous prototype for 'falcon_sflash_x
       |     ^~~~~~~~~~~~~~~~~~
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+Link: https://patch.msgid.link/OSBPR01MB16705BE87E549B6210CD6BCABC72A at OSBPR01MB1670.jpnprd01.prod.outlook.com
+Signed-off-by: Mark Brown <broonie at kernel.org>
 ---
  drivers/spi/spi-falcon.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target/linux/lantiq/patches-6.12/152-lantiq-VPE.patch b/target/linux/lantiq/patches-6.12/152-lantiq-VPE.patch
index 7e6d843dc1..66e1cd8ea7 100644
--- a/target/linux/lantiq/patches-6.12/152-lantiq-VPE.patch
+++ b/target/linux/lantiq/patches-6.12/152-lantiq-VPE.patch
@@ -51,11 +51,11 @@ Signed-off-by: Stefan Koch <stefan.koch10 at gmail.com>
  #define read_vpe_c0_status()		mftc0($12, 0)
 --- a/arch/mips/include/asm/vpe.h
 +++ b/arch/mips/include/asm/vpe.h
-@@ -119,4 +119,13 @@ void cleanup_tc(struct tc *tc);
- 
- int __init vpe_module_init(void);
- void __exit vpe_module_exit(void);
-+
+@@ -126,5 +126,13 @@ int vpe_start(void *vpe, unsigned long s
+ int vpe_stop(void *vpe);
+ int vpe_free(void *vpe);
+ #endif /* CONFIG_MIPS_VPE_LOADER_MT */
++ 
 +/* For the explanation of the APIs please refer the section "MT APRP Kernel
 + * Programming" in AR9 SW Architecture Specification
 + */
@@ -63,11 +63,11 @@ Signed-off-by: Stefan Koch <stefan.koch10 at gmail.com>
 +int32_t vpe1_sw_stop(uint32_t flags);
 +uint32_t vpe1_get_load_addr(uint32_t flags);
 +uint32_t vpe1_get_max_mem(uint32_t flags);
-+
+ 
  #endif /* _ASM_VPE_H */
 --- a/arch/mips/kernel/vpe-mt.c
 +++ b/arch/mips/kernel/vpe-mt.c
-@@ -383,6 +383,8 @@ int __init vpe_module_init(void)
+@@ -414,6 +414,8 @@ int __init vpe_module_init(void)
  			}
  
  			v->ntcs = hw_tcs - aprp_cpu_index();
@@ -76,7 +76,7 @@ Signed-off-by: Stefan Koch <stefan.koch10 at gmail.com>
  
  			/* add the tc to the list of this vpe's tc's. */
  			list_add(&t->tc, &v->tc);
-@@ -486,3 +488,47 @@ void __exit vpe_module_exit(void)
+@@ -517,3 +519,47 @@ void __exit vpe_module_exit(void)
  			release_vpe(v);
  	}
  }



From lede-commits at lists.infradead.org  Thu Aug  7 04:48:42 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 07:48:42 -0400
Subject: [openwrt/openwrt]  realtek: use consistent definition in DTS for
 SFP(+) ports
In-Reply-To: <175456732297.999312.3674649104338937798@git-01.infra.openwrt.org>
References: <175456732297.999312.3674649104338937798@git-01.infra.openwrt.org>
Message-ID: <mailman.113613.1754567435.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/17822d5d184f3f733eb9fc8569ee404ea3c5f5bf

commit 17822d5d184f3f733eb9fc8569ee404ea3c5f5bf
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Sun Aug 3 11:05:36 2025 -0400

    realtek: use consistent definition in DTS for SFP(+) ports
    
    We are slowly getting to the point where the mdio driver will be
    carved out from the ethernet driver. Since the beginning it had
    the feature to hand out SFP serdes as phys. So one can access
    them from the phy driver. This will be kept during the final
    migration and it even will provide a consistent interface for the
    phy/serdes registers.
    
    With this being done we need to identify how to handle the affected
    ports in a generic way for all targets. Doing first things first,
    this starts with a consistent DTS. Currently we have:
    
    for RTL838x + Zyxel XGS1210:
      phy-mode = "1000base-x"
      managed = "in-band-status"
      phy-handle = ...
    
    for all other RTL93x devices:
      phy-mode = "10gbase-r"
      managed = "in-band-status"
      pseudo-phy-handle = ...
    
    Looking at the phylink kernel code one can see a nifty detail.
    There is dynamic phy bringup depending on the mode.
    
    int phylink_fwnode_phy_connect(struct phylink *pl,
                                   const struct fwnode_handle *fwnode,
                                   u32 flags)
    {
            struct fwnode_handle *phy_fwnode;
            struct phy_device *phy_dev;
            int ret;
    
            /* Fixed links and 802.3z are handled without needing a PHY */
            if (pl->cfg_link_an_mode == MLO_AN_FIXED ||
                (pl->cfg_link_an_mode == MLO_AN_INBAND &&
                 phy_interface_mode_is_8023z(pl->link_interface)))
                    return 0;
            ...
    }
    
    Where 802.3z means 1000base-x or 2500base-x. Aligning this with
    IEEE specs it means essentially:
    
    - 10gbase-r defined ports with phy-handle must statically bring up
      a phylink from the beginning that immediately depends on a
      phy read_status() implementation.
    
    - 1000base-x/2500base-x defined ports will dynamically bringup a
      phylink during link detection regardless of a phy-handle. So
      it usually runs at the moment when a SFP has been plugged in.
    
    We currently still rely on a phy-handle but do not want to bring
    up the phy immediately. Commit 4457c1eee49 ("realtek: rtl93xx:
    support SFPs with phys") tried to fix exactly that error for
    10gbase-r definied ports. Kernel shows "sfp sfp-p8: sfp_add_phy
    failed: -EBUSY" in that case.
    
    But it did it in the wrong way. It implemented a workaround by
    introducing a DTS property "pseudo-phy-handle". Instead it
    should have simply converted the DTS nodes to 1000base-x.
    
    Revert the commit and fix the DTS with wrong definitions. From
    now on we have a consistent SFP definition throughout all DTS
    and targets.
    
    Aside from the positive effect this setting has it is more or
    less an arbitrary speed definition. When plugging in the SFP the
    real speed will be choosen dynamically.
    
    Fixes: 4457c1eee49 ("realtek: rtl93xx: support SFPs with phys")
    Tested-By: Bj?rn Mork <bjorn at mork.no>
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19648
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts |  6 ++--
 .../linux/realtek/dts/rtl9302_zyxel_xgs1250-12.dts |  2 +-
 .../realtek/dts/rtl9303_tplink_tl-st1008f_v2.dts   | 32 +++++++++++-----------
 .../realtek/dts/rtl9303_vimin_vm-s100-0800ms.dts   | 32 +++++++++++-----------
 .../realtek/dts/rtl9303_xikestor_sks8300-8x.dts    | 32 +++++++++++-----------
 .../files-6.12/drivers/net/dsa/rtl83xx/common.c    | 16 -----------
 6 files changed, 52 insertions(+), 68 deletions(-)

diff --git a/target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts b/target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts
index 44a5c26090..65954e3587 100644
--- a/target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts
+++ b/target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts
@@ -327,8 +327,8 @@
 		port at 26 {
 			reg = <26>;
 			label = "lan11";
-			phy-mode = "1000base-x";	//"10gbase-r";
-			pseudo-phy-handle = <&phy26>;
+			phy-mode = "1000base-x";
+			phy-handle = <&phy26>;
 			sfp = <&sfp0>;
 			led-set = <2>;
 			managed = "in-band-status";
@@ -338,7 +338,7 @@
 			reg = <27>;
 			label = "lan12";
 			phy-mode = "1000base-x";
-			pseudo-phy-handle = <&phy27>;
+			phy-handle = <&phy27>;
 			sfp = <&sfp1>;
 			led-set = <2>;
 			managed = "in-band-status";
diff --git a/target/linux/realtek/dts/rtl9302_zyxel_xgs1250-12.dts b/target/linux/realtek/dts/rtl9302_zyxel_xgs1250-12.dts
index ec1597a3b2..a2486f134e 100644
--- a/target/linux/realtek/dts/rtl9302_zyxel_xgs1250-12.dts
+++ b/target/linux/realtek/dts/rtl9302_zyxel_xgs1250-12.dts
@@ -397,7 +397,7 @@
 			reg = <27>;
 			label = "lan12";
 			phy-mode = "1000base-x";
-			pseudo-phy-handle = <&phy27>;
+			phy-handle = <&phy27>;
 			sfp = <&sfp0>;
 			led-set = <2>;
 			managed = "in-band-status";
diff --git a/target/linux/realtek/dts/rtl9303_tplink_tl-st1008f_v2.dts b/target/linux/realtek/dts/rtl9303_tplink_tl-st1008f_v2.dts
index 4b8423a4d5..75633e53f9 100644
--- a/target/linux/realtek/dts/rtl9303_tplink_tl-st1008f_v2.dts
+++ b/target/linux/realtek/dts/rtl9303_tplink_tl-st1008f_v2.dts
@@ -293,8 +293,8 @@
 		port at 0 {
 			reg = <0>;
 			label = "lan1";
-			phy-mode = "10gbase-r";
-			pseudo-phy-handle = <&phy0>;
+			phy-mode = "1000base-x";
+			phy-handle = <&phy0>;
 			sfp = <&sfp0>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -303,8 +303,8 @@
 		port at 8 {
 			reg = <8>;
 			label = "lan2";
-			phy-mode = "10gbase-r";
-			pseudo-phy-handle = <&phy8>;
+			phy-mode = "1000base-x";
+			phy-handle = <&phy8>;
 			sfp = <&sfp1>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -313,8 +313,8 @@
 		port at 10 {
 			reg = <16>;
 			label = "lan3";
-			phy-mode = "10gbase-r";
-			pseudo-phy-handle = <&phy16>;
+			phy-mode = "1000base-x";
+			phy-handle = <&phy16>;
 			sfp = <&sfp2>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -323,8 +323,8 @@
 		port at 14 {
 			reg = <20>;
 			label = "lan4";
-			phy-mode = "10gbase-r";
-			pseudo-phy-handle = <&phy20>;
+			phy-mode = "1000base-x";
+			phy-handle = <&phy20>;
 			sfp = <&sfp3>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -333,8 +333,8 @@
 		port at 18 {
 			reg = <24>;
 			label = "lan5";
-			phy-mode = "10gbase-r";
-			pseudo-phy-handle = <&phy24>;
+			phy-mode = "1000base-x";
+			phy-handle = <&phy24>;
 			sfp = <&sfp4>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -343,8 +343,8 @@
 		port at 19 {
 			reg = <25>;
 			label = "lan6";
-			phy-mode = "10gbase-r";
-			pseudo-phy-handle = <&phy25>;
+			phy-mode = "1000base-x";
+			phy-handle = <&phy25>;
 			sfp = <&sfp5>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -353,8 +353,8 @@
 		port at 1a {
 			reg = <26>;
 			label = "lan7";
-			phy-mode = "10gbase-r";
-			pseudo-phy-handle = <&phy26>;
+			phy-mode = "1000base-x";
+			phy-handle = <&phy26>;
 			sfp = <&sfp6>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -363,8 +363,8 @@
 		port at 1b {
 			reg = <27>;
 			label = "lan8";
-			phy-mode = "10gbase-r";
-			pseudo-phy-handle = <&phy27>;
+			phy-mode = "1000base-x";
+			phy-handle = <&phy27>;
 			sfp = <&sfp7>;
 			managed = "in-band-status";
 			led-set = <0>;
diff --git a/target/linux/realtek/dts/rtl9303_vimin_vm-s100-0800ms.dts b/target/linux/realtek/dts/rtl9303_vimin_vm-s100-0800ms.dts
index 93f60d016d..d901967a22 100644
--- a/target/linux/realtek/dts/rtl9303_vimin_vm-s100-0800ms.dts
+++ b/target/linux/realtek/dts/rtl9303_vimin_vm-s100-0800ms.dts
@@ -282,8 +282,8 @@
 		port at 0 {
 			reg = <0>;
 			label = "lan1";
-			pseudo-phy-handle = <&phy0>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy0>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp0>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -292,8 +292,8 @@
 		port at 8 {
 			reg = <8>;
 			label = "lan2";
-			pseudo-phy-handle = <&phy8>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy8>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp1>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -302,8 +302,8 @@
 		port at 10 {
 			reg = <16>;
 			label = "lan3";
-			pseudo-phy-handle = <&phy16>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy16>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp2>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -312,8 +312,8 @@
 		port at 14 {
 			reg = <20>;
 			label = "lan4";
-			pseudo-phy-handle = <&phy20>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy20>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp3>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -322,8 +322,8 @@
 		port at 18 {
 			reg = <24>;
 			label = "lan5";
-			pseudo-phy-handle = <&phy24>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy24>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp4>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -332,8 +332,8 @@
 		port at 19 {
 			reg = <25>;
 			label = "lan6";
-			pseudo-phy-handle = <&phy25>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy25>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp5>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -342,8 +342,8 @@
 		port at 1a {
 			reg = <26>;
 			label = "lan7";
-			pseudo-phy-handle = <&phy26>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy26>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp6>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -352,8 +352,8 @@
 		port at 1b {
 			reg = <27>;
 			label = "lan8";
-			pseudo-phy-handle = <&phy27>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy27>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp7>;
 			managed = "in-band-status";
 			led-set = <0>;
diff --git a/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts b/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts
index 8713100696..b3b2a9a6f1 100644
--- a/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts
+++ b/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts
@@ -304,8 +304,8 @@
 		port at 0 {
 			reg = <0>;
 			label = "lan1";
-			pseudo-phy-handle = <&phy0>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy0>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp0>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -314,8 +314,8 @@
 		port at 8 {
 			reg = <8>;
 			label = "lan2";
-			pseudo-phy-handle = <&phy8>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy8>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp1>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -324,8 +324,8 @@
 		port at 10 {
 			reg = <16>;
 			label = "lan3";
-			pseudo-phy-handle = <&phy16>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy16>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp2>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -334,8 +334,8 @@
 		port at 14 {
 			reg = <20>;
 			label = "lan4";
-			pseudo-phy-handle = <&phy20>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy20>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp3>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -344,8 +344,8 @@
 		port at 18 {
 			reg = <24>;
 			label = "lan5";
-			pseudo-phy-handle = <&phy24>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy24>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp4>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -354,8 +354,8 @@
 		port at 19 {
 			reg = <25>;
 			label = "lan6";
-			pseudo-phy-handle = <&phy25>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy25>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp5>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -364,8 +364,8 @@
 		port at 1a {
 			reg = <26>;
 			label = "lan7";
-			pseudo-phy-handle = <&phy26>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy26>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp6>;
 			managed = "in-band-status";
 			led-set = <0>;
@@ -374,8 +374,8 @@
 		port at 1b {
 			reg = <27>;
 			label = "lan8";
-			pseudo-phy-handle = <&phy27>;
-			phy-mode = "10gbase-r";
+			phy-handle = <&phy27>;
+			phy-mode = "1000base-x";
 			sfp = <&sfp7>;
 			managed = "in-band-status";
 			led-set = <0>;
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
index f6bef5e90c..fea0551cca 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
@@ -335,22 +335,6 @@ static int __init rtl83xx_mdio_probe(struct rtl838x_switch_priv *priv)
 			continue;
 
 		phy_node = of_parse_phandle(dn, "phy-handle", 0);
-
-		/* Major cleanup is needed...
-		 *
-		 * We use virtual "phys" as containers for mac
-		 * properties like the SERDES channel, even for simple
-		 * SFP slots.  "pseudo-phy-handle" is a hack to
-		 * support this construct and still allow pluggable
-		 * phys.
-		 *
-		 * The SERDES map is most likely static by port number
-		 * for each SoC.  No need to put that into the device
-		 * tree in the first place.
-		 */
-		if (!phy_node)
-			phy_node = of_parse_phandle(dn, "pseudo-phy-handle", 0);
-
 		if (!phy_node) {
 			if (pn != priv->cpu_port)
 				dev_err(priv->dev, "Port node %d misses phy-handle\n", pn);



From lede-commits at lists.infradead.org  Thu Aug  7 05:08:34 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 08:08:34 -0400
Subject: [openwrt/openwrt]  kernel: Add kmod-sfc-siena for Solarflare
 SFN5000/6000 series NICs
In-Reply-To: <175456851421.1077494.9915385407644148736@git-01.infra.openwrt.org>
References: <175456851421.1077494.9915385407644148736@git-01.infra.openwrt.org>
Message-ID: <mailman.113635.1754569012.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2c3b1f41d96e3f51f88ef4ed0735530491d9972f

commit 2c3b1f41d96e3f51f88ef4ed0735530491d9972f
Author: Steve Wavler <trenchcoatjedi at gmail.com>
AuthorDate: Sun Aug 3 09:02:55 2025 -0400

    kernel: Add kmod-sfc-siena for Solarflare SFN5000/6000 series NICs
    
    kmod-sfc should add support for Solarflare SFC9000 series based cards.
    However after kernel 5.19, support for the 'Siena' subclass of
    SFN5000/6000 devices has been separated out since they went EOL as they
    are no longer being actively developed. As kmod-sfc no longer provides
    driver support for these cards and hasn't since kernel 5.2, a new kernel
    module is needed to support these 10Gb Ethernet cards. More info here:
    https://cateee.net/lkddb/web-lkddb/SFC_SIENA.html and here:
    https://www.phoronix.com/news/Solarflare-SFC-Siena-Linux-5.19
    
    The module can be compiled in separately and works if kernel is custom
    compiled;
    
    OpenWRT has made these changes already with the SFC 'falcon' subclass of
    drivers already. See 3c5d70a and e5ba6e9
    
    This is building on excellent work by @ynezz and @nasbdh9
    
    Signed-off-by: Steve Wavler <trenchcoatjedi at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19647
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/netdevices.mk | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk
index ff581499ed..9ae3958dfe 100644
--- a/package/kernel/linux/modules/netdevices.mk
+++ b/package/kernel/linux/modules/netdevices.mk
@@ -2071,6 +2071,27 @@ endef
 $(eval $(call KernelPackage,sfc-falcon))
 
 
+define KernelPackage/sfc-siena
+  SUBMENU:=$(NETWORK_DEVICES_MENU)
+  TITLE:=Solarflare SFN5000/6000 'Siena' based card support
+  DEPENDS:=@PCI_SUPPORT +kmod-mdio +kmod-lib-crc32c +kmod-i2c-algo-bit +kmod-ptp +kmod-hwmon-core
+  KCONFIG:= \
+	CONFIG_SFC_SIENA \
+	CONFIG_SFC_SIENA_MTD=y \
+	CONFIG_SFC_SIENA_MCDI_MON=y \
+	CONFIG_SFC_SIENA_MCDI_LOGGING=y \
+	CONFIG_SFC_SIENA_SRIOV=y
+  FILES:=$(LINUX_DIR)/drivers/net/ethernet/sfc/siena/sfc-siena.ko
+  AUTOLOAD:=$(call AutoProbe,sfc-siena)
+endef
+
+define KernelPackage/sfc-siena/description
+  Solarflare SFN5000/6000 'Siena' based card support
+endef
+
+$(eval $(call KernelPackage,sfc-siena))
+
+
 define KernelPackage/wwan
   SUBMENU:=$(NETWORK_DEVICES_MENU)
   TITLE:=WWAN Driver Core



From lede-commits at lists.infradead.org  Thu Aug  7 05:08:35 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 08:08:35 -0400
Subject: [openwrt/openwrt]  x86: add board mapping for Sophos XG 210r3
In-Reply-To: <175456851421.1077494.9915385407644148736@git-01.infra.openwrt.org>
References: <175456851421.1077494.9915385407644148736@git-01.infra.openwrt.org>
Message-ID: <mailman.113636.1754569012.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4880e8e338fcd0d1448414265a2b2003a2594fe0

commit 4880e8e338fcd0d1448414265a2b2003a2594fe0
Author: Steve Wavler <trenchcoatjedi at gmail.com>
AuthorDate: Sun Aug 3 15:59:16 2025 -0400

    x86: add board mapping for Sophos XG 210r3
    
    Sophos XG 210r3 is a rackmounted x86 based firewall with 6 RJ-45 gigabit
    ethernet ports (eth0-5) and 2 SFP gigabit ethernet ports (eth6, eth7)
    all running Intel NICs supported by igb driver. This board update maps
    eth0 (left most RJ-45 port) as wan and eth1-7 as lan.
    
    Signed-off-by: Steve Wavler <trenchcoatjedi at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19647
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/x86/base-files/etc/board.d/02_network | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/x86/base-files/etc/board.d/02_network b/target/linux/x86/base-files/etc/board.d/02_network
index 7509b069e2..aa61cf32fb 100644
--- a/target/linux/x86/base-files/etc/board.d/02_network
+++ b/target/linux/x86/base-files/etc/board.d/02_network
@@ -97,6 +97,9 @@ sophos-sg-135r3|sophos-xg-135r3| \
 sophos-sg-135wr3|sophos-xg-135wr3)
 	ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3 eth5 eth7 eth8" "eth6"
 	;;
+sophos-xg-210r3)
+	ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 eth5 eth6 eth7" "eth0"
+	;;
 supermicro-sys-e302-9d)
 	ucidef_set_interface_lan "eth0 eth1 eth2 eth3 eth4 eth5 eth6 eth7"
 	;;



From lede-commits at lists.infradead.org  Thu Aug  7 06:45:25 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 09:45:25 -0400
Subject: [openwrt/openwrt]  procd: update to Git HEAD (2025-08-07)
In-Reply-To: <175457432522.1542448.16594409520123517227@git-01.infra.openwrt.org>
References: <175457432522.1542448.16594409520123517227@git-01.infra.openwrt.org>
Message-ID: <mailman.113727.1754574329.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/71c85bd88a7454f5ac34513ca70ade3854dd3086

commit 71c85bd88a7454f5ac34513ca70ade3854dd3086
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Aug 7 15:44:56 2025 +0200

    procd: update to Git HEAD (2025-08-07)
    
    84372dab89a8 hotplug: switch to using avl tree for hotplug subsystems
    4d023b8a8c51 hotplug: send event notifications
    467800980021 hotplug: ensure that the button subsystem is always registered
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/system/procd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index a04194eb29..0ede26c37f 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
-PKG_MIRROR_HASH:=0dccbdbfea96106d1e394cb74a02fa4c7910e06e6d62212d704153bea8dc3024
-PKG_SOURCE_DATE:=2025-06-19
-PKG_SOURCE_VERSION:=cde025d5baf32e62b485ef9f8ba1e835ba8ece0e
+PKG_MIRROR_HASH:=6e40f4b526773166315cfccdab22d0d7d5cc18f2a968f3987268de46207b976b
+PKG_SOURCE_DATE:=2025-08-07
+PKG_SOURCE_VERSION:=46780098002167070c665f03f1a8ed76d1e1c55f
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Thu Aug  7 06:53:24 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 09:53:24 -0400
Subject: [openwrt/openwrt]  realtek: rtl93xx: Do not use media register to get
 link status
In-Reply-To: <175457480449.1589344.7270319990149106786@git-01.infra.openwrt.org>
References: <175457480449.1589344.7270319990149106786@git-01.infra.openwrt.org>
Message-ID: <mailman.113735.1754574837.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2645c4afbb0935ed91d38c961037465078078064

commit 2645c4afbb0935ed91d38c961037465078078064
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Thu Jul 3 13:28:22 2025 +0000

    realtek: rtl93xx: Do not use media register to get link status
    
    The media_sts register only shows type of link, fiber/copper,
    and has nothing to do with the link status
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19575
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
index 425fffd065..10438298ad 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
@@ -653,9 +653,6 @@ static void rtl93xx_pcs_get_state(struct phylink_pcs *pcs,
 	if (priv->family_id == RTL9300_FAMILY_ID)
 		media = sw_r32(RTL930X_MAC_LINK_MEDIA_STS);
 
-	if (media & BIT_ULL(port))
-		state->link = 1;
-
 	pr_debug("%s: link state port %d: %llx, media %llx\n", __func__, port,
 		 link & BIT_ULL(port), media);
 



From lede-commits at lists.infradead.org  Thu Aug  7 06:53:25 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 09:53:25 -0400
Subject: [openwrt/openwrt]  realtek: dsa: enhance pcs_get_state() for RTL93xx
In-Reply-To: <175457480449.1589344.7270319990149106786@git-01.infra.openwrt.org>
References: <175457480449.1589344.7270319990149106786@git-01.infra.openwrt.org>
Message-ID: <mailman.113736.1754574837.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9ccfca33038ac27cedca6f6bb18f18c47a7e38d0

commit 9ccfca33038ac27cedca6f6bb18f18c47a7e38d0
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Mon Jul 14 10:37:28 2025 +0200

    realtek: dsa: enhance pcs_get_state() for RTL93xx
    
    Currently the SerDes driven SFP ports give strange ethtool readings
    on RTL93xx devices. Especially duplex and speed are shown even if
    no link is up and running. That leads to confusion because the MAC
    reports arbitrary values.
    
    Enhance the readout by refactoring the pcs_get_state() function.
    Calculate speed/duplex/pause only if link is detected.
    
    Suggested-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19575
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.12/drivers/net/dsa/rtl83xx/dsa.c       | 53 ++++++++++------------
 1 file changed, 24 insertions(+), 29 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
index 10438298ad..a14b502cf1 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
@@ -621,8 +621,8 @@ static void rtldsa_83xx_pcs_get_state(struct phylink_pcs *pcs, struct phylink_li
 		state->pause |= MLO_PAUSE_TX;
 }
 
-static void rtl93xx_pcs_get_state(struct phylink_pcs *pcs,
-				  struct phylink_link_state *state)
+static void rtldsa_93xx_pcs_get_state(struct phylink_pcs *pcs,
+				      struct phylink_link_state *state)
 {
 	struct rtl838x_pcs *rtpcs = container_of(pcs, struct rtl838x_pcs, pcs);
 	struct rtl838x_switch_priv *priv = rtpcs->priv;
@@ -631,21 +631,25 @@ static void rtl93xx_pcs_get_state(struct phylink_pcs *pcs,
 	u64 link;
 	u64 media;
 
-	if (port < 0 || port > priv->cpu_port) {
-		state->link = false;
+	state->link = 0;
+	state->speed = SPEED_UNKNOWN;
+	state->duplex = DUPLEX_UNKNOWN;
+	state->pause &= ~(MLO_PAUSE_RX | MLO_PAUSE_TX);
+
+	if (port < 0 || port > priv->cpu_port)
 		return;
-	}
 
 	/* On the RTL9300 for at least the RTL8226B PHY, the MAC-side link
 	 * state needs to be read twice in order to read a correct result.
 	 * This would not be necessary for ports connected e.g. to RTL8218D
 	 * PHYs.
 	 */
-	state->link = 0;
 	link = priv->r->get_port_reg_le(priv->r->mac_link_sts);
 	link = priv->r->get_port_reg_le(priv->r->mac_link_sts);
-	if (link & BIT_ULL(port))
-		state->link = 1;
+	if (!(link & BIT_ULL(port)))
+		return;
+
+	state->link = 1;
 
 	if (priv->family_id == RTL9310_FAMILY_ID)
 		media = priv->r->get_port_reg_le(RTL931X_MAC_LINK_MEDIA_STS);
@@ -656,46 +660,37 @@ static void rtl93xx_pcs_get_state(struct phylink_pcs *pcs,
 	pr_debug("%s: link state port %d: %llx, media %llx\n", __func__, port,
 		 link & BIT_ULL(port), media);
 
-	state->duplex = 0;
 	if (priv->r->get_port_reg_le(priv->r->mac_link_dup_sts) & BIT_ULL(port))
-		state->duplex = 1;
+		state->duplex = DUPLEX_FULL;
+	else
+		state->duplex = DUPLEX_HALF;
 
 	speed = priv->r->get_port_reg_le(priv->r->mac_link_spd_sts(port));
-	speed >>= (port % 8) << 2;
-	switch (speed & 0xf) {
-	case 0:
+	speed = (speed >> ((port % 8) << 2)) & 0xf;
+	switch (speed) {
+	case RTL_SPEED_10:
 		state->speed = SPEED_10;
 		break;
-	case 1:
+	case RTL_SPEED_100:
 		state->speed = SPEED_100;
 		break;
-	case 2:
-	case 7:
+	case RTL_SPEED_1000:
 		state->speed = SPEED_1000;
 		break;
-	case 4:
+	case RTL_SPEED_10000:
 		state->speed = SPEED_10000;
 		break;
-	case 5:
-	case 8:
+	case RTL_SPEED_2500:
 		state->speed = SPEED_2500;
 		break;
-	case 6:
+	case RTL_SPEED_5000:
 		state->speed = SPEED_5000;
 		break;
 	default:
 		pr_err("%s: unknown speed: %d\n", __func__, (u32)speed & 0xf);
 	}
 
-	if (priv->family_id == RTL9310_FAMILY_ID
-		&& (port >= 52 && port <= 55)) { /* Internal serdes */
-			state->speed = SPEED_10000;
-			state->link = 1;
-			state->duplex = 1;
-	}
-
 	pr_debug("%s: speed is: %d %d\n", __func__, (u32)speed & 0xf, state->speed);
-	state->pause &= (MLO_PAUSE_RX | MLO_PAUSE_TX);
 	if (priv->r->get_port_reg_le(priv->r->mac_rx_pause_sts) & BIT_ULL(port))
 		state->pause |= MLO_PAUSE_RX;
 	if (priv->r->get_port_reg_le(priv->r->mac_tx_pause_sts) & BIT_ULL(port))
@@ -2750,7 +2745,7 @@ const struct dsa_switch_ops rtl83xx_switch_ops = {
 
 const struct phylink_pcs_ops rtl93xx_pcs_ops = {
 	.pcs_an_restart		= rtl83xx_pcs_an_restart,
-	.pcs_get_state		= rtl93xx_pcs_get_state,
+	.pcs_get_state		= rtldsa_93xx_pcs_get_state,
 	.pcs_config		= rtl83xx_pcs_config,
 };
 



From lede-commits at lists.infradead.org  Thu Aug  7 07:09:21 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 10:09:21 -0400
Subject: [openwrt/openwrt]  realtek: rtl931x: Fix link status get not fetching
 correct status
In-Reply-To: <175457576085.1669731.10128959230947538805@git-01.infra.openwrt.org>
References: <175457576085.1669731.10128959230947538805@git-01.infra.openwrt.org>
Message-ID: <mailman.113739.1754575794.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6473e3ed5eaa18de28fa5f7653e05079a22e0802

commit 6473e3ed5eaa18de28fa5f7653e05079a22e0802
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Tue Apr 8 10:46:15 2025 +0000

    realtek: rtl931x: Fix link status get not fetching correct status
    
    Just like rtl930x, rtl931x also requires two reads to fetch current link
    status.
    
    While at it, rename the function to a proper naming scheme.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Co-developed-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Co-developed-by: Sven Eckelmann <sven at narfation.org>
    Signed-off-by: Sven Eckelmann <sven at narfation.org>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19578
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c     |  2 +-
 .../realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h     | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
index bcc8f39286..66e06bbb31 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
@@ -610,7 +610,7 @@ static const struct rtl838x_eth_reg rtl931x_reg = {
 	.dma_if_rx_ring_cntr = rtl931x_dma_if_rx_ring_cntr,
 	.dma_if_rx_cur = RTL931X_DMA_IF_RX_CUR,
 	.rst_glb_ctrl = RTL931X_RST_GLB_CTRL,
-	.get_mac_link_sts = rtl931x_get_mac_link_sts,
+	.get_mac_link_sts = rtldsa_931x_get_mac_link_sts,
 	.get_mac_link_dup_sts = rtl931x_get_mac_link_dup_sts,
 	.get_mac_link_spd_sts = rtl931x_get_mac_link_spd_sts,
 	.get_mac_rx_pause_sts = rtl931x_get_mac_rx_pause_sts,
diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
index c28a94ed9f..24c750b403 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
@@ -307,9 +307,16 @@ inline u32 rtl930x_get_mac_link_sts(int port)
 	return link & BIT(port);
 }
 
-inline u32 rtl931x_get_mac_link_sts(int p)
+inline u32 rtldsa_931x_get_mac_link_sts(int port)
 {
-	return (sw_r32(RTL931X_MAC_LINK_STS + ((p >> 5) << 2)) & BIT(p % 32));
+	unsigned int reg = RTL931X_MAC_LINK_STS + (port / 32) * 4;
+	u32 mask = BIT(port % 32);
+	u32 link;
+
+	link = sw_r32(reg);
+	link = sw_r32(reg);
+
+	return (link & mask);
 }
 
 inline u32 rtl838x_get_mac_link_dup_sts(int port)



From lede-commits at lists.infradead.org  Thu Aug  7 07:09:20 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 10:09:20 -0400
Subject: [openwrt/openwrt]  realtek: rtl930x: Fetch link status for all ports
 in switch IRQ
In-Reply-To: <175457576085.1669731.10128959230947538805@git-01.infra.openwrt.org>
References: <175457576085.1669731.10128959230947538805@git-01.infra.openwrt.org>
Message-ID: <mailman.113740.1754575794.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/445af8c038f46855a919e2feebcf473d8e2d32ec

commit 445af8c038f46855a919e2feebcf473d8e2d32ec
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Thu Mar 6 07:47:18 2025 +0000

    realtek: rtl930x: Fetch link status for all ports in switch IRQ
    
    Link status needs to be read twice, and a single register value is
    enough for determining link status for all the ports
    
    It is not necessary to go through each potential port separately and later
    actually identify for which ports the interrupt actually was. The helper
    for_each_set_bit() directly iterate through all set bits.
    
    While at it, rename the function to a proper naming scheme.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Co-developed-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19578
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.12/drivers/net/dsa/rtl83xx/common.c    |  2 +-
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h   |  2 +-
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c   | 27 ++++++++++------------
 3 files changed, 14 insertions(+), 17 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
index fea0551cca..7f96bdd82d 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
@@ -1614,7 +1614,7 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
 		                  IRQF_SHARED, "rtl839x-link-state", priv->ds);
 		break;
 	case RTL9300_FAMILY_ID:
-		err = request_irq(priv->link_state_irq, rtl930x_switch_irq,
+		err = request_irq(priv->link_state_irq, rtldsa_930x_switch_irq,
 				  IRQF_SHARED, "rtl930x-link-state", priv->ds);
 		break;
 	case RTL9310_FAMILY_ID:
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
index 0d81c707af..07cd98572a 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
@@ -175,7 +175,7 @@ void rtl839x_print_matrix(void);
 
 /* RTL930x-specific */
 u32 rtl930x_hash(struct rtl838x_switch_priv *priv, u64 seed);
-irqreturn_t rtl930x_switch_irq(int irq, void *dev_id);
+irqreturn_t rtldsa_930x_switch_irq(int irq, void *dev_id);
 irqreturn_t rtl839x_switch_irq(int irq, void *dev_id);
 void rtl930x_vlan_profile_dump(int index);
 int rtl9300_sds_power(int mac, int val);
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
index fc63e07ecc..4116fe2008 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
@@ -698,28 +698,25 @@ void rtl9300_dump_debug(void)
 	);
 }
 
-irqreturn_t rtl930x_switch_irq(int irq, void *dev_id)
+irqreturn_t rtldsa_930x_switch_irq(int irq, void *dev_id)
 {
 	struct dsa_switch *ds = dev_id;
-	u32 ports = sw_r32(RTL930X_ISR_PORT_LINK_STS_CHG);
+	struct rtl838x_switch_priv *priv = ds->priv;
+	unsigned long ports = sw_r32(RTL930X_ISR_PORT_LINK_STS_CHG);
+	unsigned int i;
 	u32 link;
 
 	/* Clear status */
 	sw_w32(ports, RTL930X_ISR_PORT_LINK_STS_CHG);
 
-	for (int i = 0; i < 28; i++) {
-		if (ports & BIT(i)) {
-			/* Read the register twice because of issues with latency at least
-			 * with the external RTL8226 PHY on the XGS1210
-			 */
-			link = sw_r32(RTL930X_MAC_LINK_STS);
-			link = sw_r32(RTL930X_MAC_LINK_STS);
-			if (link & BIT(i))
-				dsa_port_phylink_mac_change(ds, i, true);
-			else
-				dsa_port_phylink_mac_change(ds, i, false);
-		}
-	}
+	/* Read the register twice because of issues with latency at least
+	 * with the external RTL8226 PHY on the XGS1210
+	 */
+	link = sw_r32(RTL930X_MAC_LINK_STS);
+	link = sw_r32(RTL930X_MAC_LINK_STS);
+
+	for_each_set_bit(i, &ports, priv->cpu_port)
+		dsa_port_phylink_mac_change(ds, i, link & BIT(i));
 
 	return IRQ_HANDLED;
 }



From lede-commits at lists.infradead.org  Thu Aug  7 07:48:08 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 10:48:08 -0400
Subject: [openwrt/openwrt]  dropbear: fix typos in path configuration
In-Reply-To: <175457808828.1883718.1575284399749877654@git-01.infra.openwrt.org>
References: <175457808828.1883718.1575284399749877654@git-01.infra.openwrt.org>
Message-ID: <mailman.113760.1754578155.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/07b20b6d3599bbb28d2d6bb6de22a7ae2757ba45

commit 07b20b6d3599bbb28d2d6bb6de22a7ae2757ba45
Author: Konstantin Demin <rockdrilla at gmail.com>
AuthorDate: Thu Jul 31 15:09:49 2025 +0300

    dropbear: fix typos in path configuration
    
    Replace _FILE with _PATH
    
    Fixes: d8ff2d8cba7c ("dropbear: refactor configuration")
    Signed-off-by: Konstantin Demin <rockdrilla at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19611
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/network/services/dropbear/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index 72bec46435..dcf67c8400 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -138,9 +138,9 @@ DB_OPT_COMMON = \
 	MAX_UNAUTH_PER_IP,$(CONFIG_DROPBEAR_MAX_UNAUTH_PER_IP) \
 	UNAUTH_CLOSE_DELAY,$(CONFIG_DROPBEAR_UNAUTH_CLOSE_DELAY) \
 	$(if $(CONFIG_DROPBEAR_RSA),DROPBEAR_DEFAULT_RSA_SIZE$(comma)$(CONFIG_DROPBEAR_DEFAULT_RSA_SIZE)) \
-	$(if $(CONFIG_DROPBEAR_LASTLOG),LASTLOG_FILE$(comma)$(CONFIG_DROPBEAR_LASTLOG_FILE)) \
-	$(if $(CONFIG_DROPBEAR_UTMP),UTMP_FILE$(comma)$(CONFIG_DROPBEAR_UTMP_FILE)) \
-	$(if $(CONFIG_DROPBEAR_WTMP),WTMP_FILE$(comma)$(CONFIG_DROPBEAR_WTMP_FILE)) \
+	$(if $(CONFIG_DROPBEAR_LASTLOG),LASTLOG_FILE$(comma)$(CONFIG_DROPBEAR_LASTLOG_PATH)) \
+	$(if $(CONFIG_DROPBEAR_UTMP),UTMP_FILE$(comma)$(CONFIG_DROPBEAR_UTMP_PATH)) \
+	$(if $(CONFIG_DROPBEAR_WTMP),WTMP_FILE$(comma)$(CONFIG_DROPBEAR_WTMP_PATH)) \
 
 
 ##############################################################################



From lede-commits at lists.infradead.org  Thu Aug  7 07:48:09 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 10:48:09 -0400
Subject: [openwrt/openwrt]  dropbear: fix FTBFS when
 CONFIG_DROPBEAR_SVR_PUBKEY_OPTIONS is not enabled
In-Reply-To: <175457808828.1883718.1575284399749877654@git-01.infra.openwrt.org>
References: <175457808828.1883718.1575284399749877654@git-01.infra.openwrt.org>
Message-ID: <mailman.113763.1754578155.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/27baa3c731a6aec17a3cb8755cf51e78383fa898

commit 27baa3c731a6aec17a3cb8755cf51e78383fa898
Author: Konstantin Demin <rockdrilla at gmail.com>
AuthorDate: Thu Jul 31 14:21:01 2025 +0300

    dropbear: fix FTBFS when CONFIG_DROPBEAR_SVR_PUBKEY_OPTIONS is not enabled
    
    While this is discouraged to disable this option, both upstream and OpenWrt allows one to do it.
    
    Signed-off-by: Konstantin Demin <rockdrilla at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19611
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../dropbear/patches/051-fix-pubkey-options.patch  | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/package/network/services/dropbear/patches/051-fix-pubkey-options.patch b/package/network/services/dropbear/patches/051-fix-pubkey-options.patch
new file mode 100644
index 0000000000..ce0a524657
--- /dev/null
+++ b/package/network/services/dropbear/patches/051-fix-pubkey-options.patch
@@ -0,0 +1,47 @@
+From 91877a0337f432fd29bb1041be5599ea706e5de6 Mon Sep 17 00:00:00 2001
+From: Konstantin Demin <rockdrilla at gmail.com>
+Date: Thu, 31 Jul 2025 14:13:35 +0300
+Subject: fix build without pubkey options
+
+fixes:
+- 98ef42a856 "Don't set pubkey_info directly in checkpubkey_line"
+- 62ea53c1e5 "Implement no-touch-required and verify-requred for authorized_keys file"
+
+Signed-off-by: Konstantin Demin <rockdrilla at gmail.com>
+Forwarded: https://github.com/mkj/dropbear/pull/374
+---
+ src/svr-authpubkey.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+--- a/src/svr-authpubkey.c
++++ b/src/svr-authpubkey.c
+@@ -186,12 +186,14 @@ void svr_auth_pubkey(int valid_user) {
+ 
+ #if DROPBEAR_SK_ECDSA || DROPBEAR_SK_ED25519
+ 	key->sk_flags_mask = SSH_SK_USER_PRESENCE_REQD;
++#if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT
+ 	if (ses.authstate.pubkey_options && ses.authstate.pubkey_options->no_touch_required_flag) {
+ 		key->sk_flags_mask &= ~SSH_SK_USER_PRESENCE_REQD;
+ 	}
+ 	if (ses.authstate.pubkey_options && ses.authstate.pubkey_options->verify_required_flag) {
+ 		key->sk_flags_mask |= SSH_SK_USER_VERIFICATION_REQD;
+ 	}
++#endif /* DROPBEAR_SVR_PUBKEY_OPTIONS */
+ #endif
+ 
+ 	/* create the data which has been signed - this a string containing
+@@ -513,7 +515,13 @@ static int checkpubkey(const char* keyal
+ 		line_num++;
+ 
+ 		ret = checkpubkey_line(line, line_num, filename, keyalgo, keyalgolen,
+-			keyblob, keybloblen, &ses.authstate.pubkey_info);
++			keyblob, keybloblen,
++#if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT
++			&ses.authstate.pubkey_info
++#else
++			NULL
++#endif
++		);
+ 		if (ret == DROPBEAR_SUCCESS) {
+ 			break;
+ 		}



From lede-commits at lists.infradead.org  Thu Aug  7 07:48:10 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 10:48:10 -0400
Subject: [openwrt/openwrt]  dropbear: relax path permission checks for
 authorized keys
In-Reply-To: <175457808828.1883718.1575284399749877654@git-01.infra.openwrt.org>
References: <175457808828.1883718.1575284399749877654@git-01.infra.openwrt.org>
Message-ID: <mailman.113764.1754578155.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/68e5f46899eb3e0faa78dca698a1ee60691412fe

commit 68e5f46899eb3e0faa78dca698a1ee60691412fe
Author: Konstantin Demin <rockdrilla at gmail.com>
AuthorDate: Thu Jul 31 16:24:09 2025 +0300

    dropbear: relax path permission checks for authorized keys
    
    Check permissions of correct folder for certificates too.
    
    Fixes: bbe4d6ddb2a9 ("dropbear: bump to 2025.88")
    Signed-off-by: Konstantin Demin <rockdrilla at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19611
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/network/services/dropbear/Makefile         |  2 +-
 .../patches/050-dropbear-multihop-fix.patch        | 17 ++--
 .../dropbear/patches/100-pubkey_path.patch         | 93 ++++++++++++++++------
 3 files changed, 79 insertions(+), 33 deletions(-)

diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index dcf67c8400..87b1a2459f 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dropbear
 PKG_VERSION:=2025.88
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
diff --git a/package/network/services/dropbear/patches/050-dropbear-multihop-fix.patch b/package/network/services/dropbear/patches/050-dropbear-multihop-fix.patch
index bde2dda066..d8d6ff18c9 100644
--- a/package/network/services/dropbear/patches/050-dropbear-multihop-fix.patch
+++ b/package/network/services/dropbear/patches/050-dropbear-multihop-fix.patch
@@ -1,15 +1,16 @@
-Author: Konstantin Demin <rockdrilla at gmail.com>
+From 5cc0127000db5f7567b54d0495fb91a8e452fe09 Mon Sep 17 00:00:00 2001
+From: Konstantin Demin <rockdrilla at gmail.com>
+Date: Fri, 9 May 2025 22:39:35 +0300
 Subject: Fix proxycmd without netcat
 
-Fixes commit e5a0ef27c227 "Execute multihop commands directly, no shell"
+fixes e5a0ef27c2 "Execute multihop commands directly, no shell"
 
+Signed-off-by: Konstantin Demin <rockdrilla at gmail.com>
 Forwarded: https://github.com/mkj/dropbear/pull/363
-
+---
  src/cli-main.c | 12 +++++++++++-
  1 file changed, 11 insertions(+), 1 deletion(-)
 
-diff --git a/src/cli-main.c b/src/cli-main.c
-index 2fafa88900..0a052a3512 100644
 --- a/src/cli-main.c
 +++ b/src/cli-main.c
 @@ -77,7 +77,11 @@ int main(int argc, char ** argv) {
@@ -25,7 +26,7 @@ index 2fafa88900..0a052a3512 100644
  		cli_proxy_cmd(&sock_in, &sock_out, &proxy_cmd_pid);
  		if (signal(SIGINT, kill_proxy_sighandler) == SIG_ERR ||
  			signal(SIGTERM, kill_proxy_sighandler) == SIG_ERR ||
-@@ -110,11 +114,13 @@ static void shell_proxy_cmd(const void *user_data_cmd) {
+@@ -110,11 +114,13 @@ static void shell_proxy_cmd(const void *
  	dropbear_exit("Failed to run '%s'\n", cmd);
  }
  
@@ -39,7 +40,7 @@ index 2fafa88900..0a052a3512 100644
  
  static void cli_proxy_cmd(int *sock_in, int *sock_out, pid_t *pid_out) {
  	char * cmd_arg = NULL;
-@@ -145,9 +151,11 @@ static void cli_proxy_cmd(int *sock_in, int *sock_out, pid_t *pid_out) {
+@@ -145,9 +151,11 @@ static void cli_proxy_cmd(int *sock_in,
  		cmd_arg = m_malloc(shell_cmdlen);
  		snprintf(cmd_arg, shell_cmdlen, "exec %s", cli_opts.proxycmd);
  		exec_fn = shell_proxy_cmd;
@@ -51,7 +52,7 @@ index 2fafa88900..0a052a3512 100644
  	}
  
  	ret = spawn_command(exec_fn, cmd_arg, sock_out, sock_in, NULL, pid_out);
-@@ -159,6 +167,7 @@ static void cli_proxy_cmd(int *sock_in, int *sock_out, pid_t *pid_out) {
+@@ -159,6 +167,7 @@ static void cli_proxy_cmd(int *sock_in,
  cleanup:
  	m_free(cli_opts.proxycmd);
  	m_free(cmd_arg);
diff --git a/package/network/services/dropbear/patches/100-pubkey_path.patch b/package/network/services/dropbear/patches/100-pubkey_path.patch
index 307762fec0..5aafdffe67 100644
--- a/package/network/services/dropbear/patches/100-pubkey_path.patch
+++ b/package/network/services/dropbear/patches/100-pubkey_path.patch
@@ -1,29 +1,55 @@
+ src/svr-authpubkey.c | 59 ++++++++++++++++++++++++++++++++++++++++++++++++----
+ 1 file changed, 55 insertions(+), 4 deletions(-)
+
 --- a/src/svr-authpubkey.c
 +++ b/src/svr-authpubkey.c
-@@ -435,20 +435,45 @@ out:
- /* Returns the full path to the user's authorized_keys file in an
-  * allocated string which caller must free. */
- static char *authorized_keys_filepath() {
-+	static const char * const global_authkeys_dir = "/etc/dropbear";
-+	/* strlen(global_authkeys_dir) */
-+	#define  n_global_authkeys_dir  13
-+	static const char * const authkeys_file = "authorized_keys";
-+	/* strlen(authkeys_file) */
-+	#define  n_authkeys_file  15
+@@ -79,6 +79,39 @@ static void send_msg_userauth_pk_ok(cons
+ 		const unsigned char* keyblob, unsigned int keybloblen);
+ static int checkfileperm(char * filename);
+ 
++static const char * const global_authkeys_dir = "/etc/dropbear";
++/* strlen(global_authkeys_dir) */
++#define  n_global_authkeys_dir  13
++static const char * const authkeys_file = "authorized_keys";
++/* strlen(authkeys_file) */
++#define  n_authkeys_file  15
++
++/* OpenWrt-specific:
++   use OpenWrt' global authorized keys directory if:
++   1. logging as uid 0 (typically root).
++   2. "svr_opts.authorized_keys_dir" is set to default i.e. no "-D" option was specified
++      OR
++      "-D" option is specified as homedir-relative path ("~" or "~/...")
++      OR
++      "-D" option is specified as "/etc/dropbear".
++ */
++static int is_openwrt_defaults(void) {
++	if (ses.authstate.pw_uid != 0) return 0;
++	switch (svr_opts.authorized_keys_dir[0]) {
++		case '~':
++			switch (svr_opts.authorized_keys_dir[1]) {
++				case 0:
++					return 1;
++				case '/':
++					return 1;
++			}
++			break;
++		case '/':
++			return (strcmp(svr_opts.authorized_keys_dir, global_authkeys_dir) == 0);
++	}
++	return 0;
++}
 +
+ /* process a pubkey auth request, sending success or failure message as
+  * appropriate */
+ void svr_auth_pubkey(int valid_user) {
+@@ -439,16 +472,22 @@ out:
+ static char *authorized_keys_filepath() {
  	size_t len = 0;
  	char *pathname = NULL, *dir = NULL;
 -	const char *filename = "authorized_keys";
 +
-+	/* OpenWrt-specific:
-+	   use OpenWrt' global authorized keys directory if:
-+	   1. logging as uid 0 (typically root)
-+	   2. "svr_opts.authorized_keys_dir" is set to default i.e. no "-D" option was specified
-+	 */
-+	while (1) {
-+		if (ses.authstate.pw_uid != 0) break;
-+		if (svr_opts.authorized_keys_dir[0] == '/') break;
-+
++	if (is_openwrt_defaults()) {
 +		len = n_global_authkeys_dir + n_authkeys_file + 2;
 +		pathname = m_malloc(len);
 +		snprintf(pathname, len, "%s/%s", global_authkeys_dir, authkeys_file);
@@ -42,10 +68,29 @@
 +	snprintf(pathname, len, "%s/%s", dir, authkeys_file);
  	m_free(dir);
  	return pathname;
-+
-+	/* not needed anymore */
-+	#undef  n_global_authkeys_dir
-+	#undef  n_authkeys_file
  }
+@@ -549,11 +588,23 @@ out:
+  * When this path is inside the user's home dir it checks up to and including
+  * the home dir, otherwise it checks every path component. */
+ static int checkpubkeyperms() {
+-	char *path = authorized_keys_filepath(), *sep = NULL;
++	char *path = NULL, *sep = NULL;
+ 	int ret = DROPBEAR_SUCCESS;
  
- /* Checks whether a specified publickey (and associated algorithm) is an
++	if (is_openwrt_defaults()) {
++		TRACE(("enter checkpubkeyperms/openwrt"))
++		if (checkfileperm(global_authkeys_dir) != DROPBEAR_SUCCESS) {
++			TRACE(("checkpubkeyperms: bad perm on %s", global_authkeys_dir))
++			ret = DROPBEAR_FAILURE;
++		}
++		TRACE(("leave checkpubkeyperms/openwrt"))
++		return ret;
++	}
++
+ 	TRACE(("enter checkpubkeyperms"))
+ 
++	path = authorized_keys_filepath();
++
+ 	/* Walk back up path checking permissions, stopping at either homedir,
+ 	 * or root if the path is outside of the homedir. */
+ 	while ((sep = strrchr(path, '/')) != NULL) {



From lede-commits at lists.infradead.org  Thu Aug  7 07:57:56 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 10:57:56 -0400
Subject: [openwrt/openwrt]  kernel: Add kmod-w1-slave-ds2438
In-Reply-To: <175457867642.1939124.15346593555215425263@git-01.infra.openwrt.org>
References: <175457867642.1939124.15346593555215425263@git-01.infra.openwrt.org>
Message-ID: <mailman.113771.1754578712.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0fa192a3a254a283db00792f82b0fdcd27922a79

commit 0fa192a3a254a283db00792f82b0fdcd27922a79
Author: Andres Heinloo <andres at gfz.de>
AuthorDate: Wed Aug 6 16:44:29 2025 +0200

    kernel: Add kmod-w1-slave-ds2438
    
    This patch adds support for building the ds2438 one-wire kernel module.
    
    Signed-off-by: Andres Heinloo <andres at gfz.de>
    Link: https://github.com/openwrt/openwrt/pull/19694
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/w1.mk | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/package/kernel/linux/modules/w1.mk b/package/kernel/linux/modules/w1.mk
index 9cba28da11..ba2f3d2fe4 100644
--- a/package/kernel/linux/modules/w1.mk
+++ b/package/kernel/linux/modules/w1.mk
@@ -174,3 +174,19 @@ define KernelPackage/w1-slave-ds2413/description
 endef
 
 $(eval $(call KernelPackage,w1-slave-ds2413))
+
+
+define KernelPackage/w1-slave-ds2438
+  TITLE:=DS2438 Smart Battery Monitor
+  KCONFIG:= \
+       CONFIG_W1_SLAVE_DS2438
+  FILES:=$(W1_SLAVES_DIR)/w1_ds2438.ko
+  AUTOLOAD:=$(call AutoProbe,w1_ds2438)
+  $(call AddDepends/w1)
+endef
+
+define KernelPackage/w1-slave-ds2438/description
+ Kernel module for 1-wire DS2438 Smart Battery Monitor support
+endef
+
+$(eval $(call KernelPackage,w1-slave-ds2438))



From lede-commits at lists.infradead.org  Thu Aug  7 08:30:35 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 11:30:35 -0400
Subject: [openwrt/openwrt]  realtek: dsa: rtl83xx: flush scheduled work on
 removal
In-Reply-To: <175458063557.2143878.662361855713596562@git-01.infra.openwrt.org>
References: <175458063557.2143878.662361855713596562@git-01.infra.openwrt.org>
Message-ID: <mailman.113808.1754581031.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/feec7cf34d27e3492f90d13c934c4a0c3b3df633

commit feec7cf34d27e3492f90d13c934c4a0c3b3df633
Author: Issam Hamdi <ih at simonwunderlich.de>
AuthorDate: Thu Feb 20 16:06:00 2025 +0100

    realtek: dsa: rtl83xx: flush scheduled work on removal
    
    The workqueue items don't need to be processed directly when they are
    scheduled. It can happen that they are simply processed at a much later
    time. It is therefore necessary to ensure that all workqueue items of a
    driver are no longer being processed before the driver (or structures of
    this driver) are destroyed.
    
    When skipping this step, the driver driver can cause a kernel Oops on
    reboot.
    
    Unfortunately, it is not recommended [1] to flush items out of the system
    workqueue - simply because this can cause deadlocks. The driver itself must
    have a private workqueue which is then flushed.
    
    [1] https://lkml.kernel.org/r/49925af7-78a8-a3dd-bce6-cfc02e1a9236 at I-love.SAKURA.ne.jp
    
    Signed-off-by: Issam Hamdi <ih at simonwunderlich.de>
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19570
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.12/drivers/net/dsa/rtl83xx/common.c    | 37 ++++++++++++++++++++--
 .../files-6.12/drivers/net/dsa/rtl83xx/dsa.c       |  6 ++--
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h   |  1 +
 3 files changed, 39 insertions(+), 5 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
index 7f96bdd82d..069faf7ed9 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
@@ -1330,7 +1330,7 @@ static int rtl83xx_netevent_event(struct notifier_block *this,
 
 		pr_debug("%s: updating neighbour on port %d, mac %016llx\n",
 			__func__, port, net_work->mac);
-		schedule_work(&net_work->work);
+		queue_work(priv->wq, &net_work->work);
 		if (err)
 			netdev_warn(dev, "failed to handle neigh update (err %d)\n", err);
 		break;
@@ -1452,7 +1452,7 @@ static int rtl83xx_fib_event(struct notifier_block *this, unsigned long event, v
 		break;
 	}
 
-	schedule_work(&fib_work->work);
+	queue_work(priv->wq, &fib_work->work);
 
 	return NOTIFY_DONE;
 }
@@ -1486,6 +1486,7 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
 	priv->ds->ops = &rtl83xx_switch_ops;
 	priv->ds->needs_standalone_vlan_filtering = true;
 	priv->dev = dev;
+	dev_set_drvdata(dev, priv);
 
 	err = devm_mutex_init(dev, &priv->reg_mutex);
 	if (err)
@@ -1583,10 +1584,16 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
 		return err;
 	}
 
+	priv->wq = create_singlethread_workqueue("rtl83xx");
+	if (!priv->wq) {
+		dev_err(dev, "Error creating workqueue: %d\n", err);
+		return -ENOMEM;
+	}
+
 	err = dsa_register_switch(priv->ds);
 	if (err) {
 		dev_err(dev, "Error registering switch: %d\n", err);
-		return err;
+		goto err_register_switch;
 	}
 
 	/* dsa_to_port returns dsa_port from the port list in
@@ -1694,13 +1701,37 @@ err_register_fib_nb:
 err_register_ne_nb:
 	unregister_netdevice_notifier(&priv->nb);
 err_register_nb:
+	dsa_switch_shutdown(priv->ds);
+err_register_switch:
+	destroy_workqueue(priv->wq);
+
 	return err;
 }
 
 static void rtl83xx_sw_remove(struct platform_device *pdev)
 {
+	struct rtl838x_switch_priv *priv = platform_get_drvdata(pdev);
+
+	if (!priv)
+		return;
+
 	/* TODO: */
 	pr_debug("Removing platform driver for rtl83xx-sw\n");
+
+	/* unregister notifiers which will create workqueue entries with
+	 * references to the switch structures. Also stop self-arming delayed
+	 * work items to avoid them still accessing the DSA structures
+	 * when they are getting shut down.
+	 */
+	unregister_fib_notifier(&init_net, &priv->fib_nb);
+	unregister_netevent_notifier(&priv->ne_nb);
+	cancel_delayed_work_sync(&priv->counters_work);
+
+	dsa_switch_shutdown(priv->ds);
+
+	destroy_workqueue(priv->wq);
+
+	dev_set_drvdata(&pdev->dev, NULL);
 }
 
 static const struct of_device_id rtl83xx_switch_of_ids[] = {
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
index a14b502cf1..17a8b46f0c 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
@@ -1236,7 +1236,8 @@ static void rtldsa_poll_counters(struct work_struct *work)
 		spin_unlock(&counters->lock);
 	}
 
-	schedule_delayed_work(&priv->counters_work, RTLDSA_COUNTERS_POLL_INTERVAL);
+	queue_delayed_work(priv->wq, &priv->counters_work,
+			   RTLDSA_COUNTERS_POLL_INTERVAL);
 }
 
 static void rtldsa_init_counters(struct rtl838x_switch_priv *priv)
@@ -1254,7 +1255,8 @@ static void rtldsa_init_counters(struct rtl838x_switch_priv *priv)
 	}
 
 	INIT_DELAYED_WORK(&priv->counters_work, rtldsa_poll_counters);
-	schedule_delayed_work(&priv->counters_work, RTLDSA_COUNTERS_POLL_INTERVAL);
+	queue_delayed_work(priv->wq, &priv->counters_work,
+			   RTLDSA_COUNTERS_POLL_INTERVAL);
 }
 
 static void rtldsa_get_strings(struct dsa_switch *ds,
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
index 896e9ab24b..18405bdc02 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
@@ -1143,6 +1143,7 @@ struct rtl838x_switch_priv {
 	u32 lag_primary[MAX_LAGS];
 	u32 is_lagmember[57];
 	u64 lagmembers;
+	struct workqueue_struct *wq;
 	struct notifier_block nb;  /* TODO: change to different name */
 	struct notifier_block ne_nb;
 	struct notifier_block fib_nb;



From lede-commits at lists.infradead.org  Thu Aug  7 08:38:18 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 11:38:18 -0400
Subject: [openwrt/openwrt]  ath79: fix LED GPIOs for COMFAST CF-EW71 v2
In-Reply-To: <175458109883.2191327.9546909621022449148@git-01.infra.openwrt.org>
References: <175458109883.2191327.9546909621022449148@git-01.infra.openwrt.org>
Message-ID: <mailman.113811.1754581102.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9ce23ac84009d720bb6d65605508bf8a737b184d

commit 9ce23ac84009d720bb6d65605508bf8a737b184d
Author: Felix Golatofski <git at xdfr.de>
AuthorDate: Mon Aug 4 16:59:39 2025 +0200

    ath79: fix LED GPIOs for COMFAST CF-EW71 v2
    
    The vendor DTS defined incorrect GPIOs for the LEDs, which caused them
    to not function properly. Initially, the WAN, WLAN LEDs appeared to
    work, but further testing showed that they were non-functional.
    
    This patch corrects the GPIO assignments in the DTS, restoring full LED
    functionality including blinking, except the power LED which cannot be
    software controlled.
    
    Tested on a CF-EW71 v2 unit.
    
    Fixes: ee3a6adc6c22 ("ath79: add support for Comfast CF-EW71 v2")
    Signed-off-by: Felix Golatofski <git at xdfr.de>
    Link: https://github.com/openwrt/openwrt/pull/19665
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts b/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts
index c5a96c6613..934cb19a58 100644
--- a/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts
@@ -32,13 +32,13 @@
 		led_wan: wan {
 			function = LED_FUNCTION_WAN;
 			color = <LED_COLOR_ID_BLUE>;
-			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan {
 			function = LED_FUNCTION_WLAN;
 			color = <LED_COLOR_ID_BLUE>;
-			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};
 	};



From lede-commits at lists.infradead.org  Thu Aug  7 08:42:54 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 11:42:54 -0400
Subject: [openwrt/openwrt]  ramips: add support for SIM SIMAX1800U
In-Reply-To: <175458137432.2219168.6449277465087922730@git-01.infra.openwrt.org>
References: <175458137432.2219168.6449277465087922730@git-01.infra.openwrt.org>
Message-ID: <mailman.113814.1754581390.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1199a7aad67a820b961720dafc658a2d8b6a2386

commit 1199a7aad67a820b961720dafc658a2d8b6a2386
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Wed Jul 16 22:30:26 2025 +0800

    ramips: add support for SIM SIMAX1800U
    
    SIM SIMAX1800U has the similar hardware design as the SIMAX1800T. The
    only difference is the Ethernet portmap.
    
    Specification
    -------------
    - SoC       : Mediatek MT7621
    - RAM       : 256 MiB DDR3
    - Flash     : 128 MiB NAND Flash
    - WLAN      : Mediatek MT7905 DBDC
      - 2.4 GHz : 2x2 MIMO WiFi6
      - 5 GHz   : 2x2 MIMO WiFi6
    - Ethernet  : MT7621 built-in 10/100/1000 Mbps 1x WAN; 3x LAN
    - UART      : 3.3V, 115200n8
    - Buttons   : 1x RESET; 1x WPS/MESH
    - LEDs      : 1x Multi-Color(Blue;Green;Red)
    - Power     : DC 12V1A
    - CMIIT ID  : 2022AP7163
    - TFTP IP   :
      - server  : 192.168.1.254
      - router  : 192.168.1.28
    
    TFTP Installation(recommend)
    ------------
    1. Set local tftp server IP "192.168.1.254" and NetMask "255.255.255.0".
    2. Rename initramfs-kernel.bin to "factory.bin" and put it in the root
       directory of the tftp server. tftpd64 is a good choice for Windows.
    3. Remove all Ethernet cables and WiFi connections from the PC, except
       for the one connected to the SIMAX1800U. Start the TFTP server, plug
       in the power adapter and wait for the OpenWrt system to boot.
    4. Backup "firmware" partition and rename it to "firmware.bin". We need
       it to back to the stock firmware.
    5. Use "fw_printenv" command to list envs. If "firmware_select=2" is
       observed then set u-boot env variable via command:
       `fw_setenv firmware_select 1`
    6. Apply sysupgrade.bin in OpenWrt LuCI.
    
    Web UI Installation
    ------------
    1. Apply update by uploading initramfs-factory.bin to the web UI.
    2. Use "fw_printenv" command to list envs. If "firmware_select=2" is
       observed then set u-boot env variable via command:
       `fw_setenv firmware_select 1`
    3. Apply squashfs-sysupgrade.bin in OpenWrt LuCI.
    
    Return to Stock Firmware
    ----------------------------
      Restore the backup firmware partition in the installation step 4.
    
    MAC addresses
    -------------
    +---------+-------------------+
    |         | MAC example       |
    +---------+-------------------+
    | LABEL   | 98:xx:xx:xx:xx:b2 |
    | LAN     | 98:xx:xx:xx:xx:b5 |
    | WAN     | 98:xx:xx:xx:xx:b2 |
    | WLAN2G  | 98:xx:xx:xx:xx:b4 |
    | WLAN5G  | 9a:xx:xx:xx:xx:b4 |
    +---------+-------------------+
    
    Tips:
    -----------
      User can use `TFTP Installation` method to recover a brick device.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19455
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi |  8 -------
 .../linux/ramips/dts/mt7621_haier_har-20s2u1.dts   | 20 ++++++++++++++++
 target/linux/ramips/dts/mt7621_sim_simax1800t.dts  | 20 ++++++++++++++++
 target/linux/ramips/dts/mt7621_sim_simax1800u.dts  | 28 ++++++++++++++++++++++
 target/linux/ramips/image/mt7621.mk                |  7 ++++++
 .../mt7621/base-files/etc/board.d/02_network       |  1 +
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac        |  3 ++-
 .../mt7621/base-files/lib/upgrade/platform.sh      |  1 +
 8 files changed, 79 insertions(+), 9 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi
index dd7b72707e..8bd63967c0 100644
--- a/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi
+++ b/target/linux/ramips/dts/mt7621_haier-sim_wr1800k.dtsi
@@ -67,16 +67,10 @@
 &gmac1 {
 	status = "okay";
 	label = "wan";
-	phy-handle = <&ethphy4>;
-
 	nvmem-cells = <&macaddr_factory_8004 (-3)>;
 	nvmem-cell-names = "mac-address";
 };
 
-&ethphy4 {
-	/delete-property/ interrupts;
-};
-
 &nand {
 	status = "okay";
 
@@ -166,7 +160,6 @@
 	ports {
 		port at 1 {
 			status = "okay";
-			label = "lan3";
 		};
 
 		port at 2 {
@@ -176,7 +169,6 @@
 
 		port at 3 {
 			status = "okay";
-			label = "lan1";
 		};
 	};
 };
diff --git a/target/linux/ramips/dts/mt7621_haier_har-20s2u1.dts b/target/linux/ramips/dts/mt7621_haier_har-20s2u1.dts
index dede7dbb20..8c1b23f8eb 100644
--- a/target/linux/ramips/dts/mt7621_haier_har-20s2u1.dts
+++ b/target/linux/ramips/dts/mt7621_haier_har-20s2u1.dts
@@ -6,3 +6,23 @@
 	compatible = "haier,har-20s2u1", "mediatek,mt7621-soc";
 	model = "Haier HAR-20S2U1";
 };
+
+&ethphy4 {
+	/delete-property/ interrupts;
+};
+
+&gmac1 {
+	phy-handle = <&ethphy4>;
+};
+
+&switch0 {
+	ports {
+		port at 1 {
+			label = "lan3";
+		};
+
+		port at 3 {
+			label = "lan1";
+		};
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_sim_simax1800t.dts b/target/linux/ramips/dts/mt7621_sim_simax1800t.dts
index 3c5c9179d2..b75af605bb 100644
--- a/target/linux/ramips/dts/mt7621_sim_simax1800t.dts
+++ b/target/linux/ramips/dts/mt7621_sim_simax1800t.dts
@@ -6,3 +6,23 @@
 	compatible = "sim,simax1800t", "mediatek,mt7621-soc";
 	model = "SIM SIMAX1800T";
 };
+
+&ethphy4 {
+	/delete-property/ interrupts;
+};
+
+&gmac1 {
+	phy-handle = <&ethphy4>;
+};
+
+&switch0 {
+	ports {
+		port at 1 {
+			label = "lan3";
+		};
+
+		port at 3 {
+			label = "lan1";
+		};
+	};
+};
diff --git a/target/linux/ramips/dts/mt7621_sim_simax1800u.dts b/target/linux/ramips/dts/mt7621_sim_simax1800u.dts
new file mode 100644
index 0000000000..70fff673f5
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_sim_simax1800u.dts
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_haier-sim_wr1800k.dtsi"
+
+/ {
+	compatible = "sim,simax1800u", "mediatek,mt7621-soc";
+	model = "SIM SIMAX1800U";
+};
+
+&ethphy0 {
+	/delete-property/ interrupts;
+};
+
+&gmac1 {
+	phy-handle = <&ethphy0>;
+};
+
+&switch0 {
+	ports {
+		port at 1 {
+			label = "lan1";
+		};
+
+		port at 3 {
+			label = "lan3";
+		};
+	};
+};
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index 2549f353e9..578c293224 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -2615,6 +2615,13 @@ define Device/sim_simax1800t
 endef
 TARGET_DEVICES += sim_simax1800t
 
+define Device/sim_simax1800u
+  $(Device/haier-sim_wr1800k)
+  DEVICE_VENDOR := SIM
+  DEVICE_MODEL := SIMAX1800U
+endef
+TARGET_DEVICES += sim_simax1800u
+
 define Device/snr_snr-cpe-me1
   $(Device/dsa-migration)
   $(Device/uimage-lzma-loader)
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
index 1e194fef5f..c12c46dc10 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/02_network
@@ -22,6 +22,7 @@ ramips_setup_interfaces()
 	mercusys,mr70x-v1|\
 	netgear,wax202|\
 	sim,simax1800t|\
+	sim,simax1800u|\
 	tplink,mr600-v2-eu|\
 	xiaomi,mi-router-3-pro|\
 	xiaomi,mi-router-ac2100|\
diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 0c9c98399a..21ab3f16ea 100644
--- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -105,7 +105,8 @@ case "$board" in
 		;;
 	haier,har-20s2u1|\
 	jcg,y2|\
-	sim,simax1800t)
+	sim,simax1800t|\
+	sim,simax1800u)
 		[ "$PHYNBR" = "1" ] && \
 			macaddr_setbit_la "$(mtd_get_mac_binary factory 0x4)" > /sys${DEVPATH}/macaddress
 		;;
diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
index 9180118f3d..a1f14f9d78 100755
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
@@ -138,6 +138,7 @@ platform_do_upgrade() {
 	sercomm,na502|\
 	sercomm,na502s|\
 	sim,simax1800t|\
+	sim,simax1800u|\
 	tplink,ec330-g5u-v1|\
 	wifire,s1500-nbn|\
 	xiaomi,mi-router-3g|\



From lede-commits at lists.infradead.org  Thu Aug  7 08:42:55 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 11:42:55 -0400
Subject: [openwrt/openwrt]  uboot-envtools: ramips: add env config for SIM
 SIMAX1800U
In-Reply-To: <175458137432.2219168.6449277465087922730@git-01.infra.openwrt.org>
References: <175458137432.2219168.6449277465087922730@git-01.infra.openwrt.org>
Message-ID: <mailman.113815.1754581390.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c65ae24cf13ec9cd158d2ffb2f36cd90c7b5781c

commit c65ae24cf13ec9cd158d2ffb2f36cd90c7b5781c
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Wed Jul 16 22:30:26 2025 +0800

    uboot-envtools: ramips: add env config for SIM SIMAX1800U
    
    This newly supported device has the same env partition size and
    offset as SIMAX1800T.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19455
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/boot/uboot-tools/uboot-envtools/files/ramips | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/boot/uboot-tools/uboot-envtools/files/ramips b/package/boot/uboot-tools/uboot-envtools/files/ramips
index 8d53524a2c..3ec3da6988 100644
--- a/package/boot/uboot-tools/uboot-envtools/files/ramips
+++ b/package/boot/uboot-tools/uboot-envtools/files/ramips
@@ -85,7 +85,8 @@ zyxel,wsm20)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
 	;;
 haier,har-20s2u1|\
-sim,simax1800t)
+sim,simax1800t|\
+sim,simax1800u)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x20000"
 	ubootenv_add_uci_sys_config "/dev/mtd1" "0x40000" "0x40000" "0x20000"
 	;;



From lede-commits at lists.infradead.org  Thu Aug  7 09:19:50 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 12:19:50 -0400
Subject: [openwrt/openwrt]  mediatek: add support for OpenFi 6C
In-Reply-To: <175458359060.2433351.9297971559399683952@git-01.infra.openwrt.org>
References: <175458359060.2433351.9297971559399683952@git-01.infra.openwrt.org>
Message-ID: <mailman.113844.1754583976.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/536a25ebf849b2de22792786b4c6f0c15471ee93

commit 536a25ebf849b2de22792786b4c6f0c15471ee93
Author: Jiasheng Zhu <newbanyaya at gmail.com>
AuthorDate: Thu Jul 24 21:09:30 2025 +0800

    mediatek: add support for OpenFi 6C
    
    OpenFi 6C is a portable Wi-Fi 6 travel router based on MediaTek MT7981B+MT7976CN.
    
    Two slightly different versions have been sold. The V1 board has a green color and lacks the modem LED. The V2 board is black and has a LED for the modem. The firmware should work on both of them.
    
    Specifications:
    - SoC: MediaTek MT7981B (Filogic 820) 1.3GHz dual-core ARM Cortex-A53
    - RAM: 1GB DDR4
    - Flash: 256MB SPI NAND
    - Wireless: 2.4GHz/5GHz 802.11ax
    - Ethernet: 1x 10/100/1000M LAN
    - USB: 1x USB 3.0 Type-A port
    - Expansion: M.2 slot for 5G modem
    - Cooling: PWM-controlled fan
    - Buttons: Reset, Mode switch
    - LEDs: System, Ethernet, 5G WiFi, Modem status
    
    **Installation via U-Boot web page**
    
    1. Set static IP 192.168.21.2/255.255.255.0 on your computer.
    2. Connect to the Ethernet port and hold the reset button while booting the device. Wait for 6-8 seconds, and release the reset button.
    3. Open U-boot web page on your browser at http://192.168.21.1
    4. Select the OpenWRT sysupgrade image, upload it, and start the upgrade.
    5. Wait for automatic reboot.
    
    **Installation via sysupgrade**
    
    Flash the sysupgrade file via LuCI upgrade page without saving the settings.
    
    Signed-off-by: Jiasheng Zhu <newbanyaya at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19512
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/mediatek/dts/mt7981b-openfi-6c.dts    | 272 +++++++++++++++++++++
 .../filogic/base-files/etc/board.d/01_leds         |   3 +
 .../filogic/base-files/etc/board.d/02_network      |   1 +
 target/linux/mediatek/image/filogic.mk             |  13 +
 4 files changed, 289 insertions(+)

diff --git a/target/linux/mediatek/dts/mt7981b-openfi-6c.dts b/target/linux/mediatek/dts/mt7981b-openfi-6c.dts
new file mode 100644
index 0000000000..dd62098816
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-openfi-6c.dts
@@ -0,0 +1,272 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+#include "mt7981b.dtsi"
+
+/ {
+	model = "OpenFi 6C";
+	compatible = "openfi,6c", "mediatek,mt7981b";
+
+	aliases {
+		led-boot = &led_sys_green;
+		led-failsafe = &led_sys_green;
+		led-running = &led_sys_green;
+		led-upgrade = &led_sys_green;
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+		};
+
+		mode {
+			label = "mode";
+			linux,input-type = <EV_SW>;
+			linux,code = <BTN_0>;
+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		led_sys_green: led-0 {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 2 GPIO_ACTIVE_LOW>;
+		};
+
+		led-1 {
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 34 GPIO_ACTIVE_LOW>;
+		};
+
+		led-2 {
+			function = LED_FUNCTION_WLAN_5GHZ;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 35 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
+		};
+
+		led-3 {
+			function = LED_FUNCTION_MOBILE;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio-export {
+		compatible = "gpio-export";
+
+		modem_power {
+			gpio-export,name = "modem_power";
+			gpio-export,output = <1>;
+			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
+		};
+
+		modem_reset {
+			gpio-export,name = "modem_reset";
+			gpio-export,output = <1>;
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+		};
+
+		modem_reset_2 {
+			gpio-export,name = "modem_reset_2";
+			gpio-export,output = <0>;
+			gpios = <&pio 12 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	usb_vbus: regulator-usb-vbus {
+		compatible = "regulator-fixed";
+		regulator-name = "usb_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&pio 8 GPIO_ACTIVE_LOW>;
+		regulator-boot-on;
+	};
+};
+
+&fan {
+	pwms = <&pwm 0 40000 0>;
+	status = "okay";
+};
+
+&eth {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mdio_pins>;
+	status = "okay";
+
+	gmac1: mac at 1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+		nvmem-cells = <&macaddr_factory_4 0>;
+		nvmem-cell-names = "mac-address";
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	status = "okay";
+
+	spi_nand: flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-nand";
+		reg = <0>;
+		spi-max-frequency = <52000000>;
+
+		spi-cal-enable;
+		spi-cal-mode = "read-data";
+		spi-cal-datalen = <7>;
+		spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
+		spi-cal-addrlen = <5>;
+		spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
+
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+		mediatek,nmbm;
+		mediatek,bmt-max-ratio = <1>;
+		mediatek,bmt-max-reserved-blocks = <64>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "BL2";
+				reg = <0x00000 0x0100000>;
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "u-boot-env";
+				reg = <0x0100000 0x0080000>;
+			};
+
+			factory: partition at 180000 {
+				label = "Factory";
+				reg = <0x180000 0x0200000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x1000>;
+					};
+
+					macaddr_factory_4: macaddr at 4 {
+						compatible = "mac-base";
+						reg = <0x4 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+
+			partition at 380000 {
+				label = "FIP";
+				reg = <0x380000 0x0200000>;
+				read-only;
+			};
+
+			partition at 580000 {
+				label = "hw";
+				reg = <0x0580000 0x0080000>;
+				read-only;
+			};
+
+			partition at 600000 {
+				label = "cfg";
+				reg = <0x0600000 0x0080000>;
+				read-only;
+			};
+
+			partition at 680000 {
+				label = "ubi";
+				reg = <0x680000 0xe980000>;
+			};
+		};
+	};
+};
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+	};
+
+	pwm_pins: pwm-pins {
+		mux {
+			function = "pwm";
+			groups = "pwm0_0", "pwm1_0";
+		};
+	};
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+	vbus-supply = <&usb_vbus>;
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&wifi {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+	status = "okay";
+
+	band at 0 {
+		reg = <0>;
+		nvmem-cells = <&macaddr_factory_4 2>;
+		nvmem-cell-names = "mac-address";
+	};
+
+	band at 1 {
+		reg = <1>;
+		nvmem-cells = <&macaddr_factory_4 3>;
+		nvmem-cell-names = "mac-address";
+	};
+};
+
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm_pins>;
+	status = "okay";
+};
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
index f88f01cde3..6d4c7903bc 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
@@ -127,6 +127,9 @@ openembed,som7981)
 	ucidef_set_led_netdev "lanact" "LANACT" "amber:lan" "eth1" "rx tx"
 	ucidef_set_led_netdev "lanlink" "LANLINK" "green:lan" "eth1" "link"
 	;;
+openfi,6c)
+	ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0" "link tx rx"
+	;;
 openwrt,one)
 	ucidef_set_led_netdev "wanact" "WANACT" "mdio-bus:0f:green:wan" "eth0" "rx tx"
 	ucidef_set_led_netdev "wanlink" "WANLINK" "mdio-bus:0f:amber:wan" "eth0" "link"
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
index f9b7440664..802df4608c 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -93,6 +93,7 @@ mediatek_setup_interfaces()
 	cudy,ap3000-v1|\
 	cudy,re3000-v1|\
 	netgear,wax220|\
+	openfi,6c|\
 	ubnt,unifi-6-plus|\
 	wavlink,wl-wn573hx3|\
 	zyxel,nwa50ax-pro)
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 040fe36cd7..e9e74efa1f 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -1646,6 +1646,19 @@ define Device/openembed_som7981
 endef
 TARGET_DEVICES += openembed_som7981
 
+define Device/openfi_6c
+  DEVICE_VENDOR := OpenFi
+  DEVICE_MODEL := 6C
+  DEVICE_DTS := mt7981b-openfi-6c
+  DEVICE_DTS_DIR := ../dts
+  DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3
+  KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
+  KERNEL_INITRAMFS := kernel-bin | lzma | \
+        fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += openfi_6c
+
 define Device/openwrt_one
   DEVICE_VENDOR := OpenWrt
   DEVICE_MODEL := One



From lede-commits at lists.infradead.org  Thu Aug  7 09:34:00 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 12:34:00 -0400
Subject: [openwrt/openwrt]  realtek: rtl931x: Fix VLAN tagging and untagging
In-Reply-To: <175458444089.2506690.9804249817999574375@git-01.infra.openwrt.org>
References: <175458444089.2506690.9804249817999574375@git-01.infra.openwrt.org>
Message-ID: <mailman.113853.1754584445.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e45d783bce28c647c29a56f5be69da1b2a1db52c

commit e45d783bce28c647c29a56f5be69da1b2a1db52c
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Tue Jun 17 12:46:42 2025 +0000

    realtek: rtl931x: Fix VLAN tagging and untagging
    
    * In RTL931x, bit 31 of the (4th column) of 802_1Q_VLAN_QINQ table
      indicates the validity of l2 tunnel. Before bit 63 (3rd column)
      was being checked for validity of l2 tunnel.
    
    * The untagged_ports requires 64 bits to represent 56 ports. Do not
      store u64 in u32 variable
    
    * First 24 ports are represented in the 2nd register not just first 20
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19576
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
index ed6674e044..000e414000 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
@@ -204,9 +204,8 @@ static void rtl931x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
 	info->hash_uc_fid = !!(x & BIT(31));
 	info->hash_mc_fid = !!(x & BIT(30));
 	info->if_id = (x >> 20) & 0x3ff;
-	info->profile_id = (x >> 16) & 0xf;
 	info->multicast_grp_mask = x & 0xffff;
-	if (x & BIT(31))
+	if (y & BIT(31))
 		info->l2_tunnel_list_id = y >> 18;
 	else
 		info->l2_tunnel_list_id = -1;
@@ -217,21 +216,19 @@ static void rtl931x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
 	/* Read UNTAG table via table register 3 */
 	r = rtl_table_get(RTL9310_TBL_3, 0);
 	rtl_table_read(r, vlan);
-	v = ((u64)sw_r32(rtl_table_data(r, 0))) << 25;
-	v |= sw_r32(rtl_table_data(r, 1)) >> 7;
-	rtl_table_release(r);
+	info->untagged_ports = ((u64)sw_r32(rtl_table_data(r, 0))) << 25;
+	info->untagged_ports |= sw_r32(rtl_table_data(r, 1)) >> 7;
 
-	info->untagged_ports = v;
+	rtl_table_release(r);
 }
 
 static void rtl931x_vlan_set_tagged(u32 vlan, struct rtl838x_vlan_info *info)
 {
+	struct table_reg *r;
 	u32 v, w, x, y;
-	/* Access VLAN table (1) via register 0 */
-	struct table_reg *r = rtl_table_get(RTL9310_TBL_0, 3);
 
 	v = info->tagged_ports >> 25;
-	w = (info->tagged_ports & 0x1fffff) << 7;
+	w = (info->tagged_ports & GENMASK(24, 0)) << 7;
 	w |= info->fid & 0x7f;
 	x = info->hash_uc_fid ? BIT(31) : 0;
 	x |= info->hash_mc_fid ? BIT(30) : 0;
@@ -245,6 +242,7 @@ static void rtl931x_vlan_set_tagged(u32 vlan, struct rtl838x_vlan_info *info)
 		y = 0;
 	}
 
+	r = rtl_table_get(RTL9310_TBL_0, 3);
 	sw_w32(v, rtl_table_data(r, 0));
 	sw_w32(w, rtl_table_data(r, 1));
 	sw_w32(x, rtl_table_data(r, 2));



From lede-commits at lists.infradead.org  Thu Aug  7 09:42:03 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 12:42:03 -0400
Subject: [openwrt/openwrt]  realtek: rtl931x: Add smi_poll_ctrl
In-Reply-To: <175458492259.2555973.1577536617778498786@git-01.infra.openwrt.org>
References: <175458492259.2555973.1577536617778498786@git-01.infra.openwrt.org>
Message-ID: <mailman.113854.1754584925.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/62938204dbc0c3faf7fd6b9a5f59103167b71f27

commit 62938204dbc0c3faf7fd6b9a5f59103167b71f27
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Mon Jul 7 17:18:17 2025 +0000

    realtek: rtl931x: Add smi_poll_ctrl
    
    The comment incorrectly stated that RTL931X doesn't have smi_poll_ctrl. But
    there is actually a register for using it.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19574
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
index 000e414000..05bf68a744 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
@@ -1639,7 +1639,7 @@ const struct rtl838x_reg rtl931x_reg = {
 	.l2_ctrl_1 = RTL931X_L2_AGE_CTRL,
 	.l2_port_aging_out = RTL931X_L2_PORT_AGE_CTRL,
 	.set_ageing_time = rtl931x_set_ageing_time,
-	/* .smi_poll_ctrl does not exist */
+	.smi_poll_ctrl = RTL931X_SMI_PORT_POLLING_CTRL,
 	.l2_tbl_flush_ctrl = RTL931X_L2_TBL_FLUSH_CTRL,
 	.exec_tbl0_cmd = rtl931x_exec_tbl0_cmd,
 	.exec_tbl1_cmd = rtl931x_exec_tbl1_cmd,



From lede-commits at lists.infradead.org  Thu Aug  7 09:42:05 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 12:42:05 -0400
Subject: [openwrt/openwrt]  realtek: rtl93xx: Add GPIO access register
 definitions
In-Reply-To: <175458492259.2555973.1577536617778498786@git-01.infra.openwrt.org>
References: <175458492259.2555973.1577536617778498786@git-01.infra.openwrt.org>
Message-ID: <mailman.113855.1754584926.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4c4cecab2fdbd26a72cfb91269143842bdeff6ee

commit 4c4cecab2fdbd26a72cfb91269143842bdeff6ee
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Mon Jul 7 15:58:19 2025 +0000

    realtek: rtl93xx: Add GPIO access register definitions
    
    mach-rtl83xx.h contained the required register definitions for older SoC
    families but was missing it for RTL930x and RTL931x.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19574
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h          | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h b/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
index 263f246275..2946674036 100644
--- a/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
+++ b/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
@@ -236,12 +236,22 @@
 #define RTL930X_LED_GLB_CTRL		(0xCC00)
 #define RTL931X_LED_GLB_CTRL		(0x0600)
 
+#define RTL930X_EXT_GPIO_GLB_CTRL	(0xC600)
+#define RTL931X_EXT_GPIO_GLB_CTRL	(0x07D4)
+
 #define RTL838X_EXT_GPIO_DIR		(0xA08C)
 #define RTL839X_EXT_GPIO_DIR		(0x0214)
+#define RTL930X_EXT_GPIO_DIR		(0xC608)
+#define RTL931X_EXT_GPIO_DIR		(0x07DC)
 #define RTL838X_EXT_GPIO_DATA		(0xA094)
 #define RTL839X_EXT_GPIO_DATA		(0x021c)
+#define RTL930X_EXT_GPIO_DATA		(0xC614)
+#define RTL931X_EXT_GPIO_DATA		(0x07E8)
 #define RTL838X_EXT_GPIO_INDRT_ACCESS	(0xA09C)
 #define RTL839X_EXT_GPIO_INDRT_ACCESS	(0x0224)
+#define RTL930X_EXT_GPIO_INDRT_ACCESS	(0xC620)
+#define RTL931X_EXT_GPIO_INDRT_ACCESS	(0x07F4)
+
 #define RTL838X_EXTRA_GPIO_CTRL		(0xA0E0)
 #define RTL838X_DMY_REG5		(0x0144)
 #define RTL838X_EXTRA_GPIO_CTRL		(0xA0E0)



From lede-commits at lists.infradead.org  Thu Aug  7 09:42:04 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 12:42:04 -0400
Subject: [openwrt/openwrt]  realtek: rtl931x: Fix size of TRK_MBR_CTRL group
 block
In-Reply-To: <175458492259.2555973.1577536617778498786@git-01.infra.openwrt.org>
References: <175458492259.2555973.1577536617778498786@git-01.infra.openwrt.org>
Message-ID: <mailman.113856.1754584927.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/92489f50c766c7c532b7a0230fd6181c840f7310

commit 92489f50c766c7c532b7a0230fd6181c840f7310
Author: Sven Eckelmann <sven at narfation.org>
AuthorDate: Wed Jan 29 19:23:33 2025 +0100

    realtek: rtl931x: Fix size of TRK_MBR_CTRL group block
    
    Each MBR ctrl block has 64 bits to store the 56 possible ports. The offsets
    between the groups is therefore also 64 bit.
    
    Signed-off-by: Sven Eckelmann <sven at narfation.org>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19574
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
index 05bf68a744..f6a098c701 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
@@ -179,9 +179,9 @@ static void rtl931x_stp_set(struct rtl838x_switch_priv *priv, u16 msti, u32 port
 	priv->r->exec_tbl0_cmd(cmd);
 }
 
-inline static int rtl931x_trk_mbr_ctr(int group)
+inline static int rtldsa_931x_trk_mbr_ctr(int group)
 {
-	return RTL931X_TRK_MBR_CTRL + (group << 2);
+	return RTL931X_TRK_MBR_CTRL + (group << 3);
 }
 
 static void rtl931x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
@@ -1675,7 +1675,7 @@ const struct rtl838x_reg rtl931x_reg = {
 	.vlan_port_keep_tag_set = rtl931x_vlan_port_keep_tag_set,
 	.vlan_port_pvidmode_set = rtl931x_vlan_port_pvidmode_set,
 	.vlan_port_pvid_set = rtl931x_vlan_port_pvid_set,
-	.trk_mbr_ctr = rtl931x_trk_mbr_ctr,
+	.trk_mbr_ctr = rtldsa_931x_trk_mbr_ctr,
 	.set_vlan_igr_filter = rtl931x_set_igr_filter,
 	.set_vlan_egr_filter = rtl931x_set_egr_filter,
 	.set_distribution_algorithm = rtl931x_set_distribution_algorithm,



From lede-commits at lists.infradead.org  Thu Aug  7 09:42:02 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 12:42:02 -0400
Subject: [openwrt/openwrt]  realtek: rtl931x: Sync family parameters with
 RTL930x
In-Reply-To: <175458492259.2555973.1577536617778498786@git-01.infra.openwrt.org>
References: <175458492259.2555973.1577536617778498786@git-01.infra.openwrt.org>
Message-ID: <mailman.113857.1754584930.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/56499702a3c8a0057568ea69442a53de80386fad

commit 56499702a3c8a0057568ea69442a53de80386fad
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Mon Jul 14 11:11:47 2025 +0200

    realtek: rtl931x: Sync family parameters with RTL930x
    
    Some of the parameters added to RTL9300_FAMILY_ID are missing for
    RTL9310_FAMILY_ID. Simply add the missing ones to keep sharing code between
    the two SoCs.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19574
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c  | 10 ++++++++++
 .../linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
index 069faf7ed9..2dd93de552 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
@@ -1536,6 +1536,9 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
 		priv->r = &rtl930x_reg;
 		priv->ds->num_ports = 29;
 		priv->fib_entries = 16384;
+		/* TODO A version based on CHIP_INFO and MODEL_NAME_INFO should
+		 * be constructed. For now, just set it to a static 'A'
+		 */
 		priv->version = RTL8390_VERSION_A;
 		priv->n_lags = 16;
 		sw_w32(1, RTL930X_ST_CTRL);
@@ -1553,9 +1556,16 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
 		priv->r = &rtl931x_reg;
 		priv->ds->num_ports = 57;
 		priv->fib_entries = 16384;
+		/* TODO A version based on CHIP_INFO and MODEL_NAME_INFO should
+		 * be constructed. For now, just set it to a static 'A'
+		 */
 		priv->version = RTL8390_VERSION_A;
 		priv->n_lags = 16;
+		sw_w32(1, RTL931x_ST_CTRL);
 		priv->l2_bucket_size = 8;
+		priv->n_pie_blocks = 16;
+		priv->port_ignore = 0x3f;
+		priv->n_counters = 2048;
 		break;
 	}
 	pr_debug("Chip version %c\n", priv->version);
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
index 18405bdc02..b8f543bd9e 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
@@ -276,6 +276,7 @@
 #define MV_ACT_COPY2CPU				3
 
 #define RTL930X_ST_CTRL				(0x8798)
+#define RTL931x_ST_CTRL				(0x8000)
 
 #define RTL930X_L2_PORT_SABLK_CTRL		(0x905c)
 #define RTL930X_L2_PORT_DABLK_CTRL		(0x9060)



From lede-commits at lists.infradead.org  Thu Aug  7 09:49:55 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 12:49:55 -0400
Subject: [openwrt/openwrt]  ramips: mt76x8: add support for Wodesys WD-R1208U
In-Reply-To: <175458539551.2621215.4714478065216177214@git-01.infra.openwrt.org>
References: <175458539551.2621215.4714478065216177214@git-01.infra.openwrt.org>
Message-ID: <mailman.113858.1754585399.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cbc2cdbb80ecb8ba9018ee4d6614e9d7a367efee

commit cbc2cdbb80ecb8ba9018ee4d6614e9d7a367efee
Author: Rani Hod <rani.hod at gmail.com>
AuthorDate: Sat Apr 19 19:44:02 2025 +0300

    ramips: mt76x8: add support for Wodesys WD-R1208U
    
    This commit adds support for a dual-band AC1200 wall plug
    manufactured by Shenzhen Century Xinyang Tech Co., Ltd.
    
    SoC:     Mediatek MT7628AN (MIPS 24KEc single core, 580 MHz)
    RAM:     128 MiB DDR2 (Hynix HY5PS1G1631C)
    ROM:     8 MiB SPI NOR (Zbit ZB25VQ64ASIG)
    Wired:   one FE RJ45 port (+ an unpopulated footprint for a 2nd)
    WiFi:    Mediatek MT7612E
    Ant.:    four 2 dBi external antennas (two 2.4GHz, two 5 GHz)
    LEDs:    - Power    (green, always on)
             - 2.4G     (green, controlled by MT7628)
             - 5G       (green, controlled by MT7612)
             - Extender (green, GPIO 37, used as status LED)
             - LAN      (green/yellow, controlled by RT3050 ESW)
    Buttons: WPS and reset (both connected to GPIO 38)
    Power:   5V 2-pin JST-XH on main PCB
             110/220V AC to 5V 1.5A DC on auxiliary PCB
    UART:    57600 8n1 3.3v, holes available on the PCB as J5
             pinout is (Gnd) (Tx) (Rx)
    MAC:     1C:BF:CE:xx:xx:xx       (2.4 GHz, label)
             1C:BF:CE:xx:xx:xx + 1   (LAN)
             1C:BF:CE:xx:xx:xx + 2   (WAN, not in use)
             1C:BF:CE:xx:xx:xx + 3   (5 GHz)
    
    Original firmware is Chaos Calmer 15.05.01 (kernel 3.10.108)
    with a few custom packages and a non-LuCI web interface.
    Telnet is enabled, requiring an unknown root password [1].
    Root password is also needed to access the router via UART console,
    but passwordless telnet can be enabled via a trivial web exploit [2]
    and then the root password can be removed by editing `/etc/shadow`.
    
    Installation: Upload `sysupgrade` binary via web interface at
      `http://192.168.188.1/settings.shtml`. Alternatively, remove
      root password and use u-boot menu to flash image via TFTP.
    
    Notes:
    - Device model in Chaos Calmer is "mtk-apsoc-demo".
    - It is sold under several brands, e.g., Fenvi and Linkavenir.
      It is available in two colors: white and black.
    - PCB is marked "WD206AD v1.0".
    - Instead of a standard ethernet transformer, the PCB has a few tiny
      SMD coils.
    - The housing is identical to the one used by a 2020 model,
      WD-R1203U, which is RTL8812-based. The older model has an FCC
      listing with external and internal images: ZNPWD-R1203U.
      The FCC listing contains a letter [3] claiming WD-R1203U and
      WD-R1208U are internally identical, but evidently they are not.
    
    [1] root:$1$7rmMiPJj$91iv9LWhfkZE/t7aCBdo.0:18388:0:99999:7:::
        This is the same hash as in Wodesys WD-R1802U.
        There are other root password hashes in `/etc/shadow_sf` and
        `/etc/shadow_yn`.
    [2] curl -X POST http://192.168.188.1/cgi-bin/adm.cgi \
        -d page=Lang -d langType="en;killall telnetd;telnetd -l /bin/sh"
    [3] https://fcc.report/FCC-ID/ZNPWD-R1203U/4767033
    
    Signed-off-by: Rani Hod <rani.hod at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19535
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../ramips/dts/mt7628an_wodesys_wd-r1208u.dts      | 148 +++++++++++++++++++++
 target/linux/ramips/image/mt76x8.mk                |   9 ++
 2 files changed, 157 insertions(+)

diff --git a/target/linux/ramips/dts/mt7628an_wodesys_wd-r1208u.dts b/target/linux/ramips/dts/mt7628an_wodesys_wd-r1208u.dts
new file mode 100644
index 0000000000..00cf5f80fe
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_wodesys_wd-r1208u.dts
@@ -0,0 +1,148 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "wodesys,wd-r1208u", "mediatek,mt7628an-soc";
+	model = "Wodesys WD-R1208U";
+
+	aliases {
+		led-boot = &led_status;
+		led-failsafe = &led_status;
+		led-running = &led_status;
+		led-upgrade = &led_status;
+		label-mac-device = &wmac;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		button-reset { // both reset and wps button
+			label = "reset";
+			gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_status: led-0 {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+		};
+
+		// non-GPIO LEDs:
+		// Power, WLAN_2GHZ, WLAN_5GHZ, LAN
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <40000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x30000>;
+				read-only;
+			};
+
+			partition at 30000 {
+				label = "u-boot-env";
+				reg = <0x30000 0x10000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "factory";
+				reg = <0x40000 0x10000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x400>;
+					};
+
+					eeprom_factory_8000: eeprom at 8000 {
+						reg = <0x8000 0x200>;
+					};
+
+					macaddr_factory_28: macaddr at 28 {
+						reg = <0x28 0x6>;
+					};
+				};
+			};
+
+			partition at 50000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x50000 0x7b0000>;
+			};
+		};
+	};
+};
+
+&state_default {
+	gpio {
+		groups = "wdt", "refclk", "p4led_an";
+		function = "gpio";
+	};
+
+        wlan {
+                groups = "wled_an";
+                function = "wled_an";
+        };
+};
+
+&ethernet {
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
+};
+
+&esw {
+	mediatek,portdisable = <0x27>;
+};
+
+&wmac {
+	status = "okay";
+
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+};
+
+&pcie {
+	status = "okay";
+};
+
+&pcie0 {
+	wifi at 0,0 {
+		compatible = "mediatek,mt76";
+		reg = <0x0000 0 0 0 0>;
+		nvmem-cells = <&eeprom_factory_8000>;
+		nvmem-cell-names = "eeprom";
+		ieee80211-freq-limit = <5000000 6000000>;
+
+		led {
+			led-sources = <2>;
+			led-active-low;
+		};
+	};
+};
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index 0d60d2b95e..147acb81b7 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -1228,6 +1228,15 @@ define Device/wiznet_wizfi630s
 endef
 TARGET_DEVICES += wiznet_wizfi630s
 
+define Device/wodesys_wd-r1208u
+  IMAGE_SIZE := 7872k
+  DEVICE_VENDOR := Wodesys
+  DEVICE_MODEL := WD-R1208U
+  DEVICE_PACKAGES := kmod-mt76x2
+  SUPPORTED_DEVICES += mtk-apsoc-demo
+endef
+TARGET_DEVICES += wodesys_wd-r1208u
+
 define Device/wrtnode_wrtnode2p
   IMAGE_SIZE := 32448k
   DEVICE_VENDOR := WRTnode



From lede-commits at lists.infradead.org  Thu Aug  7 09:56:08 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 12:56:08 -0400
Subject: [openwrt/openwrt]  mpc85xx: HPE MSM460 add HPE MSM430 alias
In-Reply-To: <175458576811.2668649.17796082339984067919@git-01.infra.openwrt.org>
References: <175458576811.2668649.17796082339984067919@git-01.infra.openwrt.org>
Message-ID: <mailman.113861.1754585771.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8a9b9e928efee3dc40ac7b16f7be78d4d548bf0d

commit 8a9b9e928efee3dc40ac7b16f7be78d4d548bf0d
Author: Jan Taczanowski <jan.taczanowski at gmail.com>
AuthorDate: Thu Jul 24 23:19:34 2025 +0200

    mpc85xx: HPE MSM460 add HPE MSM430 alias
    
    Define MSM430 as alternative name, to explicitly show the device is
    supported using existing image (MSM460).
    
    I can confirm that the guide from
    https://github.com/blocktrron/msm460-flashing works perfectly fine with
    the HP MSM430 as well.
    
    In fact, the MSM430 running the original firmware operates as
    a 2x3:2 access point, but after flashing it with OpenWRT, it functions
    as a 3x3:3 access point ? just like the MSM460 model.
    
    It seems that the MSM430 is essentially the same hardware as the MSM460,
    with limitations imposed by the original (HP) software.
    
    Signed-off-by: Jan Taczanowski <jan.taczanowski at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19540
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/mpc85xx/image/p1020.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/mpc85xx/image/p1020.mk b/target/linux/mpc85xx/image/p1020.mk
index c310b26c87..fcc4619ad2 100644
--- a/target/linux/mpc85xx/image/p1020.mk
+++ b/target/linux/mpc85xx/image/p1020.mk
@@ -94,6 +94,8 @@ TARGET_DEVICES += extreme-networks_ws-ap3825i
 define Device/hpe_msm460
   DEVICE_VENDOR := Hewlett-Packard
   DEVICE_MODEL := MSM460
+  DEVICE_ALT0_VENDOR := Hewlett-Packard
+  DEVICE_ALT0_MODEL := MSM430
   KERNEL = kernel-bin | fit none $(KDIR)/image-$$(DEVICE_DTS).dtb
   KERNEL_NAME := zImage.la3000000
   KERNEL_ENTRY := 0x3000000



From lede-commits at lists.infradead.org  Thu Aug  7 11:05:14 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 14:05:14 -0400
Subject: [openwrt/openwrt]  kernel: backport fixes missing in stable
In-Reply-To: <175458991446.3094354.9883849065681738080@git-01.infra.openwrt.org>
References: <175458991446.3094354.9883849065681738080@git-01.infra.openwrt.org>
Message-ID: <mailman.113915.1754589971.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/242bca458fe4897a278ced1e088143ff29a6b40e

commit 242bca458fe4897a278ced1e088143ff29a6b40e
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Jul 27 13:34:01 2025 +0200

    kernel: backport fixes missing in stable
    
    The a stable commit depend son these additional backports.
    
    Without these additional backports this commit causes kernel warnings:
    commit e269f29e9395527bc00c213c6b15da04ebb35070
    Author: Lion Ackermann <nnamrec at gmail.com>
    Date:   Mon Jun 30 15:27:30 2025 +0200
        net/sched: Always pass notifications when child class becomes empty
        [ Upstream commit 103406b38c600fec1fe375a77b27d87e314aea09 ]
    
    Link: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.189&id=e269f29e9395527bc00c213c6b15da04ebb35070
    
    Link: https://github.com/openwrt/openwrt/pull/19695
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...1-sch_htb-make-htb_qlen_notify-idempotent.patch | 34 ++++++++++++
 ...2-sch_drr-make-drr_qlen_notify-idempotent.patch | 61 +++++++++++++++++++++
 ...sch_hfsc-make-hfsc_qlen_notify-idempotent.patch | 50 +++++++++++++++++
 ...4-sch_qfq-make-qfq_qlen_notify-idempotent.patch | 62 ++++++++++++++++++++++
 4 files changed, 207 insertions(+)

diff --git a/target/linux/generic/backport-5.15/895-v6.15-0001-sch_htb-make-htb_qlen_notify-idempotent.patch b/target/linux/generic/backport-5.15/895-v6.15-0001-sch_htb-make-htb_qlen_notify-idempotent.patch
new file mode 100644
index 0000000000..d95fc8dc4a
--- /dev/null
+++ b/target/linux/generic/backport-5.15/895-v6.15-0001-sch_htb-make-htb_qlen_notify-idempotent.patch
@@ -0,0 +1,34 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Cong Wang <xiyou.wangcong at gmail.com>
+Date: Thu, 3 Apr 2025 14:10:23 -0700
+Subject: sch_htb: make htb_qlen_notify() idempotent
+
+htb_qlen_notify() always deactivates the HTB class and in fact could
+trigger a warning if it is already deactivated. Therefore, it is not
+idempotent and not friendly to its callers, like fq_codel_dequeue().
+
+Let's make it idempotent to ease qdisc_tree_reduce_backlog() callers'
+life.
+
+Reported-by: Gerrard Tai <gerrard.tai at starlabs.sg>
+Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
+Reviewed-by: Simon Horman <horms at kernel.org>
+Link: https://patch.msgid.link/20250403211033.166059-2-xiyou.wangcong at gmail.com
+Acked-by: Jamal Hadi Salim <jhs at mojatatu.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+(cherry picked from commit 5ba8b837b522d7051ef81bacf3d95383ff8edce5)
+---
+ net/sched/sch_htb.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/net/sched/sch_htb.c
++++ b/net/sched/sch_htb.c
+@@ -1504,6 +1504,8 @@ static void htb_qlen_notify(struct Qdisc
+ {
+ 	struct htb_class *cl = (struct htb_class *)arg;
+ 
++	if (!cl->prio_activity)
++		return;
+ 	htb_deactivate(qdisc_priv(sch), cl);
+ }
+ 
diff --git a/target/linux/generic/backport-5.15/895-v6.15-0002-sch_drr-make-drr_qlen_notify-idempotent.patch b/target/linux/generic/backport-5.15/895-v6.15-0002-sch_drr-make-drr_qlen_notify-idempotent.patch
new file mode 100644
index 0000000000..e7413ad4bf
--- /dev/null
+++ b/target/linux/generic/backport-5.15/895-v6.15-0002-sch_drr-make-drr_qlen_notify-idempotent.patch
@@ -0,0 +1,61 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Cong Wang <xiyou.wangcong at gmail.com>
+Date: Thu, 3 Apr 2025 14:10:24 -0700
+Subject: sch_drr: make drr_qlen_notify() idempotent
+
+drr_qlen_notify() always deletes the DRR class from its active list
+with list_del(), therefore, it is not idempotent and not friendly
+to its callers, like fq_codel_dequeue().
+
+Let's make it idempotent to ease qdisc_tree_reduce_backlog() callers'
+life. Also change other list_del()'s to list_del_init() just to be
+extra safe.
+
+Reported-by: Gerrard Tai <gerrard.tai at starlabs.sg>
+Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
+Reviewed-by: Simon Horman <horms at kernel.org>
+Link: https://patch.msgid.link/20250403211033.166059-3-xiyou.wangcong at gmail.com
+Acked-by: Jamal Hadi Salim <jhs at mojatatu.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+(cherry picked from commit df008598b3a00be02a8051fde89ca0fbc416bd55)
+---
+ net/sched/sch_drr.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/net/sched/sch_drr.c
++++ b/net/sched/sch_drr.c
+@@ -111,6 +111,7 @@ static int drr_change_class(struct Qdisc
+ 	if (cl == NULL)
+ 		return -ENOBUFS;
+ 
++	INIT_LIST_HEAD(&cl->alist);
+ 	cl->common.classid = classid;
+ 	cl->quantum	   = quantum;
+ 	cl->qdisc	   = qdisc_create_dflt(sch->dev_queue,
+@@ -235,7 +236,7 @@ static void drr_qlen_notify(struct Qdisc
+ {
+ 	struct drr_class *cl = (struct drr_class *)arg;
+ 
+-	list_del(&cl->alist);
++	list_del_init(&cl->alist);
+ }
+ 
+ static int drr_dump_class(struct Qdisc *sch, unsigned long arg,
+@@ -402,7 +403,7 @@ static struct sk_buff *drr_dequeue(struc
+ 			if (unlikely(skb == NULL))
+ 				goto out;
+ 			if (cl->qdisc->q.qlen == 0)
+-				list_del(&cl->alist);
++				list_del_init(&cl->alist);
+ 
+ 			bstats_update(&cl->bstats, skb);
+ 			qdisc_bstats_update(sch, skb);
+@@ -443,7 +444,7 @@ static void drr_reset_qdisc(struct Qdisc
+ 	for (i = 0; i < q->clhash.hashsize; i++) {
+ 		hlist_for_each_entry(cl, &q->clhash.hash[i], common.hnode) {
+ 			if (cl->qdisc->q.qlen)
+-				list_del(&cl->alist);
++				list_del_init(&cl->alist);
+ 			qdisc_reset(cl->qdisc);
+ 		}
+ 	}
diff --git a/target/linux/generic/backport-5.15/895-v6.15-0003-sch_hfsc-make-hfsc_qlen_notify-idempotent.patch b/target/linux/generic/backport-5.15/895-v6.15-0003-sch_hfsc-make-hfsc_qlen_notify-idempotent.patch
new file mode 100644
index 0000000000..c71368b5ef
--- /dev/null
+++ b/target/linux/generic/backport-5.15/895-v6.15-0003-sch_hfsc-make-hfsc_qlen_notify-idempotent.patch
@@ -0,0 +1,50 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Cong Wang <xiyou.wangcong at gmail.com>
+Date: Thu, 3 Apr 2025 14:10:25 -0700
+Subject: sch_hfsc: make hfsc_qlen_notify() idempotent
+
+hfsc_qlen_notify() is not idempotent either and not friendly
+to its callers, like fq_codel_dequeue(). Let's make it idempotent
+to ease qdisc_tree_reduce_backlog() callers' life:
+
+1. update_vf() decreases cl->cl_nactive, so we can check whether it is
+non-zero before calling it.
+
+2. eltree_remove() always removes RB node cl->el_node, but we can use
+   RB_EMPTY_NODE() + RB_CLEAR_NODE() to make it safe.
+
+Reported-by: Gerrard Tai <gerrard.tai at starlabs.sg>
+Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
+Reviewed-by: Simon Horman <horms at kernel.org>
+Link: https://patch.msgid.link/20250403211033.166059-4-xiyou.wangcong at gmail.com
+Acked-by: Jamal Hadi Salim <jhs at mojatatu.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+(cherry picked from commit 51eb3b65544c9efd6a1026889ee5fb5aa62da3bb)
+---
+ net/sched/sch_hfsc.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/net/sched/sch_hfsc.c
++++ b/net/sched/sch_hfsc.c
+@@ -209,7 +209,10 @@ eltree_insert(struct hfsc_class *cl)
+ static inline void
+ eltree_remove(struct hfsc_class *cl)
+ {
+-	rb_erase(&cl->el_node, &cl->sched->eligible);
++	if (!RB_EMPTY_NODE(&cl->el_node)) {
++		rb_erase(&cl->el_node, &cl->sched->eligible);
++		RB_CLEAR_NODE(&cl->el_node);
++	}
+ }
+ 
+ static inline void
+@@ -1231,7 +1234,8 @@ hfsc_qlen_notify(struct Qdisc *sch, unsi
+ 	/* vttree is now handled in update_vf() so that update_vf(cl, 0, 0)
+ 	 * needs to be called explicitly to remove a class from vttree.
+ 	 */
+-	update_vf(cl, 0, 0);
++	if (cl->cl_nactive)
++		update_vf(cl, 0, 0);
+ 	if (cl->cl_flags & HFSC_RSC)
+ 		eltree_remove(cl);
+ }
diff --git a/target/linux/generic/backport-5.15/895-v6.15-0004-sch_qfq-make-qfq_qlen_notify-idempotent.patch b/target/linux/generic/backport-5.15/895-v6.15-0004-sch_qfq-make-qfq_qlen_notify-idempotent.patch
new file mode 100644
index 0000000000..41ce27a3a3
--- /dev/null
+++ b/target/linux/generic/backport-5.15/895-v6.15-0004-sch_qfq-make-qfq_qlen_notify-idempotent.patch
@@ -0,0 +1,62 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Cong Wang <xiyou.wangcong at gmail.com>
+Date: Thu, 3 Apr 2025 14:10:26 -0700
+Subject: sch_qfq: make qfq_qlen_notify() idempotent
+
+qfq_qlen_notify() always deletes its class from its active list
+with list_del_init() _and_ calls qfq_deactivate_agg() when the whole list
+becomes empty.
+
+To make it idempotent, just skip everything when it is not in the active
+list.
+
+Also change other list_del()'s to list_del_init() just to be extra safe.
+
+Reported-by: Gerrard Tai <gerrard.tai at starlabs.sg>
+Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
+Reviewed-by: Simon Horman <horms at kernel.org>
+Link: https://patch.msgid.link/20250403211033.166059-5-xiyou.wangcong at gmail.com
+Acked-by: Jamal Hadi Salim <jhs at mojatatu.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+(cherry picked from commit 55f9eca4bfe30a15d8656f915922e8c98b7f0728)
+---
+ net/sched/sch_qfq.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/net/sched/sch_qfq.c
++++ b/net/sched/sch_qfq.c
+@@ -354,7 +354,7 @@ static void qfq_deactivate_class(struct
+ 	struct qfq_aggregate *agg = cl->agg;
+ 
+ 
+-	list_del(&cl->alist); /* remove from RR queue of the aggregate */
++	list_del_init(&cl->alist); /* remove from RR queue of the aggregate */
+ 	if (list_empty(&agg->active)) /* agg is now inactive */
+ 		qfq_deactivate_agg(q, agg);
+ }
+@@ -482,6 +482,7 @@ static int qfq_change_class(struct Qdisc
+ 
+ 	cl->common.classid = classid;
+ 	cl->deficit = lmax;
++	INIT_LIST_HEAD(&cl->alist);
+ 
+ 	cl->qdisc = qdisc_create_dflt(sch->dev_queue, &pfifo_qdisc_ops,
+ 				      classid, NULL);
+@@ -996,7 +997,7 @@ static struct sk_buff *agg_dequeue(struc
+ 	cl->deficit -= (int) len;
+ 
+ 	if (cl->qdisc->q.qlen == 0) /* no more packets, remove from list */
+-		list_del(&cl->alist);
++		list_del_init(&cl->alist);
+ 	else if (cl->deficit < qdisc_pkt_len(cl->qdisc->ops->peek(cl->qdisc))) {
+ 		cl->deficit += agg->lmax;
+ 		list_move_tail(&cl->alist, &agg->active);
+@@ -1428,6 +1429,8 @@ static void qfq_qlen_notify(struct Qdisc
+ 	struct qfq_sched *q = qdisc_priv(sch);
+ 	struct qfq_class *cl = (struct qfq_class *)arg;
+ 
++	if (list_empty(&cl->alist))
++		return;
+ 	qfq_deactivate_class(q, cl);
+ }
+ 



From lede-commits at lists.infradead.org  Thu Aug  7 13:44:34 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 07 Aug 2025 16:44:34 -0400
Subject: [openwrt/openwrt]  strace: update to 6.15
In-Reply-To: <175459947480.4051572.5288095479903782514@git-01.infra.openwrt.org>
References: <175459947480.4051572.5288095479903782514@git-01.infra.openwrt.org>
Message-ID: <mailman.113970.1754599479.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/56b083221f22d370682ff8dcbb3041f3d719a581

commit 56b083221f22d370682ff8dcbb3041f3d719a581
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Sun Aug 3 10:43:56 2025 +0200

    strace: update to 6.15
    
    Release Notes:
    - https://github.com/strace/strace/releases/tag/v6.15
    
    Link: https://github.com/openwrt/openwrt/pull/19643
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 package/devel/strace/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/devel/strace/Makefile b/package/devel/strace/Makefile
index d2708b60cd..ec5e6fb5be 100644
--- a/package/devel/strace/Makefile
+++ b/package/devel/strace/Makefile
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=strace
-PKG_VERSION:=6.14
+PKG_VERSION:=6.15
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
-PKG_HASH:=244f3b5c20a32854ca9b7ca7a3ee091dd3d4bd20933a171ecee8db486c77d3c9
+PKG_HASH:=8552dfab08abc22a0f2048c98fd9541fd4d71b6882507952780dab7c7c512f51
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_LICENSE:=LGPL-2.1-or-later



From lede-commits at lists.infradead.org  Fri Aug  8 03:23:54 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 08 Aug 2025 06:23:54 -0400
Subject: [openwrt/openwrt]  mediatek: filogic: Add support for Wavlink
 WL-WN551X3
In-Reply-To: <175464863401.295450.5891426564073419469@git-01.infra.openwrt.org>
References: <175464863401.295450.5891426564073419469@git-01.infra.openwrt.org>
Message-ID: <mailman.114259.1754650001.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1a235a7f0b6c71d09a3111d518421f889ba80f15

commit 1a235a7f0b6c71d09a3111d518421f889ba80f15
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Thu Jul 24 10:04:42 2025 -0400

    mediatek: filogic: Add support for Wavlink WL-WN551X3
    
    Hardware
    --------
    - SOC: MediaTek MT7981B
    - RAM: 256MB DDR3
    - FLASH: 128MB SPI-NAND WinBond W25N01GVZEIG
    - NETWORK: 2x1Gb Lan 1x1Gb Wan
    - WIFI: MediaTek MT7981B 2x2 DBDC 802.11ax 2T2R (2.4/5)
    - LEDs: 3x WAN/LAN (green) 2x STATUS (red/blue)
    - USB: 1x XHCI
    
    Installation via Webinterface
    -----------------------------
    
    1. Rename OpenWrt sysupgrade bin to wavlink_wl-wn551X3-squashfs-sysupgrade.bin
       The uppercase chars 551X3 are essential and checked by web interface.
    2. Logon to webinterface
    3. Go to network configuration -> mode selection
    4. Choose mode "LAN bridge/access point"
    5. Save configuration (maybe network reconfig needed)
    6. Go to system upgrade
    7. Choose local upgrade and provide renamed sysupgrade file
    8. Start upgrade and wait for completion
    9. Logon to OpenWrt (network config is preserved during upgrade)
    
    Boot initramfs via TFTP & console
    ---------------------------------
    
    1. Connect switch to network via LAN1 or LAN2
    2. Power on switch
    3. Press ESC until prompt reached "MT7981>"
    4. Set own IP "setenv ipaddr 192.168.x.y"
    5. Set TFTP IP "setenv serverip 192.168.a.b"
    6. Set memory address "setenv loadaddr 0x46000000"
    7. Download image "tftpboot openwrt-mediatek-filogic-wavlink_wl-wn551x3-initramfs.itb"
    8. Boot image "bootm"
    
    Notes
    -----
    
    - The red/blue LEDs give a background illumination to the top of the
      case. The red LED is totally disabled to avoid noisy blinking.
    
    - Aside from the design and the different LED colors & placements
      the hardware and partitioning  matches the WAVLINK WL-WN586X3 Rev B.
      Therefor a common DTSI was prepared.
    
    MAC Addresses (same as stock)
    -----------------------------
    
    LAN   : 80:3F:5D:xx:xx:B1 (hw, 0x44e(text))
    WAN   : 80:3F:5D:xx:xx:B2 (hw, 0x460(text))
    2.4GHz: 80:3F:5D:xx:xx:B1 (Factory, 0x4 (hex))
    5GHz  : driver auto generated
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19515
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../mt7981b-wavlink-wl-3port-128nand-common.dtsi   | 210 +++++++++++++++++++++
 .../mediatek/dts/mt7981b-wavlink-wl-wn551x3.dts    |  63 +++++++
 .../filogic/base-files/etc/board.d/01_leds         |   5 +
 .../filogic/base-files/etc/board.d/02_network      |   1 +
 target/linux/mediatek/image/filogic.mk             |  18 ++
 5 files changed, 297 insertions(+)

diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi b/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi
new file mode 100644
index 0000000000..f796a00810
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi
@@ -0,0 +1,210 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include "mt7981b.dtsi"
+
+/ {
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		button-reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+
+		conf-pu {
+			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+			drive-strength = <8>;
+			bias-pull-up = <103>;
+		};
+
+		conf-pd {
+			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+			drive-strength = <8>;
+			bias-pull-down = <103>;
+		};
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	status = "okay";
+
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		compatible = "spi-nand";
+		reg = <0>;
+
+		spi-max-frequency = <52000000>;
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "bl2";
+				reg = <0x0 0x100000>;
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "u-boot-env";
+				reg = <0x100000 0x80000>;
+				read-only;
+			};
+
+			factory: partition at 180000 {
+				label = "factory";
+				reg = <0x180000 0x200000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+					
+					eeprom_factory: eeprom at 0 {
+						reg = <0x0 0x1000>;
+					};					
+
+					macaddr_factory_4: macaddr at 4 {
+						reg = <0x4 0x6>;
+					};
+				};
+			};
+
+			partition at 380000 {
+				label = "fip";
+				reg = <0x380000 0x200000>;
+				read-only;
+			};
+
+			partition at 580000 {
+				label = "ubi";
+				reg = <0x580000 0x4000000>;
+			};
+
+			partition at 4580000 {
+				label = "hw";
+				reg = <0x4580000 0x80000>;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_hw_44e: macaddr at 44e {
+						compatible = "mac-base";
+						reg = <0x44e 0x11>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+		};
+	};
+};
+
+&eth {
+	status = "okay";
+
+	gmac0: mac at 0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "2500base-x";
+
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_hw_44e 0>;
+
+		fixed-link {
+			speed = <2500>;
+			full-duplex;
+			pause;
+		};
+	};
+
+	gmac1: mac at 1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_hw_44e 1>;
+	};
+};
+
+&mdio_bus {
+	switch: switch at 1f {
+		compatible = "mediatek,mt7531";
+		reg = <31>;
+		reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		interrupt-parent = <&pio>;
+		interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+	};
+};
+
+&switch {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port at 1 {
+			reg = <1>;
+			label = "lan2";
+		};
+
+		port at 2 {
+			reg = <2>;
+			label = "lan1";
+		};
+
+		port at 6 {
+			reg = <6>;
+			ethernet = <&gmac0>;
+			phy-mode = "2500base-x";
+
+			fixed-link {
+				speed = <2500>;
+				full-duplex;
+				pause;
+			};
+		};
+	};
+};
+
+&wifi {
+	status = "okay";
+	nvmem-cells = <&eeprom_factory 0>;
+	nvmem-cell-names = "eeprom";
+};
diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn551x3.dts b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn551x3.dts
new file mode 100644
index 0000000000..0387c73dd1
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn551x3.dts
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include "mt7981b-wavlink-wl-3port-128nand-common.dtsi"
+
+/ {
+	model = "WAVLINK WL-WN551X3";
+	compatible = "wavlink,wl-wn551x3", "mediatek,mt7981b";
+
+	aliases {
+		label-mac-device = &wifi;
+		led-boot = &led_status_blue;
+		led-failsafe = &led_status_blue;
+		led-running = &led_status_blue;
+		led-upgrade = &led_status_blue;
+		serial0 = &uart0;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_status_blue: led-0 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
+		};
+
+		led-1 {
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&pio 8 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "none";
+		};
+
+		led-2 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_LAN;
+			function-enumerator = <1>;
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+		};
+
+		led-3 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_LAN;
+			function-enumerator = <2>;
+			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
+		};
+
+		led-4 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WAN;
+			gpios = <&pio 25 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&usb_phy {
+        status = "okay";
+};
+
+&xhci {
+        status = "okay";
+};
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
index 6d4c7903bc..62a0161286 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
@@ -206,6 +206,11 @@ tplink,re6000xd)
 	ucidef_set_led_netdev "lan-2" "lan-2" "blue:lan-1" "lan2" "link tx rx"
 	ucidef_set_led_netdev "eth1" "lan-3" "blue:lan-2" "eth1" "link tx rx"
 	;;
+wavlink,wl-wn551x3)
+        ucidef_set_led_netdev "lan-1" "lan-1" "green:lan-1" "lan1" "link tx rx"
+        ucidef_set_led_netdev "lan-2" "lan-2" "green:lan-2" "lan2" "link tx rx"
+        ucidef_set_led_netdev "wan" "wan" "green:wan" "eth1" "link tx rx"
+        ;;
 wavlink,wl-wn586x3)
 	ucidef_set_led_netdev "lan-1" "lan-1" "blue:lan-1" "lan1" "link tx rx"
 	ucidef_set_led_netdev "lan-2" "lan-2" "blue:lan-2" "lan2" "link tx rx"
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
index 802df4608c..1f9d3c551c 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -139,6 +139,7 @@ mediatek_setup_interfaces()
 		ucidef_set_interfaces_lan_wan "port1 port3 port4 port5 port6" "port2"
 		;;
 	tplink,tl-xdr6086|\
+	wavlink,wl-wn551x3|\
 	wavlink,wl-wn586x3)
 		ucidef_set_interfaces_lan_wan "lan1 lan2" eth1
 		;;
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index e9e74efa1f..2e03bb8e7e 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -1972,6 +1972,24 @@ define Device/unielec_u7981-01-nand
 endef
 TARGET_DEVICES += unielec_u7981-01-nand
 
+define Device/wavlink_wl-wn551x3
+  DEVICE_VENDOR := WAVLINK
+  DEVICE_MODEL := WL-WN551X3
+  DEVICE_DTS := mt7981b-wavlink-wl-wn551x3
+  DEVICE_DTS_DIR := ../dts
+  DEVICE_DTS_LOADADDR := 0x47000000
+  UBINIZE_OPTS := -E 5
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  IMAGE_SIZE := 65536k
+  KERNEL_INITRAMFS_SUFFIX := .itb
+  KERNEL_IN_UBI := 1
+  DEVICE_PACKAGES := kmod-usb3 kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
+  SUPPORTED_DEVICES += mediatek,mt7981-spim-snand-rfb
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += wavlink_wl-wn551x3
+
 define Device/wavlink_wl-wn586x3
   DEVICE_VENDOR := WAVLINK
   DEVICE_MODEL := WL-WN586X3



From lede-commits at lists.infradead.org  Fri Aug  8 04:58:03 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 08 Aug 2025 07:58:03 -0400
Subject: [openwrt/openwrt]  realtek: rtl93xx: Add learning and flooding
 enable/disable
In-Reply-To: <175465428355.825632.16618452092181035648@git-01.infra.openwrt.org>
References: <175465428355.825632.16618452092181035648@git-01.infra.openwrt.org>
Message-ID: <mailman.114331.1754655874.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f6603de71de4d48d79fbb33b07b59bb5aaa233f5

commit f6603de71de4d48d79fbb33b07b59bb5aaa233f5
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Tue Jul 15 20:05:41 2025 +0200

    realtek: rtl93xx: Add learning and flooding enable/disable
    
    Both RTL930x and RTL931x were missing the code to support enabling and
    disabling MAC address learning and unknown unicast flooding on a per-port
    basis.
    
    * rtl93*x_enable_learning() allows toggling of dynamic MAC learning on
      individual ports by modifying the L2 learning constraint control
      register.
    * rtl93*x_enable_flood() provides the ability to control unknown unicast
      flooding behavior, disabling forwarding when set. If it is enabled, it
      will just forward it. If it is disabled, packets will simply be dropped.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19581
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h   |  2 ++
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c   | 22 ++++++++++++++++++++++
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c   | 22 ++++++++++++++++++++++
 3 files changed, 46 insertions(+)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
index b8f543bd9e..749440f70b 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
@@ -246,6 +246,8 @@
 #define RTL838X_L2_LRN_CONSTRT_EN		(0x3368)
 #define RTL838X_L2_PORT_LRN_CONSTRT		(0x32A0)
 #define RTL839X_L2_PORT_LRN_CONSTRT		(0x3914)
+#define RTL930X_L2_LRN_PORT_CONSTRT_CTRL	(0x90A4)
+#define RTL931X_L2_LRN_PORT_CONSTRT_CTRL	(0xC96C)
 
 #define RTL838X_L2_PORT_NEW_SALRN(p)		(0x328c + (((p >> 4) << 2)))
 #define RTL839X_L2_PORT_NEW_SALRN(p)		(0x38F0 + (((p >> 4) << 2)))
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
index 4116fe2008..dd1d3e5c17 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
@@ -296,6 +296,26 @@ static void rtl930x_l2_learning_setup(void)
 	sw_w32((0x7fff << 2) | 0, RTL930X_L2_LRN_CONSTRT_CTRL);
 }
 
+static void rtldsa_930x_enable_learning(int port, bool enable)
+{
+	/* Limit learning to maximum: 32k entries */
+	sw_w32_mask(GENMASK(17, 3), enable ? (0x7ffe << 3) : 0,
+		    RTL930X_L2_LRN_PORT_CONSTRT_CTRL + port * 4);
+}
+
+static void rtldsa_930x_enable_flood(int port, bool enable)
+{
+	/* 0: forward
+	 * 1: drop
+	 * 2: trap to local CPU
+	 * 3: copy to local CPU
+	 * 4: trap to master CPU
+	 * 5: copy to master CPU
+	 */
+	sw_w32_mask(GENMASK(2, 0), enable ? 0 : 1,
+		    RTL930X_L2_LRN_PORT_CONSTRT_CTRL + port * 4);
+}
+
 static void rtl930x_stp_get(struct rtl838x_switch_priv *priv, u16 msti, u32 port_state[])
 {
 	u32 cmd = 1 << 17 | /* Execute cmd */
@@ -2513,4 +2533,6 @@ const struct rtl838x_reg rtl930x_reg = {
 	.set_l3_egress_intf = rtl930x_set_l3_egress_intf,
 	.set_distribution_algorithm = rtl930x_set_distribution_algorithm,
 	.led_init = rtl930x_led_init,
+	.enable_learning = rtldsa_930x_enable_learning,
+	.enable_flood = rtldsa_930x_enable_flood,
 };
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
index f6a098c701..a1d0101f47 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
@@ -869,6 +869,26 @@ static void rtl931x_l2_learning_setup(void)
 	sw_w32((0xffff << 3) | FORWARD, RTL931X_L2_LRN_CONSTRT_CTRL);
 }
 
+static void rtldsa_931x_enable_learning(int port, bool enable)
+{
+	/* Limit learning to maximum: 64k entries */
+	sw_w32_mask(GENMASK(18, 3), enable ? (0xfffe << 3) : 0,
+		    RTL931X_L2_LRN_PORT_CONSTRT_CTRL + port * 4);
+}
+
+static void rtldsa_931x_enable_flood(int port, bool enable)
+{
+	/* 0: forward
+	 * 1: drop
+	 * 2: trap to local CPU
+	 * 3: copy to local CPU
+	 * 4: trap to master CPU
+	 * 5: copy to master CPU
+	 */
+	sw_w32_mask(GENMASK(2, 0), enable ? 0 : 1,
+		    RTL931X_L2_LRN_PORT_CONSTRT_CTRL + port * 4);
+}
+
 static u64 rtl931x_read_mcast_pmask(int idx)
 {
 	u64 portmask;
@@ -1690,4 +1710,6 @@ const struct rtl838x_reg rtl931x_reg = {
 	.l2_learning_setup = rtl931x_l2_learning_setup,
 	.l3_setup = rtl931x_l3_setup,
 	.led_init = rtldsa_931x_led_init,
+	.enable_learning = rtldsa_931x_enable_learning,
+	.enable_flood = rtldsa_931x_enable_flood,
 };



From lede-commits at lists.infradead.org  Fri Aug  8 09:06:05 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 08 Aug 2025 12:06:05 -0400
Subject: [openwrt/openwrt]  realtek: dsa: rename tagged_ports to member_ports
In-Reply-To: <175466916546.2389941.4466267887488670720@git-01.infra.openwrt.org>
References: <175466916546.2389941.4466267887488670720@git-01.infra.openwrt.org>
Message-ID: <mailman.114478.1754669370.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5f06b8ebbc4cf98dfa15708444460c3dc94cfdcb

commit 5f06b8ebbc4cf98dfa15708444460c3dc94cfdcb
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Tue Aug 5 14:02:26 2025 -0400

    realtek: dsa: rename tagged_ports to member_ports
    
    The current variables tagged_ports and untagged_ports suggest that
    these are distinct and describe only the ports in each of these
    configuration types.
    
    That is wrong. The hardware is configured via member ports and
    untagged ports. The first one being a superset of the second.
    Rename the variables to reflect that.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19684
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.12/drivers/net/dsa/rtl83xx/dsa.c       | 26 +++++++++++-----------
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c   |  6 ++---
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h   |  2 +-
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c   |  8 +++----
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c   |  4 ++--
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c   | 10 ++++-----
 6 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
index 17a8b46f0c..fbb1a4ba2f 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
@@ -368,7 +368,7 @@ static void rtl83xx_vlan_setup(struct rtl838x_switch_priv *priv)
 	info.hash_uc_fid = false;	/* Do not build the L2 lookup hash with FID, but VID */
 	info.hash_mc_fid = false;	/* Do the same for Multicast packets */
 	info.profile_id = 0;		/* Use default Vlan Profile 0 */
-	info.tagged_ports = 0;		/* Initially no port members */
+	info.member_ports = 0;		/* Initially no port members */
 	if (priv->family_id == RTL9310_FAMILY_ID) {
 		info.if_id = 0;
 		info.multicast_grp_mask = 0;
@@ -388,7 +388,7 @@ static void rtl83xx_vlan_setup(struct rtl838x_switch_priv *priv)
 	 */
 	for (int i = 0; i <= priv->cpu_port; i++) {
 		rtl83xx_vlan_set_pvid(priv, i, 0);
-		info.tagged_ports |= BIT_ULL(i);
+		info.member_ports |= BIT_ULL(i);
 	}
 	priv->r->vlan_set_tagged(0, &info);
 
@@ -1922,19 +1922,19 @@ static int rtl83xx_vlan_prepare(struct dsa_switch *ds, int port,
 
 	priv->r->vlan_tables_read(0, &info);
 
-	pr_debug("VLAN 0: Tagged ports %llx, untag %llx, profile %d, MC# %d, UC# %d, FID %x\n",
-		info.tagged_ports, info.untagged_ports, info.profile_id,
+	pr_debug("VLAN 0: Member ports %llx, untag %llx, profile %d, MC# %d, UC# %d, FID %x\n",
+		info.member_ports, info.untagged_ports, info.profile_id,
 		info.hash_mc_fid, info.hash_uc_fid, info.fid);
 
 	priv->r->vlan_tables_read(1, &info);
-	pr_debug("VLAN 1: Tagged ports %llx, untag %llx, profile %d, MC# %d, UC# %d, FID %x\n",
-		info.tagged_ports, info.untagged_ports, info.profile_id,
+	pr_debug("VLAN 1: Member ports %llx, untag %llx, profile %d, MC# %d, UC# %d, FID %x\n",
+		info.member_ports, info.untagged_ports, info.profile_id,
 		info.hash_mc_fid, info.hash_uc_fid, info.fid);
 	priv->r->vlan_set_untagged(1, info.untagged_ports);
 	pr_debug("SET: Untagged ports, VLAN %d: %llx\n", 1, info.untagged_ports);
 
 	priv->r->vlan_set_tagged(1, &info);
-	pr_debug("SET: Tagged ports, VLAN %d: %llx\n", 1, info.tagged_ports);
+	pr_debug("SET: Member ports, VLAN %d: %llx\n", 1, info.member_ports);
 
 	return 0;
 }
@@ -1983,7 +1983,7 @@ static int rtl83xx_vlan_add(struct dsa_switch *ds, int port,
 	priv->r->vlan_tables_read(vlan->vid, &info);
 
 	/* new VLAN? */
-	if (!info.tagged_ports) {
+	if (!info.member_ports) {
 		info.fid = 0;
 		info.hash_mc_fid = false;
 		info.hash_uc_fid = false;
@@ -1991,10 +1991,10 @@ static int rtl83xx_vlan_add(struct dsa_switch *ds, int port,
 	}
 
 	/* sanitize untagged_ports - must be a subset */
-	if (info.untagged_ports & ~info.tagged_ports)
+	if (info.untagged_ports & ~info.member_ports)
 		info.untagged_ports = 0;
 
-	info.tagged_ports |= BIT_ULL(port);
+	info.member_ports |= BIT_ULL(port);
 	if (vlan->flags & BRIDGE_VLAN_INFO_UNTAGGED)
 		info.untagged_ports |= BIT_ULL(port);
 	else
@@ -2004,7 +2004,7 @@ static int rtl83xx_vlan_add(struct dsa_switch *ds, int port,
 	pr_debug("Untagged ports, VLAN %d: %llx\n", vlan->vid, info.untagged_ports);
 
 	priv->r->vlan_set_tagged(vlan->vid, &info);
-	pr_debug("Tagged ports, VLAN %d: %llx\n", vlan->vid, info.tagged_ports);
+	pr_debug("Member ports, VLAN %d: %llx\n", vlan->vid, info.member_ports);
 
 	mutex_unlock(&priv->reg_mutex);
 
@@ -2041,13 +2041,13 @@ static int rtl83xx_vlan_del(struct dsa_switch *ds, int port,
 
 	/* remove port from both tables */
 	info.untagged_ports &= (~BIT_ULL(port));
-	info.tagged_ports &= (~BIT_ULL(port));
+	info.member_ports &= (~BIT_ULL(port));
 
 	priv->r->vlan_set_untagged(vlan->vid, info.untagged_ports);
 	pr_debug("Untagged ports, VLAN %d: %llx\n", vlan->vid, info.untagged_ports);
 
 	priv->r->vlan_set_tagged(vlan->vid, &info);
-	pr_debug("Tagged ports, VLAN %d: %llx\n", vlan->vid, info.tagged_ports);
+	pr_debug("Member ports, VLAN %d: %llx\n", vlan->vid, info.member_ports);
 
 	mutex_unlock(&priv->reg_mutex);
 
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c
index ac4b962318..e0c8d73fa4 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c
@@ -155,9 +155,9 @@ static void rtl838x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
 	struct table_reg *r = rtl_table_get(RTL8380_TBL_0, 0);
 
 	rtl_table_read(r, vlan);
-	info->tagged_ports = sw_r32(rtl_table_data(r, 0));
+	info->member_ports = sw_r32(rtl_table_data(r, 0));
 	v = sw_r32(rtl_table_data(r, 1));
-	pr_debug("VLAN_READ %d: %016llx %08x\n", vlan, info->tagged_ports, v);
+	pr_debug("VLAN_READ %d: %016llx %08x\n", vlan, info->member_ports, v);
 	rtl_table_release(r);
 
 	info->profile_id = v & 0x7;
@@ -178,7 +178,7 @@ static void rtl838x_vlan_set_tagged(u32 vlan, struct rtl838x_vlan_info *info)
 	/* Access VLAN table (0) via register 0 */
 	struct table_reg *r = rtl_table_get(RTL8380_TBL_0, 0);
 
-	sw_w32(info->tagged_ports, rtl_table_data(r, 0));
+	sw_w32(info->member_ports, rtl_table_data(r, 0));
 
 	v = info->profile_id;
 	v |= info->hash_mc_fid ? 0x8 : 0;
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
index 749440f70b..544f693883 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
@@ -709,7 +709,7 @@ struct rtl838x_pcs {
 
 struct rtl838x_vlan_info {
 	u64 untagged_ports;
-	u64 tagged_ports;
+	u64 member_ports;
 	u8 profile_id;
 	bool hash_mc_fid;
 	bool hash_uc_fid;
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c
index cec6e27c37..87ba9e0fbc 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c
@@ -172,8 +172,8 @@ static void rtl839x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
 	w = sw_r32(rtl_table_data(r, 2));
 	rtl_table_release(r);
 
-	info->tagged_ports = u;
-	info->tagged_ports = (info->tagged_ports << 21) | ((v >> 11) & 0x1fffff);
+	info->member_ports = u;
+	info->member_ports = (info->member_ports << 21) | ((v >> 11) & 0x1fffff);
 	info->profile_id = w >> 30 | ((v & 1) << 2);
 	info->hash_mc_fid = !!(w & BIT(2));
 	info->hash_uc_fid = !!(w & BIT(3));
@@ -196,8 +196,8 @@ static void rtl839x_vlan_set_tagged(u32 vlan, struct rtl838x_vlan_info *info)
 	/* Access VLAN table (0) via register 0 */
 	struct table_reg *r = rtl_table_get(RTL8390_TBL_0, 0);
 
-	u = info->tagged_ports >> 21;
-	v = info->tagged_ports << 11;
+	u = info->member_ports >> 21;
+	v = info->member_ports << 11;
 	v |= ((u32)info->fid) << 3;
 	v |= info->hash_uc_fid ? BIT(2) : 0;
 	v |= info->hash_mc_fid ? BIT(1) : 0;
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
index dd1d3e5c17..034b5c09f0 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
@@ -184,7 +184,7 @@ static void rtl930x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
 	pr_debug("VLAN_READ %d: %08x %08x\n", vlan, v, w);
 	rtl_table_release(r);
 
-	info->tagged_ports = v >> 3;
+	info->member_ports = v >> 3;
 	info->profile_id = (w >> 24) & 7;
 	info->hash_mc_fid = !!(w & BIT(27));
 	info->hash_uc_fid = !!(w & BIT(28));
@@ -205,7 +205,7 @@ static void rtl930x_vlan_set_tagged(u32 vlan, struct rtl838x_vlan_info *info)
 	/* Access VLAN table (1) via register 0 */
 	struct table_reg *r = rtl_table_get(RTL9300_TBL_0, 1);
 
-	v = info->tagged_ports << 3;
+	v = info->member_ports << 3;
 	v |= ((u32)info->fid) >> 3;
 
 	w = ((u32)info->fid) << 29;
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
index a1d0101f47..5a623cd31b 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
@@ -198,7 +198,7 @@ static void rtl931x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
 	rtl_table_release(r);
 
 	pr_debug("VLAN_READ %d: %08x %08x %08x %08x\n", vlan, v, w, x, y);
-	info->tagged_ports = ((u64) v) << 25 | (w >> 7);
+	info->member_ports = ((u64) v) << 25 | (w >> 7);
 	info->profile_id = (x >> 16) & 0xf;
 	info->fid = w & 0x7f;				/* AKA MSTI depending on context */
 	info->hash_uc_fid = !!(x & BIT(31));
@@ -209,8 +209,8 @@ static void rtl931x_vlan_tables_read(u32 vlan, struct rtl838x_vlan_info *info)
 		info->l2_tunnel_list_id = y >> 18;
 	else
 		info->l2_tunnel_list_id = -1;
-	pr_debug("%s read tagged %016llx, profile-id %d, uc %d, mc %d, intf-id %d\n", __func__,
-		info->tagged_ports, info->profile_id, info->hash_uc_fid, info->hash_mc_fid,
+	pr_debug("%s read member %016llx, profile-id %d, uc %d, mc %d, intf-id %d\n", __func__,
+		info->member_ports, info->profile_id, info->hash_uc_fid, info->hash_mc_fid,
 		info->if_id);
 
 	/* Read UNTAG table via table register 3 */
@@ -227,8 +227,8 @@ static void rtl931x_vlan_set_tagged(u32 vlan, struct rtl838x_vlan_info *info)
 	struct table_reg *r;
 	u32 v, w, x, y;
 
-	v = info->tagged_ports >> 25;
-	w = (info->tagged_ports & GENMASK(24, 0)) << 7;
+	v = info->member_ports >> 25;
+	w = (info->member_ports & GENMASK(24, 0)) << 7;
 	w |= info->fid & 0x7f;
 	x = info->hash_uc_fid ? BIT(31) : 0;
 	x |= info->hash_mc_fid ? BIT(30) : 0;



From lede-commits at lists.infradead.org  Fri Aug  8 09:08:13 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 08 Aug 2025 12:08:13 -0400
Subject: [openwrt/openwrt]  kernel: usb: add kmod-usb-common package
In-Reply-To: <175466929389.2403926.7120280383932032336@git-01.infra.openwrt.org>
References: <175466929389.2403926.7120280383932032336@git-01.infra.openwrt.org>
Message-ID: <mailman.114481.1754669370.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/defce7cefdf3f98d9e48c5422b5f965db4465a19

commit defce7cefdf3f98d9e48c5422b5f965db4465a19
Author: Thomas Richard <thomas.richard at bootlin.com>
AuthorDate: Tue Aug 5 09:32:48 2025 +0200

    kernel: usb: add kmod-usb-common package
    
    Move usb-common driver from usb-core package to a new usb-common package.
    The usb-common driver is needed by usb-gadget driver which can be used
    without host support.
    
    Signed-off-by: Thomas Richard <thomas.richard at bootlin.com>
    Link: https://github.com/openwrt/openwrt/pull/19246
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/usb.mk | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index 4155082901..445a8ff0a1 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -11,15 +11,24 @@ USBNET_DIR:=net/usb
 USBHID_DIR?=hid/usbhid
 USBINPUT_DIR?=input/misc
 
+define KernelPackage/usb-common
+  TITLE:=USB common
+  HIDDEN:=1
+  DEPENDS:=@(USB_SUPPORT||USB_GADGET_SUPPORT)
+  KCONFIG:=CONFIG_USB_COMMON
+  FILES:=$(LINUX_DIR)/drivers/usb/common/usb-common.ko
+  AUTOLOAD:=$(call AutoLoad,20,usb-common,1)
+endef
+
+$(eval $(call KernelPackage,usb-common))
+
 define KernelPackage/usb-core
   SUBMENU:=$(USB_MENU)
   TITLE:=Support for USB
-  DEPENDS:=@USB_SUPPORT
+  DEPENDS:=@USB_SUPPORT +USB_SUPPORT:kmod-usb-common
   KCONFIG:=CONFIG_USB CONFIG_XPS_USB_HCD_XILINX=n CONFIG_USB_FHCI_HCD=n
-  FILES:= \
-	$(LINUX_DIR)/drivers/usb/core/usbcore.ko \
-	$(LINUX_DIR)/drivers/usb/common/usb-common.ko
-  AUTOLOAD:=$(call AutoLoad,20,usb-common usbcore,1)
+  FILES:=$(LINUX_DIR)/drivers/usb/core/usbcore.ko
+  AUTOLOAD:=$(call AutoLoad,20,usbcore,1)
   $(call AddDepends/nls)
 endef
 



From lede-commits at lists.infradead.org  Fri Aug  8 09:08:16 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 08 Aug 2025 12:08:16 -0400
Subject: [openwrt/openwrt]  kernel: usb: kmod-usb-dwc3: add gadget and
 dual-role modes support
In-Reply-To: <175466929389.2403926.7120280383932032336@git-01.infra.openwrt.org>
References: <175466929389.2403926.7120280383932032336@git-01.infra.openwrt.org>
Message-ID: <mailman.114482.1754669370.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0546f8b74d5860b5a44f453b6842f51a58842cb9

commit 0546f8b74d5860b5a44f453b6842f51a58842cb9
Author: Thomas Richard <thomas.richard at bootlin.com>
AuthorDate: Fri Jun 27 10:28:08 2025 +0200

    kernel: usb: kmod-usb-dwc3: add gadget and dual-role modes support
    
    Build DWC3 driver in the right mode:
    - host mode if kernel have usb host support only.
    - gadget mode if kernel have usbgadget support only.
    - dual-role mode if kernel have both usb host and usbgadget support.
    
    Signed-off-by: Thomas Richard <thomas.richard at bootlin.com>
    Link: https://github.com/openwrt/openwrt/pull/19246
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/usb.mk | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index d3b37311bc..af9346775e 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -508,17 +508,28 @@ $(eval $(call KernelPackage,usb-cdns3))
 
 
 define KernelPackage/usb-dwc3
+  SUBMENU:=$(USB_MENU)
   TITLE:=DWC3 USB controller driver
+  DEPENDS:=+USB_GADGET_SUPPORT:kmod-usb-gadget \
+	   +USB_SUPPORT:kmod-usb-core \
+	   +kmod-usb-roles
   KCONFIG:= \
 	CONFIG_USB_DWC3 \
-	CONFIG_USB_DWC3_HOST=y \
-	CONFIG_USB_DWC3_GADGET=n \
-	CONFIG_USB_DWC3_DUAL_ROLE=n \
 	CONFIG_USB_DWC3_DEBUG=n \
 	CONFIG_USB_DWC3_VERBOSE=n
+ifeq ($(CONFIG_USB_SUPPORT)$(CONFIG_USB_GADGET_SUPPORT),yy)
+  KCONFIG+= \
+	CONFIG_USB_DWC3_HOST=n \
+	CONFIG_USB_DWC3_GADGET=n \
+	CONFIG_USB_DWC3_DUAL_ROLE=y
+else
+  KCONFIG+= \
+	CONFIG_USB_DWC3_HOST=$(if $(CONFIG_USB_SUPPORT),y,n) \
+	CONFIG_USB_DWC3_GADGET=$(if $(CONFIG_USB_GADGET_SUPPORT),y,n) \
+	CONFIG_USB_DWC3_DUAL_ROLE=n
+endif
   FILES:= $(LINUX_DIR)/drivers/usb/dwc3/dwc3.ko
   AUTOLOAD:=$(call AutoLoad,54,dwc3,1)
-  $(call AddDepends/usb)
 endef
 
 define KernelPackage/usb-dwc3/description



From lede-commits at lists.infradead.org  Fri Aug  8 09:08:15 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 08 Aug 2025 12:08:15 -0400
Subject: [openwrt/openwrt]  kernel: usb: fix dependencies for kmod-usb-roles
 package
In-Reply-To: <175466929389.2403926.7120280383932032336@git-01.infra.openwrt.org>
References: <175466929389.2403926.7120280383932032336@git-01.infra.openwrt.org>
Message-ID: <mailman.114483.1754669370.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0f782fc2e9ed25767b4351047e815e9dc8ac8298

commit 0f782fc2e9ed25767b4351047e815e9dc8ac8298
Author: Thomas Richard <thomas.richard at bootlin.com>
AuthorDate: Fri Jun 27 15:59:22 2025 +0200

    kernel: usb: fix dependencies for kmod-usb-roles package
    
    The usb role driver does not depend on the kernel config CONFIG_USB (host
    side support). It only depends on the kernel config CONFIG_USB_SUPPORT.
    
    Now it depends on the OpenWrt configurations USB_SUPPORT or
    USB_GADGET_SUPPORT (usb and usbgadget features). We can assume that if usb
    or usbgadget features are set, CONFIG_USB_SUPPORT has been set in the
    target/subtarget kernel config.
    
    Signed-off-by: Thomas Richard <thomas.richard at bootlin.com>
    Link: https://github.com/openwrt/openwrt/pull/19246
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/usb.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index 239074de63..d3b37311bc 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -1868,11 +1868,12 @@ endef
 $(eval $(call KernelPackage,usb-net2280))
 
 define KernelPackage/usb-roles
+  SUBMENU:=$(USB_MENU)
   TITLE:=USB Role Switch Library Module
+  DEPENDS:=@USB_SUPPORT||USB_GADGET_SUPPORT
   KCONFIG:=CONFIG_USB_ROLE_SWITCH
   HIDDEN:=1
   FILES:=$(LINUX_DIR)/drivers/usb/roles/roles.ko
-  $(call AddDepends/usb)
 endef
 
 define KernelPackage/usb-roles/description



From lede-commits at lists.infradead.org  Fri Aug  8 09:08:14 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 08 Aug 2025 12:08:14 -0400
Subject: [openwrt/openwrt]  kernel: usb: gadget drivers do not depend on usb
 host support
In-Reply-To: <175466929389.2403926.7120280383932032336@git-01.infra.openwrt.org>
References: <175466929389.2403926.7120280383932032336@git-01.infra.openwrt.org>
Message-ID: <mailman.114484.1754669370.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/65aea930a5cf3b4a5beeeb45a46b4b26b94ce9b6

commit 65aea930a5cf3b4a5beeeb45a46b4b26b94ce9b6
Author: Thomas Richard <thomas.richard at bootlin.com>
AuthorDate: Fri Jun 27 15:58:45 2025 +0200

    kernel: usb: gadget drivers do not depend on usb host support
    
    The usb gadget drivers don't depend on usb host support, so fix the package
    dependencies accordingly.
    
    Signed-off-by: Thomas Richard <thomas.richard at bootlin.com>
    Link: https://github.com/openwrt/openwrt/pull/19246
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/usb.mk | 41 +++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 20 deletions(-)

diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index 445a8ff0a1..239074de63 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -99,14 +99,15 @@ $(eval $(call KernelPackage,phy-ath79-usb))
 
 
 define KernelPackage/usb-gadget
+  SUBMENU:=$(USB_MENU)
   TITLE:=USB Gadget support
   KCONFIG:=CONFIG_USB_GADGET
   HIDDEN:=1
   FILES:=\
 	$(LINUX_DIR)/drivers/usb/gadget/udc/udc-core.ko
   AUTOLOAD:=$(call AutoLoad,21,udc-core,1)
-  DEPENDS:=@USB_GADGET_SUPPORT
-  $(call AddDepends/usb)
+  DEPENDS:=@USB_GADGET_SUPPORT +kmod-usb-common
+  $(call AddDepends/nls)
 endef
 
 define KernelPackage/usb-gadget/description
@@ -115,14 +116,20 @@ endef
 
 $(eval $(call KernelPackage,usb-gadget))
 
+
+define AddDepends/usbgadget
+  SUBMENU:=$(USB_MENU)
+  DEPENDS+=+kmod-usb-gadget $(1)
+endef
+
+
 define KernelPackage/usb-lib-composite
   TITLE:=USB lib composite
   KCONFIG:=CONFIG_USB_LIBCOMPOSITE
-  DEPENDS:=+kmod-usb-gadget +kmod-fs-configfs
   HIDDEN:=1
   FILES:=$(LINUX_DIR)/drivers/usb/gadget/libcomposite.ko
   AUTOLOAD:=$(call AutoLoad,50,libcomposite)
-  $(call AddDepends/usb)
+  $(call AddDepends/usbgadget,+kmod-fs-configfs)
 endef
 
 define KernelPackage/usb-lib-composite/description
@@ -134,12 +141,11 @@ $(eval $(call KernelPackage,usb-lib-composite))
 define KernelPackage/usb-gadget-hid
   TITLE:=USB HID Gadget Support
   KCONFIG:=CONFIG_USB_G_HID
-  DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite
   FILES:= \
 	  $(LINUX_DIR)/drivers/usb/gadget/legacy/g_hid.ko \
 	  $(LINUX_DIR)/drivers/usb/gadget/function/usb_f_hid.ko
   AUTOLOAD:=$(call AutoLoad,52,usb_f_hid)
-  $(call AddDepends/usb)
+  $(call AddDepends/usbgadget,+kmod-usb-lib-composite)
 endef
 
 define KernelPackage/usb-gadget-hid/description
@@ -154,9 +160,8 @@ define KernelPackage/usb-gadget-ehci-debug
 	CONFIG_USB_G_DBGP \
 	CONFIG_USB_G_DBGP_SERIAL=y \
 	CONFIG_USB_G_DBGP_PRINTK=n
-  DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite +kmod-usb-gadget-serial
   FILES:=$(LINUX_DIR)/drivers/usb/gadget/legacy/g_dbgp.ko
-  $(call AddDepends/usb)
+  $(call AddDepends/usbgadget,+kmod-usb-lib-composite +kmod-usb-gadget-serial)
 endef
 
 define KernelPackage/usb-gadget-ehci-debug/description
@@ -171,7 +176,6 @@ define KernelPackage/usb-gadget-eth
 	CONFIG_USB_ETH \
 	CONFIG_USB_ETH_RNDIS=y \
 	CONFIG_USB_ETH_EEM=n
-  DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite
   FILES:= \
 	$(LINUX_DIR)/drivers/usb/gadget/function/u_ether.ko \
 	$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_ecm.ko \
@@ -179,7 +183,7 @@ define KernelPackage/usb-gadget-eth
 	$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_rndis.ko \
 	$(LINUX_DIR)/drivers/usb/gadget/legacy/g_ether.ko
   AUTOLOAD:=$(call AutoLoad,52,usb_f_ecm)
-  $(call AddDepends/usb)
+  $(call AddDepends/usbgadget,+kmod-usb-lib-composite)
 endef
 
 define KernelPackage/usb-gadget-eth/description
@@ -191,13 +195,11 @@ $(eval $(call KernelPackage,usb-gadget-eth))
 define KernelPackage/usb-gadget-ncm
   TITLE:=USB Network Control Model (NCM) Gadget support
   KCONFIG:=CONFIG_USB_G_NCM
-  DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite \
-	+kmod-usb-gadget-eth
   FILES:= \
 	$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_ncm.ko \
 	$(LINUX_DIR)/drivers/usb/gadget/legacy/g_ncm.ko
   AUTOLOAD:=$(call AutoLoad,52,usb_f_ncm)
-  $(call AddDepends/usb)
+  $(call AddDepends/usbgadget,+kmod-usb-lib-composite +kmod-usb-gadget-eth)
 endef
 
 define KernelPackage/usb-gadget-ncm/description
@@ -209,7 +211,6 @@ $(eval $(call KernelPackage,usb-gadget-ncm))
 define KernelPackage/usb-gadget-serial
   TITLE:=USB Serial Gadget support
   KCONFIG:=CONFIG_USB_G_SERIAL
-  DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite
   FILES:= \
 	$(LINUX_DIR)/drivers/usb/gadget/function/u_serial.ko \
 	$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_acm.ko \
@@ -217,7 +218,7 @@ define KernelPackage/usb-gadget-serial
 	$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_serial.ko \
 	$(LINUX_DIR)/drivers/usb/gadget/legacy/g_serial.ko
   AUTOLOAD:=$(call AutoLoad,52,usb_f_acm)
-  $(call AddDepends/usb)
+  $(call AddDepends/usbgadget,+kmod-usb-lib-composite)
 endef
 
 define KernelPackage/usb-gadget-serial/description
@@ -229,12 +230,11 @@ $(eval $(call KernelPackage,usb-gadget-serial))
 define KernelPackage/usb-gadget-mass-storage
   TITLE:=USB Mass Storage support
   KCONFIG:=CONFIG_USB_MASS_STORAGE
-  DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite
   FILES:= \
 	$(LINUX_DIR)/drivers/usb/gadget/function/usb_f_mass_storage.ko \
 	$(LINUX_DIR)/drivers/usb/gadget/legacy/g_mass_storage.ko
   AUTOLOAD:=$(call AutoLoad,52,usb_f_mass_storage)
-  $(call AddDepends/usb)
+  $(call AddDepends/usbgadget,+kmod-usb-lib-composite)
 endef
 
 define KernelPackage/usb-gadget-mass-storage/description
@@ -246,10 +246,11 @@ $(eval $(call KernelPackage,usb-gadget-mass-storage))
 define KernelPackage/usb-gadget-cdc-composite
   TITLE:= USB CDC Composite (Ethernet + ACM)
   KCONFIG:=CONFIG_USB_CDC_COMPOSITE
-  DEPENDS:=+kmod-usb-gadget +kmod-usb-lib-composite \
-	+kmod-usb-gadget-eth +kmod-usb-gadget-serial
   FILES:= $(LINUX_DIR)/drivers/usb/gadget/legacy/g_cdc.ko
-  $(call AddDepends/usb)
+  $(call AddDepends/usbgadget, \
+	  +kmod-usb-lib-composite \
+	  +kmod-usb-gadget-eth \
+	  +kmod-usb-gadget-serial)
 endef
 
 define KernelPackage/usb-gadget-cdc-composite/description



From lede-commits at lists.infradead.org  Fri Aug  8 09:08:17 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 08 Aug 2025 12:08:17 -0400
Subject: [openwrt/openwrt]  kernel: usb: fix dependencies for kmod-cdns3 and
 kmod-cdns
In-Reply-To: <175466929389.2403926.7120280383932032336@git-01.infra.openwrt.org>
References: <175466929389.2403926.7120280383932032336@git-01.infra.openwrt.org>
Message-ID: <mailman.114485.1754669370.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/96be6d4f8a9195a45aafbfb19047d1525206581e

commit 96be6d4f8a9195a45aafbfb19047d1525206581e
Author: Thomas Richard <thomas.richard at bootlin.com>
AuthorDate: Fri Jun 27 16:08:42 2025 +0200

    kernel: usb: fix dependencies for kmod-cdns3 and kmod-cdns
    
    The cdns3 driver can be built without usb host mode support. Fix
    dependencies to handle the case it is built with only gadget support.
    
    Signed-off-by: Thomas Richard <thomas.richard at bootlin.com>
    Link: https://github.com/openwrt/openwrt/pull/19246
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/usb.mk | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/package/kernel/linux/modules/usb.mk b/package/kernel/linux/modules/usb.mk
index af9346775e..8bf070a047 100644
--- a/package/kernel/linux/modules/usb.mk
+++ b/package/kernel/linux/modules/usb.mk
@@ -470,13 +470,15 @@ $(eval $(call KernelPackage,usb-dwc2-pci))
 
 
 define KernelPackage/usb-cdns
+  SUBMENU:=$(USB_MENU)
   TITLE:=Cadence USB USB controller driver
-  DEPENDS:=+USB_GADGET_SUPPORT:kmod-usb-gadget +kmod-usb-roles
+  DEPENDS:=+USB_GADGET_SUPPORT:kmod-usb-gadget \
+	   +USB_SUPPORT:kmod-usb-core \
+	   +kmod-usb-roles
   KCONFIG:= \
 	CONFIG_USB_CDNS_SUPPORT
   FILES:= $(LINUX_DIR)/drivers/usb/cdns3/cdns-usb-common.ko
   AUTOLOAD:=$(call AutoLoad,50,cdns-usb-common,1)
-  $(call AddDepends/usb)
 endef
 
 define KernelPackage/usb-cdns/description
@@ -488,15 +490,15 @@ $(eval $(call KernelPackage,usb-cdns))
 
 
 define KernelPackage/usb-cdns3
+  SUBMENU:=$(USB_MENU)
   TITLE:=Cadence USB3 USB controller driver
   DEPENDS:=+kmod-usb-cdns
   KCONFIG:= \
 	CONFIG_USB_CDNS3 \
-	CONFIG_USB_CDNS3_GADGET=y \
-	CONFIG_USB_CDNS3_HOST=y
+	CONFIG_USB_CDNS3_GADGET=$(if $(CONFIG_USB_GADGET_SUPPORT),y,n) \
+	CONFIG_USB_CDNS3_HOST=$(if $(CONFIG_USB_SUPPORT),y,n)
   FILES:= $(LINUX_DIR)/drivers/usb/cdns3/cdns3.ko
   AUTOLOAD:=$(call AutoLoad,54,cdns3,1)
-  $(call AddDepends/usb)
 endef
 
 define KernelPackage/usb-cdns3/description



From lede-commits at lists.infradead.org  Fri Aug  8 09:14:10 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 08 Aug 2025 12:14:10 -0400
Subject: [openwrt/openwrt]  mediatek: add support for CreatLentem CLT-R30B1
In-Reply-To: <175466965061.2441771.6619845085891416000@git-01.infra.openwrt.org>
References: <175466965061.2441771.6619845085891416000@git-01.infra.openwrt.org>
Message-ID: <mailman.114488.1754669654.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2fea2ede6340650052cb9688bdea4592df7f551a

commit 2fea2ede6340650052cb9688bdea4592df7f551a
Author: Andrii Kuiukoff <andros.ua at gmail.com>
AuthorDate: Sat Jul 26 16:34:22 2025 +0300

    mediatek: add support for CreatLentem CLT-R30B1
    
    CreatLentem CLT-R30B1 is a wireless WiFi 6 router.
    This device uses the CLT-R30B1_0824_V1.1 board
    shared by EDUP RT2980, Dragonglass DXG21,
    and other diamond-shaped 5-antenna routers.
    
    Specification
    -------------
    - SoC          : MediaTek MT7981B dual-core ARM Cortex-A53 1.3 GHz
    - RAM          : DDR3 256 MiB
    - Flash        : SPI-NAND 128 MiB (ESMT F50L1G41LB)
    - WLAN         : MediaTek MT7976CN dual-band WiFi 6
      - 2.4 GHz    : b/g/n/ax, MU-MIMO (2x 5 dBi antennas)
      - 5 GHz      : a/n/ac/ax, MU-MIMO (3x 5 dBi antennas)
    - Ethernet     :
      - LAN x3     : 10/100/1000 Mbps (MediaTek MT7531AE)
      - WAN x1     : 10/100/1000 Mbps (MT7981 internal PHY)
    - UART         : through-hole on PCB
      - assignment : (RX), (TX), (GND), [3.3V]
      - settings   : 115200n8
    - Buttons x2   : Mesh/WPS, Reset
    - LEDs x2      : Status (Red, Green)
    - Power        : 12 VDC, 1 A, 2.1*5.5 mm
    
    Important notes
    ---------------
    The device is supplied in two variants.
    The main difference is the size of the mtd5 (ubi)
    partition in the flash layout: 64M or 112M.
    112M version: Has ImmortalWrt firmware installed with LuCI WebUI.
    64M version: Has stock firmware based on OpenWrt,
    with the WaveLink/GL.iNet WebUI and older U-Boot
    compared to the 112M version.
    
    Flash instructions for 112M version
    -----------------------------------
    Follow the standard OpenWrt sysupgrade procedure without saving data.
    Use the clt-r30b1-112m-squashfs-sysupgrade.bin image.
    All checks should pass - don't proceed if a "not supported"
    warning is issued.
    
    Flash instructions for 64M version
    ----------------------------------
    WebUI Method:
    
    1. Prepare the upgrade image with clt-r30b1-squashfs-sysupgrade.bin
       using the script: make_staged_upgrade_tar.sh
       or use the prepared image: staged_openwrt_upgrade.bin
       Downloaded from:
       https://github.com/andros-ua/owrt-misc/tree/main/clt-r30b1
    2. Install the prepared image using the stock WebUI update page.
    3. Press and hold the reset button after reboot
       to wipe the stock config and gain access.
    
    SSH Method:
    
    1. Connect via SSH using dg:ivanlee credentials.
    2. Upload the clt-r30b1-squashfs-sysupgrade.bin image.
    3. Use the command: sysupgrade -n
       All checks should pass - don't proceed if a "not supported"
       warning is issued.
    
    Return to stock
    ---------------
    Flash a backup of the ubi mtdblock (mtd5)
    using the OpenWrt sysupgrade method.
    
    Recovery
    --------
    Both variants:
    Connect UART and use the U-Boot menu to flash the firmware image
    or boot an OpenWrt initramfs image.
    
    112M with newer U-Boot:
    Power on the router while pressing the mesh button for 3 seconds.
    The U-Boot Flash WebUI will be available at http://192.168.1.1
    
    MAC Addresses:
    -------------------------------------------------------
    | Interface    |  MAC              | Source           |
    ---------------|-------------------|-------------------
    | LAN          | B4:4D:43:D1:xx:xx | Factory, 0x2A    |
    | WAN          | B4:4D:43:D1:xx:xx | Factory, 0x24    |
    | WLAN 2.4 GHz | B4:4D:43:D2:xx:xx | Factory, 0x4     |
    | WLAN 5 GHz   | B4:4D:43:D2:xx:xx | Factory, 0x4 + 1 |
    -------------------------------------------------------
    
    Signed-off-by: Andrii Kuiukoff <andros.ua at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19534
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../dts/mt7981b-creatlentem-clt-r30b1-112m.dts     |  15 ++
 .../dts/mt7981b-creatlentem-clt-r30b1-common.dtsi  | 273 +++++++++++++++++++++
 .../mediatek/dts/mt7981b-creatlentem-clt-r30b1.dts |  20 ++
 .../filogic/base-files/etc/board.d/02_network      |   2 +
 .../filogic/base-files/lib/upgrade/platform.sh     |   2 +
 target/linux/mediatek/image/filogic.mk             |  35 +++
 6 files changed, 347 insertions(+)

diff --git a/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1-112m.dts b/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1-112m.dts
new file mode 100644
index 0000000000..36351565eb
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1-112m.dts
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7981b-creatlentem-clt-r30b1-common.dtsi"
+
+/ {
+	model = "CreatLentem CLT-R30B1 (112M)";
+	compatible = "creatlentem,clt-r30b1-112m", "mediatek,mt7981";
+};
+
+&partitions {
+	partition at 580000 {
+		label = "ubi";
+		reg = <0x0580000 0x7000000>;
+	};
+};
diff --git a/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1-common.dtsi b/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1-common.dtsi
new file mode 100644
index 0000000000..90d9ea04a1
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1-common.dtsi
@@ -0,0 +1,273 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+#include "mt7981b.dtsi"
+
+/ {
+	aliases {
+		led-boot = &led_status_red;
+		led-failsafe = &led_status_red;
+		led-running = &led_status_green;
+		led-upgrade = &led_status_green;
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+
+		wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_status_green: green {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+		};
+
+		led_status_red: red {
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&pio 12 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	memory {
+		reg = <0 0x40000000 0 0x10000000>;
+	};
+};
+
+&eth {
+	status = "okay";
+
+	gmac0: mac at 0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "2500base-x";
+
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_factory_24 0>;
+
+		fixed-link {
+			speed = <2500>;
+			full-duplex;
+			pause;
+		};
+	};
+
+	gmac1: mac at 1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		label = "wan";
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+
+		nvmem-cell-names = "mac-address";
+		nvmem-cells = <&macaddr_factory_2a 0>;
+	};
+
+};
+
+&mdio_bus {
+	switch: switch at 1f {
+		compatible = "mediatek,mt7531";
+		reg = <31>;
+		reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		interrupt-parent = <&pio>;
+		interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	status = "okay";
+
+	spi_nand at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-nand";
+		reg = <0>;
+
+		spi-max-frequency = <52000000>;
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+
+		spi-cal-enable;
+		spi-cal-mode = "read-data";
+		spi-cal-datalen = <7>;
+		spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4e 0x41 0x4e 0x44>;
+		spi-cal-addrlen = <5>;
+		spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
+
+		mediatek,nmbm;
+		mediatek,bmt-max-ratio = <1>;
+		mediatek,bmt-max-reserved-blocks = <64>;
+
+		partitions: partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "BL2";
+				reg = <0x0 0x100000>;
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "u-boot-env";
+				reg = <0x100000 0x80000>;
+			};
+
+			partition at 180000 {
+				label = "Factory";
+				reg = <0x180000 0x200000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x1000>;
+					};
+
+					macaddr_factory_4: macaddr at 4 {
+						reg = <0x4 0x6>;
+						compatible = "mac-base";
+						#nvmem-cell-cells = <1>;
+					};
+
+					macaddr_factory_24: macaddr at 24 {
+						compatible = "mac-base";
+						reg = <0x24 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+
+					macaddr_factory_2a: macaddr at 2a {
+						compatible = "mac-base";
+						reg = <0x2a 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+
+			partition at 380000 {
+				label = "FIP";
+				reg = <0x380000 0x200000>;
+				read-only;
+			};
+		};
+	};
+};
+
+
+&switch {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port at 0 {
+			reg = <0>;
+			label = "lan1";
+		};
+
+		port at 1 {
+			reg = <1>;
+			label = "lan2";
+		};
+
+		port at 2 {
+			reg = <2>;
+			label = "lan3";
+		};
+
+		port at 6 {
+			reg = <6>;
+			ethernet = <&gmac0>;
+			phy-mode = "2500base-x";
+
+			fixed-link {
+				speed = <2500>;
+				full-duplex;
+				pause;
+			};
+		};
+	};
+};
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+
+		conf-pu {
+			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+		};
+
+		conf-pd {
+			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+		};
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&wifi {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+	status = "okay";
+
+	band at 0 {
+		reg = <0>;
+		nvmem-cells = <&macaddr_factory_4 0>;
+		nvmem-cell-names = "mac-address";
+	};
+
+	band at 1 {
+		reg = <1>;
+		nvmem-cells = <&macaddr_factory_4 1>;
+		nvmem-cell-names = "mac-address";
+	};
+};
diff --git a/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1.dts b/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1.dts
new file mode 100644
index 0000000000..941d0c3435
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1.dts
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7981b-creatlentem-clt-r30b1-common.dtsi"
+
+/ {
+	model = "CreatLentem CLT-R30B1";
+	compatible = "creatlentem,clt-r30b1", "mediatek,mt7981";
+};
+
+&partitions {
+	partition at 580000 {
+		label = "ubi";
+		reg = <0x0580000 0x4000000>;
+	};
+	partition at 4580000 {
+		label = "data";
+		reg = <0x4580000 0x2000000>;
+	};
+
+};
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
index 1f9d3c551c..64efde9155 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -39,6 +39,8 @@ mediatek_setup_interfaces()
 	cmcc,a10-stock|\
 	cmcc,a10-ubootmod|\
 	confiabits,mt7981|\
+	creatlentem,clt-r30b1|\
+	creatlentem,clt-r30b1-112m|\
 	cudy,wr3000-v1|\
 	jcg,q30-pro|\
 	keenetic,kn-3811|\
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index 8138b8c0c7..4f29f2be42 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -256,6 +256,8 @@ platform_check_image() {
 		fit_check_image "$1"
 		return $?
 		;;
+	creatlentem,clt-r30b1|\
+	creatlentem,clt-r30b1-112m|\
 	nradio,c8-668gl)
 		# tar magic `ustar`
 		magic="$(dd if="$1" bs=1 skip=257 count=5 2>/dev/null)"
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 2e03bb8e7e..b1c3398014 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -711,6 +711,41 @@ define Device/confiabits_mt7981
 endef
 TARGET_DEVICES += confiabits_mt7981
 
+define Device/creatlentem_clt-r30b1-common
+  DEVICE_VENDOR := CreatLentem
+  DEVICE_MODEL := CLT-R30B1
+  DEVICE_ALT0_VENDOR := EDUP
+  DEVICE_ALT0_MODEL := RT2980
+  DEVICE_ALT1_VENDOR := Dragonglass
+  DEVICE_ALT1_MODEL := DXG21
+  DEVICE_DTS_DIR := ../dts
+  DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
+  UBINIZE_OPTS := -E 5
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  KERNEL_IN_UBI := 1
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+
+define Device/creatlentem_clt-r30b1-112m
+  DEVICE_VARIANT := 112M
+  DEVICE_ALT0_VARIANT := 112M
+  DEVICE_ALT1_VARIANT := 112M
+  DEVICE_DTS := mt7981b-creatlentem-clt-r30b1-112m
+  SUPPORTED_DEVICES += clt,r30b1 clt,r30b1-112m
+  IMAGE_SIZE := 114688k
+  $(call Device/creatlentem_clt-r30b1-common)
+endef
+TARGET_DEVICES += creatlentem_clt-r30b1-112m
+
+define Device/creatlentem_clt-r30b1
+  DEVICE_DTS := mt7981b-creatlentem-clt-r30b1
+  SUPPORTED_DEVICES += mediatek,mt7981-spim-snand-rfb
+  IMAGE_SIZE := 65536k
+  $(call Device/creatlentem_clt-r30b1-common)
+endef
+TARGET_DEVICES += creatlentem_clt-r30b1
+
 define Device/cudy_ap3000outdoor-v1
   DEVICE_VENDOR := Cudy
   DEVICE_MODEL := AP3000 Outdoor



From lede-commits at lists.infradead.org  Fri Aug  8 09:17:11 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 08 Aug 2025 12:17:11 -0400
Subject: [openwrt/openwrt]  ramips: add support for Hongdian H7920 v40
In-Reply-To: <175466983171.2462356.8961583564094323003@git-01.infra.openwrt.org>
References: <175466983171.2462356.8961583564094323003@git-01.infra.openwrt.org>
Message-ID: <mailman.114491.1754669897.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ebee9462273d3d30dbd29434e4f715ce39f80efc

commit ebee9462273d3d30dbd29434e4f715ce39f80efc
Author: Coia Prant <coiaprant at gmail.com>
AuthorDate: Sun Jan 26 03:40:58 2025 +0800

    ramips: add support for Hongdian H7920 v40
    
    This is an industrial 4G router equipped with OpenWrt SNAPSHOT OEM
    customized version
    
    WARNING: The original firmware device tree is modified from evb
    boards, and the device tree name is evb board. This submitted device
    tree is a modified version, which deletes the non-this-device parts
    and adds GPIO watchdog.
    
    Specification:
    - SoC: MediaTek MT7628NN
    - Flash: 16 MB
    - RAM: 128 MB
    - Power: DC 5V-36V 1.5A
    - Ethernet: 1x WAN [slot not install], 1x LAN (10/100 Mbps)
    - Wireless radio: 802.11n 2.4g-only [antenna not install]
    - LED:
      System/Power (RUN): GPIO/37 active-low
      Modem: GPIO/3 active-low
      RF (Modem Signal): GPIO/2 active-low
    - Button:
      WPS / RESET: GPIO/11 active-low
    - UART: 1x UART on PCB - 115200 8N1
    - Serial / COM: 1X RS232/RS485 on board (GPIO/6 hi:RS485 lo:RS232)
    - GPIO Watchdog: GPIO/0 mode=toggle timeout=1s
    - Modem: 1x Built-in modem on board (Power: GPIO/4 active-high)
    - PCIe: 1x miniPCIe for modem [slot not install]
    - SIM Slots: 1x SIM Slots
    
    Issue:
    - Factory partition not store mac address on original firmware
    
    Flash instruction:
    Using SSH/Telnet:
    1. Connect the board to the computer via RJ45 Ethernet
    2. Login 192.168.8.1 with root password "superzxmn" (SSH Port 22, Telnet Port 5188)
    3. Download openwrt firmware on the computer.
    4. Use scp or sftp put firmware to board /tmp
    5. Use command "mtd -r write openwrt-ramips-mt76x8-hongdian_h7920-v40-squashfs-sysupgrade.bin firmware"
       to flash
    
    Original Firmware Dump / More details:
    https://blog.gov.cooking/archives/research-hongdian-h7920-v40-and-flash.html
    
    Signed-off-by: Coia Prant <coiaprant at gmail.com>
    Tested-by: Coia Prant <coiaprant at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/17726
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../ramips/dts/mt7628an_hongdian_h7920-v40.dts     | 171 +++++++++++++++++++++
 target/linux/ramips/image/mt76x8.mk                |   9 ++
 .../mt76x8/base-files/etc/board.d/02_network       |   2 +
 .../mt76x8/base-files/etc/board.d/03_gpio_switches |   4 +
 4 files changed, 186 insertions(+)

diff --git a/target/linux/ramips/dts/mt7628an_hongdian_h7920-v40.dts b/target/linux/ramips/dts/mt7628an_hongdian_h7920-v40.dts
new file mode 100644
index 0000000000..76c395c382
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_hongdian_h7920-v40.dts
@@ -0,0 +1,171 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "hongdian,h7920-v40", "mediatek,mt7628an-soc";
+	model = "Hongdian H7920 v40";
+
+	aliases {
+		led-boot = &led_sys;
+		led-failsafe = &led_sys;
+		led-running = &led_sys;
+		led-upgrade = &led_sys;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,115200";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led-rf {
+			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = "rf";
+		};
+
+		led-net {
+			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_MOBILE;
+		};
+
+		led_sys: led-sys {
+			gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_POWER;
+			default-state = "on";
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	watchdog {
+		compatible = "linux,wdt-gpio";
+
+		gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+		hw_algo = "toggle";
+		hw_margin_ms = <600>;
+		always-running;
+	};
+
+	gpio-export {
+		compatible = "gpio-export";
+
+		gpio_modem_power {
+			gpio-export,name = "modem_power";
+			gpio-export,output = <0>;
+			gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
+		};
+
+		gpio_serial_rs485_mode {
+			gpio-export,name = "serial_rs485_mode";
+			gpio-export,output = <0>;
+			gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&watchdog {
+	status = "disabled";
+};
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <40000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x30000>;
+				read-only;
+			};
+
+			partition at 30000 {
+				label = "u-boot-env";
+				reg = <0x30000 0x10000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "factory";
+				reg = <0x40000 0x10000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x400>;
+					};
+
+					macaddr_factory_28: macaddr at 28 {
+						reg = <0x28 0x6>;
+					};
+				};
+			};
+
+			partition at 50000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x50000 0xfb0000>;
+			};
+		};
+	};
+};
+
+&state_default {
+	gpio {
+		groups = "i2s", "gpio", "refclk";
+		function = "gpio";
+	};
+};
+
+&ethernet {
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
+};
+
+&esw {
+	mediatek,portmap = <0x3e>;
+	mediatek,portdisable = <0x3c>;
+};
+
+&wmac {
+	status = "okay";
+
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+};
+
+&uart1 {
+	status = "okay";
+};
+
+&pcie {
+	status = "okay";
+};
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index 147acb81b7..ccd2c1ff23 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -339,6 +339,15 @@ define Device/hiwifi_hc5861b
 endef
 TARGET_DEVICES += hiwifi_hc5861b
 
+define Device/hongdian_h7920-v40
+  IMAGE_SIZE := 16064k
+  DEVICE_VENDOR := Hongdian
+  DEVICE_MODEL := H7920
+  DEVICE_VARIANT := v40
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
+endef
+TARGET_DEVICES += hongdian_h7920-v40
+
 define Device/iptime_a3
   IMAGE_SIZE := 7936k
   UIMAGE_NAME := a3
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
index 7bcd270982..76993a528a 100644
--- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
@@ -109,6 +109,7 @@ ramips_setup_interfaces()
 		;;
 	duzun,dm06|\
 	glinet,gl-mt300n-v2|\
+	hongdian,h7920-v40|\
 	teltonika,rut200|\
 	teltonika,rut241)
 		ucidef_add_switch "switch0" \
@@ -299,6 +300,7 @@ ramips_setup_macs()
 	totolink,a3)
 		wan_mac=$(mtd_get_mac_binary u-boot 0x1fc40)
 		;;
+	hongdian,h7920-v40|\
 	jotale,js76x8-8m|\
 	jotale,js76x8-16m|\
 	jotale,js76x8-32m|\
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/mt76x8/base-files/etc/board.d/03_gpio_switches
index fc9f20d9d2..3277e1c882 100644
--- a/target/linux/ramips/mt76x8/base-files/etc/board.d/03_gpio_switches
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/03_gpio_switches
@@ -9,6 +9,10 @@ board_config_update
 board=$(board_name)
 
 case "$board" in
+hongdian,h7920-v40)
+	ucidef_add_gpio_switch "modem_enable" "Modem power" "modem_power" "1"
+	ucidef_add_gpio_switch "switch_serial_mode" "Switch RS232 to RS485" "serial_rs485_mode" "0"
+	;;
 teltonika,rut200|\
 teltonika,rut241)
 	ucidef_add_gpio_switch "digital_output" "Digital output" "digital_output" "0"



From lede-commits at lists.infradead.org  Fri Aug  8 09:30:03 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 08 Aug 2025 12:30:03 -0400
Subject: [openwrt/openwrt]  realtek: switch Zyxel GS1900 initramfs recipe to
 rt-loader
In-Reply-To: <175467060392.2543005.11634373026034053143@git-01.infra.openwrt.org>
References: <175467060392.2543005.11634373026034053143@git-01.infra.openwrt.org>
Message-ID: <mailman.114496.1754670607.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8eea85584633d6cf70c8a043629e09b1781d90f5

commit 8eea85584633d6cf70c8a043629e09b1781d90f5
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Wed Aug 6 01:54:29 2025 -0400

    realtek: switch Zyxel GS1900 initramfs recipe to rt-loader
    
    These devices need a tiny (<8MB) initramfs. There are first
    occurrences where this fails with newer kernels and diagnostic
    packages.
    
    Switch the recipe over to use lzma compression and rt-loader.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19687
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/image/common.mk | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/linux/realtek/image/common.mk b/target/linux/realtek/image/common.mk
index d68915ea90..39c97cd845 100644
--- a/target/linux/realtek/image/common.mk
+++ b/target/linux/realtek/image/common.mk
@@ -86,8 +86,9 @@ define Device/zyxel_gs1900
   KERNEL_INITRAMFS := \
 	kernel-bin | \
 	append-dtb | \
-	libdeflate-gzip | \
+	rt-compress | \
 	zyxel-vers | \
-	uImage gzip | \
+	rt-loader | \
+	uImage none | \
 	check-size 6976k
 endef



From lede-commits at lists.infradead.org  Fri Aug  8 09:54:22 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 08 Aug 2025 12:54:22 -0400
Subject: [openwrt/openwrt]  wifi-scripts: add modular wps button handler
 scripts
In-Reply-To: <175467206210.2691059.10080614556961393876@git-01.infra.openwrt.org>
References: <175467206210.2691059.10080614556961393876@git-01.infra.openwrt.org>
Message-ID: <mailman.114501.1754672065.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3aee42001f493952b72a2ef3cd458bf9417c8940

commit 3aee42001f493952b72a2ef3cd458bf9417c8940
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Aug 8 18:18:49 2025 +0200

    wifi-scripts: add modular wps button handler scripts
    
    Execute scripts in /etc/rc.wps until one of them returns a exit code of 0.
    Split up sta and ap handling of wps into separate scripts.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../config/wifi-scripts/files/etc/rc.button/wps    |  6 ++++
 .../config/wifi-scripts/files/etc/rc.wps/40-wps_ap | 10 ++++++
 .../wifi-scripts/files/etc/rc.wps/50-wps_sta}      | 42 ++++++++--------------
 package/network/services/hostapd/Makefile          |  2 --
 4 files changed, 31 insertions(+), 29 deletions(-)

diff --git a/package/network/config/wifi-scripts/files/etc/rc.button/wps b/package/network/config/wifi-scripts/files/etc/rc.button/wps
new file mode 100755
index 0000000000..59b1aeff17
--- /dev/null
+++ b/package/network/config/wifi-scripts/files/etc/rc.button/wps
@@ -0,0 +1,6 @@
+#!/bin/sh
+[ "$ACTION" = "pressed" ] && exit 5
+for script in /etc/rc.wps/*; do
+	[ -x "$script" ] || continue
+	"$script" && break
+done
diff --git a/package/network/config/wifi-scripts/files/etc/rc.wps/40-wps_ap b/package/network/config/wifi-scripts/files/etc/rc.wps/40-wps_ap
new file mode 100755
index 0000000000..2cb7f6bec6
--- /dev/null
+++ b/package/network/config/wifi-scripts/files/etc/rc.wps/40-wps_ap
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+[ "$SEEN" -ge 3 ] && exit 1
+wps_done=0
+ubusobjs="$( ubus -S list hostapd.* )"
+for ubusobj in $ubusobjs; do
+	ubus -S call $ubusobj wps_start && wps_done=1
+done
+[ $wps_done = 1 ]
+
diff --git a/package/network/services/hostapd/files/wps-hotplug.sh b/package/network/config/wifi-scripts/files/etc/rc.wps/50-wps_sta
old mode 100644
new mode 100755
similarity index 52%
rename from package/network/services/hostapd/files/wps-hotplug.sh
rename to package/network/config/wifi-scripts/files/etc/rc.wps/50-wps_sta
index 073bdd1868..67a21e357a
--- a/package/network/services/hostapd/files/wps-hotplug.sh
+++ b/package/network/config/wifi-scripts/files/etc/rc.wps/50-wps_sta
@@ -1,4 +1,6 @@
 #!/bin/sh
+[ "$SEEN" -lt 3 ] && exit 1
+[ "$ACTION" = "released" ] || exit 1
 
 wps_catch_credentials() {
 	local iface ifaces ifc ifname ssid encryption key radio radios
@@ -38,32 +40,18 @@ wps_catch_credentials() {
 	done
 }
 
-if [ "$ACTION" = "released" ] && [ "$BUTTON" = "wps" ]; then
-	# If the button was pressed for 3 seconds or more, trigger WPS on
-	# wpa_supplicant only, no matter if hostapd is running or not.  If
-	# was pressed for less than 3 seconds, try triggering on
-	# hostapd. If there is no hostapd instance to trigger it on or WPS
-	# is not enabled on them, trigger it on wpa_supplicant.
-	if [ "$SEEN" -lt 3 ] ; then
-		wps_done=0
-		ubusobjs="$( ubus -S list hostapd.* )"
-		for ubusobj in $ubusobjs; do
-			ubus -S call $ubusobj wps_start && wps_done=1
-		done
-		[ $wps_done = 0 ] || return 0
+wps_done=0
+ubusobjs="$( ubus -S list wpa_supplicant.* )"
+for ubusobj in $ubusobjs; do
+	ifname="$(echo $ubusobj | cut -d'.' -f2 )"
+	multi_ap=""
+	if [ -e "/var/run/wpa_supplicant-${ifname}.conf.is_multiap" ]; then
+		ubus -S call $ubusobj wps_start '{ "multi_ap": true }' && wps_done=1
+	else
+		ubus -S call $ubusobj wps_start && wps_done=1
 	fi
-	wps_done=0
-	ubusobjs="$( ubus -S list wpa_supplicant.* )"
-	for ubusobj in $ubusobjs; do
-		ifname="$(echo $ubusobj | cut -d'.' -f2 )"
-		multi_ap=""
-		if [ -e "/var/run/wpa_supplicant-${ifname}.conf.is_multiap" ]; then
-			ubus -S call $ubusobj wps_start '{ "multi_ap": true }' && wps_done=1
-		else
-			ubus -S call $ubusobj wps_start && wps_done=1
-		fi
-	done
-	[ $wps_done = 0 ] || wps_catch_credentials &
-fi
+done
+[ $wps_done = 0 ] && exit 1
 
-return 0
+wps_catch_credentials &
+exit 0
diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index cdaf636c4a..4522eec8d4 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -726,14 +726,12 @@ endef
 define Package/hostapd-common/install
 	$(INSTALL_DIR) \
 	  $(1)/etc/capabilities \
-	  $(1)/etc/rc.button \
 	  $(1)/etc/hotplug.d/ieee80211 \
 	  $(1)/etc/init.d $(1)/lib/netifd \
 	  $(1)/usr/share/acl.d \
 	  $(1)/usr/share/hostap
 	$(INSTALL_BIN) ./files/dhcp-get-server.sh $(1)/lib/netifd/dhcp-get-server.sh
 	$(INSTALL_BIN) ./files/wpad.init $(1)/etc/init.d/wpad
-	$(INSTALL_BIN) ./files/wps-hotplug.sh $(1)/etc/rc.button/wps
 	$(INSTALL_DATA) ./files/wpad_acl.json $(1)/usr/share/acl.d
 	$(INSTALL_DATA) ./files/wpad.json $(1)/etc/capabilities
 endef



From lede-commits at lists.infradead.org  Sat Aug  9 00:26:25 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 09 Aug 2025 03:26:25 -0400
Subject: [openwrt/openwrt]  netifd: add missing dependencies
In-Reply-To: <175472438515.3118396.4569291914825101645@git-01.infra.openwrt.org>
References: <175472438515.3118396.4569291914825101645@git-01.infra.openwrt.org>
Message-ID: <mailman.114744.1754724496.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f650f2975c073e9e15540fa7db91c50e2df77135

commit f650f2975c073e9e15540fa7db91c50e2df77135
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Aug 9 09:24:42 2025 +0200

    netifd: add missing dependencies
    
    Fixes: https://github.com/openwrt/openwrt/issues/19704
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 0677d36da0..bc82ea70dd 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -21,7 +21,8 @@ include $(INCLUDE_DIR)/cmake.mk
 define Package/netifd
   SECTION:=base
   CATEGORY:=Base system
-  DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn +libubox +libudebug +ucode +ucode-mod-fs
+  DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn +libubox +libudebug \
+	+ucode +ucode-mod-fs +ucode-mod-ubus +ucode-mod-uloop +ucode-mod-uci
   TITLE:=OpenWrt Network Interface Configuration Daemon
 endef
 



From lede-commits at lists.infradead.org  Sat Aug  9 06:57:22 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 09 Aug 2025 09:57:22 -0400
Subject: [openwrt/openwrt]  rpcd: update to Git HEAD (2025-08-09)
In-Reply-To: <175474784222.786852.4712783602949171719@git-01.infra.openwrt.org>
References: <175474784222.786852.4712783602949171719@git-01.infra.openwrt.org>
Message-ID: <mailman.114770.1754747847.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7df4f7d7094e05468deb91ee43fbf0bec70a35cc

commit 7df4f7d7094e05468deb91ee43fbf0bec70a35cc
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Aug 9 15:56:11 2025 +0200

    rpcd: update to Git HEAD (2025-08-09)
    
    1905e096a8b7 ucode: adjust for new ext resource type
    
    Fixes: https://github.com/openwrt/rpcd/issues/17
    Fixes: https://github.com/openwrt/luci/issues/7878
    Fixes: https://github.com/openwrt/openwrt/issues/19726
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/system/rpcd/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile
index a885da0543..aecd21e367 100644
--- a/package/system/rpcd/Makefile
+++ b/package/system/rpcd/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rpcd
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
-PKG_MIRROR_HASH:=51c77637b65dd3dbd0d39f902223678d190fb409a1293ac92bd5665ac790cab4
-PKG_SOURCE_DATE:=2025-06-22
-PKG_SOURCE_VERSION:=9389775ceb4702c82bd62b79cf17b0359c63e527
+PKG_MIRROR_HASH:=1628372b214012b2c1c686d03692ee84e04e033669a0269a06de6dac4d20e974
+PKG_SOURCE_DATE:=2025-08-09
+PKG_SOURCE_VERSION:=1905e096a8b722e67733cd4088026f571b27e521
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 
 PKG_LICENSE:=ISC



From lede-commits at lists.infradead.org  Sat Aug  9 07:02:43 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 09 Aug 2025 10:02:43 -0400
Subject: [openwrt/openwrt]  rpcd: backport ucode fix
In-Reply-To: <175474816376.797924.4311599085778964978@git-01.infra.openwrt.org>
References: <175474816376.797924.4311599085778964978@git-01.infra.openwrt.org>
Message-ID: <mailman.114771.1754748167.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/b2116dbce4976ee9596d90964a4f145440b1c51e

commit b2116dbce4976ee9596d90964a4f145440b1c51e
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Aug 9 16:01:33 2025 +0200

    rpcd: backport ucode fix
    
    ucode: adjust for new ext resource type
    ucv_resource_dataptr always returns null for resources with embedded data.
    
    Fixes: https://github.com/openwrt/rpcd/issues/17
    Fixes: https://github.com/openwrt/luci/issues/7878
    Fixes: https://github.com/openwrt/openwrt/issues/19726
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../100-ucode-adjust-for-new-ext-resource-type.patch | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/package/system/rpcd/patches/100-ucode-adjust-for-new-ext-resource-type.patch b/package/system/rpcd/patches/100-ucode-adjust-for-new-ext-resource-type.patch
new file mode 100644
index 0000000000..0b0acd4458
--- /dev/null
+++ b/package/system/rpcd/patches/100-ucode-adjust-for-new-ext-resource-type.patch
@@ -0,0 +1,20 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sat, 9 Aug 2025 15:55:11 +0200
+Subject: [PATCH] ucode: adjust for new ext resource type
+
+ucv_resource_dataptr always returns null for resources with embedded data.
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/ucode.c
++++ b/ucode.c
+@@ -449,7 +449,7 @@ rpc_ucode_script_call(struct ubus_contex
+ 		res = uc_vm_stack_pop(&script->vm);
+ 
+ 		/* The handler function invoked a nested aync ubus request and returned it */
+-		if (ucv_resource_dataptr(res, "ubus.deferred")) {
++		if (ucv_resource_data(res, "ubus.deferred")) {
+ 			/* Install guard timer in case the reply callback is never called */
+ 			callctx->timeout.cb = rpc_ucode_request_timeout;
+ 			uloop_timeout_set(&callctx->timeout, request_timeout);



From lede-commits at lists.infradead.org  Sat Aug  9 07:48:40 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 09 Aug 2025 10:48:40 -0400
Subject: [openwrt/openwrt]  mac80211: fix division by zero in expected
 throughput estimation
In-Reply-To: <175475092023.902769.1816102052336061374@git-01.infra.openwrt.org>
References: <175475092023.902769.1816102052336061374@git-01.infra.openwrt.org>
Message-ID: <mailman.114782.1754751361.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/886c4f054e5e34bc3de23d65da76180eea358c4a

commit 886c4f054e5e34bc3de23d65da76180eea358c4a
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Aug 9 16:47:45 2025 +0200

    mac80211: fix division by zero in expected throughput estimation
    
    Fixes: https://github.com/openwrt/openwrt/issues/19729
    Fixes: f10732fb5632 ("mac80211: estimate expected throughput if not provided by driver/rc")
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../361-mac80211-estimate-expected-throughput-if-not-provide.patch  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/kernel/mac80211/patches/subsys/361-mac80211-estimate-expected-throughput-if-not-provide.patch b/package/kernel/mac80211/patches/subsys/361-mac80211-estimate-expected-throughput-if-not-provide.patch
index 9bcaf86504..81cff9e7e8 100644
--- a/package/kernel/mac80211/patches/subsys/361-mac80211-estimate-expected-throughput-if-not-provide.patch
+++ b/package/kernel/mac80211/patches/subsys/361-mac80211-estimate-expected-throughput-if-not-provide.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/mac80211/sta_info.c
 +++ b/net/mac80211/sta_info.c
-@@ -2621,6 +2621,27 @@ static inline u64 sta_get_stats_bytes(st
+@@ -2621,6 +2621,29 @@ static inline u64 sta_get_stats_bytes(st
  	return value;
  }
  
@@ -33,6 +33,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +
 +	duration = ieee80211_rate_expected_tx_airtime(hw, NULL, ri, band, true, 1024);
 +	duration += duration >> 4; /* add assumed packet error rate of ~6% */
++	if (!duration)
++		return 0;
 +
 +	return ((1024 * USEC_PER_SEC) / duration) * 8;
 +}
@@ -40,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
  		   bool tidstats)
  {
-@@ -2865,6 +2886,8 @@ void sta_set_sinfo(struct sta_info *sta,
+@@ -2865,6 +2888,8 @@ void sta_set_sinfo(struct sta_info *sta,
  		sinfo->sta_flags.set |= BIT(NL80211_STA_FLAG_TDLS_PEER);
  
  	thr = sta_get_expected_throughput(sta);



From lede-commits at lists.infradead.org  Sun Aug 10 01:17:57 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 04:17:57 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: fix unencrypted sta
 connection
In-Reply-To: <175481387768.177315.3446050065803473646@git-01.infra.openwrt.org>
References: <175481387768.177315.3446050065803473646@git-01.infra.openwrt.org>
Message-ID: <mailman.115010.1754813882.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/aa0b5eb429fe62c6fae10d552be5e2461a40a5ab

commit aa0b5eb429fe62c6fae10d552be5e2461a40a5ab
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 10 10:17:12 2025 +0200

    wifi-scripts: ucode: fix unencrypted sta connection
    
    add missing key_mgmt option
    
    Fixes: https://github.com/openwrt/openwrt/issues/17578
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc  | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
index f2d51ed349..1c41e3c396 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
@@ -159,6 +159,8 @@ function setup_sta(data, config) {
 		config.group = 'GCMP';
 	}
 
+	config.key_mgmt ??= 'NONE';
+
 	config.basic_rate = ratelist(config.basic_rate);
 	config.mcast_rate = ratestr(config.mcast_rate);
 



From lede-commits at lists.infradead.org  Sun Aug 10 02:43:11 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 05:43:11 -0400
Subject: [openwrt/openwrt]  gcc: 15.x: update to 15.2
In-Reply-To: <175481899100.449282.8012773625152305239@git-01.infra.openwrt.org>
References: <175481899100.449282.8012773625152305239@git-01.infra.openwrt.org>
Message-ID: <mailman.115011.1754818995.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7bc227b82d8cb0ce2d9f7262efba435b6cc6fb58

commit 7bc227b82d8cb0ce2d9f7262efba435b6cc6fb58
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Fri Aug 8 14:31:18 2025 +0200

    gcc: 15.x: update to 15.2
    
    Update GCC15 to 15.2 to include upstream bugfixes.
    
    Link: https://github.com/openwrt/openwrt/pull/19713
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 toolchain/gcc/Config.version                    | 2 +-
 toolchain/gcc/common.mk                         | 4 ++--
 toolchain/gcc/patches-15.x/910-mbsd_multi.patch | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 34e8c17786..063a2dc9ce 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -15,7 +15,7 @@ config GCC_VERSION
 	default EXTERNAL_GCC_VERSION	if EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
 	default "12.3.0"	if GCC_VERSION_12
 	default "13.3.0"	if GCC_VERSION_13
-	default "15.1.0"	if GCC_VERSION_15
+	default "15.2.0"	if GCC_VERSION_15
 	default "14.3.0"
 
 config GCC_USE_DEFAULT_VERSION
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index 23e337dc2f..3c1167724e 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -46,8 +46,8 @@ ifeq ($(PKG_VERSION),14.3.0)
   PKG_HASH:=e0dc77297625631ac8e50fa92fffefe899a4eb702592da5c32ef04e2293aca3a
 endif
 
-ifeq ($(PKG_VERSION),15.1.0)
-  PKG_HASH:=e2b09ec21660f01fecffb715e0120265216943f038d0e48a9868713e54f06cea
+ifeq ($(PKG_VERSION),15.2.0)
+  PKG_HASH:=438fd996826b0c82485a29da03a72d71d6e3541a83ec702df4271f6fe025d24e
 endif
 
 PATCH_DIR=../patches-$(GCC_MAJOR_VERSION).x
diff --git a/toolchain/gcc/patches-15.x/910-mbsd_multi.patch b/toolchain/gcc/patches-15.x/910-mbsd_multi.patch
index c5462e12c8..4b29ac01cc 100644
--- a/toolchain/gcc/patches-15.x/910-mbsd_multi.patch
+++ b/toolchain/gcc/patches-15.x/910-mbsd_multi.patch
@@ -40,7 +40,7 @@ Date:   Tue Jul 31 00:52:27 2007 +0000
      case OPT_fconstant_string_class_:
        constant_string_class_name = arg;
        break;
-@@ -1359,6 +1368,47 @@ c_common_init (void)
+@@ -1361,6 +1370,47 @@ c_common_init (void)
        return false;
      }
  



From lede-commits at lists.infradead.org  Sun Aug 10 02:46:57 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 05:46:57 -0400
Subject: [openwrt/openwrt]  realtek: add NAND targets for RTL93xx
In-Reply-To: <175481921730.465760.17996170028635614565@git-01.infra.openwrt.org>
References: <175481921730.465760.17996170028635614565@git-01.infra.openwrt.org>
Message-ID: <mailman.115012.1754819220.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7cf7f7c6b9091cd70024ee8cf680b970a21bf91c

commit 7cf7f7c6b9091cd70024ee8cf680b970a21bf91c
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Thu Aug 7 02:11:51 2025 -0400

    realtek: add NAND targets for RTL93xx
    
    Some known RTL93xx devices like the Linksys LGS328C or LGS352C are
    NAND based. These require additional drivers and packages (e.g. UBI).
    The current subtargets are already taylored down for devices with
    only 16MB flash. Adding features that are not used will only make
    the storage situation more complicated.
    
    Add two new subtargets for RTL93xx that include the basic NAND, UBI
    and MTD features. To achieve this do the following:
    
    - Create new subtarget folders
    - Copy the existing config and makefiles over
    - Add the basic additional features
    - Mark them as SOURCE-ONLY
    - Add empty image makefiles
    - Remove unneded NAND/MTD features from existing configs
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19700
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/realtek/Makefile                              |  4 ++--
 target/linux/realtek/image/rtl930x_nand.mk                 |  1 +
 target/linux/realtek/image/rtl931x_nand.mk                 |  1 +
 target/linux/realtek/rtl930x/config-6.12                   |  4 ++--
 target/linux/realtek/{rtl930x => rtl930x_nand}/config-6.12 |  5 +++++
 target/linux/realtek/rtl930x_nand/target.mk                | 11 +++++++++++
 target/linux/realtek/rtl931x/config-6.12                   |  4 ++--
 target/linux/realtek/{rtl931x => rtl931x_nand}/config-6.12 |  5 +++++
 target/linux/realtek/rtl931x_nand/target.mk                | 11 +++++++++++
 9 files changed, 40 insertions(+), 6 deletions(-)

diff --git a/target/linux/realtek/Makefile b/target/linux/realtek/Makefile
index 5cd62e7c04..c9bfb880a3 100644
--- a/target/linux/realtek/Makefile
+++ b/target/linux/realtek/Makefile
@@ -7,12 +7,12 @@ BOARD:=realtek
 BOARDNAME:=Realtek MIPS
 DEVICE_TYPE:=basic
 FEATURES:=ramdisk squashfs
-SUBTARGETS:=rtl838x rtl839x rtl930x rtl931x
+SUBTARGETS:=rtl838x rtl839x rtl930x rtl930x_nand rtl931x rtl931x_nand
 
 KERNEL_PATCHVER:=6.12
 
 define Target/Description
-	Build firmware images for Realtek RTL83xx based boards.
+	Build firmware images for Realtek RTL83xx/RTL93xx based boards.
 endef
 
 include $(INCLUDE_DIR)/target.mk
diff --git a/target/linux/realtek/image/rtl930x_nand.mk b/target/linux/realtek/image/rtl930x_nand.mk
new file mode 100644
index 0000000000..a4e40e534e
--- /dev/null
+++ b/target/linux/realtek/image/rtl930x_nand.mk
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/target/linux/realtek/image/rtl931x_nand.mk b/target/linux/realtek/image/rtl931x_nand.mk
new file mode 100644
index 0000000000..a4e40e534e
--- /dev/null
+++ b/target/linux/realtek/image/rtl931x_nand.mk
@@ -0,0 +1 @@
+# SPDX-License-Identifier: GPL-2.0-only
diff --git a/target/linux/realtek/rtl930x/config-6.12 b/target/linux/realtek/rtl930x/config-6.12
index 76f1907503..47779f151d 100644
--- a/target/linux/realtek/rtl930x/config-6.12
+++ b/target/linux/realtek/rtl930x/config-6.12
@@ -143,7 +143,7 @@ CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_MTD_CFI_GEOMETRY=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_JEDECPROBE=y
-CONFIG_MTD_SPI_NAND=y
+# CONFIG_MTD_SPI_NAND is not set
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_BRNIMAGE_FW=y
 CONFIG_MTD_SPLIT_EVA_FW=y
@@ -219,7 +219,7 @@ CONFIG_SMP_UP=y
 CONFIG_SPI=y
 CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
-CONFIG_SPI_REALTEK_SNAND=y
+# CONFIG_SPI_REALTEK_SNAND is not set
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 CONFIG_SWPHY=y
 CONFIG_SYNC_R4K=y
diff --git a/target/linux/realtek/rtl930x/config-6.12 b/target/linux/realtek/rtl930x_nand/config-6.12
similarity index 98%
copy from target/linux/realtek/rtl930x/config-6.12
copy to target/linux/realtek/rtl930x_nand/config-6.12
index 76f1907503..0f4294ac30 100644
--- a/target/linux/realtek/rtl930x/config-6.12
+++ b/target/linux/realtek/rtl930x_nand/config-6.12
@@ -150,6 +150,10 @@ CONFIG_MTD_SPLIT_EVA_FW=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_TPLINK_FW=y
 CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+CONFIG_MTD_UBI_BLOCK=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NET_DEVLINK=y
@@ -248,6 +252,7 @@ CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y
 CONFIG_TINY_SRCU=y
+CONFIG_UBIFS_FS=y
 CONFIG_USE_GENERIC_EARLY_PRINTK_8250=y
 CONFIG_USE_OF=y
 CONFIG_WATCHDOG_CORE=y
diff --git a/target/linux/realtek/rtl930x_nand/target.mk b/target/linux/realtek/rtl930x_nand/target.mk
new file mode 100644
index 0000000000..2ca02dd28d
--- /dev/null
+++ b/target/linux/realtek/rtl930x_nand/target.mk
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0-only
+ARCH:=mips
+SUBTARGET:=rtl930x_nand
+CPU_TYPE:=24kc
+BOARD:=realtek
+BOARDNAME:=Realtek MIPS RTL930X (NAND)
+FEATURES+=nand source-only
+
+define Target/Description
+	Build firmware images for Realtek RTL930x based boards.
+endef
diff --git a/target/linux/realtek/rtl931x/config-6.12 b/target/linux/realtek/rtl931x/config-6.12
index 8d2a3553b4..5762ca139d 100644
--- a/target/linux/realtek/rtl931x/config-6.12
+++ b/target/linux/realtek/rtl931x/config-6.12
@@ -153,7 +153,7 @@ CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_MTD_CFI_GEOMETRY=y
 CONFIG_MTD_CMDLINE_PARTS=y
 CONFIG_MTD_JEDECPROBE=y
-CONFIG_MTD_SPI_NAND=y
+# CONFIG_MTD_SPI_NAND is not set
 CONFIG_MTD_SPI_NOR=y
 CONFIG_MTD_SPLIT_BRNIMAGE_FW=y
 CONFIG_MTD_SPLIT_EVA_FW=y
@@ -228,7 +228,7 @@ CONFIG_SOCK_RX_QUEUE_MAPPING=y
 CONFIG_SPI=y
 CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
-CONFIG_SPI_REALTEK_SNAND=y
+# CONFIG_SPI_REALTEK_SNAND is not set
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 CONFIG_SWPHY=y
 CONFIG_SYNC_R4K=y
diff --git a/target/linux/realtek/rtl931x/config-6.12 b/target/linux/realtek/rtl931x_nand/config-6.12
similarity index 98%
copy from target/linux/realtek/rtl931x/config-6.12
copy to target/linux/realtek/rtl931x_nand/config-6.12
index 8d2a3553b4..df7505522a 100644
--- a/target/linux/realtek/rtl931x/config-6.12
+++ b/target/linux/realtek/rtl931x_nand/config-6.12
@@ -160,6 +160,10 @@ CONFIG_MTD_SPLIT_EVA_FW=y
 CONFIG_MTD_SPLIT_FIRMWARE=y
 CONFIG_MTD_SPLIT_TPLINK_FW=y
 CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+CONFIG_MTD_UBI_BLOCK=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_SRCU_NMI_SAFE=y
 CONFIG_NET_DEVLINK=y
@@ -253,6 +257,7 @@ CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y
 CONFIG_TREE_RCU=y
 CONFIG_TREE_SRCU=y
+CONFIG_UBIFS_FS=y
 CONFIG_USE_GENERIC_EARLY_PRINTK_8250=y
 CONFIG_USE_OF=y
 CONFIG_WATCHDOG_CORE=y
diff --git a/target/linux/realtek/rtl931x_nand/target.mk b/target/linux/realtek/rtl931x_nand/target.mk
new file mode 100644
index 0000000000..ba2c3f2b8d
--- /dev/null
+++ b/target/linux/realtek/rtl931x_nand/target.mk
@@ -0,0 +1,11 @@
+# SPDX-License-Identifier: GPL-2.0-only
+ARCH:=mips
+SUBTARGET:=rtl931x_nand
+CPU_TYPE:=24kc
+BOARD:=realtek
+BOARDNAME:=Realtek MIPS RTL931X (NAND)
+FEATURES+=nand source-only
+
+define Target/Description
+	Build firmware images for Realtek RTL931x based boards.
+endef



From lede-commits at lists.infradead.org  Sun Aug 10 02:47:34 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 05:47:34 -0400
Subject: [openwrt/openwrt]  realtek: RTL930x: reorganize mdio functions and
 SerDes register layout
In-Reply-To: <175481925413.467897.2536122650439577940@git-01.infra.openwrt.org>
References: <175481925413.467897.2536122650439577940@git-01.infra.openwrt.org>
Message-ID: <mailman.115013.1754819257.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/07a04d8485a4437801569b2575e2ef1d3ee1b3fc

commit 07a04d8485a4437801569b2575e2ef1d3ee1b3fc
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Wed Aug 6 06:42:00 2025 -0400

    realtek: RTL930x: reorganize mdio functions and SerDes register layout
    
    The RTL930x mdio functions are scattered around the code. Relocate
    them to the bus (still inside the ethernet driver). With this change
    the phy identification looks into the proper registers. The SerDes
    phy identifier (register 2/3) must be changed.
    
    Additionally provide a consistent SerDes register access through the
    mdio bus. Until now when a SerDes directly drives a SFP module there
    is no clear rule of how to handle its register set that consists of
    two parts:
    
    - c22 phy registers 0-15 live in the fiber page (2) of the SerDes
    - other SerDes specific registers exist in pages before and after
    
    The mdio bus and other SerDes functions are a wild mix of directly
    looking into page 2 or just using self defined methods to access
    data.
    
    Adapt the bus to the new consistent phy interface that mixes the
    SerDes register set like classic Realtek phys do it.
    
    - Use register 31 as page select (already in the bus)
    - Always keep the common registers 0-15 in place and read fiber page
    - Map the SerDes internal registers into the upper vendor specific
      registers 16-23 according to the page select register (31).
    
    That gives a register mapping as follows:
    
    +-----------------------+-----------------------+---------------+-------------+
    | reg 0x00-0x0f         | reg 0x10-0x17         | reg 0x18-0x1e | reg 0x1f    |
    +-----------------------+-----------------------+---------------+-------------+
    | SerDes fiber page (3) | real SerDes registers | zero          | SerDes page |
    | registers 0 - 15      | in packages of 8      |               | select reg  |
    +-----------------------+-----------------------+---------------+-------------+
    
    Example to make it as clear as possible.
    
    SerDes registers on a RTL930x show
    
    Page / Reg   | 0x00 0x01 0x02 0x03 0x04 0x05 0x06 0x07 0x08 0x09 0x0A 0x0B ...
    -------------+----------------------------------------------------------------
    0 - SDS      | 0C03 0F00 7060 7106 074D 0EBF 0F0F 0359 5248 0000 0F80 0000 ...
    1 - SDS_EXT  | 0000 0000 85FA 8C6D 5CCC 0000 20D8 0003 79AA 8C64 00C3 1482 ...
    2 - FIB      | 1140 6189 001C CA40 01A0 0000 0000 0004 0000 0000 0000 0000 ...
    3 - FIB_EXT  | 1140 6109 001C CA40 01A0 0000 0000 0004 0000 0000 0000 0000 ...
    
    This translates to this phy layout
    
                 | SerDes fiber registers  normal SerDes registers  zero     p.sel
    Page / Reg   | 0x00 0x01 0x02 0x03 ... 0x10 0x11 0x12 0x13 ...  0x18 ... 0x1f
    -------------+---------------------------------------------------------------
    0            | 1140 6189 001C CA40 ... 0C03 0F00 7060 7106 ...  0000 ... 0000
    1            | 1140 6189 001C CA40 ... 5248 0000 0F80 0000 ...  0000 ... 0001
    ...
    4            | 1140 6189 001C CA40 ... 0000 0000 85FA 8C6D ...  0000 ... 0004
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19692
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../mips/include/asm/mach-rtl838x/mach-rtl83xx.h   |   7 -
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h   |   3 -
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c   | 119 ---------------
 .../files-6.12/drivers/net/ethernet/rtl838x_eth.c  | 168 +++++++++++++++++----
 .../files-6.12/drivers/net/phy/rtl83xx-phy.h       |   2 +-
 5 files changed, 140 insertions(+), 159 deletions(-)

diff --git a/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h b/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
index 2946674036..808cbd245c 100644
--- a/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
+++ b/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
@@ -415,13 +415,6 @@ struct rtl83xx_soc_info {
 };
 
 /* rtl83xx-related functions used across subsystems */
-int rtl838x_smi_wait_op(int timeout);
-int rtl838x_read_phy(u32 port, u32 page, u32 reg, u32 *val);
-int rtl838x_write_phy(u32 port, u32 page, u32 reg, u32 val);
-int rtl839x_read_phy(u32 port, u32 page, u32 reg, u32 *val);
-int rtl839x_write_phy(u32 port, u32 page, u32 reg, u32 val);
-int rtl930x_read_phy(u32 port, u32 page, u32 reg, u32 *val);
-int rtl930x_write_phy(u32 port, u32 page, u32 reg, u32 val);
 int rtl931x_read_phy(u32 port, u32 page, u32 reg, u32 *val);
 int rtl931x_write_phy(u32 port, u32 page, u32 reg, u32 val);
 
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
index 07cd98572a..7dff91e3b7 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
@@ -194,9 +194,6 @@ int rtl83xx_lag_del(struct dsa_switch *ds, int group, int port);
 
 /* phy functions that will need to be moved to the future mdio driver */
 
-int rtl930x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val);
-int rtl930x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val);
-
 int rtl931x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val);
 int rtl931x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val);
 
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
index 034b5c09f0..d7f611f943 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
@@ -741,125 +741,6 @@ irqreturn_t rtldsa_930x_switch_irq(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-int rtl930x_write_phy(u32 port, u32 page, u32 reg, u32 val)
-{
-	u32 v;
-	int err = 0;
-
-	pr_debug("%s: port %d, page: %d, reg: %x, val: %x\n", __func__, port, page, reg, val);
-
-	if (port > 63 || page > 4095 || reg > 31)
-		return -ENOTSUPP;
-
-	val &= 0xffff;
-	mutex_lock(&smi_lock);
-
-	sw_w32(BIT(port), RTL930X_SMI_ACCESS_PHY_CTRL_0);
-	sw_w32_mask(0xffff << 16, val << 16, RTL930X_SMI_ACCESS_PHY_CTRL_2);
-	v = reg << 20 | page << 3 | 0x1f << 15 | BIT(2) | BIT(0);
-	sw_w32(v, RTL930X_SMI_ACCESS_PHY_CTRL_1);
-
-	do {
-		v = sw_r32(RTL930X_SMI_ACCESS_PHY_CTRL_1);
-	} while (v & 0x1);
-
-	if (v & 0x2)
-		err = -EIO;
-
-	mutex_unlock(&smi_lock);
-
-	return err;
-}
-
-int rtl930x_read_phy(u32 port, u32 page, u32 reg, u32 *val)
-{
-	u32 v;
-	int err = 0;
-
-	if (port > 63 || page > 4095 || reg > 31)
-		return -ENOTSUPP;
-
-	mutex_lock(&smi_lock);
-
-	sw_w32_mask(0xffff << 16, port << 16, RTL930X_SMI_ACCESS_PHY_CTRL_2);
-	v = reg << 20 | page << 3 | 0x1f << 15 | 1;
-	sw_w32(v, RTL930X_SMI_ACCESS_PHY_CTRL_1);
-
-	do {
-		v = sw_r32(RTL930X_SMI_ACCESS_PHY_CTRL_1);
-	} while ( v & 0x1);
-
-	if (v & BIT(25)) {
-		pr_debug("Error reading phy %d, register %d\n", port, reg);
-		err = -EIO;
-	}
-	*val = (sw_r32(RTL930X_SMI_ACCESS_PHY_CTRL_2) & 0xffff);
-
-	pr_debug("%s: port %d, page: %d, reg: %x, val: %x\n", __func__, port, page, reg, *val);
-
-	mutex_unlock(&smi_lock);
-
-	return err;
-}
-
-/* Write to an mmd register of the PHY */
-int rtl930x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val)
-{
-	int err = 0;
-	u32 v;
-
-	mutex_lock(&smi_lock);
-
-	/* Set PHY to access */
-	sw_w32(BIT(port), RTL930X_SMI_ACCESS_PHY_CTRL_0);
-
-	/* Set data to write */
-	sw_w32_mask(0xffff << 16, val << 16, RTL930X_SMI_ACCESS_PHY_CTRL_2);
-
-	/* Set MMD device number and register to write to */
-	sw_w32(devnum << 16 | (regnum & 0xffff), RTL930X_SMI_ACCESS_PHY_CTRL_3);
-
-	v = BIT(2) | BIT(1) | BIT(0); /* WRITE | MMD-access | EXEC */
-	sw_w32(v, RTL930X_SMI_ACCESS_PHY_CTRL_1);
-
-	do {
-		v = sw_r32(RTL930X_SMI_ACCESS_PHY_CTRL_1);
-	} while (v & BIT(0));
-
-	pr_debug("%s: port %d, regnum: %x, val: %x (err %d)\n", __func__, port, regnum, val, err);
-	mutex_unlock(&smi_lock);
-	return err;
-}
-
-/* Read an mmd register of the PHY */
-int rtl930x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val)
-{
-	int err = 0;
-	u32 v;
-
-	mutex_lock(&smi_lock);
-
-	/* Set PHY to access */
-	sw_w32_mask(0xffff << 16, port << 16, RTL930X_SMI_ACCESS_PHY_CTRL_2);
-
-	/* Set MMD device number and register to write to */
-	sw_w32(devnum << 16 | (regnum & 0xffff), RTL930X_SMI_ACCESS_PHY_CTRL_3);
-
-	v = BIT(1) | BIT(0); /* MMD-access | EXEC */
-	sw_w32(v, RTL930X_SMI_ACCESS_PHY_CTRL_1);
-
-	do {
-		v = sw_r32(RTL930X_SMI_ACCESS_PHY_CTRL_1);
-	} while (v & BIT(0));
-	/* There is no error-checking via BIT 25 of v, as it does not seem to be set correctly */
-	*val = (sw_r32(RTL930X_SMI_ACCESS_PHY_CTRL_2) & 0xffff);
-	pr_debug("%s: port %d, regnum: %x, val: %x (err %d)\n", __func__, port, regnum, *val, err);
-
-	mutex_unlock(&smi_lock);
-
-	return err;
-}
-
 /* Calculate both the block 0 and the block 1 hash, and return in
  * lower and higher word of the return value since only 12 bit of
  * the hash are significant
diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
index 66e06bbb31..66b808dba9 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
@@ -27,11 +27,6 @@ extern struct rtl83xx_soc_info soc_info;
 
 extern int rtl83xx_setup_tc(struct net_device *dev, enum tc_setup_type type, void *type_data);
 
-extern int rtl930x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val);
-extern int rtl930x_read_phy(u32 port, u32 page, u32 reg, u32 *val);
-extern int rtl930x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val);
-extern int rtl930x_write_phy(u32 port, u32 page, u32 reg, u32 val);
-
 extern int rtl931x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val);
 extern int rtl931x_read_phy(u32 port, u32 page, u32 reg, u32 *val);
 extern int rtl931x_read_sds_phy(int phy_addr, int page, int phy_reg);
@@ -2276,6 +2271,127 @@ int rtmdio_930x_write_sds_phy(int sds, int page, int regnum, u16 val)
 	return ret;
 }
 
+/* RTL930x specific MDIO functions */
+
+static int rtmdio_930x_write_phy(u32 port, u32 page, u32 reg, u32 val)
+{
+	u32 v;
+	int err = 0;
+
+	pr_debug("%s: port %d, page: %d, reg: %x, val: %x\n", __func__, port, page, reg, val);
+
+	if (port > 63 || page > 4095 || reg > 31)
+		return -ENOTSUPP;
+
+	val &= 0xffff;
+	mutex_lock(&rtmdio_lock);
+
+	sw_w32(BIT(port), RTL930X_SMI_ACCESS_PHY_CTRL_0);
+	sw_w32_mask(0xffff << 16, val << 16, RTL930X_SMI_ACCESS_PHY_CTRL_2);
+	v = reg << 20 | page << 3 | 0x1f << 15 | BIT(2) | BIT(0);
+	sw_w32(v, RTL930X_SMI_ACCESS_PHY_CTRL_1);
+
+	do {
+		v = sw_r32(RTL930X_SMI_ACCESS_PHY_CTRL_1);
+	} while (v & 0x1);
+
+	if (v & 0x2)
+		err = -EIO;
+
+	mutex_unlock(&rtmdio_lock);
+
+	return err;
+}
+
+static int rtmdio_930x_read_phy(u32 port, u32 page, u32 reg, u32 *val)
+{
+	u32 v;
+	int err = 0;
+
+	if (port > 63 || page > 4095 || reg > 31)
+		return -ENOTSUPP;
+
+	mutex_lock(&rtmdio_lock);
+
+	sw_w32_mask(0xffff << 16, port << 16, RTL930X_SMI_ACCESS_PHY_CTRL_2);
+	v = reg << 20 | page << 3 | 0x1f << 15 | 1;
+	sw_w32(v, RTL930X_SMI_ACCESS_PHY_CTRL_1);
+
+	do {
+		v = sw_r32(RTL930X_SMI_ACCESS_PHY_CTRL_1);
+	} while ( v & 0x1);
+
+	if (v & BIT(25)) {
+		pr_debug("Error reading phy %d, register %d\n", port, reg);
+		err = -EIO;
+	}
+	*val = (sw_r32(RTL930X_SMI_ACCESS_PHY_CTRL_2) & 0xffff);
+
+	pr_debug("%s: port %d, page: %d, reg: %x, val: %x\n", __func__, port, page, reg, *val);
+
+	mutex_unlock(&rtmdio_lock);
+
+	return err;
+}
+
+/* Write to an mmd register of the PHY */
+static int rtmdio_930x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val)
+{
+	int err = 0;
+	u32 v;
+
+	mutex_lock(&rtmdio_lock);
+
+	/* Set PHY to access */
+	sw_w32(BIT(port), RTL930X_SMI_ACCESS_PHY_CTRL_0);
+
+	/* Set data to write */
+	sw_w32_mask(0xffff << 16, val << 16, RTL930X_SMI_ACCESS_PHY_CTRL_2);
+
+	/* Set MMD device number and register to write to */
+	sw_w32(devnum << 16 | (regnum & 0xffff), RTL930X_SMI_ACCESS_PHY_CTRL_3);
+
+	v = BIT(2) | BIT(1) | BIT(0); /* WRITE | MMD-access | EXEC */
+	sw_w32(v, RTL930X_SMI_ACCESS_PHY_CTRL_1);
+
+	do {
+		v = sw_r32(RTL930X_SMI_ACCESS_PHY_CTRL_1);
+	} while (v & BIT(0));
+
+	pr_debug("%s: port %d, regnum: %x, val: %x (err %d)\n", __func__, port, regnum, val, err);
+	mutex_unlock(&rtmdio_lock);
+	return err;
+}
+
+/* Read an mmd register of the PHY */
+static int rtmdio_930x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val)
+{
+	int err = 0;
+	u32 v;
+
+	mutex_lock(&rtmdio_lock);
+
+	/* Set PHY to access */
+	sw_w32_mask(0xffff << 16, port << 16, RTL930X_SMI_ACCESS_PHY_CTRL_2);
+
+	/* Set MMD device number and register to write to */
+	sw_w32(devnum << 16 | (regnum & 0xffff), RTL930X_SMI_ACCESS_PHY_CTRL_3);
+
+	v = BIT(1) | BIT(0); /* MMD-access | EXEC */
+	sw_w32(v, RTL930X_SMI_ACCESS_PHY_CTRL_1);
+
+	do {
+		v = sw_r32(RTL930X_SMI_ACCESS_PHY_CTRL_1);
+	} while (v & BIT(0));
+	/* There is no error-checking via BIT 25 of v, as it does not seem to be set correctly */
+	*val = (sw_r32(RTL930X_SMI_ACCESS_PHY_CTRL_2) & 0xffff);
+	pr_debug("%s: port %d, regnum: %x, val: %x (err %d)\n", __func__, port, regnum, *val, err);
+
+	mutex_unlock(&rtmdio_lock);
+
+	return err;
+}
+
 /* These are the core functions of our new Realtek SoC MDIO bus. */
 
 static int rtmdio_read_c45(struct mii_bus *bus, int addr, int devnum, int regnum)
@@ -2347,7 +2463,7 @@ static int rtmdio_write_sds_phy(struct rtmdio_bus_priv *priv, int sds, int page,
 	return ret;
 }
 
-static int rtmdio_83xx_read(struct mii_bus *bus, int addr, int regnum)
+static int rtmdio_read(struct mii_bus *bus, int addr, int regnum)
 {
 	struct rtmdio_bus_priv *priv = bus->priv;
 	int err, val;
@@ -2388,12 +2504,8 @@ static int rtmdio_93xx_read(struct mii_bus *bus, int addr, int regnum)
 
 	priv->raw[addr] = (priv->page[addr] == priv->rawpage);
 	if (priv->phy_is_internal[addr]) {
-		if (priv->family_id == RTL9300_FAMILY_ID)
-			return rtmdio_930x_read_sds_phy(priv->sds_id[addr],
-							priv->page[addr], regnum);
-		else
-			return rtl931x_read_sds_phy(priv->sds_id[addr],
-						    priv->page[addr], regnum);
+		return rtl931x_read_sds_phy(priv->sds_id[addr],
+					    priv->page[addr], regnum);
 	}
 
 	err = (*priv->read_phy)(addr, priv->page[addr], regnum, &val);
@@ -2419,7 +2531,7 @@ static int rtmdio_write_c45(struct mii_bus *bus, int addr, int devnum, int regnu
 	return err;
 }
 
-static int rtmdio_83xx_write(struct mii_bus *bus, int addr, int regnum, u16 val)
+static int rtmdio_write(struct mii_bus *bus, int addr, int regnum, u16 val)
 {
 	struct rtmdio_bus_priv *priv = bus->priv;
 	int err, page;
@@ -2480,12 +2592,8 @@ static int rtmdio_93xx_write(struct mii_bus *bus, int addr, int regnum, u16 val)
 	if (!priv->raw[addr] && (regnum != RTMDIO_PAGE_SELECT || page == priv->rawpage)) {
 		priv->raw[addr] = (page == priv->rawpage);
 		if (priv->phy_is_internal[addr]) {
-			if (priv->family_id == RTL9300_FAMILY_ID)
-				return rtmdio_930x_write_sds_phy(priv->sds_id[addr],
-								 page, regnum, val);
-			else
-				return rtl931x_write_sds_phy(priv->sds_id[addr],
-							     page, regnum, val);
+			return rtl931x_write_sds_phy(priv->sds_id[addr],
+						     page, regnum, val);
 		}
 
 		err = (*priv->write_phy)(addr, page, regnum, val);
@@ -2767,8 +2875,8 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv)
 	switch(priv->family_id) {
 	case RTL8380_FAMILY_ID:
 		priv->mii_bus->name = "rtl838x-eth-mdio";
-		priv->mii_bus->read = rtmdio_83xx_read;
-		priv->mii_bus->write = rtmdio_83xx_write;
+		priv->mii_bus->read = rtmdio_read;
+		priv->mii_bus->write = rtmdio_write;
 		priv->mii_bus->reset = rtmdio_838x_reset;
 		bus_priv->read_sds_phy = rtmdio_838x_read_sds_phy;
 		bus_priv->write_sds_phy = rtmdio_838x_write_sds_phy;
@@ -2781,8 +2889,8 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv)
 		break;
 	case RTL8390_FAMILY_ID:
 		priv->mii_bus->name = "rtl839x-eth-mdio";
-		priv->mii_bus->read = rtmdio_83xx_read;
-		priv->mii_bus->write = rtmdio_83xx_write;
+		priv->mii_bus->read = rtmdio_read;
+		priv->mii_bus->write = rtmdio_write;
 		priv->mii_bus->reset = rtmdio_839x_reset;
 		bus_priv->read_sds_phy = rtmdio_839x_read_sds_phy;
 		bus_priv->write_sds_phy = rtmdio_839x_write_sds_phy;
@@ -2795,13 +2903,15 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv)
 		break;
 	case RTL9300_FAMILY_ID:
 		priv->mii_bus->name = "rtl930x-eth-mdio";
-		priv->mii_bus->read = rtmdio_93xx_read;
-		priv->mii_bus->write = rtmdio_93xx_write;
+		priv->mii_bus->read = rtmdio_read;
+		priv->mii_bus->write = rtmdio_write;
 		priv->mii_bus->reset = rtmdio_930x_reset;
-		bus_priv->read_mmd_phy = rtl930x_read_mmd_phy;
-		bus_priv->write_mmd_phy = rtl930x_write_mmd_phy;
-		bus_priv->read_phy = rtl930x_read_phy;
-		bus_priv->write_phy = rtl930x_write_phy;
+		bus_priv->read_sds_phy = rtmdio_930x_read_sds_phy;
+		bus_priv->write_sds_phy = rtmdio_930x_write_sds_phy;
+		bus_priv->read_mmd_phy = rtmdio_930x_read_mmd_phy;
+		bus_priv->write_mmd_phy = rtmdio_930x_write_mmd_phy;
+		bus_priv->read_phy = rtmdio_930x_read_phy;
+		bus_priv->write_phy = rtmdio_930x_write_phy;
 		bus_priv->cpu_port = RTL930X_CPU_PORT;
 		bus_priv->rawpage = 0xfff;
 		break;
diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
index 7fca3bb8c5..f57eb50867 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
@@ -32,7 +32,7 @@ struct __attribute__ ((__packed__)) fw_header {
 #define PHY_ID_RTL8226				0x001cc838
 #define PHY_ID_RTL8390_GENERIC			0x001ccab0
 #define PHY_ID_RTL8393_I			0x001c8393
-#define PHY_ID_RTL9300_I			0x70d03106
+#define PHY_ID_RTL9300_I			0x338002a0
 
 /* These PHYs share the same id (0x001cc981) */
 #define PHY_IS_NOT_RTL821X			0



From lede-commits at lists.infradead.org  Sun Aug 10 03:03:04 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 06:03:04 -0400
Subject: [openwrt/openwrt]  openssl: update to 3.5.2
In-Reply-To: <175482018450.521125.7847325303288050278@git-01.infra.openwrt.org>
References: <175482018450.521125.7847325303288050278@git-01.infra.openwrt.org>
Message-ID: <mailman.115022.1754820500.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/223c1de963df9414c298ac7ca6312ce799c9fd58

commit 223c1de963df9414c298ac7ca6312ce799c9fd58
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Fri Aug 8 19:43:20 2025 -0400

    openssl: update to 3.5.2
    
    OpenSSL 3.5.2 is a bug fix release:
    
    This release incorporates the following bug fixes and mitigations:
    
    Miscellaneous minor bug fixes.
    The FIPS provider now performs a PCT on key import for RSA, EC and ECX.
    This is mandated by FIPS 140-3 IG 10.3.A additional comment 1.
    
    Build system: x86/64
    Build-tested: x86/64-glibc
    Run-tested: x86/64-glibc (Intel N150 based box)
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
    Link: https://github.com/openwrt/openwrt/pull/19725
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/libs/openssl/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/openssl/Makefile b/package/libs/openssl/Makefile
index 210afe0d62..c70dbd3004 100644
--- a/package/libs/openssl/Makefile
+++ b/package/libs/openssl/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=openssl
-PKG_VERSION:=3.5.1
+PKG_VERSION:=3.5.2
 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:=529043b15cffa5f36077a4d0af83f3de399807181d607441d734196d889b641f
+PKG_HASH:=c53a47e5e441c930c3928cf7bf6fb00e5d129b630e0aa873b08258656e7345ec
 
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE



From lede-commits at lists.infradead.org  Sun Aug 10 03:13:03 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 06:13:03 -0400
Subject: [openwrt/openwrt]  x86: add Minisforum MS-A2 Mini PC
In-Reply-To: <175482078336.549785.519583953785647433@git-01.infra.openwrt.org>
References: <175482078336.549785.519583953785647433@git-01.infra.openwrt.org>
Message-ID: <mailman.115023.1754820787.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/551a6cef582ce9eb342a826c3ac3e40bddba7580

commit 551a6cef582ce9eb342a826c3ac3e40bddba7580
Author: Til Kaiser <mail at tk154.de>
AuthorDate: Tue Aug 5 15:56:16 2025 +0200

    x86: add Minisforum MS-A2 Mini PC
    
    This commit renames the network ports of the Minisforum MS-A2
    Mini PC: the two 2.5G RJ45 ports are now named lan1 and lan2,
    and the two 10G SFP+ ports sfp1 and sfp2.
    
    All four ports are also added to the default lan interface.
    
    ---?Hardware?Highlights?---
    AMD Ryzen? 9 9955HX/7945HX
    Dual DDR5-5600MHz, up to 96GB
    2x 10G SFP+, 2x 2.5G RJ45
    WiFi 6E, Bluetooth 5.3
    Built-in PCIe x16 Slot
    
    Signed-off-by: Til Kaiser <mail at tk154.de>
    Link: https://github.com/openwrt/openwrt/pull/19689
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/x86/base-files/etc/board.d/02_network | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/target/linux/x86/base-files/etc/board.d/02_network b/target/linux/x86/base-files/etc/board.d/02_network
index aa61cf32fb..c4b33e24ce 100644
--- a/target/linux/x86/base-files/etc/board.d/02_network
+++ b/target/linux/x86/base-files/etc/board.d/02_network
@@ -60,6 +60,13 @@ gowin-solution-co-ltd-gw-mb-u01)
 
 	ucidef_set_interfaces_lan_wan "eth1 eth2 eth3 eth4 poe" "sfp1 sfp2"
 	;;
+micro-computer-hk-tech-limited-ms-a2)
+	ucidef_set_network_device_path "lan1" "pci0000:00/0000:00:03.2/0000:04:00.0"
+	ucidef_set_network_device_path "lan2" "pci0000:00/0000:00:03.1/0000:03:00.0"
+	ucidef_set_network_device_path "sfp1" "pci0000:00/0000:00:02.1/0000:05:00.0"
+	ucidef_set_network_device_path "sfp2" "pci0000:00/0000:00:02.1/0000:05:00.1"
+	ucidef_set_interface_lan "lan1 lan2 sfp1 sfp2"
+	;;
 pc-engines-apu1|pc-engines-apu2|pc-engines-apu3)
 	ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
 	;;



From lede-commits at lists.infradead.org  Sun Aug 10 05:36:52 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 08:36:52 -0400
Subject: [openwrt/openwrt]  realtek: rtl931x: Don't use RTL8xx port flooding
 initialization
In-Reply-To: <175482941268.1015826.5425667787671439151@git-01.infra.openwrt.org>
References: <175482941268.1015826.5425667787671439151@git-01.infra.openwrt.org>
Message-ID: <mailman.115038.1754829416.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/743f2cd731b1186c86b7d9451d2ef6b81fcc4571

commit 743f2cd731b1186c86b7d9451d2ef6b81fcc4571
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Mon Jul 14 10:59:06 2025 +0200

    realtek: rtl931x: Don't use RTL8xx port flooding initialization
    
    Neither the RTL930x not the RT931x use the BPDU flooding mechanism which
    was used for other SoCs. At the same time, the RTL931x must use the same
    debugfs initialization function as RTL930x.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19569
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c  | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
index 2dd93de552..9ccf1e1840 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
@@ -1691,8 +1691,9 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
 		goto err_register_fib_nb;
 
 	/* TODO: put this into l2_setup() */
-	/* Flood BPDUs to all ports including cpu-port */
-	if (soc_info.family != RTL9300_FAMILY_ID) {
+	switch (soc_info.family) {
+	default:
+		/* Flood BPDUs to all ports including cpu-port */
 		bpdu_mask = soc_info.family == RTL8380_FAMILY_ID ? 0x1FFFFFFF : 0x1FFFFFFFFFFFFF;
 		priv->r->set_port_reg_be(bpdu_mask, priv->r->rma_bpdu_fld_pmask);
 
@@ -1700,8 +1701,11 @@ static int __init rtl83xx_sw_probe(struct platform_device *pdev)
 		sw_w32(7, priv->r->spcl_trap_eapol_ctrl);
 
 		rtl838x_dbgfs_init(priv);
-	} else {
+		break;
+	case RTL9300_FAMILY_ID:
+	case RTL9310_FAMILY_ID:
 		rtl930x_dbgfs_init(priv);
+		break;
 	}
 
 	return 0;



From lede-commits at lists.infradead.org  Sun Aug 10 05:36:53 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 08:36:53 -0400
Subject: [openwrt/openwrt]  realtek: rtl931x: Add missing rma_bpdu_fld_pmask
In-Reply-To: <175482941268.1015826.5425667787671439151@git-01.infra.openwrt.org>
References: <175482941268.1015826.5425667787671439151@git-01.infra.openwrt.org>
Message-ID: <mailman.115039.1754829417.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a4b8d80050e5abe9970e413d169bf955d4679c0d

commit a4b8d80050e5abe9970e413d169bf955d4679c0d
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Mon Jul 14 11:36:26 2025 +0200

    realtek: rtl931x: Add missing rma_bpdu_fld_pmask
    
    The .rma_bpdu_fld_pmask is not used anywhere in the code for RTL930x nor
    RTL931x. But the RTL930x was still initializing this member. To avoid
    problems in the future, simply initialize it also on RTL931x.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19569
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
index 5a623cd31b..7d625e0104 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
@@ -1696,6 +1696,7 @@ const struct rtl838x_reg rtl931x_reg = {
 	.vlan_port_pvidmode_set = rtl931x_vlan_port_pvidmode_set,
 	.vlan_port_pvid_set = rtl931x_vlan_port_pvid_set,
 	.trk_mbr_ctr = rtldsa_931x_trk_mbr_ctr,
+	.rma_bpdu_fld_pmask = RTL931X_RMA_BPDU_FLD_PMSK,
 	.set_vlan_igr_filter = rtl931x_set_igr_filter,
 	.set_vlan_egr_filter = rtl931x_set_egr_filter,
 	.set_distribution_algorithm = rtl931x_set_distribution_algorithm,



From lede-commits at lists.infradead.org  Sun Aug 10 09:49:27 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 12:49:27 -0400
Subject: [openwrt/openwrt]  bridger: update to Git HEAD (2025-08-10)
In-Reply-To: <175484456778.1866701.10376601239690894868@git-01.infra.openwrt.org>
References: <175484456778.1866701.10376601239690894868@git-01.infra.openwrt.org>
Message-ID: <mailman.115060.1754844572.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/08cc7e881e88237aab663472ca0e71ebc1ee3dcb

commit 08cc7e881e88237aab663472ca0e71ebc1ee3dcb
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 10 18:48:46 2025 +0200

    bridger: update to Git HEAD (2025-08-10)
    
    ccdc0394c833 optimize bridge local-rx handling
    544551f1beae add udebug support
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/bridger/Makefile | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/package/network/services/bridger/Makefile b/package/network/services/bridger/Makefile
index d44e038967..686457e66c 100644
--- a/package/network/services/bridger/Makefile
+++ b/package/network/services/bridger/Makefile
@@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=bridger
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/nbd168/bridger
-PKG_SOURCE_DATE:=2024-04-22
-PKG_SOURCE_VERSION:=40b1c5b6be4e73a6749cf2997c664520eb20055d
-PKG_MIRROR_HASH:=b3ba2ab5ffa1af55f8da2cae5a90df486474b97ed4c359ec40c986aa6e82c300
+PKG_SOURCE_DATE:=2025-08-10
+PKG_SOURCE_VERSION:=544551f1beae85faf710a08cc8b2180153d97b00
+PKG_MIRROR_HASH:=4a82ae327286eed160bd225d31daa35d538c45d6e4f8cf212a836fb38c056178
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
@@ -30,7 +30,7 @@ define Package/bridger
   SECTION:=utils
   CATEGORY:=Base system
   TITLE:=Bridge forwarding accelerator
-  DEPENDS:=+libbpf +libubox +libubus +libnl-tiny +kmod-sched-core +kmod-sched-flower +kmod-sched-bpf +kmod-sched-act-vlan $(BPF_DEPENDS)
+  DEPENDS:=+libbpf +libubox +libubus +libudebug +libnl-tiny +kmod-sched-core +kmod-sched-flower +kmod-sched-bpf +kmod-sched-act-vlan $(BPF_DEPENDS)
 endef
 
 TARGET_CFLAGS += \
@@ -38,7 +38,8 @@ TARGET_CFLAGS += \
 	-I$(STAGING_DIR)/usr/include
 
 CMAKE_OPTIONS += \
-	-DLIBNL_LIBS=-lnl-tiny
+	-DLIBNL_LIBS=-lnl-tiny \
+	-DNL_UDEBUG=ON
 
 define Build/Compile
 	$(call CompileBPF,$(PKG_BUILD_DIR)/bridger-bpf.c)



From lede-commits at lists.infradead.org  Sun Aug 10 12:50:41 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 15:50:41 -0400
Subject: [openwrt/openwrt]  siflower: sf21: fix M.2 power on Bananapi BPI-RV2
In-Reply-To: <175485544128.2489632.8134304091960244320@git-01.infra.openwrt.org>
References: <175485544128.2489632.8134304091960244320@git-01.infra.openwrt.org>
Message-ID: <mailman.115088.1754855445.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/73a0366e536a874c2c7fb31f5b9b5d78ebd13583

commit 73a0366e536a874c2c7fb31f5b9b5d78ebd13583
Author: Andrey Safonov <andrey.safonov at gmail.com>
AuthorDate: Thu Aug 7 00:19:06 2025 +0300

    siflower: sf21: fix M.2 power on Bananapi BPI-RV2
    
    Add fixed regulator for M.2 slot for Bananapi BPI-RV2
    
    Signed-off-by: Andrey Safonov <andrey.safonov at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19697
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/siflower/dts/sf21h8898_bananapi_bpi-rv2.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/target/linux/siflower/dts/sf21h8898_bananapi_bpi-rv2.dtsi b/target/linux/siflower/dts/sf21h8898_bananapi_bpi-rv2.dtsi
index aa309e37c1..cb3ed58d5a 100644
--- a/target/linux/siflower/dts/sf21h8898_bananapi_bpi-rv2.dtsi
+++ b/target/linux/siflower/dts/sf21h8898_bananapi_bpi-rv2.dtsi
@@ -22,6 +22,16 @@
 		gpio = <&gpio 37 GPIO_ACTIVE_HIGH>;
 		enable-active-high;
 	};
+
+	m2keyb_pwren: regulator at 1 {
+		compatible = "regulator-fixed";
+		regulator-name = "m2keyb_pwren";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		gpio = <&gpio 38 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		regulator-always-on;
+	};
 };
 
 &spi0_pins {



From lede-commits at lists.infradead.org  Sun Aug 10 12:51:20 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 15:51:20 -0400
Subject: [openwrt/openwrt]  siflower: sf21: fix usb_vbus for Bananapi BPI-RV2
In-Reply-To: <175485548028.2491415.479345867034593776@git-01.infra.openwrt.org>
References: <175485548028.2491415.479345867034593776@git-01.infra.openwrt.org>
Message-ID: <mailman.115089.1754855483.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/441b37e2db7a3a49beadef8a99f1c7d41ce1c879

commit 441b37e2db7a3a49beadef8a99f1c7d41ce1c879
Author: Andrey Safonov <andrey.safonov at gmail.com>
AuthorDate: Wed Aug 6 23:47:28 2025 +0300

    siflower: sf21: fix usb_vbus for Bananapi BPI-RV2
    
    Add usb_vbus ref to usb device.
    
    Signed-off-by: Andrey Safonov <andrey.safonov at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19698
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/siflower/dts/sf21h8898_bananapi_bpi-rv2.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/siflower/dts/sf21h8898_bananapi_bpi-rv2.dtsi b/target/linux/siflower/dts/sf21h8898_bananapi_bpi-rv2.dtsi
index cb3ed58d5a..ec2b19e07d 100644
--- a/target/linux/siflower/dts/sf21h8898_bananapi_bpi-rv2.dtsi
+++ b/target/linux/siflower/dts/sf21h8898_bananapi_bpi-rv2.dtsi
@@ -194,6 +194,7 @@
 };
 
 &usb {
+	vbus-supply = <&usb_vbus>;
 	status = "okay";
 };
 



From lede-commits at lists.infradead.org  Sun Aug 10 12:52:52 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 15:52:52 -0400
Subject: [openwrt/openwrt]  hostapd: fix logging of configuration content
In-Reply-To: <175485557252.2496218.2861903554673487250@git-01.infra.openwrt.org>
References: <175485557252.2496218.2861903554673487250@git-01.infra.openwrt.org>
Message-ID: <mailman.115090.1754855575.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/29f3f276a8d8c9cd3c590414fe54b5dfb09fe70e

commit 29f3f276a8d8c9cd3c590414fe54b5dfb09fe70e
Author: Christian Korber <ck at dev.tdt.de>
AuthorDate: Wed May 21 14:36:00 2025 +0200

    hostapd: fix logging of configuration content
    
    This commit is an adoption of the fix for #14049 to
    apply it for owrt-23.05.
    
    Signed-off-by: Christian Korber <ck at dev.tdt.de>
    Link: https://github.com/openwrt/openwrt/pull/17718
    Link: https://github.com/openwrt/openwrt/pull/19658
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../hostapd/patches/701-reload_config_inline.patch | 36 +++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/patches/701-reload_config_inline.patch b/package/network/services/hostapd/patches/701-reload_config_inline.patch
index 3c62bf670f..e3ed3a5630 100644
--- a/package/network/services/hostapd/patches/701-reload_config_inline.patch
+++ b/package/network/services/hostapd/patches/701-reload_config_inline.patch
@@ -1,6 +1,6 @@
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -4816,7 +4816,12 @@ struct hostapd_config * hostapd_config_r
+@@ -4816,7 +4816,14 @@ struct hostapd_config * hostapd_config_r
  	int errors = 0;
  	size_t i;
  
@@ -11,6 +11,8 @@
 +	} else {
 +		f = fopen(fname, "r");
 +	}
++	wpa_printf(MSG_INFO, "Configuration file: Reading configuration file '%s'",
++	     fname);
  	if (f == NULL) {
  		wpa_printf(MSG_ERROR, "Could not open configuration file '%s' "
  			   "for reading.", fname);
@@ -31,3 +33,35 @@
  	if (f == NULL) {
  		wpa_printf(MSG_ERROR, "Failed to open config file '%s', "
  			   "error: %s", name, strerror(errno));
+--- a/hostapd/main.c
++++ b/hostapd/main.c
+@@ -406,7 +406,11 @@ hostapd_interface_init(struct hapd_inter
+ 	struct hostapd_iface *iface;
+ 	int k;
+ 
+-	wpa_printf(MSG_DEBUG, "Configuration file: %s", config_fname);
++	if (!strncmp(config_fname, "data:", 5)) {
++		wpa_printf(MSG_DEBUG, "Configuration file: %s", "<inline>");
++	} else {
++		wpa_printf(MSG_DEBUG, "Configuration file: %s", config_fname);
++	}
+ 	iface = hostapd_init(interfaces, config_fname);
+ 	if (!iface)
+ 		return NULL;
+--- a/src/ap/hostapd.c
++++ b/src/ap/hostapd.c
+@@ -2893,7 +2893,12 @@ hostapd_interface_init_bss(struct hapd_i
+ 		}
+ 	}
+ 
+-	wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
+-		   config_fname, phy, iface ? "" : " --> new PHY");
++	if (!strncmp(config_fname, "data:", 5)) {
++		wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
++		     "<inline>", phy, iface ? "" : " --> new PHY");
++	} else {
++		wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
++		     config_fname, phy, iface ? "" : " --> new PHY");
++	}
+	if (iface) {
+		struct hostapd_config *conf;



From lede-commits at lists.infradead.org  Sun Aug 10 12:53:46 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 15:53:46 -0400
Subject: [openwrt/openwrt]  hostapd: fix logging of configuration content
In-Reply-To: <175485562669.2499097.12891711263976200630@git-01.infra.openwrt.org>
References: <175485562669.2499097.12891711263976200630@git-01.infra.openwrt.org>
Message-ID: <mailman.115091.1754855629.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/33728aa96c8d1206c9c31080654de2f7cf143ee5

commit 33728aa96c8d1206c9c31080654de2f7cf143ee5
Author: Christian Korber <ck at dev.tdt.de>
AuthorDate: Wed May 21 14:36:00 2025 +0200

    hostapd: fix logging of configuration content
    
    This commit is an adoption of the fix for #14049 to
    apply it for openwrt-24.10.
    
    Signed-off-by: Christian Korber <ck at dev.tdt.de>
    Link: https://github.com/openwrt/openwrt/pull/17718
    Link: https://github.com/openwrt/openwrt/pull/19660
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../hostapd/patches/701-reload_config_inline.patch | 36 +++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/patches/701-reload_config_inline.patch b/package/network/services/hostapd/patches/701-reload_config_inline.patch
index 5404547647..24d3aa86d0 100644
--- a/package/network/services/hostapd/patches/701-reload_config_inline.patch
+++ b/package/network/services/hostapd/patches/701-reload_config_inline.patch
@@ -8,7 +8,7 @@ as adding/removing interfaces.
 
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -5207,7 +5207,12 @@ struct hostapd_config * hostapd_config_r
+@@ -5207,7 +5207,14 @@ struct hostapd_config * hostapd_config_r
  	int errors = 0;
  	size_t i;
  
@@ -19,6 +19,8 @@ as adding/removing interfaces.
 +	} else {
 +		f = fopen(fname, "r");
 +	}
++	wpa_printf(MSG_INFO, "Configuration file: Reading configuration file '%s'",
++	     fname);
  	if (f == NULL) {
  		wpa_printf(MSG_ERROR, "Could not open configuration file '%s' "
  			   "for reading.", fname);
@@ -39,3 +41,35 @@ as adding/removing interfaces.
  	if (f == NULL) {
  		wpa_printf(MSG_ERROR, "Failed to open config file '%s', "
  			   "error: %s", name, strerror(errno));
+--- a/hostapd/main.c
++++ b/hostapd/main.c
+@@ -406,7 +406,11 @@ hostapd_interface_init(struct hapd_inter
+ 	struct hostapd_iface *iface;
+ 	int k;
+ 
+-	wpa_printf(MSG_DEBUG, "Configuration file: %s", config_fname);
++	if (!strncmp(config_fname, "data:", 5)) {
++		wpa_printf(MSG_DEBUG, "Configuration file: %s", "<inline>");
++	} else {
++		wpa_printf(MSG_DEBUG, "Configuration file: %s", config_fname);
++	}
+ 	iface = hostapd_init(interfaces, config_fname);
+ 	if (!iface)
+ 		return NULL;
+--- a/src/ap/hostapd.c
++++ b/src/ap/hostapd.c
+@@ -2893,7 +2893,12 @@ hostapd_interface_init_bss(struct hapd_i
+ 		}
+ 	}
+ 
+-	wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
+-		   config_fname, phy, iface ? "" : " --> new PHY");
++	if (!strncmp(config_fname, "data:", 5)) {
++		wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
++		     "<inline>", phy, iface ? "" : " --> new PHY");
++	} else {
++		wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
++		     config_fname, phy, iface ? "" : " --> new PHY");
++	}
+	if (iface) {
+		struct hostapd_config *conf;



From lede-commits at lists.infradead.org  Sun Aug 10 12:59:06 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 15:59:06 -0400
Subject: [openwrt/openwrt]  realtek: rtl931x: Fix l2 fdb entry handling
In-Reply-To: <175485594631.2522672.14491121367794888663@git-01.infra.openwrt.org>
References: <175485594631.2522672.14491121367794888663@git-01.infra.openwrt.org>
Message-ID: <mailman.115092.1754855950.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/522294eeef54017b496a5f324961ccbdefb921d4

commit 522294eeef54017b496a5f324961ccbdefb921d4
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Tue Jul 15 20:21:20 2025 +0200

    realtek: rtl931x: Fix l2 fdb entry handling
    
    Previous implementation was directly copied from rtl930x and was not
    working. Table field offsets are different between rlt931x and rtl930x
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19580
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c   | 98 +++++++++++++---------
 1 file changed, 58 insertions(+), 40 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
index 7d625e0104..36103b43dd 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
@@ -657,8 +657,7 @@ static void rtl931x_fill_l2_entry(u32 r[], struct rtl838x_l2_entry *e)
 		/* Check for trunk port */
 		if (r[2] & BIT(29)) {
 			e->is_trunk = true;
-			e->stack_dev = (e->port >> 9) & 1;
-			e->trunk = e->port & 0x3f;
+			e->trunk = e->port & 0xff;
 		} else {
 			e->is_trunk = false;
 			e->stack_dev = (e->port >> 6) & 0xf;
@@ -668,16 +667,11 @@ static void rtl931x_fill_l2_entry(u32 r[], struct rtl838x_l2_entry *e)
 		e->block_da = !!(r[2] & BIT(14));
 		e->block_sa = !!(r[2] & BIT(15));
 		e->suspended = !!(r[2] & BIT(12));
-		e->age = (r[2] >> 16) & 3;
+		e->age = (r[2] >> 16) & 7;
+
+		/* HW doesn't use VID but FID for as key */
+		e->vid = (r[0] >> 16) & 0xfff;
 
-		/* the UC_VID field in hardware is used for the VID or for the route id */
-		if (e->next_hop) {
-			e->nh_route_id = r[2] & 0x7ff;
-			e->vid = 0;
-		} else {
-			e->vid = r[2] & 0xfff;
-			e->nh_route_id = 0;
-		}
 		if (e->is_l2_tunnel)
 			e->l2_tunnel_id = ((r[2] & 0xff) << 4) | (r[3] >> 28);
 		/* TODO: Implement VLAN conversion */
@@ -696,45 +690,49 @@ static void rtl931x_fill_l2_row(u32 r[], struct rtl838x_l2_entry *e)
 	u32 port;
 
 	if (!e->valid) {
-		r[0] = r[1] = r[2] = 0;
+		r[0] = r[1] = r[2] = r[3] = 0;
 		return;
 	}
 
-	r[2] = BIT(31);	/* Set valid bit */
+	r[3] = 0;
+
+	r[0] = BIT(31); /* Set valid bit */
 
-	r[0] = ((u32)e->mac[0]) << 24 |
-	       ((u32)e->mac[1]) << 16 |
-	       ((u32)e->mac[2]) << 8 |
-	       ((u32)e->mac[3]);
-	r[1] = ((u32)e->mac[4]) << 24 |
-	       ((u32)e->mac[5]) << 16;
+	r[0] |= ((u32)e->mac[0]) << 8 |
+	       ((u32)e->mac[1]);
+	r[1] = ((u32)e->mac[2]) << 24 |
+	       ((u32)e->mac[3]) << 16 |
+		   ((u32)e->mac[4]) << 8 |
+		   ((u32)e->mac[5]);
 
-	r[2] |= e->next_hop ? BIT(12) : 0;
+	r[0] |= e->is_open_flow ? BIT(30) : 0;
+	r[0] |= e->is_pe_forward ? BIT(29) : 0;
+	r[2] = e->next_hop ? BIT(30) : 0;
+	r[0] |= (e->rvid & 0xfff) << 16;
 
 	if (e->type == L2_UNICAST) {
-		r[2] |= e->is_static ? BIT(14) : 0;
-		r[1] |= e->rvid & 0xfff;
-		r[2] |= (e->port & 0x3ff) << 20;
+		r[2] |= e->is_l2_tunnel ? BIT(31) : 0;
+		r[2] |= e->is_static ? BIT(13) : 0;
+
 		if (e->is_trunk) {
-			r[2] |= BIT(30);
-			port = e->stack_dev << 9 | (e->port & 0x3f);
+			r[2] |= BIT(29);
+			port = e->trunk & 0xff;
 		} else {
-			port = (e->stack_dev & 0xf) << 6;
-			port |= e->port & 0x3f;
+			port = e->port & 0x3f;
+			port |= (e->stack_dev & 0xf) << 6;
+		}
+
+		r[2] |= (port & 0x3ff) << 19;
+		r[2] |= e->block_da ? BIT(14) : 0;
+		r[2] |= e->block_sa ? BIT(15) : 0;
+		r[2] |= e->suspended ? BIT(12) : 0;
+		r[2] |= (e->age & 0x7) << 16;
+		if (e->is_l2_tunnel) {
+			r[2] |= (e->l2_tunnel_id >> 4) & 0xff;
+			r[3] |= (e->l2_tunnel_id & 0xf) << 28;
 		}
-		r[2] |= port << 20;
-		r[2] |= e->block_da ? BIT(15) : 0;
-		r[2] |= e->block_sa ? BIT(17) : 0;
-		r[2] |= e->suspended ? BIT(13) : 0;
-		r[2] |= (e->age & 0x3) << 17;
-		/* the UC_VID field in hardware is used for the VID or for the route id */
-		if (e->next_hop)
-			r[2] |= e->nh_route_id & 0x7ff;
-		else
-			r[2] |= e->vid & 0xfff;
 	} else { /* L2_MULTICAST */
-		r[2] |= (e->mc_portmask_index & 0x3ff) << 16;
-		r[2] |= e->mc_mac_index & 0x7ff;
+		r[2] |= (e->mc_portmask_index & 0xfff) << 18;
 	}
 }
 
@@ -794,11 +792,31 @@ static u64 rtl931x_read_l2_entry_using_hash(u32 hash, u32 pos, struct rtl838x_l2
 
 static u64 rtl931x_read_cam(int idx, struct rtl838x_l2_entry *e)
 {
-	return 0;
+	u32 r[4];
+	struct table_reg *q = rtl_table_get(RTL9310_TBL_0, 1);
+	rtl_table_read(q, idx);
+	for ( int i = 0; i < 4; i++)
+		r[i] = sw_r32(rtl_table_data(q, i));
+
+	rtl_table_release(q);
+	rtl931x_fill_l2_entry(r, e);
+	if (!e->valid)
+		return 0;
+
+	/* return mac with concatenated fid as unique id */
+	return ((((u64)(r[0] & 0xffff) << 32) | (u64)r[1]) << 12) | e->vid;
 }
 
 static void rtl931x_write_cam(int idx, struct rtl838x_l2_entry *e)
 {
+	u32 r[4];
+	struct table_reg *q = rtl_table_get(RTL9310_TBL_0, 1);
+	rtl931x_fill_l2_row(r, e);
+
+	for (int i = 0; i < 4; i++)
+		sw_w32(r[i], rtl_table_data(q, i));
+	rtl_table_write(q, idx);
+	rtl_table_release(q);
 }
 
 static void rtl931x_write_l2_entry_using_hash(u32 hash, u32 pos, struct rtl838x_l2_entry *e)



From lede-commits at lists.infradead.org  Sun Aug 10 13:02:50 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 10 Aug 2025 16:02:50 -0400
Subject: [openwrt/openwrt]  realtek: fix stall after restart of otto timer
In-Reply-To: <175485617070.2533552.3418862613805694752@git-01.infra.openwrt.org>
References: <175485617070.2533552.3418862613805694752@git-01.infra.openwrt.org>
Message-ID: <mailman.115095.1754856174.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f21475839f10eec2ad48a2a7b24db1867793efbc

commit f21475839f10eec2ad48a2a7b24db1867793efbc
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Sat Jul 19 16:14:28 2025 -0400

    realtek: fix stall after restart of otto timer
    
    Once tested this will go upstream.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19468
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../304-timer-otto-fix-stall-after-restart.patch   | 146 +++++++++++++++++++++
 1 file changed, 146 insertions(+)

diff --git a/target/linux/realtek/patches-6.12/304-timer-otto-fix-stall-after-restart.patch b/target/linux/realtek/patches-6.12/304-timer-otto-fix-stall-after-restart.patch
new file mode 100644
index 0000000000..72cfd70378
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/304-timer-otto-fix-stall-after-restart.patch
@@ -0,0 +1,146 @@
+From: Markus Stockhausen <markus.stockhausen at gmx.de>
+Date: Sat, 19 Jul 2025 18:22:21 +0200
+Subject: [PATCH] realtek: fix stall after restart of otto timer
+
+With kernel 6.9 the kernel scheduler has been redesigned. This uncovered
+a bug in the realtek timer hardware and a misconception in the driver. 
+
+Regarding the driver: Software cannot set the current counter value to
+zero directly. This is automatically done when writing a new target value. 
+Drop function rttm_set_counter(). Additionally do not use stop timer
+during normal operation because it acknowledges interrupts. This should
+only be done from the interrupt handler. Replace this with disable_timer().
+
+Regarding the hardware: There is a minimal chance that a timer dies if it
+is reprogrammed within the 5us before its expiration time. Let's call this
+the "critical time window". Work around this issue by introducing a
+bounce() function. It restarts the timer directly before the normal
+restart functions as follows:
+
+- Stop timer
+- Restart timer with a slow frequency.
+- Target time will be >5us 
+- The subsequent normal restart will be outside the critical window
+
+While we are here clarify documentation and double the timer frequency to 
+6.25 Mhz. This allows for more detailed timestamps.
+
+Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
+---
+
+--- a/drivers/clocksource/timer-rtl-otto.c
++++ b/drivers/clocksource/timer-rtl-otto.c
+@@ -25,12 +25,11 @@
+ 
+ /*
+  * The Otto platform provides multiple 28 bit timers/counters with the following
+- * operating logic. If enabled the timer counts up. Per timer one can set a
+- * maximum counter value as an end marker. If end marker is reached the timer
+- * fires an interrupt. If the timer "overflows" by reaching the end marker or
+- * by adding 1 to 0x0fffffff the counter is reset to 0. When this happens and
+- * the timer is in operating mode COUNTER it stops. In mode TIMER it will
+- * continue to count up.
++ * operating logic. If enabled the timer counts up. Per timer a counter target
++ * value can be set with the minimum being 0x2 and the maximumu being 0xfffffff.
++ * If the the target value is reached the timer is reset to 0. Depending on its
++ * configuration the timer will then fire an interrupt. In case the timer is in
++ * operating mode COUNTER it stops. In mode TIMER it will continue to count up.
+  */
+ #define RTTM_CTRL_COUNTER	0
+ #define RTTM_CTRL_TIMER		BIT(24)
+@@ -38,16 +37,15 @@
+ #define RTTM_BIT_COUNT		28
+ #define RTTM_MIN_DELTA		8
+ #define RTTM_MAX_DELTA		CLOCKSOURCE_MASK(28)
++#define RTTM_MAX_DIVISOR	GENMASK(15, 0)
+ 
+ /*
+- * Timers are derived from the LXB clock frequency. Usually this is a fixed
+- * multiple of the 25 MHz oscillator. The 930X SOC is an exception from that.
+- * Its LXB clock has only dividers and uses the switch PLL of 2.45 GHz as its
+- * base. The only meaningful frequencies we can achieve from that are 175.000
+- * MHz and 153.125 MHz. The greatest common divisor of all explained possible
+- * speeds is 3125000. Pin the timers to this 3.125 MHz reference frequency.
++ * Timers are derived from the lexra bus (LXB) clock frequency. This is 175 MHz
++ * on RTL930x and 200 MHz on the other platforms. With 6.25 MHz choose a common
++ * divisor to have enough range and detail. This even allows to compare the
++ * different platforms more easily.
+  */
+-#define RTTM_TICKS_PER_SEC	3125000
++#define RTTM_TICKS_PER_SEC	6250000
+ 
+ struct rttm_cs {
+ 	struct timer_of		to;
+@@ -55,11 +53,6 @@ struct rttm_cs {
+ };
+ 
+ /* Simple internal register functions */
+-static inline void rttm_set_counter(void __iomem *base, unsigned int counter)
+-{
+-	iowrite32(counter, base + RTTM_CNT);
+-}
+-
+ static inline unsigned int rttm_get_counter(void __iomem *base)
+ {
+ 	return ioread32(base + RTTM_CNT);
+@@ -112,6 +105,22 @@ static irqreturn_t rttm_timer_interrupt(
+ 	return IRQ_HANDLED;
+ }
+ 
++static void rttm_bounce_timer(void __iomem *base, u32 mode)
++{
++	/*
++	 * When a running timer has less than ~5us left, a stop/start sequence
++	 * might fail. While the details are unknown the most evident effect is 
++	 * that the subsequent interrupt will not be fired.
++	 *
++	 * As a workaround issue an intermediate restart with a very slow
++	 * frequency of ~3kHz keeping the target value. So the actual follow
++	 * up restart will always be issued outside the critical window.
++	 */
++
++	rttm_disable_timer(base);
++	rttm_enable_timer(base, mode, RTTM_MAX_DIVISOR);
++}
++
+ static void rttm_stop_timer(void __iomem *base)
+ {
+ 	rttm_disable_timer(base);
+@@ -120,7 +129,6 @@ static void rttm_stop_timer(void __iomem
+ 
+ static void rttm_start_timer(struct timer_of *to, u32 mode)
+ {
+-	rttm_set_counter(to->of_base.base, 0);
+ 	rttm_enable_timer(to->of_base.base, mode, to->of_clk.rate / RTTM_TICKS_PER_SEC);
+ }
+ 
+@@ -129,7 +137,8 @@ static int rttm_next_event(unsigned long
+ 	struct timer_of *to = to_timer_of(clkevt);
+ 
+ 	RTTM_DEBUG(to->of_base.base);
+-	rttm_stop_timer(to->of_base.base);
++	rttm_bounce_timer(to->of_base.base, RTTM_CTRL_COUNTER);
++	rttm_disable_timer(to->of_base.base);
+ 	rttm_set_period(to->of_base.base, delta);
+ 	rttm_start_timer(to, RTTM_CTRL_COUNTER);
+ 
+@@ -141,7 +150,8 @@ static int rttm_state_oneshot(struct clo
+ 	struct timer_of *to = to_timer_of(clkevt);
+ 
+ 	RTTM_DEBUG(to->of_base.base);
+-	rttm_stop_timer(to->of_base.base);
++	rttm_bounce_timer(to->of_base.base, RTTM_CTRL_COUNTER);
++	rttm_disable_timer(to->of_base.base);
+ 	rttm_set_period(to->of_base.base, RTTM_TICKS_PER_SEC / HZ);
+ 	rttm_start_timer(to, RTTM_CTRL_COUNTER);
+ 
+@@ -153,7 +163,8 @@ static int rttm_state_periodic(struct cl
+ 	struct timer_of *to = to_timer_of(clkevt);
+ 
+ 	RTTM_DEBUG(to->of_base.base);
+-	rttm_stop_timer(to->of_base.base);
++	rttm_bounce_timer(to->of_base.base, RTTM_CTRL_TIMER);
++	rttm_disable_timer(to->of_base.base);
+ 	rttm_set_period(to->of_base.base, RTTM_TICKS_PER_SEC / HZ);
+ 	rttm_start_timer(to, RTTM_CTRL_TIMER);
+ 



From lede-commits at lists.infradead.org  Mon Aug 11 01:29:50 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 04:29:50 -0400
Subject: [openwrt/openwrt]  toolchain: binutils: add version 2.45
In-Reply-To: <175490099072.1413230.1447037500254593722@git-01.infra.openwrt.org>
References: <175490099072.1413230.1447037500254593722@git-01.infra.openwrt.org>
Message-ID: <mailman.115406.1754902557.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/40203c5094349f65be33e6f2e2462837da88446f

commit 40203c5094349f65be33e6f2e2462837da88446f
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Sun Jul 27 12:13:48 2025 +0100

    toolchain: binutils: add version 2.45
    
    Patches automatically rebased.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19547
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 toolchain/binutils/Config.in                       |  4 ++
 toolchain/binutils/Config.version                  |  4 ++
 toolchain/binutils/Makefile                        |  4 ++
 .../patches/2.45/300-001_ld_makefile_patch.patch   | 22 ++++++++++
 .../2.45/400-mips_no_dynamic_linking_sym.patch     | 18 +++++++++
 ...Change-default-emulation-for-mips64-linux.patch | 47 ++++++++++++++++++++++
 6 files changed, 99 insertions(+)

diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in
index c688fda20f..2c87ef9575 100644
--- a/toolchain/binutils/Config.in
+++ b/toolchain/binutils/Config.in
@@ -21,6 +21,10 @@ choice
 	config BINUTILS_USE_VERSION_2_44
 		bool "Binutils 2.44"
 		select BINUTILS_VERSION_2_44
+
+	config BINUTILS_USE_VERSION_2_45
+		bool "Binutils 2.45"
+		select BINUTILS_VERSION_2_45
 endchoice
 
 config EXTRA_BINUTILS_CONFIG_OPTIONS
diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version
index 80426d6976..4e27f38367 100644
--- a/toolchain/binutils/Config.version
+++ b/toolchain/binutils/Config.version
@@ -12,9 +12,13 @@ config BINUTILS_VERSION_2_43
 config BINUTILS_VERSION_2_44
 	bool
 
+config BINUTILS_VERSION_2_45
+	bool
+
 config BINUTILS_VERSION
 	string
 	default "2.40"			if BINUTILS_VERSION_2_40
 	default "2.42"			if BINUTILS_VERSION_2_42
 	default "2.43.1"		if BINUTILS_VERSION_2_43
 	default "2.44"			if BINUTILS_VERSION_2_44
+	default "2.45"			if BINUTILS_VERSION_2_45
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index f9d48b9752..126cf6289e 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -32,6 +32,10 @@ ifeq ($(PKG_VERSION),2.44)
   PKG_HASH:=ce2017e059d63e67ddb9240e9d4ec49c2893605035cd60e92ad53177f4377237
 endif
 
+ifeq ($(PKG_VERSION),2.45)
+  PKG_HASH:=c50c0e7f9cb188980e2cc97e4537626b1672441815587f1eab69d2a1bfbef5d2
+endif
+
 HOST_BUILD_PARALLEL:=1
 
 PATCH_DIR:=./patches/$(PKG_VERSION)
diff --git a/toolchain/binutils/patches/2.45/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.45/300-001_ld_makefile_patch.patch
new file mode 100644
index 0000000000..64dae55dd7
--- /dev/null
+++ b/toolchain/binutils/patches/2.45/300-001_ld_makefile_patch.patch
@@ -0,0 +1,22 @@
+--- a/ld/Makefile.am
++++ b/ld/Makefile.am
+@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS)
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ 
+ EMUL = @EMUL@
+ EMULATION_OFILES = @EMULATION_OFILES@
+--- a/ld/Makefile.in
++++ b/ld/Makefile.in
+@@ -583,7 +583,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CFLAGS)
+ # We put the scripts in the directory $(scriptdir)/ldscripts.
+ # We can't put the scripts in $(datadir) because the SEARCH_DIR
+ # directives need to be different for native and cross linkers.
+-scriptdir = $(tooldir)/lib
++scriptdir = $(libdir)
+ BASEDIR = $(srcdir)/..
+ BFDDIR = $(BASEDIR)/bfd
+ INCDIR = $(BASEDIR)/include
diff --git a/toolchain/binutils/patches/2.45/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.45/400-mips_no_dynamic_linking_sym.patch
new file mode 100644
index 0000000000..5614691107
--- /dev/null
+++ b/toolchain/binutils/patches/2.45/400-mips_no_dynamic_linking_sym.patch
@@ -0,0 +1,18 @@
+--- a/bfd/elfxx-mips.c
++++ b/bfd/elfxx-mips.c
+@@ -8194,6 +8194,7 @@ _bfd_mips_elf_create_dynamic_sections (b
+ 
+       name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
+       bh = NULL;
++      if (0) {
+       if (!(_bfd_generic_link_add_one_symbol
+ 	    (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0,
+ 	     NULL, false, get_elf_backend_data (abfd)->collect, &bh)))
+@@ -8206,6 +8207,7 @@ _bfd_mips_elf_create_dynamic_sections (b
+ 
+       if (! bfd_elf_link_record_dynamic_symbol (info, h))
+ 	return false;
++      }
+ 
+       if (! mips_elf_hash_table (info)->use_rld_obj_head)
+ 	{
diff --git a/toolchain/binutils/patches/2.45/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.45/500-Change-default-emulation-for-mips64-linux.patch
new file mode 100644
index 0000000000..44177e30f2
--- /dev/null
+++ b/toolchain/binutils/patches/2.45/500-Change-default-emulation-for-mips64-linux.patch
@@ -0,0 +1,47 @@
+--- a/bfd/config.bfd
++++ b/bfd/config.bfd
+@@ -961,16 +961,16 @@ case "${targ}" in
+     targ_selvecs="mips_elf64_trad_be_vec mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec"
+     ;;
+   mips64*el-*-linux*)
+-    targ_defvec=mips_elf32_ntrad_le_vec
+-    targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
++    targ_defvec=mips_elf64_trad_le_vec
++    targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
+     ;;
+   mips64*-*-linux*-gnuabi64)
+     targ_defvec=mips_elf64_trad_be_vec
+     targ_selvecs="mips_elf64_trad_le_vec mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec"
+     ;;
+   mips64*-*-linux*)
+-    targ_defvec=mips_elf32_ntrad_be_vec
+-    targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
++    targ_defvec=mips_elf64_trad_be_vec
++    targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
+     ;;
+   mips*el-*-linux*)
+     targ_defvec=mips_elf32_trad_le_vec
+--- a/ld/configure.tgt
++++ b/ld/configure.tgt
+@@ -597,8 +597,8 @@ mips64*el-*-linux-gnuabi64)
+ 			targ_extra_emuls="elf64btsmip elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip"
+ 			targ_extra_libpath=$targ_extra_emuls
+ 			;;
+-mips64*el-*-linux-*)	targ_emul=elf32ltsmipn32
+-			targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
++mips64*el-*-linux-*)	targ_emul=elf64ltsmip
++			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
+ 			targ_extra_libpath=$targ_extra_emuls
+ 			;;
+ mips64*-*-linux-gnuabi64)
+@@ -606,8 +606,8 @@ mips64*-*-linux-gnuabi64)
+ 			targ_extra_emuls="elf64ltsmip elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip"
+ 			targ_extra_libpath=$targ_extra_emuls
+ 			;;
+-mips64*-*-linux-*)	targ_emul=elf32btsmipn32
+-			targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
++mips64*-*-linux-*)	targ_emul=elf64btsmip
++			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
+ 			targ_extra_libpath=$targ_extra_emuls
+ 			;;
+ mips*el-*-linux-*)	targ_emul=elf32ltsmip



From lede-commits at lists.infradead.org  Mon Aug 11 01:29:51 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 04:29:51 -0400
Subject: [openwrt/openwrt]  toolchain: binutils: default to 2.44 and drop 2.40
In-Reply-To: <175490099072.1413230.1447037500254593722@git-01.infra.openwrt.org>
References: <175490099072.1413230.1447037500254593722@git-01.infra.openwrt.org>
Message-ID: <mailman.115407.1754902557.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/854d88be8ad4f26059deeb3748617ca32dfdff15

commit 854d88be8ad4f26059deeb3748617ca32dfdff15
Author: Rui Salvaterra <rsalvaterra at gmail.com>
AuthorDate: Mon Jul 28 13:52:51 2025 +0100

    toolchain: binutils: default to 2.44 and drop 2.40
    
    2.42 has been the default for over a year. 2.44 is well tested by now. While at
    it, drop support for 2.40, as it's over two years old.
    
    Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19547
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 toolchain/binutils/Config.in                       |    6 +-
 toolchain/binutils/Config.version                  |    6 +-
 toolchain/binutils/Makefile                        |    4 -
 ...ways-call-elf_backend_size_dynamic_sectio.patch | 2172 --------------------
 ...-delete-_bfd_mips_elf_early_size_sections.patch |  218 --
 ...te-regexp-to-allow-makeinfo-to-build-docu.patch |   70 -
 ...-number-snafu-in-some-configuration-files.patch |  444 ----
 ...kefile.def-add-install-strip-dependency-o.patch |   60 -
 ...9521-docs-man-pages-are-not-in-the-releas.patch |  703 -------
 ...0043-libgprofng.so.-are-installed-to-a-wr.patch |  212 --
 ...-C-extension-JAL-available-again-for-32-b.patch |  115 --
 ...or-conversion-from-long-unsigned-int-to-u.patch |  209 --
 ...N_LIBS-and-ZSTD_LIBS-to-ld-bootstrap-boot.patch |   50 -
 .../patches/2.40/036-Regen-config-files.patch      |  714 -------
 ...emove-dependencies-on-gmp-and-mpfr-when-g.patch |   51 -
 ...-symbol-name-comparison-in-.startof.-.siz.patch |   46 -
 ...-std-gnu23-compatibility-wrt-static_asser.patch |   66 -
 .../patches/2.40/300-001_ld_makefile_patch.patch   |   22 -
 .../2.40/400-mips_no_dynamic_linking_sym.patch     |   18 -
 ...Change-default-emulation-for-mips64-linux.patch |   38 -
 20 files changed, 2 insertions(+), 5222 deletions(-)

diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in
index 2c87ef9575..87a59d7c11 100644
--- a/toolchain/binutils/Config.in
+++ b/toolchain/binutils/Config.in
@@ -2,14 +2,10 @@
 
 choice
 	prompt "Binutils Version" if TOOLCHAINOPTS
-	default BINUTILS_USE_VERSION_2_42
+	default BINUTILS_USE_VERSION_2_44
 	help
 	  Select the version of binutils you wish to use.
 
-	config BINUTILS_USE_VERSION_2_40
-		bool "Binutils 2.40"
-		select BINUTILS_VERSION_2_40
-
 	config BINUTILS_USE_VERSION_2_42
 		bool "Binutils 2.42"
 		select BINUTILS_VERSION_2_42
diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version
index 4e27f38367..3464d130f9 100644
--- a/toolchain/binutils/Config.version
+++ b/toolchain/binutils/Config.version
@@ -1,15 +1,12 @@
 
-config BINUTILS_VERSION_2_40
-	bool
-
 config BINUTILS_VERSION_2_42
-	default y if !TOOLCHAINOPTS
 	bool
 
 config BINUTILS_VERSION_2_43
 	bool
 
 config BINUTILS_VERSION_2_44
+	default y if !TOOLCHAINOPTS
 	bool
 
 config BINUTILS_VERSION_2_45
@@ -17,7 +14,6 @@ config BINUTILS_VERSION_2_45
 
 config BINUTILS_VERSION
 	string
-	default "2.40"			if BINUTILS_VERSION_2_40
 	default "2.42"			if BINUTILS_VERSION_2_42
 	default "2.43.1"		if BINUTILS_VERSION_2_43
 	default "2.44"			if BINUTILS_VERSION_2_44
diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 126cf6289e..84f12c6ad3 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -16,10 +16,6 @@ PKG_CPE_ID:=cpe:/a:gnu:binutils
 
 TAR_OPTIONS += --exclude='*.rej'
 
-ifeq ($(PKG_VERSION),2.40)
-  PKG_HASH:=0f8a4c272d7f17f369ded10a4aca28b8e304828e95526da482b0ccc4dfc9d8e1
-endif
-
 ifeq ($(PKG_VERSION),2.42)
   PKG_HASH:=f6e4d41fd5fc778b06b7891457b3620da5ecea1006c6a4a41ae998109f85a800
 endif
diff --git a/toolchain/binutils/patches/2.40/001-PR-30569-always-call-elf_backend_size_dynamic_sectio.patch b/toolchain/binutils/patches/2.40/001-PR-30569-always-call-elf_backend_size_dynamic_sectio.patch
deleted file mode 100644
index 9c7635df44..0000000000
--- a/toolchain/binutils/patches/2.40/001-PR-30569-always-call-elf_backend_size_dynamic_sectio.patch
+++ /dev/null
@@ -1,2172 +0,0 @@
-From af969b14aedcc0ae27dcefab4327ff2d153dec8b Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra at gmail.com>
-Date: Thu, 28 Mar 2024 19:25:42 +1030
-Subject: [PATCH 1/2] PR 30569, always call elf_backend_size_dynamic_sections
-
-This largely mechanical patch is preparation for a followup patch.
-
-For quite some time I've thought that it would be useful to call
-elf_backend_size_dynamic_sections even when no dynamic objects are
-seen by the linker.  That's what this patch does, with some renaming.
-There are no functional changes to the linker, just a move of the
-dynobj test in bfd_elf_size_dynamic_sections to target backend
-functions, replacing the asserts/aborts already there.  No doubt some
-of the current always_size_sections functions could be moved to
-size_dynamic_sections but I haven't made that change.
-
-Because both hooks are now always called, I have renamed
-always_size_sections to early_size_sections and size_dynamic_sections
-to late_size_sections.  I condisdered calling late_size_sections plain
-size_sections, since this is the usual target dynamic section sizing
-hook, but decided that searching the sources for "size_sections" would
-then hit early_size_sections and other functions.
----
- bfd/elf-bfd.h          | 35 +++++++++++++++++------------------
- bfd/elf-m10300.c       | 11 ++++++-----
- bfd/elf32-arc.c        |  9 +++++----
- bfd/elf32-arm.c        | 15 ++++++++-------
- bfd/elf32-bfin.c       | 31 ++++++++++++++++---------------
- bfd/elf32-cr16.c       | 11 ++++++-----
- bfd/elf32-cris.c       | 13 +++++++------
- bfd/elf32-csky.c       |  8 ++++----
- bfd/elf32-frv.c        | 23 ++++++++++++-----------
- bfd/elf32-hppa.c       |  8 ++++----
- bfd/elf32-i386.c       |  7 +++----
- bfd/elf32-lm32.c       | 15 ++++++++-------
- bfd/elf32-m32c.c       |  8 ++++----
- bfd/elf32-m32r.c       | 11 ++++++-----
- bfd/elf32-m68k.c       | 16 ++++++++--------
- bfd/elf32-metag.c      |  8 ++++----
- bfd/elf32-microblaze.c |  9 +++++----
- bfd/elf32-mips.c       |  6 ++----
- bfd/elf32-nds32.c      |  9 +++++----
- bfd/elf32-nios2.c      | 15 ++++++++-------
- bfd/elf32-or1k.c       |  9 +++++----
- bfd/elf32-ppc.c        | 11 ++++++-----
- bfd/elf32-rl78.c       |  8 ++++----
- bfd/elf32-s390.c       | 10 +++++-----
- bfd/elf32-score.c      | 35 ++++++++++++++++++-----------------
- bfd/elf32-score.h      |  4 ++--
- bfd/elf32-score7.c     | 13 +++++++------
- bfd/elf32-sh.c         | 15 +++++++--------
- bfd/elf32-sparc.c      |  3 +--
- bfd/elf32-tic6x.c      | 14 +++++++-------
- bfd/elf32-tilegx.c     |  2 +-
- bfd/elf32-tilepro.c    | 11 +++++------
- bfd/elf32-vax.c        | 16 +++++++---------
- bfd/elf32-xstormy16.c  |  8 ++++----
- bfd/elf32-xtensa.c     | 13 ++++++-------
- bfd/elf64-alpha.c      | 19 ++++++++++---------
- bfd/elf64-hppa.c       | 11 ++++-------
- bfd/elf64-ia64-vms.c   | 13 +++++++------
- bfd/elf64-mips.c       |  8 ++++----
- bfd/elf64-ppc.c        | 12 ++++++------
- bfd/elf64-s390.c       | 10 +++++-----
- bfd/elf64-sparc.c      |  4 ++--
- bfd/elf64-tilegx.c     |  2 +-
- bfd/elf64-x86-64.c     |  7 +++----
- bfd/elflink.c          |  9 ++++-----
- bfd/elfn32-mips.c      |  6 ++----
- bfd/elfnn-aarch64.c    | 21 +++++++++++----------
- bfd/elfnn-ia64.c       | 11 ++++++-----
- bfd/elfnn-kvx.c        | 19 +++++++++----------
- bfd/elfnn-loongarch.c  |  9 +++++----
- bfd/elfnn-riscv.c      |  7 ++++---
- bfd/elfxx-mips.c       | 15 ++++++++-------
- bfd/elfxx-mips.h       |  4 ++--
- bfd/elfxx-sparc.c      |  7 ++++---
- bfd/elfxx-sparc.h      |  2 +-
- bfd/elfxx-target.h     | 12 ++++++------
- bfd/elfxx-tilegx.c     |  7 ++++---
- bfd/elfxx-tilegx.h     |  2 +-
- bfd/elfxx-x86.c        |  8 ++++----
- bfd/elfxx-x86.h        |  8 ++++----
- ld/emultempl/vms.em    |  7 +++----
- 61 files changed, 343 insertions(+), 337 deletions(-)
-
---- a/bfd/elf-bfd.h
-+++ b/bfd/elf-bfd.h
-@@ -1173,7 +1173,7 @@ struct elf_backend_data
-   /* The ADJUST_DYNAMIC_SYMBOL function is called by the ELF backend
-      linker for every symbol which is defined by a dynamic object and
-      referenced by a regular object.  This is called after all the
--     input files have been seen, but before the SIZE_DYNAMIC_SECTIONS
-+     input files have been seen, but before the LATE_SIZE_SECTIONS
-      function has been called.  The hash table entry should be
-      bfd_link_hash_defined ore bfd_link_hash_defweak, and it should be
-      defined in a section from a dynamic object.  Dynamic object
-@@ -1185,24 +1185,23 @@ struct elf_backend_data
-   bool (*elf_backend_adjust_dynamic_symbol)
-     (struct bfd_link_info *info, struct elf_link_hash_entry *h);
- 
--  /* The ALWAYS_SIZE_SECTIONS function is called by the backend linker
--     after all the linker input files have been seen but before the
--     section sizes have been set.  This is called after
--     ADJUST_DYNAMIC_SYMBOL, but before SIZE_DYNAMIC_SECTIONS.  */
--  bool (*elf_backend_always_size_sections)
-+  /* The EARLY_SIZE_SECTIONS and LATE_SIZE_SECTIONS functions are
-+     called by the backend linker after all linker input files have
-+     been seen and sections have been assigned to output sections, but
-+     before the section sizes have been set.  Both of these functions
-+     are called even when no dynamic object is seen by the linker.
-+     Between them, they must set the sizes of the dynamic sections and
-+     other backend specific sections, and may fill in their contents.
-+     Most backends need only use LATE_SIZE_SECTIONS.
-+     EARLY_SIZE_SECTIONS is called before --export-dynamic makes some
-+     symbols dynamic and before ADJUST_DYNAMIC_SYMBOL processes
-+     dynamic symbols, LATE_SIZE_SECTIONS afterwards.  The generic ELF
-+     linker can handle the .dynsym, .dynstr and .hash sections.
-+     Besides those, these functions must handle the .interp section
-+     and any other sections created by CREATE_DYNAMIC_SECTIONS.  */
-+  bool (*elf_backend_early_size_sections)
-     (bfd *output_bfd, struct bfd_link_info *info);
--
--  /* The SIZE_DYNAMIC_SECTIONS function is called by the ELF backend
--     linker after all the linker input files have been seen but before
--     the sections sizes have been set.  This is called after
--     ADJUST_DYNAMIC_SYMBOL has been called on all appropriate symbols.
--     It is only called when linking against a dynamic object.  It must
--     set the sizes of the dynamic sections, and may fill in their
--     contents as well.  The generic ELF linker can handle the .dynsym,
--     .dynstr and .hash sections.  This function must handle the
--     .interp section and any sections created by the
--     CREATE_DYNAMIC_SECTIONS entry point.  */
--  bool (*elf_backend_size_dynamic_sections)
-+  bool (*elf_backend_late_size_sections)
-     (bfd *output_bfd, struct bfd_link_info *info);
- 
-   /* The STRIP_ZERO_SIZED_DYNAMIC_SECTIONS function is called by the
---- a/bfd/elf-m10300.c
-+++ b/bfd/elf-m10300.c
-@@ -5012,8 +5012,8 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--_bfd_mn10300_elf_size_dynamic_sections (bfd * output_bfd,
--					struct bfd_link_info * info)
-+_bfd_mn10300_elf_late_size_sections (bfd * output_bfd,
-+				     struct bfd_link_info * info)
- {
-   struct elf32_mn10300_link_hash_table *htab = elf32_mn10300_hash_table (info);
-   bfd * dynobj;
-@@ -5021,7 +5021,8 @@ _bfd_mn10300_elf_size_dynamic_sections (
-   bool relocs;
- 
-   dynobj = htab->root.dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -5508,8 +5509,8 @@ mn10300_elf_mkobject (bfd *abfd)
-   _bfd_mn10300_elf_create_dynamic_sections
- #define elf_backend_adjust_dynamic_symbol \
-   _bfd_mn10300_elf_adjust_dynamic_symbol
--#define elf_backend_size_dynamic_sections \
--  _bfd_mn10300_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections \
-+  _bfd_mn10300_elf_late_size_sections
- #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
- #define elf_backend_finish_dynamic_symbol \
-   _bfd_mn10300_elf_finish_dynamic_symbol
---- a/bfd/elf32-arc.c
-+++ b/bfd/elf32-arc.c
-@@ -2702,8 +2702,8 @@ elf_arc_finish_dynamic_sections (bfd * o
- 
- /* Set the sizes of the dynamic sections.  */
- static bool
--elf_arc_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--			       struct bfd_link_info *info)
-+elf_arc_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			    struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s;
-@@ -2711,7 +2711,8 @@ elf_arc_size_dynamic_sections (bfd *outp
-   struct elf_link_hash_table *htab = elf_hash_table (info);
- 
-   dynobj = htab->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (htab->dynamic_sections_created)
-     {
-@@ -3126,7 +3127,7 @@ arc_elf_relax_section (bfd *abfd, asecti
- #define elf_backend_finish_dynamic_symbol    elf_arc_finish_dynamic_symbol
- 
- #define elf_backend_finish_dynamic_sections  elf_arc_finish_dynamic_sections
--#define elf_backend_size_dynamic_sections    elf_arc_size_dynamic_sections
-+#define elf_backend_late_size_sections       elf_arc_late_size_sections
- 
- #define elf_backend_can_gc_sections	1
- #define elf_backend_want_got_plt	1
---- a/bfd/elf32-arm.c
-+++ b/bfd/elf32-arm.c
-@@ -16734,8 +16734,8 @@ bfd_elf32_arm_set_byteswap_code (struct
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
--				 struct bfd_link_info * info)
-+elf32_arm_late_size_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
-+			      struct bfd_link_info * info)
- {
-   bfd * dynobj;
-   asection * s;
-@@ -16748,7 +16748,9 @@ elf32_arm_size_dynamic_sections (bfd * o
-     return false;
- 
-   dynobj = elf_hash_table (info)->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
-+
-   check_use_blx (htab);
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-@@ -17120,8 +17122,7 @@ elf32_arm_size_dynamic_sections (bfd * o
-    _TLS_MODULE_BASE_, if needed.  */
- 
- static bool
--elf32_arm_always_size_sections (bfd *output_bfd,
--				struct bfd_link_info *info)
-+elf32_arm_early_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   asection *tls_sec;
-   struct elf32_arm_link_hash_table *htab;
-@@ -20320,8 +20321,8 @@ elf32_arm_backend_symbol_processing (bfd
- #define elf_backend_create_dynamic_sections	elf32_arm_create_dynamic_sections
- #define elf_backend_finish_dynamic_symbol	elf32_arm_finish_dynamic_symbol
- #define elf_backend_finish_dynamic_sections	elf32_arm_finish_dynamic_sections
--#define elf_backend_size_dynamic_sections	elf32_arm_size_dynamic_sections
--#define elf_backend_always_size_sections	elf32_arm_always_size_sections
-+#define elf_backend_late_size_sections		elf32_arm_late_size_sections
-+#define elf_backend_early_size_sections		elf32_arm_early_size_sections
- #define elf_backend_init_index_section		_bfd_elf_init_2_index_sections
- #define elf_backend_init_file_header		elf32_arm_init_file_header
- #define elf_backend_reloc_type_class		elf32_arm_reloc_type_class
---- a/bfd/elf32-bfin.c
-+++ b/bfd/elf32-bfin.c
-@@ -4027,8 +4027,8 @@ _bfinfdpic_size_got_plt (bfd *output_bfd
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd,
--				      struct bfd_link_info *info)
-+elf32_bfinfdpic_late_size_sections (bfd *output_bfd,
-+				    struct bfd_link_info *info)
- {
-   struct elf_link_hash_table *htab;
-   bfd *dynobj;
-@@ -4037,7 +4037,8 @@ elf32_bfinfdpic_size_dynamic_sections (b
- 
-   htab = elf_hash_table (info);
-   dynobj = htab->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (htab->dynamic_sections_created)
-     {
-@@ -4086,7 +4087,7 @@ elf32_bfinfdpic_size_dynamic_sections (b
- }
- 
- static bool
--elf32_bfinfdpic_always_size_sections (bfd *output_bfd,
-+elf32_bfinfdpic_early_size_sections (bfd *output_bfd,
- 				     struct bfd_link_info *info)
- {
-   if (!bfd_link_relocatable (info)
-@@ -5124,15 +5125,16 @@ bfin_discard_copies (struct elf_link_has
- }
- 
- static bool
--bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
--			    struct bfd_link_info *info)
-+bfin_late_size_sections (bfd * output_bfd ATTRIBUTE_UNUSED,
-+			 struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s;
-   bool relocs;
- 
-   dynobj = elf_hash_table (info)->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -5424,8 +5426,7 @@ struct bfd_elf_special_section const elf
- #define elf_backend_check_relocs	bfin_check_relocs
- #define elf_backend_adjust_dynamic_symbol \
- 					bfin_adjust_dynamic_symbol
--#define elf_backend_size_dynamic_sections \
--					bfin_size_dynamic_sections
-+#define elf_backend_late_size_sections	bfin_late_size_sections
- #define elf_backend_relocate_section	bfin_relocate_section
- #define elf_backend_finish_dynamic_symbol \
- 					bfin_finish_dynamic_symbol
-@@ -5471,9 +5472,9 @@ struct bfd_elf_special_section const elf
- #undef bfd_elf32_bfd_link_hash_table_create
- #define bfd_elf32_bfd_link_hash_table_create \
- 		bfinfdpic_elf_link_hash_table_create
--#undef elf_backend_always_size_sections
--#define elf_backend_always_size_sections \
--		elf32_bfinfdpic_always_size_sections
-+#undef elf_backend_early_size_sections
-+#define elf_backend_early_size_sections \
-+		elf32_bfinfdpic_early_size_sections
- 
- #undef elf_backend_create_dynamic_sections
- #define elf_backend_create_dynamic_sections \
-@@ -5481,9 +5482,9 @@ struct bfd_elf_special_section const elf
- #undef elf_backend_adjust_dynamic_symbol
- #define elf_backend_adjust_dynamic_symbol \
- 		elf32_bfinfdpic_adjust_dynamic_symbol
--#undef elf_backend_size_dynamic_sections
--#define elf_backend_size_dynamic_sections \
--		elf32_bfinfdpic_size_dynamic_sections
-+#undef elf_backend_late_size_sections
-+#define elf_backend_late_size_sections \
-+		elf32_bfinfdpic_late_size_sections
- #undef elf_backend_finish_dynamic_symbol
- #define elf_backend_finish_dynamic_symbol \
- 		elf32_bfinfdpic_finish_dynamic_symbol
---- a/bfd/elf32-cr16.c
-+++ b/bfd/elf32-cr16.c
-@@ -2390,15 +2390,16 @@ _bfd_cr16_elf_adjust_dynamic_symbol (str
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--_bfd_cr16_elf_size_dynamic_sections (bfd * output_bfd,
--				     struct bfd_link_info * info)
-+_bfd_cr16_elf_late_size_sections (bfd * output_bfd,
-+				  struct bfd_link_info * info)
- {
-   bfd * dynobj;
-   asection * s;
-   bool relocs;
- 
-   dynobj = elf_hash_table (info)->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -2835,8 +2836,8 @@ _bfd_cr16_elf_reloc_type_class (const st
- 				  _bfd_cr16_elf_create_dynamic_sections
- #define elf_backend_adjust_dynamic_symbol \
- 				  _bfd_cr16_elf_adjust_dynamic_symbol
--#define elf_backend_size_dynamic_sections \
--				  _bfd_cr16_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections \
-+				  _bfd_cr16_elf_late_size_sections
- #define elf_backend_omit_section_dynsym _bfd_elf_omit_section_dynsym_all
- #define elf_backend_finish_dynamic_symbol \
- 				   _bfd_cr16_elf_finish_dynamic_symbol
---- a/bfd/elf32-cris.c
-+++ b/bfd/elf32-cris.c
-@@ -2527,7 +2527,7 @@ cris_elf_plt_sym_val (bfd_vma i ATTRIBUT
-    entry but we found we will not create any.  Called when we find we will
-    not have any PLT for this symbol, by for example
-    elf_cris_adjust_dynamic_symbol when we're doing a proper dynamic link,
--   or elf_cris_size_dynamic_sections if no dynamic sections will be
-+   or elf_cris_late_size_sections if no dynamic sections will be
-    created (we're only linking static objects).  */
- 
- static bool
-@@ -3508,8 +3508,8 @@ cris_elf_check_relocs (bfd *abfd,
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf_cris_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				struct bfd_link_info *info)
-+elf_cris_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			     struct bfd_link_info *info)
- {
-   struct elf_cris_link_hash_table * htab;
-   bfd *dynobj;
-@@ -3521,7 +3521,8 @@ elf_cris_size_dynamic_sections (bfd *out
-     return false;
- 
-   dynobj = htab->root.dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (htab->root.dynamic_sections_created)
-     {
-@@ -4090,8 +4091,8 @@ elf_cris_got_elt_size (bfd *abfd ATTRIBU
- 	elf_cris_adjust_dynamic_symbol
- #define elf_backend_copy_indirect_symbol \
- 	elf_cris_copy_indirect_symbol
--#define elf_backend_size_dynamic_sections \
--	elf_cris_size_dynamic_sections
-+#define elf_backend_late_size_sections \
-+	elf_cris_late_size_sections
- #define elf_backend_init_index_section		_bfd_elf_init_1_index_section
- #define elf_backend_finish_dynamic_symbol \
- 	elf_cris_finish_dynamic_symbol
---- a/bfd/elf32-csky.c
-+++ b/bfd/elf32-csky.c
-@@ -1893,8 +1893,8 @@ csky_allocate_dynrelocs (struct elf_link
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--csky_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				struct bfd_link_info *info)
-+csky_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			     struct bfd_link_info *info)
- {
-   struct csky_elf_link_hash_table *htab;
-   bfd *dynobj;
-@@ -1907,7 +1907,7 @@ csky_elf_size_dynamic_sections (bfd *out
-     return false;
-   dynobj = htab->elf.dynobj;
-   if (dynobj == NULL)
--    return false;
-+    return true;
- 
-   if (htab->elf.dynamic_sections_created)
-     {
-@@ -5344,7 +5344,7 @@ elf32_csky_obj_attrs_handle_unknown (bfd
- /* Dynamic relocate related API.  */
- #define elf_backend_create_dynamic_sections   _bfd_elf_create_dynamic_sections
- #define elf_backend_adjust_dynamic_symbol     csky_elf_adjust_dynamic_symbol
--#define elf_backend_size_dynamic_sections     csky_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections        csky_elf_late_size_sections
- #define elf_backend_finish_dynamic_symbol     csky_elf_finish_dynamic_symbol
- #define elf_backend_finish_dynamic_sections   csky_elf_finish_dynamic_sections
- #define elf_backend_rela_normal               1
---- a/bfd/elf32-frv.c
-+++ b/bfd/elf32-frv.c
-@@ -5423,15 +5423,16 @@ _frvfdpic_size_got_plt (bfd *output_bfd,
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf32_frvfdpic_size_dynamic_sections (bfd *output_bfd,
--				      struct bfd_link_info *info)
-+elf32_frvfdpic_late_size_sections (bfd *output_bfd,
-+				   struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s;
-   struct _frvfdpic_dynamic_got_plt_info gpinfo;
- 
-   dynobj = elf_hash_table (info)->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -5472,8 +5473,8 @@ elf32_frvfdpic_size_dynamic_sections (bf
- }
- 
- static bool
--elf32_frvfdpic_always_size_sections (bfd *output_bfd,
--				     struct bfd_link_info *info)
-+elf32_frvfdpic_early_size_sections (bfd *output_bfd,
-+				    struct bfd_link_info *info)
- {
-   if (!bfd_link_relocatable (info)
-       && !bfd_elf_stack_segment_size (output_bfd, info,
-@@ -6817,9 +6818,9 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_In
- #undef bfd_elf32_bfd_link_hash_table_create
- #define bfd_elf32_bfd_link_hash_table_create \
- 		frvfdpic_elf_link_hash_table_create
--#undef elf_backend_always_size_sections
--#define elf_backend_always_size_sections \
--		elf32_frvfdpic_always_size_sections
-+#undef elf_backend_early_size_sections
-+#define elf_backend_early_size_sections \
-+		elf32_frvfdpic_early_size_sections
- 
- #undef elf_backend_create_dynamic_sections
- #define elf_backend_create_dynamic_sections \
-@@ -6827,9 +6828,9 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_In
- #undef elf_backend_adjust_dynamic_symbol
- #define elf_backend_adjust_dynamic_symbol \
- 		elf32_frvfdpic_adjust_dynamic_symbol
--#undef elf_backend_size_dynamic_sections
--#define elf_backend_size_dynamic_sections \
--		elf32_frvfdpic_size_dynamic_sections
-+#undef elf_backend_late_size_sections
-+#define elf_backend_late_size_sections \
-+		elf32_frvfdpic_late_size_sections
- #undef bfd_elf32_bfd_relax_section
- #define bfd_elf32_bfd_relax_section \
-   elf32_frvfdpic_relax_section
---- a/bfd/elf32-hppa.c
-+++ b/bfd/elf32-hppa.c
-@@ -2042,8 +2042,8 @@ clobber_millicode_symbols (struct elf_li
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				  struct bfd_link_info *info)
-+elf32_hppa_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			       struct bfd_link_info *info)
- {
-   struct elf32_hppa_link_hash_table *htab;
-   bfd *dynobj;
-@@ -2057,7 +2057,7 @@ elf32_hppa_size_dynamic_sections (bfd *o
- 
-   dynobj = htab->etab.dynobj;
-   if (dynobj == NULL)
--    abort ();
-+    return true;
- 
-   if (htab->etab.dynamic_sections_created)
-     {
-@@ -4450,7 +4450,7 @@ elf32_hppa_elf_get_symbol_type (Elf_Inte
- #define elf_backend_hide_symbol		     elf32_hppa_hide_symbol
- #define elf_backend_finish_dynamic_symbol    elf32_hppa_finish_dynamic_symbol
- #define elf_backend_finish_dynamic_sections  elf32_hppa_finish_dynamic_sections
--#define elf_backend_size_dynamic_sections    elf32_hppa_size_dynamic_sections
-+#define elf_backend_late_size_sections	     elf32_hppa_late_size_sections
- #define elf_backend_init_index_section	     _bfd_elf_init_1_index_section
- #define elf_backend_gc_mark_hook	     elf32_hppa_gc_mark_hook
- #define elf_backend_grok_prstatus	     elf32_hppa_grok_prstatus
---- a/bfd/elf32-i386.c
-+++ b/bfd/elf32-i386.c
-@@ -1933,8 +1933,7 @@ elf_i386_scan_relocs (bfd *abfd,
- }
- 
- static bool
--elf_i386_always_size_sections (bfd *output_bfd,
--			       struct bfd_link_info *info)
-+elf_i386_early_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   bfd *abfd;
- 
-@@ -1947,7 +1946,7 @@ elf_i386_always_size_sections (bfd *outp
- 					     elf_i386_scan_relocs))
-       return false;
- 
--  return _bfd_x86_elf_always_size_sections (output_bfd, info);
-+  return _bfd_x86_elf_early_size_sections (output_bfd, info);
- }
- 
- /* Set the correct type for an x86 ELF section.  We do this by the
-@@ -4444,7 +4443,7 @@ elf_i386_link_setup_gnu_properties (stru
- #define bfd_elf32_get_synthetic_symtab	      elf_i386_get_synthetic_symtab
- 
- #define elf_backend_relocs_compatible	      _bfd_elf_relocs_compatible
--#define elf_backend_always_size_sections      elf_i386_always_size_sections
-+#define elf_backend_early_size_sections	      elf_i386_early_size_sections
- #define elf_backend_create_dynamic_sections   _bfd_elf_create_dynamic_sections
- #define elf_backend_fake_sections	      elf_i386_fake_sections
- #define elf_backend_finish_dynamic_sections   elf_i386_finish_dynamic_sections
---- a/bfd/elf32-lm32.c
-+++ b/bfd/elf32-lm32.c
-@@ -1906,8 +1906,8 @@ allocate_dynrelocs (struct elf_link_hash
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--lm32_elf_size_dynamic_sections (bfd *output_bfd,
--				struct bfd_link_info *info)
-+lm32_elf_late_size_sections (bfd *output_bfd,
-+			     struct bfd_link_info *info)
- {
-   struct elf_lm32_link_hash_table *htab;
-   bfd *dynobj;
-@@ -1920,7 +1920,8 @@ lm32_elf_size_dynamic_sections (bfd *out
-     return false;
- 
-   dynobj = htab->root.dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (htab->root.dynamic_sections_created)
-     {
-@@ -2309,7 +2310,7 @@ lm32_elf_create_dynamic_sections (bfd *a
- }
- 
- static bool
--lm32_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info)
-+lm32_elf_early_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   if (!bfd_link_relocatable (info))
-     {
-@@ -2395,7 +2396,7 @@ lm32_elf_fdpic_copy_private_bfd_data (bf
- #define bfd_elf32_bfd_link_hash_table_create	lm32_elf_link_hash_table_create
- #define elf_backend_check_relocs		lm32_elf_check_relocs
- #define elf_backend_reloc_type_class		lm32_elf_reloc_type_class
--#define elf_backend_size_dynamic_sections	lm32_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections		lm32_elf_late_size_sections
- #define elf_backend_omit_section_dynsym		_bfd_elf_omit_section_dynsym_all
- #define elf_backend_create_dynamic_sections	lm32_elf_create_dynamic_sections
- #define elf_backend_finish_dynamic_sections	lm32_elf_finish_dynamic_sections
-@@ -2416,8 +2417,8 @@ lm32_elf_fdpic_copy_private_bfd_data (bf
- #undef	elf32_bed
- #define	elf32_bed		elf32_lm32fdpic_bed
- 
--#undef	elf_backend_always_size_sections
--#define elf_backend_always_size_sections	lm32_elf_always_size_sections
-+#undef	elf_backend_early_size_sections
-+#define elf_backend_early_size_sections		lm32_elf_early_size_sections
- #undef	bfd_elf32_bfd_copy_private_bfd_data
- #define bfd_elf32_bfd_copy_private_bfd_data	lm32_elf_fdpic_copy_private_bfd_data
- 
---- a/bfd/elf32-m32c.c
-+++ b/bfd/elf32-m32c.c
-@@ -773,8 +773,8 @@ m32c_elf_finish_dynamic_sections (bfd *a
- }
- 
- static bool
--m32c_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--			       struct bfd_link_info *info)
-+m32c_elf_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			      struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *splt;
-@@ -2131,8 +2131,8 @@ _bfd_m32c_elf_eh_frame_address_size (bfd
- #define elf_backend_check_relocs		m32c_elf_check_relocs
- #define elf_backend_object_p			m32c_elf_object_p
- #define elf_symbol_leading_char			('_')
--#define elf_backend_always_size_sections \
--  m32c_elf_always_size_sections
-+#define elf_backend_early_size_sections \
-+  m32c_elf_early_size_sections
- #define elf_backend_finish_dynamic_sections \
-   m32c_elf_finish_dynamic_sections
- 
---- a/bfd/elf32-m32r.c
-+++ b/bfd/elf32-m32r.c
-@@ -1958,8 +1958,8 @@ allocate_dynrelocs (struct elf_link_hash
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				struct bfd_link_info *info)
-+m32r_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			     struct bfd_link_info *info)
- {
-   struct elf_link_hash_table *htab;
-   bfd *dynobj;
-@@ -1968,7 +1968,7 @@ m32r_elf_size_dynamic_sections (bfd *out
-   bfd *ibfd;
- 
- #ifdef DEBUG_PIC
--  printf ("m32r_elf_size_dynamic_sections()\n");
-+  printf ("m32r_elf_late_size_sections()\n");
- #endif
- 
-   htab = m32r_elf_hash_table (info);
-@@ -1976,7 +1976,8 @@ m32r_elf_size_dynamic_sections (bfd *out
-     return false;
- 
-   dynobj = htab->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (htab->dynamic_sections_created)
-     {
-@@ -3658,7 +3659,7 @@ m32r_elf_reloc_type_class (const struct
- 
- #define elf_backend_create_dynamic_sections	m32r_elf_create_dynamic_sections
- #define bfd_elf32_bfd_link_hash_table_create	m32r_elf_link_hash_table_create
--#define elf_backend_size_dynamic_sections	m32r_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections		m32r_elf_late_size_sections
- #define elf_backend_omit_section_dynsym		_bfd_elf_omit_section_dynsym_all
- #define elf_backend_finish_dynamic_sections	m32r_elf_finish_dynamic_sections
- #define elf_backend_adjust_dynamic_symbol	m32r_elf_adjust_dynamic_symbol
---- a/bfd/elf32-m68k.c
-+++ b/bfd/elf32-m68k.c
-@@ -2934,7 +2934,7 @@ elf_m68k_get_plt_info (bfd *output_bfd)
-    It's a convenient place to determine the PLT style.  */
- 
- static bool
--elf_m68k_always_size_sections (bfd *output_bfd, struct bfd_link_info *info)
-+elf_m68k_early_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   /* Bind input BFDs to GOTs and calculate sizes of .got and .rela.got
-      sections.  */
-@@ -3107,15 +3107,16 @@ elf_m68k_adjust_dynamic_symbol (struct b
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf_m68k_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				struct bfd_link_info *info)
-+elf_m68k_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			     struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s;
-   bool relocs;
- 
-   dynobj = elf_hash_table (info)->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -4628,12 +4629,11 @@ elf_m68k_grok_psinfo (bfd *abfd, Elf_Int
- #define bfd_elf32_bfd_final_link	bfd_elf_final_link
- 
- #define elf_backend_check_relocs	elf_m68k_check_relocs
--#define elf_backend_always_size_sections \
--					elf_m68k_always_size_sections
-+#define elf_backend_early_size_sections \
-+					elf_m68k_early_size_sections
- #define elf_backend_adjust_dynamic_symbol \
- 					elf_m68k_adjust_dynamic_symbol
--#define elf_backend_size_dynamic_sections \
--					elf_m68k_size_dynamic_sections
-+#define elf_backend_late_size_sections	elf_m68k_late_size_sections
- #define elf_backend_final_write_processing	elf_m68k_final_write_processing
- #define elf_backend_init_index_section	_bfd_elf_init_1_index_section
- #define elf_backend_relocate_section	elf_m68k_relocate_section
---- a/bfd/elf32-metag.c
-+++ b/bfd/elf32-metag.c
-@@ -2717,8 +2717,8 @@ allocate_dynrelocs (struct elf_link_hash
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf_metag_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				 struct bfd_link_info *info)
-+elf_metag_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			      struct bfd_link_info *info)
- {
-   struct elf_metag_link_hash_table *htab;
-   bfd *dynobj;
-@@ -2729,7 +2729,7 @@ elf_metag_size_dynamic_sections (bfd *ou
-   htab = metag_link_hash_table (info);
-   dynobj = htab->etab.dynobj;
-   if (dynobj == NULL)
--    abort ();
-+    return true;
- 
-   if (htab->etab.dynamic_sections_created)
-     {
-@@ -4019,7 +4019,7 @@ elf_metag_plt_sym_val (bfd_vma i, const
- #define elf_backend_adjust_dynamic_symbol	elf_metag_adjust_dynamic_symbol
- #define elf_backend_finish_dynamic_symbol	elf_metag_finish_dynamic_symbol
- #define elf_backend_finish_dynamic_sections	elf_metag_finish_dynamic_sections
--#define elf_backend_size_dynamic_sections	elf_metag_size_dynamic_sections
-+#define elf_backend_late_size_sections		elf_metag_late_size_sections
- #define elf_backend_omit_section_dynsym \
- 	_bfd_elf_omit_section_dynsym_all
- #define elf_backend_init_file_header		elf_metag_init_file_header
---- a/bfd/elf32-microblaze.c
-+++ b/bfd/elf32-microblaze.c
-@@ -2946,8 +2946,8 @@ allocate_dynrelocs (struct elf_link_hash
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--microblaze_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				      struct bfd_link_info *info)
-+microblaze_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+				   struct bfd_link_info *info)
- {
-   struct elf32_mb_link_hash_table *htab;
-   bfd *dynobj;
-@@ -2959,7 +2959,8 @@ microblaze_elf_size_dynamic_sections (bf
-     return false;
- 
-   dynobj = htab->elf.dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   /* Set up .got offsets for local syms, and space for local dynamic
-      relocs.  */
-@@ -3477,7 +3478,7 @@ microblaze_elf_add_symbol_hook (bfd *abf
- #define elf_backend_create_dynamic_sections	_bfd_elf_create_dynamic_sections
- #define elf_backend_finish_dynamic_sections	microblaze_elf_finish_dynamic_sections
- #define elf_backend_finish_dynamic_symbol	microblaze_elf_finish_dynamic_symbol
--#define elf_backend_size_dynamic_sections	microblaze_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections		microblaze_elf_late_size_sections
- #define elf_backend_add_symbol_hook		microblaze_elf_add_symbol_hook
- 
- #include "elf32-target.h"
---- a/bfd/elf32-mips.c
-+++ b/bfd/elf32-mips.c
-@@ -2534,10 +2534,8 @@ static const struct ecoff_debug_swap mip
- #define elf_backend_get_target_dtag	_bfd_mips_elf_get_target_dtag
- #define elf_backend_adjust_dynamic_symbol \
- 					_bfd_mips_elf_adjust_dynamic_symbol
--#define elf_backend_always_size_sections \
--					_bfd_mips_elf_always_size_sections
--#define elf_backend_size_dynamic_sections \
--					_bfd_mips_elf_size_dynamic_sections
-+#define elf_backend_early_size_sections	_bfd_mips_elf_early_size_sections
-+#define elf_backend_late_size_sections	_bfd_mips_elf_late_size_sections
- #define elf_backend_init_index_section	_bfd_elf_init_1_index_section
- #define elf_backend_relocate_section	_bfd_mips_elf_relocate_section
- #define elf_backend_finish_dynamic_symbol \
---- a/bfd/elf32-nds32.c
-+++ b/bfd/elf32-nds32.c
-@@ -4302,8 +4302,8 @@ elf32_nds32_add_dynreloc (bfd *output_bf
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--nds32_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				 struct bfd_link_info *info)
-+nds32_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			      struct bfd_link_info *info)
- {
-   struct elf_nds32_link_hash_table *htab;
-   bfd *dynobj;
-@@ -4316,7 +4316,8 @@ nds32_elf_size_dynamic_sections (bfd *ou
-     return false;
- 
-   dynobj = elf_hash_table (info)->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -13984,7 +13985,7 @@ nds32_elf_unify_tls_model (bfd *inbfd, a
- #define elf_backend_create_dynamic_sections	nds32_elf_create_dynamic_sections
- #define elf_backend_finish_dynamic_sections	nds32_elf_finish_dynamic_sections
- #define elf_backend_finish_dynamic_symbol	nds32_elf_finish_dynamic_symbol
--#define elf_backend_size_dynamic_sections	nds32_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections		nds32_elf_late_size_sections
- #define elf_backend_relocate_section		nds32_elf_relocate_section
- #define elf_backend_gc_mark_hook		nds32_elf_gc_mark_hook
- #define elf_backend_grok_prstatus		nds32_elf_grok_prstatus
---- a/bfd/elf32-nios2.c
-+++ b/bfd/elf32-nios2.c
-@@ -5411,7 +5411,7 @@ nios2_elf32_adjust_dynamic_symbol (struc
-   return true;
- }
- 
--/* Worker function for nios2_elf32_size_dynamic_sections.  */
-+/* Worker function for nios2_elf32_late_size_sections.  */
- static bool
- adjust_dynrelocs (struct elf_link_hash_entry *h, void *inf)
- {
-@@ -5438,7 +5438,7 @@ adjust_dynrelocs (struct elf_link_hash_e
-   return true;
- }
- 
--/* Another worker function for nios2_elf32_size_dynamic_sections.
-+/* Another worker function for nios2_elf32_late_size_sections.
-    Allocate space in .plt, .got and associated reloc sections for
-    dynamic relocs.  */
- static bool
-@@ -5673,11 +5673,11 @@ allocate_dynrelocs (struct elf_link_hash
-   return true;
- }
- 
--/* Implement elf_backend_size_dynamic_sections:
-+/* Implement elf_backend_late_size_sections:
-    Set the sizes of the dynamic sections.  */
- static bool
--nios2_elf32_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				   struct bfd_link_info *info)
-+nios2_elf32_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+				struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s;
-@@ -5687,7 +5687,8 @@ nios2_elf32_size_dynamic_sections (bfd *
- 
-   htab = elf32_nios2_hash_table (info);
-   dynobj = htab->root.dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   htab->res_n_size = 0;
-   if (htab->root.dynamic_sections_created)
-@@ -6058,7 +6059,7 @@ const struct bfd_elf_special_section elf
- 					  nios2_elf32_finish_dynamic_sections
- #define elf_backend_adjust_dynamic_symbol nios2_elf32_adjust_dynamic_symbol
- #define elf_backend_reloc_type_class	  nios2_elf32_reloc_type_class
--#define elf_backend_size_dynamic_sections nios2_elf32_size_dynamic_sections
-+#define elf_backend_late_size_sections	  nios2_elf32_late_size_sections
- #define elf_backend_add_symbol_hook	  nios2_elf_add_symbol_hook
- #define elf_backend_copy_indirect_symbol  nios2_elf32_copy_indirect_symbol
- #define elf_backend_object_p		  nios2_elf32_object_p
---- a/bfd/elf32-or1k.c
-+++ b/bfd/elf32-or1k.c
-@@ -3039,8 +3039,8 @@ allocate_dynrelocs (struct elf_link_hash
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--or1k_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				struct bfd_link_info *info)
-+or1k_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			     struct bfd_link_info *info)
- {
-   struct elf_or1k_link_hash_table *htab;
-   bfd *dynobj;
-@@ -3053,7 +3053,8 @@ or1k_elf_size_dynamic_sections (bfd *out
-     return false;
- 
-   dynobj = htab->root.dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (htab->root.dynamic_sections_created)
-     {
-@@ -3406,7 +3407,7 @@ or1k_grok_psinfo (bfd *abfd, Elf_Interna
- #define elf_backend_copy_indirect_symbol	or1k_elf_copy_indirect_symbol
- #define elf_backend_create_dynamic_sections	_bfd_elf_create_dynamic_sections
- #define elf_backend_finish_dynamic_sections	or1k_elf_finish_dynamic_sections
--#define elf_backend_size_dynamic_sections	or1k_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections		or1k_elf_late_size_sections
- #define elf_backend_adjust_dynamic_symbol	or1k_elf_adjust_dynamic_symbol
- #define elf_backend_finish_dynamic_symbol	or1k_elf_finish_dynamic_symbol
- 
---- a/bfd/elf32-ppc.c
-+++ b/bfd/elf32-ppc.c
-@@ -5478,8 +5478,8 @@ static const unsigned char glink_eh_fram
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--ppc_elf_size_dynamic_sections (bfd *output_bfd,
--			       struct bfd_link_info *info)
-+ppc_elf_late_size_sections (bfd *output_bfd,
-+			    struct bfd_link_info *info)
- {
-   struct ppc_elf_link_hash_table *htab;
-   asection *s;
-@@ -5487,11 +5487,12 @@ ppc_elf_size_dynamic_sections (bfd *outp
-   bfd *ibfd;
- 
- #ifdef DEBUG
--  fprintf (stderr, "ppc_elf_size_dynamic_sections called\n");
-+  fprintf (stderr, "ppc_elf_late_size_sections called\n");
- #endif
- 
-   htab = ppc_elf_hash_table (info);
--  BFD_ASSERT (htab->elf.dynobj != NULL);
-+  if (htab->elf.dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -10414,7 +10415,7 @@ ppc_elf_finish_dynamic_sections (bfd *ou
- #define elf_backend_copy_indirect_symbol	ppc_elf_copy_indirect_symbol
- #define elf_backend_adjust_dynamic_symbol	ppc_elf_adjust_dynamic_symbol
- #define elf_backend_add_symbol_hook		ppc_elf_add_symbol_hook
--#define elf_backend_size_dynamic_sections	ppc_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections		ppc_elf_late_size_sections
- #define elf_backend_hash_symbol			ppc_elf_hash_symbol
- #define elf_backend_finish_dynamic_symbol	ppc_elf_finish_dynamic_symbol
- #define elf_backend_finish_dynamic_sections	ppc_elf_finish_dynamic_sections
---- a/bfd/elf32-rl78.c
-+++ b/bfd/elf32-rl78.c
-@@ -1440,8 +1440,8 @@ rl78_elf_finish_dynamic_sections (bfd *a
- }
- 
- static bool
--rl78_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--			       struct bfd_link_info *info)
-+rl78_elf_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			      struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *splt;
-@@ -2609,8 +2609,8 @@ rl78_elf_relax_section (bfd *abfd,
- 
- #define bfd_elf32_bfd_relax_section		rl78_elf_relax_section
- #define elf_backend_check_relocs		rl78_elf_check_relocs
--#define elf_backend_always_size_sections \
--  rl78_elf_always_size_sections
-+#define elf_backend_early_size_sections \
-+  rl78_elf_early_size_sections
- #define elf_backend_finish_dynamic_sections \
-   rl78_elf_finish_dynamic_sections
- 
---- a/bfd/elf32-s390.c
-+++ b/bfd/elf32-s390.c
-@@ -1366,7 +1366,7 @@ elf_s390_gc_mark_hook (asection *sec,
-    entry but we found we will not create any.  Called when we find we will
-    not have any PLT for this symbol, by for example
-    elf_s390_adjust_dynamic_symbol when we're doing a proper dynamic link,
--   or elf_s390_size_dynamic_sections if no dynamic sections will be
-+   or elf_s390_late_size_sections if no dynamic sections will be
-    created (we're only linking static objects).  */
- 
- static void
-@@ -1778,8 +1778,8 @@ allocate_dynrelocs (struct elf_link_hash
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				struct bfd_link_info *info)
-+elf_s390_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			     struct bfd_link_info *info)
- {
-   struct elf_s390_link_hash_table *htab;
-   bfd *dynobj;
-@@ -1790,7 +1790,7 @@ elf_s390_size_dynamic_sections (bfd *out
-   htab = elf_s390_hash_table (info);
-   dynobj = htab->elf.dynobj;
-   if (dynobj == NULL)
--    abort ();
-+    return true;
- 
-   if (htab->elf.dynamic_sections_created)
-     {
-@@ -3926,7 +3926,7 @@ elf32_s390_merge_private_bfd_data (bfd *
- #define elf_backend_gc_mark_hook	      elf_s390_gc_mark_hook
- #define elf_backend_reloc_type_class	      elf_s390_reloc_type_class
- #define elf_backend_relocate_section	      elf_s390_relocate_section
--#define elf_backend_size_dynamic_sections     elf_s390_size_dynamic_sections
-+#define elf_backend_late_size_sections	      elf_s390_late_size_sections
- #define elf_backend_init_index_section	      _bfd_elf_init_1_index_section
- #define elf_backend_grok_prstatus	      elf_s390_grok_prstatus
- #define elf_backend_grok_psinfo		      elf_s390_grok_psinfo
---- a/bfd/elf32-score.c
-+++ b/bfd/elf32-score.c
-@@ -1089,7 +1089,7 @@ score_elf_got_info (bfd *abfd, asection
-    appear towards the end.  This reduces the amount of GOT space
-    required.  MAX_LOCAL is used to set the number of local symbols
-    known to be in the dynamic symbol table.  During
--   s3_bfd_score_elf_size_dynamic_sections, this value is 1.  Afterward, the
-+   s3_bfd_score_elf_late_size_sections, this value is 1.  Afterward, the
-    section symbols are added and the count is higher.  */
- static bool
- score_elf_sort_hash_table (struct bfd_link_info *info,
-@@ -3160,8 +3160,8 @@ s3_bfd_score_elf_adjust_dynamic_symbol (
- /* This function is called after all the input files have been read,
-    and the input sections have been assigned to output sections.  */
- static bool
--s3_bfd_score_elf_always_size_sections (bfd *output_bfd,
--				       struct bfd_link_info *info)
-+s3_bfd_score_elf_early_size_sections (bfd *output_bfd,
-+				      struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s;
-@@ -3237,14 +3237,15 @@ s3_bfd_score_elf_always_size_sections (b
- 
- /* Set the sizes of the dynamic sections.  */
- static bool
--s3_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
-+s3_bfd_score_elf_late_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s;
-   bool reltext;
- 
-   dynobj = elf_hash_table (info)->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -3313,7 +3314,7 @@ s3_bfd_score_elf_size_dynamic_sections (
- 	}
-       else if (startswith (name, ".got"))
- 	{
--	  /* s3_bfd_score_elf_always_size_sections() has already done
-+	  /* s3_bfd_score_elf_early_size_sections() has already done
- 	     most of the work, but some symbols may have been mapped
- 	     to versions that we must now resolve in the got_entries
- 	     hash tables.  */
-@@ -4177,22 +4178,22 @@ _bfd_score_elf_adjust_dynamic_symbol (st
- }
- 
- static bool
--_bfd_score_elf_always_size_sections (bfd *output_bfd,
--				     struct bfd_link_info *info)
-+_bfd_score_elf_early_size_sections (bfd *output_bfd,
-+				    struct bfd_link_info *info)
- {
-   if (bfd_get_mach (output_bfd) == bfd_mach_score3)
--    return s3_bfd_score_elf_always_size_sections (output_bfd, info);
-+    return s3_bfd_score_elf_early_size_sections (output_bfd, info);
-   else
--    return s7_bfd_score_elf_always_size_sections (output_bfd, info);
-+    return s7_bfd_score_elf_early_size_sections (output_bfd, info);
- }
- 
- static bool
--_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
-+_bfd_score_elf_late_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   if (bfd_get_mach (output_bfd) == bfd_mach_score3)
--    return s3_bfd_score_elf_size_dynamic_sections (output_bfd, info);
-+    return s3_bfd_score_elf_late_size_sections (output_bfd, info);
-   else
--    return s7_bfd_score_elf_size_dynamic_sections (output_bfd, info);
-+    return s7_bfd_score_elf_late_size_sections (output_bfd, info);
- }
- 
- static bool
-@@ -4455,10 +4456,10 @@ _bfd_score_elf_common_definition (Elf_In
-   _bfd_score_elf_section_from_bfd_section
- #define elf_backend_adjust_dynamic_symbol \
-   _bfd_score_elf_adjust_dynamic_symbol
--#define elf_backend_always_size_sections \
--  _bfd_score_elf_always_size_sections
--#define elf_backend_size_dynamic_sections \
--  _bfd_score_elf_size_dynamic_sections
-+#define elf_backend_early_size_sections \
-+  _bfd_score_elf_early_size_sections
-+#define elf_backend_late_size_sections \
-+  _bfd_score_elf_late_size_sections
- #define elf_backend_omit_section_dynsym   _bfd_elf_omit_section_dynsym_all
- #define elf_backend_create_dynamic_sections \
-   _bfd_score_elf_create_dynamic_sections
---- a/bfd/elf32-score.h
-+++ b/bfd/elf32-score.h
-@@ -78,10 +78,10 @@ s7_bfd_score_elf_adjust_dynamic_symbol (
- 					struct elf_link_hash_entry *);
- 
- extern bool
--s7_bfd_score_elf_always_size_sections (bfd *, struct bfd_link_info *);
-+s7_bfd_score_elf_early_size_sections (bfd *, struct bfd_link_info *);
- 
- extern bool
--s7_bfd_score_elf_size_dynamic_sections (bfd *, struct bfd_link_info *);
-+s7_bfd_score_elf_late_size_sections (bfd *, struct bfd_link_info *);
- 
- extern bool
- s7_bfd_score_elf_create_dynamic_sections (bfd *, struct bfd_link_info *);
---- a/bfd/elf32-score7.c
-+++ b/bfd/elf32-score7.c
-@@ -975,7 +975,7 @@ score_elf_got_info (bfd *abfd, asection
-    appear towards the end.  This reduces the amount of GOT space
-    required.  MAX_LOCAL is used to set the number of local symbols
-    known to be in the dynamic symbol table.  During
--   s7_bfd_score_elf_size_dynamic_sections, this value is 1.  Afterward, the
-+   s7_bfd_score_elf_late_size_sections, this value is 1.  Afterward, the
-    section symbols are added and the count is higher.  */
- 
- static bool
-@@ -2969,8 +2969,8 @@ s7_bfd_score_elf_adjust_dynamic_symbol (
-    and the input sections have been assigned to output sections.  */
- 
- bool
--s7_bfd_score_elf_always_size_sections (bfd *output_bfd,
--				       struct bfd_link_info *info)
-+s7_bfd_score_elf_early_size_sections (bfd *output_bfd,
-+				      struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s;
-@@ -3047,14 +3047,15 @@ s7_bfd_score_elf_always_size_sections (b
- /* Set the sizes of the dynamic sections.  */
- 
- bool
--s7_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
-+s7_bfd_score_elf_late_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s;
-   bool reltext;
- 
-   dynobj = elf_hash_table (info)->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -3123,7 +3124,7 @@ s7_bfd_score_elf_size_dynamic_sections (
- 	}
-       else if (startswith (name, ".got"))
- 	{
--	  /* s7_bfd_score_elf_always_size_sections() has already done
-+	  /* s7_bfd_score_elf_early_size_sections() has already done
- 	     most of the work, but some symbols may have been mapped
- 	     to versions that we must now resolve in the got_entries
- 	     hash tables.  */
---- a/bfd/elf32-sh.c
-+++ b/bfd/elf32-sh.c
-@@ -2925,7 +2925,7 @@ allocate_dynrelocs (struct elf_link_hash
-    It's a convenient place to determine the PLT style.  */
- 
- static bool
--sh_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info)
-+sh_elf_early_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   sh_elf_hash_table (info)->plt_info = get_plt_info (output_bfd,
- 						     bfd_link_pic (info));
-@@ -2940,8 +2940,8 @@ sh_elf_always_size_sections (bfd *output
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--			      struct bfd_link_info *info)
-+sh_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			   struct bfd_link_info *info)
- {
-   struct elf_sh_link_hash_table *htab;
-   bfd *dynobj;
-@@ -2954,7 +2954,8 @@ sh_elf_size_dynamic_sections (bfd *outpu
-     return false;
- 
-   dynobj = htab->root.dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (htab->root.dynamic_sections_created)
-     {
-@@ -6598,10 +6599,8 @@ sh_elf_encode_eh_address (bfd *abfd,
- 					sh_elf_link_hash_table_create
- #define elf_backend_adjust_dynamic_symbol \
- 					sh_elf_adjust_dynamic_symbol
--#define elf_backend_always_size_sections \
--					sh_elf_always_size_sections
--#define elf_backend_size_dynamic_sections \
--					sh_elf_size_dynamic_sections
-+#define elf_backend_early_size_sections	sh_elf_early_size_sections
-+#define elf_backend_late_size_sections	sh_elf_late_size_sections
- #define elf_backend_omit_section_dynsym	sh_elf_omit_section_dynsym
- #define elf_backend_finish_dynamic_symbol \
- 					sh_elf_finish_dynamic_symbol
---- a/bfd/elf32-sparc.c
-+++ b/bfd/elf32-sparc.c
-@@ -248,8 +248,7 @@ elf32_sparc_reloc_type_class (const stru
- #define elf_backend_adjust_dynamic_symbol \
- 					_bfd_sparc_elf_adjust_dynamic_symbol
- #define elf_backend_omit_section_dynsym	_bfd_sparc_elf_omit_section_dynsym
--#define elf_backend_size_dynamic_sections \
--					_bfd_sparc_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections	_bfd_sparc_elf_late_size_sections
- #define elf_backend_relocate_section	_bfd_sparc_elf_relocate_section
- #define elf_backend_finish_dynamic_symbol \
- 					_bfd_sparc_elf_finish_dynamic_symbol
---- a/bfd/elf32-tic6x.c
-+++ b/bfd/elf32-tic6x.c
-@@ -3160,7 +3160,7 @@ elf32_tic6x_allocate_dynrelocs (struct e
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
-+elf32_tic6x_late_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   struct elf32_tic6x_link_hash_table *htab;
-   bfd *dynobj;
-@@ -3171,7 +3171,7 @@ elf32_tic6x_size_dynamic_sections (bfd *
-   htab = elf32_tic6x_hash_table (info);
-   dynobj = htab->elf.dynobj;
-   if (dynobj == NULL)
--    abort ();
-+    return true;
- 
-   if (htab->elf.dynamic_sections_created)
-     {
-@@ -3358,7 +3358,7 @@ elf32_tic6x_size_dynamic_sections (bfd *
-    and the input sections have been assigned to output sections.  */
- 
- static bool
--elf32_tic6x_always_size_sections (bfd *output_bfd, struct bfd_link_info *info)
-+elf32_tic6x_early_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   if (elf32_tic6x_using_dsbt (output_bfd) && !bfd_link_relocatable (info)
-       && !bfd_elf_stack_segment_size (output_bfd, info,
-@@ -4261,10 +4261,10 @@ elf32_tic6x_write_section (bfd *output_b
- #define elf_backend_relocs_compatible	_bfd_elf_relocs_compatible
- #define elf_backend_finish_dynamic_symbol \
-   elf32_tic6x_finish_dynamic_symbol
--#define elf_backend_always_size_sections \
--  elf32_tic6x_always_size_sections
--#define elf_backend_size_dynamic_sections \
--  elf32_tic6x_size_dynamic_sections
-+#define elf_backend_early_size_sections \
-+  elf32_tic6x_early_size_sections
-+#define elf_backend_late_size_sections \
-+  elf32_tic6x_late_size_sections
- #define elf_backend_finish_dynamic_sections \
-   elf32_tic6x_finish_dynamic_sections
- #define bfd_elf32_bfd_final_link \
---- a/bfd/elf32-tilegx.c
-+++ b/bfd/elf32-tilegx.c
-@@ -105,7 +105,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_I
- #define elf_backend_check_relocs	     tilegx_elf_check_relocs
- #define elf_backend_adjust_dynamic_symbol    tilegx_elf_adjust_dynamic_symbol
- #define elf_backend_omit_section_dynsym	     tilegx_elf_omit_section_dynsym
--#define elf_backend_size_dynamic_sections    tilegx_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections	     tilegx_elf_late_size_sections
- #define elf_backend_relocate_section	     tilegx_elf_relocate_section
- #define elf_backend_finish_dynamic_symbol    tilegx_elf_finish_dynamic_symbol
- #define elf_backend_finish_dynamic_sections  tilegx_elf_finish_dynamic_sections
---- a/bfd/elf32-tilepro.c
-+++ b/bfd/elf32-tilepro.c
-@@ -2182,11 +2182,9 @@ tilepro_elf_omit_section_dynsym (bfd *ou
- #define ELF32_DYNAMIC_INTERPRETER "/lib/ld.so.1"
- 
- static bool
--tilepro_elf_size_dynamic_sections (bfd *output_bfd,
--				      struct bfd_link_info *info)
-+tilepro_elf_late_size_sections (bfd *output_bfd,
-+				struct bfd_link_info *info)
- {
--  (void)output_bfd;
--
-   struct elf_link_hash_table *htab;
-   bfd *dynobj;
-   asection *s;
-@@ -2195,7 +2193,8 @@ tilepro_elf_size_dynamic_sections (bfd *
-   htab = tilepro_elf_hash_table (info);
-   BFD_ASSERT (htab != NULL);
-   dynobj = htab->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -3739,7 +3738,7 @@ tilepro_additional_program_headers (bfd
- #define elf_backend_check_relocs	     tilepro_elf_check_relocs
- #define elf_backend_adjust_dynamic_symbol    tilepro_elf_adjust_dynamic_symbol
- #define elf_backend_omit_section_dynsym	     tilepro_elf_omit_section_dynsym
--#define elf_backend_size_dynamic_sections    tilepro_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections	     tilepro_elf_late_size_sections
- #define elf_backend_relocate_section	     tilepro_elf_relocate_section
- #define elf_backend_finish_dynamic_symbol    tilepro_elf_finish_dynamic_symbol
- #define elf_backend_finish_dynamic_sections  tilepro_elf_finish_dynamic_sections
---- a/bfd/elf32-vax.c
-+++ b/bfd/elf32-vax.c
-@@ -36,7 +36,6 @@ static bool elf_vax_check_relocs (bfd *,
- 				  asection *, const Elf_Internal_Rela *);
- static bool elf_vax_adjust_dynamic_symbol (struct bfd_link_info *,
- 					   struct elf_link_hash_entry *);
--static bool elf_vax_size_dynamic_sections (bfd *, struct bfd_link_info *);
- static int elf_vax_relocate_section (bfd *, struct bfd_link_info *,
- 				     bfd *, asection *, bfd_byte *,
- 				     Elf_Internal_Rela *,
-@@ -985,8 +984,8 @@ elf_vax_discard_got_entries (struct elf_
- /* Discard unused dynamic data if this is a static link.  */
- 
- static bool
--elf_vax_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--			      struct bfd_link_info *info)
-+elf_vax_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			     struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s;
-@@ -1024,14 +1023,15 @@ elf_vax_always_size_sections (bfd *outpu
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
-+elf_vax_late_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s;
-   bool relocs;
- 
-   dynobj = elf_hash_table (info)->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -1861,10 +1861,8 @@ elf_vax_plt_sym_val (bfd_vma i, const as
- #define elf_backend_check_relocs	elf_vax_check_relocs
- #define elf_backend_adjust_dynamic_symbol \
- 					elf_vax_adjust_dynamic_symbol
--#define elf_backend_always_size_sections \
--					elf_vax_always_size_sections
--#define elf_backend_size_dynamic_sections \
--					elf_vax_size_dynamic_sections
-+#define elf_backend_early_size_sections	elf_vax_early_size_sections
-+#define elf_backend_late_size_sections	elf_vax_late_size_sections
- #define elf_backend_init_index_section	_bfd_elf_init_1_index_section
- #define elf_backend_relocate_section	elf_vax_relocate_section
- #define elf_backend_finish_dynamic_symbol \
---- a/bfd/elf32-xstormy16.c
-+++ b/bfd/elf32-xstormy16.c
-@@ -706,8 +706,8 @@ xstormy16_elf_relax_section (bfd *dynobj
- }
- 
- static bool
--xstormy16_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				    struct bfd_link_info *info)
-+xstormy16_elf_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+				   struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *splt;
-@@ -1013,8 +1013,8 @@ xstormy16_elf_gc_mark_hook (asection *se
- #define elf_backend_relocate_section		xstormy16_elf_relocate_section
- #define elf_backend_gc_mark_hook		xstormy16_elf_gc_mark_hook
- #define elf_backend_check_relocs		xstormy16_elf_check_relocs
--#define elf_backend_always_size_sections \
--  xstormy16_elf_always_size_sections
-+#define elf_backend_early_size_sections \
-+  xstormy16_elf_early_size_sections
- #define elf_backend_omit_section_dynsym \
-   _bfd_elf_omit_section_dynsym_all
- #define elf_backend_finish_dynamic_sections \
---- a/bfd/elf32-xtensa.c
-+++ b/bfd/elf32-xtensa.c
-@@ -1557,8 +1557,8 @@ elf_xtensa_allocate_local_got_size (stru
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				  struct bfd_link_info *info)
-+elf_xtensa_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			       struct bfd_link_info *info)
- {
-   struct elf_xtensa_link_hash_table *htab;
-   bfd *dynobj, *abfd;
-@@ -1575,7 +1575,7 @@ elf_xtensa_size_dynamic_sections (bfd *o
- 
-   dynobj = elf_hash_table (info)->dynobj;
-   if (dynobj == NULL)
--    abort ();
-+    return true;
-   srelgot = htab->elf.srelgot;
-   srelplt = htab->elf.srelplt;
- 
-@@ -1780,8 +1780,7 @@ elf_xtensa_size_dynamic_sections (bfd *o
- }
- 
- static bool
--elf_xtensa_always_size_sections (bfd *output_bfd,
--				 struct bfd_link_info *info)
-+elf_xtensa_early_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   struct elf_xtensa_link_hash_table *htab;
-   asection *tls_sec;
-@@ -11537,8 +11536,8 @@ static const struct bfd_elf_special_sect
- #define elf_backend_object_p		     elf_xtensa_object_p
- #define elf_backend_reloc_type_class	     elf_xtensa_reloc_type_class
- #define elf_backend_relocate_section	     elf_xtensa_relocate_section
--#define elf_backend_size_dynamic_sections    elf_xtensa_size_dynamic_sections
--#define elf_backend_always_size_sections     elf_xtensa_always_size_sections
-+#define elf_backend_late_size_sections	     elf_xtensa_late_size_sections
-+#define elf_backend_early_size_sections	     elf_xtensa_early_size_sections
- #define elf_backend_omit_section_dynsym      _bfd_elf_omit_section_dynsym_all
- #define elf_backend_special_sections	     elf_xtensa_special_sections
- #define elf_backend_action_discarded	     elf_xtensa_action_discarded
---- a/bfd/elf64-alpha.c
-+++ b/bfd/elf64-alpha.c
-@@ -2579,8 +2579,8 @@ elf64_alpha_size_plt_section (struct bfd
- }
- 
- static bool
--elf64_alpha_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				  struct bfd_link_info *info)
-+elf64_alpha_early_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+				 struct bfd_link_info *info)
- {
-   bfd *i;
-   struct alpha_elf_link_hash_table * htab;
-@@ -2806,8 +2806,8 @@ elf64_alpha_size_rela_got_section (struc
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				   struct bfd_link_info *info)
-+elf64_alpha_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+				struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s;
-@@ -2819,7 +2819,8 @@ elf64_alpha_size_dynamic_sections (bfd *
-     return false;
- 
-   dynobj = elf_hash_table(info)->dynobj;
--  BFD_ASSERT(dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -5465,10 +5466,10 @@ static const struct elf_size_info alpha_
-   elf64_alpha_merge_symbol_attribute
- #define elf_backend_copy_indirect_symbol \
-   elf64_alpha_copy_indirect_symbol
--#define elf_backend_always_size_sections \
--  elf64_alpha_always_size_sections
--#define elf_backend_size_dynamic_sections \
--  elf64_alpha_size_dynamic_sections
-+#define elf_backend_early_size_sections \
-+  elf64_alpha_early_size_sections
-+#define elf_backend_late_size_sections \
-+  elf64_alpha_late_size_sections
- #define elf_backend_omit_section_dynsym \
-   _bfd_elf_omit_section_dynsym_all
- #define elf_backend_relocate_section \
---- a/bfd/elf64-hppa.c
-+++ b/bfd/elf64-hppa.c
-@@ -176,9 +176,6 @@ static bool elf64_hppa_adjust_dynamic_sy
- static bool elf64_hppa_mark_milli_and_exported_functions
-   (struct elf_link_hash_entry *, void *);
- 
--static bool elf64_hppa_size_dynamic_sections
--  (bfd *, struct bfd_link_info *);
--
- static int elf64_hppa_link_output_symbol_hook
-   (struct bfd_link_info *, const char *, Elf_Internal_Sym *,
-    asection *, struct elf_link_hash_entry *);
-@@ -1520,7 +1517,7 @@ elf64_hppa_mark_milli_and_exported_funct
-    the contents of our special sections.  */
- 
- static bool
--elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
-+elf64_hppa_late_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   struct elf64_hppa_link_hash_table *hppa_info;
-   struct elf64_hppa_allocate_data data;
-@@ -1534,7 +1531,8 @@ elf64_hppa_size_dynamic_sections (bfd *o
-     return false;
- 
-   dynobj = hppa_info->root.dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   /* Mark each function this program exports so that we will allocate
-      space in the .opd section for each function's FPTR.  If we are
-@@ -3984,8 +3982,7 @@ const struct elf_size_info hppa64_elf_si
- #define elf_backend_adjust_dynamic_symbol \
- 					elf64_hppa_adjust_dynamic_symbol
- 
--#define elf_backend_size_dynamic_sections \
--					elf64_hppa_size_dynamic_sections
-+#define elf_backend_late_size_sections	elf64_hppa_late_size_sections
- 
- #define elf_backend_finish_dynamic_symbol \
- 					elf64_hppa_finish_dynamic_symbol
---- a/bfd/elf64-ia64-vms.c
-+++ b/bfd/elf64-ia64-vms.c
-@@ -2590,8 +2590,8 @@ elf64_ia64_adjust_dynamic_symbol (struct
- }
- 
- static bool
--elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				  struct bfd_link_info *info)
-+elf64_ia64_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			       struct bfd_link_info *info)
- {
-   struct elf64_ia64_allocate_data data;
-   struct elf64_ia64_link_hash_table *ia64_info;
-@@ -2600,11 +2600,12 @@ elf64_ia64_size_dynamic_sections (bfd *o
-   struct elf_link_hash_table *hash_table;
- 
-   hash_table = elf_hash_table (info);
--  dynobj = hash_table->dynobj;
-   ia64_info = elf64_ia64_hash_table (info);
-   if (ia64_info == NULL)
-     return false;
--  BFD_ASSERT(dynobj != NULL);
-+  dynobj = hash_table->dynobj;
-+  if (dynobj == NULL)
-+    return true;
-   data.info = info;
- 
-   /* Allocate the GOT entries.  */
-@@ -5484,8 +5485,8 @@ static const struct elf_size_info elf64_
- 	elf64_ia64_check_relocs
- #define elf_backend_adjust_dynamic_symbol \
- 	elf64_ia64_adjust_dynamic_symbol
--#define elf_backend_size_dynamic_sections \
--	elf64_ia64_size_dynamic_sections
-+#define elf_backend_late_size_sections \
-+	elf64_ia64_late_size_sections
- #define elf_backend_omit_section_dynsym \
- 	_bfd_elf_omit_section_dynsym_all
- #define elf_backend_relocate_section \
---- a/bfd/elf64-mips.c
-+++ b/bfd/elf64-mips.c
-@@ -4745,10 +4745,10 @@ const struct elf_size_info mips_elf64_si
- #define elf_backend_get_target_dtag	_bfd_mips_elf_get_target_dtag
- #define elf_backend_adjust_dynamic_symbol \
- 				_bfd_mips_elf_adjust_dynamic_symbol
--#define elf_backend_always_size_sections \
--				_bfd_mips_elf_always_size_sections
--#define elf_backend_size_dynamic_sections \
--				_bfd_mips_elf_size_dynamic_sections
-+#define elf_backend_early_size_sections \
-+				_bfd_mips_elf_early_size_sections
-+#define elf_backend_late_size_sections \
-+				_bfd_mips_elf_late_size_sections
- #define elf_backend_init_index_section	_bfd_elf_init_1_index_section
- #define elf_backend_relocate_section    _bfd_mips_elf_relocate_section
- #define elf_backend_finish_dynamic_symbol \
---- a/bfd/elf64-ppc.c
-+++ b/bfd/elf64-ppc.c
-@@ -118,8 +118,8 @@ static bfd_vma opd_entry_value
- #define elf_backend_adjust_dynamic_symbol     ppc64_elf_adjust_dynamic_symbol
- #define elf_backend_hide_symbol		      ppc64_elf_hide_symbol
- #define elf_backend_maybe_function_sym	      ppc64_elf_maybe_function_sym
--#define elf_backend_always_size_sections      ppc64_elf_edit
--#define elf_backend_size_dynamic_sections     ppc64_elf_size_dynamic_sections
-+#define elf_backend_early_size_sections	      ppc64_elf_edit
-+#define elf_backend_late_size_sections	      ppc64_elf_late_size_sections
- #define elf_backend_hash_symbol		      ppc64_elf_hash_symbol
- #define elf_backend_init_index_section	      _bfd_elf_init_2_index_sections
- #define elf_backend_action_discarded	      ppc64_elf_action_discarded
-@@ -10118,7 +10118,7 @@ allocate_dynrelocs (struct elf_link_hash
-   ((((v) & 0x3ffff0000ULL) << 16) | (v & 0xffff))
- #define HA34(v) ((v + (1ULL << 33)) >> 34)
- 
--/* Called via elf_link_hash_traverse from ppc64_elf_size_dynamic_sections
-+/* Called via elf_link_hash_traverse from ppc64_elf_late_size_sections
-    to set up space for global entry stubs.  These are put in glink,
-    after the branch table.  */
- 
-@@ -10195,8 +10195,8 @@ size_global_entry_stubs (struct elf_link
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--ppc64_elf_size_dynamic_sections (bfd *output_bfd,
--				 struct bfd_link_info *info)
-+ppc64_elf_late_size_sections (bfd *output_bfd,
-+			      struct bfd_link_info *info)
- {
-   struct ppc_link_hash_table *htab;
-   bfd *dynobj;
-@@ -10211,7 +10211,7 @@ ppc64_elf_size_dynamic_sections (bfd *ou
- 
-   dynobj = htab->elf.dynobj;
-   if (dynobj == NULL)
--    abort ();
-+    return true;
- 
-   if (htab->elf.dynamic_sections_created)
-     {
---- a/bfd/elf64-s390.c
-+++ b/bfd/elf64-s390.c
-@@ -1301,7 +1301,7 @@ elf_s390_gc_mark_hook (asection *sec,
-    entry but we found we will not create any.  Called when we find we will
-    not have any PLT for this symbol, by for example
-    elf_s390_adjust_dynamic_symbol when we're doing a proper dynamic link,
--   or elf_s390_size_dynamic_sections if no dynamic sections will be
-+   or elf_s390_late_size_sections if no dynamic sections will be
-    created (we're only linking static objects).  */
- 
- static void
-@@ -1714,8 +1714,8 @@ allocate_dynrelocs (struct elf_link_hash
- /* Set the sizes of the dynamic sections.  */
- 
- static bool
--elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				struct bfd_link_info *info)
-+elf_s390_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			     struct bfd_link_info *info)
- {
-   struct elf_s390_link_hash_table *htab;
-   bfd *dynobj;
-@@ -1729,7 +1729,7 @@ elf_s390_size_dynamic_sections (bfd *out
- 
-   dynobj = htab->elf.dynobj;
-   if (dynobj == NULL)
--    abort ();
-+    return true;
- 
-   if (htab->elf.dynamic_sections_created)
-     {
-@@ -3912,7 +3912,7 @@ const struct elf_size_info s390_elf64_si
- #define elf_backend_gc_mark_hook	      elf_s390_gc_mark_hook
- #define elf_backend_reloc_type_class	      elf_s390_reloc_type_class
- #define elf_backend_relocate_section	      elf_s390_relocate_section
--#define elf_backend_size_dynamic_sections     elf_s390_size_dynamic_sections
-+#define elf_backend_late_size_sections	      elf_s390_late_size_sections
- #define elf_backend_init_index_section	      _bfd_elf_init_1_index_section
- #define elf_backend_grok_prstatus	      elf_s390_grok_prstatus
- #define elf_backend_grok_psinfo		      elf_s390_grok_psinfo
---- a/bfd/elf64-sparc.c
-+++ b/bfd/elf64-sparc.c
-@@ -953,8 +953,8 @@ const struct elf_size_info elf64_sparc_s
-   _bfd_sparc_elf_adjust_dynamic_symbol
- #define elf_backend_omit_section_dynsym \
-   _bfd_sparc_elf_omit_section_dynsym
--#define elf_backend_size_dynamic_sections \
--  _bfd_sparc_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections \
-+  _bfd_sparc_elf_late_size_sections
- #define elf_backend_relocate_section \
-   _bfd_sparc_elf_relocate_section
- #define elf_backend_finish_dynamic_symbol \
---- a/bfd/elf64-tilegx.c
-+++ b/bfd/elf64-tilegx.c
-@@ -106,7 +106,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_I
- #define elf_backend_check_relocs	     tilegx_elf_check_relocs
- #define elf_backend_adjust_dynamic_symbol    tilegx_elf_adjust_dynamic_symbol
- #define elf_backend_omit_section_dynsym	     tilegx_elf_omit_section_dynsym
--#define elf_backend_size_dynamic_sections    tilegx_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections	     tilegx_elf_late_size_sections
- #define elf_backend_relocate_section	     tilegx_elf_relocate_section
- #define elf_backend_finish_dynamic_symbol    tilegx_elf_finish_dynamic_symbol
- #define elf_backend_finish_dynamic_sections  tilegx_elf_finish_dynamic_sections
---- a/bfd/elf64-x86-64.c
-+++ b/bfd/elf64-x86-64.c
-@@ -2456,8 +2456,7 @@ elf_x86_64_scan_relocs (bfd *abfd, struc
- }
- 
- static bool
--elf_x86_64_always_size_sections (bfd *output_bfd,
--				 struct bfd_link_info *info)
-+elf_x86_64_early_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   bfd *abfd;
- 
-@@ -2470,7 +2469,7 @@ elf_x86_64_always_size_sections (bfd *ou
- 					     elf_x86_64_scan_relocs))
-       return false;
- 
--  return _bfd_x86_elf_always_size_sections (output_bfd, info);
-+  return _bfd_x86_elf_early_size_sections (output_bfd, info);
- }
- 
- /* Return the relocation value for @tpoff relocation
-@@ -5384,7 +5383,7 @@ elf_x86_64_special_sections[]=
-   elf_x86_64_reloc_name_lookup
- 
- #define elf_backend_relocs_compatible	    elf_x86_64_relocs_compatible
--#define elf_backend_always_size_sections    elf_x86_64_always_size_sections
-+#define elf_backend_early_size_sections	    elf_x86_64_early_size_sections
- #define elf_backend_create_dynamic_sections _bfd_elf_create_dynamic_sections
- #define elf_backend_finish_dynamic_sections elf_x86_64_finish_dynamic_sections
- #define elf_backend_finish_dynamic_symbol   elf_x86_64_finish_dynamic_symbol
---- a/bfd/elflink.c
-+++ b/bfd/elflink.c
-@@ -6619,8 +6619,8 @@ bfd_elf_size_dynamic_sections (bfd *outp
- 
-   /* The backend may have to create some sections regardless of whether
-      we're dynamic or not.  */
--  if (bed->elf_backend_always_size_sections
--      && ! (*bed->elf_backend_always_size_sections) (output_bfd, info))
-+  if (bed->elf_backend_early_size_sections
-+      && !bed->elf_backend_early_size_sections (output_bfd, info))
-     return false;
- 
-   dynobj = elf_hash_table (info)->dynobj;
-@@ -7400,9 +7400,8 @@ NOTE: This behaviour is deprecated and w
- 
-   /* The backend must work out the sizes of all the other dynamic
-      sections.  */
--  if (dynobj != NULL
--      && bed->elf_backend_size_dynamic_sections != NULL
--      && ! (*bed->elf_backend_size_dynamic_sections) (output_bfd, info))
-+  if (bed->elf_backend_late_size_sections != NULL
-+      && !bed->elf_backend_late_size_sections (output_bfd, info))
-     return false;
- 
-   if (dynobj != NULL && elf_hash_table (info)->dynamic_sections_created)
---- a/bfd/elfn32-mips.c
-+++ b/bfd/elfn32-mips.c
-@@ -4131,10 +4131,8 @@ static const struct ecoff_debug_swap mip
- #define elf_backend_get_target_dtag	_bfd_mips_elf_get_target_dtag
- #define elf_backend_adjust_dynamic_symbol \
- 					_bfd_mips_elf_adjust_dynamic_symbol
--#define elf_backend_always_size_sections \
--					_bfd_mips_elf_always_size_sections
--#define elf_backend_size_dynamic_sections \
--					_bfd_mips_elf_size_dynamic_sections
-+#define elf_backend_early_size_sections	_bfd_mips_elf_early_size_sections
-+#define elf_backend_late_size_sections	_bfd_mips_elf_late_size_sections
- #define elf_backend_init_index_section	_bfd_elf_init_1_index_section
- #define elf_backend_relocate_section	_bfd_mips_elf_relocate_section
- #define elf_backend_finish_dynamic_symbol \
---- a/bfd/elfnn-aarch64.c
-+++ b/bfd/elfnn-aarch64.c
-@@ -112,7 +112,7 @@
-   allocate space for one relocation on the slot. Record the GOT offset
-   for this symbol.
- 
--  elfNN_aarch64_size_dynamic_sections ()
-+  elfNN_aarch64_late_size_sections ()
- 
-   Iterate all input BFDS, look for in the local symbol data structure
-   constructed earlier for local TLS symbols and allocate them double
-@@ -8976,8 +8976,8 @@ elfNN_aarch64_allocate_local_ifunc_dynre
-    though !  */
- 
- static bool
--elfNN_aarch64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				     struct bfd_link_info *info)
-+elfNN_aarch64_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+				  struct bfd_link_info *info)
- {
-   struct elf_aarch64_link_hash_table *htab;
-   bfd *dynobj;
-@@ -8988,7 +8988,8 @@ elfNN_aarch64_size_dynamic_sections (bfd
-   htab = elf_aarch64_hash_table ((info));
-   dynobj = htab->root.dynobj;
- 
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (htab->root.dynamic_sections_created)
-     {
-@@ -9390,8 +9391,8 @@ elfNN_aarch64_create_small_pltn_entry (s
-    _TLS_MODULE_BASE_, if needed.  */
- 
- static bool
--elfNN_aarch64_always_size_sections (bfd *output_bfd,
--				    struct bfd_link_info *info)
-+elfNN_aarch64_early_size_sections (bfd *output_bfd,
-+				   struct bfd_link_info *info)
- {
-   asection *tls_sec;
- 
-@@ -10126,8 +10127,8 @@ const struct elf_size_info elfNN_aarch64
- #define elf_backend_adjust_dynamic_symbol	\
-   elfNN_aarch64_adjust_dynamic_symbol
- 
--#define elf_backend_always_size_sections	\
--  elfNN_aarch64_always_size_sections
-+#define elf_backend_early_size_sections		\
-+  elfNN_aarch64_early_size_sections
- 
- #define elf_backend_check_relocs		\
-   elfNN_aarch64_check_relocs
-@@ -10182,8 +10183,8 @@ const struct elf_size_info elfNN_aarch64
- #define elf_backend_modify_headers		\
-   elfNN_aarch64_modify_headers
- 
--#define elf_backend_size_dynamic_sections	\
--  elfNN_aarch64_size_dynamic_sections
-+#define elf_backend_late_size_sections		\
-+  elfNN_aarch64_late_size_sections
- 
- #define elf_backend_size_info			\
-   elfNN_aarch64_size_info
---- a/bfd/elfnn-ia64.c
-+++ b/bfd/elfnn-ia64.c
-@@ -2986,8 +2986,8 @@ elfNN_ia64_adjust_dynamic_symbol (struct
- }
- 
- static bool
--elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				  struct bfd_link_info *info)
-+elfNN_ia64_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			       struct bfd_link_info *info)
- {
-   struct elfNN_ia64_allocate_data data;
-   struct elfNN_ia64_link_hash_table *ia64_info;
-@@ -2998,8 +2998,9 @@ elfNN_ia64_size_dynamic_sections (bfd *o
-   if (ia64_info == NULL)
-     return false;
-   dynobj = ia64_info->root.dynobj;
-+  if (dynobj == NULL)
-+    return true;
-   ia64_info->self_dtpmod_offset = (bfd_vma) -1;
--  BFD_ASSERT(dynobj != NULL);
-   data.info = info;
- 
-   /* Set the contents of the .interp section to the interpreter.  */
-@@ -5035,8 +5036,8 @@ ignore_errors (const char *fmt ATTRIBUTE
- 	elfNN_ia64_check_relocs
- #define elf_backend_adjust_dynamic_symbol \
- 	elfNN_ia64_adjust_dynamic_symbol
--#define elf_backend_size_dynamic_sections \
--	elfNN_ia64_size_dynamic_sections
-+#define elf_backend_late_size_sections \
-+	elfNN_ia64_late_size_sections
- #define elf_backend_omit_section_dynsym \
- 	_bfd_elf_omit_section_dynsym_all
- #define elf_backend_relocate_section \
---- a/bfd/elfnn-loongarch.c
-+++ b/bfd/elfnn-loongarch.c
-@@ -1574,8 +1574,8 @@ maybe_set_textrel (struct elf_link_hash_
- }
- 
- static bool
--loongarch_elf_size_dynamic_sections (bfd *output_bfd,
--				     struct bfd_link_info *info)
-+loongarch_elf_late_size_sections (bfd *output_bfd,
-+				  struct bfd_link_info *info)
- {
-   struct loongarch_elf_link_hash_table *htab;
-   bfd *dynobj;
-@@ -1585,7 +1585,8 @@ loongarch_elf_size_dynamic_sections (bfd
-   htab = loongarch_elf_hash_table (info);
-   BFD_ASSERT (htab != NULL);
-   dynobj = htab->elf.dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (htab->elf.dynamic_sections_created)
-     {
-@@ -4140,7 +4141,7 @@ elf_loongarch64_hash_symbol (struct elf_
-   loongarch_elf_create_dynamic_sections
- #define elf_backend_check_relocs loongarch_elf_check_relocs
- #define elf_backend_adjust_dynamic_symbol loongarch_elf_adjust_dynamic_symbol
--#define elf_backend_size_dynamic_sections loongarch_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections loongarch_elf_late_size_sections
- #define elf_backend_relocate_section loongarch_elf_relocate_section
- #define elf_backend_finish_dynamic_symbol loongarch_elf_finish_dynamic_symbol
- #define elf_backend_finish_dynamic_sections				   \
---- a/bfd/elfnn-riscv.c
-+++ b/bfd/elfnn-riscv.c
-@@ -1348,7 +1348,7 @@ allocate_local_ifunc_dynrelocs (void **s
- }
- 
- static bool
--riscv_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
-+riscv_elf_late_size_sections (bfd *output_bfd, struct bfd_link_info *info)
- {
-   struct riscv_elf_link_hash_table *htab;
-   bfd *dynobj;
-@@ -1358,7 +1358,8 @@ riscv_elf_size_dynamic_sections (bfd *ou
-   htab = riscv_elf_hash_table (info);
-   BFD_ASSERT (htab != NULL);
-   dynobj = htab->elf.dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -5341,7 +5342,7 @@ riscv_elf_merge_symbol_attribute (struct
- #define elf_backend_create_dynamic_sections	riscv_elf_create_dynamic_sections
- #define elf_backend_check_relocs		riscv_elf_check_relocs
- #define elf_backend_adjust_dynamic_symbol	riscv_elf_adjust_dynamic_symbol
--#define elf_backend_size_dynamic_sections	riscv_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections		riscv_elf_late_size_sections
- #define elf_backend_relocate_section		riscv_elf_relocate_section
- #define elf_backend_finish_dynamic_symbol	riscv_elf_finish_dynamic_symbol
- #define elf_backend_finish_dynamic_sections	riscv_elf_finish_dynamic_sections
---- a/bfd/elfxx-mips.c
-+++ b/bfd/elfxx-mips.c
-@@ -9619,8 +9619,8 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
-    check for any mips16 stub sections that we can discard.  */
- 
- bool
--_bfd_mips_elf_always_size_sections (bfd *output_bfd,
--				    struct bfd_link_info *info)
-+_bfd_mips_elf_early_size_sections (bfd *output_bfd,
-+				   struct bfd_link_info *info)
- {
-   asection *sect;
-   struct mips_elf_link_hash_table *htab;
-@@ -9963,8 +9963,8 @@ mips_elf_set_plt_sym_value (struct mips_
- /* Set the sizes of the dynamic sections.  */
- 
- bool
--_bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
--				     struct bfd_link_info *info)
-+_bfd_mips_elf_late_size_sections (bfd *output_bfd,
-+				  struct bfd_link_info *info)
- {
-   bfd *dynobj;
-   asection *s, *sreldyn;
-@@ -9974,7 +9974,8 @@ _bfd_mips_elf_size_dynamic_sections (bfd
-   htab = mips_elf_hash_table (info);
-   BFD_ASSERT (htab != NULL);
-   dynobj = elf_hash_table (info)->dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
-@@ -14899,7 +14900,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
- 	      input_section->flags &= ~SEC_HAS_CONTENTS;
- 	    }
- 
--	  /* Size has been set in _bfd_mips_elf_always_size_sections.  */
-+	  /* Size has been set in _bfd_mips_elf_early_size_sections.  */
- 	  BFD_ASSERT(o->size == sizeof (Elf_External_ABIFlags_v0));
- 
- 	  /* Skip this section later on (I don't think this currently
-@@ -14958,7 +14959,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
- 	      input_section->flags &= ~SEC_HAS_CONTENTS;
- 	    }
- 
--	  /* Size has been set in _bfd_mips_elf_always_size_sections.  */
-+	  /* Size has been set in _bfd_mips_elf_early_size_sections.  */
- 	  BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo));
- 
- 	  /* Skip this section later on (I don't think this currently
---- a/bfd/elfxx-mips.h
-+++ b/bfd/elfxx-mips.h
-@@ -61,9 +61,9 @@ extern bool _bfd_mips_elf_check_relocs
-   (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
- extern bool _bfd_mips_elf_adjust_dynamic_symbol
-   (struct bfd_link_info *, struct elf_link_hash_entry *);
--extern bool _bfd_mips_elf_always_size_sections
-+extern bool _bfd_mips_elf_early_size_sections
-   (bfd *, struct bfd_link_info *);
--extern bool _bfd_mips_elf_size_dynamic_sections
-+extern bool _bfd_mips_elf_late_size_sections
-   (bfd *, struct bfd_link_info *);
- extern int _bfd_mips_elf_relocate_section
-   (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
---- a/bfd/elfxx-sparc.c
-+++ b/bfd/elfxx-sparc.c
-@@ -2381,8 +2381,8 @@ _bfd_sparc_elf_omit_section_dynsym (bfd
- /* Set the sizes of the dynamic sections.  */
- 
- bool
--_bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd,
--				      struct bfd_link_info *info)
-+_bfd_sparc_elf_late_size_sections (bfd *output_bfd,
-+				   struct bfd_link_info *info)
- {
-   struct _bfd_sparc_elf_link_hash_table *htab;
-   bfd *dynobj;
-@@ -2392,7 +2392,8 @@ _bfd_sparc_elf_size_dynamic_sections (bf
-   htab = _bfd_sparc_elf_hash_table (info);
-   BFD_ASSERT (htab != NULL);
-   dynobj = htab->elf.dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
---- a/bfd/elfxx-sparc.h
-+++ b/bfd/elfxx-sparc.h
-@@ -117,7 +117,7 @@ extern bool _bfd_sparc_elf_adjust_dynami
-   (struct bfd_link_info *, struct elf_link_hash_entry *);
- extern bool _bfd_sparc_elf_omit_section_dynsym
-   (bfd *, struct bfd_link_info *, asection *);
--extern bool _bfd_sparc_elf_size_dynamic_sections
-+extern bool _bfd_sparc_elf_late_size_sections
-   (bfd *, struct bfd_link_info *);
- extern bool _bfd_sparc_elf_new_section_hook
-   (bfd *, asection *);
---- a/bfd/elfxx-target.h
-+++ b/bfd/elfxx-target.h
-@@ -487,11 +487,11 @@
- #ifndef elf_backend_adjust_dynamic_symbol
- #define elf_backend_adjust_dynamic_symbol 0
- #endif
--#ifndef elf_backend_always_size_sections
--#define elf_backend_always_size_sections 0
-+#ifndef elf_backend_early_size_sections
-+#define elf_backend_early_size_sections 0
- #endif
--#ifndef elf_backend_size_dynamic_sections
--#define elf_backend_size_dynamic_sections 0
-+#ifndef elf_backend_late_size_sections
-+#define elf_backend_late_size_sections 0
- #endif
- #ifndef elf_backend_strip_zero_sized_dynamic_sections
- #define elf_backend_strip_zero_sized_dynamic_sections 0
-@@ -849,8 +849,8 @@ static const struct elf_backend_data elf
-   elf_backend_check_directives,
-   elf_backend_notice_as_needed,
-   elf_backend_adjust_dynamic_symbol,
--  elf_backend_always_size_sections,
--  elf_backend_size_dynamic_sections,
-+  elf_backend_early_size_sections,
-+  elf_backend_late_size_sections,
-   elf_backend_strip_zero_sized_dynamic_sections,
-   elf_backend_init_index_section,
-   elf_backend_relocate_section,
---- a/bfd/elfxx-tilegx.c
-+++ b/bfd/elfxx-tilegx.c
-@@ -2430,8 +2430,8 @@ tilegx_elf_omit_section_dynsym (bfd *out
- }
- 
- bool
--tilegx_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
--				  struct bfd_link_info *info)
-+tilegx_elf_late_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
-+			       struct bfd_link_info *info)
- {
-   struct tilegx_elf_link_hash_table *htab;
-   bfd *dynobj;
-@@ -2441,7 +2441,8 @@ tilegx_elf_size_dynamic_sections (bfd *o
-   htab = tilegx_elf_hash_table (info);
-   BFD_ASSERT (htab != NULL);
-   dynobj = htab->elf.dynobj;
--  BFD_ASSERT (dynobj != NULL);
-+  if (dynobj == NULL)
-+    return true;
- 
-   if (elf_hash_table (info)->dynamic_sections_created)
-     {
---- a/bfd/elfxx-tilegx.h
-+++ b/bfd/elfxx-tilegx.h
-@@ -57,7 +57,7 @@ tilegx_elf_omit_section_dynsym (bfd *,
- 				asection *);
- 
- extern bool
--tilegx_elf_size_dynamic_sections (bfd *, struct bfd_link_info *);
-+tilegx_elf_late_size_sections (bfd *, struct bfd_link_info *);
- 
- extern int
- tilegx_elf_relocate_section (bfd *, struct bfd_link_info *,
---- a/bfd/elfxx-x86.c
-+++ b/bfd/elfxx-x86.c
-@@ -2225,7 +2225,7 @@ _bfd_elf_x86_valid_reloc_p (asection *in
- /* Set the sizes of the dynamic sections.  */
- 
- bool
--_bfd_x86_elf_size_dynamic_sections (bfd *output_bfd,
-+_bfd_x86_elf_late_size_sections (bfd *output_bfd,
- 				    struct bfd_link_info *info)
- {
-   struct elf_x86_link_hash_table *htab;
-@@ -2241,7 +2241,7 @@ _bfd_x86_elf_size_dynamic_sections (bfd
-     return false;
-   dynobj = htab->elf.dynobj;
-   if (dynobj == NULL)
--    abort ();
-+    return true;
- 
-   /* Set up .got offsets for local syms, and space for local dynamic
-      relocs.  */
-@@ -2948,8 +2948,8 @@ _bfd_x86_elf_finish_dynamic_sections (bf
- 
- 
- bool
--_bfd_x86_elf_always_size_sections (bfd *output_bfd,
--				   struct bfd_link_info *info)
-+_bfd_x86_elf_early_size_sections (bfd *output_bfd,
-+				  struct bfd_link_info *info)
- {
-   asection *tls_sec = elf_hash_table (info)->tls_sec;
- 
---- a/bfd/elfxx-x86.h
-+++ b/bfd/elfxx-x86.h
-@@ -854,13 +854,13 @@ extern bool _bfd_elf_x86_valid_reloc_p
-    const Elf_Internal_Rela *, struct elf_link_hash_entry *,
-    Elf_Internal_Sym *, Elf_Internal_Shdr *, bool *);
- 
--extern bool _bfd_x86_elf_size_dynamic_sections
-+extern bool _bfd_x86_elf_late_size_sections
-   (bfd *, struct bfd_link_info *);
- 
- extern struct elf_x86_link_hash_table *_bfd_x86_elf_finish_dynamic_sections
-   (bfd *, struct bfd_link_info *);
- 
--extern bool _bfd_x86_elf_always_size_sections
-+extern bool _bfd_x86_elf_early_size_sections
-   (bfd *, struct bfd_link_info *);
- 
- extern void _bfd_x86_elf_merge_symbol_attribute
-@@ -932,8 +932,8 @@ extern void _bfd_x86_elf_link_report_rel
- 
- #define elf_backend_check_relocs \
-   _bfd_x86_elf_check_relocs
--#define elf_backend_size_dynamic_sections \
--  _bfd_x86_elf_size_dynamic_sections
-+#define elf_backend_late_size_sections \
-+  _bfd_x86_elf_late_size_sections
- #define elf_backend_merge_symbol_attribute \
-   _bfd_x86_elf_merge_symbol_attribute
- #define elf_backend_copy_indirect_symbol \
---- a/ld/emultempl/vms.em
-+++ b/ld/emultempl/vms.em
-@@ -196,10 +196,9 @@ gld${EMULATION_NAME}_before_allocation (
- 
-   /* The backend must work out the sizes of all the other dynamic
-      sections.  */
--  if (elf_hash_table (&link_info)->dynamic_sections_created
--      && bed->elf_backend_size_dynamic_sections
--      && ! (*bed->elf_backend_size_dynamic_sections) (link_info.output_bfd,
--						      &link_info))
-+  if (bed->elf_backend_late_size_sections
-+      && !bed->elf_backend_late_size_sections (link_info.output_bfd,
-+					       &link_info))
-     einfo (_("%F%P: failed to set dynamic section sizes: %E\n"));
- 
-   before_allocation_default ();
diff --git a/toolchain/binutils/patches/2.40/002-PR-30569-delete-_bfd_mips_elf_early_size_sections.patch b/toolchain/binutils/patches/2.40/002-PR-30569-delete-_bfd_mips_elf_early_size_sections.patch
deleted file mode 100644
index 8e5f1b76c6..0000000000
--- a/toolchain/binutils/patches/2.40/002-PR-30569-delete-_bfd_mips_elf_early_size_sections.patch
+++ /dev/null
@@ -1,218 +0,0 @@
-From 3c6c32951e292a51ede70b8087bb0308d7dbc4fc Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra at gmail.com>
-Date: Thu, 28 Mar 2024 20:33:32 +1030
-Subject: [PATCH 2/2] PR 30569, delete _bfd_mips_elf_early_size_sections
-
-PR30569 was triggered by a patch of mine 6540edd52cc0 moving the call
-to always_size_sections in bfd_elf_size_dynamic_sections earlier, made
-to support the x86 DT_RELR implementation.  This broke mips16 code
-handling stubs when --export-dynamic is passed to the linker, because
-numerous symbols then became dynamic after always_size_sections.  The
-mips backend fiddles with symbols in its always_size_sections.  Maciej
-in 902e9fc76a0e had moved the call to always_size_sections to after
-the export-dynamic code.  Prior to that, Nathan in 04c3a75556c0 moved
-it before the exec stack code, back to the start of
-bfd_elf_size_dynamic_sections which was where Ian put it originally
-in ff12f303355b.  So the call has moved around a little.  I'm leaving
-it where it is, and instead calling mips_elf_check_symbols from
-late_size_sections (the old size_dynamic_sections) which is now always
-called.  In fact, the whole of _bfd_mips_elf_early_size_sections can
-be merged into _bfd_mips_elf_late_size_sections.
----
- bfd/elf32-mips.c  |  1 -
- bfd/elf64-mips.c  |  2 --
- bfd/elfn32-mips.c |  1 -
- bfd/elfxx-mips.c  | 84 +++++++++++++++++++----------------------------
- bfd/elfxx-mips.h  |  2 --
- 5 files changed, 34 insertions(+), 56 deletions(-)
-
---- a/bfd/elf32-mips.c
-+++ b/bfd/elf32-mips.c
-@@ -2534,7 +2534,6 @@ static const struct ecoff_debug_swap mip
- #define elf_backend_get_target_dtag	_bfd_mips_elf_get_target_dtag
- #define elf_backend_adjust_dynamic_symbol \
- 					_bfd_mips_elf_adjust_dynamic_symbol
--#define elf_backend_early_size_sections	_bfd_mips_elf_early_size_sections
- #define elf_backend_late_size_sections	_bfd_mips_elf_late_size_sections
- #define elf_backend_init_index_section	_bfd_elf_init_1_index_section
- #define elf_backend_relocate_section	_bfd_mips_elf_relocate_section
---- a/bfd/elf64-mips.c
-+++ b/bfd/elf64-mips.c
-@@ -4745,8 +4745,6 @@ const struct elf_size_info mips_elf64_si
- #define elf_backend_get_target_dtag	_bfd_mips_elf_get_target_dtag
- #define elf_backend_adjust_dynamic_symbol \
- 				_bfd_mips_elf_adjust_dynamic_symbol
--#define elf_backend_early_size_sections \
--				_bfd_mips_elf_early_size_sections
- #define elf_backend_late_size_sections \
- 				_bfd_mips_elf_late_size_sections
- #define elf_backend_init_index_section	_bfd_elf_init_1_index_section
---- a/bfd/elfn32-mips.c
-+++ b/bfd/elfn32-mips.c
-@@ -4131,7 +4131,6 @@ static const struct ecoff_debug_swap mip
- #define elf_backend_get_target_dtag	_bfd_mips_elf_get_target_dtag
- #define elf_backend_adjust_dynamic_symbol \
- 					_bfd_mips_elf_adjust_dynamic_symbol
--#define elf_backend_early_size_sections	_bfd_mips_elf_early_size_sections
- #define elf_backend_late_size_sections	_bfd_mips_elf_late_size_sections
- #define elf_backend_init_index_section	_bfd_elf_init_1_index_section
- #define elf_backend_relocate_section	_bfd_mips_elf_relocate_section
---- a/bfd/elfxx-mips.c
-+++ b/bfd/elfxx-mips.c
-@@ -9614,48 +9614,6 @@ _bfd_mips_elf_adjust_dynamic_symbol (str
-   return _bfd_elf_adjust_dynamic_copy (info, h, s);
- }
- 

--/* This function is called after all the input files have been read,
--   and the input sections have been assigned to output sections.  We
--   check for any mips16 stub sections that we can discard.  */
--
--bool
--_bfd_mips_elf_early_size_sections (bfd *output_bfd,
--				   struct bfd_link_info *info)
--{
--  asection *sect;
--  struct mips_elf_link_hash_table *htab;
--  struct mips_htab_traverse_info hti;
--
--  htab = mips_elf_hash_table (info);
--  BFD_ASSERT (htab != NULL);
--
--  /* The .reginfo section has a fixed size.  */
--  sect = bfd_get_section_by_name (output_bfd, ".reginfo");
--  if (sect != NULL)
--    {
--      bfd_set_section_size (sect, sizeof (Elf32_External_RegInfo));
--      sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
--    }
--
--  /* The .MIPS.abiflags section has a fixed size.  */
--  sect = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
--  if (sect != NULL)
--    {
--      bfd_set_section_size (sect, sizeof (Elf_External_ABIFlags_v0));
--      sect->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
--    }
--
--  hti.info = info;
--  hti.output_bfd = output_bfd;
--  hti.error = false;
--  mips_elf_link_hash_traverse (mips_elf_hash_table (info),
--			       mips_elf_check_symbols, &hti);
--  if (hti.error)
--    return false;
--
--  return true;
--}
--
- /* If the link uses a GOT, lay it out and work out its size.  */
- 
- static bool
-@@ -9960,7 +9918,8 @@ mips_elf_set_plt_sym_value (struct mips_
-   return true;
- }
- 
--/* Set the sizes of the dynamic sections.  */
-+/* Set the sizes of the dynamic sections, some mips non-dynamic sections,
-+   and check for any mips16 stub sections that we can discard.  */
- 
- bool
- _bfd_mips_elf_late_size_sections (bfd *output_bfd,
-@@ -9970,14 +9929,39 @@ _bfd_mips_elf_late_size_sections (bfd *o
-   asection *s, *sreldyn;
-   bool reltext;
-   struct mips_elf_link_hash_table *htab;
-+  struct mips_htab_traverse_info hti;
- 
-   htab = mips_elf_hash_table (info);
-   BFD_ASSERT (htab != NULL);
--  dynobj = elf_hash_table (info)->dynobj;
-+
-+  /* The .reginfo section has a fixed size.  */
-+  s = bfd_get_section_by_name (output_bfd, ".reginfo");
-+  if (s != NULL)
-+    {
-+      bfd_set_section_size (s, sizeof (Elf32_External_RegInfo));
-+      s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
-+    }
-+
-+  /* The .MIPS.abiflags section has a fixed size.  */
-+  s = bfd_get_section_by_name (output_bfd, ".MIPS.abiflags");
-+  if (s != NULL)
-+    {
-+      bfd_set_section_size (s, sizeof (Elf_External_ABIFlags_v0));
-+      s->flags |= SEC_FIXED_SIZE | SEC_HAS_CONTENTS;
-+    }
-+
-+  hti.info = info;
-+  hti.output_bfd = output_bfd;
-+  hti.error = false;
-+  mips_elf_link_hash_traverse (htab, mips_elf_check_symbols, &hti);
-+  if (hti.error)
-+    return false;
-+
-+  dynobj = htab->root.dynobj;
-   if (dynobj == NULL)
-     return true;
- 
--  if (elf_hash_table (info)->dynamic_sections_created)
-+  if (htab->root.dynamic_sections_created)
-     {
-       /* Set the contents of the .interp section to the interpreter.  */
-       if (bfd_link_executable (info) && !info->nointerp)
-@@ -10117,7 +10101,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
- 	    }
- 	}
-       else if (bfd_link_executable (info)
--	       && ! mips_elf_hash_table (info)->use_rld_obj_head
-+	       && !htab->use_rld_obj_head
- 	       && startswith (name, ".rld_map"))
- 	{
- 	  /* We add a room for __rld_map.  It will be filled in by the
-@@ -10126,7 +10110,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
- 	}
-       else if (SGI_COMPAT (output_bfd)
- 	       && startswith (name, ".compact_rel"))
--	s->size += mips_elf_hash_table (info)->compact_rel_size;
-+	s->size += htab->compact_rel_size;
-       else if (s == htab->root.splt)
- 	{
- 	  /* If the last PLT entry has a branch delay slot, allocate
-@@ -10166,7 +10150,7 @@ _bfd_mips_elf_late_size_sections (bfd *o
- 	}
-     }
- 
--  if (elf_hash_table (info)->dynamic_sections_created)
-+  if (htab->root.dynamic_sections_created)
-     {
-       /* Add some entries to the .dynamic section.  We fill in the
- 	 values later, in _bfd_mips_elf_finish_dynamic_sections, but we
-@@ -14900,7 +14884,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
- 	      input_section->flags &= ~SEC_HAS_CONTENTS;
- 	    }
- 
--	  /* Size has been set in _bfd_mips_elf_early_size_sections.  */
-+	  /* Size has been set in _bfd_mips_elf_late_size_sections.  */
- 	  BFD_ASSERT(o->size == sizeof (Elf_External_ABIFlags_v0));
- 
- 	  /* Skip this section later on (I don't think this currently
-@@ -14959,7 +14943,7 @@ _bfd_mips_elf_final_link (bfd *abfd, str
- 	      input_section->flags &= ~SEC_HAS_CONTENTS;
- 	    }
- 
--	  /* Size has been set in _bfd_mips_elf_early_size_sections.  */
-+	  /* Size has been set in _bfd_mips_elf_late_size_sections.  */
- 	  BFD_ASSERT(o->size == sizeof (Elf32_External_RegInfo));
- 
- 	  /* Skip this section later on (I don't think this currently
---- a/bfd/elfxx-mips.h
-+++ b/bfd/elfxx-mips.h
-@@ -61,8 +61,6 @@ extern bool _bfd_mips_elf_check_relocs
-   (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *);
- extern bool _bfd_mips_elf_adjust_dynamic_symbol
-   (struct bfd_link_info *, struct elf_link_hash_entry *);
--extern bool _bfd_mips_elf_early_size_sections
--  (bfd *, struct bfd_link_info *);
- extern bool _bfd_mips_elf_late_size_sections
-   (bfd *, struct bfd_link_info *);
- extern int _bfd_mips_elf_relocate_section
diff --git a/toolchain/binutils/patches/2.40/005-libctf-update-regexp-to-allow-makeinfo-to-build-docu.patch b/toolchain/binutils/patches/2.40/005-libctf-update-regexp-to-allow-makeinfo-to-build-docu.patch
deleted file mode 100644
index 19af34091c..0000000000
--- a/toolchain/binutils/patches/2.40/005-libctf-update-regexp-to-allow-makeinfo-to-build-docu.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From f7c5db99b76e8dde89335d794c82fcbfbf53c612 Mon Sep 17 00:00:00 2001
-From: Enze Li <enze.li at hotmail.com>
-Date: Sat, 14 Jan 2023 11:33:48 +0800
-Subject: [PATCH 05/50] libctf: update regexp to allow makeinfo to build
- document
-
-While trying to build gdb on latest openSUSE Tumbleweed, I noticed the
-following warning,
-
- checking for makeinfo... makeinfo --split-size=5000000
- configure: WARNING:
- *** Makeinfo is too old. Info documentation will not be built.
-
-then I checked the version of makeinfo, it said,
-======
-$ makeinfo --version
-texi2any (GNU texinfo) 7.0.1
-
-Copyright (C) 2022 Free Software Foundation, Inc.
-License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
-This is free software: you are free to change and redistribute it.
-There is NO WARRANTY, to the extent permitted by law.
-======
-
-After digging a little bit, it became quite obvious that a dot is
-missing in regexp that makes it impossible to match versions higher than
-7.0, and here's the solution:
-
--       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
-+       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]\.[0-9])' >/dev/null 2>&1; then
-
-However, Eli pointed out that the solution above has another problem: it
-will stop working when Texinfo 10.1 will be released.  Meanwhile, he
-suggested to solve this problem permanently.  That is, we don't care
-about the minor version for Texinfo > 6.9, we only care about the major
-version.
-
-In this way, the problem will be resolved permanently, thanks to Eli.
-
-libctf/ChangeLog:
-
-	* configure: Regenerated.
-	* configure.ac: Update regexp to match versions higher than 7.0.
----
- libctf/configure    | 2 +-
- libctf/configure.ac | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
---- a/libctf/configure
-+++ b/libctf/configure
-@@ -14865,7 +14865,7 @@ esac
-     # We require texinfo to be 6.3 or later, for a working synindex
-     # and validatemenus: otherwise we fall back to /bin/true.
-     if ${MAKEINFO} --version \
--       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
-+       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then
-       build_info=yes
-     else
-         build_info=
---- a/libctf/configure.ac
-+++ b/libctf/configure.ac
-@@ -184,7 +184,7 @@ changequote(,)
-     # We require texinfo to be 6.3 or later, for a working synindex
-     # and validatemenus: otherwise we fall back to /bin/true.
-     if ${MAKEINFO} --version \
--       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9][0-9])' >/dev/null 2>&1; then
-+       | egrep 'texinfo[^0-9]*(6\.[3-9]|[7-9]|[1-6][0-9])' >/dev/null 2>&1; then
-       build_info=yes
-     else
-         build_info=
diff --git a/toolchain/binutils/patches/2.40/007-Fix-version-number-snafu-in-some-configuration-files.patch b/toolchain/binutils/patches/2.40/007-Fix-version-number-snafu-in-some-configuration-files.patch
deleted file mode 100644
index 0676240442..0000000000
--- a/toolchain/binutils/patches/2.40/007-Fix-version-number-snafu-in-some-configuration-files.patch
+++ /dev/null
@@ -1,444 +0,0 @@
-From 59706683feafb6252d0ad369cf8759f75fd147be Mon Sep 17 00:00:00 2001
-From: Nick Clifton <nickc at redhat.com>
-Date: Tue, 17 Jan 2023 12:02:56 +0000
-Subject: [PATCH 07/50] Fix version number snafu in some configuration files:
- 2.40.00 should be 2.40
-
----
- binutils/configure             | 20 ++++++++++----------
- gprof/configure                | 20 ++++++++++----------
- gprofng/configure              | 20 ++++++++++----------
- gprofng/doc/version.texi       |  4 ++--
- gprofng/libcollector/configure | 20 ++++++++++----------
- ld/configure                   | 20 ++++++++++----------
- 6 files changed, 52 insertions(+), 52 deletions(-)
-
---- a/binutils/configure
-+++ b/binutils/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for binutils 2.40.00.
-+# Generated by GNU Autoconf 2.69 for binutils 2.40.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='binutils'
- PACKAGE_TARNAME='binutils'
--PACKAGE_VERSION='2.40.00'
--PACKAGE_STRING='binutils 2.40.00'
-+PACKAGE_VERSION='2.40'
-+PACKAGE_STRING='binutils 2.40'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1401,7 +1401,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures binutils 2.40.00 to adapt to many kinds of systems.
-+\`configure' configures binutils 2.40 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1472,7 +1472,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of binutils 2.40.00:";;
-+     short | recursive ) echo "Configuration of binutils 2.40:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1631,7 +1631,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--binutils configure 2.40.00
-+binutils configure 2.40
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -2099,7 +2099,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by binutils $as_me 2.40.00, which was
-+It was created by binutils $as_me 2.40, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -3081,7 +3081,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='binutils'
-- VERSION='2.40.00'
-+ VERSION='2.40'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -15326,7 +15326,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by binutils $as_me 2.40.00, which was
-+This file was extended by binutils $as_me 2.40, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -15392,7 +15392,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--binutils config.status 2.40.00
-+binutils config.status 2.40
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
---- a/gprof/configure
-+++ b/gprof/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for gprof 2.40.00.
-+# Generated by GNU Autoconf 2.69 for gprof 2.40.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='gprof'
- PACKAGE_TARNAME='gprof'
--PACKAGE_VERSION='2.40.00'
--PACKAGE_STRING='gprof 2.40.00'
-+PACKAGE_VERSION='2.40'
-+PACKAGE_STRING='gprof 2.40'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1338,7 +1338,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures gprof 2.40.00 to adapt to many kinds of systems.
-+\`configure' configures gprof 2.40 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1409,7 +1409,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of gprof 2.40.00:";;
-+     short | recursive ) echo "Configuration of gprof 2.40:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1520,7 +1520,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--gprof configure 2.40.00
-+gprof configure 2.40
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -1885,7 +1885,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by gprof $as_me 2.40.00, which was
-+It was created by gprof $as_me 2.40, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -2864,7 +2864,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='gprof'
-- VERSION='2.40.00'
-+ VERSION='2.40'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -12572,7 +12572,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by gprof $as_me 2.40.00, which was
-+This file was extended by gprof $as_me 2.40, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -12638,7 +12638,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--gprof config.status 2.40.00
-+gprof config.status 2.40
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
---- a/gprofng/configure
-+++ b/gprofng/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for gprofng 2.40.00.
-+# Generated by GNU Autoconf 2.69 for gprofng 2.40.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='gprofng'
- PACKAGE_TARNAME='gprofng'
--PACKAGE_VERSION='2.40.00'
--PACKAGE_STRING='gprofng 2.40.00'
-+PACKAGE_VERSION='2.40'
-+PACKAGE_STRING='gprofng 2.40'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1362,7 +1362,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures gprofng 2.40.00 to adapt to many kinds of systems.
-+\`configure' configures gprofng 2.40 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1433,7 +1433,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of gprofng 2.40.00:";;
-+     short | recursive ) echo "Configuration of gprofng 2.40:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1547,7 +1547,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--gprofng configure 2.40.00
-+gprofng configure 2.40
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -2079,7 +2079,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by gprofng $as_me 2.40.00, which was
-+It was created by gprofng $as_me 2.40, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -3052,7 +3052,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='gprofng'
-- VERSION='2.40.00'
-+ VERSION='2.40'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -17467,7 +17467,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by gprofng $as_me 2.40.00, which was
-+This file was extended by gprofng $as_me 2.40, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -17533,7 +17533,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--gprofng config.status 2.40.00
-+gprofng config.status 2.40
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
---- a/gprofng/doc/version.texi
-+++ b/gprofng/doc/version.texi
-@@ -1,4 +1,4 @@
- @set UPDATED 5 January 2023
- @set UPDATED-MONTH January 2023
-- at set EDITION 2.40.00
-- at set VERSION 2.40.00
-+ at set EDITION 2.40
-+ at set VERSION 2.40
---- a/gprofng/libcollector/configure
-+++ b/gprofng/libcollector/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for gprofng 2.40.00.
-+# Generated by GNU Autoconf 2.69 for gprofng 2.40.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='gprofng'
- PACKAGE_TARNAME='gprofng'
--PACKAGE_VERSION='2.40.00'
--PACKAGE_STRING='gprofng 2.40.00'
-+PACKAGE_VERSION='2.40'
-+PACKAGE_STRING='gprofng 2.40'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1325,7 +1325,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures gprofng 2.40.00 to adapt to many kinds of systems.
-+\`configure' configures gprofng 2.40 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1396,7 +1396,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of gprofng 2.40.00:";;
-+     short | recursive ) echo "Configuration of gprofng 2.40:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1505,7 +1505,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--gprofng configure 2.40.00
-+gprofng configure 2.40
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -1991,7 +1991,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by gprofng $as_me 2.40.00, which was
-+It was created by gprofng $as_me 2.40, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -2968,7 +2968,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='gprofng'
-- VERSION='2.40.00'
-+ VERSION='2.40'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -16098,7 +16098,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by gprofng $as_me 2.40.00, which was
-+This file was extended by gprofng $as_me 2.40, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -16164,7 +16164,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--gprofng config.status 2.40.00
-+gprofng config.status 2.40
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
---- a/ld/configure
-+++ b/ld/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for ld 2.40.00.
-+# Generated by GNU Autoconf 2.69 for ld 2.40.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='ld'
- PACKAGE_TARNAME='ld'
--PACKAGE_VERSION='2.40.00'
--PACKAGE_STRING='ld 2.40.00'
-+PACKAGE_VERSION='2.40'
-+PACKAGE_STRING='ld 2.40'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1423,7 +1423,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures ld 2.40.00 to adapt to many kinds of systems.
-+\`configure' configures ld 2.40 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1494,7 +1494,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of ld 2.40.00:";;
-+     short | recursive ) echo "Configuration of ld 2.40:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1661,7 +1661,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--ld configure 2.40.00
-+ld configure 2.40
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -2376,7 +2376,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by ld $as_me 2.40.00, which was
-+It was created by ld $as_me 2.40, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -3359,7 +3359,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='ld'
-- VERSION='2.40.00'
-+ VERSION='2.40'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -18083,7 +18083,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by ld $as_me 2.40.00, which was
-+This file was extended by ld $as_me 2.40, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -18149,7 +18149,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--ld config.status 2.40.00
-+ld config.status 2.40
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
diff --git a/toolchain/binutils/patches/2.40/010-toplevel-Makefile.def-add-install-strip-dependency-o.patch b/toolchain/binutils/patches/2.40/010-toplevel-Makefile.def-add-install-strip-dependency-o.patch
deleted file mode 100644
index bef40f546f..0000000000
--- a/toolchain/binutils/patches/2.40/010-toplevel-Makefile.def-add-install-strip-dependency-o.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From bcea253f5fa194e57f9564e8461c718e228bd26e Mon Sep 17 00:00:00 2001
-From: Indu Bhagat <indu.bhagat at oracle.com>
-Date: Wed, 18 Jan 2023 23:17:49 -0800
-Subject: [PATCH 10/50] toplevel: Makefile.def: add install-strip dependency on
- libsframe
-
-As noted in PR libsframe/30014 - FTBFS: install-strip fails because
-bfdlib relinks and fails to find libsframe, the install time
-dependencies of libbfd need to be updated.
-
-	PR libsframe/30014
-	* Makefile.def: Reflect that libsframe needs to installed before
-	libbfd.  Reorder a bit to better track libsframe dependencies.
-	* Makefile.in: Regenerate.
-
-(cherry picked from commit b8d21eb0cd10d6127e77cc437d82e949adb0c454)
----
- Makefile.def | 5 ++++-
- Makefile.in  | 3 ++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
---- a/Makefile.def
-+++ b/Makefile.def
-@@ -493,7 +493,6 @@ dependencies = { module=install-binutils
- dependencies = { module=install-strip-binutils; on=install-strip-opcodes; };
- 
- // Likewise for ld, libctf, and bfd.
--dependencies = { module=install-bfd; on=install-libsframe; };
- dependencies = { module=install-libctf; on=install-bfd; };
- dependencies = { module=install-ld; on=install-bfd; };
- dependencies = { module=install-ld; on=install-libctf; };
-@@ -501,6 +500,10 @@ dependencies = { module=install-strip-li
- dependencies = { module=install-strip-ld; on=install-strip-bfd; };
- dependencies = { module=install-strip-ld; on=install-strip-libctf; };
- 
-+// libbfd depends on libsframe
-+dependencies = { module=install-bfd; on=install-libsframe; };
-+dependencies = { module=install-strip-bfd; on=install-strip-libsframe; };
-+
- // libopcodes depends on libbfd
- dependencies = { module=configure-opcodes; on=configure-bfd; hard=true; };
- dependencies = { module=install-opcodes; on=install-bfd; };
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -64549,13 +64549,14 @@ all-stageautoprofile-binutils: maybe-all
- all-stageautofeedback-binutils: maybe-all-stageautofeedback-libsframe
- install-binutils: maybe-install-opcodes
- install-strip-binutils: maybe-install-strip-opcodes
--install-bfd: maybe-install-libsframe
- install-libctf: maybe-install-bfd
- install-ld: maybe-install-bfd
- install-ld: maybe-install-libctf
- install-strip-libctf: maybe-install-strip-bfd
- install-strip-ld: maybe-install-strip-bfd
- install-strip-ld: maybe-install-strip-libctf
-+install-bfd: maybe-install-libsframe
-+install-strip-bfd: maybe-install-strip-libsframe
- configure-opcodes: configure-bfd
- configure-stage1-opcodes: configure-stage1-bfd
- configure-stage2-opcodes: configure-stage2-bfd
diff --git a/toolchain/binutils/patches/2.40/018-gprofng-PR29521-docs-man-pages-are-not-in-the-releas.patch b/toolchain/binutils/patches/2.40/018-gprofng-PR29521-docs-man-pages-are-not-in-the-releas.patch
deleted file mode 100644
index ae557645c0..0000000000
--- a/toolchain/binutils/patches/2.40/018-gprofng-PR29521-docs-man-pages-are-not-in-the-releas.patch
+++ /dev/null
@@ -1,703 +0,0 @@
-From c6e269febbc946a54ed9dbbb2dc70feba6017607 Mon Sep 17 00:00:00 2001
-From: Vladimir Mezentsev <vladimir.mezentsev at oracle.com>
-Date: Fri, 20 Jan 2023 15:39:55 -0800
-Subject: [PATCH 18/50] gprofng: PR29521 [docs] man pages are not in the
- release tarball
-
-gprofng/ChangeLog
-2023-01-20  Vladimir Mezentsev  <vladimir.mezentsev at oracle.com>
-
-	PR gprofng/29521
-	* configure.ac: Check if $MAKEINFO and $HELP2MAN are missing.
-	* Makefile.am: Build doc if $MAKEINFO exists.
-	* doc/gprofng.texi: Update documentation for gprofng.
-	* doc/Makefile.am: Build gprofng.1.
-	* src/Makefile.am: Move the build of gprofng.1 to doc/Makefile.am.
-	* configure: Rebuild.
-	* Makefile.in: Rebuild.
-	* doc/Makefile.in: Rebuild.
-	* src/Makefile.in: Rebuild.
----
- gprofng/Makefile.am      |   2 +-
- gprofng/Makefile.in      |   2 +-
- gprofng/configure        |  79 +++++++++++++++---
- gprofng/configure.ac     |  21 +++--
- gprofng/doc/Makefile.am  |  24 +++++-
- gprofng/doc/Makefile.in  |  93 ++++++++++++++++++---
- gprofng/doc/gprofng.texi | 169 +++++++++++++++++++++++++++++++++++++++
- gprofng/src/Makefile.am  |   8 +-
- gprofng/src/Makefile.in  |   8 +-
- 9 files changed, 364 insertions(+), 42 deletions(-)
-
---- a/gprofng/Makefile.am
-+++ b/gprofng/Makefile.am
-@@ -23,7 +23,7 @@ AUTOMAKE_OPTIONS = dejagnu foreign
- if BUILD_COLLECTOR
-     COLLECTOR_SUBDIRS = libcollector
- endif
--if BUILD_MAN
-+if BUILD_DOC
-     DOC_SUBDIR = doc
- endif
- if BUILD_SRC
---- a/gprofng/Makefile.in
-+++ b/gprofng/Makefile.in
-@@ -381,7 +381,7 @@ zlibinc = @zlibinc@
- ACLOCAL_AMFLAGS = -I . -I .. 
- AUTOMAKE_OPTIONS = dejagnu foreign
- @BUILD_COLLECTOR_TRUE at COLLECTOR_SUBDIRS = libcollector
-- at BUILD_MAN_TRUE@DOC_SUBDIR = doc
-+ at BUILD_DOC_TRUE@DOC_SUBDIR = doc
- @BUILD_SRC_TRUE at SRC_SUBDIRS = src gp-display-html $(DOC_SUBDIR)
- SUBDIRS = $(COLLECTOR_SUBDIRS) $(SRC_SUBDIRS)
- DIST_SUBDIRS = libcollector src gp-display-html $(DOC_SUBDIR)
---- a/gprofng/configure
-+++ b/gprofng/configure
-@@ -639,6 +639,8 @@ GPROFNG_CPPFLAGS
- GPROFNG_NO_FORMAT_TRUNCATION_CFLAGS
- GPROFNG_CFLAGS
- LD_NO_AS_NEEDED
-+BUILD_DOC_FALSE
-+BUILD_DOC_TRUE
- BUILD_MAN_FALSE
- BUILD_MAN_TRUE
- HELP2MAN
-@@ -12221,7 +12223,7 @@ else
-   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-   lt_status=$lt_dlunknown
-   cat > conftest.$ac_ext <<_LT_EOF
--#line 12224 "configure"
-+#line 12226 "configure"
- #include "confdefs.h"
- 
- #if HAVE_DLFCN_H
-@@ -12327,7 +12329,7 @@ else
-   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
-   lt_status=$lt_dlunknown
-   cat > conftest.$ac_ext <<_LT_EOF
--#line 12330 "configure"
-+#line 12332 "configure"
- #include "confdefs.h"
- 
- #if HAVE_DLFCN_H
-@@ -16737,9 +16739,58 @@ fi
- 
- # Generate manpages, if possible.
- build_man=false
-+build_doc=false
- if test $cross_compiling = no; then
-+  for ac_prog in help2man
-+do
-+  # Extract the first word of "$ac_prog", so it can be a program name with args.
-+set dummy $ac_prog; ac_word=$2
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-+$as_echo_n "checking for $ac_word... " >&6; }
-+if ${ac_cv_prog_HELP2MAN+:} false; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  if test -n "$HELP2MAN"; then
-+  ac_cv_prog_HELP2MAN="$HELP2MAN" # Let the user override the test.
-+else
-+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-+for as_dir in $PATH
-+do
-+  IFS=$as_save_IFS
-+  test -z "$as_dir" && as_dir=.
-+    for ac_exec_ext in '' $ac_executable_extensions; do
-+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-+    ac_cv_prog_HELP2MAN="$ac_prog"
-+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-+    break 2
-+  fi
-+done
-+  done
-+IFS=$as_save_IFS
-+
-+fi
-+fi
-+HELP2MAN=$ac_cv_prog_HELP2MAN
-+if test -n "$HELP2MAN"; then
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5
-+$as_echo "$HELP2MAN" >&6; }
-+else
-+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-+$as_echo "no" >&6; }
-+fi
- 
--HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"}
-+
-+  test -n "$HELP2MAN" && break
-+done
-+test -n "$HELP2MAN" || HELP2MAN="$MISSING help2man"
-+
-+  case "x$HELP2MAN" in
-+    x | */missing\ help2man* )
-+      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gprofng: help2man is missing. Man pages will not be built." >&5
-+$as_echo "$as_me: WARNING: gprofng: help2man is missing. Man pages will not be built." >&2;}
-+      ;;
-+    * ) build_man=true ;;
-+    esac
- 
-   for ac_prog in makeinfo
- do
-@@ -16782,10 +16833,10 @@ fi
- 
-   test -n "$MAKEINFO" && break
- done
--test -n "$MAKEINFO" || MAKEINFO=""@echo makeinfo missing; true""
-+test -n "$MAKEINFO" || MAKEINFO="$MISSING makeinfo"
- 
--  case "$MAKEINFO" in
--    *true)
-+  case "x$MAKEINFO" in
-+    x | */missing\ makeinfo*)
-       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gprofng: makeinfo is missing. Info documentation will not be built." >&5
- $as_echo "$as_me: WARNING: gprofng: makeinfo is missing. Info documentation will not be built." >&2;}
-       ;;
-@@ -16796,9 +16847,7 @@ $as_echo "$as_me: WARNING: gprofng: make
- $as_echo "$as_me: WARNING: gprofng: $MAKEINFO is too old. Info documentation will not be built." >&2;}
- 	  MAKEINFO="@echo $MAKEINFO is too old, 6.5 or newer required; true"
- 	  ;;
--	x* )
--	  build_man=true
--	  ;;
-+	x* ) build_doc=true ;;
- 	esac
-       ;;
-     esac
-@@ -16812,6 +16861,14 @@ else
-   BUILD_MAN_FALSE=
- fi
- 
-+ if test x$build_doc = xtrue; then
-+  BUILD_DOC_TRUE=
-+  BUILD_DOC_FALSE='#'
-+else
-+  BUILD_DOC_TRUE='#'
-+  BUILD_DOC_FALSE=
-+fi
-+
- 
- LD_NO_AS_NEEDED=${no_as_needed}
- 
-@@ -17070,6 +17127,10 @@ if test -z "${BUILD_MAN_TRUE}" && test -
-   as_fn_error $? "conditional \"BUILD_MAN\" was never defined.
- Usually this means the macro was only invoked conditionally." "$LINENO" 5
- fi
-+if test -z "${BUILD_DOC_TRUE}" && test -z "${BUILD_DOC_FALSE}"; then
-+  as_fn_error $? "conditional \"BUILD_DOC\" was never defined.
-+Usually this means the macro was only invoked conditionally." "$LINENO" 5
-+fi
- 
- : "${CONFIG_STATUS=./config.status}"
- ac_write_fail=0
---- a/gprofng/configure.ac
-+++ b/gprofng/configure.ac
-@@ -210,11 +210,19 @@ AM_ZLIB
- 
- # Generate manpages, if possible.
- build_man=false
-+build_doc=false
- if test $cross_compiling = no; then
--  AM_MISSING_PROG(HELP2MAN, help2man)
--  AC_CHECK_PROGS([MAKEINFO], makeinfo, ["@echo makeinfo missing; true"])
--  case "$MAKEINFO" in
--    *true)
-+  AC_CHECK_PROGS([HELP2MAN], help2man, [$MISSING help2man])
-+  case "x$HELP2MAN" in
-+    x | */missing\ help2man* )
-+      AC_MSG_WARN([gprofng: help2man is missing. Man pages will not be built.])
-+      ;;
-+    * ) build_man=true ;;
-+    esac
-+
-+  AC_CHECK_PROGS([MAKEINFO], makeinfo, [$MISSING makeinfo])
-+  case "x$MAKEINFO" in
-+    x | */missing\ makeinfo*)
-       AC_MSG_WARN([gprofng: makeinfo is missing. Info documentation will not be built.])
-       ;;
-     *)
-@@ -223,15 +231,14 @@ if test $cross_compiling = no; then
- 	  AC_MSG_WARN([gprofng: $MAKEINFO is too old. Info documentation will not be built.])
- 	  MAKEINFO="@echo $MAKEINFO is too old, 6.5 or newer required; true"
- 	  ;;
--	x* )
--	  build_man=true
--	  ;;
-+	x* ) build_doc=true ;;
- 	esac
-       ;;
-     esac
-   AC_SUBST(MAKEINFO)
- fi
- AM_CONDITIONAL([BUILD_MAN], [test x$build_man = xtrue])
-+AM_CONDITIONAL([BUILD_DOC], [test x$build_doc = xtrue])
- 
- AC_SUBST(LD_NO_AS_NEEDED, [${no_as_needed}])
- AC_SUBST(GPROFNG_CFLAGS, [${gprofng_cflags}])
---- a/gprofng/doc/Makefile.am
-+++ b/gprofng/doc/Makefile.am
-@@ -19,9 +19,31 @@
- 
- AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex
- 
-+# Options to extract the man page
-+MANCONF = -Dman
-+
-+TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
-+POD2MAN = pod2man --center="User Commands" \
-+	--release="binutils-$(VERSION)" --section=1
-+
- info_TEXINFOS       = gprofng.texi
- gprofng_TEXINFOS    = fdl.texi
- TEXINFO_TEX         = .
- MAKEINFOHTML        = $(MAKEINFO) --html --no-split
- 
--MAINTAINERCLEANFILES = gprofng.info
-+man_MANS = gprofng.1
-+
-+# Build the man page from the texinfo file
-+# The sed command removes the no-adjust Nroff command so that
-+# the man output looks standard.
-+gprofng.1: $(srcdir)/gprofng.texi
-+	$(AM_V_GEN)touch $@
-+	$(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/gprofng.texi > gprofng.pod
-+	$(AM_V_at)-($(POD2MAN) gprofng.pod | \
-+	  sed -e '/^.if n .na/d' > $@.tmp && \
-+	  mv -f $@.tmp $@) || (rm -f $@.tmp && exit 1)
-+	$(AM_V_at)rm -f gprofng.pod
-+
-+MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
-+
-+info: $(man_MANS)
---- a/gprofng/doc/Makefile.in
-+++ b/gprofng/doc/Makefile.in
-@@ -182,7 +182,7 @@ am__can_run_installinfo = \
-     n|no|NO) false;; \
-     *) (install-info --version) >/dev/null 2>&1;; \
-   esac
--am__installdirs = "$(DESTDIR)$(infodir)"
-+am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"
- am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
- am__vpath_adj = case $$p in \
-     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-@@ -210,6 +210,9 @@ am__uninstall_files_from_dir = { \
-     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-          $(am__cd) "$$dir" && rm -f $$files; }; \
-   }
-+man1dir = $(mandir)/man1
-+NROFF = nroff
-+MANS = $(man_MANS)
- am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
- am__DIST_COMMON = $(gprofng_TEXINFOS) $(srcdir)/Makefile.in \
- 	$(top_srcdir)/../mkinstalldirs mdate-sh texinfo.tex
-@@ -361,11 +364,19 @@ top_srcdir = @top_srcdir@
- zlibdir = @zlibdir@
- zlibinc = @zlibinc@
- AUTOMAKE_OPTIONS = info-in-builddir foreign no-texinfo.tex
-+
-+# Options to extract the man page
-+MANCONF = -Dman
-+TEXI2POD = perl $(srcdir)/../../etc/texi2pod.pl $(AM_MAKEINFOFLAGS)
-+POD2MAN = pod2man --center="User Commands" \
-+	--release="binutils-$(VERSION)" --section=1
-+
- info_TEXINFOS = gprofng.texi
- gprofng_TEXINFOS = fdl.texi
- TEXINFO_TEX = .
- MAKEINFOHTML = $(MAKEINFO) --html --no-split
--MAINTAINERCLEANFILES = gprofng.info
-+man_MANS = gprofng.1
-+MAINTAINERCLEANFILES = gprofng.info $(man_MANS)
- all: all-am
- 
- .SUFFIXES:
-@@ -558,6 +569,49 @@ maintainer-clean-aminfo:
- 	  echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
- 	  rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
- 	done
-+install-man1: $(man_MANS)
-+	@$(NORMAL_INSTALL)
-+	@list1=''; \
-+	list2='$(man_MANS)'; \
-+	test -n "$(man1dir)" \
-+	  && test -n "`echo $$list1$$list2`" \
-+	  || exit 0; \
-+	echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
-+	$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
-+	{ for i in $$list1; do echo "$$i"; done;  \
-+	if test -n "$$list2"; then \
-+	  for i in $$list2; do echo "$$i"; done \
-+	    | sed -n '/\.1[a-z]*$$/p'; \
-+	fi; \
-+	} | while read p; do \
-+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
-+	  echo "$$d$$p"; echo "$$p"; \
-+	done | \
-+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
-+	sed 'N;N;s,\n, ,g' | { \
-+	list=; while read file base inst; do \
-+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
-+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
-+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
-+	  fi; \
-+	done; \
-+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
-+	while read files; do \
-+	  test -z "$$files" || { \
-+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
-+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
-+	done; }
-+
-+uninstall-man1:
-+	@$(NORMAL_UNINSTALL)
-+	@list=''; test -n "$(man1dir)" || exit 0; \
-+	files=`{ for i in $$list; do echo "$$i"; done; \
-+	l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
-+	  sed -n '/\.1[a-z]*$$/p'; \
-+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
-+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
-+	dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
- tags TAGS:
- 
- ctags CTAGS:
-@@ -600,9 +654,9 @@ distdir: $(DISTFILES)
- 	  dist-info
- check-am: all-am
- check: check-am
--all-am: Makefile $(INFO_DEPS)
-+all-am: Makefile $(INFO_DEPS) $(MANS)
- installdirs:
--	for dir in "$(DESTDIR)$(infodir)"; do \
-+	for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
- 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- 	done
- install: install-am
-@@ -652,11 +706,9 @@ html: html-am
- 
- html-am: $(HTMLS)
- 
--info: info-am
--
- info-am: $(INFO_DEPS)
- 
--install-data-am: install-info-am
-+install-data-am: install-info-am install-man
- 
- install-dvi: install-dvi-am
- 
-@@ -739,7 +791,7 @@ install-info-am: $(INFO_DEPS)
- 	    install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
- 	  done; \
- 	else : ; fi
--install-man:
-+install-man: install-man1
- 
- install-pdf: install-pdf-am
- 
-@@ -794,7 +846,9 @@ ps: ps-am
- ps-am: $(PSS)
- 
- uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
--	uninstall-pdf-am uninstall-ps-am
-+	uninstall-man uninstall-pdf-am uninstall-ps-am
-+
-+uninstall-man: uninstall-man1
- 
- .MAKE: install-am install-strip
- 
-@@ -804,19 +858,32 @@ uninstall-am: uninstall-dvi-am uninstall
- 	html-am info info-am install install-am install-data \
- 	install-data-am install-dvi install-dvi-am install-exec \
- 	install-exec-am install-html install-html-am install-info \
--	install-info-am install-man install-pdf install-pdf-am \
--	install-ps install-ps-am install-strip installcheck \
--	installcheck-am installdirs maintainer-clean \
-+	install-info-am install-man install-man1 install-pdf \
-+	install-pdf-am install-ps install-ps-am install-strip \
-+	installcheck installcheck-am installdirs maintainer-clean \
- 	maintainer-clean-aminfo maintainer-clean-generic \
- 	maintainer-clean-vti mostlyclean mostlyclean-aminfo \
- 	mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \
- 	pdf-am ps ps-am tags-am uninstall uninstall-am \
- 	uninstall-dvi-am uninstall-html-am uninstall-info-am \
--	uninstall-pdf-am uninstall-ps-am
-+	uninstall-man uninstall-man1 uninstall-pdf-am uninstall-ps-am
- 
- .PRECIOUS: Makefile
- 
- 
-+# Build the man page from the texinfo file
-+# The sed command removes the no-adjust Nroff command so that
-+# the man output looks standard.
-+gprofng.1: $(srcdir)/gprofng.texi
-+	$(AM_V_GEN)touch $@
-+	$(AM_V_at)-$(TEXI2POD) $(MANCONF) < $(srcdir)/gprofng.texi > gprofng.pod
-+	$(AM_V_at)-($(POD2MAN) gprofng.pod | \
-+	  sed -e '/^.if n .na/d' > $@.tmp && \
-+	  mv -f $@.tmp $@) || (rm -f $@.tmp && exit 1)
-+	$(AM_V_at)rm -f gprofng.pod
-+
-+info: $(man_MANS)
-+
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
- .NOEXPORT:
---- a/gprofng/doc/gprofng.texi
-+++ b/gprofng/doc/gprofng.texi
-@@ -1,5 +1,8 @@
- \input texinfo @c -*-texinfo-*-
- 
-+ at c for $sect (qw(NAME SYNOPSIS TARGET DESCRIPTION OPTIONS ENVIRONMENT FILES
-+ at c               BUGS NOTES FOOTNOTES SEEALSO AUTHOR COPYRIGHT)) {
-+
- @c ----------------------------------------------------------------------------
- @c This is the Texinfo source file for the GPROFNG manual.
- @c
-@@ -59,6 +62,10 @@ gprofng
- @cindex \label\, \string\
- @end macro
- 
-+ at macro gcctabopt{body}
-+ at code{\body\}
-+ at end macro
-+
- @c -- Get the version information ---------------------------------------------
- @include version.texi
- 
-@@ -99,6 +106,20 @@ section entitled ``GNU Free Documentatio
- @page
- @vskip 0pt plus 1filll
- @insertcopying
-+
-+ at c man begin COPYRIGHT
-+
-+Copyright @copyright{} 2022-2023 Free Software Foundation, Inc.
-+
-+Permission is granted to copy, distribute and/or modify this document
-+under the terms of the GNU Free Documentation License, Version 1.3
-+or any later version published by the Free Software Foundation;
-+with no Invariant Sections, with no Front-Cover Texts, and with no
-+Back-Cover Texts.  A copy of the license is included in the
-+section entitled ``GNU Free Documentation License''.
-+
-+ at c man end
-+
- @end titlepage
- 
- @c -- Generate the Table of Contents ------------------------------------------
-@@ -163,6 +184,154 @@ Terminology
- @end menu
- @end ifinfo
- 
-+ at ifset man
-+
-+ at c man title gprofng the driver for the gprofng tool suite
-+
-+ at c man begin SYNOPSIS
-+gprofng [OPTION(S)] ACTION [@b{QUALIFIER}] [ARGUMENTS] TARGET
-+ at c man end
-+
-+ at c man begin DESCRIPTION
-+This is the driver for the GPROFNG tools suite to gather and analyze performance data.
-+
-+The driver executes the action specified. An example of an action is @code{collect}
-+to collect performance data. Depending on the action, a qualifier may be needed to
-+define the command. Several qualifiers support options. The last item on the command
-+is the target the command applies to.
-+
-+For example, to collect performance data for an application called @code{a.out} and
-+store the results in experiment directory @code{mydata.er}, the following command may
-+be used:
-+
-+ at smallexample
-+$ gprofng collect app -o mydata.er a.out
-+ at end smallexample
-+
-+In this example, the action is @code{collect}, the qualifier is @code{app}, the single
-+argument is @code{-o mydata.er} and the target is @code{a.out}.
-+
-+If gprofng is executed without any additional option, action, or target, a usage
-+overview is printed.
-+
-+ at c man end
-+
-+ at c man begin OPTIONS
-+
-+ at table @gcctabopt
-+
-+ at item @var{--version}
-+print the version number and exit.
-+
-+ at item @var{--help}
-+print usage information and exit.
-+
-+ at end table
-+
-+ at c man end
-+
-+ at c man begin NOTES
-+
-+The gprofng driver supports the following commands.
-+
-+ at c The man pages for the commands below can be viewed using the command name with "gprofng" replaced by "gp" and the spaces replaced by a dash ("-"). For example the man page
-+ at c        name for "gprofng collect app" is "gp-collect-app".
-+
-+Collect performance data:
-+
-+ at table @code
-+
-+ at item gprofng collect app
-+collect application performance data.
-+
-+ at end table
-+
-+Display the performance results:
-+
-+ at table @code
-+
-+ at item gprofng display text
-+display the performance data in ASCII format.
-+
-+ at item gprofng display html
-+generate an HTML file from one or more experiments.
-+
-+ at end table
-+
-+Miscellaneous commands:
-+
-+ at table @code
-+
-+ at item gprofng display src
-+display source or disassembly with compiler annotations.
-+
-+ at item gprofng archive
-+include binaries and source code in an experiment directory.
-+
-+ at end table
-+
-+It is also possible to invoke the lower level commands directly, but since
-+these are subject to change, in particular the options, we recommend to
-+use the driver.
-+
-+ at c man end
-+
-+ at c man begin ENVIRONMENT
-+The following environment variables are supported:
-+
-+ at table @code
-+
-+ at item @env{GPROFNG_MAX_CALL_STACK_DEPTH}
-+set the depth of the call stack (default is 256).
-+
-+ at item @env{GPROFNG_USE_JAVA_OPTIONS}
-+may be set when profiling a C/C++ application that uses dlopen() to execute Java code.
-+
-+ at item @env{GPROFNG_SSH_REMOTE_DISPLAY}
-+use this variable to define the ssh command executed by the remote display tool.
-+
-+ at item @env{GPROFNG_SKIP_VALIDATION}
-+set this variable to disable checking hardware, system, and Java versions.
-+
-+ at item @env{GPROFNG_ALLOW_CORE_DUMP}
-+set this variable to allow a core file to be generated; otherwise an error report is created on /tmp.
-+
-+ at item @env{GPROFNG_ARCHIVE}
-+use this variable to define the settings for automatic archiving upon experiment recording completion.
-+
-+ at item @env{GPROFNG_ARCHIVE_COMMON_DIR}
-+set this variable to the location of the common archive.
-+
-+ at item @env{GPROFNG_JAVA_MAX_CALL_STACK_DEPTH}
-+set the depth of the Java call stack; the default is 256; set to 0 to disable capturing of call stacks.
-+
-+ at item @env{GPROFNG_JAVA_NATIVE_MAX_CALL_STACK_DEPTH}
-+set the depth of the Java native call stack; the default is 256; set to 0 to disable capturing of call stacks (JNI and assembly call stacks are not captured).
-+
-+ at end table
-+
-+ at c man end
-+
-+ at c man begin SEEALSO
-+The man pages for the various gprofng commands are not available yet, but
-+the @option{--help} option supported on each of the commands lists the options
-+and provides more information.
-+
-+For example this displays the options supported on the @command{gprofng collect app}
-+command:
-+
-+ at smallexample
-+$ gprofng collect app --help
-+ at end smallexample
-+
-+The user guide is available as an Info entry for @file{gprofng}.
-+ at c man end
-+
-+ at end ifset
-+
-+ at c man begin DESCRIPTION
-+ at c man end
-+
- @c -- A new node --------------------------------------------------------------
- @node    Introduction
- @chapter Introduction
---- a/gprofng/src/Makefile.am
-+++ b/gprofng/src/Makefile.am
-@@ -160,7 +160,7 @@ gp_display_text_LDADD = $(LIBGPROFNG) $(
- 
- if BUILD_MAN
- 
--man_MANS = gprofng.1 \
-+man_MANS = \
- 	gp-archive.1 \
- 	gp-collect-app.1 \
- 	gp-display-src.1 \
-@@ -191,10 +191,6 @@ H2M_FILTER = | sed 's/\.TP/\.TP\n.B/' |
-   | sed 's/See also:/\.SH SEE ALSO/' | sed 's/Documentation:/.SH DOCUMENTATION/' \
-   | sed 's/Limitations:/.SH LIMITATIONS/'
- 
--gprofng.1: $(srcdir)/gprofng.cc $(common_mandeps) | ./gprofng$(EXEEXT)
--	$(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \
--	  --name=$(TEXT_GPROFNG) ./gprofng$(EXEEXT) $(H2M_FILTER) > $@
--
- gp-archive.1: $(srcdir)/gp-archive.cc $(common_mandeps) | ./gp-archive$(EXEEXT)
- 	$(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \
- 	  --name=$(TEXT_GP_ARCHIVE) ./gp-archive$(EXEEXT) $(H2M_FILTER) > $@
-@@ -223,3 +219,5 @@ dist-hook: $(LIBGPROFNG)
- 
- install-data-local: install-pkglibLTLIBRARIES
- 	rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a
-+
-+$(srcdir)/DbeSession.cc: QLParser.tab.hh
---- a/gprofng/src/Makefile.in
-+++ b/gprofng/src/Makefile.in
-@@ -572,7 +572,7 @@ gp_display_src_SOURCES = gp-display-src.
- gp_display_src_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
- gp_display_text_SOURCES = gp-display-text.cc ipc.cc ipcio.cc
- gp_display_text_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
-- at BUILD_MAN_TRUE@man_MANS = gprofng.1 \
-+ at BUILD_MAN_TRUE@man_MANS = \
- @BUILD_MAN_TRUE@	gp-archive.1 \
- @BUILD_MAN_TRUE@	gp-collect-app.1 \
- @BUILD_MAN_TRUE@	gp-display-src.1 \
-@@ -1176,10 +1176,6 @@ uninstall-man: uninstall-man1
- QLParser.tab.cc QLParser.tab.hh: QLParser.yy
- 	$(BISON) $^
- 
-- at BUILD_MAN_TRUE@gprofng.1: $(srcdir)/gprofng.cc $(common_mandeps) | ./gprofng$(EXEEXT)
-- at BUILD_MAN_TRUE@	$(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \
-- at BUILD_MAN_TRUE@	  --name=$(TEXT_GPROFNG) ./gprofng$(EXEEXT) $(H2M_FILTER) > $@
--
- @BUILD_MAN_TRUE at gp-archive.1: $(srcdir)/gp-archive.cc $(common_mandeps) | ./gp-archive$(EXEEXT)
- @BUILD_MAN_TRUE@	$(AM_V_GEN)_BUILDING_MANPAGE=1 $(HELP2MAN) $(HELP2MAN_OPT) \
- @BUILD_MAN_TRUE@	  --name=$(TEXT_GP_ARCHIVE) ./gp-archive$(EXEEXT) $(H2M_FILTER) > $@
-@@ -1207,6 +1203,8 @@ dist-hook: $(LIBGPROFNG)
- install-data-local: install-pkglibLTLIBRARIES
- 	rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a
- 
-+$(srcdir)/DbeSession.cc: QLParser.tab.hh
-+
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
- # Otherwise a system limit (for SysV at least) may be exceeded.
- .NOEXPORT:
diff --git a/toolchain/binutils/patches/2.40/020-gprofng-PR30043-libgprofng.so.-are-installed-to-a-wr.patch b/toolchain/binutils/patches/2.40/020-gprofng-PR30043-libgprofng.so.-are-installed-to-a-wr.patch
deleted file mode 100644
index d8d76a2961..0000000000
--- a/toolchain/binutils/patches/2.40/020-gprofng-PR30043-libgprofng.so.-are-installed-to-a-wr.patch
+++ /dev/null
@@ -1,212 +0,0 @@
-From edd36b26f3506eeb259534ba2493e15c728cd280 Mon Sep 17 00:00:00 2001
-From: Vladimir Mezentsev <vladimir.mezentsev at oracle.com>
-Date: Wed, 25 Jan 2023 19:21:38 -0800
-Subject: [PATCH 20/50] gprofng: PR30043 libgprofng.so.* are installed to a
- wrong location
-
-gprofng/ChangeLog
-2023-01-25  Vladimir Mezentsev  <vladimir.mezentsev at oracle.com>
-
-	PR gprofng/30043
-	PR gprofng/28972
-	* src/Makefile.am: Use lib_LTLIBRARIES instead of pkglib_LTLIBRARIES.
-	* src/Makefile.in: Rebuild.
----
- gprofng/src/Makefile.am |  7 +---
- gprofng/src/Makefile.in | 76 +++++++++++++++++++----------------------
- 2 files changed, 37 insertions(+), 46 deletions(-)
-
---- a/gprofng/src/Makefile.am
-+++ b/gprofng/src/Makefile.am
-@@ -124,7 +124,7 @@ BUILT_SOURCES = QLParser.tab.hh
- EXTRA_DIST = QLParser.yy $(man_MANS)
- 
- 
--pkglib_LTLIBRARIES = $(LIBGPROFNG)
-+lib_LTLIBRARIES = $(LIBGPROFNG)
- libgprofng_la_SOURCES = $(CCSOURCES) $(CSOURCES)
- libgprofng_la_LDFLAGS = -version-info 0:0:0
- 
-@@ -215,9 +215,4 @@ endif
- # so ensure that the necessary libraries are built at dist time.
- dist-hook: $(LIBGPROFNG)
- 
--.PHONY: install-data-local
--
--install-data-local: install-pkglibLTLIBRARIES
--	rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a
--
- $(srcdir)/DbeSession.cc: QLParser.tab.hh
---- a/gprofng/src/Makefile.in
-+++ b/gprofng/src/Makefile.in
-@@ -155,9 +155,9 @@ am__uninstall_files_from_dir = { \
-     || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-          $(am__cd) "$$dir" && rm -f $$files; }; \
-   }
--am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" \
-+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \
- 	"$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)"
--LTLIBRARIES = $(pkglib_LTLIBRARIES)
-+LTLIBRARIES = $(lib_LTLIBRARIES)
- am__DEPENDENCIES_1 =
- libgprofng_la_DEPENDENCIES = $(top_builddir)/../opcodes/libopcodes.la \
- 	$(top_builddir)/../bfd/libbfd.la $(am__DEPENDENCIES_1)
-@@ -548,7 +548,7 @@ AM_CFLAGS = $(GPROFNG_CFLAGS) $(PTHREAD_
- AM_CXXFLAGS = $(AM_CFLAGS)
- BUILT_SOURCES = QLParser.tab.hh
- EXTRA_DIST = QLParser.yy $(man_MANS)
--pkglib_LTLIBRARIES = $(LIBGPROFNG)
-+lib_LTLIBRARIES = $(LIBGPROFNG)
- libgprofng_la_SOURCES = $(CCSOURCES) $(CSOURCES)
- libgprofng_la_LDFLAGS = -version-info 0:0:0
- 
-@@ -636,33 +636,33 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(
- 	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
- $(am__aclocal_m4_deps):
- 
--install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES)
-+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- 	@$(NORMAL_INSTALL)
--	@list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
-+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- 	list2=; for p in $$list; do \
- 	  if test -f $$p; then \
- 	    list2="$$list2 $$p"; \
- 	  else :; fi; \
- 	done; \
- 	test -z "$$list2" || { \
--	  echo " $(MKDIR_P) '$(DESTDIR)$(pkglibdir)'"; \
--	  $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" || exit 1; \
--	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \
--	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \
-+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
-+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
-+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
-+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
- 	}
- 
--uninstall-pkglibLTLIBRARIES:
-+uninstall-libLTLIBRARIES:
- 	@$(NORMAL_UNINSTALL)
--	@list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \
-+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
- 	for p in $$list; do \
- 	  $(am__strip_dir) \
--	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
--	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
-+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
-+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
- 	done
- 
--clean-pkglibLTLIBRARIES:
--	-test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES)
--	@list='$(pkglib_LTLIBRARIES)'; \
-+clean-libLTLIBRARIES:
-+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-+	@list='$(lib_LTLIBRARIES)'; \
- 	locs=`for p in $$list; do echo $$p; done | \
- 	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
- 	      sort -u`; \
-@@ -672,7 +672,7 @@ clean-pkglibLTLIBRARIES:
- 	}
- 
- libgprofng.la: $(libgprofng_la_OBJECTS) $(libgprofng_la_DEPENDENCIES) $(EXTRA_libgprofng_la_DEPENDENCIES) 
--	$(AM_V_CXXLD)$(libgprofng_la_LINK) -rpath $(pkglibdir) $(libgprofng_la_OBJECTS) $(libgprofng_la_LIBADD) $(LIBS)
-+	$(AM_V_CXXLD)$(libgprofng_la_LINK) -rpath $(libdir) $(libgprofng_la_OBJECTS) $(libgprofng_la_LIBADD) $(LIBS)
- install-binPROGRAMS: $(bin_PROGRAMS)
- 	@$(NORMAL_INSTALL)
- 	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
-@@ -1039,8 +1039,10 @@ check-am: all-am
- check: $(BUILT_SOURCES)
- 	$(MAKE) $(AM_MAKEFLAGS) check-am
- all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(MANS) $(DATA)
-+install-binPROGRAMS: install-libLTLIBRARIES
-+
- installdirs:
--	for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)"; do \
-+	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(dbedir)"; do \
- 	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
- 	done
- install: $(BUILT_SOURCES)
-@@ -1078,8 +1080,8 @@ maintainer-clean-generic:
- 	-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
- clean: clean-am
- 
--clean-am: clean-binPROGRAMS clean-generic clean-libtool \
--	clean-pkglibLTLIBRARIES mostlyclean-am
-+clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
-+	clean-libtool mostlyclean-am
- 
- distclean: distclean-am
- 	-rm -rf ./$(DEPDIR)
-@@ -1099,13 +1101,13 @@ info: info-am
- 
- info-am:
- 
--install-data-am: install-data-local install-dbeDATA install-man
-+install-data-am: install-dbeDATA install-man
- 
- install-dvi: install-dvi-am
- 
- install-dvi-am:
- 
--install-exec-am: install-binPROGRAMS install-pkglibLTLIBRARIES
-+install-exec-am: install-binPROGRAMS install-libLTLIBRARIES
- 
- install-html: install-html-am
- 
-@@ -1145,30 +1147,29 @@ ps: ps-am
- 
- ps-am:
- 
--uninstall-am: uninstall-binPROGRAMS uninstall-dbeDATA uninstall-man \
--	uninstall-pkglibLTLIBRARIES
-+uninstall-am: uninstall-binPROGRAMS uninstall-dbeDATA \
-+	uninstall-libLTLIBRARIES uninstall-man
- 
- uninstall-man: uninstall-man1
- 
- .MAKE: all check install install-am install-strip
- 
- .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
--	clean-binPROGRAMS clean-generic clean-libtool \
--	clean-pkglibLTLIBRARIES cscopelist-am ctags ctags-am dist-hook \
--	distclean distclean-compile distclean-generic \
--	distclean-libtool distclean-tags distdir dvi dvi-am html \
--	html-am info info-am install install-am install-binPROGRAMS \
--	install-data install-data-am install-data-local \
--	install-dbeDATA install-dvi install-dvi-am install-exec \
--	install-exec-am install-html install-html-am install-info \
--	install-info-am install-man install-man1 install-pdf \
--	install-pdf-am install-pkglibLTLIBRARIES install-ps \
-+	clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \
-+	clean-libtool cscopelist-am ctags ctags-am dist-hook distclean \
-+	distclean-compile distclean-generic distclean-libtool \
-+	distclean-tags distdir dvi dvi-am html html-am info info-am \
-+	install install-am install-binPROGRAMS install-data \
-+	install-data-am install-dbeDATA install-dvi install-dvi-am \
-+	install-exec install-exec-am install-html install-html-am \
-+	install-info install-info-am install-libLTLIBRARIES \
-+	install-man install-man1 install-pdf install-pdf-am install-ps \
- 	install-ps-am install-strip installcheck installcheck-am \
- 	installdirs maintainer-clean maintainer-clean-generic \
- 	mostlyclean mostlyclean-compile mostlyclean-generic \
- 	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
- 	uninstall-am uninstall-binPROGRAMS uninstall-dbeDATA \
--	uninstall-man uninstall-man1 uninstall-pkglibLTLIBRARIES
-+	uninstall-libLTLIBRARIES uninstall-man uninstall-man1
- 
- .PRECIOUS: Makefile
- 
-@@ -1198,11 +1199,6 @@ QLParser.tab.cc QLParser.tab.hh: QLParse
- # so ensure that the necessary libraries are built at dist time.
- dist-hook: $(LIBGPROFNG)
- 
--.PHONY: install-data-local
--
--install-data-local: install-pkglibLTLIBRARIES
--	rm -f $(DESTDIR)/$(pkglibdir)/*.la $(DESTDIR)/$(pkglibdir)/*.a
--
- $(srcdir)/DbeSession.cc: QLParser.tab.hh
- 
- # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/toolchain/binutils/patches/2.40/026-RISC-V-make-C-extension-JAL-available-again-for-32-b.patch b/toolchain/binutils/patches/2.40/026-RISC-V-make-C-extension-JAL-available-again-for-32-b.patch
deleted file mode 100644
index 4129a22906..0000000000
--- a/toolchain/binutils/patches/2.40/026-RISC-V-make-C-extension-JAL-available-again-for-32-b.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 27f59ec47a18277b6ea3548f405263ef558f5217 Mon Sep 17 00:00:00 2001
-From: Jan Beulich <jbeulich at suse.com>
-Date: Tue, 31 Jan 2023 09:47:22 +0100
-Subject: [PATCH 26/50] RISC-V: make C-extension JAL available again for
- (32-bit) assembly
-
-Along with the normal JAL alias, the C-extension one should have been
-moved as well by 839189bc932e ("RISC-V: re-arrange opcode table for
-consistent alias handling"), for the assembler to actually be able to
-use it where/when possible.
-
-Since neither this nor any other compressed branch insn was being tested
-so far, take the opportunity and introduce a new testcase covering those.
----
- gas/config/tc-riscv.c                 |  3 +++
- gas/testsuite/gas/riscv/c-branch-na.d | 20 ++++++++++++++++++++
- gas/testsuite/gas/riscv/c-branch.d    | 19 +++++++++++++++++++
- gas/testsuite/gas/riscv/c-branch.s    | 11 +++++++++++
- opcodes/riscv-opc.c                   |  2 +-
- 5 files changed, 54 insertions(+), 1 deletion(-)
- create mode 100644 gas/testsuite/gas/riscv/c-branch-na.d
- create mode 100644 gas/testsuite/gas/riscv/c-branch.d
- create mode 100644 gas/testsuite/gas/riscv/c-branch.s
-
---- a/gas/config/tc-riscv.c
-+++ b/gas/config/tc-riscv.c
-@@ -2762,6 +2762,8 @@ riscv_ip (char *str, struct riscv_cl_ins
- 		case 'p':
- 		  goto branch;
- 		case 'a':
-+		  if (oparg == insn->args + 1)
-+		    goto jump_check_gpr;
- 		  goto jump;
- 		case 'S': /* Floating-point RS1 x8-x15.  */
- 		  if (!reg_lookup (&asarg, RCLASS_FPR, &regno)
-@@ -3271,6 +3273,7 @@ riscv_ip (char *str, struct riscv_cl_ins
- 		 but the 2nd (with 2 operands) might.  */
- 	      if (oparg == insn->args)
- 		{
-+	    jump_check_gpr:
- 		  asargStart = asarg;
- 		  if (reg_lookup (&asarg, RCLASS_GPR, NULL)
- 		      && (*asarg == ',' || (ISSPACE (*asarg) && asarg[1] == ',')))
---- /dev/null
-+++ b/gas/testsuite/gas/riscv/c-branch-na.d
-@@ -0,0 +1,20 @@
-+#as: -march=rv32ic
-+#source: c-branch.s
-+#objdump: -drw -Mno-aliases
-+
-+.*:[ 	]+file format .*
-+
-+
-+Disassembly of section .text:
-+
-+0+ <target>:
-+[ 	]+[0-9a-f]+:[ 	]+c001[ 	]+c\.beqz[ 	]+s0,0 <target>[ 	]+0: R_RISCV_RVC_BRANCH	.*
-+[ 	]+[0-9a-f]+:[ 	]+dcfd[ 	]+c\.beqz[ 	]+s1,0 <target>[ 	]+2: R_RISCV_RVC_BRANCH	.*
-+[ 	]+[0-9a-f]+:[ 	]+fc75[ 	]+c\.bnez[ 	]+s0,0 <target>[ 	]+4: R_RISCV_RVC_BRANCH	.*
-+[ 	]+[0-9a-f]+:[ 	]+fced[ 	]+c\.bnez[ 	]+s1,0 <target>[ 	]+6: R_RISCV_RVC_BRANCH	.*
-+[ 	]+[0-9a-f]+:[ 	]+bfe5[ 	]+c\.j[ 	]+0 <target>[ 	]+8: R_RISCV_RVC_JUMP	.*
-+[ 	]+[0-9a-f]+:[ 	]+3fdd[ 	]+c\.jal[ 	]+0 <target>[ 	]+a: R_RISCV_RVC_JUMP	.*
-+[ 	]+[0-9a-f]+:[ 	]+9302[ 	]+c\.jalr[ 	]+t1
-+[ 	]+[0-9a-f]+:[ 	]+8382[ 	]+c\.jr[ 	]+t2
-+[ 	]+[0-9a-f]+:[ 	]+8082[ 	]+c\.jr[ 	]+ra
-+#...
---- /dev/null
-+++ b/gas/testsuite/gas/riscv/c-branch.d
-@@ -0,0 +1,19 @@
-+#as: -march=rv64ic
-+#objdump: -drw
-+
-+.*:[ 	]+file format .*
-+
-+
-+Disassembly of section .text:
-+
-+0+ <target>:
-+[ 	]+[0-9a-f]+:[ 	]+c001[ 	]+beqz[ 	]+s0,0 <target>[ 	]+0: R_RISCV_RVC_BRANCH	.*
-+[ 	]+[0-9a-f]+:[ 	]+dcfd[ 	]+beqz[ 	]+s1,0 <target>[ 	]+2: R_RISCV_RVC_BRANCH	.*
-+[ 	]+[0-9a-f]+:[ 	]+fc75[ 	]+bnez[ 	]+s0,0 <target>[ 	]+4: R_RISCV_RVC_BRANCH	.*
-+[ 	]+[0-9a-f]+:[ 	]+fced[ 	]+bnez[ 	]+s1,0 <target>[ 	]+6: R_RISCV_RVC_BRANCH	.*
-+[ 	]+[0-9a-f]+:[ 	]+bfe5[ 	]+j[ 	]+0 <target>[ 	]+8: R_RISCV_RVC_JUMP	.*
-+[ 	]+[0-9a-f]+:[ 	]+ff7ff0ef[ 	]+jal[ 	]+0 <target>[ 	]+a: R_RISCV_JAL	.*
-+[ 	]+[0-9a-f]+:[ 	]+9302[ 	]+jalr[ 	]+t1
-+[ 	]+[0-9a-f]+:[ 	]+8382[ 	]+jr[ 	]+t2
-+[ 	]+[0-9a-f]+:[ 	]+8082[ 	]+ret
-+#...
---- /dev/null
-+++ b/gas/testsuite/gas/riscv/c-branch.s
-@@ -0,0 +1,11 @@
-+	.text
-+target:
-+	beq	x8, x0, target
-+	beqz	x9, target
-+	bne	x8, x0, target
-+	bnez	x9, target
-+	j	target
-+	jal	target
-+	jalr	x6
-+	jr	x7
-+	ret
---- a/opcodes/riscv-opc.c
-+++ b/opcodes/riscv-opc.c
-@@ -340,9 +340,9 @@ const struct riscv_opcode riscv_opcodes[
- {"jalr",        0, INSN_CLASS_I, "d,s,j",     MATCH_JALR, MASK_JALR, match_opcode, INSN_JSR },
- {"j",           0, INSN_CLASS_C, "Ca",        MATCH_C_J, MASK_C_J, match_opcode, INSN_ALIAS|INSN_BRANCH },
- {"j",           0, INSN_CLASS_I, "a",         MATCH_JAL, MASK_JAL|MASK_RD, match_opcode, INSN_ALIAS|INSN_BRANCH },
-+{"jal",        32, INSN_CLASS_C, "Ca",        MATCH_C_JAL, MASK_C_JAL, match_opcode, INSN_ALIAS|INSN_JSR },
- {"jal",         0, INSN_CLASS_I, "a",         MATCH_JAL|(X_RA << OP_SH_RD), MASK_JAL|MASK_RD, match_opcode, INSN_ALIAS|INSN_JSR },
- {"jal",         0, INSN_CLASS_I, "d,a",       MATCH_JAL, MASK_JAL, match_opcode, INSN_JSR },
--{"jal",        32, INSN_CLASS_C, "Ca",        MATCH_C_JAL, MASK_C_JAL, match_opcode, INSN_ALIAS|INSN_JSR },
- {"call",        0, INSN_CLASS_I, "d,c",       (X_T1 << OP_SH_RS1), (int) M_CALL, match_never, INSN_MACRO },
- {"call",        0, INSN_CLASS_I, "c",         (X_RA << OP_SH_RS1)|(X_RA << OP_SH_RD), (int) M_CALL, match_never, INSN_MACRO },
- {"tail",        0, INSN_CLASS_I, "c",         (X_T1 << OP_SH_RS1), (int) M_CALL, match_never, INSN_MACRO },
diff --git a/toolchain/binutils/patches/2.40/034-bpf-fix-error-conversion-from-long-unsigned-int-to-u.patch b/toolchain/binutils/patches/2.40/034-bpf-fix-error-conversion-from-long-unsigned-int-to-u.patch
deleted file mode 100644
index d4317cdb0f..0000000000
--- a/toolchain/binutils/patches/2.40/034-bpf-fix-error-conversion-from-long-unsigned-int-to-u.patch
+++ /dev/null
@@ -1,209 +0,0 @@
-From 3e888977f165594cf44dbe8f67e3a4960b22c11f Mon Sep 17 00:00:00 2001
-From: "Guillermo E. Martinez" <guillermo.e.martinez at oracle.com>
-Date: Fri, 3 Feb 2023 11:17:49 -0600
-Subject: [PATCH 34/50] bpf: fix error conversion from long unsigned int to
- unsigned int [-Werror=overflow]
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Regenerating BPF target using the maintainer mode emits:
-.../opcodes/bpf-opc.c:57:11: error: conversion from ?long unsigned int? to ?unsigned int? changes value from ?18446744073709486335? to ?4294902015? [-Werror=overflow]
-  57 |   64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-
-The use of a narrow size to handle the mask CGEN in instruction format
-is causing this error.  Additionally eBPF `call' instructions
-constructed by expressions using symbols (BPF_PSEUDO_CALL) emits
-annotations in `src' field of the instruction, used to identify BPF
-target endianness.
-
-cpu/
-	* bpf.cpu (define-call-insn): Remove `src' field from
-	instruction mask.
-
-include/
-	*opcode/cge.h (CGEN_IFMT): Adjust mask bit width.
-
-opcodes/
-	* bpf-opc.c: Regenerate.
-
-(cherry picked from commit 7f6ebecd56e690012b05af0a492280765b17f186)
----
- cpu/bpf.cpu           |  2 +-
- include/opcode/cgen.h |  2 +-
- opcodes/bpf-opc.c     | 54 +++++++++++++++++++++++--------------------
- opcodes/cgen-dis.c    |  2 +-
- 4 files changed, 32 insertions(+), 28 deletions(-)
-
---- a/cpu/bpf.cpu
-+++ b/cpu/bpf.cpu
-@@ -768,7 +768,7 @@
-        "call"
-        (endian-isas x-endian)
-        "call $disp32"
--       (+ disp32 (f-offset16 0) (f-regs 0)
-+       (+ disp32 (f-offset16 0) (.sym src x-endian) ((.sym f-dst x-endian) 0)
-           OP_CLASS_JMP OP_SRC_K OP_CODE_CALL)
-        (c-call VOID
-                "bpfbf_call" disp32 (ifield (.sym f-src x-endian)))
---- a/include/opcode/cgen.h
-+++ b/include/opcode/cgen.h
-@@ -914,7 +914,7 @@ typedef struct
-      Each insn's value is stored with the insn.
-      The first step in recognizing an insn for disassembly is
-      (opcode & mask) == value.  */
--  CGEN_INSN_INT mask;
-+  CGEN_INSN_LGUINT mask;
- #define CGEN_IFMT_MASK(ifmt) ((ifmt)->mask)
- 
-   /* Instruction fields.
---- a/opcodes/bpf-opc.c
-+++ b/opcodes/bpf-opc.c
-@@ -50,99 +50,103 @@ static const CGEN_IFMT ifmt_empty ATTRIB
- };
- 
- static const CGEN_IFMT ifmt_addile ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_addrle ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_negle ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xfffffffffffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_addibe ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_addrbe ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffffffffffff00ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_negbe ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffffffffffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_endlele ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_endlebe ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_lddwle ATTRIBUTE_UNUSED = {
--  64, 128, 0xff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 128, 0xfffff0ff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_lddwbe ATTRIBUTE_UNUSED = {
--  64, 128, 0xff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 128, 0xffff0fff, { { F (F_IMM64) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_ldabsw ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffffffff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_ldindwle ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_ldindwbe ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_ldxwle ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_ldxwbe ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_stble ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xf0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_DSTLE) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_stbbe ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xfff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_MODE) }, { F (F_OP_SIZE) }, { F (F_SRCBE) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_jeqile ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xf0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_jeqrle ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_jeqibe ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xfff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_jeqrbe ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffffffff000000ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_callle ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffff0fff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_SRCLE) }, { F (F_OP_CODE) }, { F (F_DSTLE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+};
-+
-+static const CGEN_IFMT ifmt_callbe ATTRIBUTE_UNUSED = {
-+  64, 64, 0xfffff0ff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_DSTBE) }, { F (F_OP_CODE) }, { F (F_SRCBE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_ja ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffffffff0000ffff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- static const CGEN_IFMT ifmt_exit ATTRIBUTE_UNUSED = {
--  64, 64, 0xff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
-+  64, 64, 0xffffffffffffffff, { { F (F_IMM32) }, { F (F_OFFSET16) }, { F (F_REGS) }, { F (F_OP_CODE) }, { F (F_OP_SRC) }, { F (F_OP_CLASS) }, { 0 } }
- };
- 
- #undef F
-@@ -1646,7 +1650,7 @@ static const CGEN_OPCODE bpf_cgen_insn_o
-   {
-     { 0, 0, 0, 0 },
-     { { MNEM, ' ', OP (DISP32), 0 } },
--    & ifmt_callle, { 0x85 }
-+    & ifmt_callbe, { 0x85 }
-   },
- /* call $dstle */
-   {
---- a/opcodes/cgen-dis.c
-+++ b/opcodes/cgen-dis.c
-@@ -39,7 +39,7 @@ static void		 add_insn_to_hash_chain (CG
- static int
- count_decodable_bits (const CGEN_INSN *insn)
- {
--  unsigned mask = CGEN_INSN_BASE_MASK (insn);
-+  CGEN_INSN_LGUINT mask = CGEN_INSN_BASE_MASK (insn);
- #if GCC_VERSION >= 3004
-   return __builtin_popcount (mask);
- #else
diff --git a/toolchain/binutils/patches/2.40/035-Pass-JANSSON_LIBS-and-ZSTD_LIBS-to-ld-bootstrap-boot.patch b/toolchain/binutils/patches/2.40/035-Pass-JANSSON_LIBS-and-ZSTD_LIBS-to-ld-bootstrap-boot.patch
deleted file mode 100644
index 3741c08a0c..0000000000
--- a/toolchain/binutils/patches/2.40/035-Pass-JANSSON_LIBS-and-ZSTD_LIBS-to-ld-bootstrap-boot.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From e1815414077347097e5bf0d75162add955e241d9 Mon Sep 17 00:00:00 2001
-From: Romain Geissler <romain.geissler at amadeus.com>
-Date: Sun, 5 Feb 2023 13:56:34 +0000
-Subject: [PATCH 35/50] Pass $JANSSON_LIBS and $ZSTD_LIBS to
- ld-bootstrap/bootrap.exp
-
----
- ld/Makefile.am                          | 1 +
- ld/Makefile.in                          | 1 +
- ld/testsuite/ld-bootstrap/bootstrap.exp | 4 ++--
- 3 files changed, 4 insertions(+), 2 deletions(-)
-
---- a/ld/Makefile.am
-+++ b/ld/Makefile.am
-@@ -992,6 +992,7 @@ check-DEJAGNU: site.exp
- 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
- 		OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \
- 		SFRAMELIB="$(TESTSFRAMELIB)" \
-+		JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \
- 		LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
- 		DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \
- 		$(RUNTESTFLAGS); \
---- a/ld/Makefile.in
-+++ b/ld/Makefile.in
-@@ -2645,6 +2645,7 @@ check-DEJAGNU: site.exp
- 		CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
- 		OFILES="$(OFILES)" BFDLIB="$(TESTBFDLIB)" CTFLIB="$(TESTCTFLIB) $(ZLIB)" \
- 		SFRAMELIB="$(TESTSFRAMELIB)" \
-+		JANSSON_LIBS="$(JANSSON_LIBS)" ZSTD_LIBS="$(ZSTD_LIBS)" \
- 		LIBIBERTY="$(LIBIBERTY) $(LIBINTL)" LIBS="$(LIBS)" \
- 		DO_COMPARE="`echo '$(do_compare)' | sed -e 's,\\$$,,g'`" \
- 		$(RUNTESTFLAGS); \
---- a/ld/testsuite/ld-bootstrap/bootstrap.exp
-+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
-@@ -162,13 +162,13 @@ foreach flags $test_flags {
-     }
- 
-     if { [lindex [remote_exec build grep "-q \"HAVE_ZSTD 1\" config.h" ] 0] == 0 } then {
--	set extralibs "$extralibs -lzstd"
-+	set extralibs "$extralibs $ZSTD_LIBS"
-     }
- 
-     # Check if the system's jansson library is used. If so, the object files will
-     # be using symbols from it, so link to it.
-     if { [lindex [remote_exec build grep "-q \"HAVE_JANSSON 1\" config.h" ] 0] == 0 } then {
--	set extralibs "$extralibs -ljansson"
-+	set extralibs "$extralibs $JANSSON_LIBS"
-     }
- 
-     # Plugin support requires linking with libdl.
diff --git a/toolchain/binutils/patches/2.40/036-Regen-config-files.patch b/toolchain/binutils/patches/2.40/036-Regen-config-files.patch
deleted file mode 100644
index 1c80dde310..0000000000
--- a/toolchain/binutils/patches/2.40/036-Regen-config-files.patch
+++ /dev/null
@@ -1,714 +0,0 @@
-From 1fc096a4c590f28e0efb1823cdca653f2db9de74 Mon Sep 17 00:00:00 2001
-From: Alan Modra <amodra at gmail.com>
-Date: Mon, 6 Feb 2023 10:48:59 +1030
-Subject: [PATCH 36/50] Regen config files
-
-For the version update to 2.40.0
----
- bfd/configure                  | 20 ++++++++++----------
- binutils/configure             | 20 ++++++++++----------
- gas/configure                  | 20 ++++++++++----------
- gprof/configure                | 20 ++++++++++----------
- gprofng/configure              | 20 ++++++++++----------
- gprofng/doc/version.texi       |  8 ++++----
- gprofng/libcollector/configure | 20 ++++++++++----------
- intl/configure                 |  3 +++
- ld/configure                   | 20 ++++++++++----------
- opcodes/configure              | 20 ++++++++++----------
- 10 files changed, 87 insertions(+), 84 deletions(-)
-
---- a/bfd/configure
-+++ b/bfd/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for bfd 2.40.
-+# Generated by GNU Autoconf 2.69 for bfd 2.40.0.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='bfd'
- PACKAGE_TARNAME='bfd'
--PACKAGE_VERSION='2.40'
--PACKAGE_STRING='bfd 2.40'
-+PACKAGE_VERSION='2.40.0'
-+PACKAGE_STRING='bfd 2.40.0'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1400,7 +1400,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures bfd 2.40 to adapt to many kinds of systems.
-+\`configure' configures bfd 2.40.0 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1471,7 +1471,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of bfd 2.40:";;
-+     short | recursive ) echo "Configuration of bfd 2.40.0:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1608,7 +1608,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--bfd configure 2.40
-+bfd configure 2.40.0
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -2202,7 +2202,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by bfd $as_me 2.40, which was
-+It was created by bfd $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -3184,7 +3184,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='bfd'
-- VERSION='2.40'
-+ VERSION='2.40.0'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -15906,7 +15906,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by bfd $as_me 2.40, which was
-+This file was extended by bfd $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -15972,7 +15972,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--bfd config.status 2.40
-+bfd config.status 2.40.0
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
---- a/binutils/configure
-+++ b/binutils/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for binutils 2.40.
-+# Generated by GNU Autoconf 2.69 for binutils 2.40.0.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='binutils'
- PACKAGE_TARNAME='binutils'
--PACKAGE_VERSION='2.40'
--PACKAGE_STRING='binutils 2.40'
-+PACKAGE_VERSION='2.40.0'
-+PACKAGE_STRING='binutils 2.40.0'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1401,7 +1401,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures binutils 2.40 to adapt to many kinds of systems.
-+\`configure' configures binutils 2.40.0 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1472,7 +1472,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of binutils 2.40:";;
-+     short | recursive ) echo "Configuration of binutils 2.40.0:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1631,7 +1631,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--binutils configure 2.40
-+binutils configure 2.40.0
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -2099,7 +2099,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by binutils $as_me 2.40, which was
-+It was created by binutils $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -3081,7 +3081,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='binutils'
-- VERSION='2.40'
-+ VERSION='2.40.0'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -15326,7 +15326,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by binutils $as_me 2.40, which was
-+This file was extended by binutils $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -15392,7 +15392,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--binutils config.status 2.40
-+binutils config.status 2.40.0
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
---- a/gas/configure
-+++ b/gas/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for gas 2.40.
-+# Generated by GNU Autoconf 2.69 for gas 2.40.0.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='gas'
- PACKAGE_TARNAME='gas'
--PACKAGE_VERSION='2.40'
--PACKAGE_STRING='gas 2.40'
-+PACKAGE_VERSION='2.40.0'
-+PACKAGE_STRING='gas 2.40.0'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1381,7 +1381,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures gas 2.40 to adapt to many kinds of systems.
-+\`configure' configures gas 2.40.0 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1452,7 +1452,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of gas 2.40:";;
-+     short | recursive ) echo "Configuration of gas 2.40.0:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1600,7 +1600,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--gas configure 2.40
-+gas configure 2.40.0
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -2011,7 +2011,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by gas $as_me 2.40, which was
-+It was created by gas $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -2990,7 +2990,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='gas'
-- VERSION='2.40'
-+ VERSION='2.40.0'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -14910,7 +14910,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by gas $as_me 2.40, which was
-+This file was extended by gas $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -14976,7 +14976,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--gas config.status 2.40
-+gas config.status 2.40.0
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
---- a/gprof/configure
-+++ b/gprof/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for gprof 2.40.
-+# Generated by GNU Autoconf 2.69 for gprof 2.40.0.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='gprof'
- PACKAGE_TARNAME='gprof'
--PACKAGE_VERSION='2.40'
--PACKAGE_STRING='gprof 2.40'
-+PACKAGE_VERSION='2.40.0'
-+PACKAGE_STRING='gprof 2.40.0'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1338,7 +1338,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures gprof 2.40 to adapt to many kinds of systems.
-+\`configure' configures gprof 2.40.0 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1409,7 +1409,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of gprof 2.40:";;
-+     short | recursive ) echo "Configuration of gprof 2.40.0:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1520,7 +1520,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--gprof configure 2.40
-+gprof configure 2.40.0
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -1885,7 +1885,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by gprof $as_me 2.40, which was
-+It was created by gprof $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -2864,7 +2864,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='gprof'
-- VERSION='2.40'
-+ VERSION='2.40.0'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -12572,7 +12572,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by gprof $as_me 2.40, which was
-+This file was extended by gprof $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -12638,7 +12638,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--gprof config.status 2.40
-+gprof config.status 2.40.0
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
---- a/gprofng/configure
-+++ b/gprofng/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for gprofng 2.40.
-+# Generated by GNU Autoconf 2.69 for gprofng 2.40.0.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='gprofng'
- PACKAGE_TARNAME='gprofng'
--PACKAGE_VERSION='2.40'
--PACKAGE_STRING='gprofng 2.40'
-+PACKAGE_VERSION='2.40.0'
-+PACKAGE_STRING='gprofng 2.40.0'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1364,7 +1364,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures gprofng 2.40 to adapt to many kinds of systems.
-+\`configure' configures gprofng 2.40.0 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1435,7 +1435,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of gprofng 2.40:";;
-+     short | recursive ) echo "Configuration of gprofng 2.40.0:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1549,7 +1549,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--gprofng configure 2.40
-+gprofng configure 2.40.0
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -2081,7 +2081,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by gprofng $as_me 2.40, which was
-+It was created by gprofng $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -3054,7 +3054,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='gprofng'
-- VERSION='2.40'
-+ VERSION='2.40.0'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -17528,7 +17528,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by gprofng $as_me 2.40, which was
-+This file was extended by gprofng $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -17594,7 +17594,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--gprofng config.status 2.40
-+gprofng config.status 2.40.0
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
---- a/gprofng/doc/version.texi
-+++ b/gprofng/doc/version.texi
-@@ -1,4 +1,4 @@
-- at set UPDATED 5 January 2023
-- at set UPDATED-MONTH January 2023
-- at set EDITION 2.40
-- at set VERSION 2.40
-+ at set UPDATED 1 February 2023
-+ at set UPDATED-MONTH February 2023
-+ at set EDITION 2.40.0
-+ at set VERSION 2.40.0
---- a/gprofng/libcollector/configure
-+++ b/gprofng/libcollector/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for gprofng 2.40.
-+# Generated by GNU Autoconf 2.69 for gprofng 2.40.0.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='gprofng'
- PACKAGE_TARNAME='gprofng'
--PACKAGE_VERSION='2.40'
--PACKAGE_STRING='gprofng 2.40'
-+PACKAGE_VERSION='2.40.0'
-+PACKAGE_STRING='gprofng 2.40.0'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1325,7 +1325,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures gprofng 2.40 to adapt to many kinds of systems.
-+\`configure' configures gprofng 2.40.0 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1396,7 +1396,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of gprofng 2.40:";;
-+     short | recursive ) echo "Configuration of gprofng 2.40.0:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1505,7 +1505,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--gprofng configure 2.40
-+gprofng configure 2.40.0
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -1991,7 +1991,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by gprofng $as_me 2.40, which was
-+It was created by gprofng $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -2968,7 +2968,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='gprofng'
-- VERSION='2.40'
-+ VERSION='2.40.0'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -16098,7 +16098,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by gprofng $as_me 2.40, which was
-+This file was extended by gprofng $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -16164,7 +16164,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--gprofng config.status 2.40
-+gprofng config.status 2.40.0
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
---- a/intl/configure
-+++ b/intl/configure
-@@ -6857,6 +6857,9 @@ case "${host}" in
- 	# sets the default TLS model and affects inlining.
- 	PICFLAG=-fPIC
- 	;;
-+    loongarch*-*-*)
-+	PICFLAG=-fpic
-+	;;
-     mips-sgi-irix6*)
- 	# PIC is the default.
- 	;;
---- a/ld/configure
-+++ b/ld/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for ld 2.40.
-+# Generated by GNU Autoconf 2.69 for ld 2.40.0.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='ld'
- PACKAGE_TARNAME='ld'
--PACKAGE_VERSION='2.40'
--PACKAGE_STRING='ld 2.40'
-+PACKAGE_VERSION='2.40.0'
-+PACKAGE_STRING='ld 2.40.0'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1423,7 +1423,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures ld 2.40 to adapt to many kinds of systems.
-+\`configure' configures ld 2.40.0 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1494,7 +1494,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of ld 2.40:";;
-+     short | recursive ) echo "Configuration of ld 2.40.0:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1661,7 +1661,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--ld configure 2.40
-+ld configure 2.40.0
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -2376,7 +2376,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by ld $as_me 2.40, which was
-+It was created by ld $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -3359,7 +3359,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='ld'
-- VERSION='2.40'
-+ VERSION='2.40.0'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -18083,7 +18083,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by ld $as_me 2.40, which was
-+This file was extended by ld $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -18149,7 +18149,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--ld config.status 2.40
-+ld config.status 2.40.0
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
---- a/opcodes/configure
-+++ b/opcodes/configure
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for opcodes 2.40.
-+# Generated by GNU Autoconf 2.69 for opcodes 2.40.0.
- #
- #
- # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
-@@ -587,8 +587,8 @@ MAKEFLAGS=
- # Identity of this package.
- PACKAGE_NAME='opcodes'
- PACKAGE_TARNAME='opcodes'
--PACKAGE_VERSION='2.40'
--PACKAGE_STRING='opcodes 2.40'
-+PACKAGE_VERSION='2.40.0'
-+PACKAGE_STRING='opcodes 2.40.0'
- PACKAGE_BUGREPORT=''
- PACKAGE_URL=''
- 
-@@ -1360,7 +1360,7 @@ if test "$ac_init_help" = "long"; then
-   # Omit some internal or obsolete options to make the list less imposing.
-   # This message is too long to be a string in the A/UX 3.1 sh.
-   cat <<_ACEOF
--\`configure' configures opcodes 2.40 to adapt to many kinds of systems.
-+\`configure' configures opcodes 2.40.0 to adapt to many kinds of systems.
- 
- Usage: $0 [OPTION]... [VAR=VALUE]...
- 
-@@ -1431,7 +1431,7 @@ fi
- 
- if test -n "$ac_init_help"; then
-   case $ac_init_help in
--     short | recursive ) echo "Configuration of opcodes 2.40:";;
-+     short | recursive ) echo "Configuration of opcodes 2.40.0:";;
-    esac
-   cat <<\_ACEOF
- 
-@@ -1545,7 +1545,7 @@ fi
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
-   cat <<\_ACEOF
--opcodes configure 2.40
-+opcodes configure 2.40.0
- generated by GNU Autoconf 2.69
- 
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -2139,7 +2139,7 @@ cat >config.log <<_ACEOF
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
- 
--It was created by opcodes $as_me 2.40, which was
-+It was created by opcodes $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   $ $0 $@
-@@ -3118,7 +3118,7 @@ fi
- 
- # Define the identity of the package.
-  PACKAGE='opcodes'
-- VERSION='2.40'
-+ VERSION='2.40.0'
- 
- 
- cat >>confdefs.h <<_ACEOF
-@@ -13191,7 +13191,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by opcodes $as_me 2.40, which was
-+This file was extended by opcodes $as_me 2.40.0, which was
- generated by GNU Autoconf 2.69.  Invocation command line was
- 
-   CONFIG_FILES    = $CONFIG_FILES
-@@ -13257,7 +13257,7 @@ _ACEOF
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--opcodes config.status 2.40
-+opcodes config.status 2.40.0
- configured by $0, generated by GNU Autoconf 2.69,
-   with options \\"\$ac_cs_config\\"
- 
diff --git a/toolchain/binutils/patches/2.40/040-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch b/toolchain/binutils/patches/2.40/040-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch
deleted file mode 100644
index 261acb549e..0000000000
--- a/toolchain/binutils/patches/2.40/040-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 17294931e3e361bee6810b1a39493e214b38c5e5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= <chigot at adacore.com>
-Date: Tue, 3 Jan 2023 14:24:43 +0100
-Subject: [PATCH 40/50] configure: remove dependencies on gmp and mpfr when gdb
- is disabled
-
-Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks
-about GMP and MPFR for gdb builds have been moved to the toplevel
-configure.
-However, it doesn't take into account the --disable-gdb option. Meaning
-that a build without gdb will require these libraries even if not
-needed.
-
-ChangeLog:
-
-	* configure.ac: Skip GMP and MPFR when --disable-gdb is
-	provided.
-	* configure: Regenerate.
-
-(cherry picked from commit 5fb0e308577143ceb313fde5538dc9ecb038f29f)
----
- configure    | 4 +++-
- configure.ac | 4 +++-
- 2 files changed, 6 insertions(+), 2 deletions(-)
-
---- a/configure
-+++ b/configure
-@@ -8032,7 +8032,9 @@ if test -d ${srcdir}/gcc ; then
-   require_mpc=yes
- fi
- if test -d ${srcdir}/gdb ; then
--  require_gmp=yes
-+  if test "x$enable_gdb" != xno; then
-+   require_gmp=yes
-+  fi
- fi
- 
- gmplibs="-lmpfr -lgmp"
---- a/configure.ac
-+++ b/configure.ac
-@@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then
-   require_mpc=yes
- fi
- if test -d ${srcdir}/gdb ; then
--  require_gmp=yes
-+  if test "x$enable_gdb" != xno; then
-+   require_gmp=yes
-+  fi
- fi
- 
- gmplibs="-lmpfr -lgmp"
diff --git a/toolchain/binutils/patches/2.40/046-gas-correct-symbol-name-comparison-in-.startof.-.siz.patch b/toolchain/binutils/patches/2.40/046-gas-correct-symbol-name-comparison-in-.startof.-.siz.patch
deleted file mode 100644
index 4e31bb43ed..0000000000
--- a/toolchain/binutils/patches/2.40/046-gas-correct-symbol-name-comparison-in-.startof.-.siz.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From b2bc62b7b4e7638c3a249d2d2728ceb4d5f2b22c Mon Sep 17 00:00:00 2001
-From: Jan Beulich <jbeulich at suse.com>
-Date: Tue, 14 Feb 2023 08:35:02 +0100
-Subject: [PATCH 46/50] gas: correct symbol name comparison in
- .startof./.sizeof. handling
-
-In 162c6aef1f3a ("gas: fold symbol table entries generated for
-.startof.() / .sizeof.()") I screwed up quite badly, inverting the case
-sensitive and case insensitive comparison functions.
----
- gas/expr.c                      | 4 ++--
- gas/testsuite/gas/elf/startof.d | 2 ++
- gas/testsuite/gas/elf/startof.s | 3 +++
- 3 files changed, 7 insertions(+), 2 deletions(-)
-
---- a/gas/expr.c
-+++ b/gas/expr.c
-@@ -149,8 +149,8 @@ symbol_lookup_or_make (const char *name,
- 
-     name = S_GET_NAME (symbolP);
-     if ((symbols_case_sensitive
--	 ? strcasecmp (buf, name)
--	 : strcmp (buf, name)) == 0)
-+	 ? strcmp (buf, name)
-+	 : strcasecmp (buf, name)) == 0)
-       {
- 	free (buf);
- 	return symbolP;
---- a/gas/testsuite/gas/elf/startof.d
-+++ b/gas/testsuite/gas/elf/startof.d
-@@ -7,4 +7,6 @@ Symbol table .*
- #...
-      [1-8]: 0+ .* UND \.startof\.\.text
-      [2-9]: 0+ .* UND \.sizeof\.\.text
-+ +[1-9][0-9]*: 0+ .* UND \.startof\.\.Text
-+ +[1-9][0-9]*: 0+ .* UND \.sizeof\.\.TEXT
- #pass
---- a/gas/testsuite/gas/elf/startof.s
-+++ b/gas/testsuite/gas/elf/startof.s
-@@ -4,3 +4,6 @@
- 	.dc.a	0
- 	.dc.a	.sizeof.(.text)
- 	.dc.a	.startof.(.text)
-+	.dc.a	0
-+	.dc.a	.startof.(.Text)
-+	.dc.a	.sizeof.(.TEXT)
diff --git a/toolchain/binutils/patches/2.40/050-PR-32372-opcodes-fix-std-gnu23-compatibility-wrt-static_asser.patch b/toolchain/binutils/patches/2.40/050-PR-32372-opcodes-fix-std-gnu23-compatibility-wrt-static_asser.patch
deleted file mode 100644
index 3364e9ae04..0000000000
--- a/toolchain/binutils/patches/2.40/050-PR-32372-opcodes-fix-std-gnu23-compatibility-wrt-static_asser.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 8ebe62f3f0d27806b1bf69f301f5e188b4acd2b4 Mon Sep 17 00:00:00 2001
-From: Sam James <sam at gentoo.org>
-Date: Sat, 16 Nov 2024 05:03:52 +0000
-Subject: [PATCH] opcodes: fix -std=gnu23 compatibility wrt static_assert
-
-static_assert is declared in C23 so we can't reuse that identifier:
-* Define our own static_assert conditionally;
-
-* Rename "static assert" hacks to _N as we do already in some places
-  to avoid a conflict.
-
-ChangeLog:
-	PR ld/32372
-
-        * i386-gen.c (static_assert): Define conditionally.
-        * mips-formats.h (MAPPED_INT): Rename identifier.
-        (MAPPED_REG): Rename identifier.
-        (OPTIONAL_MAPPED_REG): Rename identifier.
-        * s390-opc.c (static_assert): Define conditionally.
----
- opcodes/i386-gen.c     | 2 ++
- opcodes/mips-formats.h | 6 +++---
- opcodes/s390-opc.c     | 2 ++
- 3 files changed, 7 insertions(+), 3 deletions(-)
-
---- a/opcodes/i386-gen.c
-+++ b/opcodes/i386-gen.c
-@@ -33,7 +33,9 @@
- 
- /* Build-time checks are preferrable over runtime ones.  Use this construct
-    in preference where possible.  */
-+#ifndef static_assert
- #define static_assert(e) ((void)sizeof (struct { int _:1 - 2 * !(e); }))
-+#endif
- 
- static const char *program_name = NULL;
- static int debug = 0;
---- a/opcodes/mips-formats.h
-+++ b/opcodes/mips-formats.h
-@@ -49,7 +49,7 @@
- #define MAPPED_INT(SIZE, LSB, MAP, PRINT_HEX) \
-   { \
-     typedef char ATTRIBUTE_UNUSED \
--      static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
-+      static_assert_3[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
-     static const struct mips_mapped_int_operand op = { \
-       { OP_MAPPED_INT, SIZE, LSB }, MAP, PRINT_HEX \
-     }; \
-@@ -83,7 +83,7 @@
- #define MAPPED_REG(SIZE, LSB, BANK, MAP) \
-   { \
-     typedef char ATTRIBUTE_UNUSED \
--      static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
-+      static_assert_4[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
-     static const struct mips_reg_operand op = { \
-       { OP_REG, SIZE, LSB }, OP_REG_##BANK, MAP \
-     }; \
-@@ -93,7 +93,7 @@
- #define OPTIONAL_MAPPED_REG(SIZE, LSB, BANK, MAP) \
-   { \
-     typedef char ATTRIBUTE_UNUSED \
--      static_assert[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
-+      static_assert_5[(1 << (SIZE)) == ARRAY_SIZE (MAP)]; \
-     static const struct mips_reg_operand op = { \
-       { OP_OPTIONAL_REG, SIZE, LSB }, OP_REG_##BANK, MAP \
-     }; \
diff --git a/toolchain/binutils/patches/2.40/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.40/300-001_ld_makefile_patch.patch
deleted file mode 100644
index 2dafd92a01..0000000000
--- a/toolchain/binutils/patches/2.40/300-001_ld_makefile_patch.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/ld/Makefile.am
-+++ b/ld/Makefile.am
-@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- 
- EMUL = @EMUL@
- EMULATION_OFILES = @EMULATION_OFILES@
---- a/ld/Makefile.in
-+++ b/ld/Makefile.in
-@@ -573,7 +573,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS)
- # We put the scripts in the directory $(scriptdir)/ldscripts.
- # We can't put the scripts in $(datadir) because the SEARCH_DIR
- # directives need to be different for native and cross linkers.
--scriptdir = $(tooldir)/lib
-+scriptdir = $(libdir)
- BASEDIR = $(srcdir)/..
- BFDDIR = $(BASEDIR)/bfd
- INCDIR = $(BASEDIR)/include
diff --git a/toolchain/binutils/patches/2.40/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.40/400-mips_no_dynamic_linking_sym.patch
deleted file mode 100644
index aeb5a993a6..0000000000
--- a/toolchain/binutils/patches/2.40/400-mips_no_dynamic_linking_sym.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/bfd/elfxx-mips.c
-+++ b/bfd/elfxx-mips.c
-@@ -8119,6 +8119,7 @@ _bfd_mips_elf_create_dynamic_sections (b
- 
-       name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING";
-       bh = NULL;
-+      if (0) {
-       if (!(_bfd_generic_link_add_one_symbol
- 	    (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0,
- 	     NULL, false, get_elf_backend_data (abfd)->collect, &bh)))
-@@ -8131,6 +8132,7 @@ _bfd_mips_elf_create_dynamic_sections (b
- 
-       if (! bfd_elf_link_record_dynamic_symbol (info, h))
- 	return false;
-+      }
- 
-       if (! mips_elf_hash_table (info)->use_rld_obj_head)
- 	{
diff --git a/toolchain/binutils/patches/2.40/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.40/500-Change-default-emulation-for-mips64-linux.patch
deleted file mode 100644
index 14a18a1d80..0000000000
--- a/toolchain/binutils/patches/2.40/500-Change-default-emulation-for-mips64-linux.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/bfd/config.bfd
-+++ b/bfd/config.bfd
-@@ -944,12 +944,12 @@ case "${targ}" in
-     targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec"
-     ;;
-   mips64*el-*-linux*)
--    targ_defvec=mips_elf32_ntrad_le_vec
--    targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec"
-+    targ_defvec=mips_elf64_trad_le_vec
-+    targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec"
-     ;;
-   mips64*-*-linux*)
--    targ_defvec=mips_elf32_ntrad_be_vec
--    targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec"
-+    targ_defvec=mips_elf64_trad_be_vec
-+    targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec"
-     ;;
-   mips*el-*-linux*)
-     targ_defvec=mips_elf32_trad_le_vec
---- a/ld/configure.tgt
-+++ b/ld/configure.tgt
-@@ -585,12 +585,12 @@ mips*-*-vxworks*)	targ_emul=elf32ebmipvx
- 			;;
- mips*-*-windiss)	targ_emul=elf32mipswindiss
- 			;;
--mips64*el-*-linux-*)	targ_emul=elf32ltsmipn32
--			targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
-+mips64*el-*-linux-*)	targ_emul=elf64ltsmip
-+			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
- 			targ_extra_libpath=$targ_extra_emuls
- 			;;
--mips64*-*-linux-*)	targ_emul=elf32btsmipn32
--			targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
-+mips64*-*-linux-*)	targ_emul=elf64btsmip
-+			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
- 			targ_extra_libpath=$targ_extra_emuls
- 			;;
- mips*el-*-linux-*)	targ_emul=elf32ltsmip



From lede-commits at lists.infradead.org  Mon Aug 11 01:38:17 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 04:38:17 -0400
Subject: [openwrt/openwrt]  realtek: switch Netgear NGE devices to rt-loader
In-Reply-To: <175490149726.1445306.2579992654495082513@git-01.infra.openwrt.org>
References: <175490149726.1445306.2579992654495082513@git-01.infra.openwrt.org>
Message-ID: <mailman.115412.1754902717.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3e09991c079604b00640cded9f74e999d9b52d43

commit 3e09991c079604b00640cded9f74e999d9b52d43
Author: Jan Hoffmann <jan at 3e8.eu>
AuthorDate: Sat Aug 9 20:50:18 2025 +0200

    realtek: switch Netgear NGE devices to rt-loader
    
    The bootloader on these devices uses 0x81000000 as load address for the
    compressed image. Since the kernel uses a load address 0x80100000, this
    only leaves a space of 15 MiB for the uncompressed image. For larger
    images, the compressed data starts to get overwritten, and at some point
    the boot will fail:
    
        ## Booting image from partition ... 0
        ## Booting kernel from Legacy Image at 81000000 ...
           Version:      9.9.9.9
           Created:      2025-08-07  14:56:09 UTC
           Data Size:    6756645 Bytes = 6.4 MB
           Checksum ... OK
           Uncompressing ... LZMA: uncompress or overwrite error 1 - must RESET board to recover
    
    Currently, initramfs images with default config are already over the
    limit. And while they still happen to work regardless, adding additional
    packages easily pushes the size so much that the boot fails.
    
    Fix this by switching to rt-loader (which relocates the data to the
    upper end of the RAM before decompression). The switch includes regular
    kernel images to avoid this becoming an issue again in the future.
    
    Signed-off-by: Jan Hoffmann <jan at 3e8.eu>
    Link: https://github.com/openwrt/openwrt/pull/19734
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/realtek/image/rtl838x.mk | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk
index cb9a0903fd..23fb19dba7 100644
--- a/target/linux/realtek/image/rtl838x.mk
+++ b/target/linux/realtek/image/rtl838x.mk
@@ -217,16 +217,7 @@ TARGET_DEVICES += linksys_lgs310c
 
 # "NGE" refers to the uImage magic
 define Device/netgear_nge
-  KERNEL := \
-	kernel-bin | \
-	append-dtb | \
-	lzma | \
-	uImage lzma
-  KERNEL_INITRAMFS := \
-	kernel-bin | \
-	append-dtb | \
-	lzma | \
-	uImage lzma
+  $(Device/uimage-rt-loader)
   SOC := rtl8380
   IMAGE_SIZE := 14848k
   UIMAGE_MAGIC := 0x4e474520



From lede-commits at lists.infradead.org  Mon Aug 11 01:40:30 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 04:40:30 -0400
Subject: [openwrt/openwrt]  mediatek: remove loglevel in bootargs
In-Reply-To: <175490163030.1453441.13649610473560308693@git-01.infra.openwrt.org>
References: <175490163030.1453441.13649610473560308693@git-01.infra.openwrt.org>
Message-ID: <mailman.115413.1754902717.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e59635668dff13dbe7fa5d3007dbe5368ce0ace7

commit e59635668dff13dbe7fa5d3007dbe5368ce0ace7
Author: Coia Prant <coiaprant at gmail.com>
AuthorDate: Fri Aug 8 14:39:03 2025 +0000

    mediatek: remove loglevel in bootargs
    
    `loglevel=8` causes the kernel to output all logs, including debug logs, at boot time
    
    It is enabled by default on the upstream eval board because it is aimed at developer debugging.
    
    Most devices reference the eval board directly without modification, and the debug log should be hidden at release
    
    Signed-off-by: Coia Prant <coiaprant at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19714
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/mediatek/dts/mt7981b-unielec-u7981-01.dtsi               | 4 +---
 target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts             | 2 +-
 target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dts             | 2 +-
 target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi              | 2 +-
 .../188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch    | 2 +-
 .../patches-6.12/189-arm64-dts-mediatek-mt7988a-complete-bpi-r4.patch | 2 +-
 6 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7981b-unielec-u7981-01.dtsi b/target/linux/mediatek/dts/mt7981b-unielec-u7981-01.dtsi
index ea5ab2d9f2..b9f0bcd7e6 100644
--- a/target/linux/mediatek/dts/mt7981b-unielec-u7981-01.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-unielec-u7981-01.dtsi
@@ -10,9 +10,7 @@
 	compatible = "unielec,u7981-01-emmc", "mediatek,mt7981";
 
 	chosen {
-		bootargs = "console=ttyS0,115200n1 loglevel=8  \
-				earlycon=uart8250,mmio32,0x11002000 \
-				";
+		bootargs = "console=ttyS0,115200n1 earlycon=uart8250,mmio32,0x11002000";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
index d58ea48fc3..c0f7fff801 100644
--- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
+++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
@@ -19,7 +19,7 @@
 
 	chosen {
 		stdout-path = "serial0:115200n8";
-		bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8 loglevel=8";
+		bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8";
 	};
 
 	memory {
diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dts
index 3dfbbec3cf..67b1eef411 100644
--- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dts
+++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dts
@@ -19,7 +19,7 @@
 
 	chosen {
 		stdout-path = "serial0:115200n8";
-		bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8 loglevel=8";
+		bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8";
 	};
 
 	memory {
diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
index 58d11476dd..a0a8804726 100644
--- a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
+++ b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
@@ -24,7 +24,7 @@
 
 	chosen {
 		stdout-path = &serial0;
-		bootargs = "console=ttyS0,115200n1 loglevel=8 pci=pcie_bus_perf root=PARTLABEL=rootfs";
+		bootargs = "console=ttyS0,115200n1 pci=pcie_bus_perf root=PARTLABEL=rootfs";
 	};
 
 	memory {
diff --git a/target/linux/mediatek/patches-6.12/188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch b/target/linux/mediatek/patches-6.12/188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch
index 204a2cb434..23bc2ea203 100644
--- a/target/linux/mediatek/patches-6.12/188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch
+++ b/target/linux/mediatek/patches-6.12/188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch
@@ -831,7 +831,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +		     "mediatek,mt7988a";
 +
 +	chosen {
-+		bootargs = "console=ttyS0,115200n1 loglevel=8  \
++		bootargs = "console=ttyS0,115200n1 \
 +			    earlycon=uart8250,mmio32,0x11000000 \
 +			    pci=pcie_bus_perf";
 +	};
diff --git a/target/linux/mediatek/patches-6.12/189-arm64-dts-mediatek-mt7988a-complete-bpi-r4.patch b/target/linux/mediatek/patches-6.12/189-arm64-dts-mediatek-mt7988a-complete-bpi-r4.patch
index a2643ea0a3..a8b7a74134 100644
--- a/target/linux/mediatek/patches-6.12/189-arm64-dts-mediatek-mt7988a-complete-bpi-r4.patch
+++ b/target/linux/mediatek/patches-6.12/189-arm64-dts-mediatek-mt7988a-complete-bpi-r4.patch
@@ -189,7 +189,7 @@ Subject: [PATCH 32/32] WIP: add BPi-R4
  / {
  	chosen {
  		stdout-path = "serial0:115200n8";
-+		bootargs = "console=ttyS0,115200n1 loglevel=8 pci=pcie_bus_perf ubi.block=0,fit root=/dev/fit0";
++		bootargs = "console=ttyS0,115200n1 pci=pcie_bus_perf ubi.block=0,fit root=/dev/fit0";
 +		rootdisk-spim-nand = <&ubi_rootfs>;
  	};
  



From lede-commits at lists.infradead.org  Mon Aug 11 03:18:10 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 06:18:10 -0400
Subject: [openwrt/openwrt]  tools: bash: fix PKG_HASH
In-Reply-To: <175490749081.1855108.17760109069919198195@git-01.infra.openwrt.org>
References: <175490749081.1855108.17760109069919198195@git-01.infra.openwrt.org>
Message-ID: <mailman.115474.1754907505.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2876106eb43d9eb04533eec2f2bfbb4574fa2b5d

commit 2876106eb43d9eb04533eec2f2bfbb4574fa2b5d
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Aug 11 12:16:18 2025 +0200

    tools: bash: fix PKG_HASH
    
    Invalid hash was added during the 5.3 update and CI will fail since none
    of the available sources has the tarball with incorrect hash.
    
    Fixes: 423ed9fc5aea ("tools: bash: update to 5.3")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/bash/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/bash/Makefile b/tools/bash/Makefile
index d42b69e01d..8aeb1719f6 100644
--- a/tools/bash/Makefile
+++ b/tools/bash/Makefile
@@ -12,7 +12,7 @@ PKG_VERSION:=5.3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/bash
-PKG_HASH:=62dd49c44c399ed1b3f7f731e87a782334d834f08e098a35f2c87547d5dbb269
+PKG_HASH:=0d5cd86965f869a26cf64f4b71be7b96f90a3ba8b3d74e27e8e9d9d5550f31ba
 
 HOST_BUILD_PARALLEL := 1
 



From lede-commits at lists.infradead.org  Mon Aug 11 05:57:00 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 08:57:00 -0400
Subject: [openwrt/openwrt]  linux-firmware: update to 20250808
In-Reply-To: <175491702073.2482802.14137239088290624875@git-01.infra.openwrt.org>
References: <175491702073.2482802.14137239088290624875@git-01.infra.openwrt.org>
Message-ID: <mailman.115595.1754917315.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6152381880c57cd4dbfec3185342d52f44d57cf5

commit 6152381880c57cd4dbfec3185342d52f44d57cf5
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Tue Jul 8 15:55:35 2025 -0400

    linux-firmware: update to 20250808
    
    % git log --no-merges --pretty=oneline --abbrev-commit 20250708...20250808
    53f89ed819bc qcom: Add QDSP firmware file for Qualcomm QDU100 device.
    35abebaa15c1 ath12k: WCN7850 hw2.0: update to WLAN.HMT.1.1.c5-00302-QCAHMTSWPL_V1.0_V2.0_SILICONZ-1.115823.3
    7aa2aba3a90e ath12k: QCN9274 hw2.0: update to WLAN.WBE.1.5-01651-QCAHKSWPL_SILICONZ-1
    db7327128eff ath11k: WCN6855 hw2.0: update board-2.bin
    14794133088c ath11k: QCA6698AQ hw2.1: update to WLAN.HSP.1.1-04650-QCAHSPSWPL_V1_V2_SILICONZ_IOE-2
    effe7d041975 ath11k: QCA2066 hw2.1: update to WLAN.HSP.1.1-03926.13-QCAHSPSWPL_V2_SILICONZ_CE-2.52297.9
    d4fde9ca4ecb ath11k: QCA2066 hw2.1: update board-2.bin
    9188b156478e qcom: Update xbl_config firmware file.
    ba2549fc9730 amdgpu: Update GCN 4.0.5 microcode
    61d6a5f9f1e8 amdgpu: Update SDMA 6.1.0 microcode
    67ee1b80467c amdgpu: Update GC 11.5.0 microcode
    b2acd913eb00 qcom: Add QDU100 firmware image files required for booting.
    224186ce2e8e linux-firmware: Add firmware for airoha-npu driver
    ebf45cd0f8d0 linux-firmware: update firmware for MT7925 WiFi device
    2ccae12c4f73 mediatek MT7925: update bluetooth firmware to 20250721233113
    1d2771d839ba qcom: Update DSP firmware for qcm6490 platform
    8ecf764788f8 qcom: update Venus firmware file for v6.0
    c3855905442a i915: Xe3LPD DMC v2.29
    3768c184de68 linux-firmware: Update AMD cpu microcode
    02ad2a17abc4 qcom: Add QCS6490 symlink for QUPv3 firmware
    530f28320603 qcom: Add firmware binary for SM8750.
    dce0f1f8a3d2 amdgpu: update dmcub fw for dcn314
    53d585cd763b cirrus: cs35l41: Add Firmware for various ASUS commercial Laptops using CS35L41 HDA
    28964e023a39 cirrus: cs35l41: Update Firmware for Dell Oasis
    5be0792a63e9 cirrus: cs35l56: Add firmware for Cirrus CS35L56 for various Dell laptops
    b4cd8b7e766a qcom: Add Audio topology for QCS6490 RB3Gen2
    dcd36f8607e5 intel_vpu: Update NPU firmware
    43c969c12234 amdgpu: update dmcub fw for various DCN version
    2aaf3bf0702c WHENCE: extract more license statements
    f62714f9a0ac WHENCE: clarify io_ti origin
    e2c1b151087b amdgpu: Update GC 11.5.1 microcode
    eb03c8ce595d rtw89: 8852b: update fw to v0.29.128.0
    351eb5c7643f rtw89: 8852bt: update fw to v0.29.127.0
    ee12f2433585 rtw89: 8922a: add regd fw element with version R72-R6
    75e7b2b760ae rtw89: 8852c: add regd fw element with version R72-R57
    d300c8670364 rtw89: 8922a: update BB parameter V49
    5bcef62c4107 qcom: Update gpu firmwares of QCS615 chipset
    40c52dd245b4 linux-firmware: Update firmware file for Intel Solar core
    a7be448d356e linux-firmware: Update firmware file for Intel BlazarU core
    9ec63315f4c1 linux-firmware: Update firmware file for Intel BlazarI core
    
    Build system: x86/64
    Build-tested: x86/64-glibc
    Run-tested: x86/64-glibc (Intel N150-based system)
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
    Link: https://github.com/openwrt/openwrt/pull/19721
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/linux-firmware/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/firmware/linux-firmware/Makefile b/package/firmware/linux-firmware/Makefile
index 0b1eb1b56f..190703b78a 100644
--- a/package/firmware/linux-firmware/Makefile
+++ b/package/firmware/linux-firmware/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=linux-firmware
-PKG_VERSION:=20250708
+PKG_VERSION:=20250808
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/firmware
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=6f3efee7f600c201f9b2d675889a4ccdb8cfe56e0d283641796ed10e64c72047
+PKG_HASH:=c029551b45a15926c9d7a5df1a0b540044064f19157c57fc11d91fd0aade837f
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 



From lede-commits at lists.infradead.org  Mon Aug 11 06:18:12 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 09:18:12 -0400
Subject: [openwrt/openwrt]  realtek: RTL838x harden ethernet driver against
 fuzzying
In-Reply-To: <175491829247.2548968.11345262212058550441@git-01.infra.openwrt.org>
References: <175491829247.2548968.11345262212058550441@git-01.infra.openwrt.org>
Message-ID: <mailman.115619.1754918434.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0724412c58896b765fff77d63907729d298fbb67

commit 0724412c58896b765fff77d63907729d298fbb67
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Tue Aug 5 11:46:40 2025 -0400

    realtek: RTL838x harden ethernet driver against fuzzying
    
    While checking setup routines for stability and completeness,
    random RTL838x SoC I/O areas were intentionally overwritten.
    As soon as L2_CTRL_1->FAST_AGE_OUT is set to 1, the system
    stalls during bootup. Analysis shows that it loops endlessly
    in rtl838x_hw_stop()
    
    /* Flush L2 address cache */
    if (priv->family_id == RTL8380_FAMILY_ID) {
            for (int i = 0; i <= priv->cpu_port; i++) {
                    sw_w32(1 << 26 | 1 << 23 | i << 5, priv->r->l2_tbl_flush_ctrl);
                    do { } while (sw_r32(priv->r->l2_tbl_flush_ctrl) & (1 << 26));
            }
    
    This is exactly the same logic as in the vendor GPL. There
    are no hints about possible timeouts or issues. The reason is
    still unclear. Nevertheless harden the function for further fuzzy
    tests. Do this by resetting the configuration value to its SoC
    default.
    
    Additionally convert some shifts to BIT() for better readability.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19679
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c      | 10 ++++++----
 .../realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h      |  1 +
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
index 66b808dba9..37dab0f2db 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
@@ -947,14 +947,16 @@ static void rtl838x_hw_stop(struct rtl838x_eth_priv *priv)
 
 	/* Flush L2 address cache */
 	if (priv->family_id == RTL8380_FAMILY_ID) {
+		/* Disable FAST_AGE_OUT otherwise flush will hang */
+		sw_w32_mask(BIT(23), 0, RTL838X_L2_CTRL_1);
 		for (int i = 0; i <= priv->cpu_port; i++) {
-			sw_w32(1 << 26 | 1 << 23 | i << 5, priv->r->l2_tbl_flush_ctrl);
-			do { } while (sw_r32(priv->r->l2_tbl_flush_ctrl) & (1 << 26));
+			sw_w32(BIT(26) | BIT(23) | i << 5, priv->r->l2_tbl_flush_ctrl);
+			do { } while (sw_r32(priv->r->l2_tbl_flush_ctrl) & BIT(26));
 		}
 	} else if (priv->family_id == RTL8390_FAMILY_ID) {
 		for (int i = 0; i <= priv->cpu_port; i++) {
-			sw_w32(1 << 28 | 1 << 25 | i << 5, priv->r->l2_tbl_flush_ctrl);
-			do { } while (sw_r32(priv->r->l2_tbl_flush_ctrl) & (1 << 28));
+			sw_w32(BIT(28) | BIT(25) | i << 5, priv->r->l2_tbl_flush_ctrl);
+			do { } while (sw_r32(priv->r->l2_tbl_flush_ctrl) & BIT(28));
 		}
 	}
 	/* TODO: L2 flush register is 64 bit on RTL931X and 930X */
diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
index 24c750b403..edeea8f6e2 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
@@ -165,6 +165,7 @@
 #define RTL839X_L2_NOTIFICATION_CTRL		(0x7808)
 #define RTL931X_L2_NTFY_CTRL			(0xCDC8)
 #define RTL838X_L2_CTRL_0			(0x3200)
+#define RTL838X_L2_CTRL_1			(0x3204)
 #define RTL839X_L2_CTRL_0			(0x3800)
 #define RTL930X_L2_CTRL				(0x8FD8)
 #define RTL931X_L2_CTRL				(0xC800)



From lede-commits at lists.infradead.org  Mon Aug 11 11:37:21 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 14:37:21 -0400
Subject: [openwrt/openwrt]  qualcommax: ipq6018 rework nss_port5 clock to
 multiple conf
In-Reply-To: <175493744190.3581688.14662170658954984788@git-01.infra.openwrt.org>
References: <175493744190.3581688.14662170658954984788@git-01.infra.openwrt.org>
Message-ID: <mailman.116828.1754942087.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/57bd20b3901e3bb918f0c07e657f260ec8e2e354

commit 57bd20b3901e3bb918f0c07e657f260ec8e2e354
Author: Marko M?kel? <marko.makela at iki.fi>
AuthorDate: Mon Aug 11 16:23:03 2025 +0300

    qualcommax: ipq6018 rework nss_port5 clock to multiple conf
    
    This fixes intermittent dmesg errors
    "nss_port5_rx_clk_src: rcg didn't update its configuration."
    
    Signed-off-by: Marko M?kel? <marko.makela at iki.fi>
    Link: https://github.com/openwrt/openwrt/pull/19620
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../0151-arm64-qcom-ipq6018-nss_port5.patch        | 125 +++++++++++++++++++++
 ...q6018-workaround-networking-clock-parenti.patch |  10 +-
 2 files changed, 130 insertions(+), 5 deletions(-)

diff --git a/target/linux/qualcommax/patches-6.12/0151-arm64-qcom-ipq6018-nss_port5.patch b/target/linux/qualcommax/patches-6.12/0151-arm64-qcom-ipq6018-nss_port5.patch
new file mode 100644
index 0000000000..9e4372a878
--- /dev/null
+++ b/target/linux/qualcommax/patches-6.12/0151-arm64-qcom-ipq6018-nss_port5.patch
@@ -0,0 +1,125 @@
+From 9989fcd49c52500a2bf1f6d49411690dec45d2dc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= <marko.makela at iki.fi>
+Date: Sat, 2 Aug 2025 12:47:08 +0300
+Subject: [PATCH] clk: qcom: gcc-ipq6018: rework nss_port5 clock to multiple
+ conf
+
+Rework nss_port5 to use the new multiple configuration implementation
+and correctly fix the clocks for this port under some corner case.
+
+In OpenWrt, this patch avoids intermittent dmesg errors of the form
+nss_port5_rx_clk_src: rcg didn't update its configuration.
+
+This is a mechanical, straightforward port of
+commit e88f03230dc07aa3293b6aeb078bd27370bb2594
+("clk: qcom: gcc-ipq8074: rework nss_port5/6 clock to multiple conf")
+to gcc-ipq6018, with two conflicts resolved: different frequency of the
+P_XO clock source, and only 5 Ethernet ports.
+
+This was originally developed by JiaY-shi <shi05275 at 163.com>.
+
+Link: https://lore.kernel.org/all/20231220221724.3822-4-ansuelsmth at gmail.com/
+Signed-off-by: Marko M?kel? <marko.makela at iki.fi>
+Tested-by: Marko M?kel? <marko.makela at iki.fi>
+---
+ drivers/clk/qcom/gcc-ipq6018.c | 60 +++++++++++++++++++++-------------
+ 1 file changed, 38 insertions(+), 22 deletions(-)
+
+--- a/drivers/clk/qcom/gcc-ipq6018.c
++++ b/drivers/clk/qcom/gcc-ipq6018.c
+@@ -511,15 +511,23 @@ static struct clk_rcg2 apss_ahb_clk_src
+ 	},
+ };
+ 
+-static const struct freq_tbl ftbl_nss_port5_rx_clk_src[] = {
+-	F(24000000, P_XO, 1, 0, 0),
+-	F(25000000, P_UNIPHY1_RX, 12.5, 0, 0),
+-	F(25000000, P_UNIPHY0_RX, 5, 0, 0),
+-	F(78125000, P_UNIPHY1_RX, 4, 0, 0),
+-	F(125000000, P_UNIPHY1_RX, 2.5, 0, 0),
+-	F(125000000, P_UNIPHY0_RX, 1, 0, 0),
+-	F(156250000, P_UNIPHY1_RX, 2, 0, 0),
+-	F(312500000, P_UNIPHY1_RX, 1, 0, 0),
++static const struct freq_conf ftbl_nss_port5_rx_clk_src_25[] = {
++	C(P_UNIPHY1_RX, 12.5, 0, 0),
++	C(P_UNIPHY0_RX, 5, 0, 0),
++};
++
++static const struct freq_conf ftbl_nss_port5_rx_clk_src_125[] = {
++	C(P_UNIPHY1_RX, 2.5, 0, 0),
++	C(P_UNIPHY0_RX, 1, 0, 0),
++};
++
++static const struct freq_multi_tbl ftbl_nss_port5_rx_clk_src[] = {
++	FMS(24000000, P_XO, 1, 0, 0),
++	FM(25000000, ftbl_nss_port5_rx_clk_src_25),
++	FMS(78125000, P_UNIPHY1_RX, 4, 0, 0),
++	FM(125000000, ftbl_nss_port5_rx_clk_src_125),
++	FMS(156250000, P_UNIPHY1_RX, 2, 0, 0),
++	FMS(312500000, P_UNIPHY1_RX, 1, 0, 0),
+ 	{ }
+ };
+ 
+@@ -547,26 +555,34 @@ gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32
+ 
+ static struct clk_rcg2 nss_port5_rx_clk_src = {
+ 	.cmd_rcgr = 0x68060,
+-	.freq_tbl = ftbl_nss_port5_rx_clk_src,
++	.freq_multi_tbl = ftbl_nss_port5_rx_clk_src,
+ 	.hid_width = 5,
+ 	.parent_map = gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias_map,
+ 	.clkr.hw.init = &(struct clk_init_data){
+ 		.name = "nss_port5_rx_clk_src",
+ 		.parent_data = gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias,
+ 		.num_parents = 7,
+-		.ops = &clk_rcg2_ops,
++		.ops = &clk_rcg2_fm_ops,
+ 	},
+ };
+ 
+-static const struct freq_tbl ftbl_nss_port5_tx_clk_src[] = {
+-	F(24000000, P_XO, 1, 0, 0),
+-	F(25000000, P_UNIPHY1_TX, 12.5, 0, 0),
+-	F(25000000, P_UNIPHY0_TX, 5, 0, 0),
+-	F(78125000, P_UNIPHY1_TX, 4, 0, 0),
+-	F(125000000, P_UNIPHY1_TX, 2.5, 0, 0),
+-	F(125000000, P_UNIPHY0_TX, 1, 0, 0),
+-	F(156250000, P_UNIPHY1_TX, 2, 0, 0),
+-	F(312500000, P_UNIPHY1_TX, 1, 0, 0),
++static const struct freq_conf ftbl_nss_port5_tx_clk_src_25[] = {
++	C(P_UNIPHY1_TX, 12.5, 0, 0),
++	C(P_UNIPHY0_TX, 5, 0, 0),
++};
++
++static const struct freq_conf ftbl_nss_port5_tx_clk_src_125[] = {
++	C(P_UNIPHY1_TX, 2.5, 0, 0),
++	C(P_UNIPHY0_TX, 1, 0, 0),
++};
++
++static const struct freq_multi_tbl ftbl_nss_port5_tx_clk_src[] = {
++	FMS(24000000, P_XO, 1, 0, 0),
++	FM(25000000, ftbl_nss_port5_tx_clk_src_25),
++	FMS(78125000, P_UNIPHY1_TX, 4, 0, 0),
++	FM(125000000, ftbl_nss_port5_tx_clk_src_125),
++	FMS(156250000, P_UNIPHY1_TX, 2, 0, 0),
++	FMS(312500000, P_UNIPHY1_TX, 1, 0, 0),
+ 	{ }
+ };
+ 
+@@ -594,14 +610,14 @@ gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32
+ 
+ static struct clk_rcg2 nss_port5_tx_clk_src = {
+ 	.cmd_rcgr = 0x68068,
+-	.freq_tbl = ftbl_nss_port5_tx_clk_src,
++	.freq_multi_tbl = ftbl_nss_port5_tx_clk_src,
+ 	.hid_width = 5,
+ 	.parent_map = gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias_map,
+ 	.clkr.hw.init = &(struct clk_init_data){
+ 		.name = "nss_port5_tx_clk_src",
+ 		.parent_data = gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias,
+ 		.num_parents = 7,
+-		.ops = &clk_rcg2_ops,
++		.ops = &clk_rcg2_fm_ops,
+ 	},
+ };
+ 
diff --git a/target/linux/qualcommax/patches-6.12/0904-clk-qcom-ipq6018-workaround-networking-clock-parenti.patch b/target/linux/qualcommax/patches-6.12/0904-clk-qcom-ipq6018-workaround-networking-clock-parenti.patch
index 2e7a56f728..30c6eced96 100644
--- a/target/linux/qualcommax/patches-6.12/0904-clk-qcom-ipq6018-workaround-networking-clock-parenti.patch
+++ b/target/linux/qualcommax/patches-6.12/0904-clk-qcom-ipq6018-workaround-networking-clock-parenti.patch
@@ -28,7 +28,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  	{ .hw = &gpll0.clkr.hw },
  	{ .hw = &gpll4.clkr.hw },
  	{ .hw = &nss_crypto_pll.clkr.hw },
-@@ -526,12 +526,12 @@ static const struct freq_tbl ftbl_nss_po
+@@ -534,12 +534,12 @@ static const struct freq_multi_tbl ftbl_
  static const struct clk_parent_data
  gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias[] = {
  	{ .fw_name = "xo" },
@@ -46,7 +46,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  };
  
  static const struct parent_map
-@@ -573,12 +573,12 @@ static const struct freq_tbl ftbl_nss_po
+@@ -589,12 +589,12 @@ static const struct freq_multi_tbl ftbl_
  static const struct clk_parent_data
  gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias[] = {
  	{ .fw_name = "xo" },
@@ -64,7 +64,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  };
  
  static const struct parent_map
-@@ -714,10 +714,10 @@ static const struct freq_tbl ftbl_nss_po
+@@ -730,10 +730,10 @@ static const struct freq_tbl ftbl_nss_po
  
  static const struct clk_parent_data gcc_xo_uniphy0_rx_tx_ubi32_bias[] = {
  	{ .fw_name = "xo" },
@@ -78,7 +78,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  };
  
  static const struct parent_map gcc_xo_uniphy0_rx_tx_ubi32_bias_map[] = {
-@@ -750,10 +750,10 @@ static const struct freq_tbl ftbl_nss_po
+@@ -766,10 +766,10 @@ static const struct freq_tbl ftbl_nss_po
  
  static const struct clk_parent_data gcc_xo_uniphy0_tx_rx_ubi32_bias[] = {
  	{ .fw_name = "xo" },
@@ -92,7 +92,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  };
  
  static const struct parent_map gcc_xo_uniphy0_tx_rx_ubi32_bias_map[] = {
-@@ -1899,12 +1899,11 @@ static const struct freq_tbl ftbl_ubi32_
+@@ -1915,12 +1915,11 @@ static const struct freq_tbl ftbl_ubi32_
  	{ }
  };
  



From lede-commits at lists.infradead.org  Mon Aug 11 13:28:46 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 16:28:46 -0400
Subject: [openwrt/openwrt]  tools: gnulib: always use std-gnu23 module
In-Reply-To: <175494412658.4001621.9054812546928795418@git-01.infra.openwrt.org>
References: <175494412658.4001621.9054812546928795418@git-01.infra.openwrt.org>
Message-ID: <mailman.116931.1754948366.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a808086826a75976947fc38ad0c58b20e398f7b9

commit a808086826a75976947fc38ad0c58b20e398f7b9
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Fri Aug 8 00:58:56 2025 -0400

    tools: gnulib: always use std-gnu23 module
    
    The new "std-gnu23" module has the stated goal of:
    "...to update the c99 module to depend on std-gnu23
    instead of on std-gnu11, and to make std-gnu11 obsolete."
    in upstream commit 8990abb50 ("std-gnu23: new module").
    
    However, for now, it's design is optional, so that
    definitions of the latest standard module overrides the former.
    At some point, upstream gnulib will replace the dependency
    instead of add it alongside the older one.
    
    Because all macros are copied to the aclocal directory,
    for complex projects, not including the module
    may cause the macros to apply only to some subdirectories
    rather than all of them and top-level together.
    
    For projects that import source from local gnulib,
    always include the std-gnu23.m4 macros for consistency.
    
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Link: https://github.com/openwrt/openwrt/pull/19748
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/gnulib/patches/195-c99-use-std-gnu23.patch | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/gnulib/patches/195-c99-use-std-gnu23.patch b/tools/gnulib/patches/195-c99-use-std-gnu23.patch
new file mode 100644
index 0000000000..11c2f3297c
--- /dev/null
+++ b/tools/gnulib/patches/195-c99-use-std-gnu23.patch
@@ -0,0 +1,10 @@
+--- a/modules/c99
++++ b/modules/c99
+@@ -5,6 +5,7 @@ Files:
+ 
+ Depends-on:
+ std-gnu11
++std-gnu23
+ 
+ configure.ac:
+ 



From lede-commits at lists.infradead.org  Mon Aug 11 13:28:48 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 16:28:48 -0400
Subject: [openwrt/openwrt]  gettext-full: force compiling target in C23
 standard
In-Reply-To: <175494412658.4001621.9054812546928795418@git-01.infra.openwrt.org>
References: <175494412658.4001621.9054812546928795418@git-01.infra.openwrt.org>
Message-ID: <mailman.116932.1754948366.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b6f67ca7394f4e221c27e58c9f8e250179fa142f

commit b6f67ca7394f4e221c27e58c9f8e250179fa142f
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Tue Aug 5 18:52:13 2025 -0400

    gettext-full: force compiling target in C23 standard
    
    Currently, the build system overrides the value of the CC variable
    for actual compilation after configuring for target builds.
    However, the configure script now modifies the CC variable
    to include "-std=gnu23" when the test for C23 features is successful.
    The configure script also tests for the ability to use alignof
    without including the stdalign.h header, and only includes it if necessary.
    The test in the configure script is being done with the C23 standard option
    but the compilation is being done without the C23 standard option,
    leading to an unusual build error where alignof() is not defined.
    
    Resolving the conflict between the autoconf macros and the build system
    causes several other packages to fail, so instead in the meantime,
    force the use of C23 standard to compile as part of the new standard
    includes alignof as a keyword to deprecate the stdalign.h macro.
    
    Forcing use of the new standard is safe for target builds
    as the toolchain is known to support the option
    and is always within our scope of version control.
    
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Link: https://github.com/openwrt/openwrt/pull/19748
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/libs/gettext-full/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/libs/gettext-full/Makefile b/package/libs/gettext-full/Makefile
index 6441677be7..d277fb10b6 100644
--- a/package/libs/gettext-full/Makefile
+++ b/package/libs/gettext-full/Makefile
@@ -73,6 +73,7 @@ endef
 export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
 
 TARGET_CFLAGS += $(FPIC)
+TARGET_CFLAGS += -std=gnu23
 ifneq ($(HOST_OS),Linux)
   TARGET_CFLAGS += -I$(STAGING_DIR_HOSTPKG)/include
 endif



From lede-commits at lists.infradead.org  Mon Aug 11 13:28:47 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 16:28:47 -0400
Subject: [openwrt/openwrt]  tools: libtool: always install all auxillary files
In-Reply-To: <175494412658.4001621.9054812546928795418@git-01.infra.openwrt.org>
References: <175494412658.4001621.9054812546928795418@git-01.infra.openwrt.org>
Message-ID: <mailman.116933.1754948366.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4c0d64cb9696abd982dc51956f58f5deee08d192

commit 4c0d64cb9696abd982dc51956f58f5deee08d192
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Fri Aug 8 01:23:34 2025 -0400

    tools: libtool: always install all auxillary files
    
    Remove the needless restriction
    for which auxillary files are installed.
    This aligns the behavior of libtoolize
    with the existing behavior of automake.
    
    This can prevent the seemingly random error
    if autoreconf happens to be ran multiple times:
    
      configure: error: cannot find required auxiliary files: compile
    
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Link: https://github.com/openwrt/openwrt/pull/19748
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/libtool/patches/001-always-install-aux.patch | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tools/libtool/patches/001-always-install-aux.patch b/tools/libtool/patches/001-always-install-aux.patch
new file mode 100644
index 0000000000..f9e0d959f9
--- /dev/null
+++ b/tools/libtool/patches/001-always-install-aux.patch
@@ -0,0 +1,11 @@
+--- a/libtoolize.in
++++ b/libtoolize.in
+@@ -1066,7 +1066,7 @@ func_install_pkgaux_files ()
+           func_ltmain_update "$file" "$pkgauxdir" "$aux_dir" pkgaux_header
+           ;;
+         *)
+-          test subproject = "$ltdl_mode" || continue
++          $opt_install || test subproject = "$ltdl_mode" || continue
+           func_copy "$file" "$pkgauxdir" "$aux_dir" pkgaux_header
+           ;;
+       esac



From lede-commits at lists.infradead.org  Mon Aug 11 13:28:49 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 16:28:49 -0400
Subject: [openwrt/openwrt]  gettext-full: remove usage of autoreconf
In-Reply-To: <175494412658.4001621.9054812546928795418@git-01.infra.openwrt.org>
References: <175494412658.4001621.9054812546928795418@git-01.infra.openwrt.org>
Message-ID: <mailman.116934.1754948366.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d119f1b0464f55ccbaa080703a33b320339caa7d

commit d119f1b0464f55ccbaa080703a33b320339caa7d
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Fri Aug 8 01:27:08 2025 -0400

    gettext-full: remove usage of autoreconf
    
    Running the bootstrap script autogen.sh
    handles the execution of autotools already,
    so calling autoreconf before configure
    makes this happen twice, which is unnecessary
    and can lead to an occasional build problem.
    
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Link: https://github.com/openwrt/openwrt/pull/19748
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/libs/gettext-full/Makefile | 2 --
 1 file changed, 2 deletions(-)

diff --git a/package/libs/gettext-full/Makefile b/package/libs/gettext-full/Makefile
index d277fb10b6..829d4dca46 100644
--- a/package/libs/gettext-full/Makefile
+++ b/package/libs/gettext-full/Makefile
@@ -25,8 +25,6 @@ PKG_INSTALL:=1
 PKG_BUILD_DEPENDS:=gettext-full/host libunistring libxml2
 PKG_BUILD_PARALLEL:=0
 
-PKG_FIXUP:=autoreconf
-
 HOST_BUILD_DEPENDS:=gnulib-l10n/host gperf/host libiconv-full/host libunistring/host libxml2/host
 HOST_BUILD_PARALLEL:=0
 



From lede-commits at lists.infradead.org  Mon Aug 11 14:07:47 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 17:07:47 -0400
Subject: [openwrt/openwrt]  sunxi: enable ramdisk feature
In-Reply-To: <175494646605.4140798.7310433362001371280@git-01.infra.openwrt.org>
References: <175494646605.4140798.7310433362001371280@git-01.infra.openwrt.org>
Message-ID: <mailman.116944.1754948526.1866309.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3ded6d271637c2b4d0a8bec4de35b7225358ad96

commit 3ded6d271637c2b4d0a8bec4de35b7225358ad96
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Mon Aug 4 09:00:25 2025 +0200

    sunxi: enable ramdisk feature
    
    Build initramfs images for this target.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile
index 5ebd8eb85e..0f07274d38 100644
--- a/target/linux/sunxi/Makefile
+++ b/target/linux/sunxi/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 ARCH:=arm
 BOARD:=sunxi
 BOARDNAME:=Allwinner ARM SoCs
-FEATURES:=ext4 display rootfs-part rtc squashfs usb usbgadget
+FEATURES:=ext4 display ramdisk rootfs-part rtc squashfs usb usbgadget
 SUBTARGETS:=cortexa8 cortexa7 cortexa53
 
 KERNEL_PATCHVER:=6.12



From lede-commits at lists.infradead.org  Mon Aug 11 14:07:46 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 11 Aug 2025 17:07:46 -0400
Subject: [openwrt/openwrt]  sunxi: change target to use FIT kernel images
In-Reply-To: <175494646605.4140798.7310433362001371280@git-01.infra.openwrt.org>
References: <175494646605.4140798.7310433362001371280@git-01.infra.openwrt.org>
Message-ID: <mailman.116945.1754948526.1866309.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8abb6dbf0f48f52447591f9cea0c4fbdc11a0ef4

commit 8abb6dbf0f48f52447591f9cea0c4fbdc11a0ef4
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Sun Aug 3 15:57:15 2025 +0200

    sunxi: change target to use FIT kernel images
    
    Modernize the target slightly to use kernel+dtb FIT images in all
    subtargets. LZMA compression will be used for the cortexa53 devices,
    and we'll stay conservative and use gzip for the cortexa7/a8 devices
    due to performance differences.
    
    Tested-on:
     - Linksprite pcDuino v2 (cortexa8 / A10)
     - Olinuxino Micro (cortexa7 / A20)
     - Banana Pi M2 Berry (cortexa7 / V40)
     - Banana Pi P2 Zero (cortexa7 / H2+)
     - Xunlong Orange Pi 2 (cortexa7/ H3)
     - OrangePi PC Zero 2 (cortexa53 / H616)
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 package/boot/uboot-sunxi/uEnv-a64.txt      |  5 ++---
 package/boot/uboot-sunxi/uEnv-default.txt  |  4 +---
 package/boot/uboot-sunxi/uEnv-h6.txt       |  5 ++---
 package/boot/uboot-sunxi/uEnv-h616.txt     |  5 ++---
 package/boot/uboot-sunxi/uEnv-pangolin.txt |  4 +---
 target/linux/sunxi/image/Makefile          | 11 ++++++++--
 target/linux/sunxi/image/cortexa53.mk      |  4 ++--
 target/linux/sunxi/image/cortexa7.mk       | 32 ++++++++++++++++++++++++++++++
 target/linux/sunxi/image/cortexa8.mk       |  6 ++++++
 9 files changed, 57 insertions(+), 19 deletions(-)

diff --git a/package/boot/uboot-sunxi/uEnv-a64.txt b/package/boot/uboot-sunxi/uEnv-a64.txt
index a47ebda613..4fe994caa9 100644
--- a/package/boot/uboot-sunxi/uEnv-a64.txt
+++ b/package/boot/uboot-sunxi/uEnv-a64.txt
@@ -1,7 +1,6 @@
 setenv mmc_rootpart 2
 part uuid mmc ${mmc_bootdev}:${mmc_rootpart} uuid
-setenv loadkernel fatload mmc \$mmc_bootdev \$kernel_addr_r uImage
-setenv loaddtb fatload mmc \$mmc_bootdev \$fdt_addr_r dtb
+setenv loadkernel fatload mmc \$mmc_bootdev \$kernel_comp_addr_r uImage
 setenv bootargs console=ttyS0,115200 earlyprintk root=PARTUUID=${uuid} rootwait earlycon=uart,mmio32,0x01c28000
-setenv uenvcmd run loadkernel \&\& run loaddtb \&\& booti \$kernel_addr_r - \$fdt_addr_r
+setenv uenvcmd run loadkernel \&\& bootm \$kernel_comp_addr_r
 run uenvcmd
diff --git a/package/boot/uboot-sunxi/uEnv-default.txt b/package/boot/uboot-sunxi/uEnv-default.txt
index 36e41c59b1..3651cd83df 100644
--- a/package/boot/uboot-sunxi/uEnv-default.txt
+++ b/package/boot/uboot-sunxi/uEnv-default.txt
@@ -1,8 +1,6 @@
-setenv fdt_high ffffffff
 setenv mmc_rootpart 2
 part uuid mmc ${mmc_bootdev}:${mmc_rootpart} uuid
 setenv loadkernel fatload mmc \$mmc_bootdev \$kernel_addr_r uImage
-setenv loaddtb fatload mmc \$mmc_bootdev \$fdt_addr_r dtb
 setenv bootargs console=ttyS0,115200 earlyprintk root=PARTUUID=${uuid} rootwait
-setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
+setenv uenvcmd run loadkernel \&\& bootm \$kernel_addr_r
 run uenvcmd
diff --git a/package/boot/uboot-sunxi/uEnv-h6.txt b/package/boot/uboot-sunxi/uEnv-h6.txt
index 78810ff223..6f0060ec81 100644
--- a/package/boot/uboot-sunxi/uEnv-h6.txt
+++ b/package/boot/uboot-sunxi/uEnv-h6.txt
@@ -1,7 +1,6 @@
 setenv mmc_rootpart 2
 part uuid mmc ${mmc_bootdev}:${mmc_rootpart} uuid
-setenv loadkernel fatload mmc \$mmc_bootdev \$kernel_addr_r uImage
-setenv loaddtb fatload mmc \$mmc_bootdev \$fdt_addr_r dtb
+setenv loadkernel fatload mmc \$mmc_bootdev \$kernel_comp_addr_r uImage
 setenv bootargs console=ttyS0,115200 earlyprintk root=PARTUUID=${uuid} rootwait
-setenv uenvcmd run loadkernel \&\& run loaddtb \&\& booti \$kernel_addr_r - \$fdt_addr_r
+setenv uenvcmd run loadkernel \&\& bootm \$kernel_comp_addr_r
 run uenvcmd
diff --git a/package/boot/uboot-sunxi/uEnv-h616.txt b/package/boot/uboot-sunxi/uEnv-h616.txt
index 78810ff223..6f0060ec81 100644
--- a/package/boot/uboot-sunxi/uEnv-h616.txt
+++ b/package/boot/uboot-sunxi/uEnv-h616.txt
@@ -1,7 +1,6 @@
 setenv mmc_rootpart 2
 part uuid mmc ${mmc_bootdev}:${mmc_rootpart} uuid
-setenv loadkernel fatload mmc \$mmc_bootdev \$kernel_addr_r uImage
-setenv loaddtb fatload mmc \$mmc_bootdev \$fdt_addr_r dtb
+setenv loadkernel fatload mmc \$mmc_bootdev \$kernel_comp_addr_r uImage
 setenv bootargs console=ttyS0,115200 earlyprintk root=PARTUUID=${uuid} rootwait
-setenv uenvcmd run loadkernel \&\& run loaddtb \&\& booti \$kernel_addr_r - \$fdt_addr_r
+setenv uenvcmd run loadkernel \&\& bootm \$kernel_comp_addr_r
 run uenvcmd
diff --git a/package/boot/uboot-sunxi/uEnv-pangolin.txt b/package/boot/uboot-sunxi/uEnv-pangolin.txt
index 9c4fa11220..ecd86c0473 100644
--- a/package/boot/uboot-sunxi/uEnv-pangolin.txt
+++ b/package/boot/uboot-sunxi/uEnv-pangolin.txt
@@ -1,6 +1,4 @@
-setenv fdt_high ffffffff
 setenv loadkernel fatload mmc 0 \$kernel_addr_r uImage
-setenv loaddtb fatload mmc 0 \$fdt_addr_r dtb
 setenv bootargs console=ttyS2,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
-setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r - \$fdt_addr_r
+setenv uenvcmd run loadkernel \&\& run loaddtb \&\& bootm \$kernel_addr_r
 run uenvcmd
diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index ee36df598a..8c37bd0fd1 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -16,7 +16,6 @@ define Build/sunxi-sdcard
 	mkfs.fat $@.boot -C $(FAT32_BLOCKS)
 
 	mcopy -i $@.boot $(STAGING_DIR_IMAGE)/$(DEVICE_NAME)-boot.scr ::boot.scr
-	mcopy -i $@.boot $(DTS_DIR)/$(SUNXI_DTS).dtb ::dtb
 	mcopy -i $@.boot $(IMAGE_KERNEL) ::uImage
 	./gen_sunxi_sdcard_img.sh $@ \
 		$@.boot \
@@ -34,10 +33,18 @@ define Device/Default
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip
-  SUNXI_DTS_DIR :=allwinner/
+  SUNXI_DTS_DIR := allwinner/
   SUNXI_DTS = $$(SUNXI_DTS_DIR)$$(SOC)-$(lastword $(subst _, ,$(1)))
 endef
 
+define Device/FitImageLzma
+  KERNEL = kernel-bin | lzma | fit lzma $$(DTS_DIR)/$$(SUNXI_DTS).dtb
+endef
+
+define Device/FitImageGzip
+  KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(SUNXI_DTS).dtb
+endef
+
 include $(SUBTARGET).mk
 
 $(eval $(call BuildImage))
diff --git a/target/linux/sunxi/image/cortexa53.mk b/target/linux/sunxi/image/cortexa53.mk
index 11ddf629e2..49702ebadd 100644
--- a/target/linux/sunxi/image/cortexa53.mk
+++ b/target/linux/sunxi/image/cortexa53.mk
@@ -3,12 +3,12 @@
 # Copyright (C) 2013-2016 OpenWrt.org
 # Copyright (C) 2016 Yousong Zhou
 
-KERNEL_LOADADDR:=0x40008000
+KERNEL_LOADADDR:=0x40080000
 
 define Device/sun50i
+  $(call Device/FitImageLzma)
   SUNXI_DTS_DIR := allwinner/
   KERNEL_NAME := Image
-  KERNEL := kernel-bin
 endef
 
 define Device/sun50i-a64
diff --git a/target/linux/sunxi/image/cortexa7.mk b/target/linux/sunxi/image/cortexa7.mk
index baecf4539c..9b0d12f125 100644
--- a/target/linux/sunxi/image/cortexa7.mk
+++ b/target/linux/sunxi/image/cortexa7.mk
@@ -6,6 +6,7 @@
 KERNEL_LOADADDR:=0x40008000
 
 define Device/cubietech_cubieboard2
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Cubietech
   DEVICE_MODEL := Cubieboard2
   DEVICE_PACKAGES:=kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
@@ -14,6 +15,7 @@ endef
 TARGET_DEVICES += cubietech_cubieboard2
 
 define Device/cubietech_cubietruck
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Cubietech
   DEVICE_MODEL := Cubietruck
   DEVICE_PACKAGES:=kmod-ata-sunxi kmod-rtc-sunxi kmod-brcmfmac
@@ -22,6 +24,7 @@ endef
 TARGET_DEVICES += cubietech_cubietruck
 
 define Device/friendlyarm_nanopi-m1-plus
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi M1 Plus
   DEVICE_PACKAGES:=kmod-leds-gpio kmod-brcmfmac \
@@ -31,6 +34,7 @@ endef
 TARGET_DEVICES += friendlyarm_nanopi-m1-plus
 
 define Device/friendlyarm_nanopi-neo
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi NEO
   SOC := sun8i-h3
@@ -38,6 +42,7 @@ endef
 TARGET_DEVICES += friendlyarm_nanopi-neo
 
 define Device/friendlyarm_nanopi-neo-air
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi NEO Air
   DEVICE_PACKAGES := kmod-leds-gpio kmod-brcmfmac \
@@ -47,6 +52,7 @@ endef
 TARGET_DEVICES += friendlyarm_nanopi-neo-air
 
 define Device/friendlyarm_nanopi-r1
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi R1
   DEVICE_PACKAGES := kmod-usb-net-rtl8152 kmod-leds-gpio \
@@ -56,6 +62,7 @@ endef
 TARGET_DEVICES += friendlyarm_nanopi-r1
 
 define Device/friendlyarm_zeropi
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := ZeroPi
   DEVICE_PACKAGES := kmod-rtc-sunxi
@@ -64,6 +71,7 @@ endef
 TARGET_DEVICES += friendlyarm_zeropi
 
 define Device/lamobo_lamobo-r1
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Lamobo
   DEVICE_MODEL := Lamobo R1
   DEVICE_ALT0_VENDOR := Bananapi
@@ -76,6 +84,7 @@ endef
 TARGET_DEVICES += lamobo_lamobo-r1
 
 define Device/lemaker_bananapi
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := LeMaker
   DEVICE_MODEL := Banana Pi
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-sunxi
@@ -84,6 +93,7 @@ endef
 TARGET_DEVICES += lemaker_bananapi
 
 define Device/sinovoip_bananapi-m2-berry
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Sinovoip
   DEVICE_MODEL := Banana Pi M2 Berry
   DEVICE_PACKAGES:=kmod-ata-sunxi kmod-brcmfmac \
@@ -94,6 +104,7 @@ endef
 TARGET_DEVICES += sinovoip_bananapi-m2-berry
 
 define Device/sinovoip_bananapi-m2-ultra
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Sinovoip
   DEVICE_MODEL := Banana Pi M2 Ultra
   DEVICE_PACKAGES:=kmod-ata-sunxi kmod-brcmfmac \
@@ -104,6 +115,7 @@ endef
 TARGET_DEVICES += sinovoip_bananapi-m2-ultra
 
 define Device/lemaker_bananapro
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := LeMaker
   DEVICE_MODEL := Banana Pro
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-sunxi kmod-brcmfmac \
@@ -113,6 +125,7 @@ endef
 TARGET_DEVICES += lemaker_bananapro
 
 define Device/licheepi_licheepi-zero-dock
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := LicheePi
   DEVICE_MODEL := Zero with Dock (V3s)
   DEVICE_PACKAGES:=kmod-rtc-sunxi
@@ -121,6 +134,7 @@ endef
 TARGET_DEVICES += licheepi_licheepi-zero-dock
 
 define Device/linksprite_pcduino3
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := LinkSprite
   DEVICE_MODEL := pcDuino3
   DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-ata-sunxi kmod-rtl8xxxu \
@@ -130,6 +144,7 @@ endef
 TARGET_DEVICES += linksprite_pcduino3
 
 define Device/linksprite_pcduino3-nano
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := LinkSprite
   DEVICE_MODEL := pcDuino3 Nano
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-ata-sunxi
@@ -138,6 +153,7 @@ endef
 TARGET_DEVICES += linksprite_pcduino3-nano
 
 define Device/mele_m9
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Mele
   DEVICE_MODEL := M9
   DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtl8192cu
@@ -146,6 +162,7 @@ endef
 TARGET_DEVICES += mele_m9
 
 define Device/merrii_hummingbird
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Merrii
   DEVICE_MODEL := Hummingbird
   DEVICE_PACKAGES:=kmod-brcmfmac cypress-firmware-43362-sdio wpad-basic-mbedtls
@@ -154,6 +171,7 @@ endef
 TARGET_DEVICES += merrii_hummingbird
 
 define Device/olimex_a20-olinuxino-lime
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-LIME
   DEVICE_PACKAGES:=kmod-ata-sunxi kmod-rtc-sunxi
@@ -162,6 +180,7 @@ endef
 TARGET_DEVICES += olimex_a20-olinuxino-lime
 
 define Device/olimex_a20-olinuxino-lime2
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-LIME2
   DEVICE_PACKAGES:=kmod-ata-sunxi kmod-rtc-sunxi kmod-usb-hid
@@ -170,6 +189,7 @@ endef
 TARGET_DEVICES += olimex_a20-olinuxino-lime2
 
 define Device/olimex_a20-olinuxino-lime2-emmc
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-LIME2
   DEVICE_VARIANT := eMMC
@@ -179,6 +199,7 @@ endef
 TARGET_DEVICES += olimex_a20-olinuxino-lime2-emmc
 
 define Device/olimex_a20-olinuxino-micro
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A20-OLinuXino-MICRO
   DEVICE_PACKAGES:=kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
@@ -187,6 +208,7 @@ endef
 TARGET_DEVICES += olimex_a20-olinuxino-micro
 
 define Device/roofull_beelink-x2
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Roofull
   DEVICE_MODEL := Beelink-X2
   DEVICE_PACKAGES:=kmod-leds-gpio kmod-gpio-button-hotplug \
@@ -196,6 +218,7 @@ endef
 TARGET_DEVICES += roofull_beelink-x2
 
 define Device/sinovoip_bananapi-m2-plus
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Sinovoip
   DEVICE_MODEL := Banana Pi M2+
   DEVICE_PACKAGES:=kmod-leds-gpio kmod-brcmfmac \
@@ -205,6 +228,7 @@ endef
 TARGET_DEVICES += sinovoip_bananapi-m2-plus
 
 define Device/sinovoip_bananapi-m3
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Sinovoip
   DEVICE_MODEL := Banana Pi M3
   DEVICE_PACKAGES:=kmod-rtc-sunxi kmod-leds-gpio kmod-rtc-ac100 \
@@ -214,6 +238,7 @@ endef
 TARGET_DEVICES += sinovoip_bananapi-m3
 
 define Device/sinovoip_bananapi-p2-zero
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Sinovoip
   DEVICE_MODEL := Banana Pi P2 Zero
   DEVICE_PACKAGES:=kmod-leds-gpio kmod-brcmfmac \
@@ -223,6 +248,7 @@ endef
 TARGET_DEVICES += sinovoip_bananapi-p2-zero
 
 define Device/xunlong_orangepi-one
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi One
   DEVICE_PACKAGES:=kmod-rtc-sunxi
@@ -231,6 +257,7 @@ endef
 TARGET_DEVICES += xunlong_orangepi-one
 
 define Device/xunlong_orangepi-pc
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi PC
   DEVICE_PACKAGES:=kmod-gpio-button-hotplug
@@ -239,6 +266,7 @@ endef
 TARGET_DEVICES += xunlong_orangepi-pc
 
 define Device/xunlong_orangepi-pc-plus
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi PC Plus
   DEVICE_PACKAGES:=kmod-gpio-button-hotplug
@@ -247,6 +275,7 @@ endef
 TARGET_DEVICES += xunlong_orangepi-pc-plus
 
 define Device/xunlong_orangepi-plus
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi Plus
   DEVICE_PACKAGES:=kmod-rtc-sunxi
@@ -255,6 +284,7 @@ endef
 TARGET_DEVICES += xunlong_orangepi-plus
 
 define Device/xunlong_orangepi-r1
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi R1
   DEVICE_PACKAGES:=kmod-usb-net-rtl8152
@@ -263,6 +293,7 @@ endef
 TARGET_DEVICES += xunlong_orangepi-r1
 
 define Device/xunlong_orangepi-zero
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi Zero
   DEVICE_PACKAGES:=kmod-rtc-sunxi
@@ -271,6 +302,7 @@ endef
 TARGET_DEVICES += xunlong_orangepi-zero
 
 define Device/xunlong_orangepi-2
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Xunlong
   DEVICE_MODEL := Orange Pi 2
   DEVICE_PACKAGES:=kmod-rtc-sunxi
diff --git a/target/linux/sunxi/image/cortexa8.mk b/target/linux/sunxi/image/cortexa8.mk
index e27db1ee16..f79c8d3513 100644
--- a/target/linux/sunxi/image/cortexa8.mk
+++ b/target/linux/sunxi/image/cortexa8.mk
@@ -6,6 +6,7 @@
 KERNEL_LOADADDR:=0x40008000
 
 define Device/cubietech_a10-cubieboard
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Cubietech
   DEVICE_MODEL := Cubieboard
   DEVICE_PACKAGES:=kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
@@ -14,6 +15,7 @@ endef
 TARGET_DEVICES += cubietech_a10-cubieboard
 
 define Device/haoyu_a10-marsboard
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := HAOYU Electronics
   DEVICE_MODEL := MarsBoard A10
   DEVICE_PACKAGES:=kmod-ata-core kmod-ata-sunxi kmod-sun4i-emac \
@@ -24,6 +26,7 @@ endef
 TARGET_DEVICES += haoyu_a10-marsboard
 
 define Device/linksprite_a10-pcduino
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := LinkSprite
   DEVICE_MODEL := pcDuino
   DEVICE_PACKAGES:=kmod-sun4i-emac kmod-rtc-sunxi kmod-rtl8192cu
@@ -32,6 +35,7 @@ endef
 TARGET_DEVICES += linksprite_a10-pcduino
 
 define Device/olimex_a10-olinuxino-lime
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A10-OLinuXino-LIME
   DEVICE_PACKAGES:=kmod-ata-sunxi kmod-sun4i-emac kmod-rtc-sunxi
@@ -40,6 +44,7 @@ endef
 TARGET_DEVICES += olimex_a10-olinuxino-lime
 
 define Device/olimex_a13-olimex-som
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A13-SOM
   DEVICE_PACKAGES:=kmod-rtl8192cu
@@ -50,6 +55,7 @@ endef
 TARGET_DEVICES += olimex_a13-olimex-som
 
 define Device/olimex_a13-olinuxino
+  $(call Device/FitImageGzip)
   DEVICE_VENDOR := Olimex
   DEVICE_MODEL := A13-OLinuXino
   DEVICE_PACKAGES:=kmod-rtl8192cu



From lede-commits at lists.infradead.org  Tue Aug 12 02:12:11 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 12 Aug 2025 05:12:11 -0400
Subject: [openwrt/openwrt]  ipq-wifi: update to Git HEAD (2025-08-12)
In-Reply-To: <175498993198.2469688.6657380649195937234@git-01.infra.openwrt.org>
References: <175498993198.2469688.6657380649195937234@git-01.infra.openwrt.org>
Message-ID: <mailman.117477.1754997056.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f9a8a3636c0079d01bcd2ea2458929c2f33a6458

commit f9a8a3636c0079d01bcd2ea2458929c2f33a6458
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue Aug 12 11:11:47 2025 +0200

    ipq-wifi: update to Git HEAD (2025-08-12)
    
    967cfe977926 qca9988: add BDFs for Xiaomi AIoT Router AC2350
    6db497116709 qcn9274: update board file for 8devices Kiwi-DVK
    7a161011d89d Add IPQ5018 and QCN9074 BDF for Yuncore AX850.
    30b99fc9cc13 ipq6018: add jdcloud_re-ss-01 BDF
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/firmware/ipq-wifi/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 2ba14260db..a31a371d0f 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -6,9 +6,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
-PKG_SOURCE_DATE:=2025-06-23
-PKG_SOURCE_VERSION:=63bd0faafd4a261deae27bb233e10ae2f216c755
-PKG_MIRROR_HASH:=dcdc847e0f6a5655df9018ead35396f4414447b140cbfd3b24dd03514e27cf0e
+PKG_SOURCE_DATE:=2025-08-12
+PKG_SOURCE_VERSION:=30b99fc9cc138e2775a0595cfd4dba43dff50ea8
+PKG_MIRROR_HASH:=de3fd5791077c1e91bbf9cf570925bcd2a7c0cf8168b754bf05649bff939ea7b
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Tue Aug 12 02:54:26 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 12 Aug 2025 05:54:26 -0400
Subject: [openwrt/openwrt]  kernel: Add additional net scheduler fix
In-Reply-To: <175499246636.2639863.3668300821577932979@git-01.infra.openwrt.org>
References: <175499246636.2639863.3668300821577932979@git-01.infra.openwrt.org>
Message-ID: <mailman.117599.1755001539.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/fc876e9d50c701280fa27ea3f122672643163346

commit fc876e9d50c701280fa27ea3f122672643163346
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Mon Aug 11 17:13:37 2025 +0200

    kernel: Add additional net scheduler fix
    
    This fixes a problem introduced in the net scheduler fixes recently
    backported.
    
    Fixes: 242bca458fe4 ("kernel: backport fixes missing in stable")
    Link: https://github.com/openwrt/openwrt/pull/19747
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...05-sch_htb-make-htb_deactivate-idempotent.patch | 96 ++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git a/target/linux/generic/backport-5.15/895-v6.15-0005-sch_htb-make-htb_deactivate-idempotent.patch b/target/linux/generic/backport-5.15/895-v6.15-0005-sch_htb-make-htb_deactivate-idempotent.patch
new file mode 100644
index 0000000000..b22ae2bdc5
--- /dev/null
+++ b/target/linux/generic/backport-5.15/895-v6.15-0005-sch_htb-make-htb_deactivate-idempotent.patch
@@ -0,0 +1,96 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Cong Wang <xiyou.wangcong at gmail.com>
+Date: Mon, 28 Apr 2025 16:29:54 -0700
+Subject: sch_htb: make htb_deactivate() idempotent
+
+Alan reported a NULL pointer dereference in htb_next_rb_node()
+after we made htb_qlen_notify() idempotent.
+
+It turns out in the following case it introduced some regression:
+
+htb_dequeue_tree():
+  |-> fq_codel_dequeue()
+    |-> qdisc_tree_reduce_backlog()
+      |-> htb_qlen_notify()
+        |-> htb_deactivate()
+  |-> htb_next_rb_node()
+  |-> htb_deactivate()
+
+For htb_next_rb_node(), after calling the 1st htb_deactivate(), the
+clprio[prio]->ptr could be already set to  NULL, which means
+htb_next_rb_node() is vulnerable here.
+
+For htb_deactivate(), although we checked qlen before calling it, in
+case of qlen==0 after qdisc_tree_reduce_backlog(), we may call it again
+which triggers the warning inside.
+
+To fix the issues here, we need to:
+
+1) Make htb_deactivate() idempotent, that is, simply return if we
+   already call it before.
+2) Make htb_next_rb_node() safe against ptr==NULL.
+
+Many thanks to Alan for testing and for the reproducer.
+
+Fixes: 5ba8b837b522 ("sch_htb: make htb_qlen_notify() idempotent")
+Reported-by: Alan J. Wylie <alan at wylie.me.uk>
+Signed-off-by: Cong Wang <xiyou.wangcong at gmail.com>
+Link: https://patch.msgid.link/20250428232955.1740419-2-xiyou.wangcong at gmail.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+(cherry picked from commit 3769478610135e82b262640252d90f6efb05be71)
+---
+ net/sched/sch_htb.c | 15 ++++++---------
+ 1 file changed, 6 insertions(+), 9 deletions(-)
+
+--- a/net/sched/sch_htb.c
++++ b/net/sched/sch_htb.c
+@@ -345,7 +345,8 @@ static void htb_add_to_wait_tree(struct
+  */
+ static inline void htb_next_rb_node(struct rb_node **n)
+ {
+-	*n = rb_next(*n);
++	if (*n)
++		*n = rb_next(*n);
+ }
+ 
+ /**
+@@ -606,8 +607,8 @@ static inline void htb_activate(struct h
+  */
+ static inline void htb_deactivate(struct htb_sched *q, struct htb_class *cl)
+ {
+-	WARN_ON(!cl->prio_activity);
+-
++	if (!cl->prio_activity)
++		return;
+ 	htb_deactivate_prios(q, cl);
+ 	cl->prio_activity = 0;
+ }
+@@ -1504,8 +1505,6 @@ static void htb_qlen_notify(struct Qdisc
+ {
+ 	struct htb_class *cl = (struct htb_class *)arg;
+ 
+-	if (!cl->prio_activity)
+-		return;
+ 	htb_deactivate(qdisc_priv(sch), cl);
+ }
+ 
+@@ -1760,8 +1759,7 @@ static int htb_delete(struct Qdisc *sch,
+ 	if (cl->parent)
+ 		cl->parent->children--;
+ 
+-	if (cl->prio_activity)
+-		htb_deactivate(q, cl);
++	htb_deactivate(q, cl);
+ 
+ 	if (cl->cmode != HTB_CAN_SEND)
+ 		htb_safe_rb_erase(&cl->pq_node,
+@@ -1973,8 +1971,7 @@ static int htb_change_class(struct Qdisc
+ 			/* turn parent into inner node */
+ 			qdisc_purge_queue(parent->leaf.q);
+ 			parent_qdisc = parent->leaf.q;
+-			if (parent->prio_activity)
+-				htb_deactivate(q, parent);
++			htb_deactivate(q, parent);
+ 
+ 			/* remove from evt list because of level change */
+ 			if (parent->cmode != HTB_CAN_SEND) {



From lede-commits at lists.infradead.org  Tue Aug 12 09:14:55 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 12 Aug 2025 12:14:55 -0400
Subject: [openwrt/openwrt]  procd: update to Git HEAD (2025-08-12)
In-Reply-To: <175501529503.3934304.14720042498683254103@git-01.infra.openwrt.org>
References: <175501529503.3934304.14720042498683254103@git-01.infra.openwrt.org>
Message-ID: <mailman.118089.1755024104.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/813002176fe0483f80deeb8dd23a4bcf42a3d1d3

commit 813002176fe0483f80deeb8dd23a4bcf42a3d1d3
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Aug 12 17:36:16 2025 +0200

    procd: update to Git HEAD (2025-08-12)
    
    dafdf98b03bf service: fix object nesting in the ubus get_data call
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../wifi-scripts/files/lib/netifd/wireless.uc      | 96 +++++++++++-----------
 package/system/procd/Makefile                      |  6 +-
 2 files changed, 53 insertions(+), 49 deletions(-)

diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
index 956ca54413..f0dc762e19 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
@@ -190,28 +190,30 @@ function config_init(uci)
 		},
 	});
 	for (let svcname, svc in udata) {
-		for (let typename, data in svc) {
-			for (let radio, config in data) {
-				if (type(config) != "object")
-					continue;
-
-				let dev = devices[radio];
-				if (dev) {
-					dev.config = { ...dev.config, ...config };
-					continue;
-				}
+		for (let insname, ins in svc) {
+			for (let typename, data in ins) {
+				for (let radio, config in data) {
+					if (type(config) != "object")
+						continue;
 
-				let handler = wireless.handlers[config.type];
-				if (!handler)
-					continue;
+					let dev = devices[radio];
+					if (dev) {
+						dev.config = { ...dev.config, ...config };
+						continue;
+					}
 
-				dev = devices[radio] = {
-					name,
-					config,
+					let handler = wireless.handlers[config.type];
+					if (!handler)
+						continue;
 
-					vif: [],
-				};
-				handlers[radio] = handler;
+					dev = devices[radio] = {
+						name,
+						config,
+
+						vif: [],
+					};
+					handlers[radio] = handler;
+				}
 			}
 		}
 	}
@@ -226,35 +228,37 @@ function config_init(uci)
 	});
 
 	for (let svcname, svc in udata) {
-		for (let typename, data in svc) {
-			for (let radio, vifs in data) {
-				if (type(vifs) != "object")
-					continue;
-
-				for (let name, vif in vifs) {
-					let devs = vif.device;
-					if (type(devs) != "array")
-						devs = [ devs ];
-					let config = vif.config;
-					if (!config)
+		for (let insname, ins in svc) {
+			for (let typename, data in ins) {
+				for (let radio, vifs in data) {
+					if (type(vifs) != "object")
 						continue;
-					for (let device in devs) {
-						let dev = devices[device];
-						if (!dev)
-							continue;
 
-						let vif_data = {
-							name, device, config,
-							vlan: [],
-							sta: []
-						};
-						if (vif.vlans)
-							vif_data.vlans = vif.vlans;
-						if (vif.stations)
-							vif_data.sta = vif.stations;
-						vifs[name] ??= [];
-						push(vifs[name], vif_data);
-						push(dev.vif, vif_data);
+					for (let name, vif in vifs) {
+						let devs = vif.device;
+						if (type(devs) != "array")
+							devs = [ devs ];
+						let config = vif.config;
+						if (!config)
+							continue;
+						for (let device in devs) {
+							let dev = devices[device];
+							if (!dev)
+								continue;
+
+							let vif_data = {
+								name, device, config,
+								vlan: [],
+								sta: []
+							};
+							if (vif.vlans)
+								vif_data.vlans = vif.vlans;
+							if (vif.stations)
+								vif_data.sta = vif.stations;
+							vifs[name] ??= [];
+							push(vifs[name], vif_data);
+							push(dev.vif, vif_data);
+						}
 					}
 				}
 			}
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 0ede26c37f..1b32c5cea3 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
-PKG_MIRROR_HASH:=6e40f4b526773166315cfccdab22d0d7d5cc18f2a968f3987268de46207b976b
-PKG_SOURCE_DATE:=2025-08-07
-PKG_SOURCE_VERSION:=46780098002167070c665f03f1a8ed76d1e1c55f
+PKG_MIRROR_HASH:=cba150137cdab99ccb711d9f54eac475f94c02f9f68a1084e4a59cda1a4dd714
+PKG_SOURCE_DATE:=2025-08-12
+PKG_SOURCE_VERSION:=dafdf98b03bfa6014cd94ffc86de130b9deb17e4
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Tue Aug 12 11:19:23 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 12 Aug 2025 14:19:23 -0400
Subject: [openwrt/openwrt]  netifd: update to Git HEAD (2025-08-12)
In-Reply-To: <175502276361.261069.13030466486482326290@git-01.infra.openwrt.org>
References: <175502276361.261069.13030466486482326290@git-01.infra.openwrt.org>
Message-ID: <mailman.118181.1755028938.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/be1c301cdcbca0c3be05d30fe157a7db8675443b

commit be1c301cdcbca0c3be05d30fe157a7db8675443b
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Aug 12 20:19:14 2025 +0200

    netifd: update to Git HEAD (2025-08-12)
    
    843a736a4e26 ubus: fix type check in procd ubus data callback
    94c3869941b0 interface: avoid memleaks on invalid interfaces
    6ead304877ad global: use blobmsg_parse_attr
    813b9882dbab config: add support for defining devices via procd data
    575b04326e32 config: add support for defining interfaces via procd data
    a0be934399cf examples: sync wireless.uc
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index bc82ea70dd..2d8ad69f51 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2025-08-06
-PKG_SOURCE_VERSION:=3d140ec0b834e3764e8abe9d33989b76544f8ee9
-PKG_MIRROR_HASH:=de5488d34698699644d11ab697e51d5651a6b6bac92bfc1469ee16139aa2e0a7
+PKG_SOURCE_DATE:=2025-08-12
+PKG_SOURCE_VERSION:=a0be934399cfc0149bfc7d2221467e48177426cd
+PKG_MIRROR_HASH:=a4228247834a654ab989cd731b4ba4bf43b79390e82d9e9f1fa9049abc2875a0
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Wed Aug 13 00:57:08 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 13 Aug 2025 03:57:08 -0400
Subject: [openwrt/openwrt]  mpc85xx: tl-wdr4900: add back 5ghz LED
In-Reply-To: <175507182889.3667695.16147061002260290075@git-01.infra.openwrt.org>
References: <175507182889.3667695.16147061002260290075@git-01.infra.openwrt.org>
Message-ID: <mailman.118563.1755072638.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cc0ff28f235a14283138559249d413b7aa2a9a4d

commit cc0ff28f235a14283138559249d413b7aa2a9a4d
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Tue Aug 12 11:22:27 2025 -0700

    mpc85xx: tl-wdr4900: add back 5ghz LED
    
    In the conversion to dts, qca,led-pin was used for both interfaces.
    Unfortunately, it's mutually exclusive with gpio-controller which made
    it not do anything.
    
    Fixes: 949e1a0 ("mpc85xx: tl-wdr4900: move platform code to dts")
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19758
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts   | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
index 6569d7ff72..598c1822fe 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
@@ -398,18 +398,25 @@
 		compatible = "gpio-leds";
 
 		led-0 {
+			gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_5GHZ;
+			linux,default-trigger = "phy0tpt";
+		};
+
+		led-1 {
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
 			function = LED_FUNCTION_WPS;
 		};
 
-		system_green: led-1 {
+		system_green: led-2 {
 			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
 			function = LED_FUNCTION_STATUS;
 		};
 
-		led-2 {
+		led-3 {
 			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
 			function = LED_FUNCTION_USB;
@@ -418,7 +425,7 @@
 			trigger-sources = <&hub_port1>;
 		};
 
-		led-3 {
+		led-4 {
 			gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
 			function = LED_FUNCTION_USB;



From lede-commits at lists.infradead.org  Wed Aug 13 00:58:05 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 13 Aug 2025 03:58:05 -0400
Subject: [openwrt/openwrt]  mpc85xx: tl-wdr4900: add back 5ghz LED
In-Reply-To: <175507188594.3670062.9715921797377587376@git-01.infra.openwrt.org>
References: <175507188594.3670062.9715921797377587376@git-01.infra.openwrt.org>
Message-ID: <mailman.118564.1755072638.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/9d193d9b6549bd63117e17e22895b3cfb6de562b

commit 9d193d9b6549bd63117e17e22895b3cfb6de562b
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Tue Aug 12 11:22:27 2025 -0700

    mpc85xx: tl-wdr4900: add back 5ghz LED
    
    In the conversion to dts, qca,led-pin was used for both interfaces.
    Unfortunately, it's mutually exclusive with gpio-controller which made
    it not do anything.
    
    Fixes: 949e1a0 ("mpc85xx: tl-wdr4900: move platform code to dts")
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19758
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit cc0ff28f235a14283138559249d413b7aa2a9a4d)
---
 .../mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts   | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
index 4fd9767d2d..861f4511de 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/tl-wdr4900-v1.dts
@@ -395,18 +395,25 @@
 		compatible = "gpio-leds";
 
 		led-0 {
+			gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_5GHZ;
+			linux,default-trigger = "phy0tpt";
+		};
+
+		led-1 {
 			gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
 			function = LED_FUNCTION_WPS;
 		};
 
-		system_green: led-1 {
+		system_green: led-2 {
 			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
 			function = LED_FUNCTION_STATUS;
 		};
 
-		led-2 {
+		led-3 {
 			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
 			function = LED_FUNCTION_USB;
@@ -415,7 +422,7 @@
 			trigger-sources = <&hub_port1>;
 		};
 
-		led-3 {
+		led-4 {
 			gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
 			function = LED_FUNCTION_USB;



From lede-commits at lists.infradead.org  Wed Aug 13 01:55:22 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 13 Aug 2025 04:55:22 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: get the phy capabilities for
 the correct band
In-Reply-To: <175507532298.3842585.4476044151800187123@git-01.infra.openwrt.org>
References: <175507532298.3842585.4476044151800187123@git-01.infra.openwrt.org>
Message-ID: <mailman.118609.1755075455.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d223d29feb7ae6eca61b5cc0072fcecc3bcc20ef

commit d223d29feb7ae6eca61b5cc0072fcecc3bcc20ef
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Aug 13 10:54:03 2025 +0200

    wifi-scripts: ucode: get the phy capabilities for the correct band
    
    On multi-band phys, capabilities can differ between bands.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../files-ucode/usr/share/ucode/wifi/hostapd.uc    | 34 +++++++++++++---------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
index a31b2955eb..b97597a1b3 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
@@ -11,6 +11,7 @@ import * as fs from 'fs';
 const NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER = 33;
 const NL80211_EXT_FEATURE_RADAR_BACKGROUND = 61;
 
+const nl80211_bands = [ '2g', '5g', '60g', '6g' ];
 let phy_features = {};
 let phy_capabilities = {};
 
@@ -436,23 +437,28 @@ function device_extended_features(data, flag) {
 	return !!(data[flag / 8] | (1 << (flag % 8)));
 }
 
-function device_capabilities(phy) {
+function device_capabilities(config) {
+	let phy = config.phy;
 	let idx = +fs.readfile(`/sys/class/ieee80211/${phy}/index`);
 	phy = nl80211.request(nl80211.const.NL80211_CMD_GET_WIPHY, nl80211.const.NLM_F_DUMP, { wiphy: idx, split_wiphy_dump: true });
 	if (!phy)
 		return;
-	for (let band in phy.wiphy_bands) {
-		if (!band)
+
+	let band_idx = index(nl80211_bands, config.band);
+	if (band_idx < 0)
+		return;
+
+	let band = phy.wiphy_bands[band_idx];
+	if (!band)
+		return;
+
+	phy_capabilities.ht_capa = band.ht_capa ?? 0;
+	phy_capabilities.vht_capa = band.vht_capa ?? 0;
+	for (let iftype in band.iftype_data) {
+		if (!iftype.iftypes.ap)
 			continue;
-		phy_capabilities.ht_capa = band.ht_capa ?? 0;
-		phy_capabilities.vht_capa = band.vht_capa ?? 0;
-		for (let iftype in band.iftype_data) {
-			if (!iftype.iftypes.ap)
-				continue;
-			phy_capabilities.he_mac_cap = iftype.he_cap_mac;
-			phy_capabilities.he_phy_cap = iftype.he_cap_phy;
-		}
-		break;
+		phy_capabilities.he_mac_cap = iftype.he_cap_mac;
+		phy_capabilities.he_phy_cap = iftype.he_cap_phy;
 	}
 
 	phy_features.ftm_responder = device_extended_features(phy.extended_features, NL80211_EXT_FEATURE_ENABLE_FTM_RESPONDER);
@@ -460,10 +466,10 @@ function device_capabilities(phy) {
 }
 
 function generate(config) {
-	if (!config.phy)
+	if (!config)
 		die(`${config.path} is an unknown phy`);
 
-	device_capabilities(config.phy);
+	device_capabilities(config);
 
 	append('driver', 'nl80211');
 



From lede-commits at lists.infradead.org  Wed Aug 13 05:23:42 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 13 Aug 2025 08:23:42 -0400
Subject: [openwrt/openwrt]  realtek: drop downstream rtl93xx i2c driver
In-Reply-To: <175508782036.366264.11893306581284052387@git-01.infra.openwrt.org>
References: <175508782036.366264.11893306581284052387@git-01.infra.openwrt.org>
Message-ID: <mailman.118830.1755090933.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d0c64a162aac100dbfd13b9b16b5524bd317a325

commit d0c64a162aac100dbfd13b9b16b5524bd317a325
Author: Jonas Jelonek <jelonek.jonas at gmail.com>
AuthorDate: Sun Jul 27 13:39:26 2025 +0000

    realtek: drop downstream rtl93xx i2c driver
    
    Drop our downstream driver in favor of an upstream existing driver which
    is available starting from v6.13.
    
    Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19736
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../files-6.12/drivers/i2c/busses/i2c-rtl9300.c    | 482 ---------------------
 .../files-6.12/drivers/i2c/busses/i2c-rtl9300.h    |  62 ---
 .../files-6.12/drivers/i2c/muxes/i2c-mux-rtl9300.c | 291 -------------
 .../patches-6.12/310-add-i2c-rtl9300-support.patch |  46 --
 .../311-add-i2c-mux-rtl9300-support.patch          |  46 --
 5 files changed, 927 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/i2c/busses/i2c-rtl9300.c b/target/linux/realtek/files-6.12/drivers/i2c/busses/i2c-rtl9300.c
deleted file mode 100644
index c4d973195e..0000000000
--- a/target/linux/realtek/files-6.12/drivers/i2c/busses/i2c-rtl9300.c
+++ /dev/null
@@ -1,482 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-
-#include <linux/module.h>
-#include <linux/of_platform.h>
-#include <linux/platform_device.h>
-#include "i2c-rtl9300.h"
-
-#define REG(i, x)	(i->base + x + (i->scl_num ? i->mst2_offset : 0))
-#define REG_MASK(i, clear, set, reg)	\
-			writel((readl(REG(i, reg)) & ~(clear)) | (set), REG(i, reg))
-
-struct i2c_drv_data {
-	int scl0_pin;
-	int scl1_pin;
-	int sda0_pin;
-	struct i2c_algorithm *algo;
-	int (*read)(struct rtl9300_i2c *i2c, u8 *buf, int len);
-	int (*write)(struct rtl9300_i2c *i2c, u8 *buf, int len);
-	void (*reg_addr_set)(struct rtl9300_i2c *i2c, u32 reg, u16 len);
-	int (*config_xfer)(struct rtl9300_i2c *i2c, u16 addr, u16 len);
-	int (*execute_xfer)(struct rtl9300_i2c *i2c, char read_write, int size,
-			    union i2c_smbus_data * data, int len);
-	void (*writel)(struct rtl9300_i2c *i2c, u32 data);
-	void (*config_io)(struct rtl9300_i2c *i2c, int scl_num, int sda_num);
-	u32 mst2_offset;
-};
-
-DEFINE_MUTEX(i2c_lock);
-
-static void rtl9300_i2c_reg_addr_set(struct rtl9300_i2c *i2c, u32 reg, u16 len)
-{
-	/* Set register address width */
-	REG_MASK(i2c, 0x3 << RTL9300_I2C_CTRL2_MADDR_WIDTH, len << RTL9300_I2C_CTRL2_MADDR_WIDTH,
-		 RTL9300_I2C_CTRL2);
-
-	/* Set register address */
-	REG_MASK(i2c, 0xffffff << RTL9300_I2C_CTRL1_MEM_ADDR, reg << RTL9300_I2C_CTRL1_MEM_ADDR,
-		 RTL9300_I2C_CTRL1);
-}
-
-static void rtl9310_i2c_reg_addr_set(struct rtl9300_i2c *i2c, u32 reg, u16 len)
-{
-	/* Set register address width */
-	REG_MASK(i2c, 0x3 << RTL9310_I2C_CTRL_MADDR_WIDTH, len << RTL9310_I2C_CTRL_MADDR_WIDTH,
-		 RTL9310_I2C_CTRL);
-
-	/* Set register address */
-	writel(reg, REG(i2c, RTL9310_I2C_MEMADDR));
-}
-
-static void rtl9300_i2c_config_io(struct rtl9300_i2c *i2c, int scl_num, int sda_num)
-{
-	u32 v;
-
-	/* Set SCL pin */
-	REG_MASK(i2c, 0, BIT(RTL9300_I2C_CTRL1_GPIO8_SCL_SEL), RTL9300_I2C_CTRL1);
-
-	/* Set SDA pin */
-	REG_MASK(i2c, 0x7 << RTL9300_I2C_CTRL1_SDA_OUT_SEL,
-		 i2c->sda_num << RTL9300_I2C_CTRL1_SDA_OUT_SEL, RTL9300_I2C_CTRL1);
-
-	/* Set SDA pin to I2C functionality */
-	v = readl(i2c->base + RTL9300_I2C_MST_GLB_CTRL);
-	v |= BIT(i2c->sda_num);
-	writel(v, i2c->base + RTL9300_I2C_MST_GLB_CTRL);
-}
-
-static void rtl9310_i2c_config_io(struct rtl9300_i2c *i2c, int scl_num, int sda_num)
-{
-	u32 v;
-
-	/* Set SCL pin */
-	REG_MASK(i2c, 0, BIT(RTL9310_I2C_MST_IF_SEL_GPIO_SCL_SEL + scl_num), RTL9310_I2C_MST_IF_SEL);
-
-	/* Set SDA pin */
-	REG_MASK(i2c, 0x7 << RTL9310_I2C_CTRL_SDA_OUT_SEL,
-		 i2c->sda_num << RTL9310_I2C_CTRL_SDA_OUT_SEL, RTL9310_I2C_CTRL);
-
-	/* Set SDA pin to I2C functionality */
-	v = readl(i2c->base + RTL9310_I2C_MST_IF_SEL);
-	v |= BIT(i2c->sda_num);
-	writel(v, i2c->base + RTL9310_I2C_MST_IF_SEL);
-}
-
-static int rtl9300_i2c_config_xfer(struct rtl9300_i2c *i2c, u16 addr, u16 len)
-{
-	/* Set bus frequency */
-	REG_MASK(i2c, 0x3 << RTL9300_I2C_CTRL2_SCL_FREQ,
-		 i2c->bus_freq << RTL9300_I2C_CTRL2_SCL_FREQ, RTL9300_I2C_CTRL2);
-
-	/* Set slave device address */
-	REG_MASK(i2c, 0x7f << RTL9300_I2C_CTRL2_DEV_ADDR,
-		 addr << RTL9300_I2C_CTRL2_DEV_ADDR, RTL9300_I2C_CTRL2);
-
-	/* Set data length */
-	REG_MASK(i2c, 0xf << RTL9300_I2C_CTRL2_DATA_WIDTH,
-		 ((len - 1) & 0xf) << RTL9300_I2C_CTRL2_DATA_WIDTH, RTL9300_I2C_CTRL2);
-
-	/* Set read mode to random */
-	REG_MASK(i2c, 0x1 << RTL9300_I2C_CTRL2_READ_MODE, 0, RTL9300_I2C_CTRL2);
-
-	return 0;
-}
-
-static int rtl9310_i2c_config_xfer(struct rtl9300_i2c *i2c, u16 addr, u16 len)
-{
-	/* Set bus frequency */
-	REG_MASK(i2c, 0x3 << RTL9310_I2C_CTRL_SCL_FREQ,
-		 i2c->bus_freq << RTL9310_I2C_CTRL_SCL_FREQ, RTL9310_I2C_CTRL);
-
-	/* Set slave device address */
-	REG_MASK(i2c, 0x7f << RTL9310_I2C_CTRL_DEV_ADDR,
-		 addr << RTL9310_I2C_CTRL_DEV_ADDR, RTL9310_I2C_CTRL);
-
-	/* Set data length */
-	REG_MASK(i2c, 0xf << RTL9310_I2C_CTRL_DATA_WIDTH,
-		 ((len - 1) & 0xf) << RTL9310_I2C_CTRL_DATA_WIDTH, RTL9310_I2C_CTRL);
-
-	/* Set read mode to random */
-	REG_MASK(i2c, 0x1 << RTL9310_I2C_CTRL_READ_MODE, 0, RTL9310_I2C_CTRL);
-
-	return 0;
-}
-
-static int i2c_read(void __iomem *r0, u8 *buf, int len)
-{
-	if (len > 16)
-		return -EIO;
-
-	for (int i = 0; i < len; i++) {
-		u32 v;
-
-		if (i % 4 == 0)
-			v = readl(r0 + i);
-		buf[i] = v;
-		v >>= 8;
-	}
-
-	return len;
-}
-
-static int i2c_write(void __iomem *r0, u8 *buf, int len)
-{
-	if (len > 16)
-		return -EIO;
-
-	for (int i = 0; i < len; i++) {
-		u32 v;
-
-		if (! (i % 4))
-			v = 0;
-		v <<= 8;
-		v |= buf[i];
-		if (i % 4 == 3 || i == len - 1)
-			writel(v, r0 + (i / 4) * 4);
-	}
-
-	return len;
-}
-
-static int rtl9300_i2c_read(struct rtl9300_i2c *i2c, u8 *buf, int len)
-{
-	return i2c_read(REG(i2c, RTL9300_I2C_DATA_WORD0), buf, len);
-}
-
-static int rtl9300_i2c_write(struct rtl9300_i2c *i2c, u8 *buf, int len)
-{
-	return i2c_write(REG(i2c, RTL9300_I2C_DATA_WORD0), buf, len);
-}
-
-static int rtl9310_i2c_read(struct rtl9300_i2c *i2c, u8 *buf, int len)
-{
-	return i2c_read(REG(i2c, RTL9310_I2C_DATA), buf, len);
-}
-
-static int rtl9310_i2c_write(struct rtl9300_i2c *i2c, u8 *buf, int len)
-{
-	return i2c_write(REG(i2c, RTL9310_I2C_DATA), buf, len);
-}
-
-static void rtl9300_writel(struct rtl9300_i2c *i2c, u32 data)
-{
-	writel(data, REG(i2c, RTL9300_I2C_DATA_WORD0));
-}
-
-static void rtl9310_writel(struct rtl9300_i2c *i2c, u32 data)
-{
-	writel(data, REG(i2c, RTL9310_I2C_DATA));
-}
-
-
-static int rtl9300_execute_xfer(struct rtl9300_i2c *i2c, char read_write,
-				int size, union i2c_smbus_data * data, int len)
-{
-	u32 v;
-
-	if (read_write == I2C_SMBUS_READ)
-		REG_MASK(i2c, BIT(RTL9300_I2C_CTRL1_RWOP), 0, RTL9300_I2C_CTRL1);
-	else
-		REG_MASK(i2c, 0, BIT(RTL9300_I2C_CTRL1_RWOP), RTL9300_I2C_CTRL1);
-
-	REG_MASK(i2c, 0, BIT(RTL9300_I2C_CTRL1_I2C_TRIG), RTL9300_I2C_CTRL1);
-	do {
-		v = readl(REG(i2c, RTL9300_I2C_CTRL1));
-	} while (v & BIT(RTL9300_I2C_CTRL1_I2C_TRIG));
-
-	if (v & BIT(RTL9300_I2C_CTRL1_I2C_FAIL))
-		return -EIO;
-
-	if (read_write == I2C_SMBUS_READ) {
-		if (size == I2C_SMBUS_BYTE || size == I2C_SMBUS_BYTE_DATA){
-			data->byte = readl(REG(i2c, RTL9300_I2C_DATA_WORD0));
-		} else if (size == I2C_SMBUS_WORD_DATA) {
-			data->word = readl(REG(i2c, RTL9300_I2C_DATA_WORD0));
-		} else if (len > 0) {
-			rtl9300_i2c_read(i2c, &data->block[0], len);
-		}
-	}
-
-	return 0;
-}
-
-static int rtl9310_execute_xfer(struct rtl9300_i2c *i2c, char read_write,
-				int size, union i2c_smbus_data * data, int len)
-{
-	u32 v;
-
-	if (read_write == I2C_SMBUS_READ)
-		REG_MASK(i2c, BIT(RTL9310_I2C_CTRL_RWOP), 0, RTL9310_I2C_CTRL);
-	else
-		REG_MASK(i2c, 0, BIT(RTL9310_I2C_CTRL_RWOP), RTL9310_I2C_CTRL);
-
-	REG_MASK(i2c, 0, BIT(RTL9310_I2C_CTRL_I2C_TRIG), RTL9310_I2C_CTRL);
-	do {
-		v = readl(REG(i2c, RTL9310_I2C_CTRL));
-	} while (v & BIT(RTL9310_I2C_CTRL_I2C_TRIG));
-
-	if (v & BIT(RTL9310_I2C_CTRL_I2C_FAIL))
-		return -EIO;
-
-	if (read_write == I2C_SMBUS_READ) {
-		if (size == I2C_SMBUS_BYTE || size == I2C_SMBUS_BYTE_DATA){
-			data->byte = readl(REG(i2c, RTL9310_I2C_DATA));
-		} else if (size == I2C_SMBUS_WORD_DATA) {
-			data->word = readl(REG(i2c, RTL9310_I2C_DATA));
-		} else if (len > 0) {
-			rtl9310_i2c_read(i2c, &data->block[0], len);
-		}
-	}
-
-	return 0;
-}
-
-static int rtl9300_i2c_smbus_xfer(struct i2c_adapter * adap, u16 addr,
-		  unsigned short flags, char read_write,
-		  u8 command, int size, union i2c_smbus_data * data)
-{
-	struct rtl9300_i2c *i2c = i2c_get_adapdata(adap);
-	struct i2c_drv_data *drv_data = (struct i2c_drv_data *)device_get_match_data(i2c->dev);
-	int len = 0, ret;
-
-	mutex_lock(&i2c_lock);
-	switch (size) {
-	case I2C_SMBUS_QUICK:
-		drv_data->config_xfer(i2c, addr, 0);
-		drv_data->reg_addr_set(i2c, 0, 0);
-		break;
-
-	case I2C_SMBUS_BYTE:
-		if (read_write == I2C_SMBUS_WRITE) {
-			drv_data->config_xfer(i2c, addr, 0);
-			drv_data->reg_addr_set(i2c, command, 1);
-		} else {
-			drv_data->config_xfer(i2c, addr, 1);
-			drv_data->reg_addr_set(i2c, 0, 0);
-		}
-		break;
-
-	case I2C_SMBUS_BYTE_DATA:
-		pr_debug("I2C_SMBUS_BYTE_DATA %02x, read %d cmd %02x\n", addr, read_write, command);
-		drv_data->reg_addr_set(i2c, command, 1);
-		drv_data->config_xfer(i2c, addr, 1);
-
-		if (read_write == I2C_SMBUS_WRITE) {
-			pr_debug("--> data %02x\n", data->byte);
-			drv_data->writel(i2c, data->byte);
-		}
-		break;
-
-	case I2C_SMBUS_WORD_DATA:
-		pr_debug("I2C_SMBUS_WORD %02x, read %d\n", addr, read_write);
-		drv_data->reg_addr_set(i2c, command, 1);
-		drv_data->config_xfer(i2c, addr, 2);
-		if (read_write == I2C_SMBUS_WRITE)
-			drv_data->writel(i2c, data->word);
-		break;
-
-	case I2C_SMBUS_BLOCK_DATA:
-		pr_debug("I2C_SMBUS_BLOCK_DATA %02x, read %d, len %d\n",
-			addr, read_write, data->block[0]);
-		drv_data->reg_addr_set(i2c, command, 1);
-		drv_data->config_xfer(i2c, addr, data->block[0]);
-		if (read_write == I2C_SMBUS_WRITE)
-			drv_data->write(i2c, &data->block[1], data->block[0]);
-		len = data->block[0];
-		break;
-
-	default:
-		dev_warn(&adap->dev, "Unsupported transaction %d\n", size);
-		return -EOPNOTSUPP;
-	}
-
-	ret = drv_data->execute_xfer(i2c, read_write, size, data, len);
-
-	mutex_unlock(&i2c_lock);
-
-	return ret;
-}
-
-static u32 rtl9300_i2c_func(struct i2c_adapter *a)
-{
-	return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
-	       I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA |
-	       I2C_FUNC_SMBUS_BLOCK_DATA;
-}
-
-static const struct i2c_algorithm rtl9300_i2c_algo = {
-	.smbus_xfer	= rtl9300_i2c_smbus_xfer,
-	.functionality	= rtl9300_i2c_func,
-};
-
-struct i2c_adapter_quirks rtl9300_i2c_quirks = {
-	.flags		= I2C_AQ_NO_CLK_STRETCH,
-	.max_read_len	= 16,
-	.max_write_len	= 16,
-};
-
-static int rtl9300_i2c_probe(struct platform_device *pdev)
-{
-	struct rtl9300_i2c *i2c;
-	struct i2c_adapter *adap;
-	struct i2c_drv_data *drv_data;
-	struct device_node *node = pdev->dev.of_node;
-	u32 clock_freq, pin;
-	int ret = 0;
-
-	pr_info("%s probing I2C adapter\n", __func__);
-
-	if (!node) {
-		dev_err(i2c->dev, "No DT found\n");
-		return -EINVAL;
-	}
-
-	drv_data = (struct i2c_drv_data *) device_get_match_data(&pdev->dev);
-
-	i2c = devm_kzalloc(&pdev->dev, sizeof(struct rtl9300_i2c), GFP_KERNEL);
-	if (!i2c)
-		return -ENOMEM;
-
-	i2c->base = devm_platform_ioremap_resource(pdev, 0);
-	i2c->mst2_offset = drv_data->mst2_offset;
-	if (IS_ERR(i2c->base))
-		return PTR_ERR(i2c->base);
-
-	pr_debug("%s base memory %08x\n", __func__, (u32)i2c->base);
-	i2c->dev = &pdev->dev;
-
-	if (of_property_read_u32(node, "clock-frequency", &clock_freq)) {
-		clock_freq = I2C_MAX_STANDARD_MODE_FREQ;
-	}
-	switch(clock_freq) {
-	case I2C_MAX_STANDARD_MODE_FREQ:
-		i2c->bus_freq = RTL9300_I2C_STD_FREQ;
-		break;
-
-	case I2C_MAX_FAST_MODE_FREQ:
-		i2c->bus_freq = RTL9300_I2C_FAST_FREQ;
-		break;
-	default:
-		dev_warn(i2c->dev, "clock-frequency %d not supported\n", clock_freq);
-		return -EINVAL;
-	}
-
-	dev_info(&pdev->dev, "SCL speed %d, mode is %d\n", clock_freq, i2c->bus_freq);
-
-	if (of_property_read_u32(node, "scl-pin", &pin)) {
-		dev_warn(i2c->dev, "SCL pin not found in DT, using default\n");
-		pin = drv_data->scl0_pin;
-	}
-	if (!(pin == drv_data->scl0_pin || pin == drv_data->scl1_pin)) {
-		dev_warn(i2c->dev, "SCL pin %d not supported\n", pin);
-		return -EINVAL;
-	}
-	i2c->scl_num = pin == drv_data->scl0_pin ? 0 : 1;
-	pr_info("%s scl_num %d\n", __func__, i2c->scl_num);
-
-	if (of_property_read_u32(node, "sda-pin", &pin)) {
-		dev_warn(i2c->dev, "SDA pin not found in DT, using default \n");
-		pin = drv_data->sda0_pin;
-	}
-	i2c->sda_num = pin - drv_data->sda0_pin;
-	if (i2c->sda_num < 0 || i2c->sda_num > 7) {
-		dev_warn(i2c->dev, "SDA pin %d not supported\n", pin);
-		return -EINVAL;
-	}
-	pr_info("%s sda_num %d\n", __func__, i2c->sda_num);
-
-	adap = &i2c->adap;
-	adap->owner = THIS_MODULE;
-	adap->algo = &rtl9300_i2c_algo;
-	adap->retries = 3;
-	adap->dev.parent = &pdev->dev;
-	i2c_set_adapdata(adap, i2c);
-	adap->dev.of_node = node;
-	strscpy(adap->name, dev_name(&pdev->dev), sizeof(adap->name));
-
-	platform_set_drvdata(pdev, i2c);
-
-	drv_data->config_io(i2c, i2c->scl_num, i2c->sda_num);
-
-	ret = i2c_add_adapter(adap);
-
-	return ret;
-}
-
-static void rtl9300_i2c_remove(struct platform_device *pdev)
-{
-	struct rtl9300_i2c *i2c = platform_get_drvdata(pdev);
-
-	i2c_del_adapter(&i2c->adap);
-}
-
-struct i2c_drv_data rtl9300_i2c_drv_data = {
-	.scl0_pin = 8,
-	.scl1_pin = 17,
-	.sda0_pin = 9,
-	.read = rtl9300_i2c_read,
-	.write = rtl9300_i2c_write,
-	.reg_addr_set = rtl9300_i2c_reg_addr_set,
-	.config_xfer = rtl9300_i2c_config_xfer,
-	.execute_xfer = rtl9300_execute_xfer,
-	.writel = rtl9300_writel,
-	.config_io = rtl9300_i2c_config_io,
-	.mst2_offset = 0x1c,
-};
-
-struct i2c_drv_data rtl9310_i2c_drv_data = {
-	.scl0_pin = 13,
-	.scl1_pin = 14,
-	.sda0_pin = 15,
-	.read = rtl9310_i2c_read,
-	.write = rtl9310_i2c_write,
-	.reg_addr_set = rtl9310_i2c_reg_addr_set,
-	.config_xfer = rtl9310_i2c_config_xfer,
-	.execute_xfer = rtl9310_execute_xfer,
-	.writel = rtl9310_writel,
-	.config_io = rtl9310_i2c_config_io,
-	.mst2_offset = 0x18,
-};
-
-static const struct of_device_id i2c_rtl9300_dt_ids[] = {
-	{ .compatible = "realtek,rtl9300-i2c", .data = (void *) &rtl9300_i2c_drv_data },
-	{ .compatible = "realtek,rtl9310-i2c", .data = (void *) &rtl9310_i2c_drv_data },
-	{ /* sentinel */ }
-};
-MODULE_DEVICE_TABLE(of, rtl838x_eth_of_ids);
-
-static struct platform_driver rtl9300_i2c_driver = {
-	.probe		= rtl9300_i2c_probe,
-	.remove		= rtl9300_i2c_remove,
-	.driver		= {
-		.name	= "i2c-rtl9300",
-		.pm 	= NULL,
-		.of_match_table = i2c_rtl9300_dt_ids,
-	},
-};
-
-module_platform_driver(rtl9300_i2c_driver);
-
-MODULE_AUTHOR("Birger Koblitz");
-MODULE_DESCRIPTION("RTL9300 I2C host driver");
-MODULE_LICENSE("GPL v2");
diff --git a/target/linux/realtek/files-6.12/drivers/i2c/busses/i2c-rtl9300.h b/target/linux/realtek/files-6.12/drivers/i2c/busses/i2c-rtl9300.h
deleted file mode 100644
index 617a1b6632..0000000000
--- a/target/linux/realtek/files-6.12/drivers/i2c/busses/i2c-rtl9300.h
+++ /dev/null
@@ -1,62 +0,0 @@
-#ifndef I2C_RTL9300_H
-#define I2C_RTL9300_H
-
-#include <linux/i2c.h>
-
-#define RTL9300_I2C_CTRL1			0x00
-#define RTL9300_I2C_CTRL1_MEM_ADDR		8
-#define RTL9300_I2C_CTRL1_SDA_OUT_SEL		4
-#define RTL9300_I2C_CTRL1_GPIO8_SCL_SEL		3
-#define RTL9300_I2C_CTRL1_RWOP			2
-#define RTL9300_I2C_CTRL1_I2C_FAIL		1
-#define RTL9300_I2C_CTRL1_I2C_TRIG		0
-
-#define RTL9300_I2C_CTRL2			0x04
-#define RTL9300_I2C_CTRL2_DRIVE_ACK_DELAY	20
-#define RTL9300_I2C_CTRL2_CHECK_ACK_DELAY	16
-#define RTL9300_I2C_CTRL2_READ_MODE		15
-#define RTL9300_I2C_CTRL2_DEV_ADDR		8
-#define RTL9300_I2C_CTRL2_DATA_WIDTH		4
-#define RTL9300_I2C_CTRL2_MADDR_WIDTH		2
-#define RTL9300_I2C_CTRL2_SCL_FREQ		0
-
-#define RTL9300_I2C_DATA_WORD0			0x08
-
-#define RTL9300_I2C_MST_GLB_CTRL		0x18
-
-#define RTL9310_I2C_MST_IF_CTRL			0x00
-
-#define RTL9310_I2C_MST_IF_SEL			0x04
-#define RTL9310_I2C_MST_IF_SEL_GPIO_SCL_SEL	12
-
-#define RTL9310_I2C_CTRL			0x08
-#define RTL9310_I2C_CTRL_SCL_FREQ		30
-#define RTL9310_I2C_CTRL_CHECK_ACK_DELAY	26
-#define RTL9310_I2C_CTRL_DRIVE_ACK_DELAY	22
-#define RTL9310_I2C_CTRL_SDA_OUT_SEL		18
-#define RTL9310_I2C_CTRL_DEV_ADDR		11
-#define RTL9310_I2C_CTRL_MADDR_WIDTH		9
-#define RTL9310_I2C_CTRL_DATA_WIDTH		5
-#define RTL9310_I2C_CTRL_READ_MODE		4
-#define RTL9310_I2C_CTRL_RWOP			2
-#define RTL9310_I2C_CTRL_I2C_FAIL		1
-#define RTL9310_I2C_CTRL_I2C_TRIG		0
-
-#define RTL9310_I2C_MEMADDR			0x0c
-
-#define RTL9310_I2C_DATA			0x10
-
-#define RTL9300_I2C_STD_FREQ		0
-#define RTL9300_I2C_FAST_FREQ		1
-
-struct rtl9300_i2c {
-	void __iomem *base;
-	u32 mst2_offset;
-	struct device *dev;
-	struct i2c_adapter adap;
-	u8 bus_freq;
-	u8 sda_num;			/* SDA channel number */
-	u8 scl_num;			/* SCL channel, mapping to master 1 or 2 */
-};
-
-#endif
diff --git a/target/linux/realtek/files-6.12/drivers/i2c/muxes/i2c-mux-rtl9300.c b/target/linux/realtek/files-6.12/drivers/i2c/muxes/i2c-mux-rtl9300.c
deleted file mode 100644
index a57e9e29b1..0000000000
--- a/target/linux/realtek/files-6.12/drivers/i2c/muxes/i2c-mux-rtl9300.c
+++ /dev/null
@@ -1,291 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- * I2C multiplexer for the 2 I2C Masters of the RTL9300
- * with up to 8 channels each, but which are not entirely
- * independent of each other
- */
-#include <linux/i2c-mux.h>
-#include <linux/module.h>
-#include <linux/mux/consumer.h>
-#include <linux/of_device.h>
-#include <linux/of_address.h>
-#include <linux/platform_device.h>
-
-#include "../busses/i2c-rtl9300.h"
-
-#define NUM_MASTERS		2
-#define NUM_BUSSES		8
-
-#define REG(mst, x)	(mux->base + x + (mst ? mux->i2c->mst2_offset : 0))
-#define REG_MASK(mst, clear, set, reg)	\
-			writel((readl(REG((mst),(reg))) & ~(clear)) | (set), REG((mst),(reg)))
-
-struct channel {
-	u8 sda_num;
-	u8 scl_num;
-};
-
-static struct channel channels[NUM_MASTERS * NUM_BUSSES];
-
-struct rtl9300_mux {
-	void __iomem *base;
-	struct device *dev;
-	struct i2c_adapter *parent;
-	struct rtl9300_i2c * i2c;
-};
-
-struct i2c_mux_data  {
-	int scl0_pin;
-	int scl1_pin;
-	int sda0_pin;
-	int sda_pins;
-	int (*i2c_mux_select)(struct i2c_mux_core *muxc, u32 chan);
-	int (*i2c_mux_deselect)(struct i2c_mux_core *muxc, u32 chan);
-	void (*sda_sel)(struct i2c_mux_core *muxc, int pin);
-};
-
-static int rtl9300_i2c_mux_select(struct i2c_mux_core *muxc, u32 chan)
-{
-	struct rtl9300_mux *mux = i2c_mux_priv(muxc);
-
-	/* Set SCL pin */
-	REG_MASK(channels[chan].scl_num, 0,
-		 BIT(RTL9300_I2C_CTRL1_GPIO8_SCL_SEL), RTL9300_I2C_CTRL1);
-
-	/* Set SDA pin */
-	REG_MASK(channels[chan].scl_num, 0x7 << RTL9300_I2C_CTRL1_SDA_OUT_SEL,
-		 channels[chan].sda_num << RTL9300_I2C_CTRL1_SDA_OUT_SEL, RTL9300_I2C_CTRL1);
-
-	mux->i2c->sda_num = channels[chan].sda_num;
-	mux->i2c->scl_num = channels[chan].scl_num;
-
-	return 0;
-}
-
-static int rtl9310_i2c_mux_select(struct i2c_mux_core *muxc, u32 chan)
-{
-	struct rtl9300_mux *mux = i2c_mux_priv(muxc);
-
-	/* Set SCL pin */
-	REG_MASK(0, 0, BIT(RTL9310_I2C_MST_IF_SEL_GPIO_SCL_SEL + channels[chan].scl_num),
-		 RTL9310_I2C_MST_IF_SEL);
-
-	/* Set SDA pin */
-	REG_MASK(channels[chan].scl_num, 0xf << RTL9310_I2C_CTRL_SDA_OUT_SEL,
-		 channels[chan].sda_num << RTL9310_I2C_CTRL_SDA_OUT_SEL, RTL9310_I2C_CTRL);
-
-	mux->i2c->sda_num = channels[chan].sda_num;
-	mux->i2c->scl_num = channels[chan].scl_num;
-
-	return 0;
-}
-
-static int rtl9300_i2c_mux_deselect(struct i2c_mux_core *muxc, u32 chan)
-{
-	return 0;
-}
-
-static void rtl9300_sda_sel(struct i2c_mux_core *muxc, int pin)
-{
-	struct rtl9300_mux *mux = i2c_mux_priv(muxc);
-	u32 v;
-
-	/* Set SDA pin to I2C functionality */
-	v = readl(REG(0, RTL9300_I2C_MST_GLB_CTRL));
-	v |= BIT(pin);
-	writel(v, REG(0, RTL9300_I2C_MST_GLB_CTRL));
-}
-
-static void rtl9310_sda_sel(struct i2c_mux_core *muxc, int pin)
-{
-	struct rtl9300_mux *mux = i2c_mux_priv(muxc);
-	u32 v;
-
-	/* Set SDA pin to I2C functionality */
-	v = readl(REG(0, RTL9310_I2C_MST_IF_SEL));
-	v |= BIT(pin);
-	writel(v, REG(0, RTL9310_I2C_MST_IF_SEL));
-}
-
-static struct device_node *mux_parent_adapter(struct device *dev, struct rtl9300_mux *mux)
-{
-	struct device_node *node = dev->of_node;
-	struct device_node *parent_np;
-	struct i2c_adapter *parent;
-
-	parent_np = of_parse_phandle(node, "i2c-parent", 0);
-	if (!parent_np) {
-		dev_err(dev, "Cannot parse i2c-parent\n");
-		return ERR_PTR(-ENODEV);
-	}
-	parent = of_find_i2c_adapter_by_node(parent_np);
-	of_node_put(parent_np);
-	if (!parent)
-		return ERR_PTR(-EPROBE_DEFER);
-
-	if (!(of_device_is_compatible(parent_np, "realtek,rtl9300-i2c") ||
-	    of_device_is_compatible(parent_np, "realtek,rtl9310-i2c"))){
-		dev_err(dev, "I2C parent not an RTL9300 I2C controller\n");
-		return ERR_PTR(-ENODEV);
-	}
-
-	mux->parent = parent;
-	mux->i2c = (struct rtl9300_i2c *)i2c_get_adapdata(parent);
-	mux->base = mux->i2c->base;
-
-	return parent_np;
-}
-
-struct i2c_mux_data rtl9300_i2c_mux_data = {
-	.scl0_pin = 8,
-	.scl1_pin = 17,
-	.sda0_pin = 9,
-	.sda_pins = 8,
-	.i2c_mux_select = rtl9300_i2c_mux_select,
-	.i2c_mux_deselect = rtl9300_i2c_mux_deselect,
-	.sda_sel = rtl9300_sda_sel,
-};
-
-struct i2c_mux_data rtl9310_i2c_mux_data = {
-	.scl0_pin = 13,
-	.scl1_pin = 14,
-	.sda0_pin = 15,
-	.sda_pins = 16,
-	.i2c_mux_select = rtl9310_i2c_mux_select,
-	.i2c_mux_deselect = rtl9300_i2c_mux_deselect,
-	.sda_sel = rtl9310_sda_sel,
-};
-
-static const struct of_device_id rtl9300_i2c_mux_of_match[] = {
-	{ .compatible = "realtek,i2c-mux-rtl9300", .data = (void *) &rtl9300_i2c_mux_data},
-	{ .compatible = "realtek,i2c-mux-rtl9310", .data = (void *) &rtl9310_i2c_mux_data},
-	{},
-};
-
-MODULE_DEVICE_TABLE(of, rtl9300_i2c_mux_of_match);
-
-static int rtl9300_i2c_mux_probe(struct platform_device *pdev)
-{
-	struct device *dev = &pdev->dev;
-	struct device_node *node = dev->of_node;
-	struct device_node *parent_np;
-	struct device_node *child;
-	struct i2c_mux_core *muxc;
-	struct rtl9300_mux *mux;
-	struct i2c_mux_data *mux_data;
-	int children;
-	int ret;
-
-	pr_info("%s probing I2C adapter\n", __func__);
-
-	if (!node) {
-		dev_err(dev, "No DT found\n");
-		return -EINVAL;
-	}
-
-	mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL);
-	if (!mux)
-		return -ENOMEM;
-
-	mux->dev = dev;
-
-	mux_data = (struct i2c_mux_data *) device_get_match_data(dev);
-
-	parent_np = mux_parent_adapter(dev, mux);
-	if (IS_ERR(parent_np))
-		return dev_err_probe(dev, PTR_ERR(parent_np), "i2c-parent adapter not found\n");
-
-	pr_info("%s base memory %08x\n", __func__, (u32)mux->base);
-
-	children = of_get_child_count(node);
-
-	muxc = i2c_mux_alloc(mux->parent, dev, children, 0, 0,
-			     mux_data->i2c_mux_select, mux_data->i2c_mux_deselect);
-	if (!muxc) {
-		ret = -ENOMEM;
-		goto err_parent;
-	}
-	muxc->priv = mux;
-
-	platform_set_drvdata(pdev, muxc);
-
-	for_each_child_of_node(node, child) {
-		u32 chan;
-		u32 pin;
-
-		ret = of_property_read_u32(child, "reg", &chan);
-		if (ret < 0) {
-			dev_err(dev, "no reg property for node '%pOFn'\n",
-				child);
-			goto err_children;
-		}
-
-		if (chan >= NUM_MASTERS * NUM_BUSSES) {
-			dev_err(dev, "invalid reg %u\n", chan);
-			ret = -EINVAL;
-			goto err_children;
-		}
-
-		if (of_property_read_u32(child, "scl-pin", &pin)) {
-			dev_warn(dev, "SCL pin not found in DT, using default\n");
-			pin = mux_data->scl0_pin;
-		}
-		if (!(pin == mux_data->scl0_pin || pin == mux_data->scl1_pin)) {
-			dev_warn(dev, "SCL pin %d not supported\n", pin);
-			ret = -EINVAL;
-			goto err_children;
-		}
-		channels[chan].scl_num = pin == mux_data->scl0_pin ? 0 : 1;
-		pr_info("%s channel %d scl_num %d\n", __func__, chan, channels[chan].scl_num);
-
-		if (of_property_read_u32(child, "sda-pin", &pin)) {
-			dev_warn(dev, "SDA pin not found in DT, using default \n");
-			pin = mux_data->sda0_pin;
-		}
-		channels[chan].sda_num = pin - mux_data->sda0_pin;
-		if (channels[chan].sda_num < 0 || channels[chan].sda_num >= mux_data->sda_pins) {
-			dev_warn(dev, "SDA pin %d not supported\n", pin);
-			return -EINVAL;
-		}
-		pr_info("%s channel %d sda_num %d\n", __func__, chan, channels[chan].sda_num);
-
-		mux_data->sda_sel(muxc, channels[chan].sda_num);
-
-		ret = i2c_mux_add_adapter(muxc, 0, chan);
-		if (ret)
-			goto err_children;
-	}
-
-	dev_info(dev, "%d-port mux on %s adapter\n", children, mux->parent->name);
-
-	return 0;
-
-err_children:
-	i2c_mux_del_adapters(muxc);
-err_parent:
-	i2c_put_adapter(mux->parent);
-
-	return ret;
-}
-
-static void rtl9300_i2c_mux_remove(struct platform_device *pdev)
-{
-	struct i2c_mux_core *muxc = platform_get_drvdata(pdev);
-
-	i2c_mux_del_adapters(muxc);
-	i2c_put_adapter(muxc->parent);
-}
-
-static struct platform_driver i2c_mux_driver = {
-	.probe	= rtl9300_i2c_mux_probe,
-	.remove	= rtl9300_i2c_mux_remove,
-	.driver	= {
-		.name	= "i2c-mux-rtl9300",
-		.of_match_table = rtl9300_i2c_mux_of_match,
-	},
-};
-module_platform_driver(i2c_mux_driver);
-
-MODULE_DESCRIPTION("RTL9300 I2C multiplexer driver");
-MODULE_AUTHOR("Birger Koblitz");
-MODULE_LICENSE("GPL v2");
diff --git a/target/linux/realtek/patches-6.12/310-add-i2c-rtl9300-support.patch b/target/linux/realtek/patches-6.12/310-add-i2c-rtl9300-support.patch
deleted file mode 100644
index 7a32866818..0000000000
--- a/target/linux/realtek/patches-6.12/310-add-i2c-rtl9300-support.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 63a0a4d85bc900464c5b046b13808a582345f8c8 Mon Sep 17 00:00:00 2001
-From: Birger Koblitz <git at birger-koblitz.de>
-Date: Sat, 11 Dec 2021 20:14:47 +0100
-Subject: [PATCH] realtek: Add support for RTL9300/RTL9310 I2C controller
-
-This adds support for the RTL9300 and RTL9310 I2C controller.
-The controller implements the SMBus protocol for SMBus transfers
-over an I2C bus. The driver supports selecting one of the 2 possible
-SCL pins and any of the 8 possible SDA pins. Bus speeds of
-100kHz (standard speed) and 400kHz (high speed I2C) are supported.
-
-Submitted-by: Birger Koblitz <git at birger-koblitz.de>
----
- drivers/i2c/busses/Kconfig                    | 10 +++++++++
- drivers/i2c/busses/Makefile                   |  1 +
- 2 files changed, 11 insertions(+)
-
---- a/drivers/i2c/busses/Kconfig
-+++ b/drivers/i2c/busses/Kconfig
-@@ -1062,6 +1062,16 @@ config I2C_RK3X
- 	  This driver can also be built as a module. If so, the module will
- 	  be called i2c-rk3x.
- 
-+config I2C_RTL9300
-+	tristate "Realtek RTL9300 I2C adapter"
-+	depends on OF
-+	help
-+	  Say Y here to include support for the I2C adapter in Realtek RTL9300
-+	  and RTL9310 SoCs.
-+
-+	  This driver can also be built as a module. If so, the module will
-+	  be called i2c-rtl9300.
-+
- config I2C_RZV2M
- 	tristate "Renesas RZ/V2M adapter"
- 	depends on ARCH_RENESAS || COMPILE_TEST
---- a/drivers/i2c/busses/Makefile
-+++ b/drivers/i2c/busses/Makefile
-@@ -103,6 +103,7 @@ obj-$(CONFIG_I2C_QCOM_GENI)	+= i2c-qcom-
- obj-$(CONFIG_I2C_QUP)		+= i2c-qup.o
- obj-$(CONFIG_I2C_RIIC)		+= i2c-riic.o
- obj-$(CONFIG_I2C_RK3X)		+= i2c-rk3x.o
-+obj-$(CONFIG_I2C_RTL9300)	+= i2c-rtl9300.o
- obj-$(CONFIG_I2C_RZV2M)		+= i2c-rzv2m.o
- obj-$(CONFIG_I2C_S3C2410)	+= i2c-s3c2410.o
- obj-$(CONFIG_I2C_SH7760)	+= i2c-sh7760.o
diff --git a/target/linux/realtek/patches-6.12/311-add-i2c-mux-rtl9300-support.patch b/target/linux/realtek/patches-6.12/311-add-i2c-mux-rtl9300-support.patch
deleted file mode 100644
index bd773d6b29..0000000000
--- a/target/linux/realtek/patches-6.12/311-add-i2c-mux-rtl9300-support.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From f4bdb7fdccdfe3fa382abe77f72a16c2f2e6add0 Mon Sep 17 00:00:00 2001
-From: Birger Koblitz <git at birger-koblitz.de>
-Date: Sat, 11 Dec 2021 20:25:37 +0100
-Subject: [PATCH] realtek: Add support for RTL9300/RTL9310 I2C multiplexing
-
-The RTL9300/RTL9310 I2C controllers have support for 2 independent I2C
-masters, each with a fixed SCL pin, that cannot be changed. Each of these
-masters can use 8 (RTL9300) or 16 (RTL9310) different pins for SDA.
-This multiplexer directly controls the two masters and their shared
-IO configuration registers to allow multiplexing between any of these
-busses. The two masters cannot be used in parallel as the multiplex
-is protected by a standard multiplex lock.
-
-Submitted-by: Birger Koblitz <git at birger-koblitz.de>
----
- drivers/i2c/muxes/Kconfig                     |  9 +++++++
- drivers/i2c/muxes/Makefile                    |  1 +
- 2 files changed, 10 insertions(+)
-
---- a/drivers/i2c/muxes/Kconfig
-+++ b/drivers/i2c/muxes/Kconfig
-@@ -99,6 +99,15 @@ config I2C_MUX_REG
- 	  This driver can also be built as a module.  If so, the module
- 	  will be called i2c-mux-reg.
- 
-+config I2C_MUX_RTL9300
-+	tristate "RTL9300 based I2C multiplexer"
-+	help
-+	  If you say yes to this option, support will be included for a
-+	  RTL9300 based I2C multiplexer.
-+
-+	  This driver can also be built as a module.  If so, the module
-+	  will be called i2c-mux-reg.
-+
- config I2C_DEMUX_PINCTRL
- 	tristate "pinctrl-based I2C demultiplexer"
- 	depends on PINCTRL && OF
---- a/drivers/i2c/muxes/Makefile
-+++ b/drivers/i2c/muxes/Makefile
-@@ -15,5 +15,6 @@ obj-$(CONFIG_I2C_MUX_PCA9541)	+= i2c-mux
- obj-$(CONFIG_I2C_MUX_PCA954x)	+= i2c-mux-pca954x.o
- obj-$(CONFIG_I2C_MUX_PINCTRL)	+= i2c-mux-pinctrl.o
- obj-$(CONFIG_I2C_MUX_REG)	+= i2c-mux-reg.o
-+obj-$(CONFIG_I2C_MUX_RTL9300)	+= i2c-mux-rtl9300.o
- 
- ccflags-$(CONFIG_I2C_DEBUG_BUS) := -DDEBUG



From lede-commits at lists.infradead.org  Wed Aug 13 05:23:41 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 13 Aug 2025 08:23:41 -0400
Subject: [openwrt/openwrt]  realtek: adapt devices to backported i2c driver
In-Reply-To: <175508782036.366264.11893306581284052387@git-01.infra.openwrt.org>
References: <175508782036.366264.11893306581284052387@git-01.infra.openwrt.org>
Message-ID: <mailman.118833.1755090933.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dc54af86397f6e6ca397d7adfc655eb85c5fcf55

commit dc54af86397f6e6ca397d7adfc655eb85c5fcf55
Author: Jonas Jelonek <jelonek.jonas at gmail.com>
AuthorDate: Tue Jun 24 19:02:33 2025 +0000

    realtek: adapt devices to backported i2c driver
    
    Adapt the device tree definitions of rtl93xx devices and the base dtsi
    for rtl930x and rtl931x to match with what's expected by the recently
    backported RTL9300 I2C driver.
    
    Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19736
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts | 54 ++++--------
 .../linux/realtek/dts/rtl9302_zyxel_xgs1250-12.dts | 20 ++---
 .../realtek/dts/rtl9303_tplink_tl-st1008f_v2.dts   | 95 +++++++---------------
 .../realtek/dts/rtl9303_vimin_vm-s100-0800ms.dts   | 95 +++++++---------------
 .../realtek/dts/rtl9303_xikestor_sks8300-8x.dts    | 95 +++++++---------------
 target/linux/realtek/dts/rtl930x.dtsi              | 18 ++++
 target/linux/realtek/dts/rtl931x.dtsi              | 20 +++++
 7 files changed, 153 insertions(+), 244 deletions(-)

diff --git a/target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts b/target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts
index 65954e3587..e1f4753f23 100644
--- a/target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts
+++ b/target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts
@@ -29,42 +29,6 @@
 		};
 	};
 
-	/* i2c of the SFP cage: port 11 & port 12 */
-	i2c0: i2c-rtl9300 at 1b00036c {
-		compatible = "realtek,rtl9300-i2c";
-		reg = <0x1b00036c 0x3c>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-		sda-pin = <9>;
-		scl-pin = <8>;
-		clock-frequency = <100000>;
-	};
-
-	i2cmux {
-		compatible = "realtek,rtl9302-i2c-mux", "realtek,i2c-mux-rtl9300";
-		#address-cells = <1>;
-		#size-cells = <0>;
-		i2c-parent = <&i2c0>;
-
-		/* i2c of the left SFP+ cage as seen from the front: port 11 */
-		i2c0_0: i2c at 0 {
-			reg = <0>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-			sda-pin = <9>;
-			scl-pin = <8>;
-		};
-
-		/* i2c of the right SFP+ cage as seen from the front: port 12 */
-		i2c0_1: i2c at 1 {
-			reg = <1>;
-			#address-cells = <1>;
-			#size-cells = <0>;
-			sda-pin = <10>;
-			scl-pin = <8>;
-		};
-	};
-
 	leds {
 		compatible = "gpio-leds";
 
@@ -81,7 +45,7 @@
 
 	sfp0: sfp-p11 {
 		compatible = "sff,sfp";
-		i2c-bus = <&i2c0_0>;
+		i2c-bus = <&i2c0>;
 		los-gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
 		tx-fault-gpio = <&gpio0 14 GPIO_ACTIVE_HIGH>;
 		mod-def0-gpio = <&gpio0 12 GPIO_ACTIVE_LOW>;
@@ -90,7 +54,7 @@
 
 	sfp1: sfp-p12 {
 		compatible = "sff,sfp";
-		i2c-bus = <&i2c0_1>;
+		i2c-bus = <&i2c1>;
 		los-gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
 		tx-fault-gpio = <&gpio0 20 GPIO_ACTIVE_HIGH>;
 		mod-def0-gpio = <&gpio0 16 GPIO_ACTIVE_LOW>;
@@ -122,6 +86,20 @@
 	};
 };
 
+&i2c_mst1 {
+	status = "okay";
+
+	/* i2c of the left SFP+ cage seen from the front; port 11 */
+	i2c0: i2c at 0 {
+		reg = <0>;
+	};
+
+	/* i2c of the right SFP+ cage seen from the front; port 12 */
+	i2c1: i2c at 1 {
+		reg = <1>;
+	};
+};
+
 &spi0 {
 	status = "okay";
 	flash at 0 {
diff --git a/target/linux/realtek/dts/rtl9302_zyxel_xgs1250-12.dts b/target/linux/realtek/dts/rtl9302_zyxel_xgs1250-12.dts
index a2486f134e..38066ff2a2 100644
--- a/target/linux/realtek/dts/rtl9302_zyxel_xgs1250-12.dts
+++ b/target/linux/realtek/dts/rtl9302_zyxel_xgs1250-12.dts
@@ -29,17 +29,6 @@
 		};
 	};
 
-	/* i2c of the SFP cage: port 12 */
-	i2c0: i2c-rtl9300 at 1b00036c {
-		compatible = "realtek,rtl9300-i2c";
-		reg = <0x1b00036c 0x3c>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-		sda-pin = <10>;
-		scl-pin = <8>;
-		clock-frequency = <100000>;
-	};
-
 	leds {
 		compatible = "gpio-leds";
 
@@ -174,6 +163,15 @@
 	};
 };
 
+&i2c_mst1 {
+	status = "okay";
+
+	/* i2c of the SFP+ cage; port 12 */
+	i2c0: i2c at 1 {
+		reg = <1>;
+	};
+};
+
 &spi0 {
 	status = "okay";
 	flash at 0 {
diff --git a/target/linux/realtek/dts/rtl9303_tplink_tl-st1008f_v2.dts b/target/linux/realtek/dts/rtl9303_tplink_tl-st1008f_v2.dts
index 75633e53f9..49d7b348d5 100644
--- a/target/linux/realtek/dts/rtl9303_tplink_tl-st1008f_v2.dts
+++ b/target/linux/realtek/dts/rtl9303_tplink_tl-st1008f_v2.dts
@@ -71,71 +71,6 @@
 		};
 	};
 
-	i2c_main: i2c at 1b00036c {
-		compatible = "realtek,rtl9300-i2c";
-		reg = <0x1b00036c 0x3c>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-		scl-pin = <8>;
-		sda-pin = <9>;
-		clock-frequency = <100000>;
-	};
-
-	i2c-mux {
-		compatible = "realtek,i2c-mux-rtl9300";
-		i2c-parent = <&i2c_main>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		i2c0: i2c at 0 {
-			reg = <0>;
-			scl-pin = <8>;
-			sda-pin = <9>;
-		};
-
-		i2c1: i2c at 1 {
-			reg = <1>;
-			scl-pin = <8>;
-			sda-pin = <10>;
-		};
-
-		i2c2: i2c at 2 {
-			reg = <2>;
-			scl-pin = <8>;
-			sda-pin = <11>;
-		};
-
-		i2c3: i2c at 3 {
-			reg = <3>;
-			scl-pin = <8>;
-			sda-pin = <12>;
-		};
-
-		i2c4: i2c at 4 {
-			reg = <4>;
-			scl-pin = <8>;
-			sda-pin = <13>;
-		};
-
-		i2c5: i2c at 5 {
-			reg = <5>;
-			scl-pin = <8>;
-			sda-pin = <14>;
-		};
-
-		i2c6: i2c at 6 {
-			reg = <6>;
-			scl-pin = <8>;
-			sda-pin = <15>;
-		};
-
-		i2c7: i2c at 7 {
-			reg = <7>;
-			scl-pin = <8>;
-			sda-pin = <16>;
-		};
-	};
-
 	sfp0: sfp-p1 {
 		compatible = "sff,sfp";
 		i2c-bus = <&i2c0>;
@@ -217,6 +152,36 @@
 	};
 };
 
+&i2c_mst1 {
+	status = "okay";
+
+	/* SDA0-7 correspond to GPIO9-16 */
+	i2c0: i2c at 0 {
+		reg = <0>;
+	};
+	i2c1: i2c at 1 {
+		reg = <1>;
+	};
+	i2c2: i2c at 2 {
+		reg = <2>;
+	};
+	i2c3: i2c at 3 {
+		reg = <3>;
+	};
+	i2c4: i2c at 4 {
+		reg = <4>;
+	};
+	i2c5: i2c at 5 {
+		reg = <5>;
+	};
+	i2c6: i2c at 6 {
+		reg = <6>;
+	};
+	i2c7: i2c at 7 {
+		reg = <7>;
+	};
+};
+
 &spi0 {
 	status = "okay";
 
diff --git a/target/linux/realtek/dts/rtl9303_vimin_vm-s100-0800ms.dts b/target/linux/realtek/dts/rtl9303_vimin_vm-s100-0800ms.dts
index d901967a22..4777d085d7 100644
--- a/target/linux/realtek/dts/rtl9303_vimin_vm-s100-0800ms.dts
+++ b/target/linux/realtek/dts/rtl9303_vimin_vm-s100-0800ms.dts
@@ -20,71 +20,6 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	i2c_master: i2c at 1b00036c {
-		compatible = "realtek,rtl9300-i2c";
-		reg = <0x1b00036c 0x3c>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-		scl-pin = <8>;
-		sda-pin = <9>;
-		clock-frequency = <100000>;
-	};
-
-	i2c-mux {
-		compatible = "realtek,i2c-mux-rtl9300";
-		i2c-parent = <&i2c_master>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		i2c0: i2c at 0 {
-			reg = <0>;
-			scl-pin = <8>;
-			sda-pin = <9>;
-		};
-
-		i2c1: i2c at 1 {
-			reg = <1>;
-			scl-pin = <8>;
-			sda-pin = <10>;
-		};
-
-		i2c2: i2c at 2 {
-			reg = <2>;
-			scl-pin = <8>;
-			sda-pin = <11>;
-		};
-
-		i2c3: i2c at 3 {
-			reg = <3>;
-			scl-pin = <8>;
-			sda-pin = <12>;
-		};
-
-		i2c4: i2c at 4 {
-			reg = <4>;
-			scl-pin = <8>;
-			sda-pin = <13>;
-		};
-
-		i2c5: i2c at 5 {
-			reg = <5>;
-			scl-pin = <8>;
-			sda-pin = <14>;
-		};
-
-		i2c6: i2c at 6 {
-			reg = <6>;
-			scl-pin = <8>;
-			sda-pin = <15>;
-		};
-
-		i2c7: i2c at 7 {
-			reg = <7>;
-			scl-pin = <8>;
-			sda-pin = <16>;
-		};
-	};
-
 	keys {
 		compatible = "gpio-keys";
 
@@ -188,6 +123,36 @@
 	};
 };
 
+&i2c_mst1 {
+	status = "okay";
+
+	/* SDA0-7 correspond to GPIO9-16 */
+	i2c0: i2c at 0 {
+		reg = <0>;
+	};
+	i2c1: i2c at 1 {
+		reg = <1>;
+	};
+	i2c2: i2c at 2 {
+		reg = <2>;
+	};
+	i2c3: i2c at 3 {
+		reg = <3>;
+	};
+	i2c4: i2c at 4 {
+		reg = <4>;
+	};
+	i2c5: i2c at 5 {
+		reg = <5>;
+	};
+	i2c6: i2c at 6 {
+		reg = <6>;
+	};
+	i2c7: i2c at 7 {
+		reg = <7>;
+	};
+};
+
 &mdio_aux {
 	status = "okay";
 
diff --git a/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts b/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts
index b3b2a9a6f1..8c19323f5b 100644
--- a/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts
+++ b/target/linux/realtek/dts/rtl9303_xikestor_sks8300-8x.dts
@@ -27,71 +27,6 @@
 		stdout-path = "serial0:9600n8";
 	};
 
-	i2c_master: i2c at 1b00036c {
-		compatible = "realtek,rtl9300-i2c";
-		reg = <0x1b00036c 0x3c>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-		scl-pin = <8>;
-		sda-pin = <9>;
-		clock-frequency = <100000>;
-	};
-
-	i2c-mux {
-		compatible = "realtek,i2c-mux-rtl9300";
-		i2c-parent = <&i2c_master>;
-		#address-cells = <1>;
-		#size-cells = <0>;
-
-		i2c0: i2c at 0 {
-			reg = <0>;
-			scl-pin = <8>;
-			sda-pin = <9>;
-		};
-
-		i2c1: i2c at 1 {
-			reg = <1>;
-			scl-pin = <8>;
-			sda-pin = <10>;
-		};
-
-		i2c2: i2c at 2 {
-			reg = <2>;
-			scl-pin = <8>;
-			sda-pin = <11>;
-		};
-
-		i2c3: i2c at 3 {
-			reg = <3>;
-			scl-pin = <8>;
-			sda-pin = <12>;
-		};
-
-		i2c4: i2c at 4 {
-			reg = <4>;
-			scl-pin = <8>;
-			sda-pin = <13>;
-		};
-
-		i2c5: i2c at 5 {
-			reg = <5>;
-			scl-pin = <8>;
-			sda-pin = <14>;
-		};
-
-		i2c6: i2c at 6 {
-			reg = <6>;
-			scl-pin = <8>;
-			sda-pin = <15>;
-		};
-
-		i2c7: i2c at 7 {
-			reg = <7>;
-			scl-pin = <8>;
-			sda-pin = <16>;
-		};
-	};
-
 	keys {
 		compatible = "gpio-keys";
 
@@ -206,6 +141,36 @@
 	};
 };
 
+&i2c_mst1 {
+	status = "okay";
+
+	/* SDA0-7 correspond to GPIO9-16 */
+	i2c0: i2c at 0 {
+		reg = <0>;
+	};
+	i2c1: i2c at 1 {
+		reg = <1>;
+	};
+	i2c2: i2c at 2 {
+		reg = <2>;
+	};
+	i2c3: i2c at 3 {
+		reg = <3>;
+	};
+	i2c4: i2c at 4 {
+		reg = <4>;
+	};
+	i2c5: i2c at 5 {
+		reg = <5>;
+	};
+	i2c6: i2c at 6 {
+		reg = <6>;
+	};
+	i2c7: i2c at 7 {
+		reg = <7>;
+	};
+};
+
 &mdio_aux {
 	status = "okay";
 
diff --git a/target/linux/realtek/dts/rtl930x.dtsi b/target/linux/realtek/dts/rtl930x.dtsi
index 31fe3ffd8b..5423f996e2 100644
--- a/target/linux/realtek/dts/rtl930x.dtsi
+++ b/target/linux/realtek/dts/rtl930x.dtsi
@@ -167,6 +167,24 @@
 		compatible = "syscon", "simple-mfd";
 		reg = <0x1b000000 0x10000>;
 
+		i2c_mst1: i2c at 36c {
+			compatible = "realtek,rtl9301-i2c";
+			reg = <0x36c 0x18>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			status = "disabled";
+		};
+
+		i2c_mst2: i2c at 388 {
+			compatible = "realtek,rtl9301-i2c";
+			reg = <0x388 0x18>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			status = "disabled";
+		};
+
 		mdio_aux: mdio-aux {
 			compatible = "realtek,rtl9300-aux-mdio";
 			#address-cells = <1>;
diff --git a/target/linux/realtek/dts/rtl931x.dtsi b/target/linux/realtek/dts/rtl931x.dtsi
index 86634d6c16..ef45258cb5 100644
--- a/target/linux/realtek/dts/rtl931x.dtsi
+++ b/target/linux/realtek/dts/rtl931x.dtsi
@@ -197,6 +197,26 @@
 	switchcore at 1b000000 {
 		compatible = "syscon", "simple-mfd";
 		reg = <0x1b000000 0x10000>;
+
+		i2c_mst1: i2c at 100c {
+			compatible = "realtek,rtl9310-i2c";
+			reg = <0x100c 0x18>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			realtek,scl = <0>;
+
+			status = "disabled";
+		};
+
+		i2c_mst2: i2c at 1024 {
+			compatible = "realtek,rtl9310-i2c";
+			reg = <0x1024 0x18>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+			realtek,scl = <1>;
+
+			status = "disabled";
+		};
 	};
 
 	pinmux: pinmux at 1b001358 {



From lede-commits at lists.infradead.org  Wed Aug 13 05:23:40 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 13 Aug 2025 08:23:40 -0400
Subject: [openwrt/openwrt]  realtek: backport upstream RTL9300 I2C driver
In-Reply-To: <175508782036.366264.11893306581284052387@git-01.infra.openwrt.org>
References: <175508782036.366264.11893306581284052387@git-01.infra.openwrt.org>
Message-ID: <mailman.118834.1755090933.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/44655c97bb67419225235c2cf24cb53d750c0771

commit 44655c97bb67419225235c2cf24cb53d750c0771
Author: Jonas Jelonek <jelonek.jonas at gmail.com>
AuthorDate: Tue Jun 24 16:22:00 2025 +0000

    realtek: backport upstream RTL9300 I2C driver
    
    Backport/add all patches for the upstream RTL9300 I2C driver.
    
    The upstream driver was added in 6.13 and was heavily based on our
    downstream driver except for how the multiplexing behaviour is handled.
    This driver was working fine with basic SFP operation on RTL930x devices
    but there was no support for RTL931x though.
    
    Major advantage over our downstream driver is: The multiplexing
    behaviour is handled completely by the driver. Thus, there's no need for
    a separate rtl9300-mux driver as we had it downstream. Moreover, this
    simplifies the DTS of affected devices a lot since we can now move the
    controller definition - which is in the DTS of each device so far - to
    the base DTSI.
    
    Currently pending patches are also included because the progress on
    getting this upstream seems really slow right now, albeit upstream
    maintainers may require several changes to the current state.
    
    These include:
    - patches fixing several issues in the driver
    - patches doing a refactoring of the driver and adding support for RTL931x
    
    See the commit messages included in each patch to have details on the
    changes.
    
    Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19736
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 ...ndings-i2c-Add-Realtek-RTL-I2C-Controller.patch |  84 ++++
 ...Add-driver-for-the-RTL9300-I2C-controller.patch | 493 +++++++++++++++++++++
 ...-i2c-realtek-rtl9301-Fix-missing-reg-cons.patch |  27 ++
 ...-Fix-out-of-bounds-bug-in-rtl9300_i2c_smb.patch |  37 ++
 ...0-02-i2c-rtl9300-Fix-multi-byte-I2C-write.patch |  74 ++++
 ...300-Increase-timeout-for-transfer-polling.patch |  36 ++
 ...-Add-missing-count-byte-for-SMBus-Block-O.patch |  52 +++
 ...tl9300-Implement-I2C-block-read-and-write.patch | 116 +++++
 ...300-use-regmap-fields-and-API-for-registe.patch | 352 +++++++++++++++
 ...2c-rtl9300-fix-channel-number-bound-check.patch |  36 ++
 ...ngs-i2c-realtek-rtl9301-i2c-fix-wording-a.patch |  50 +++
 ...tl9300-rename-internal-sda_pin-to-sda_num.patch | 116 +++++
 ...i2c-rtl9300-check-if-xfer-length-is-valid.patch |  41 ++
 ...9300-remove-SMBus-Quick-operation-support.patch |  75 ++++
 ...300-move-setting-SCL-frequency-to-config_.patch |  66 +++
 ...300-do-not-set-read-mode-on-every-transfe.patch |  47 ++
 ...300-separate-xfer-configuration-and-execu.patch | 381 ++++++++++++++++
 ...ngs-i2c-realtek-rtl9301-i2c-extend-for-RT.patch |  93 ++++
 ...300-add-support-for-RTL9310-I2C-controlle.patch | 123 +++++
 19 files changed, 2299 insertions(+)

diff --git a/target/linux/realtek/patches-6.12/003-v6.13-01-dt-bindings-i2c-Add-Realtek-RTL-I2C-Controller.patch b/target/linux/realtek/patches-6.12/003-v6.13-01-dt-bindings-i2c-Add-Realtek-RTL-I2C-Controller.patch
new file mode 100644
index 0000000000..8ec0d04127
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/003-v6.13-01-dt-bindings-i2c-Add-Realtek-RTL-I2C-Controller.patch
@@ -0,0 +1,84 @@
+From c5eda0333076e031197816454998a918f1de0831 Mon Sep 17 00:00:00 2001
+From: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Date: Fri, 1 Nov 2024 09:03:46 +1300
+Subject: [PATCH] dt-bindings: i2c: Add Realtek RTL I2C Controller
+
+Add dt-schema for the I2C controller on the RTL9300 Ethernet switch
+with integrated SoC.
+
+Signed-off-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
+Signed-off-by: Andi Shyti <andi.shyti at kernel.org>
+
+--- /dev/null
++++ b/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
+@@ -0,0 +1,69 @@
++# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
++%YAML 1.2
++---
++$id: http://devicetree.org/schemas/i2c/realtek,rtl9301-i2c.yaml#
++$schema: http://devicetree.org/meta-schemas/core.yaml#
++
++title: Realtek RTL I2C Controller
++
++maintainers:
++  - Chris Packham <chris.packham at alliedtelesis.co.nz>
++
++description:
++  The RTL9300 SoC has two I2C controllers. Each of these has an SCL line (which
++  if not-used for SCL can be a GPIO). There are 8 common SDA lines that can be
++  assigned to either I2C controller.
++
++properties:
++  compatible:
++    oneOf:
++      - items:
++          - enum:
++              - realtek,rtl9302b-i2c
++              - realtek,rtl9302c-i2c
++              - realtek,rtl9303-i2c
++          - const: realtek,rtl9301-i2c
++      - const: realtek,rtl9301-i2c
++
++  reg:
++    description: Register offset and size this I2C controller.
++
++  "#address-cells":
++    const: 1
++
++  "#size-cells":
++    const: 0
++
++patternProperties:
++  '^i2c@[0-7]$':
++    $ref: /schemas/i2c/i2c-controller.yaml
++    unevaluatedProperties: false
++
++    properties:
++      reg:
++        description: The SDA pin associated with the I2C bus.
++        maxItems: 1
++
++    required:
++      - reg
++
++required:
++  - compatible
++  - reg
++
++additionalProperties: false
++
++examples:
++  - |
++    i2c at 36c {
++      compatible = "realtek,rtl9301-i2c";
++      reg = <0x36c 0x14>;
++      #address-cells = <1>;
++      #size-cells = <0>;
++
++      i2c at 2 {
++        reg = <2>;
++        #address-cells = <1>;
++        #size-cells = <0>;
++      };
++    };
diff --git a/target/linux/realtek/patches-6.12/003-v6.13-02-i2c-Add-driver-for-the-RTL9300-I2C-controller.patch b/target/linux/realtek/patches-6.12/003-v6.13-02-i2c-Add-driver-for-the-RTL9300-I2C-controller.patch
new file mode 100644
index 0000000000..4d025d6049
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/003-v6.13-02-i2c-Add-driver-for-the-RTL9300-I2C-controller.patch
@@ -0,0 +1,493 @@
+From c366be720235301fdadf67e6f1ea6ff32669c074 Mon Sep 17 00:00:00 2001
+From: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Date: Wed, 6 Nov 2024 13:18:35 +1300
+Subject: [PATCH] i2c: Add driver for the RTL9300 I2C controller
+
+Add support for the I2C controller on the RTL9300 SoC. There are two I2C
+controllers in the RTL9300 that are part of the Ethernet switch register
+block. Each of these controllers owns a SCL pin (GPIO8 for the fiorst
+I2C controller, GPIO17 for the second). There are 8 possible SDA pins
+(GPIO9-16) that can be assigned to either I2C controller. This
+relationship is represented in the device tree with a child node for
+each SDA line in use.
+
+This is based on the openwrt implementation[1] but has been
+significantly modified
+
+[1] - https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/realtek/files-5.15/drivers/i2c/busses/i2c-rtl9300.c
+
+Signed-off-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Reviewed-by: Andi Shyti <andi.shyti at kernel.org>
+Signed-off-by: Andi Shyti <andi.shyti at kernel.org>
+
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -20151,6 +20151,13 @@ S:	Maintained
+ T:	git https://github.com/pkshih/rtw.git
+ F:	drivers/net/wireless/realtek/rtl8xxxu/
+ 
++RTL9300 I2C DRIVER (rtl9300-i2c)
++M:	Chris Packham <chris.packham at alliedtelesis.co.nz>
++L:	linux-i2c at vger.kernel.org
++S:	Maintained
++F:	Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
++F:	drivers/i2c/busses/i2c-rtl9300.c
++
+ RTRS TRANSPORT DRIVERS
+ M:	Md. Haris Iqbal <haris.iqbal at ionos.com>
+ M:	Jack Wang <jinpu.wang at ionos.com>
+--- a/drivers/i2c/busses/Kconfig
++++ b/drivers/i2c/busses/Kconfig
+@@ -1062,6 +1062,16 @@ config I2C_RK3X
+ 	  This driver can also be built as a module. If so, the module will
+ 	  be called i2c-rk3x.
+ 
++config I2C_RTL9300
++	tristate "Realtek RTL9300 I2C controller"
++	depends on MACH_REALTEK_RTL || COMPILE_TEST
++	help
++	  Say Y here to include support for the I2C controller in Realtek
++	  RTL9300 SoCs.
++
++	  This driver can also be built as a module. If so, the module will
++	  be called i2c-rtl9300.
++
+ config I2C_RZV2M
+ 	tristate "Renesas RZ/V2M adapter"
+ 	depends on ARCH_RENESAS || COMPILE_TEST
+--- a/drivers/i2c/busses/Makefile
++++ b/drivers/i2c/busses/Makefile
+@@ -103,6 +103,7 @@ obj-$(CONFIG_I2C_QCOM_GENI)	+= i2c-qcom-
+ obj-$(CONFIG_I2C_QUP)		+= i2c-qup.o
+ obj-$(CONFIG_I2C_RIIC)		+= i2c-riic.o
+ obj-$(CONFIG_I2C_RK3X)		+= i2c-rk3x.o
++obj-$(CONFIG_I2C_RTL9300)	+= i2c-rtl9300.o
+ obj-$(CONFIG_I2C_RZV2M)		+= i2c-rzv2m.o
+ obj-$(CONFIG_I2C_S3C2410)	+= i2c-s3c2410.o
+ obj-$(CONFIG_I2C_SH7760)	+= i2c-sh7760.o
+--- /dev/null
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -0,0 +1,423 @@
++// SPDX-License-Identifier: GPL-2.0-only
++
++#include <linux/bits.h>
++#include <linux/i2c.h>
++#include <linux/i2c-mux.h>
++#include <linux/mod_devicetable.h>
++#include <linux/mfd/syscon.h>
++#include <linux/mutex.h>
++#include <linux/platform_device.h>
++#include <linux/regmap.h>
++
++enum rtl9300_bus_freq {
++	RTL9300_I2C_STD_FREQ,
++	RTL9300_I2C_FAST_FREQ,
++};
++
++struct rtl9300_i2c;
++
++struct rtl9300_i2c_chan {
++	struct i2c_adapter adap;
++	struct rtl9300_i2c *i2c;
++	enum rtl9300_bus_freq bus_freq;
++	u8 sda_pin;
++};
++
++#define RTL9300_I2C_MUX_NCHAN	8
++
++struct rtl9300_i2c {
++	struct regmap *regmap;
++	struct device *dev;
++	struct rtl9300_i2c_chan chans[RTL9300_I2C_MUX_NCHAN];
++	u32 reg_base;
++	u8 sda_pin;
++	struct mutex lock;
++};
++
++#define RTL9300_I2C_MST_CTRL1				0x0
++#define  RTL9300_I2C_MST_CTRL1_MEM_ADDR_OFS		8
++#define  RTL9300_I2C_MST_CTRL1_MEM_ADDR_MASK		GENMASK(31, 8)
++#define  RTL9300_I2C_MST_CTRL1_SDA_OUT_SEL_OFS		4
++#define  RTL9300_I2C_MST_CTRL1_SDA_OUT_SEL_MASK		GENMASK(6, 4)
++#define  RTL9300_I2C_MST_CTRL1_GPIO_SCL_SEL		BIT(3)
++#define  RTL9300_I2C_MST_CTRL1_RWOP			BIT(2)
++#define  RTL9300_I2C_MST_CTRL1_I2C_FAIL			BIT(1)
++#define  RTL9300_I2C_MST_CTRL1_I2C_TRIG			BIT(0)
++#define RTL9300_I2C_MST_CTRL2				0x4
++#define  RTL9300_I2C_MST_CTRL2_RD_MODE			BIT(15)
++#define  RTL9300_I2C_MST_CTRL2_DEV_ADDR_OFS		8
++#define  RTL9300_I2C_MST_CTRL2_DEV_ADDR_MASK		GENMASK(14, 8)
++#define  RTL9300_I2C_MST_CTRL2_DATA_WIDTH_OFS		4
++#define  RTL9300_I2C_MST_CTRL2_DATA_WIDTH_MASK		GENMASK(7, 4)
++#define  RTL9300_I2C_MST_CTRL2_MEM_ADDR_WIDTH_OFS	2
++#define  RTL9300_I2C_MST_CTRL2_MEM_ADDR_WIDTH_MASK	GENMASK(3, 2)
++#define  RTL9300_I2C_MST_CTRL2_SCL_FREQ_OFS		0
++#define  RTL9300_I2C_MST_CTRL2_SCL_FREQ_MASK		GENMASK(1, 0)
++#define RTL9300_I2C_MST_DATA_WORD0			0x8
++#define RTL9300_I2C_MST_DATA_WORD1			0xc
++#define RTL9300_I2C_MST_DATA_WORD2			0x10
++#define RTL9300_I2C_MST_DATA_WORD3			0x14
++
++#define RTL9300_I2C_MST_GLB_CTRL			0x384
++
++static int rtl9300_i2c_reg_addr_set(struct rtl9300_i2c *i2c, u32 reg, u16 len)
++{
++	u32 val, mask;
++	int ret;
++
++	val = len << RTL9300_I2C_MST_CTRL2_MEM_ADDR_WIDTH_OFS;
++	mask = RTL9300_I2C_MST_CTRL2_MEM_ADDR_WIDTH_MASK;
++
++	ret = regmap_update_bits(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL2, mask, val);
++	if (ret)
++		return ret;
++
++	val = reg << RTL9300_I2C_MST_CTRL1_MEM_ADDR_OFS;
++	mask = RTL9300_I2C_MST_CTRL1_MEM_ADDR_MASK;
++
++	return regmap_update_bits(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL1, mask, val);
++}
++
++static int rtl9300_i2c_config_io(struct rtl9300_i2c *i2c, u8 sda_pin)
++{
++	int ret;
++	u32 val, mask;
++
++	ret = regmap_update_bits(i2c->regmap, RTL9300_I2C_MST_GLB_CTRL, BIT(sda_pin), BIT(sda_pin));
++	if (ret)
++		return ret;
++
++	val = (sda_pin << RTL9300_I2C_MST_CTRL1_SDA_OUT_SEL_OFS) |
++		RTL9300_I2C_MST_CTRL1_GPIO_SCL_SEL;
++	mask = RTL9300_I2C_MST_CTRL1_SDA_OUT_SEL_MASK | RTL9300_I2C_MST_CTRL1_GPIO_SCL_SEL;
++
++	return regmap_update_bits(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL1, mask, val);
++}
++
++static int rtl9300_i2c_config_xfer(struct rtl9300_i2c *i2c, struct rtl9300_i2c_chan *chan,
++				   u16 addr, u16 len)
++{
++	u32 val, mask;
++
++	val = chan->bus_freq << RTL9300_I2C_MST_CTRL2_SCL_FREQ_OFS;
++	mask = RTL9300_I2C_MST_CTRL2_SCL_FREQ_MASK;
++
++	val |= addr << RTL9300_I2C_MST_CTRL2_DEV_ADDR_OFS;
++	mask |= RTL9300_I2C_MST_CTRL2_DEV_ADDR_MASK;
++
++	val |= ((len - 1) & 0xf) << RTL9300_I2C_MST_CTRL2_DATA_WIDTH_OFS;
++	mask |= RTL9300_I2C_MST_CTRL2_DATA_WIDTH_MASK;
++
++	mask |= RTL9300_I2C_MST_CTRL2_RD_MODE;
++
++	return regmap_update_bits(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL2, mask, val);
++}
++
++static int rtl9300_i2c_read(struct rtl9300_i2c *i2c, u8 *buf, int len)
++{
++	u32 vals[4] = {};
++	int i, ret;
++
++	if (len > 16)
++		return -EIO;
++
++	ret = regmap_bulk_read(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0,
++			       vals, ARRAY_SIZE(vals));
++	if (ret)
++		return ret;
++
++	for (i = 0; i < len; i++) {
++		buf[i] = vals[i/4] & 0xff;
++		vals[i/4] >>= 8;
++	}
++
++	return 0;
++}
++
++static int rtl9300_i2c_write(struct rtl9300_i2c *i2c, u8 *buf, int len)
++{
++	u32 vals[4] = {};
++	int i;
++
++	if (len > 16)
++		return -EIO;
++
++	for (i = 0; i < len; i++) {
++		if (i % 4 == 0)
++			vals[i/4] = 0;
++		vals[i/4] <<= 8;
++		vals[i/4] |= buf[i];
++	}
++
++	return regmap_bulk_write(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0,
++				vals, ARRAY_SIZE(vals));
++}
++
++static int rtl9300_i2c_writel(struct rtl9300_i2c *i2c, u32 data)
++{
++	return regmap_write(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0, data);
++}
++
++static int rtl9300_i2c_execute_xfer(struct rtl9300_i2c *i2c, char read_write,
++				    int size, union i2c_smbus_data *data, int len)
++{
++	u32 val, mask;
++	int ret;
++
++	val = read_write == I2C_SMBUS_WRITE ? RTL9300_I2C_MST_CTRL1_RWOP : 0;
++	mask = RTL9300_I2C_MST_CTRL1_RWOP;
++
++	val |= RTL9300_I2C_MST_CTRL1_I2C_TRIG;
++	mask |= RTL9300_I2C_MST_CTRL1_I2C_TRIG;
++
++	ret = regmap_update_bits(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL1, mask, val);
++	if (ret)
++		return ret;
++
++	ret = regmap_read_poll_timeout(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL1,
++				       val, !(val & RTL9300_I2C_MST_CTRL1_I2C_TRIG), 100, 2000);
++	if (ret)
++		return ret;
++
++	if (val & RTL9300_I2C_MST_CTRL1_I2C_FAIL)
++		return -EIO;
++
++	if (read_write == I2C_SMBUS_READ) {
++		if (size == I2C_SMBUS_BYTE || size == I2C_SMBUS_BYTE_DATA) {
++			ret = regmap_read(i2c->regmap,
++					  i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0, &val);
++			if (ret)
++				return ret;
++			data->byte = val & 0xff;
++		} else if (size == I2C_SMBUS_WORD_DATA) {
++			ret = regmap_read(i2c->regmap,
++					  i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0, &val);
++			if (ret)
++				return ret;
++			data->word = val & 0xffff;
++		} else {
++			ret = rtl9300_i2c_read(i2c, &data->block[0], len);
++			if (ret)
++				return ret;
++		}
++	}
++
++	return 0;
++}
++
++static int rtl9300_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr, unsigned short flags,
++				  char read_write, u8 command, int size,
++				  union i2c_smbus_data *data)
++{
++	struct rtl9300_i2c_chan *chan = i2c_get_adapdata(adap);
++	struct rtl9300_i2c *i2c = chan->i2c;
++	int len = 0, ret;
++
++	mutex_lock(&i2c->lock);
++	if (chan->sda_pin != i2c->sda_pin) {
++		ret = rtl9300_i2c_config_io(i2c, chan->sda_pin);
++		if (ret)
++			goto out_unlock;
++		i2c->sda_pin = chan->sda_pin;
++	}
++
++	switch (size) {
++	case I2C_SMBUS_QUICK:
++		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, 0);
++		if (ret)
++			goto out_unlock;
++		ret = rtl9300_i2c_reg_addr_set(i2c, 0, 0);
++		if (ret)
++			goto out_unlock;
++		break;
++
++	case I2C_SMBUS_BYTE:
++		if (read_write == I2C_SMBUS_WRITE) {
++			ret = rtl9300_i2c_config_xfer(i2c, chan, addr, 0);
++			if (ret)
++				goto out_unlock;
++			ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
++			if (ret)
++				goto out_unlock;
++		} else {
++			ret = rtl9300_i2c_config_xfer(i2c, chan, addr, 1);
++			if (ret)
++				goto out_unlock;
++			ret = rtl9300_i2c_reg_addr_set(i2c, 0, 0);
++			if (ret)
++				goto out_unlock;
++		}
++		break;
++
++	case I2C_SMBUS_BYTE_DATA:
++		ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
++		if (ret)
++			goto out_unlock;
++		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, 1);
++		if (ret)
++			goto out_unlock;
++		if (read_write == I2C_SMBUS_WRITE) {
++			ret = rtl9300_i2c_writel(i2c, data->byte);
++			if (ret)
++				goto out_unlock;
++		}
++		break;
++
++	case I2C_SMBUS_WORD_DATA:
++		ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
++		if (ret)
++			goto out_unlock;
++		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, 2);
++		if (ret)
++			goto out_unlock;
++		if (read_write == I2C_SMBUS_WRITE) {
++			ret = rtl9300_i2c_writel(i2c, data->word);
++			if (ret)
++				goto out_unlock;
++		}
++		break;
++
++	case I2C_SMBUS_BLOCK_DATA:
++		ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
++		if (ret)
++			goto out_unlock;
++		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, data->block[0]);
++		if (ret)
++			goto out_unlock;
++		if (read_write == I2C_SMBUS_WRITE) {
++			ret = rtl9300_i2c_write(i2c, &data->block[1], data->block[0]);
++			if (ret)
++				goto out_unlock;
++		}
++		len = data->block[0];
++		break;
++
++	default:
++		dev_err(&adap->dev, "Unsupported transaction %d\n", size);
++		ret = -EOPNOTSUPP;
++		goto out_unlock;
++	}
++
++	ret = rtl9300_i2c_execute_xfer(i2c, read_write, size, data, len);
++
++out_unlock:
++	mutex_unlock(&i2c->lock);
++
++	return ret;
++}
++
++static u32 rtl9300_i2c_func(struct i2c_adapter *a)
++{
++	return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
++	       I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA |
++	       I2C_FUNC_SMBUS_BLOCK_DATA;
++}
++
++static const struct i2c_algorithm rtl9300_i2c_algo = {
++	.smbus_xfer	= rtl9300_i2c_smbus_xfer,
++	.functionality	= rtl9300_i2c_func,
++};
++
++static struct i2c_adapter_quirks rtl9300_i2c_quirks = {
++	.flags		= I2C_AQ_NO_CLK_STRETCH,
++	.max_read_len	= 16,
++	.max_write_len	= 16,
++};
++
++static int rtl9300_i2c_probe(struct platform_device *pdev)
++{
++	struct device *dev = &pdev->dev;
++	struct rtl9300_i2c *i2c;
++	u32 clock_freq, sda_pin;
++	int ret, i = 0;
++	struct fwnode_handle *child;
++
++	i2c = devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL);
++	if (!i2c)
++		return -ENOMEM;
++
++	i2c->regmap = syscon_node_to_regmap(dev->parent->of_node);
++	if (IS_ERR(i2c->regmap))
++		return PTR_ERR(i2c->regmap);
++	i2c->dev = dev;
++
++	mutex_init(&i2c->lock);
++
++	ret = device_property_read_u32(dev, "reg", &i2c->reg_base);
++	if (ret)
++		return ret;
++
++	platform_set_drvdata(pdev, i2c);
++
++	if (device_get_child_node_count(dev) >= RTL9300_I2C_MUX_NCHAN)
++		return dev_err_probe(dev, -EINVAL, "Too many channels\n");
++
++	device_for_each_child_node(dev, child) {
++		struct rtl9300_i2c_chan *chan = &i2c->chans[i];
++		struct i2c_adapter *adap = &chan->adap;
++
++		ret = fwnode_property_read_u32(child, "reg", &sda_pin);
++		if (ret)
++			return ret;
++
++		ret = fwnode_property_read_u32(child, "clock-frequency", &clock_freq);
++		if (ret)
++			clock_freq = I2C_MAX_STANDARD_MODE_FREQ;
++
++		switch (clock_freq) {
++		case I2C_MAX_STANDARD_MODE_FREQ:
++			chan->bus_freq = RTL9300_I2C_STD_FREQ;
++			break;
++
++		case I2C_MAX_FAST_MODE_FREQ:
++			chan->bus_freq = RTL9300_I2C_FAST_FREQ;
++			break;
++		default:
++			dev_warn(i2c->dev, "SDA%d clock-frequency %d not supported using default\n",
++				 sda_pin, clock_freq);
++			break;
++		}
++
++		chan->sda_pin = sda_pin;
++		chan->i2c = i2c;
++		adap = &i2c->chans[i].adap;
++		adap->owner = THIS_MODULE;
++		adap->algo = &rtl9300_i2c_algo;
++		adap->quirks = &rtl9300_i2c_quirks;
++		adap->retries = 3;
++		adap->dev.parent = dev;
++		i2c_set_adapdata(adap, chan);
++		adap->dev.of_node = to_of_node(child);
++		snprintf(adap->name, sizeof(adap->name), "%s SDA%d\n", dev_name(dev), sda_pin);
++		i++;
++
++		ret = devm_i2c_add_adapter(dev, adap);
++		if (ret)
++			return ret;
++	}
++	i2c->sda_pin = 0xff;
++
++	return 0;
++}
++
++static const struct of_device_id i2c_rtl9300_dt_ids[] = {
++	{ .compatible = "realtek,rtl9301-i2c" },
++	{ .compatible = "realtek,rtl9302b-i2c" },
++	{ .compatible = "realtek,rtl9302c-i2c" },
++	{ .compatible = "realtek,rtl9303-i2c" },
++	{}
++};
++MODULE_DEVICE_TABLE(of, i2c_rtl9300_dt_ids);
++
++static struct platform_driver rtl9300_i2c_driver = {
++	.probe = rtl9300_i2c_probe,
++	.driver = {
++		.name = "i2c-rtl9300",
++		.of_match_table = i2c_rtl9300_dt_ids,
++	},
++};
++
++module_platform_driver(rtl9300_i2c_driver);
++
++MODULE_DESCRIPTION("RTL9300 I2C controller driver");
++MODULE_LICENSE("GPL");
diff --git a/target/linux/realtek/patches-6.12/004-v6.16-dt-bindings-i2c-realtek-rtl9301-Fix-missing-reg-cons.patch b/target/linux/realtek/patches-6.12/004-v6.16-dt-bindings-i2c-realtek-rtl9301-Fix-missing-reg-cons.patch
new file mode 100644
index 0000000000..c460eb1a40
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/004-v6.16-dt-bindings-i2c-realtek-rtl9301-Fix-missing-reg-cons.patch
@@ -0,0 +1,27 @@
+From 5f05fc6e2218db7ecc52c60eb34b707fe69262c2 Mon Sep 17 00:00:00 2001
+From: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
+Date: Wed, 2 Jul 2025 08:15:31 +0200
+Subject: [PATCH] dt-bindings: i2c: realtek,rtl9301: Fix missing 'reg'
+ constraint
+
+Lists should have fixed amount if items, so add missing constraint to
+the 'reg' property (only one address space entry).
+
+Fixes: c5eda0333076 ("dt-bindings: i2c: Add Realtek RTL I2C Controller")
+Cc: <stable at vger.kernel.org> # v6.13+
+Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
+Signed-off-by: Andi Shyti <andi.shyti at kernel.org>
+Link: https://lore.kernel.org/r/20250702061530.6940-2-krzysztof.kozlowski at linaro.org
+
+--- a/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
++++ b/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
+@@ -26,7 +26,8 @@ properties:
+       - const: realtek,rtl9301-i2c
+ 
+   reg:
+-    description: Register offset and size this I2C controller.
++    items:
++      - description: Register offset and size this I2C controller.
+ 
+   "#address-cells":
+     const: 1
diff --git a/target/linux/realtek/patches-6.12/100-01-i2c-rtl9300-Fix-out-of-bounds-bug-in-rtl9300_i2c_smb.patch b/target/linux/realtek/patches-6.12/100-01-i2c-rtl9300-Fix-out-of-bounds-bug-in-rtl9300_i2c_smb.patch
new file mode 100644
index 0000000000..3caecdf9ab
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/100-01-i2c-rtl9300-Fix-out-of-bounds-bug-in-rtl9300_i2c_smb.patch
@@ -0,0 +1,37 @@
+From c8e44fae5b05528d4d672a935c8ace21eed8b8e7 Mon Sep 17 00:00:00 2001
+From: Alex Guo <alexguo1023 at gmail.com>
+Date: Sat, 9 Aug 2025 08:40:54 +0200
+Subject: [PATCH 1/5] i2c: rtl9300: Fix out-of-bounds bug in
+ rtl9300_i2c_smbus_xfer
+
+The data->block[0] variable comes from user. Without proper check,
+the variable may be very large to cause an out-of-bounds bug.
+
+Fix this bug by checking the value of data->block[0] first.
+
+1. commit 39244cc75482 ("i2c: ismt: Fix an out-of-bounds bug in
+   ismt_access()")
+2. commit 92fbb6d1296f ("i2c: xgene-slimpro: Fix out-of-bounds bug in
+   xgene_slimpro_i2c_xfer()")
+
+Cc: <stable at vger.kernel.org>
+Fixes: c366be720235 ("i2c: Add driver for the RTL9300 I2C controller")
+Signed-off-by: Alex Guo <alexguo1023 at gmail.com>
+Reviewed-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Tested-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Signed-off-by: Sven Eckelmann <sven at narfation.org>
+Link: https://lore.kernel.org/linux-i2c/20250809-i2c-rtl9300-multi-byte-v4-1-d71dd5eb6121 at narfation.org/
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -281,6 +281,10 @@ static int rtl9300_i2c_smbus_xfer(struct
+ 		ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
+ 		if (ret)
+ 			goto out_unlock;
++		if (data->block[0] < 1 || data->block[0] > I2C_SMBUS_BLOCK_MAX) {
++			ret = -EINVAL;
++			goto out_unlock;
++		}
+ 		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, data->block[0]);
+ 		if (ret)
+ 			goto out_unlock;
diff --git a/target/linux/realtek/patches-6.12/100-02-i2c-rtl9300-Fix-multi-byte-I2C-write.patch b/target/linux/realtek/patches-6.12/100-02-i2c-rtl9300-Fix-multi-byte-I2C-write.patch
new file mode 100644
index 0000000000..4a8cdacdee
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/100-02-i2c-rtl9300-Fix-multi-byte-I2C-write.patch
@@ -0,0 +1,74 @@
+From 0190fed3eed28be78717a0b45d7038c855e83b18 Mon Sep 17 00:00:00 2001
+From: Harshal Gohel <hg at simonwunderlich.de>
+Date: Sat, 9 Aug 2025 08:40:55 +0200
+Subject: [PATCH 2/5] i2c: rtl9300: Fix multi-byte I2C write
+
+The RTL93xx I2C controller has 4 32 bit registers to store the bytes for
+the upcoming I2C transmission. The first byte is stored in the
+least-significant byte of the first register. And the last byte in the most
+significant byte of the last register. A map of the transferred bytes to
+their order in the registers is:
+
+reg 0: 0x04_03_02_01
+reg 1: 0x08_07_06_05
+reg 2: 0x0c_0b_0a_09
+reg 3: 0x10_0f_0e_0d
+
+The i2c_read() function basically demonstrates how the hardware would pick
+up bytes from this register set. But the i2c_write() function was just
+pushing bytes one after another to the least significant byte of a register
+AFTER shifting the last one to the next more significant byte position.
+
+If you would then have tried to send a buffer with numbers 1-11 using
+i2c_write(), you would have ended up with following register content:
+
+reg 0: 0x01_02_03_04
+reg 1: 0x05_06_07_08
+reg 2: 0x00_09_0a_0b
+reg 3: 0x00_00_00_00
+
+On the wire, you would then have seen:
+
+  Sr Addr Wr [A] 04 A 03 A 02 A 01 A 08 A 07 A 06 A 05 A 0b A 0a A 09 A P
+
+But the correct data transmission was expected to be
+
+  Sr Addr Wr [A] 01 A 02 A 03 A 04 A 05 A 06 A 07 A 08 A 09 A 0a A 0b A P
+
+Because of this multi-byte ordering problem, only single byte i2c_write()
+operations were executed correctly (on the wire).
+
+By shifting the byte directly to the correct end position in the register,
+it is possible to avoid this incorrect byte ordering and fix multi-byte
+transmissions.
+
+The second initialization (to 0) of vals was also be dropped because this
+array is initialized to 0 on the stack by using `= {};`. This makes the
+fix a lot more readable.
+
+Cc: <stable at vger.kernel.org>
+Fixes: c366be720235 ("i2c: Add driver for the RTL9300 I2C controller")
+Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
+Co-developed-by: Sven Eckelmann <sven at narfation.org>
+Signed-off-by: Sven Eckelmann <sven at narfation.org>
+Reviewed-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Tested-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Link: https://lore.kernel.org/linux-i2c/20250809-i2c-rtl9300-multi-byte-v4-2-d71dd5eb6121 at narfation.org/
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -143,10 +143,10 @@ static int rtl9300_i2c_write(struct rtl9
+ 		return -EIO;
+ 
+ 	for (i = 0; i < len; i++) {
+-		if (i % 4 == 0)
+-			vals[i/4] = 0;
+-		vals[i/4] <<= 8;
+-		vals[i/4] |= buf[i];
++		unsigned int shift = (i % 4) * 8;
++		unsigned int reg = i / 4;
++
++		vals[reg] |= buf[i] << shift;
+ 	}
+ 
+ 	return regmap_bulk_write(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0,
diff --git a/target/linux/realtek/patches-6.12/100-03-i2c-rtl9300-Increase-timeout-for-transfer-polling.patch b/target/linux/realtek/patches-6.12/100-03-i2c-rtl9300-Increase-timeout-for-transfer-polling.patch
new file mode 100644
index 0000000000..7f0c440fd9
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/100-03-i2c-rtl9300-Increase-timeout-for-transfer-polling.patch
@@ -0,0 +1,36 @@
+From 1757cce14242192be41819db4bc7b6b707d20b87 Mon Sep 17 00:00:00 2001
+From: Sven Eckelmann <sven at narfation.org>
+Date: Sat, 9 Aug 2025 08:40:56 +0200
+Subject: [PATCH 3/5] i2c: rtl9300: Increase timeout for transfer polling
+
+The timeout for transfers was only set to 2ms. Because of this relatively
+low limit, 12-byte read operations to the frontend MCU of a RTL8239 POE PSE
+chip cluster was consistently resulting in a timeout.
+
+The original OpenWrt downstream driver [1] was not using any timeout limit
+at all. This is also possible by setting the timeout_us parameter of
+regmap_read_poll_timeout() to 0. But since the driver currently implements
+the ETIMEDOUT error, it is more sensible to increase the timeout in such a
+way that communication with the (quite common) Realtek I2C-connected POE
+management solution is possible.
+
+[1] https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/realtek/files-6.12/drivers/i2c/busses/i2c-rtl9300.c;h=c4d973195ef39dc56d6207e665d279745525fcac#l202
+
+Cc: <stable at vger.kernel.org>
+Fixes: c366be720235 ("i2c: Add driver for the RTL9300 I2C controller")
+Signed-off-by: Sven Eckelmann <sven at narfation.org>
+Reviewed-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Tested-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Link: https://lore.kernel.org/linux-i2c/20250809-i2c-rtl9300-multi-byte-v4-3-d71dd5eb6121 at narfation.org/
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -175,7 +175,7 @@ static int rtl9300_i2c_execute_xfer(stru
+ 		return ret;
+ 
+ 	ret = regmap_read_poll_timeout(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL1,
+-				       val, !(val & RTL9300_I2C_MST_CTRL1_I2C_TRIG), 100, 2000);
++				       val, !(val & RTL9300_I2C_MST_CTRL1_I2C_TRIG), 100, 100000);
+ 	if (ret)
+ 		return ret;
+ 
diff --git a/target/linux/realtek/patches-6.12/100-04-i2c-rtl9300-Add-missing-count-byte-for-SMBus-Block-O.patch b/target/linux/realtek/patches-6.12/100-04-i2c-rtl9300-Add-missing-count-byte-for-SMBus-Block-O.patch
new file mode 100644
index 0000000000..31869ce854
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/100-04-i2c-rtl9300-Add-missing-count-byte-for-SMBus-Block-O.patch
@@ -0,0 +1,52 @@
+From ebc6d39a075f89ab3a7bb3cf011c5fbd555ab82b Mon Sep 17 00:00:00 2001
+From: Sven Eckelmann <sven at narfation.org>
+Date: Sat, 9 Aug 2025 08:40:57 +0200
+Subject: [PATCH 4/5] i2c: rtl9300: Add missing count byte for SMBus Block Ops
+
+The expected on-wire format of an SMBus Block Write is
+
+  S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P
+
+Everything starting from the Count byte is provided by the I2C subsystem in
+the array data->block. But the driver was skipping the Count byte
+(data->block[0]) when sending it to the RTL93xx I2C controller.
+
+Only the actual data could be seen on the wire:
+
+  S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P
+
+This wire format is not SMBus Block Write compatible but matches the format
+of an I2C Block Write. Simply adding the count byte to the buffer for the
+I2C controller is enough to fix the transmission.
+
+This also affects read because the I2C controller must receive the count
+byte + $count * data bytes.
+
+Cc: <stable at vger.kernel.org>
+Fixes: c366be720235 ("i2c: Add driver for the RTL9300 I2C controller")
+Signed-off-by: Sven Eckelmann <sven at narfation.org>
+Reviewed-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Tested-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Link: https://lore.kernel.org/linux-i2c/20250809-i2c-rtl9300-multi-byte-v4-4-d71dd5eb6121 at narfation.org/
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -285,15 +285,15 @@ static int rtl9300_i2c_smbus_xfer(struct
+ 			ret = -EINVAL;
+ 			goto out_unlock;
+ 		}
+-		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, data->block[0]);
++		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, data->block[0] + 1);
+ 		if (ret)
+ 			goto out_unlock;
+ 		if (read_write == I2C_SMBUS_WRITE) {
+-			ret = rtl9300_i2c_write(i2c, &data->block[1], data->block[0]);
++			ret = rtl9300_i2c_write(i2c, &data->block[0], data->block[0] + 1);
+ 			if (ret)
+ 				goto out_unlock;
+ 		}
+-		len = data->block[0];
++		len = data->block[0] + 1;
+ 		break;
+ 
+ 	default:
diff --git a/target/linux/realtek/patches-6.12/100-05-i2c-rtl9300-Implement-I2C-block-read-and-write.patch b/target/linux/realtek/patches-6.12/100-05-i2c-rtl9300-Implement-I2C-block-read-and-write.patch
new file mode 100644
index 0000000000..c2e6b333ea
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/100-05-i2c-rtl9300-Implement-I2C-block-read-and-write.patch
@@ -0,0 +1,116 @@
+From 1bd7526db1cf9d5c6a700c37b8bf915f8ff72c44 Mon Sep 17 00:00:00 2001
+From: Harshal Gohel <hg at simonwunderlich.de>
+Date: Sat, 9 Aug 2025 08:40:58 +0200
+Subject: [PATCH 5/5] i2c: rtl9300: Implement I2C block read and write
+
+It was noticed that the original implementation of SMBus Block Write in the
+driver was actually an I2C Block Write. Both differ only in the Count byte
+before the actual data:
+
+  S Addr Wr [A] Comm [A] Count [A] Data [A] Data [A] ... [A] Data [A] P
+
+The I2C Block Write is just skipping this Count byte and starts directly
+with the data:
+
+  S Addr Wr [A] Comm [A] Data [A] Data [A] ... [A] Data [A] P
+
+The I2C controller of RTL93xx doesn't handle this Count byte special and it
+is simply another one of (16 possible) data bytes. Adding support for the
+I2C Block Write therefore only requires skipping the count byte (0) in
+data->block.
+
+It is similar for reads. The SMBUS Block read is having a Count byte before
+the data:
+
+  S Addr Wr [A] Comm [A]
+            Sr Addr Rd [A] [Count] A [Data] A [Data] A ... A [Data] NA P
+
+And the I2C Block Read is directly starting with the actual data:
+
+  S Addr Wr [A] Comm [A]
+            Sr Addr Rd [A] [Data] A [Data] A ... A [Data] NA P
+
+The I2C controller is also not handling this byte in a special way. It
+simply provides every byte after the Rd marker + Ack as part of the 16 byte
+receive buffer (registers). The content of this buffer just has to be
+copied to the right position in the receive data->block.
+
+Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
+Co-developed-by: Sven Eckelmann <sven at narfation.org>
+Signed-off-by: Sven Eckelmann <sven at narfation.org>
+Reviewed-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Tested-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Link: https://lore.kernel.org/linux-i2c/20250809-i2c-rtl9300-multi-byte-v4-5-d71dd5eb6121 at narfation.org/
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -183,22 +183,32 @@ static int rtl9300_i2c_execute_xfer(stru
+ 		return -EIO;
+ 
+ 	if (read_write == I2C_SMBUS_READ) {
+-		if (size == I2C_SMBUS_BYTE || size == I2C_SMBUS_BYTE_DATA) {
++		switch (size) {
++		case I2C_SMBUS_BYTE:
++		case I2C_SMBUS_BYTE_DATA:
+ 			ret = regmap_read(i2c->regmap,
+ 					  i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0, &val);
+ 			if (ret)
+ 				return ret;
+ 			data->byte = val & 0xff;
+-		} else if (size == I2C_SMBUS_WORD_DATA) {
++			break;
++		case I2C_SMBUS_WORD_DATA:
+ 			ret = regmap_read(i2c->regmap,
+ 					  i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0, &val);
+ 			if (ret)
+ 				return ret;
+ 			data->word = val & 0xffff;
+-		} else {
++			break;
++		case I2C_SMBUS_I2C_BLOCK_DATA:
++			ret = rtl9300_i2c_read(i2c, &data->block[1], len);
++			if (ret)
++				return ret;
++			break;
++		default:
+ 			ret = rtl9300_i2c_read(i2c, &data->block[0], len);
+ 			if (ret)
+ 				return ret;
++			break;
+ 		}
+ 	}
+ 
+@@ -296,6 +306,25 @@ static int rtl9300_i2c_smbus_xfer(struct
+ 		len = data->block[0] + 1;
+ 		break;
+ 
++	case I2C_SMBUS_I2C_BLOCK_DATA:
++		ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
++		if (ret)
++			goto out_unlock;
++		if (data->block[0] < 1 || data->block[0] > I2C_SMBUS_BLOCK_MAX) {
++			ret = -EINVAL;
++			goto out_unlock;
++		}
++		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, data->block[0]);
++		if (ret)
++			goto out_unlock;
++		if (read_write == I2C_SMBUS_WRITE) {
++			ret = rtl9300_i2c_write(i2c, &data->block[1], data->block[0]);
++			if (ret)
++				goto out_unlock;
++		}
++		len = data->block[0];
++		break;
++
+ 	default:
+ 		dev_err(&adap->dev, "Unsupported transaction %d\n", size);
+ 		ret = -EOPNOTSUPP;
+@@ -314,6 +343,7 @@ static u32 rtl9300_i2c_func(struct i2c_a
+ {
+ 	return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
+ 	       I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA |
++	       I2C_FUNC_SMBUS_READ_I2C_BLOCK | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK |
+ 	       I2C_FUNC_SMBUS_BLOCK_DATA;
+ }
+ 
diff --git a/target/linux/realtek/patches-6.12/101-01-i2c-rtl9300-use-regmap-fields-and-API-for-registe.patch b/target/linux/realtek/patches-6.12/101-01-i2c-rtl9300-use-regmap-fields-and-API-for-registe.patch
new file mode 100644
index 0000000000..6292793483
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/101-01-i2c-rtl9300-use-regmap-fields-and-API-for-registe.patch
@@ -0,0 +1,352 @@
+From 055c2659011812c1abbd879ce80b2342e4d93576 Mon Sep 17 00:00:00 2001
+From: Jonas Jelonek <jelonek.jonas at gmail.com>
+Date: Mon, 30 Jun 2025 15:37:06 +0000
+Subject: [PATCH v5 01/11] i2c: rtl9300: use regmap fields and API for
+ registers
+
+Adapt the RTL9300 I2C controller driver to use more of the regmap
+API, especially make use of reg_field and regmap_field instead of macros
+to represent registers. Most register operations are performed through
+regmap_field_* API then.
+
+Handle SCL selection using separate chip-specific functions since this
+is already known to differ between the Realtek SoC families in such a
+way that this cannot be properly handled using just a different
+reg_field.
+
+This makes it easier to add support for newer generations or to handle
+differences between specific revisions within a series. Just by
+defining a separate driver data structure with the corresponding
+register field definitions and linking it to a new compatible.
+
+Reviewed-by: Chris Packham <chris.packham at alliedtelesis.co.nz>
+Tested-by: Chris Packham <chris.packham at alliedtelesis.co.nz> # On RTL9302c
+Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
+Link: https://lore.kernel.org/linux-i2c/20250809220713.1038947-2-jelonek.jonas at gmail.com/
+---
+ drivers/i2c/busses/i2c-rtl9300.c | 192 ++++++++++++++++++++-----------
+ 1 file changed, 124 insertions(+), 68 deletions(-)
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -23,94 +23,114 @@ struct rtl9300_i2c_chan {
+ 	u8 sda_pin;
+ };
+ 
++enum rtl9300_i2c_reg_scope {
++	REG_SCOPE_GLOBAL,
++	REG_SCOPE_MASTER,
++};
++
++struct rtl9300_i2c_reg_field {
++	struct reg_field field;
++	enum rtl9300_i2c_reg_scope scope;
++};
++
++enum rtl9300_i2c_reg_fields {
++	F_DATA_WIDTH = 0,
++	F_DEV_ADDR,
++	F_I2C_FAIL,
++	F_I2C_TRIG,
++	F_MEM_ADDR,
++	F_MEM_ADDR_WIDTH,
++	F_RD_MODE,
++	F_RWOP,
++	F_SCL_FREQ,
++	F_SCL_SEL,
++	F_SDA_OUT_SEL,
++	F_SDA_SEL,
++
++	/* keep last */
++	F_NUM_FIELDS
++};
++
++struct rtl9300_i2c_drv_data {
++	struct rtl9300_i2c_reg_field field_desc[F_NUM_FIELDS];
++	int (*select_scl)(struct rtl9300_i2c *i2c, u8 scl);
++	u32 data_reg;
++	u8 max_nchan;
++};
++
+ #define RTL9300_I2C_MUX_NCHAN	8
+ 
+ struct rtl9300_i2c {
+ 	struct regmap *regmap;
+ 	struct device *dev;
+ 	struct rtl9300_i2c_chan chans[RTL9300_I2C_MUX_NCHAN];
++	struct regmap_field *fields[F_NUM_FIELDS];
+ 	u32 reg_base;
++	u32 data_reg;
+ 	u8 sda_pin;
+ 	struct mutex lock;
+ };
+ 
+ #define RTL9300_I2C_MST_CTRL1				0x0
+-#define  RTL9300_I2C_MST_CTRL1_MEM_ADDR_OFS		8
+-#define  RTL9300_I2C_MST_CTRL1_MEM_ADDR_MASK		GENMASK(31, 8)
+-#define  RTL9300_I2C_MST_CTRL1_SDA_OUT_SEL_OFS		4
+-#define  RTL9300_I2C_MST_CTRL1_SDA_OUT_SEL_MASK		GENMASK(6, 4)
+-#define  RTL9300_I2C_MST_CTRL1_GPIO_SCL_SEL		BIT(3)
+-#define  RTL9300_I2C_MST_CTRL1_RWOP			BIT(2)
+-#define  RTL9300_I2C_MST_CTRL1_I2C_FAIL			BIT(1)
+-#define  RTL9300_I2C_MST_CTRL1_I2C_TRIG			BIT(0)
+ #define RTL9300_I2C_MST_CTRL2				0x4
+-#define  RTL9300_I2C_MST_CTRL2_RD_MODE			BIT(15)
+-#define  RTL9300_I2C_MST_CTRL2_DEV_ADDR_OFS		8
+-#define  RTL9300_I2C_MST_CTRL2_DEV_ADDR_MASK		GENMASK(14, 8)
+-#define  RTL9300_I2C_MST_CTRL2_DATA_WIDTH_OFS		4
+-#define  RTL9300_I2C_MST_CTRL2_DATA_WIDTH_MASK		GENMASK(7, 4)
+-#define  RTL9300_I2C_MST_CTRL2_MEM_ADDR_WIDTH_OFS	2
+-#define  RTL9300_I2C_MST_CTRL2_MEM_ADDR_WIDTH_MASK	GENMASK(3, 2)
+-#define  RTL9300_I2C_MST_CTRL2_SCL_FREQ_OFS		0
+-#define  RTL9300_I2C_MST_CTRL2_SCL_FREQ_MASK		GENMASK(1, 0)
+ #define RTL9300_I2C_MST_DATA_WORD0			0x8
+ #define RTL9300_I2C_MST_DATA_WORD1			0xc
+ #define RTL9300_I2C_MST_DATA_WORD2			0x10
+ #define RTL9300_I2C_MST_DATA_WORD3			0x14
+-
+ #define RTL9300_I2C_MST_GLB_CTRL			0x384
+ 
+ static int rtl9300_i2c_reg_addr_set(struct rtl9300_i2c *i2c, u32 reg, u16 len)
+ {
+-	u32 val, mask;
+ 	int ret;
+ 
+-	val = len << RTL9300_I2C_MST_CTRL2_MEM_ADDR_WIDTH_OFS;
+-	mask = RTL9300_I2C_MST_CTRL2_MEM_ADDR_WIDTH_MASK;
+-
+-	ret = regmap_update_bits(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL2, mask, val);
++	ret = regmap_field_write(i2c->fields[F_MEM_ADDR_WIDTH], len);
+ 	if (ret)
+ 		return ret;
+ 
+-	val = reg << RTL9300_I2C_MST_CTRL1_MEM_ADDR_OFS;
+-	mask = RTL9300_I2C_MST_CTRL1_MEM_ADDR_MASK;
++	return regmap_field_write(i2c->fields[F_MEM_ADDR], reg);
++}
+ 
+-	return regmap_update_bits(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL1, mask, val);
++static int rtl9300_i2c_select_scl(struct rtl9300_i2c *i2c, u8 scl)
++{
++	return regmap_field_write(i2c->fields[F_SCL_SEL], 1);
+ }
+ 
+ static int rtl9300_i2c_config_io(struct rtl9300_i2c *i2c, u8 sda_pin)
+ {
++	struct rtl9300_i2c_drv_data *drv_data;
+ 	int ret;
+-	u32 val, mask;
+ 
+-	ret = regmap_update_bits(i2c->regmap, RTL9300_I2C_MST_GLB_CTRL, BIT(sda_pin), BIT(sda_pin));
++	drv_data = (struct rtl9300_i2c_drv_data *)device_get_match_data(i2c->dev);
++
++	ret = regmap_field_update_bits(i2c->fields[F_SDA_SEL], BIT(sda_pin), BIT(sda_pin));
+ 	if (ret)
+ 		return ret;
+ 
+-	val = (sda_pin << RTL9300_I2C_MST_CTRL1_SDA_OUT_SEL_OFS) |
+-		RTL9300_I2C_MST_CTRL1_GPIO_SCL_SEL;
+-	mask = RTL9300_I2C_MST_CTRL1_SDA_OUT_SEL_MASK | RTL9300_I2C_MST_CTRL1_GPIO_SCL_SEL;
++	ret = regmap_field_write(i2c->fields[F_SDA_OUT_SEL], sda_pin);
++	if (ret)
++		return ret;
+ 
+-	return regmap_update_bits(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL1, mask, val);
++	return drv_data->select_scl(i2c, 0);
+ }
+ 
+ static int rtl9300_i2c_config_xfer(struct rtl9300_i2c *i2c, struct rtl9300_i2c_chan *chan,
+ 				   u16 addr, u16 len)
+ {
+-	u32 val, mask;
+-
+-	val = chan->bus_freq << RTL9300_I2C_MST_CTRL2_SCL_FREQ_OFS;
+-	mask = RTL9300_I2C_MST_CTRL2_SCL_FREQ_MASK;
++	int ret;
+ 
+-	val |= addr << RTL9300_I2C_MST_CTRL2_DEV_ADDR_OFS;
+-	mask |= RTL9300_I2C_MST_CTRL2_DEV_ADDR_MASK;
++	ret = regmap_field_write(i2c->fields[F_SCL_FREQ], chan->bus_freq);
++	if (ret)
++		return ret;
+ 
+-	val |= ((len - 1) & 0xf) << RTL9300_I2C_MST_CTRL2_DATA_WIDTH_OFS;
+-	mask |= RTL9300_I2C_MST_CTRL2_DATA_WIDTH_MASK;
++	ret = regmap_field_write(i2c->fields[F_DEV_ADDR], addr);
++	if (ret)
++		return ret;
+ 
+-	mask |= RTL9300_I2C_MST_CTRL2_RD_MODE;
++	ret = regmap_field_write(i2c->fields[F_DATA_WIDTH], (len - 1) & 0xf);
++	if (ret)
++		return ret;
+ 
+-	return regmap_update_bits(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL2, mask, val);
++	return regmap_field_write(i2c->fields[F_RD_MODE], 0);
+ }
+ 
+ static int rtl9300_i2c_read(struct rtl9300_i2c *i2c, u8 *buf, int len)
+@@ -121,8 +141,7 @@ static int rtl9300_i2c_read(struct rtl93
+ 	if (len > 16)
+ 		return -EIO;
+ 
+-	ret = regmap_bulk_read(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0,
+-			       vals, ARRAY_SIZE(vals));
++	ret = regmap_bulk_read(i2c->regmap, i2c->data_reg, vals, ARRAY_SIZE(vals));
+ 	if (ret)
+ 		return ret;
+ 
+@@ -149,52 +168,49 @@ static int rtl9300_i2c_write(struct rtl9
+ 		vals[reg] |= buf[i] << shift;
+ 	}
+ 
+-	return regmap_bulk_write(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0,
+-				vals, ARRAY_SIZE(vals));
++	return regmap_bulk_write(i2c->regmap, i2c->data_reg, vals, ARRAY_SIZE(vals));
+ }
+ 
+ static int rtl9300_i2c_writel(struct rtl9300_i2c *i2c, u32 data)
+ {
+-	return regmap_write(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0, data);
++	return regmap_write(i2c->regmap, i2c->data_reg, data);
+ }
+ 
+ static int rtl9300_i2c_execute_xfer(struct rtl9300_i2c *i2c, char read_write,
+ 				    int size, union i2c_smbus_data *data, int len)
+ {
+-	u32 val, mask;
++	u32 val;
+ 	int ret;
+ 
+-	val = read_write == I2C_SMBUS_WRITE ? RTL9300_I2C_MST_CTRL1_RWOP : 0;
+-	mask = RTL9300_I2C_MST_CTRL1_RWOP;
+-
+-	val |= RTL9300_I2C_MST_CTRL1_I2C_TRIG;
+-	mask |= RTL9300_I2C_MST_CTRL1_I2C_TRIG;
++	ret = regmap_field_write(i2c->fields[F_RWOP], read_write == I2C_SMBUS_WRITE);
++	if (ret)
++		return ret;
+ 
+-	ret = regmap_update_bits(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL1, mask, val);
++	ret = regmap_field_write(i2c->fields[F_I2C_TRIG], 1);
+ 	if (ret)
+ 		return ret;
+ 
+-	ret = regmap_read_poll_timeout(i2c->regmap, i2c->reg_base + RTL9300_I2C_MST_CTRL1,
+-				       val, !(val & RTL9300_I2C_MST_CTRL1_I2C_TRIG), 100, 100000);
++	ret = regmap_field_read_poll_timeout(i2c->fields[F_I2C_TRIG], val, !val, 100, 100000);
+ 	if (ret)
+ 		return ret;
+ 
+-	if (val & RTL9300_I2C_MST_CTRL1_I2C_FAIL)
++	ret = regmap_field_read(i2c->fields[F_I2C_FAIL], &val);
++	if (ret)
++		return ret;
++	if (val)
+ 		return -EIO;
+ 
+ 	if (read_write == I2C_SMBUS_READ) {
+ 		switch (size) {
+ 		case I2C_SMBUS_BYTE:
+ 		case I2C_SMBUS_BYTE_DATA:
+-			ret = regmap_read(i2c->regmap,
+-					  i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0, &val);
++			ret = regmap_read(i2c->regmap, i2c->data_reg, &val);
+ 			if (ret)
+ 				return ret;
+ 			data->byte = val & 0xff;
+ 			break;
+ 		case I2C_SMBUS_WORD_DATA:
+-			ret = regmap_read(i2c->regmap,
+-					  i2c->reg_base + RTL9300_I2C_MST_DATA_WORD0, &val);
++			ret = regmap_read(i2c->regmap, i2c->data_reg, &val);
+ 			if (ret)
+ 				return ret;
+ 			data->word = val & 0xffff;
+@@ -362,9 +378,11 @@ static int rtl9300_i2c_probe(struct plat
+ {
+ 	struct device *dev = &pdev->dev;
+ 	struct rtl9300_i2c *i2c;
++	struct fwnode_handle *child;
++	struct rtl9300_i2c_drv_data *drv_data;
++	struct reg_field fields[F_NUM_FIELDS];
+ 	u32 clock_freq, sda_pin;
+ 	int ret, i = 0;
+-	struct fwnode_handle *child;
+ 
+ 	i2c = devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL);
+ 	if (!i2c)
+@@ -383,9 +401,22 @@ static int rtl9300_i2c_probe(struct plat
+ 
+ 	platform_set_drvdata(pdev, i2c);
+ 
+-	if (device_get_child_node_count(dev) >= RTL9300_I2C_MUX_NCHAN)
++	drv_data = (struct rtl9300_i2c_drv_data *)device_get_match_data(i2c->dev);
++	if (device_get_child_node_count(dev) >= drv_data->max_nchan)
+ 		return dev_err_probe(dev, -EINVAL, "Too many channels\n");
+ 
++	i2c->data_reg = i2c->reg_base + drv_data->data_reg;
++	for (i = 0; i < F_NUM_FIELDS; i++) {
++		fields[i] = drv_data->field_desc[i].field;
++		if (drv_data->field_desc[i].scope == REG_SCOPE_MASTER)
++			fields[i].reg += i2c->reg_base;
++	}
++	ret = devm_regmap_field_bulk_alloc(dev, i2c->regmap, i2c->fields,
++					   fields, F_NUM_FIELDS);
++	if (ret)
++		return ret;
++
++	i = 0;
+ 	device_for_each_child_node(dev, child) {
+ 		struct rtl9300_i2c_chan *chan = &i2c->chans[i];
+ 		struct i2c_adapter *adap = &chan->adap;
+@@ -402,7 +433,6 @@ static int rtl9300_i2c_probe(struct plat
+ 		case I2C_MAX_STANDARD_MODE_FREQ:
+ 			chan->bus_freq = RTL9300_I2C_STD_FREQ;
+ 			break;
+-
+ 		case I2C_MAX_FAST_MODE_FREQ:
+ 			chan->bus_freq = RTL9300_I2C_FAST_FREQ;
+ 			break;
+@@ -434,11 +464,37 @@ static int rtl9300_i2c_probe(struct plat
+ 	return 0;
+ }
+ 
++#define GLB_REG_FIELD(reg, msb, lsb)    \
++	{ .field = REG_FIELD(reg, msb, lsb), .scope = REG_SCOPE_GLOBAL }
++#define MST_REG_FIELD(reg, msb, lsb)    \
++	{ .field = REG_FIELD(reg, msb, lsb), .scope = REG_SCOPE_MASTER }
++
++static const struct rtl9300_i2c_drv_data rtl9300_i2c_drv_data = {
++	.field_desc = {
++		[F_MEM_ADDR]		= MST_REG_FIELD(RTL9300_I2C_MST_CTRL1, 8, 31),
++		[F_SDA_OUT_SEL]		= MST_REG_FIELD(RTL9300_I2C_MST_CTRL1, 4, 6),
++		[F_SCL_SEL]		= MST_REG_FIELD(RTL9300_I2C_MST_CTRL1, 3, 3),
++		[F_RWOP]		= MST_REG_FIELD(RTL9300_I2C_MST_CTRL1, 2, 2),
++		[F_I2C_FAIL]		= MST_REG_FIELD(RTL9300_I2C_MST_CTRL1, 1, 1),
++		[F_I2C_TRIG]		= MST_REG_FIELD(RTL9300_I2C_MST_CTRL1, 0, 0),
++		[F_RD_MODE]		= MST_REG_FIELD(RTL9300_I2C_MST_CTRL2, 15, 15),
++		[F_DEV_ADDR]		= MST_REG_FIELD(RTL9300_I2C_MST_CTRL2, 8, 14),
++		[F_DATA_WIDTH]		= MST_REG_FIELD(RTL9300_I2C_MST_CTRL2, 4, 7),
++		[F_MEM_ADDR_WIDTH]	= MST_REG_FIELD(RTL9300_I2C_MST_CTRL2, 2, 3),
++		[F_SCL_FREQ]		= MST_REG_FIELD(RTL9300_I2C_MST_CTRL2, 0, 1),
++		[F_SDA_SEL]		= GLB_REG_FIELD(RTL9300_I2C_MST_GLB_CTRL, 0, 7),
++	},
++	.select_scl = rtl9300_i2c_select_scl,
++	.data_reg = RTL9300_I2C_MST_DATA_WORD0,
++	.max_nchan = RTL9300_I2C_MUX_NCHAN,
++};
++
++
+ static const struct of_device_id i2c_rtl9300_dt_ids[] = {
+-	{ .compatible = "realtek,rtl9301-i2c" },
+-	{ .compatible = "realtek,rtl9302b-i2c" },
+-	{ .compatible = "realtek,rtl9302c-i2c" },
+-	{ .compatible = "realtek,rtl9303-i2c" },
++	{ .compatible = "realtek,rtl9301-i2c", .data = (void *) &rtl9300_i2c_drv_data },
++	{ .compatible = "realtek,rtl9302b-i2c", .data = (void *) &rtl9300_i2c_drv_data },
++	{ .compatible = "realtek,rtl9302c-i2c", .data = (void *) &rtl9300_i2c_drv_data },
++	{ .compatible = "realtek,rtl9303-i2c", .data = (void *) &rtl9300_i2c_drv_data },
+ 	{}
+ };
+ MODULE_DEVICE_TABLE(of, i2c_rtl9300_dt_ids);
diff --git a/target/linux/realtek/patches-6.12/101-02-i2c-rtl9300-fix-channel-number-bound-check.patch b/target/linux/realtek/patches-6.12/101-02-i2c-rtl9300-fix-channel-number-bound-check.patch
new file mode 100644
index 0000000000..a00bf32541
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/101-02-i2c-rtl9300-fix-channel-number-bound-check.patch
@@ -0,0 +1,36 @@
+From 571dd5203fcd1b9f78bc3d913492c0e13ad1bb00 Mon Sep 17 00:00:00 2001
+From: Jonas Jelonek <jelonek.jonas at gmail.com>
+Date: Sat, 9 Aug 2025 19:58:43 +0000
+Subject: [PATCH v5 02/11] i2c: rtl9300: fix channel number bound check
+
+Fix the current check for number of channels (child nodes in the device
+tree). Before, this was:
+
+if (device_get_child_node_count(dev) >= drv_data->max_nchan)
+
+drv_data->max_nchan gives the maximum number of channels so checking
+with '>=' isn't correct because it doesn't allow the last channel
+number. Thus, fix it to:
+
+if (device_get_child_node_count(dev) > drv_data->max_nchan)
+
+Issue occured on a TP-Link TL-ST1008F v2.0 device (8 SFP+ ports) and fix
+is tested there.
+
+Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
+Link: https://lore.kernel.org/linux-i2c/20250809220713.1038947-3-jelonek.jonas at gmail.com/
+---
+ drivers/i2c/busses/i2c-rtl9300.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -402,7 +402,7 @@ static int rtl9300_i2c_probe(struct plat
+ 	platform_set_drvdata(pdev, i2c);
+ 
+ 	drv_data = (struct rtl9300_i2c_drv_data *)device_get_match_data(i2c->dev);
+-	if (device_get_child_node_count(dev) >= drv_data->max_nchan)
++	if (device_get_child_node_count(dev) > drv_data->max_nchan)
+ 		return dev_err_probe(dev, -EINVAL, "Too many channels\n");
+ 
+ 	i2c->data_reg = i2c->reg_base + drv_data->data_reg;
diff --git a/target/linux/realtek/patches-6.12/101-03-dt-bindings-i2c-realtek-rtl9301-i2c-fix-wording-a.patch b/target/linux/realtek/patches-6.12/101-03-dt-bindings-i2c-realtek-rtl9301-i2c-fix-wording-a.patch
new file mode 100644
index 0000000000..d4b58bc0e1
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/101-03-dt-bindings-i2c-realtek-rtl9301-i2c-fix-wording-a.patch
@@ -0,0 +1,50 @@
+From 7bb38428b718a281e09b35bc26478600b53300fc Mon Sep 17 00:00:00 2001
+From: Jonas Jelonek <jelonek.jonas at gmail.com>
+Date: Mon, 4 Aug 2025 10:26:35 +0000
+Subject: [PATCH v5 03/11] dt-bindings: i2c: realtek,rtl9301-i2c: fix wording
+ and typos
+
+Fix wording of binding description to use plural because there is not
+only a single RTL9300 SoC. RTL9300 describes a whole family of Realtek
+SoCs.
+
+Add missing word 'of' in description of reg property.
+
+Change 'SDA pin' to 'SDA line number' because the property must contain
+the SDA (channel) number ranging from 0-7 instead of a real pin number.
+
+Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
+Link: https://lore.kernel.org/linux-i2c/20250809220713.1038947-4-jelonek.jonas at gmail.com/
+---
+ .../devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml        | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
++++ b/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
+@@ -10,7 +10,7 @@ maintainers:
+   - Chris Packham <chris.packham at alliedtelesis.co.nz>
+ 
+ description:
+-  The RTL9300 SoC has two I2C controllers. Each of these has an SCL line (which
++  RTL9300 SoCs have two I2C controllers. Each of these has an SCL line (which
+   if not-used for SCL can be a GPIO). There are 8 common SDA lines that can be
+   assigned to either I2C controller.
+ 
+@@ -27,7 +27,7 @@ properties:
+ 
+   reg:
+     items:
+-      - description: Register offset and size this I2C controller.
++      - description: Register offset and size of this I2C controller.
+ 
+   "#address-cells":
+     const: 1
+@@ -42,7 +42,7 @@ patternProperties:
+ 
+     properties:
+       reg:
+-        description: The SDA pin associated with the I2C bus.
++        description: The SDA line number associated with the I2C bus.
+         maxItems: 1
+ 
+     required:
diff --git a/target/linux/realtek/patches-6.12/101-04-i2c-rtl9300-rename-internal-sda_pin-to-sda_num.patch b/target/linux/realtek/patches-6.12/101-04-i2c-rtl9300-rename-internal-sda_pin-to-sda_num.patch
new file mode 100644
index 0000000000..efc3ecb16b
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/101-04-i2c-rtl9300-rename-internal-sda_pin-to-sda_num.patch
@@ -0,0 +1,116 @@
+From bccfb0e2a337529d07134e52ca3e2ec1c156bd7d Mon Sep 17 00:00:00 2001
+From: Jonas Jelonek <jelonek.jonas at gmail.com>
+Date: Mon, 4 Aug 2025 11:27:57 +0000
+Subject: [PATCH v5 04/11] i2c: rtl9300: rename internal sda_pin to sda_num
+
+Rename the internally used 'sda_pin' to 'sda_num' to make it clear that
+this is NOT the actual pin number of the GPIO pin but rather the logical
+SDA channel number. Although the alternate function SDA_Y is sometimes
+given with the GPIO number, this is not always the case. Thus, avoid any
+confusion or misconfiguration by giving the variable the correct name.
+
+This follows the description change in the devicetree bindings.
+
+Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
+Link: https://lore.kernel.org/linux-i2c/20250809220713.1038947-5-jelonek.jonas at gmail.com/
+---
+ drivers/i2c/busses/i2c-rtl9300.c | 24 ++++++++++++------------
+ 1 file changed, 12 insertions(+), 12 deletions(-)
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -20,7 +20,7 @@ struct rtl9300_i2c_chan {
+ 	struct i2c_adapter adap;
+ 	struct rtl9300_i2c *i2c;
+ 	enum rtl9300_bus_freq bus_freq;
+-	u8 sda_pin;
++	u8 sda_num;
+ };
+ 
+ enum rtl9300_i2c_reg_scope {
+@@ -67,7 +67,7 @@ struct rtl9300_i2c {
+ 	struct regmap_field *fields[F_NUM_FIELDS];
+ 	u32 reg_base;
+ 	u32 data_reg;
+-	u8 sda_pin;
++	u8 sda_num;
+ 	struct mutex lock;
+ };
+ 
+@@ -102,11 +102,11 @@ static int rtl9300_i2c_config_io(struct
+ 
+ 	drv_data = (struct rtl9300_i2c_drv_data *)device_get_match_data(i2c->dev);
+ 
+-	ret = regmap_field_update_bits(i2c->fields[F_SDA_SEL], BIT(sda_pin), BIT(sda_pin));
++	ret = regmap_field_update_bits(i2c->fields[F_SDA_SEL], BIT(sda_num), BIT(sda_num));
+ 	if (ret)
+ 		return ret;
+ 
+-	ret = regmap_field_write(i2c->fields[F_SDA_OUT_SEL], sda_pin);
++	ret = regmap_field_write(i2c->fields[F_SDA_OUT_SEL], sda_num);
+ 	if (ret)
+ 		return ret;
+ 
+@@ -240,11 +240,11 @@ static int rtl9300_i2c_smbus_xfer(struct
+ 	int len = 0, ret;
+ 
+ 	mutex_lock(&i2c->lock);
+-	if (chan->sda_pin != i2c->sda_pin) {
++	if (chan->sda_num != i2c->sda_num) {
+ 		ret = rtl9300_i2c_config_io(i2c, chan->sda_pin);
+ 		if (ret)
+ 			goto out_unlock;
+-		i2c->sda_pin = chan->sda_pin;
++		i2c->sda_num = chan->sda_num;
+ 	}
+ 
+ 	switch (size) {
+@@ -381,7 +381,7 @@ static int rtl9300_i2c_probe(struct plat
+ 	struct fwnode_handle *child;
+ 	struct rtl9300_i2c_drv_data *drv_data;
+ 	struct reg_field fields[F_NUM_FIELDS];
+-	u32 clock_freq, sda_pin;
++	u32 clock_freq, sda_num;
+ 	int ret, i = 0;
+ 
+ 	i2c = devm_kzalloc(dev, sizeof(*i2c), GFP_KERNEL);
+@@ -421,7 +421,7 @@ static int rtl9300_i2c_probe(struct plat
+ 		struct rtl9300_i2c_chan *chan = &i2c->chans[i];
+ 		struct i2c_adapter *adap = &chan->adap;
+ 
+-		ret = fwnode_property_read_u32(child, "reg", &sda_pin);
++		ret = fwnode_property_read_u32(child, "reg", &sda_num);
+ 		if (ret)
+ 			return ret;
+ 
+@@ -438,11 +438,11 @@ static int rtl9300_i2c_probe(struct plat
+ 			break;
+ 		default:
+ 			dev_warn(i2c->dev, "SDA%d clock-frequency %d not supported using default\n",
+-				 sda_pin, clock_freq);
++				 sda_num, clock_freq);
+ 			break;
+ 		}
+ 
+-		chan->sda_pin = sda_pin;
++		chan->sda_num = sda_num;
+ 		chan->i2c = i2c;
+ 		adap = &i2c->chans[i].adap;
+ 		adap->owner = THIS_MODULE;
+@@ -452,14 +452,14 @@ static int rtl9300_i2c_probe(struct plat
+ 		adap->dev.parent = dev;
+ 		i2c_set_adapdata(adap, chan);
+ 		adap->dev.of_node = to_of_node(child);
+-		snprintf(adap->name, sizeof(adap->name), "%s SDA%d\n", dev_name(dev), sda_pin);
++		snprintf(adap->name, sizeof(adap->name), "%s SDA%d\n", dev_name(dev), sda_num);
+ 		i++;
+ 
+ 		ret = devm_i2c_add_adapter(dev, adap);
+ 		if (ret)
+ 			return ret;
+ 	}
+-	i2c->sda_pin = 0xff;
++	i2c->sda_num = 0xff;
+ 
+ 	return 0;
+ }
diff --git a/target/linux/realtek/patches-6.12/101-05-i2c-rtl9300-check-if-xfer-length-is-valid.patch b/target/linux/realtek/patches-6.12/101-05-i2c-rtl9300-check-if-xfer-length-is-valid.patch
new file mode 100644
index 0000000000..75ac386b24
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/101-05-i2c-rtl9300-check-if-xfer-length-is-valid.patch
@@ -0,0 +1,41 @@
+From 47c2f21b934bda1d4031db8d54e08d52b180d9df Mon Sep 17 00:00:00 2001
+From: Jonas Jelonek <jelonek.jonas at gmail.com>
+Date: Tue, 5 Aug 2025 09:06:44 +0000
+Subject: [PATCH v5 05/11] i2c: rtl9300: check if xfer length is valid
+
+Add an explicit check for the xfer length to 'rtl9300_i2c_config_xfer'
+to make sure a length < 1 or > 16 isn't accepted. While there shouldn't
+be a length > 16 because this is specified in the i2c_adapter_quirks, a
+length of 0 may be passed. This is problematic, because the code adopts
+this value with
+
+(len - 1) & 0xf
+
+because the corresponding register documentation states that the value
+in the register is always used + 1 ([1]). Obvious reason for this is to
+fit allow xfer length of 16 to be specified in this 4-bit wide register
+field.
+
+Another consequence of this is also, that an xfer length of 0 cannot be
+set. Thus, an explicit check should avoid this. Before, this actually
+led to writing 0xf into the register, probably causing unintended
+behaviour.
+
+Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
+Link: https://lore.kernel.org/linux-i2c/20250809220713.1038947-6-jelonek.jonas at gmail.com/
+---
+ drivers/i2c/busses/i2c-rtl9300.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -118,6 +118,9 @@ static int rtl9300_i2c_config_xfer(struc
+ {
+ 	int ret;
+ 
++	if (len < 1 || len > 16)
++		return -EINVAL;
++
+ 	ret = regmap_field_write(i2c->fields[F_SCL_FREQ], chan->bus_freq);
+ 	if (ret)
+ 		return ret;
diff --git a/target/linux/realtek/patches-6.12/101-06-i2c-rtl9300-remove-SMBus-Quick-operation-support.patch b/target/linux/realtek/patches-6.12/101-06-i2c-rtl9300-remove-SMBus-Quick-operation-support.patch
new file mode 100644
index 0000000000..718dcfa51a
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/101-06-i2c-rtl9300-remove-SMBus-Quick-operation-support.patch
@@ -0,0 +1,75 @@
+From cee289c080977752b485dc41a5fbc53c5af93aa9 Mon Sep 17 00:00:00 2001
+From: Jonas Jelonek <jelonek.jonas at gmail.com>
+Date: Tue, 5 Aug 2025 09:14:51 +0000
+Subject: [PATCH v5 06/11] i2c: rtl9300: remove SMBus Quick operation support
+
+Remove the SMBus Quick operation from this driver because it is not
+natively supported by the hardware and is wrongly implemented in the
+driver.
+
+The I2C controllers in Realtek RTL9300 and RTL9310 are SMBus-compliant
+but there doesn't seem to be native support for the SMBus Quick
+operation. It is not explicitly mentioned in the documentation but
+looking at the registers which configure an SMBus transaction, one can
+see that the data length cannot be set to 0. This suggests that the
+hardware doesn't allow any SMBus message without data bytes (except for
+those it does on it's own, see SMBus Block Read).
+
+The current implementation of SMBus Quick operation passes a length of
+0 (which is actually invalid). Before the fix of a bug in a previous
+commit, this led to a read operation of 16 bytes from any register (the
+one of a former transaction or any other value.
+
+Although there are currently no reports of actual issues this caused.
+However, as an example, i2cdetect by default uses Quick Write operation
+to probe the bus and this may already write anything to some register
+of a device, causing unintended behaviour. This could be the cause of a
+recent brick of one of my DAC cables where there was a checksum mismatch
+of the EEPROM after having run 'i2cdetect -l' before.
+
+Because SMBus Quick operation is obviously not supported on these
+controllers (because a length of 0 cannot be set, even when no register
+address is set), remove that instead of claiming there is support. There
+also shouldn't be any kind of emulated 'Quick' which just does another
+kind of operation in the background. Otherwise, specific issues may
+occur in case of a 'Quick' Write which writes unknown data to an unknown
+register.
+
+Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
+Link: https://lore.kernel.org/linux-i2c/20250809220713.1038947-7-jelonek.jonas at gmail.com/
+---
+ drivers/i2c/busses/i2c-rtl9300.c | 16 +++-------------
+ 1 file changed, 3 insertions(+), 13 deletions(-)
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -251,15 +251,6 @@ static int rtl9300_i2c_smbus_xfer(struct
+ 	}
+ 
+ 	switch (size) {
+-	case I2C_SMBUS_QUICK:
+-		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, 0);
+-		if (ret)
+-			goto out_unlock;
+-		ret = rtl9300_i2c_reg_addr_set(i2c, 0, 0);
+-		if (ret)
+-			goto out_unlock;
+-		break;
+-
+ 	case I2C_SMBUS_BYTE:
+ 		if (read_write == I2C_SMBUS_WRITE) {
+ 			ret = rtl9300_i2c_config_xfer(i2c, chan, addr, 0);
+@@ -360,10 +351,9 @@ out_unlock:
+ 
+ static u32 rtl9300_i2c_func(struct i2c_adapter *a)
+ {
+-	return I2C_FUNC_SMBUS_QUICK | I2C_FUNC_SMBUS_BYTE |
+-	       I2C_FUNC_SMBUS_BYTE_DATA | I2C_FUNC_SMBUS_WORD_DATA |
+-	       I2C_FUNC_SMBUS_READ_I2C_BLOCK | I2C_FUNC_SMBUS_WRITE_I2C_BLOCK |
+-	       I2C_FUNC_SMBUS_BLOCK_DATA;
++	return I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA |
++	       I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_READ_I2C_BLOCK |
++	       I2C_FUNC_SMBUS_WRITE_I2C_BLOCK | I2C_FUNC_SMBUS_BLOCK_DATA;
+ }
+ 
+ static const struct i2c_algorithm rtl9300_i2c_algo = {
diff --git a/target/linux/realtek/patches-6.12/101-07-i2c-rtl9300-move-setting-SCL-frequency-to-config_.patch b/target/linux/realtek/patches-6.12/101-07-i2c-rtl9300-move-setting-SCL-frequency-to-config_.patch
new file mode 100644
index 0000000000..feb9949c09
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/101-07-i2c-rtl9300-move-setting-SCL-frequency-to-config_.patch
@@ -0,0 +1,66 @@
+From c64be5e5ee6326ca7ec38dbcc8892254f1da3cf8 Mon Sep 17 00:00:00 2001
+From: Jonas Jelonek <jelonek.jonas at gmail.com>
+Date: Fri, 1 Aug 2025 21:18:56 +0000
+Subject: [PATCH v5 07/11] i2c: rtl9300: move setting SCL frequency to
+ config_io
+
+Move the register operation to set the SCL frequency to the
+rtl9300_i2c_config_io function instead of the rtl9300_i2c_config_xfer
+function. This rather belongs there next to selecting the current SDA
+output line.
+
+Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
+Link: https://lore.kernel.org/linux-i2c/20250809220713.1038947-8-jelonek.jonas at gmail.com/
+---
+ drivers/i2c/busses/i2c-rtl9300.c | 17 +++++++++--------
+ 1 file changed, 9 insertions(+), 8 deletions(-)
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -95,18 +95,23 @@ static int rtl9300_i2c_select_scl(struct
+ 	return regmap_field_write(i2c->fields[F_SCL_SEL], 1);
+ }
+ 
+-static int rtl9300_i2c_config_io(struct rtl9300_i2c *i2c, u8 sda_pin)
++static int rtl9300_i2c_config_io(struct rtl9300_i2c *i2c, struct rtl9300_i2c_chan *chan)
+ {
+ 	struct rtl9300_i2c_drv_data *drv_data;
+ 	int ret;
+ 
+ 	drv_data = (struct rtl9300_i2c_drv_data *)device_get_match_data(i2c->dev);
+ 
+-	ret = regmap_field_update_bits(i2c->fields[F_SDA_SEL], BIT(sda_num), BIT(sda_num));
++	ret = regmap_field_update_bits(i2c->fields[F_SDA_SEL], BIT(chan->sda_num),
++				       BIT(chan->sda_num));
+ 	if (ret)
+ 		return ret;
+ 
+-	ret = regmap_field_write(i2c->fields[F_SDA_OUT_SEL], sda_num);
++	ret = regmap_field_write(i2c->fields[F_SDA_OUT_SEL], chan->sda_num);
++	if (ret)
++		return ret;
++
++	ret = regmap_field_write(i2c->fields[F_SCL_FREQ], chan->bus_freq);
+ 	if (ret)
+ 		return ret;
+ 
+@@ -121,10 +126,6 @@ static int rtl9300_i2c_config_xfer(struc
+ 	if (len < 1 || len > 16)
+ 		return -EINVAL;
+ 
+-	ret = regmap_field_write(i2c->fields[F_SCL_FREQ], chan->bus_freq);
+-	if (ret)
+-		return ret;
+-
+ 	ret = regmap_field_write(i2c->fields[F_DEV_ADDR], addr);
+ 	if (ret)
+ 		return ret;
+@@ -244,7 +245,7 @@ static int rtl9300_i2c_smbus_xfer(struct
+ 
+ 	mutex_lock(&i2c->lock);
+ 	if (chan->sda_num != i2c->sda_num) {
+-		ret = rtl9300_i2c_config_io(i2c, chan->sda_pin);
++		ret = rtl9300_i2c_config_io(i2c, chan);
+ 		if (ret)
+ 			goto out_unlock;
+ 		i2c->sda_num = chan->sda_num;
diff --git a/target/linux/realtek/patches-6.12/101-08-i2c-rtl9300-do-not-set-read-mode-on-every-transfe.patch b/target/linux/realtek/patches-6.12/101-08-i2c-rtl9300-do-not-set-read-mode-on-every-transfe.patch
new file mode 100644
index 0000000000..b06719608d
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/101-08-i2c-rtl9300-do-not-set-read-mode-on-every-transfe.patch
@@ -0,0 +1,47 @@
+From bd70c2680786f3b1def31285ad5114f17e381b3a Mon Sep 17 00:00:00 2001
+From: Jonas Jelonek <jelonek.jonas at gmail.com>
+Date: Fri, 1 Aug 2025 21:31:09 +0000
+Subject: [PATCH v5 08/11] i2c: rtl9300: do not set read mode on every transfer
+
+Move the operation to set the read mode from config_xfer to probe.
+
+The I2C controller of RTL9300 and RTL9310 support a legacy message mode
+for READs with 'Read Address Data' instead of the standard format 'Write
+Address ; Read Data'. There is no way to pass that via smbus_xfer, thus
+there is no point in supported this in the driver and moreover no point
+in setting this on every transaction. Setting this once in the probe
+call is sufficient.
+
+Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
+Link: https://lore.kernel.org/linux-i2c/20250809220713.1038947-9-jelonek.jonas at gmail.com/
+---
+ drivers/i2c/busses/i2c-rtl9300.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -130,11 +130,7 @@ static int rtl9300_i2c_config_xfer(struc
+ 	if (ret)
+ 		return ret;
+ 
+-	ret = regmap_field_write(i2c->fields[F_DATA_WIDTH], (len - 1) & 0xf);
+-	if (ret)
+-		return ret;
+-
+-	return regmap_field_write(i2c->fields[F_RD_MODE], 0);
++	return regmap_field_write(i2c->fields[F_DATA_WIDTH], (len - 1) & 0xf);
+ }
+ 
+ static int rtl9300_i2c_read(struct rtl9300_i2c *i2c, u8 *buf, int len)
+@@ -455,6 +451,11 @@ static int rtl9300_i2c_probe(struct plat
+ 	}
+ 	i2c->sda_num = 0xff;
+ 
++	/* only use standard read format */
++	ret = regmap_field_write(i2c->fields[F_RD_MODE], 0);
++	if (ret)
++		return ret;
++
+ 	return 0;
+ }
+ 
diff --git a/target/linux/realtek/patches-6.12/101-09-i2c-rtl9300-separate-xfer-configuration-and-execu.patch b/target/linux/realtek/patches-6.12/101-09-i2c-rtl9300-separate-xfer-configuration-and-execu.patch
new file mode 100644
index 0000000000..6eee13f0b5
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/101-09-i2c-rtl9300-separate-xfer-configuration-and-execu.patch
@@ -0,0 +1,381 @@
+From 9665c6a9812d9e2fa2b86be1fa1fc2b381e6f34e Mon Sep 17 00:00:00 2001
+From: Jonas Jelonek <jelonek.jonas at gmail.com>
+Date: Mon, 4 Aug 2025 11:31:11 +0000
+Subject: [PATCH v5 09/11] i2c: rtl9300: separate xfer configuration and
+ execution
+
+So far, the rtl9300_i2c_smbus_xfer code is quite a mess with function
+calls distributed over the whole function setting different values in
+different cases. Calls to rtl9300_i2c_config_xfer and
+rtl9300_i2c_reg_addr_set are used in every case-block with varying
+values whose meaning is not instantly obvious. In some cases, there are
+additional calls within these case-blocks doing more things.
+
+This is in general a bad design and especially really bad for
+readability and maintainability because it distributes changes or
+issues to multiple locations due to the same function being called with
+different hardcoded values in different places.
+
+To have a good structure, setting different parameters based on the
+desired operation should not be interleaved with applying these
+parameters to the hardware registers. Or in different words, the
+parameter site should be mixed with the call site.
+
+Thus, separate configuration and execution of an SMBus xfer within
+rtl9300_i2c_smbus_xfer to improve readability and maintainability. Add a
+new 'struct rtl9300_i2c_xfer' to carry the required parameters for an
+xfer which are configured based on the input parameters within a single
+switch-case block, without having any function calls within this block.
+
+The function calls to actually apply these values to the hardware
+registers then appear below in a single place and just operate on the
+passed instance of 'struct rtl9300_i2c_xfer'. These are
+'rtl9300_i2c_prepare_xfer' which combines applying all parameters of the
+xfer to the corresponding register, and 'rtl9300_i2c_do_xfer' which
+actually executes the xfer and does post-processing if needed.
+
+Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
+Link: https://lore.kernel.org/linux-i2c/20250809220713.1038947-10-jelonek.jonas at gmail.com/
+---
+ drivers/i2c/busses/i2c-rtl9300.c | 234 +++++++++++++++----------------
+ 1 file changed, 114 insertions(+), 120 deletions(-)
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -8,6 +8,7 @@
+ #include <linux/mutex.h>
+ #include <linux/platform_device.h>
+ #include <linux/regmap.h>
++#include <linux/unaligned.h>
+ 
+ enum rtl9300_bus_freq {
+ 	RTL9300_I2C_STD_FREQ,
+@@ -71,6 +72,22 @@ struct rtl9300_i2c {
+ 	struct mutex lock;
+ };
+ 
++enum rtl9300_i2c_xfer_type {
++	RTL9300_I2C_XFER_BYTE,
++	RTL9300_I2C_XFER_WORD,
++	RTL9300_I2C_XFER_BLOCK,
++};
++
++struct rtl9300_i2c_xfer {
++	enum rtl9300_i2c_xfer_type type;
++	u16 dev_addr;
++	u8 reg_addr;
++	u8 reg_addr_len;
++	u8 *data;
++	u8 data_len;
++	bool write;
++};
++
+ #define RTL9300_I2C_MST_CTRL1				0x0
+ #define RTL9300_I2C_MST_CTRL2				0x4
+ #define RTL9300_I2C_MST_DATA_WORD0			0x8
+@@ -95,45 +112,37 @@ static int rtl9300_i2c_select_scl(struct
+ 	return regmap_field_write(i2c->fields[F_SCL_SEL], 1);
+ }
+ 
+-static int rtl9300_i2c_config_io(struct rtl9300_i2c *i2c, struct rtl9300_i2c_chan *chan)
++static int rtl9300_i2c_config_chan(struct rtl9300_i2c *i2c, struct rtl9300_i2c_chan *chan)
+ {
+ 	struct rtl9300_i2c_drv_data *drv_data;
+ 	int ret;
+ 
+-	drv_data = (struct rtl9300_i2c_drv_data *)device_get_match_data(i2c->dev);
++	if (i2c->sda_num == chan->sda_num)
++		return 0;
+ 
+-	ret = regmap_field_update_bits(i2c->fields[F_SDA_SEL], BIT(chan->sda_num),
+-				       BIT(chan->sda_num));
++	ret = regmap_field_write(i2c->fields[F_SCL_FREQ], chan->bus_freq);
+ 	if (ret)
+ 		return ret;
+ 
+-	ret = regmap_field_write(i2c->fields[F_SDA_OUT_SEL], chan->sda_num);
++	drv_data = (struct rtl9300_i2c_drv_data *)device_get_match_data(i2c->dev);
++	ret = drv_data->select_scl(i2c, 0);
+ 	if (ret)
+ 		return ret;
+ 
+-	ret = regmap_field_write(i2c->fields[F_SCL_FREQ], chan->bus_freq);
++	ret = regmap_field_update_bits(i2c->fields[F_SDA_SEL], BIT(chan->sda_num),
++				       BIT(chan->sda_num));
+ 	if (ret)
+ 		return ret;
+ 
+-	return drv_data->select_scl(i2c, 0);
+-}
+-
+-static int rtl9300_i2c_config_xfer(struct rtl9300_i2c *i2c, struct rtl9300_i2c_chan *chan,
+-				   u16 addr, u16 len)
+-{
+-	int ret;
+-
+-	if (len < 1 || len > 16)
+-		return -EINVAL;
+-
+-	ret = regmap_field_write(i2c->fields[F_DEV_ADDR], addr);
++	ret = regmap_field_write(i2c->fields[F_SDA_OUT_SEL], chan->sda_num);
+ 	if (ret)
+ 		return ret;
+ 
+-	return regmap_field_write(i2c->fields[F_DATA_WIDTH], (len - 1) & 0xf);
++	i2c->sda_num = chan->sda_num;
++	return 0;
+ }
+ 
+-static int rtl9300_i2c_read(struct rtl9300_i2c *i2c, u8 *buf, int len)
++static int rtl9300_i2c_read(struct rtl9300_i2c *i2c, u8 *buf, u8 len)
+ {
+ 	u32 vals[4] = {};
+ 	int i, ret;
+@@ -153,7 +162,7 @@ static int rtl9300_i2c_read(struct rtl93
+ 	return 0;
+ }
+ 
+-static int rtl9300_i2c_write(struct rtl9300_i2c *i2c, u8 *buf, int len)
++static int rtl9300_i2c_write(struct rtl9300_i2c *i2c, u8 *buf, u8 len)
+ {
+ 	u32 vals[4] = {};
+ 	int i;
+@@ -176,16 +185,51 @@ static int rtl9300_i2c_writel(struct rtl
+ 	return regmap_write(i2c->regmap, i2c->data_reg, data);
+ }
+ 
+-static int rtl9300_i2c_execute_xfer(struct rtl9300_i2c *i2c, char read_write,
+-				    int size, union i2c_smbus_data *data, int len)
++static int rtl9300_i2c_prepare_xfer(struct rtl9300_i2c *i2c, struct rtl9300_i2c_xfer *xfer)
+ {
+-	u32 val;
+ 	int ret;
+ 
+-	ret = regmap_field_write(i2c->fields[F_RWOP], read_write == I2C_SMBUS_WRITE);
++	if (xfer->data_len < 1 || xfer->data_len > 16)
++		return -EINVAL;
++
++	ret = regmap_field_write(i2c->fields[F_DEV_ADDR], xfer->dev_addr);
+ 	if (ret)
+ 		return ret;
+ 
++	ret = rtl9300_i2c_reg_addr_set(i2c, xfer->reg_addr, xfer->reg_addr_len);
++	if (ret)
++		return ret;
++
++	ret = regmap_field_write(i2c->fields[F_RWOP], xfer->write);
++	if (ret)
++		return ret;
++
++	ret = regmap_field_write(i2c->fields[F_DATA_WIDTH], (xfer->data_len - 1) & 0xf);
++	if (ret)
++		return ret;
++
++	if (xfer->write) {
++		switch (xfer->type) {
++		case RTL9300_I2C_XFER_BYTE:
++			ret = rtl9300_i2c_writel(i2c, *xfer->data);
++			break;
++		case RTL9300_I2C_XFER_WORD:
++			ret = rtl9300_i2c_writel(i2c, get_unaligned((const u16 *)xfer->data));
++			break;
++		default:
++			ret = rtl9300_i2c_write(i2c, xfer->data, xfer->data_len);
++			break;
++		}
++	}
++
++	return ret;
++}
++
++static int rtl9300_i2c_do_xfer(struct rtl9300_i2c *i2c, struct rtl9300_i2c_xfer *xfer)
++{
++	u32 val;
++	int ret;
++
+ 	ret = regmap_field_write(i2c->fields[F_I2C_TRIG], 1);
+ 	if (ret)
+ 		return ret;
+@@ -200,28 +244,24 @@ static int rtl9300_i2c_execute_xfer(stru
+ 	if (val)
+ 		return -EIO;
+ 
+-	if (read_write == I2C_SMBUS_READ) {
+-		switch (size) {
+-		case I2C_SMBUS_BYTE:
+-		case I2C_SMBUS_BYTE_DATA:
++	if (!xfer->write) {
++		switch (xfer->type) {
++		case RTL9300_I2C_XFER_BYTE:
+ 			ret = regmap_read(i2c->regmap, i2c->data_reg, &val);
+ 			if (ret)
+ 				return ret;
+-			data->byte = val & 0xff;
++
++			*xfer->data = val & 0xff;
+ 			break;
+-		case I2C_SMBUS_WORD_DATA:
++		case RTL9300_I2C_XFER_WORD:
+ 			ret = regmap_read(i2c->regmap, i2c->data_reg, &val);
+ 			if (ret)
+ 				return ret;
+-			data->word = val & 0xffff;
+-			break;
+-		case I2C_SMBUS_I2C_BLOCK_DATA:
+-			ret = rtl9300_i2c_read(i2c, &data->block[1], len);
+-			if (ret)
+-				return ret;
++
++			put_unaligned(val & 0xffff, (u16*)xfer->data);
+ 			break;
+ 		default:
+-			ret = rtl9300_i2c_read(i2c, &data->block[0], len);
++			ret = rtl9300_i2c_read(i2c, xfer->data, xfer->data_len);
+ 			if (ret)
+ 				return ret;
+ 			break;
+@@ -237,108 +277,62 @@ static int rtl9300_i2c_smbus_xfer(struct
+ {
+ 	struct rtl9300_i2c_chan *chan = i2c_get_adapdata(adap);
+ 	struct rtl9300_i2c *i2c = chan->i2c;
+-	int len = 0, ret;
++	struct rtl9300_i2c_xfer xfer = {0};
++	int ret;
++
++	if (addr > 0x7f)
++		return -EINVAL;
+ 
+ 	mutex_lock(&i2c->lock);
+-	if (chan->sda_num != i2c->sda_num) {
+-		ret = rtl9300_i2c_config_io(i2c, chan);
+-		if (ret)
+-			goto out_unlock;
+-		i2c->sda_num = chan->sda_num;
+-	}
++
++	ret = rtl9300_i2c_config_chan(i2c, chan);
++	if (ret)
++		goto out_unlock;
++
++	xfer.dev_addr = addr & 0x7f;
++	xfer.write = (read_write == I2C_SMBUS_WRITE);
++	xfer.reg_addr = command;
++	xfer.reg_addr_len = 1;
+ 
+ 	switch (size) {
+ 	case I2C_SMBUS_BYTE:
+-		if (read_write == I2C_SMBUS_WRITE) {
+-			ret = rtl9300_i2c_config_xfer(i2c, chan, addr, 0);
+-			if (ret)
+-				goto out_unlock;
+-			ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
+-			if (ret)
+-				goto out_unlock;
+-		} else {
+-			ret = rtl9300_i2c_config_xfer(i2c, chan, addr, 1);
+-			if (ret)
+-				goto out_unlock;
+-			ret = rtl9300_i2c_reg_addr_set(i2c, 0, 0);
+-			if (ret)
+-				goto out_unlock;
+-		}
++		xfer.data = (read_write == I2C_SMBUS_READ) ? &data->byte : &command;
++		xfer.data_len = 1;
++		xfer.reg_addr = 0;
++		xfer.reg_addr_len = 0;
++		xfer.type = RTL9300_I2C_XFER_BYTE;
+ 		break;
+-
+ 	case I2C_SMBUS_BYTE_DATA:
+-		ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
+-		if (ret)
+-			goto out_unlock;
+-		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, 1);
+-		if (ret)
+-			goto out_unlock;
+-		if (read_write == I2C_SMBUS_WRITE) {
+-			ret = rtl9300_i2c_writel(i2c, data->byte);
+-			if (ret)
+-				goto out_unlock;
+-		}
++		xfer.data = &data->byte;
++		xfer.data_len = 1;
++		xfer.type = RTL9300_I2C_XFER_BYTE;
+ 		break;
+-
+ 	case I2C_SMBUS_WORD_DATA:
+-		ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
+-		if (ret)
+-			goto out_unlock;
+-		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, 2);
+-		if (ret)
+-			goto out_unlock;
+-		if (read_write == I2C_SMBUS_WRITE) {
+-			ret = rtl9300_i2c_writel(i2c, data->word);
+-			if (ret)
+-				goto out_unlock;
+-		}
++		xfer.data = (u8 *)&data->word;
++		xfer.data_len = 2;
++		xfer.type = RTL9300_I2C_XFER_WORD;
+ 		break;
+-
+ 	case I2C_SMBUS_BLOCK_DATA:
+-		ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
+-		if (ret)
+-			goto out_unlock;
+-		if (data->block[0] < 1 || data->block[0] > I2C_SMBUS_BLOCK_MAX) {
+-			ret = -EINVAL;
+-			goto out_unlock;
+-		}
+-		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, data->block[0] + 1);
+-		if (ret)
+-			goto out_unlock;
+-		if (read_write == I2C_SMBUS_WRITE) {
+-			ret = rtl9300_i2c_write(i2c, &data->block[0], data->block[0] + 1);
+-			if (ret)
+-				goto out_unlock;
+-		}
+-		len = data->block[0] + 1;
++		xfer.data = &data->block[0];
++		xfer.data_len = data->block[0] + 1;
++		xfer.type = RTL9300_I2C_XFER_BLOCK;
+ 		break;
+-
+ 	case I2C_SMBUS_I2C_BLOCK_DATA:
+-		ret = rtl9300_i2c_reg_addr_set(i2c, command, 1);
+-		if (ret)
+-			goto out_unlock;
+-		if (data->block[0] < 1 || data->block[0] > I2C_SMBUS_BLOCK_MAX) {
+-			ret = -EINVAL;
+-			goto out_unlock;
+-		}
+-		ret = rtl9300_i2c_config_xfer(i2c, chan, addr, data->block[0]);
+-		if (ret)
+-			goto out_unlock;
+-		if (read_write == I2C_SMBUS_WRITE) {
+-			ret = rtl9300_i2c_write(i2c, &data->block[1], data->block[0]);
+-			if (ret)
+-				goto out_unlock;
+-		}
+-		len = data->block[0];
++		xfer.data = &data->block[1];
++		xfer.data_len = data->block[0];
++		xfer.type = RTL9300_I2C_XFER_BLOCK;
+ 		break;
+-
+ 	default:
+ 		dev_err(&adap->dev, "Unsupported transaction %d\n", size);
+ 		ret = -EOPNOTSUPP;
+ 		goto out_unlock;
+ 	}
+ 
+-	ret = rtl9300_i2c_execute_xfer(i2c, read_write, size, data, len);
++	ret = rtl9300_i2c_prepare_xfer(i2c, &xfer);
++	if (ret)
++		goto out_unlock;
++
++	ret = rtl9300_i2c_do_xfer(i2c, &xfer);
+ 
+ out_unlock:
+ 	mutex_unlock(&i2c->lock);
diff --git a/target/linux/realtek/patches-6.12/101-10-dt-bindings-i2c-realtek-rtl9301-i2c-extend-for-RT.patch b/target/linux/realtek/patches-6.12/101-10-dt-bindings-i2c-realtek-rtl9301-i2c-extend-for-RT.patch
new file mode 100644
index 0000000000..03dea2c088
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/101-10-dt-bindings-i2c-realtek-rtl9301-i2c-extend-for-RT.patch
@@ -0,0 +1,93 @@
+From f891af341e32c8a2f2d2d25dd3c424ff47147a31 Mon Sep 17 00:00:00 2001
+From: Jonas Jelonek <jelonek.jonas at gmail.com>
+Date: Mon, 4 Aug 2025 10:39:39 +0000
+Subject: [PATCH v5 10/11] dt-bindings: i2c: realtek,rtl9301-i2c: extend for
+ RTL9310 support
+
+Adjust the regex for child-node address to account for the fact that
+RTL9310 supports 12 instead of only 8 SDA lines. Also, narrow this per
+variant.
+
+Add a vendor-specific property to explicitly specify the
+Realtek-internal ID of the defined I2C controller/master. This is
+required, in particular for RTL9310, to describe the correct I2C
+master. Require this property for RTL9310.
+
+Add compatibles for known SoC variants RTL9311, RTL9312 and RTL9313.
+
+Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
+Link: https://lore.kernel.org/linux-i2c/20250809220713.1038947-11-jelonek.jonas at gmail.com/
+---
+ .../bindings/i2c/realtek,rtl9301-i2c.yaml     | 39 ++++++++++++++++++-
+ 1 file changed, 37 insertions(+), 2 deletions(-)
+
+--- a/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
++++ b/Documentation/devicetree/bindings/i2c/realtek,rtl9301-i2c.yaml
+@@ -13,6 +13,8 @@ description:
+   RTL9300 SoCs have two I2C controllers. Each of these has an SCL line (which
+   if not-used for SCL can be a GPIO). There are 8 common SDA lines that can be
+   assigned to either I2C controller.
++  RTL9310 SoCs have equal capabilities but support 12 common SDA lines which
++  can be assigned to either I2C controller.
+ 
+ properties:
+   compatible:
+@@ -23,7 +25,15 @@ properties:
+               - realtek,rtl9302c-i2c
+               - realtek,rtl9303-i2c
+           - const: realtek,rtl9301-i2c
+-      - const: realtek,rtl9301-i2c
++      - items:
++          - enum:
++              - realtek,rtl9311-i2c
++              - realtek,rtl9312-i2c
++              - realtek,rtl9313-i2c
++          - const: realtek,rtl9310-i2c
++      - enum:
++          - realtek,rtl9301-i2c
++          - realtek,rtl9310-i2c
+ 
+   reg:
+     items:
+@@ -35,8 +45,14 @@ properties:
+   "#size-cells":
+     const: 0
+ 
++  realtek,scl:
++    $ref: /schemas/types.yaml#/definitions/uint32
++    description:
++      The SCL line number of this I2C controller.
++    enum: [ 0, 1 ]
++
+ patternProperties:
+-  '^i2c@[0-7]$':
++  '^i2c@[0-9ab]$':
+     $ref: /schemas/i2c/i2c-controller.yaml
+     unevaluatedProperties: false
+ 
+@@ -48,6 +64,25 @@ patternProperties:
+     required:
+       - reg
+ 
++
++allOf:
++  - if:
++      properties:
++        compatible:
++          contains:
++            const: realtek,rtl9310-i2c
++    then:
++      required:
++        - realtek,scl
++  - if:
++      properties:
++        compatible:
++          contains:
++            const: realtek,rtl9301-i2c
++    then:
++      patternProperties:
++        '^i2c@[89ab]$': false
++
+ required:
+   - compatible
+   - reg
diff --git a/target/linux/realtek/patches-6.12/101-11-i2c-rtl9300-add-support-for-RTL9310-I2C-controlle.patch b/target/linux/realtek/patches-6.12/101-11-i2c-rtl9300-add-support-for-RTL9310-I2C-controlle.patch
new file mode 100644
index 0000000000..bf170fad85
--- /dev/null
+++ b/target/linux/realtek/patches-6.12/101-11-i2c-rtl9300-add-support-for-RTL9310-I2C-controlle.patch
@@ -0,0 +1,123 @@
+From ceddd84c5f73b17a1d8b9a760d9d5b5b7f0f0519 Mon Sep 17 00:00:00 2001
+From: Jonas Jelonek <jelonek.jonas at gmail.com>
+Date: Mon, 30 Jun 2025 17:02:32 +0000
+Subject: [PATCH v5 11/11] i2c: rtl9300: add support for RTL9310 I2C controller
+
+Add support for the internal I2C controllers of RTL9310 series based
+SoCs to the driver for RTL9300. Add register definitions, chip-specific
+functions and compatible strings for known RTL9310-based SoCs RTL9311,
+RTL9312 and RTL9313.
+
+Make use of a new device tree property 'realtek,scl' which needs to be
+specified in case both or only the second master is used. This is
+required due how the register layout changed in contrast to RTL9300,
+which has SCL selection in a global register instead of a
+master-specific one.
+
+Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
+Link: https://lore.kernel.org/linux-i2c/20250809220713.1038947-12-jelonek.jonas at gmail.com/
+---
+ drivers/i2c/busses/i2c-rtl9300.c | 44 ++++++++++++++++++++++++++++++--
+ 1 file changed, 42 insertions(+), 2 deletions(-)
+
+--- a/drivers/i2c/busses/i2c-rtl9300.c
++++ b/drivers/i2c/busses/i2c-rtl9300.c
+@@ -60,14 +60,16 @@ struct rtl9300_i2c_drv_data {
+ };
+ 
+ #define RTL9300_I2C_MUX_NCHAN	8
++#define RTL9310_I2C_MUX_NCHAN	12
+ 
+ struct rtl9300_i2c {
+ 	struct regmap *regmap;
+ 	struct device *dev;
+-	struct rtl9300_i2c_chan chans[RTL9300_I2C_MUX_NCHAN];
++	struct rtl9300_i2c_chan chans[RTL9310_I2C_MUX_NCHAN];
+ 	struct regmap_field *fields[F_NUM_FIELDS];
+ 	u32 reg_base;
+ 	u32 data_reg;
++	u8 scl_num;
+ 	u8 sda_num;
+ 	struct mutex lock;
+ };
+@@ -96,6 +98,12 @@ struct rtl9300_i2c_xfer {
+ #define RTL9300_I2C_MST_DATA_WORD3			0x14
+ #define RTL9300_I2C_MST_GLB_CTRL			0x384
+ 
++#define RTL9310_I2C_MST_IF_CTRL				0x1004
++#define	RTL9310_I2C_MST_IF_SEL				0x1008
++#define	RTL9310_I2C_MST_CTRL				0x0
++#define	RTL9310_I2C_MST_MEMADDR_CTRL			0x4
++#define RTL9310_I2C_MST_DATA_CTRL			0x8
++
+ static int rtl9300_i2c_reg_addr_set(struct rtl9300_i2c *i2c, u32 reg, u16 len)
+ {
+ 	int ret;
+@@ -112,6 +120,11 @@ static int rtl9300_i2c_select_scl(struct
+ 	return regmap_field_write(i2c->fields[F_SCL_SEL], 1);
+ }
+ 
++static int rtl9310_i2c_select_scl(struct rtl9300_i2c *i2c, u8 scl)
++{
++	return regmap_field_update_bits(i2c->fields[F_SCL_SEL], BIT(scl), BIT(scl));
++}
++
+ static int rtl9300_i2c_config_chan(struct rtl9300_i2c *i2c, struct rtl9300_i2c_chan *chan)
+ {
+ 	struct rtl9300_i2c_drv_data *drv_data;
+@@ -125,7 +138,7 @@ static int rtl9300_i2c_config_chan(struc
+ 		return ret;
+ 
+ 	drv_data = (struct rtl9300_i2c_drv_data *)device_get_match_data(i2c->dev);
+-	ret = drv_data->select_scl(i2c, 0);
++	ret = drv_data->select_scl(i2c, i2c->scl_num);
+ 	if (ret)
+ 		return ret;
+ 
+@@ -383,6 +396,10 @@ static int rtl9300_i2c_probe(struct plat
+ 	if (ret)
+ 		return ret;
+ 
++	ret = device_property_read_u8(dev, "realtek,scl", &i2c->scl_num);
++	if (ret || i2c->scl_num != 1)
++		i2c->scl_num = 0;
++
+ 	platform_set_drvdata(pdev, i2c);
+ 
+ 	drv_data = (struct rtl9300_i2c_drv_data *)device_get_match_data(i2c->dev);
+@@ -478,12 +495,35 @@ static const struct rtl9300_i2c_drv_data
+ 	.max_nchan = RTL9300_I2C_MUX_NCHAN,
+ };
+ 
++static const struct rtl9300_i2c_drv_data rtl9310_i2c_drv_data = {
++	.field_desc = {
++		[F_SCL_SEL]		= GLB_REG_FIELD(RTL9310_I2C_MST_IF_SEL, 12, 13),
++		[F_SDA_SEL]		= GLB_REG_FIELD(RTL9310_I2C_MST_IF_SEL, 0, 11),
++		[F_SCL_FREQ]		= MST_REG_FIELD(RTL9310_I2C_MST_CTRL, 30, 31),
++		[F_DEV_ADDR]		= MST_REG_FIELD(RTL9310_I2C_MST_CTRL, 11, 17),
++		[F_SDA_OUT_SEL]		= MST_REG_FIELD(RTL9310_I2C_MST_CTRL, 18, 21),
++		[F_MEM_ADDR_WIDTH]	= MST_REG_FIELD(RTL9310_I2C_MST_CTRL, 9, 10),
++		[F_DATA_WIDTH]		= MST_REG_FIELD(RTL9310_I2C_MST_CTRL, 5, 8),
++		[F_RD_MODE]		= MST_REG_FIELD(RTL9310_I2C_MST_CTRL, 4, 4),
++		[F_RWOP]		= MST_REG_FIELD(RTL9310_I2C_MST_CTRL, 2, 2),
++		[F_I2C_FAIL]		= MST_REG_FIELD(RTL9310_I2C_MST_CTRL, 1, 1),
++		[F_I2C_TRIG]		= MST_REG_FIELD(RTL9310_I2C_MST_CTRL, 0, 0),
++		[F_MEM_ADDR]		= MST_REG_FIELD(RTL9310_I2C_MST_MEMADDR_CTRL, 0, 23),
++	},
++	.select_scl = rtl9310_i2c_select_scl,
++	.data_reg = RTL9310_I2C_MST_DATA_CTRL,
++	.max_nchan = RTL9310_I2C_MUX_NCHAN,
++};
+ 
+ static const struct of_device_id i2c_rtl9300_dt_ids[] = {
+ 	{ .compatible = "realtek,rtl9301-i2c", .data = (void *) &rtl9300_i2c_drv_data },
+ 	{ .compatible = "realtek,rtl9302b-i2c", .data = (void *) &rtl9300_i2c_drv_data },
+ 	{ .compatible = "realtek,rtl9302c-i2c", .data = (void *) &rtl9300_i2c_drv_data },
+ 	{ .compatible = "realtek,rtl9303-i2c", .data = (void *) &rtl9300_i2c_drv_data },
++	{ .compatible = "realtek,rtl9310-i2c", .data = (void *) &rtl9310_i2c_drv_data },
++	{ .compatible = "realtek,rtl9311-i2c", .data = (void *) &rtl9310_i2c_drv_data },
++	{ .compatible = "realtek,rtl9312-i2c", .data = (void *) &rtl9310_i2c_drv_data },
++	{ .compatible = "realtek,rtl9313-i2c", .data = (void *) &rtl9310_i2c_drv_data },
+ 	{}
+ };
+ MODULE_DEVICE_TABLE(of, i2c_rtl9300_dt_ids);



From lede-commits at lists.infradead.org  Wed Aug 13 08:08:51 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 13 Aug 2025 11:08:51 -0400
Subject: [openwrt/openwrt]  mt76: update to Git HEAD (2025-08-13)
In-Reply-To: <175509773130.977521.5156940832088261908@git-01.infra.openwrt.org>
References: <175509773130.977521.5156940832088261908@git-01.infra.openwrt.org>
Message-ID: <mailman.118999.1755099836.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4010984db9e63369dce50dd5fd34e9ad31f6f32d

commit 4010984db9e63369dce50dd5fd34e9ad31f6f32d
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Aug 13 17:08:27 2025 +0200

    mt76: update to Git HEAD (2025-08-13)
    
    00275548ba8f wifi: mt76: mt7996: Overwrite unspecified link_id in mt7996_tx()
    2601bb91e078 wifi: mt76: mt7996: Fix mt7996_mcu_sta_ba wcid configuration
    110ecc331123 wifi: mt76: mt7996: Fix mt7996_mcu_bss_mld_tlv routine
    449a1aca9f72 wifi: mt76: mt7996: Initialize hdr before passing to skb_put_data()
    1de707e73fc7 wifi: mt76: mt7921: don't disconnect when CSA to DFS chan
    fce683dbcfc9 wifi: mt76: mt7925: fix locking in mt7925_change_vif_links()
    11f721bce235 wifi: mt76: mt7925: fix the wrong bss cleanup for SAP
    b3613d9a317d wifi: mt76: mt7996: Set def_wcid pointer in mt7996_mac_sta_init_link()
    d1a2900a390d wifi: mt76: mt7996: Set proper link destination address in mt7996_tx()
    56990ce9289a wifi: mt76: mt7925u: Add VID/PID for Netgear A9000
    e796542a0585 wifi: mt76: mt7925: add MBSSID support
    e35e4f8fcf8a wifi: mt76: fix potential memory leak in mt76_wmac_probe()
    aa2f13c3be79 wifi: mt76: mt7996: disable beacons when going offchannel
    630e166c958d wifi: mt76: prevent non-offchannel mgmt tx during scan/roc
    d3e7c2051aae wifi: mt76: mt7996: use the correct vif link for scanning/roc
    903a7e0ace79 wifi: mt76: mt7921: add MBSSID support
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/kernel/mt76/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index d55feab020..fa8e15a469 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2025-07-07
-PKG_SOURCE_VERSION:=32ca2b6db354db090eb306e9f5b85651e92dfa8b
-PKG_MIRROR_HASH:=01d3ec909e474f4ccdfdab6559c30c54d05abdd87db2e9fdadb548e09a3fec2a
+PKG_SOURCE_DATE:=2025-08-13
+PKG_SOURCE_VERSION:=903a7e0ace79dc9802b381fa05ecd2028122dd1b
+PKG_MIRROR_HASH:=fcff7a90c8745091b8113e7833dc1f25e2767ff76da1f7adad27bde225c834df
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0



From lede-commits at lists.infradead.org  Wed Aug 13 08:33:30 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 13 Aug 2025 11:33:30 -0400
Subject: [openwrt/openwrt]  mt76: update to Git HEAD (2025-08-13)
In-Reply-To: <175509921009.1051618.14250048868415316522@git-01.infra.openwrt.org>
References: <175509921009.1051618.14250048868415316522@git-01.infra.openwrt.org>
Message-ID: <mailman.119046.1755102699.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/faf168ffc9b805c9d3386d675c631ddbacb83eb2

commit faf168ffc9b805c9d3386d675c631ddbacb83eb2
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Aug 13 17:25:17 2025 +0200

    mt76: update to Git HEAD (2025-08-13)
    
    3e25f2bc33af wifi: mt76: mt7925: introduce MLO capability control
    ce3622257026 wifi: mt76: mt7925: fix fails to enter low power mode in suspend state
    dfdb8e975718 wifi: mt76: mt7915: fix possible integer overflows in mt7915_muru_stats_show()
    29f0ad5a439a wifi: mt76: mt7925: ensure wow pattern command align fw format
    5eab65bb5473 wifi: mt76: mt7925: fix country count limitation for CLC
    d6a197dbc9a2 wifi: mt76: Add check for devm_kstrdup()
    901492c4621a wifi: mt76: mt7925: Remove unnecessary if-check
    24062ce4fa0f wifi: mt76: mt7925: Simplify HIF suspend handling to avoid suspend fail
    56c0beddbed8 wifi: mt76: mt7921: fix kernel panic due to null pointer dereference
    11bacfcce3b9 Revert "wifi: mt76: mt7925: Update mt7925_mcu_uni_[tx,rx]_ba for MLO"
    2823c50b1c15 wifi: mt76: mt7925: fix the wrong link_idx when has p2p_device
    f54ff3cabab6 wifi: mt76: mt7925: fix the wrong simultaneous cap for MLO
    aa7d366ccf40 wifi: mt76: mt7925: adjust rm BSS flow to prevent next connection failure
    d25359e8bb83 wifi: mt76: mt7925: integrate *mlo_sta_cmd and *sta_cmd
    25a0285d8ee3 wifi: mt76: mt7925: update the power-saving flow
    5910f0806c05 wifi: mt76: mt7925: load the appropriate CLC data based on hardware type
    454a69cbb718 wifi: mt76: mt7925: add EHT control support based on the CLC data
    bdc09b8f2321 wifi: mt76: mt7925: update the channel usage when the regd domain changed
    772dcb4b4e61 wifi: mt76: mt7925: remove unused acpi function for clc
    b94b025490ef wifi: mt76: mt792x: extend MTCL of APCI to version3 for EHT control
    9ff2afce5fef wifi: mt76: mt7925: add MTCL support to enhance the regulatory compliance
    f11807364258 wifi: mt76: add mt76_get_power_bound helper function
    ffd1cbfc485e wifi: mt76: mt7921: fix returned txpower
    687e2fdfbf40 wifi: mt76: mt7925: fix returned txpower
    43aaa62fbc55 wifi: mt76: mt7915: cleanup mt7915_get_power_bound
    a4be3fc9ed4b wifi: mt76: mt7996: cleanup mt7996_get_power_bound
    0ba7a69f8927 wifi: mt76: move napi_enable() from under BH
    1b370c689a2f wifi: mt76: mt7921: avoid undesired changes of the preset regulatory domain
    e931cecc45de mt76: mt792x: fix unused variable warning
    539e7e711a15 Revert "wifi: mt76: mt7925: fix returned txpower"
    67c724cc60b1 Revert "wifi: mt76: mt7921: fix returned txpower"
    52f51a398e7e wifi: mt76: mt7996: Add change_vif_links stub
    b3b61abd733f wifi: mt76: mt7996: Introduce mt7996_sta_link container
    915938e83c35 wifi: mt76: mt7996: Add mt7996_sta_link struct in mt7996_vif_link
    3e06380a43a4 wifi: mt76: mt7996: Add vif_cfg_changed callback
    f419c62e9198 wifi: mt76: mt7996: Add link_info_changed callback
    3082c9edbe35 wifi: mt76: mt7996: Add mt7996_sta_state routine
    46e20e5d7455 wifi: mt76: mt7996: Rely on mt7996_sta_link in sta_add/sta_remove callbacks
    1de180821525 wifi: mt76: mt7996: Add mt7996_mac_sta_change_links callback
    2efb26f1fc10 wifi: mt76: mt7996: Support MLO in mt7996_mac_sta_event()
    2e249744bc12 wifi: mt76: Check link_conf pointer in mt76_connac_mcu_sta_basic_tlv()
    0eee20d3e388 wifi: mt76: mt7996: Update mt7996_mcu_add_sta to MLO support
    200ce414fe61 wifi: mt76: mt7996: Rely on mt7996_vif_link in mt7996_mcu_twt_agrt_update signature
    d195324131ba wifi: mt76: mt7996: Rely on mt7996_vif/sta_link in twt teardown
    7757e7c140f7 wifi: mac80211: call rate_control_rate_update() for link STA
    a3b651aeb551 wifi: mt76: mt7996: Update mt7996_mcu_add_rate_ctrl to MLO
    2a005953dc49 wifi: mt76: mt7996: Add mt7996_mcu_sta_mld_setup_tlv() and mt7996_mcu_sta_eht_mld_tlv()
    58e8b71782fc wifi: mt76: mt7996: Add mt7996_mcu_teardown_mld_sta rouine
    e0b422f2acaf wifi: mt76: mt7996: rework mt7996_mac_write_txwi() for MLO support
    21aa0c288470 wifi: mt76: mt7996: Rely on wcid_to_sta in mt7996_mac_add_txs_skb()
    87c437fa8b43 wifi: mt76: mt7996: rework mt7996_rx_get_wcid to support MLO
    9b4de3ce7fc7 wifi: mt76: mt7996: rework mt7996_sta_set_4addr and mt7996_sta_set_decap_offload to support MLO
    a369b0c14d25 wifi: mt76: mt7996: Add mt7996_sta_link to mt7996_mcu_add_bss_info signature
    9c6ec015afbb wifi: mt76: mt7996: rework mt7996_set_hw_key to support MLO
    60967d28a5e0 wifi: mt76: mt7996: rework mt7996_sta_hw_queue_read to support MLO
    3668d57795e3 wifi: mt76: mt7996: remove mt7996_mac_enable_rtscts()
    275e6a681bac wifi: mt76: mt7996: rework mt7996_mac_sta_rc_work to support MLO
    057822770ca5 wifi: mt76: mt7996: rework mt7996_mac_sta_poll to support MLO
    b9682a51c109 wifi: mt76: mt7996: rework mt7996_update_mu_group to support MLO
    d1a5a0afa6d6 wifi: mt76: mt7996: rework mt7996_net_fill_forward_path to support MLO
    56529041b364 wifi: mt76: mt7996: rework mt7996_mcu_add_obss_spr to support MLO
    c788d5748dc8 wifi: mt76: mt7996: rework mt7996_mcu_beacon_inband_discov to support MLO
    974e6c2df98b wifi: mt76: mt7996: set vif default link_id adding/removing vif links
    70717b761af2 wifi: mt76: mt7996: rework set/get_tsf callabcks to support MLO
    d01b9d300eaa wifi: mt76: mt7996: rework mt7996_ampdu_action to support MLO
    d5cddf65f7a7 wifi: mt76: mt7996: Update mt7996_tx to MLO support
    a1ed21a66913 wifi: mt76: mt792x: re-register CHANCTX_STA_CSA only for the mt7921 series
    a826fc287483 wifi: mt76: mt7925: update MLO cleanup flow during disconnection
    0994f0af632e wifi: mt76: mt7925: fix the incomplete revert of [tx,rx]_ba for MLO
    5169d4e8669b wifi: mt76: mt76x2u: add TP-Link TL-WDN6200 ID to device table
    46f3a10a9f0f mt76: mt7925: sync with upstream cleanups
    de635e1e3adc wifi: mt76: mt7996: fix locking in mt7996_mac_sta_rc_work()
    63a4edf1cb74 wifi: mt76: mt7996: add macros for pci decive id
    a2dd2f7896f7 wifi: mt76: connac: add support to load firmware for mt7990
    3908cf04aa39 wifi: mt76: mt7996: rework WA mcu command for mt7990
    6243414a4e80 wifi: mt76: mt7996: rework DMA configuration for mt7990
    a8def214d736 wifi: mt76: mt7996: rework register mapping for mt7990
    51db7a2d57f6 wifi: mt76: mt7996: add eeprom support for mt7990
    d0799f3303e9 wifi: mt76: mt7996: adjust HW capabilities for mt7990
    10c3ea97a86d wifi: mt76: connac: rework TX descriptor and TX free for mt7990
    bc588ac3d104 wifi: mt76: mt7996: rework background radar check for mt7990
    f8c3dd3677dd wifi: mt76: mt7996: add PCI device id for mt7990
    3cec186474c4 wifi: mt76: mt7915: set correct background radar capability
    9bacdb2bf2c3 wifi: mt76: mt7915: rework radar HWRDD idx
    a19543c7e05e wifi: mt76: mt7996: rework radar HWRDD idx
    b0cf33e76a3a wifi: mt76: mt7925: Fix logical vs bitwise typo
    0433adc883c9 wifi: mt76: mt7925: add EHT preamble puncturing
    be28ef77e330 wifi: mt76: mt7996: Add NULL check in mt7996_thermal_init
    55218e636092 Revert "wifi: mt76: mt7996: fill txd by host driver"
    fdfe9eca6401 wifi: mt76: disable napi on driver removal
    d7a070e11de4 wifi: mt76: mt7925: fix missing hdr_trans_tlv command for broadcast wtbl
    29363a669195 wifi: mt76: mt7996: prevent uninit return in mt7996_mac_sta_add_links
    e285cb42be03 wifi: mt76: Remove an unneeded local variable in mt76x02_dma_init()
    3dee73c357cf wifi: mt76x2: Add support for LiteOn WN4516R,WN4519R
    73f9582f92b6 wifi: mt76: mt7925: introduce thermal protection
    cf8522c5eea8 wifi: mt76: mt7925: fix host interrupt register initialization
    8a24527e6c63 wifi: mt76: mt7921: add 160 MHz AP for mt7922 device
    d0ef73122e8b wifi: mt76: mt7996: avoid NULL pointer dereference in mt7996_set_monitor()
    7fdbe4cb5c8d wifi: mt76: mt7996: avoid null deref in mt7996_stop_phy()
    925d156dab3d wifi: mt76: mt7996: fix uninitialized symbol warning
    a403590fd464 Revert "wifi: mt76: Check link_conf pointer in mt76_connac_mcu_sta_basic_tlv()"
    ca76c1bcede4 wifi: mt76: mt7996: remove duplicate check in mt7996_mcu_sta_mld_setup_tlv()
    b70a4a619538 wifi: mt76: scan: Fix 'mlink' dereferenced before IS_ERR_OR_NULL check
    2247afffc734 wifi: mt76: add mt76_connac_mcu_build_rnr_scan_param routine
    460aa7da0ef6 wifi: mt76: mt7925: add RNR scan support for 6GHz
    a68584ddf98e wifi: mt76: mt7996: Fix null-ptr-deref in mt7996_mmio_wed_init()
    025c1d19b55a wifi: mt76: mt7915: Fix null-ptr-deref in mt7915_mmio_wed_init()
    c20015bdc88b wifi: mt76: mt7925: prevent multiple scan commands
    832387a1f876 wifi: mt76: mt7925: refine the sniffer commnad
    7bf6a2914a54 wifi: mt76: mt7925: ensure all MCU commands wait for response
    1bd4dbd48281 wifi: mt76: mt7925: extend MCU support for testmode
    0ca6ed4e2724 wifi: mt76: mt7925: add test mode support
    a2838480f805 wifi: mt76: remove capability of partial bandwidth UL MU-MIMO
    1865f5ea80ea wifi: mt76: mt7996: fix beamformee SS field
    3bda39f1465e wifi: mt76: mt7996: set EHT max ampdu length capability
    7d30840e5b21 wifi: mt76: mt7996: drop fragments with multicast or broadcast RA
    bf22595a1d8a wifi: mt76: mt7996: fix invalid NSS setting when TX path differs from NSS
    b9f01d7c368c wifi: mt76: mt7996: change max beacon size
    8808d7c4eed7 wifi: mt76: mt7996: fix RX buffer size of MCU event
    36e0b90e47ff wifi: mt76: fix available_antennas setting
    da2c23bec426 wifi: mt76: support power delta calculation for 5 TX paths
    3e161d0cf3c7 wifi: mt76: mt7925: add rfkill_poll for hardware rfkill
    ee6dac9b6b76 wifi: mt76: mt7915: mcu: increase eeprom command timeout
    0534761b76e1 wifi: mt76: mt7915: mcu: lower default timeout
    79dd14f2e816 wifi: mt76: mt7915: mcu: re-init MCU before loading FW patch
    f2943046881d wifi: mt76: Assume __mt76_connac_mcu_alloc_sta_req runs in atomic context
    656eb209ec42 wifi: mt76: Move RCU section in mt7996_mcu_set_fixed_field()
    4f47d90943a3 wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl_fixed()
    189532e383c1 wifi: mt76: Move RCU section in mt7996_mcu_add_rate_ctrl()
    5603bd03d56a wifi: mt76: Remove RCU section in mt7996_mac_sta_rc_work()
    ca24f0794e94 wifi: mt76: mt7925: fix the wrong config for tx interrupt
    63f18baa5bb6 wifi: mt76: mt7925: fix invalid array index in ssid assignment during hw scan
    4bdc4c5f26e0 wifi: mt76: mt7925: fix incorrect scan probe IE handling for hw_scan
    321ae47a7439 wifi: mt76: mt7925: fix off by one in mt7925_mcu_hw_scan()
    3699df4e85ec wifi: mt76: mt7925: prevent NULL pointer dereference in mt7925_sta_set_decap_offload()
    a17fbd3d8598 wifi: mt76: mt7921: prevent decap offload config before STA initialization
    6df761e0e6c7 mt76: fix signature of platform_driver remove funtions for newer kernels
    5724be1a6b12 wifi: mt76: Replace strlcpy() with strscpy()
    c4a114e2b8c9 wifi: mt76: fix queue assignment for deauth packets
    243e572d89fc wifi: mt76: add a wrapper for wcid access with validation
    e41c7785589f wifi: mac80211: get tx power per link
    d70f62b8f1c7 wifi: mt76: fix vif link allocation
    7b3cd3274a24 wifi: mt76: mt7996: Fix secondary link lookup in mt7996_mcu_sta_mld_setup_tlv()
    cf89b6218043 wifi: mt76: mt7996: Rely on for_each_sta_active_link() in mt7996_mcu_sta_mld_setup_tlv()
    d71108eedab1 wifi: mt76: mt7996: Do not set wcid.sta to 1 in mt7996_mac_sta_event()
    32f8c5849ed1 wifi: mt76: mt7996: Fix mlink lookup in mt7996_tx_prepare_skb
    ffff9f71e29d wifi: mt76: mt7996: Fix possible OOB access in mt7996_tx()
    afe63e758196 wifi: mt76: mt7996: Fix valid_links bitmask in mt7996_mac_sta_{add,remove}
    68dd28b99dad wifi: mt76: mt7996: Add MLO support to mt7996_tx_check_aggr()
    293778652452 wifi: mt76: mt7996: Move num_sta accounting in mt7996_mac_sta_{add,remove}_links
    a94166b21e20 wifi: mt76: Get rid of dma_sync_single_for_device() for MMIO devices
    87873d854e51 wifi: mt76: mt7925: Fix null-ptr-deref in mt7925_thermal_init()
    06ba3d5e91f4 wifi: mt76: mt792x: Limit the concurrent STA and SoftAP to operate on the same channel
    b9f4e0df317d wifi: mt76: mt792x: improve monitor interface handling
    ec95319fd3fb wifi: mt76: mt7921s: Introduce SDIO WiFi/BT combo module card reset
    dd2d862251cb firmware: add missing mt7990 eeprom files
    05eaa56bc7a4 firmware: update mt7992 firmware to 20250328
    32ca2b6db354 firmware: update mt7996 firmware to 20250328
    00275548ba8f wifi: mt76: mt7996: Overwrite unspecified link_id in mt7996_tx()
    2601bb91e078 wifi: mt76: mt7996: Fix mt7996_mcu_sta_ba wcid configuration
    110ecc331123 wifi: mt76: mt7996: Fix mt7996_mcu_bss_mld_tlv routine
    449a1aca9f72 wifi: mt76: mt7996: Initialize hdr before passing to skb_put_data()
    1de707e73fc7 wifi: mt76: mt7921: don't disconnect when CSA to DFS chan
    fce683dbcfc9 wifi: mt76: mt7925: fix locking in mt7925_change_vif_links()
    11f721bce235 wifi: mt76: mt7925: fix the wrong bss cleanup for SAP
    b3613d9a317d wifi: mt76: mt7996: Set def_wcid pointer in mt7996_mac_sta_init_link()
    d1a2900a390d wifi: mt76: mt7996: Set proper link destination address in mt7996_tx()
    56990ce9289a wifi: mt76: mt7925u: Add VID/PID for Netgear A9000
    e796542a0585 wifi: mt76: mt7925: add MBSSID support
    e35e4f8fcf8a wifi: mt76: fix potential memory leak in mt76_wmac_probe()
    aa2f13c3be79 wifi: mt76: mt7996: disable beacons when going offchannel
    630e166c958d wifi: mt76: prevent non-offchannel mgmt tx during scan/roc
    d3e7c2051aae wifi: mt76: mt7996: use the correct vif link for scanning/roc
    903a7e0ace79 wifi: mt76: mt7921: add MBSSID support
    
    Sync with commit 4010984db9e63369dce50dd5fd34e9ad31f6f32d
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/kernel/mt76/Makefile                       |  6 +-
 package/kernel/mt76/patches/100-api_compat.patch   | 84 ++++++++++++++++++++++
 ...t7915_mcu_increase_eeprom_command_timeout.patch | 29 --------
 ...ifi_mt76_mt7915_mcu_lower_default_timeout.patch | 29 --------
 ..._mt7915_mcu_re-init_MCU_before_loading_FW.patch | 56 ---------------
 5 files changed, 87 insertions(+), 117 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index ca7fe6c159..026218e478 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2025-02-14
-PKG_SOURCE_VERSION:=e5fef138524e63314cb96ff8314048d175294e95
-PKG_MIRROR_HASH:=4d6ea8669b3034c97f5b341a5473facf4fe21262a2fde71257b57c4d1c86be5e
+PKG_SOURCE_DATE:=2025-08-13
+PKG_SOURCE_VERSION:=903a7e0ace79dc9802b381fa05ecd2028122dd1b
+PKG_MIRROR_HASH:=fcff7a90c8745091b8113e7833dc1f25e2767ff76da1f7adad27bde225c834df
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0
diff --git a/package/kernel/mt76/patches/100-api_compat.patch b/package/kernel/mt76/patches/100-api_compat.patch
new file mode 100644
index 0000000000..3dd4e1f799
--- /dev/null
+++ b/package/kernel/mt76/patches/100-api_compat.patch
@@ -0,0 +1,84 @@
+--- a/mt7915/main.c
++++ b/mt7915/main.c
+@@ -1224,10 +1224,9 @@ static void mt7915_sta_rc_work(void *dat
+ 
+ static void mt7915_sta_rc_update(struct ieee80211_hw *hw,
+ 				 struct ieee80211_vif *vif,
+-				 struct ieee80211_link_sta *link_sta,
++				 struct ieee80211_sta *sta,
+ 				 u32 changed)
+ {
+-	struct ieee80211_sta *sta = link_sta->sta;
+ 	struct mt7915_phy *phy = mt7915_hw_phy(hw);
+ 	struct mt7915_dev *dev = phy->dev;
+ 	struct mt7915_sta *msta = (struct mt7915_sta *)sta->drv_priv;
+@@ -1771,7 +1770,7 @@ const struct ieee80211_ops mt7915_ops =
+ 	.stop_ap = mt7915_stop_ap,
+ 	.sta_state = mt76_sta_state,
+ 	.sta_pre_rcu_remove = mt76_sta_pre_rcu_remove,
+-	.link_sta_rc_update = mt7915_sta_rc_update,
++	.sta_rc_update = mt7915_sta_rc_update,
+ 	.set_key = mt7915_set_key,
+ 	.ampdu_action = mt7915_ampdu_action,
+ 	.set_rts_threshold = mt7915_set_rts_threshold,
+--- a/mt7996/main.c
++++ b/mt7996/main.c
+@@ -715,8 +715,7 @@ static void mt7996_configure_filter(stru
+ }
+ 
+ static int
+-mt7996_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+-		   unsigned int link_id, int *dbm)
++mt7996_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif, int *dbm)
+ {
+ 	struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
+ 	struct mt7996_phy *phy = mt7996_vif_link_phy(&mvif->deflink);
+@@ -1714,13 +1713,12 @@ out:
+ 	rcu_read_unlock();
+ }
+ 
+-static void mt7996_link_sta_rc_update(struct ieee80211_hw *hw,
+-				      struct ieee80211_vif *vif,
+-				      struct ieee80211_link_sta *link_sta,
+-				      u32 changed)
++static void mt7996_sta_rc_update(struct ieee80211_hw *hw,
++				 struct ieee80211_vif *vif,
++				 struct ieee80211_sta *sta,
++				 u32 changed)
+ {
+ 	struct mt7996_dev *dev = mt7996_hw_dev(hw);
+-	struct ieee80211_sta *sta = link_sta->sta;
+ 
+ 	mt7996_link_rate_ctrl_update(&changed, sta);
+ 	ieee80211_queue_work(hw, &dev->rc_work);
+@@ -2213,7 +2211,7 @@ const struct ieee80211_ops mt7996_ops =
+ 	.link_info_changed = mt7996_link_info_changed,
+ 	.sta_state = mt7996_sta_state,
+ 	.sta_pre_rcu_remove = mt76_sta_pre_rcu_remove,
+-	.link_sta_rc_update = mt7996_link_sta_rc_update,
++	.sta_rc_update = mt7996_sta_rc_update,
+ 	.set_key = mt7996_set_key,
+ 	.ampdu_action = mt7996_ampdu_action,
+ 	.set_rts_threshold = mt7996_set_rts_threshold,
+--- a/mac80211.c
++++ b/mac80211.c
+@@ -1704,7 +1704,7 @@ s8 mt76_get_power_bound(struct mt76_phy
+ EXPORT_SYMBOL_GPL(mt76_get_power_bound);
+ 
+ int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+-		     unsigned int link_id, int *dbm)
++		     int *dbm)
+ {
+ 	struct mt76_phy *phy = mt76_vif_phy(hw, vif);
+ 	int n_chains, delta;
+--- a/mt76.h
++++ b/mt76.h
+@@ -1520,7 +1520,7 @@ int mt76_get_min_avg_rssi(struct mt76_de
+ s8 mt76_get_power_bound(struct mt76_phy *phy, s8 txpower);
+ 
+ int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+-		     unsigned int link_id, int *dbm);
++		     int *dbm);
+ int mt76_init_sar_power(struct ieee80211_hw *hw,
+ 			const struct cfg80211_sar_specs *sar);
+ int mt76_get_sar_power(struct mt76_phy *phy,
diff --git a/package/kernel/mt76/patches/200-wifi_mt76_mt7915_mcu_increase_eeprom_command_timeout.patch b/package/kernel/mt76/patches/200-wifi_mt76_mt7915_mcu_increase_eeprom_command_timeout.patch
deleted file mode 100644
index e618e536e6..0000000000
--- a/package/kernel/mt76/patches/200-wifi_mt76_mt7915_mcu_increase_eeprom_command_timeout.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From ee6dac9b6b765e8aab5727688463880c52f6193d Mon Sep 17 00:00:00 2001
-From: David Bauer <mail at david-bauer.net>
-Date: Wed, 2 Apr 2025 02:45:26 +0200
-Subject: [PATCH] wifi: mt76: mt7915: mcu: increase eeprom command timeout
-
-Increase the timeout for MCU_EXT_CMD_EFUSE_BUFFER_MODE command.
-
-Regular retries upon hardware-recovery have been observed. Increasing
-the timeout slightly remedies this problem.
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
-Link: https://patch.msgid.link/20250402004528.1036715-2-mail at david-bauer.net
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt7915/mcu.c | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/mt7915/mcu.c
-+++ b/mt7915/mcu.c
-@@ -208,6 +208,9 @@ mt7915_mcu_set_timeout(struct mt76_dev *
- 	case MCU_EXT_CMD_BSS_INFO_UPDATE:
- 		mdev->mcu.timeout = 2 * HZ;
- 		return;
-+	case MCU_EXT_CMD_EFUSE_BUFFER_MODE:
-+		mdev->mcu.timeout = 10 * HZ;
-+		return;
- 	default:
- 		break;
- 	}
diff --git a/package/kernel/mt76/patches/201-wifi_mt76_mt7915_mcu_lower_default_timeout.patch b/package/kernel/mt76/patches/201-wifi_mt76_mt7915_mcu_lower_default_timeout.patch
deleted file mode 100644
index a624fcfa0a..0000000000
--- a/package/kernel/mt76/patches/201-wifi_mt76_mt7915_mcu_lower_default_timeout.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 0534761b76e1b2e3390b345e524ce959f3fa50fb Mon Sep 17 00:00:00 2001
-From: David Bauer <mail at david-bauer.net>
-Date: Wed, 2 Apr 2025 02:45:25 +0200
-Subject: [PATCH] wifi: mt76: mt7915: mcu: lower default timeout
-
-The default timeout set in mt76_connac2_mcu_fill_message of 20 seconds
-leads to excessive stalling in case messages are lost.
-
-Testing showed that a smaller timeout of 5 seconds is sufficient in
-normal operation.
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
-Link: https://patch.msgid.link/20250402004528.1036715-1-mail at david-bauer.net
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt7915/mcu.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/mt7915/mcu.c
-+++ b/mt7915/mcu.c
-@@ -197,6 +197,8 @@ mt7915_mcu_parse_response(struct mt76_de
- static void
- mt7915_mcu_set_timeout(struct mt76_dev *mdev, int cmd)
- {
-+	mdev->mcu.timeout = 5 * HZ;
-+
- 	if ((cmd & __MCU_CMD_FIELD_ID) != MCU_CMD_EXT_CID)
- 		return;
- 
diff --git a/package/kernel/mt76/patches/202-wifi_mt76_mt7915_mcu_re-init_MCU_before_loading_FW.patch b/package/kernel/mt76/patches/202-wifi_mt76_mt7915_mcu_re-init_MCU_before_loading_FW.patch
deleted file mode 100644
index 76d005fc21..0000000000
--- a/package/kernel/mt76/patches/202-wifi_mt76_mt7915_mcu_re-init_MCU_before_loading_FW.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 79dd14f2e8161b656341b6653261779199aedbe4 Mon Sep 17 00:00:00 2001
-From: David Bauer <mail at david-bauer.net>
-Date: Wed, 2 Apr 2025 02:45:27 +0200
-Subject: [PATCH] wifi: mt76: mt7915: mcu: re-init MCU before loading FW patch
-
-Restart the MCU and release the patch semaphore before loading the MCU
-patch firmware from the host.
-
-This fixes failures upon error recovery in case the semaphore was
-previously taken and never released by the host.
-
-This happens from time to time upon triggering a full-chip error
-recovery. Under this circumstance, the hardware restart fails and the
-radio is rendered inoperational.
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
-Link: https://patch.msgid.link/20250402004528.1036715-3-mail at david-bauer.net
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- mt7915/mcu.c | 25 +++++++++++++++----------
- 1 file changed, 15 insertions(+), 10 deletions(-)
-
---- a/mt7915/mcu.c
-+++ b/mt7915/mcu.c
-@@ -2097,16 +2097,21 @@ static int mt7915_load_firmware(struct m
- {
- 	int ret;
- 
--	/* make sure fw is download state */
--	if (mt7915_firmware_state(dev, false)) {
--		/* restart firmware once */
--		mt76_connac_mcu_restart(&dev->mt76);
--		ret = mt7915_firmware_state(dev, false);
--		if (ret) {
--			dev_err(dev->mt76.dev,
--				"Firmware is not ready for download\n");
--			return ret;
--		}
-+	/* Release Semaphore if taken by previous failed attempt */
-+	ret = mt76_connac_mcu_patch_sem_ctrl(&dev->mt76, false);
-+	if (ret != PATCH_REL_SEM_SUCCESS) {
-+		dev_err(dev->mt76.dev, "Could not release semaphore\n");
-+		/* Continue anyways */
-+	}
-+
-+	/* Always restart MCU firmware */
-+	mt76_connac_mcu_restart(&dev->mt76);
-+
-+	/* Check if MCU is ready */
-+	ret = mt7915_firmware_state(dev, false);
-+	if (ret) {
-+		dev_err(dev->mt76.dev, "Firmware did not enter download state\n");
-+		return ret;
- 	}
- 
- 	ret = mt76_connac2_load_patch(&dev->mt76, fw_name_var(dev, ROM_PATCH));



From lede-commits at lists.infradead.org  Thu Aug 14 01:35:42 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 14 Aug 2025 04:35:42 -0400
Subject: [openwrt/openwrt]  realtek: cleanup documentation
In-Reply-To: <175516054245.2527436.4274787249242988071@git-01.infra.openwrt.org>
References: <175516054245.2527436.4274787249242988071@git-01.infra.openwrt.org>
Message-ID: <mailman.119584.1755160697.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a15d07f74b51dff7802c5264600dcf6869c1c109

commit a15d07f74b51dff7802c5264600dcf6869c1c109
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Wed Aug 13 14:16:19 2025 -0400

    realtek: cleanup documentation
    
    We are using upstream otto timer. Delete some downstream leftovers.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19769
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../devicetree/bindings/realtek,otto-timer.yaml    | 85 ----------------------
 1 file changed, 85 deletions(-)

diff --git a/target/linux/realtek/files-6.12/Documentation/devicetree/bindings/realtek,otto-timer.yaml b/target/linux/realtek/files-6.12/Documentation/devicetree/bindings/realtek,otto-timer.yaml
deleted file mode 100644
index 40e834e377..0000000000
--- a/target/linux/realtek/files-6.12/Documentation/devicetree/bindings/realtek,otto-timer.yaml
+++ /dev/null
@@ -1,85 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/timer/realtek,rtl8300-timer.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Realtek Timer Device Tree Bindings
-
-maintainers:
-  - Markus Stockhausen <markus.stockhausen at gmx.de>
-
-description: |
-  The Realtek SOCs of the RTL83XX and RTL93XX series have at least 5 known
-  timers with corresponding interrupt lines . Their speed is derived from the
-  Lexra Bus (LXB) by dividers. Each timer has a block of 4 control registers in
-  the address range 0xb800xxxx with following start offsets.
-
-  RTL83XX: 0x3100, 0x3110, 0x3120, 0x3130, 0x3140
-  RTL93XX: 0x3200, 0x3210, 0x3220, 0x3230, 0x3240
-
-properties:
-  compatible:
-    items:
-      - enum:
-        - realtek,rtl8380-timer
-        - realtek,rtl8390-timer
-        - realtek,rtl9300-timer
-      - const: realtek,otto-timer
-
-  reg:
-    minItems: 5
-    maxItems: 5
-    description:
-      List of timer register addresses.
-
-  interrupts:
-    minItems: 5
-    maxItems: 5
-    description:
-      List of timer interrupts.
-
-  clocks:
-    maxItems: 1
-
-required:
-  - compatible
-  - reg
-  - interrupts
-  - clocks
-
-additionalProperties: false
-
-examples:
-  - |
-    timer0: timer at 3100 {
-      compatible = "realtek,rtl8380-timer", "realtek,otto-timer";
-      reg = <0x3100 0x10>, <0x3110 0x10>, <0x3120 0x10>,
-            <0x3130 0x10>, <0x3140 0x10>;
-
-      interrupt-parent = <&intc>;
-      interrupts = <29 4>, <28 4>, <17 4>, <16 4>, <15 4>;
-      clocks = <&ccu CLK_LXB>;
-    };
-  - |
-    timer0: timer at 3100 {
-      compatible = "realtek,rtl8390-timer", "realtek,otto-timer";
-      reg = <0x3100 0x10>, <0x3110 0x10>, <0x3120 0x10>,
-            <0x3130 0x10>, <0x3140 0x10>;
-
-      interrupt-parent = <&intc>;
-      interrupts = <29 4>, <28 4>, <17 4>, <16 4>, <15 4>;
-      clocks = <&ccu CLK_LXB>;
-    };
-  - |
-    timer0: timer at 3200 {
-      compatible = "realtek,rtl9300-timer", "realtek,otto-timer";
-      reg = <0x3200 0x10>, <0x3210 0x10>, <0x3220 0x10>,
-            <0x3230 0x10>, <0x3240 0x10>;
-
-      interrupt-parent = <&intc>;
-      interrupts = <7 4>, <8 4>, <9 4>, <10 4>, <11 4>;
-      clocks = <&ccu CLK_LXB>;
-    };
-
-...



From lede-commits at lists.infradead.org  Thu Aug 14 08:28:41 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 14 Aug 2025 11:28:41 -0400
Subject: [openwrt/openwrt]  wifi-scripts: iface should be optional in
 wifi-vlan definition
In-Reply-To: <175518532170.3792998.2182762822664412302@git-01.infra.openwrt.org>
References: <175518532170.3792998.2182762822664412302@git-01.infra.openwrt.org>
Message-ID: <mailman.120140.1755186968.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/98435a37a7139aa4bc1d494f7cc3cbdf2b9be597

commit 98435a37a7139aa4bc1d494f7cc3cbdf2b9be597
Author: Tobias Waldvogel <tobias.waldvogel at gmail.com>
AuthorDate: Thu Aug 14 10:09:58 2025 +0200

    wifi-scripts: iface should be optional in wifi-vlan definition
    
    The option iface should be optional according to the description
    of /etc/config/wireless in order to avoid repeating the definition
    for each virtual interface.
    
    Signed-off-by: Tobias Waldvogel <tobias.waldvogel at gmail.com>
---
 .../wifi-scripts/files/lib/netifd/wireless.uc      | 28 ++++++++++++----------
 1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
index f0dc762e19..2103c9c369 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
@@ -143,22 +143,24 @@ function config_init(uci)
 	}
 
 	for (let name, data in sections.vlan) {
-		if (!data.iface || !vifs[data.iface])
-			continue;
-
-		for (let vif in vifs[data.iface]) {
-			let dev = devices[vif.device];
-			let handler = handlers[vif.device];
-			if (!dev || !handler)
+		for (let iface, iface_vifs in vifs) {
+			if (data.iface && data.iface != iface)
 				continue;
 
-			let config = parse_attribute_list(data, handler.vlan);
+			for (let vif in iface_vifs) {
+				let dev = devices[vif.device];
+				let handler = handlers[vif.device];
+				if (!dev || !handler)
+					continue;
 
-			let vlan = {
-				name,
-				config
-			};
-			push(vif.vlan, vlan);
+				let config = parse_attribute_list(data, handler.vlan);
+
+				let vlan = {
+					name,
+					config
+				};
+				push(vif.vlan, vlan);
+			}
 		}
 	}
 



From lede-commits at lists.infradead.org  Thu Aug 14 09:24:39 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 14 Aug 2025 12:24:39 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: fix setting supported/basic
 rates in config
In-Reply-To: <175518867934.3966374.43440066640503711@git-01.infra.openwrt.org>
References: <175518867934.3966374.43440066640503711@git-01.infra.openwrt.org>
Message-ID: <mailman.120188.1755189416.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6ae4115746268d9b5b420d949a78f2139e5dc91b

commit 6ae4115746268d9b5b420d949a78f2139e5dc91b
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Aug 14 18:24:08 2025 +0200

    wifi-scripts: ucode: fix setting supported/basic rates in config
    
    Only set the default based on cell density, do not override.
    
    Fixes: https://github.com/openwrt/openwrt/issues/19673
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../files-ucode/usr/share/ucode/wifi/hostapd.uc    | 40 +++++++++++-----------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
index b97597a1b3..b8f67b6107 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
@@ -86,50 +86,50 @@ function device_cell_density_append(config) {
 	switch (config.hw_mode) {
 	case 'b':
 		if (config.cell_density == 1) {
-			config.supported_rates = [ 5500, 11000 ];
-			config.basic_rates = [ 5500, 11000 ];
+			config.supported_rates ??= [ 5500, 11000 ];
+			config.basic_rates ??= [ 5500, 11000 ];
 		} else if (config.cell_density > 2) {
-			config.supported_rates = [ 11000 ];
-			config.basic_rates = [ 11000 ];
+			config.supported_rates ??= [ 11000 ];
+			config.basic_rates ??= [ 11000 ];
 		}
 		;;
 	case 'g':
 		if (config.cell_density in [ 0, 1 ]) {
 			if (!config.legacy_rates) {
-				config.supported_rates = [ 6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000 ];
-				config.basic_rates = [ 6000, 12000, 24000 ];
+				config.supported_rates ??= [ 6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000 ];
+				config.basic_rates ??= [ 6000, 12000, 24000 ];
 			} else if (config.cell_density == 1) {
-				config.supported_rates = [ 5500, 6000, 9000, 11000, 12000, 18000, 24000, 36000, 48000, 54000 ];
-				config.basic_rates = [ 5500, 11000 ];
+				config.supported_rates ??= [ 5500, 6000, 9000, 11000, 12000, 18000, 24000, 36000, 48000, 54000 ];
+				config.basic_rates ??= [ 5500, 11000 ];
 			}
 		} else if (config.cell_density == 2 || (config.cell_density > 3 && config.legacy_rates)) {
 			if (!config.legacy_rates) {
-				config.supported_rates = [ 12000, 18000, 24000, 36000, 48000, 54000 ];
-				config.basic_rates = [ 12000, 24000 ];
+				config.supported_rates ??= [ 12000, 18000, 24000, 36000, 48000, 54000 ];
+				config.basic_rates ??= [ 12000, 24000 ];
 			} else {
-				config.supported_rates = [ 11000, 12000, 18000, 24000, 36000, 48000, 54000 ];
-				config.basic_rates = [ 11000 ];
+				config.supported_rates ??= [ 11000, 12000, 18000, 24000, 36000, 48000, 54000 ];
+				config.basic_rates ??= [ 11000 ];
 			}
 		} else if (config.cell_density > 2) {
-			 config.supported_rates = [ 24000, 36000, 48000, 54000 ];
-			 config.basic_rates = [ 24000 ];
+			 config.supported_rates ??= [ 24000, 36000, 48000, 54000 ];
+			 config.basic_rates ??= [ 24000 ];
 		}
 		;;
 	case 'a':
 		switch (config.cell_density) {
 		case 1:
-			config.supported_rates = [ 6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000 ];
-			config.basic_rates = [ 6000, 12000, 24000 ];
+			config.supported_rates ??= [ 6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000 ];
+			config.basic_rates ??= [ 6000, 12000, 24000 ];
 			break;
 
 		case 2:
-			config.supported_rates = [ 12000, 18000, 24000, 36000, 48000, 54000 ];
-			config.basic_rates = [ 12000, 24000 ];
+			config.supported_rates ??= [ 12000, 18000, 24000, 36000, 48000, 54000 ];
+			config.basic_rates ??= [ 12000, 24000 ];
 			break;
 
 		case 3:
-			config.supported_rates = [ 24000, 36000, 48000, 54000 ];
-			config.basic_rates = [ 24000 ];
+			config.supported_rates ??= [ 24000, 36000, 48000, 54000 ];
+			config.basic_rates ??= [ 24000 ];
 			break;
 		}
 	}



From lede-commits at lists.infradead.org  Thu Aug 14 09:44:09 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 14 Aug 2025 12:44:09 -0400
Subject: [openwrt/openwrt]  mt76: update to Git HEAD (2025-08-14)
In-Reply-To: <175518984905.4024775.12799257367921961142@git-01.infra.openwrt.org>
References: <175518984905.4024775.12799257367921961142@git-01.infra.openwrt.org>
Message-ID: <mailman.120207.1755190670.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b1b15ae036d34ade74338c4a4812208b77cfbc89

commit b1b15ae036d34ade74338c4a4812208b77cfbc89
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Aug 14 18:43:48 2025 +0200

    mt76: update to Git HEAD (2025-08-14)
    
    5f61f34087c5 wifi: mt76: mt7996: fix crash on some tx status reports
    
    Fixes: https://github.com/openwrt/openwrt/issues/19638
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/kernel/mt76/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index fa8e15a469..4e7d5a2657 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2025-08-13
-PKG_SOURCE_VERSION:=903a7e0ace79dc9802b381fa05ecd2028122dd1b
-PKG_MIRROR_HASH:=fcff7a90c8745091b8113e7833dc1f25e2767ff76da1f7adad27bde225c834df
+PKG_SOURCE_DATE:=2025-08-14
+PKG_SOURCE_VERSION:=5f61f34087c56b1cb0ad56770fe9430065a41a11
+PKG_MIRROR_HASH:=af3f37682dbc7655aecd894e8fe20259170cbcee021361bd460cfab09169fd82
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0



From lede-commits at lists.infradead.org  Thu Aug 14 10:10:04 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 14 Aug 2025 13:10:04 -0400
Subject: [openwrt/openwrt]  uci: update to Git HEAD (2025-08-14)
In-Reply-To: <175519140490.4108089.2434371863657214578@git-01.infra.openwrt.org>
References: <175519140490.4108089.2434371863657214578@git-01.infra.openwrt.org>
Message-ID: <mailman.120210.1755191411.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2f6c52009ba6b83b35582d4bf254547434fbcf54

commit 2f6c52009ba6b83b35582d4bf254547434fbcf54
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Aug 14 19:08:23 2025 +0200

    uci: update to Git HEAD (2025-08-14)
    
    f3fc0b760406 libuci: fix false positive warning on older gcc versions
    9033e8c27253 blob: use blobmsg_parse_attr in __uci_blob_check_equal
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/system/uci/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile
index 6e4d8da97c..9264cebac5 100644
--- a/package/system/uci/Makefile
+++ b/package/system/uci/Makefile
@@ -13,9 +13,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2025-01-20
-PKG_SOURCE_VERSION:=16ff0badbde7e17ec3bd1f827ffe45922956cf86
-PKG_MIRROR_HASH:=e91ee4a2c0baaafe1d8ccd5321de70a8412a50323b0b27bbc7ad145e77018a22
+PKG_SOURCE_DATE:=2025-08-14
+PKG_SOURCE_VERSION:=9033e8c27253977285bd3679311b212607b492c6
+PKG_MIRROR_HASH:=e0d0f8f7d2851c52f214c00c2a5af51b19c9a6be0296e8411aef1828efb99891
 PKG_ABI_VERSION:=20250120
 
 PKG_LICENSE:=LGPL-2.1



From lede-commits at lists.infradead.org  Thu Aug 14 10:13:13 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 14 Aug 2025 13:13:13 -0400
Subject: [openwrt/openwrt]  netifd: update to Git HEAD (2025-08-14)
In-Reply-To: <175519159352.4121844.15490442732412441520@git-01.infra.openwrt.org>
References: <175519159352.4121844.15490442732412441520@git-01.infra.openwrt.org>
Message-ID: <mailman.120211.1755191598.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3ce8442576d6305b21cb9c1a587ca94f0fe8c070

commit 3ce8442576d6305b21cb9c1a587ca94f0fe8c070
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Aug 14 19:12:32 2025 +0200

    netifd: update to Git HEAD (2025-08-14)
    
    8c139e183e52 bridge: fix changing the vlan local flag at runtime
    
    Fixes: https://github.com/openwrt/openwrt/issues/19672
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 2d8ad69f51..a9e5528a30 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
-PKG_SOURCE_DATE:=2025-08-12
-PKG_SOURCE_VERSION:=a0be934399cfc0149bfc7d2221467e48177426cd
-PKG_MIRROR_HASH:=a4228247834a654ab989cd731b4ba4bf43b79390e82d9e9f1fa9049abc2875a0
+PKG_SOURCE_DATE:=2025-08-14
+PKG_SOURCE_VERSION:=8c139e183e52b0845557181e5b4677fd33d25030
+PKG_MIRROR_HASH:=c23f494e97bd9cf49a3935b3405a29b2dda05e75e567fc5039efab1ebfb3d30e
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Thu Aug 14 11:40:23 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 14 Aug 2025 14:40:23 -0400
Subject: [openwrt/openwrt]  ath79: add extended AR9344 reset sequence
In-Reply-To: <175519682309.213429.635153277266858843@git-01.infra.openwrt.org>
References: <175519682309.213429.635153277266858843@git-01.infra.openwrt.org>
Message-ID: <mailman.120255.1755196826.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/539228933caab51a21c239ec3b7e8f7a366e96b9

commit 539228933caab51a21c239ec3b7e8f7a366e96b9
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Fri Jan 3 21:46:13 2025 +0100

    ath79: add extended AR9344 reset sequence
    
    According to datasheet, on AR9344 the switch and switch analog need to
    be reset first before initiating a full reset.
    
    Resetting these systems fixes spurious reset hangs on Atheros AR9344
    SoCs.
    
    Link: https://github.com/freifunk-gluon/gluon/issues/2904
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
    (cherry picked from commit 144af32b47be6181f01815762159dff863f4616b)
    
    account for
    torvalds/linux/commit/41ccb3a0eb57741eebd72e51e011ef098bb1493d
    torvalds/linux/commit/5eddff6add4feebac625f256d2fe292935351ce3
    [felix.bau at gmx.de: adjust patch so it applies without commits above]
    Signed-off-by: Felix Baumann <felix.bau at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19759
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...1-reset-ath79-reset-ETH-switch-for-AR9344.patch | 105 +++++++++++++++++++++
 1 file changed, 105 insertions(+)

diff --git a/target/linux/ath79/patches-5.15/101-reset-ath79-reset-ETH-switch-for-AR9344.patch b/target/linux/ath79/patches-5.15/101-reset-ath79-reset-ETH-switch-for-AR9344.patch
new file mode 100644
index 0000000000..c4cfbf6124
--- /dev/null
+++ b/target/linux/ath79/patches-5.15/101-reset-ath79-reset-ETH-switch-for-AR9344.patch
@@ -0,0 +1,105 @@
+From: David Bauer <mail at david-bauer.net>
+Date: Tue, 2 Jan 2025 19:22:40 +0100
+Subject: [PATCH] reset: ath79: reset ETH switch for AR9344
+
+According to datasheet, on AR9344 the switch and switch analog need to
+be reset first before initiating a full reset.
+
+Resetting these systems fixes spurious reset hangs on Atheros AR9344
+SoCs.
+
+Link: https://github.com/freifunk-gluon/gluon/issues/2904
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+
+--- a/drivers/reset/reset-ath79.c
++++ b/drivers/reset/reset-ath79.c
+@@ -12,8 +12,11 @@
+ #include <linux/platform_device.h>
+ #include <linux/reset-controller.h>
+ #include <linux/reboot.h>
++#include <linux/delay.h>
++#include <linux/of.h>
+ 
+ struct ath79_reset {
++	struct platform_device *pdev;
+ 	struct reset_controller_dev rcdev;
+ 	struct notifier_block restart_nb;
+ 	void __iomem *base;
+@@ -21,16 +24,13 @@ struct ath79_reset {
+ };
+ 
+ #define FULL_CHIP_RESET 24
++#define ETH_SWITCH_RESET 8
++#define ETH_SWITCH_ARESET 12
+ 
+-static int ath79_reset_update(struct reset_controller_dev *rcdev,
++static void __ath79_reset_update_unlocked(struct ath79_reset *ath79_reset,
+ 			unsigned long id, bool assert)
+ {
+-	struct ath79_reset *ath79_reset =
+-		container_of(rcdev, struct ath79_reset, rcdev);
+-	unsigned long flags;
+ 	u32 val;
+-
+-	spin_lock_irqsave(&ath79_reset->lock, flags);
+ 	val = readl(ath79_reset->base);
+ 	if (assert)
+ 		val |= BIT(id);
+@@ -39,6 +39,17 @@ static int ath79_reset_update(struct res
+ 	writel(val, ath79_reset->base);
+ 	/* Flush cache */
+ 	readl(ath79_reset->base);
++}
++
++static int ath79_reset_update(struct reset_controller_dev *rcdev,
++			unsigned long id, bool assert)
++{
++	struct ath79_reset *ath79_reset =
++		container_of(rcdev, struct ath79_reset, rcdev);
++	unsigned long flags;
++
++	spin_lock_irqsave(&ath79_reset->lock, flags);
++	__ath79_reset_update_unlocked(ath79_reset, id, assert);
+ 	spin_unlock_irqrestore(&ath79_reset->lock, flags);
+ 
+ 	return 0;
+@@ -79,8 +90,28 @@ static int ath79_reset_restart_handler(s
+ {
+ 	struct ath79_reset *ath79_reset =
+ 		container_of(nb, struct ath79_reset, restart_nb);
++	unsigned long flags;
+ 
+-	ath79_reset_assert(&ath79_reset->rcdev, FULL_CHIP_RESET);
++	spin_lock_irqsave(&ath79_reset->lock, flags);
++
++	if (of_device_is_compatible(ath79_reset->pdev->dev.of_node, "qca,ar9340-reset")) {
++		/**
++		 * AR9344 has been observed to hang on reboot in rare cases.
++		 *
++		 * Datasheet states to reset the ETH switch systems before asserting
++		 * full chip reset. See page 111 of the AR9344 datasheet.
++		 */
++		__ath79_reset_update_unlocked(ath79_reset, ETH_SWITCH_RESET, true);
++		mdelay(1);
++		__ath79_reset_update_unlocked(ath79_reset, ETH_SWITCH_ARESET, true);
++		mdelay(1);
++		__ath79_reset_update_unlocked(ath79_reset, FULL_CHIP_RESET, true);
++		mdelay(10);
++	} else {
++		__ath79_reset_update_unlocked(ath79_reset, FULL_CHIP_RESET, true);
++	}
++
++	spin_unlock_irqrestore(&ath79_reset->lock, flags);
+ 
+ 	return NOTIFY_DONE;
+ }
+@@ -96,6 +127,8 @@ static int ath79_reset_probe(struct plat
+ 	if (!ath79_reset)
+ 		return -ENOMEM;
+ 
++	ath79_reset->pdev = pdev;
++
+ 	platform_set_drvdata(pdev, ath79_reset);
+ 
+ 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);



From lede-commits at lists.infradead.org  Thu Aug 14 11:41:06 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 14 Aug 2025 14:41:06 -0400
Subject: [openwrt/openwrt]  wifi-scripts: Avoid syslog message variable data
 does not exist
In-Reply-To: <175519686685.215885.5749389522761404532@git-01.infra.openwrt.org>
References: <175519686685.215885.5749389522761404532@git-01.infra.openwrt.org>
Message-ID: <mailman.120256.1755196870.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/228237784193702d43662d184f4c36dc89dc7c3f

commit 228237784193702d43662d184f4c36dc89dc7c3f
Author: Tobias Waldvogel <tobias.waldvogel at gmail.com>
AuthorDate: Thu Aug 14 19:33:02 2025 +0200

    wifi-scripts: Avoid syslog message variable data does not exist
    
    Initialize data to {} if null before calling mac80211.sh
    to avoid a confusing error message in the syslog.
    
    Fixes: https://github.com/openwrt/openwrt/issues/14010
    Signed-off-by: Tobias Waldvogel <tobias.waldvogel at gmail.com>
    Signed-off-by: Felix Fietkau <nbd at nbd.name> [cosmetic change]
---
 package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
index 22f5ee54d9..950f10ed17 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless-device.uc
@@ -221,7 +221,7 @@ function __run_next_handler()
 	wdev.dbg("run " + op);
 	if (name != mlo_name)
 		wdev_mlo_fixup(wdev.handler_config);
-	wdev.handler_config.data = wdev.handler_data[wdev.name];
+	wdev.handler_config.data = wdev.handler_data[wdev.name] ?? {};
 	wdev_script_task = netifd.process({
 		cb: () => run_handler_cb(wdev, cb),
 		dir: netifd.wireless.path,



From lede-commits at lists.infradead.org  Thu Aug 14 12:58:29 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 14 Aug 2025 15:58:29 -0400
Subject: [openwrt/openwrt]  kernel/modules: add BQ32000 I2C RTC kernel module
 support
In-Reply-To: <175520150904.473956.9496154181016249868@git-01.infra.openwrt.org>
References: <175520150904.473956.9496154181016249868@git-01.infra.openwrt.org>
Message-ID: <mailman.120272.1755201513.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/830cd4f64b02130d548082a9f12f3d1fee8233d4

commit 830cd4f64b02130d548082a9f12f3d1fee8233d4
Author: Ondrej Kolar <ondrej at kolarovo.cz>
AuthorDate: Tue Aug 12 09:09:34 2025 +0200

    kernel/modules: add BQ32000 I2C RTC kernel module support
    
    Add support for the Texas Instruments BQ32000 I2C real-time clock chip.
    
    Tested on a custom board based on Hi-Link HLK-7628N.
    
    Signed-off-by: Ondrej Kolar <ondrej at kolarovo.cz>
    Link: https://github.com/openwrt/openwrt/pull/19764
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/rtc.mk | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/package/kernel/linux/modules/rtc.mk b/package/kernel/linux/modules/rtc.mk
index 3658e8598c..e386167286 100644
--- a/package/kernel/linux/modules/rtc.mk
+++ b/package/kernel/linux/modules/rtc.mk
@@ -7,6 +7,24 @@
 
 RTC_MENU:=RTC Real-Time Clock Support
 
+define KernelPackage/rtc-bq32k
+  SUBMENU:=$(RTC_MENU)
+  TITLE:=Texas Instruments BQ32000 RTC support
+  DEFAULT:=m if ALL_KMODS && RTC_SUPPORT
+  DEPENDS:=+kmod-i2c-core
+  KCONFIG:=CONFIG_RTC_DRV_BQ32K \
+	CONFIG_RTC_CLASS=y
+  FILES:=$(LINUX_DIR)/drivers/rtc/rtc-bq32k.ko
+  AUTOLOAD:=$(call AutoProbe,rtc-bq32k)
+endef
+
+define KernelPackage/rtc-bq32k/description
+ Kernel module for Texas Instruments BQ32000 I2C RTC.
+endef
+
+$(eval $(call KernelPackage,rtc-bq32k))
+
+
 define KernelPackage/rtc-ds1307
   SUBMENU:=$(RTC_MENU)
   TITLE:=Dallas/Maxim DS1307 (and compatible) RTC support



From lede-commits at lists.infradead.org  Fri Aug 15 01:47:56 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 15 Aug 2025 04:47:56 -0400
Subject: [openwrt/openwrt]  kernel: fix Mediatek queue size patch
In-Reply-To: <175524767619.2763093.12079815202015242709@git-01.infra.openwrt.org>
References: <175524767619.2763093.12079815202015242709@git-01.infra.openwrt.org>
Message-ID: <mailman.120653.1755249323.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/92d4f59709eac7422391187edbd85f2a14d5589b

commit 92d4f59709eac7422391187edbd85f2a14d5589b
Author: Stefan D?singer <stefandoesinger at gmail.com>
AuthorDate: Thu Aug 14 13:40:09 2025 +0300

    kernel: fix Mediatek queue size patch
    
    This got added in commit 15887235, cherry-picked into the 24.10 branch
    as 642b5b61 and was partially lost in a manual patch refresh in
    3a2a2c99.
    
    The main branch still contains the full set of rx DMA size changes, so I
    assume it was lost by accident.
    
    With rx.dma_size=2K, my TP-Link Archer MR600v2 (MT7621) randomly reboots
    due to OOM.
    
    Signed-off-by: Stefan D?singer <stefandoesinger at gmail.com>
---
 ...mtk_eth_soc-reduce-rx-ring-size-for-older.patch | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/target/linux/generic/pending-6.6/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch b/target/linux/generic/pending-6.6/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch
index 83f7efe636..7b49f0e2b7 100644
--- a/target/linux/generic/pending-6.6/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch
+++ b/target/linux/generic/pending-6.6/738-01-net-ethernet-mtk_eth_soc-reduce-rx-ring-size-for-older.patch
@@ -30,6 +30,24 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -5401,7 +5401,7 @@ static const struct mtk_soc_data mt2701_
+ 		.desc_size = sizeof(struct mtk_rx_dma),
+ 		.irq_done_mask = MTK_RX_DONE_INT,
+ 		.dma_l4_valid = RX_DMA_L4_VALID,
+-		.dma_size = MTK_DMA_SIZE(2K),
++		.dma_size = MTK_DMA_SIZE(512),
+ 		.dma_max_len = MTK_TX_DMA_BUF_LEN,
+ 		.dma_len_offset = 16,
+ 	},
+@@ -5429,7 +5429,7 @@ static const struct mtk_soc_data mt7621_
+ 		.desc_size = sizeof(struct mtk_rx_dma),
+ 		.irq_done_mask = MTK_RX_DONE_INT,
+ 		.dma_l4_valid = RX_DMA_L4_VALID,
+-		.dma_size = MTK_DMA_SIZE(2K),
++		.dma_size = MTK_DMA_SIZE(512),
+ 		.dma_max_len = MTK_TX_DMA_BUF_LEN,
+ 		.dma_len_offset = 16,
+ 	},
 @@ -5459,7 +5459,7 @@ static const struct mtk_soc_data mt7622_
  		.desc_size = sizeof(struct mtk_rx_dma),
  		.irq_done_mask = MTK_RX_DONE_INT,
@@ -57,3 +75,30 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN,
  		.dma_len_offset = 16,
  	},
+@@ -5546,7 +5546,7 @@ static const struct mtk_soc_data mt7981_
+ 		.dma_l4_valid = RX_DMA_L4_VALID_V2,
+ 		.dma_max_len = MTK_TX_DMA_BUF_LEN,
+ 		.dma_len_offset = 16,
+-		.dma_size = MTK_DMA_SIZE(2K),
++		.dma_size = MTK_DMA_SIZE(512),
+ 	},
+ };
+ 
+@@ -5576,7 +5576,7 @@ static const struct mtk_soc_data mt7986_
+ 		.dma_l4_valid = RX_DMA_L4_VALID_V2,
+ 		.dma_max_len = MTK_TX_DMA_BUF_LEN,
+ 		.dma_len_offset = 16,
+-		.dma_size = MTK_DMA_SIZE(2K),
++		.dma_size = MTK_DMA_SIZE(1K),
+ 	},
+ };
+ 
+@@ -5629,7 +5629,7 @@ static const struct mtk_soc_data rt5350_
+ 		.dma_l4_valid = RX_DMA_L4_VALID_PDMA,
+ 		.dma_max_len = MTK_TX_DMA_BUF_LEN,
+ 		.dma_len_offset = 16,
+-		.dma_size = MTK_DMA_SIZE(2K),
++		.dma_size = MTK_DMA_SIZE(256),
+ 	},
+ };
+ 



From lede-commits at lists.infradead.org  Fri Aug 15 02:12:49 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 15 Aug 2025 05:12:49 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: add extra RSN override for
 MLO
In-Reply-To: <175524916971.2860688.8265615522893456135@git-01.infra.openwrt.org>
References: <175524916971.2860688.8265615522893456135@git-01.infra.openwrt.org>
Message-ID: <mailman.120832.1755261866.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/45360a5aea4440ce7325ee70b53c26b15dddf9b5

commit 45360a5aea4440ce7325ee70b53c26b15dddf9b5
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Aug 15 11:12:11 2025 +0200

    wifi-scripts: ucode: add extra RSN override for MLO
    
    Use SAE-EXT-KEY instead of SAE for MLO clients
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc      | 12 ++++++++++++
 .../wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc   |  5 +++++
 2 files changed, 17 insertions(+)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
index 8296f01195..16a2c67afe 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
@@ -482,6 +482,18 @@ export function generate(interface, data, config, vlans, stas, phy_features) {
 			'rsn_override_pairwise',
 			'rsn_override_mfp'
 		]);
+
+		if (config.mode == 'link') {
+			config.rsn_override_mfp_2 ??= config.rsn_override_mfp;
+			config.rsn_override_key_mgmt_2 ??= config.rsn_override_key_mgmt;
+			config.rsn_override_pairwise_2 ??= config.rsn_override_pairwise;
+
+			append_vars(config, [
+				'rsn_override_key_mgmt_2',
+				'rsn_override_pairwise_2',
+				'rsn_override_mfp_2'
+			]);
+		}
 	}
 
 	/* raw options */
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc
index bfea26d462..4a592bc99f 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc
@@ -174,6 +174,11 @@ export function wpa_key_mgmt(config) {
 		if (config.ieee80211r)
 			append_value(config, 'wpa_key_mgmt', 'FT-SAE');
 		config.rsn_override_key_mgmt = config.wpa_key_mgmt;
+
+		append_value(config, 'rsn_override_key_mgmt_2', 'SAE-EXT-KEY');
+		if (config.ieee80211r)
+			append_value(config, 'rsn_override_key_mgmt_2', 'FT-SAE-EXT-KEY');
+
 		if (config.rsn_override > 1)
 			delete config.wpa_key_mgmt;
 



From lede-commits at lists.infradead.org  Fri Aug 15 08:33:06 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 15 Aug 2025 11:33:06 -0400
Subject: [openwrt/openwrt]  udebug: update to Git HEAD (2025-08-15)
In-Reply-To: <175527198622.4001628.15905295386346029024@git-01.infra.openwrt.org>
References: <175527198622.4001628.15905295386346029024@git-01.infra.openwrt.org>
Message-ID: <mailman.121109.1755277609.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c4e7b9b9b75f4cdd3fe4ec544412fba731afecd3

commit c4e7b9b9b75f4cdd3fe4ec544412fba731afecd3
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Aug 15 17:32:56 2025 +0200

    udebug: update to Git HEAD (2025-08-15)
    
    3d953628bf17 udebugd: add support for setting an override config
    93f6df0240e5 udebug-cli: add support for overriding config on the command line
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/udebug/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/udebug/Makefile b/package/libs/udebug/Makefile
index 30eac8793e..b99e74b76b 100644
--- a/package/libs/udebug/Makefile
+++ b/package/libs/udebug/Makefile
@@ -11,9 +11,9 @@ PKG_NAME:=udebug
 CMAKE_INSTALL:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/udebug.git
-PKG_MIRROR_HASH:=578f795ef6ed0400efae8754891539e5b2922d8b164425e535b96da1b0a089c5
-PKG_SOURCE_DATE:=2025-07-23
-PKG_SOURCE_VERSION:=6ed8536142bbd4360b55a423723456a6a862c99b
+PKG_MIRROR_HASH:=88dffbff7c91ce7f314eb0debbdfd46258633b11106a1e8609a52345a5d65593
+PKG_SOURCE_DATE:=2025-08-15
+PKG_SOURCE_VERSION:=93f6df0240e53115f488357ae83bcf0ae25422d2
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Fri Aug 15 10:42:46 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 15 Aug 2025 13:42:46 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: remove reference to legacy
 drivers
In-Reply-To: <175527976630.172965.1083762311589435902@git-01.infra.openwrt.org>
References: <175527976630.172965.1083762311589435902@git-01.infra.openwrt.org>
Message-ID: <mailman.121210.1755284678.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4b6d81d7c1e89c096c25b53dab1aef58961c5532

commit 4b6d81d7c1e89c096c25b53dab1aef58961c5532
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Aug 15 19:31:28 2025 +0200

    wifi-scripts: ucode: remove reference to legacy drivers
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json
index 77692da2f6..f5f3628037 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json
@@ -127,7 +127,7 @@
 			"type": "string"
 		},
 		"country_code": {
-			"description": "Specifies the country code, affects the available channels and transmission powers. For types mac80211 and broadcom a two letter country code is used (EN or DE). The madwifi driver expects a numeric code",
+			"description": "Specifies the two-letter country code (e.g. EN or DE), affects the available channels and transmission powers",
 			"type": "string"
 		},
 		"country_ie": {



From lede-commits at lists.infradead.org  Fri Aug 15 10:42:47 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 15 Aug 2025 13:42:47 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: add support for scan_list
In-Reply-To: <175527976630.172965.1083762311589435902@git-01.infra.openwrt.org>
References: <175527976630.172965.1083762311589435902@git-01.infra.openwrt.org>
Message-ID: <mailman.121211.1755284678.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9736d42141289455eb47b6088800fd384ab732be

commit 9736d42141289455eb47b6088800fd384ab732be
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Aug 15 19:41:44 2025 +0200

    wifi-scripts: ucode: add support for scan_list
    
    Speed up connecting in client mode by allowing to limit the channels that
    need to be scanned.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../files-ucode/usr/share/schema/wireless.wifi-device.json         | 7 +++++++
 .../wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc    | 4 +++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json
index f5f3628037..08e4c792c8 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json
@@ -618,6 +618,13 @@
 			"type": "boolean",
 			"default": true
 		},
+		"scan_list": {
+			"description": "List of frequencies (in MHz) to scan when looking for networks in client mode",
+			"type": "array",
+			"items": {
+				"type": "number"
+			}
+		},
 		"short_gi_160": {
 			"description": "Short GI for 160 MHz",
 			"type": "boolean",
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
index 1c41e3c396..8e5697b4f3 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
@@ -190,8 +190,10 @@ export function generate(config_list, data, interface) {
 
 	interface.config.country = data.config.country_code;
 	interface.config.beacon_int = data.config.beacon_int;
+	if (data.config.scan_list)
+		interface.config.scan_list = join(" ", data.config.scan_list);
 
-	append_vars(interface.config, [ 'country', 'beacon_int' ]);
+	append_vars(interface.config, [ 'country', 'beacon_int', 'scan_list' ]);
 
 	setup_sta(data.config, interface.config);
 



From lede-commits at lists.infradead.org  Fri Aug 15 15:14:59 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 15 Aug 2025 18:14:59 -0400
Subject: [openwrt/openwrt]  OpenWrt v23.05.6: adjust config defaults
In-Reply-To: <175529609992.936663.15600943863949796551@git-01.infra.openwrt.org>
References: <175529609992.936663.15600943863949796551@git-01.infra.openwrt.org>
Message-ID: <mailman.121324.1755296104.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/761ee326d7e0c9be4569ec1428816c008a202757

commit 761ee326d7e0c9be4569ec1428816c008a202757
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Aug 16 00:10:50 2025 +0200

    OpenWrt v23.05.6: adjust config defaults
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 feeds.conf.default                 | 8 ++++----
 include/version.mk                 | 6 +++---
 package/base-files/image-config.in | 4 ++--
 version                            | 1 +
 version.date                       | 1 +
 5 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/feeds.conf.default b/feeds.conf.default
index d467db5627..bd5ddd31d4 100644
--- a/feeds.conf.default
+++ b/feeds.conf.default
@@ -1,4 +1,4 @@
-src-git packages https://git.openwrt.org/feed/packages.git;openwrt-23.05
-src-git luci https://git.openwrt.org/project/luci.git;openwrt-23.05
-src-git routing https://git.openwrt.org/feed/routing.git;openwrt-23.05
-src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-23.05
+src-git packages https://git.openwrt.org/feed/packages.git^e59d9ef823bcb581e3939789b4eaeaf900b79759
+src-git luci https://git.openwrt.org/project/luci.git^7ce34fe1a53db10bb9dd0223467f5bb71a29a659
+src-git routing https://git.openwrt.org/feed/routing.git^4a06b031dc16628c9b8351ac297ecdbc92695dc2
+src-git telephony https://git.openwrt.org/feed/telephony.git^98c8a5aa4624312ed758e2e2b6d4039050a1649d
diff --git a/include/version.mk b/include/version.mk
index 924bf83541..ab4f1f9d99 100644
--- a/include/version.mk
+++ b/include/version.mk
@@ -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),23.05-SNAPSHOT)
+VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),23.05.6)
 
 VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
-VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),$(REVISION))
+VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r24232-539228933c)
 
 VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
-VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05-SNAPSHOT)
+VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05.6)
 
 VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
 VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in
index 9a72863813..26e0424f9e 100644
--- a/package/base-files/image-config.in
+++ b/package/base-files/image-config.in
@@ -190,7 +190,7 @@ if VERSIONOPT
 	config VERSION_REPO
 		string
 		prompt "Release repository"
-		default "https://downloads.openwrt.org/releases/23.05-SNAPSHOT"
+		default "https://downloads.openwrt.org/releases/23.05.6"
 		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 y
+		default n
 		help
 			Enable this to include the revision identifier or the configured
 			version code into the firmware image, SDK- and Image Builder archive
diff --git a/version b/version
new file mode 100644
index 0000000000..7cf1d89c6f
--- /dev/null
+++ b/version
@@ -0,0 +1 @@
+r24232-539228933c
diff --git a/version.date b/version.date
new file mode 100644
index 0000000000..18cd2feb09
--- /dev/null
+++ b/version.date
@@ -0,0 +1 @@
+1755196060



From lede-commits at lists.infradead.org  Fri Aug 15 15:15:00 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 15 Aug 2025 18:15:00 -0400
Subject: [openwrt/openwrt]  OpenWrt v23.05.6: revert to branch defaults
In-Reply-To: <175529609992.936663.15600943863949796551@git-01.infra.openwrt.org>
References: <175529609992.936663.15600943863949796551@git-01.infra.openwrt.org>
Message-ID: <mailman.121325.1755296104.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/40326394fa8a7f54776bbcdc2217183eb8dc80ac

commit 40326394fa8a7f54776bbcdc2217183eb8dc80ac
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Aug 16 00:10:55 2025 +0200

    OpenWrt v23.05.6: revert to branch defaults
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 feeds.conf.default                 | 8 ++++----
 include/version.mk                 | 6 +++---
 package/base-files/image-config.in | 4 ++--
 version                            | 1 -
 version.date                       | 1 -
 5 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/feeds.conf.default b/feeds.conf.default
index bd5ddd31d4..d467db5627 100644
--- a/feeds.conf.default
+++ b/feeds.conf.default
@@ -1,4 +1,4 @@
-src-git packages https://git.openwrt.org/feed/packages.git^e59d9ef823bcb581e3939789b4eaeaf900b79759
-src-git luci https://git.openwrt.org/project/luci.git^7ce34fe1a53db10bb9dd0223467f5bb71a29a659
-src-git routing https://git.openwrt.org/feed/routing.git^4a06b031dc16628c9b8351ac297ecdbc92695dc2
-src-git telephony https://git.openwrt.org/feed/telephony.git^98c8a5aa4624312ed758e2e2b6d4039050a1649d
+src-git packages https://git.openwrt.org/feed/packages.git;openwrt-23.05
+src-git luci https://git.openwrt.org/project/luci.git;openwrt-23.05
+src-git routing https://git.openwrt.org/feed/routing.git;openwrt-23.05
+src-git telephony https://git.openwrt.org/feed/telephony.git;openwrt-23.05
diff --git a/include/version.mk b/include/version.mk
index ab4f1f9d99..924bf83541 100644
--- a/include/version.mk
+++ b/include/version.mk
@@ -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),23.05.6)
+VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),23.05-SNAPSHOT)
 
 VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_CODE))
-VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),r24232-539228933c)
+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/23.05.6)
+VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),https://downloads.openwrt.org/releases/23.05-SNAPSHOT)
 
 VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
 VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
diff --git a/package/base-files/image-config.in b/package/base-files/image-config.in
index 26e0424f9e..9a72863813 100644
--- a/package/base-files/image-config.in
+++ b/package/base-files/image-config.in
@@ -190,7 +190,7 @@ if VERSIONOPT
 	config VERSION_REPO
 		string
 		prompt "Release repository"
-		default "https://downloads.openwrt.org/releases/23.05.6"
+		default "https://downloads.openwrt.org/releases/23.05-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
diff --git a/version b/version
deleted file mode 100644
index 7cf1d89c6f..0000000000
--- a/version
+++ /dev/null
@@ -1 +0,0 @@
-r24232-539228933c
diff --git a/version.date b/version.date
deleted file mode 100644
index 18cd2feb09..0000000000
--- a/version.date
+++ /dev/null
@@ -1 +0,0 @@
-1755196060



From lede-commits at lists.infradead.org  Sun Aug 17 02:10:04 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 05:10:04 -0400
Subject: [openwrt/openwrt]  tools/7z: update to 25.01
In-Reply-To: <175542180430.1118452.16229588058000833363@git-01.infra.openwrt.org>
References: <175542180430.1118452.16229588058000833363@git-01.infra.openwrt.org>
Message-ID: <mailman.121593.1755421810.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4e9fbc75c731715d5b8dd9e9d6c0a4eb3fd0d121

commit 4e9fbc75c731715d5b8dd9e9d6c0a4eb3fd0d121
Author: Tianling Shen <cnsztl at immortalwrt.org>
AuthorDate: Mon Aug 11 15:22:28 2025 +0800

    tools/7z: update to 25.01
    
    This version contains fixes for CVE-2025-55188.
    Changelog: https://www.7-zip.org/history.txt
    
    Signed-off-by: Tianling Shen <cnsztl at immortalwrt.org>
    Link: https://github.com/openwrt/openwrt/pull/19742
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 tools/7z/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/7z/Makefile b/tools/7z/Makefile
index 0241a0c2e2..4fb82eb753 100644
--- a/tools/7z/Makefile
+++ b/tools/7z/Makefile
@@ -1,11 +1,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=7z
-PKG_VERSION:=25.00
+PKG_VERSION:=25.01
 
 PKG_SOURCE:=$(PKG_NAME)$(subst .,,$(PKG_VERSION))-src.tar.xz
 PKG_SOURCE_URL:=https://7-zip.org/a/
-PKG_HASH:=bff9e69b6ca73a5b8715d7623870a39dc90ad6ce1f4d1070685843987af1af9b
+PKG_HASH:=ed087f83ee789c1ea5f39c464c55a5c9d4008deb0efe900814f2df262b82c36e
 
 PKG_CPE_ID:=cpe:/a:7-zip:7-zip
 



From lede-commits at lists.infradead.org  Sun Aug 17 02:12:04 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 05:12:04 -0400
Subject: [openwrt/openwrt]  udebug: update to Git HEAD (2025-08-17)
In-Reply-To: <175542192447.1130045.14940407815598889635@git-01.infra.openwrt.org>
References: <175542192447.1130045.14940407815598889635@git-01.infra.openwrt.org>
Message-ID: <mailman.121594.1755421933.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/899deae535ac7d0f659dfa3a7b7e769ea74999a4

commit 899deae535ac7d0f659dfa3a7b7e769ea74999a4
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 17 11:11:42 2025 +0200

    udebug: update to Git HEAD (2025-08-17)
    
    892647b81d30 ucode: add ferror() call to check for closed write file descriptor
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/udebug/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/udebug/Makefile b/package/libs/udebug/Makefile
index b99e74b76b..1acbb16988 100644
--- a/package/libs/udebug/Makefile
+++ b/package/libs/udebug/Makefile
@@ -11,9 +11,9 @@ PKG_NAME:=udebug
 CMAKE_INSTALL:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/udebug.git
-PKG_MIRROR_HASH:=88dffbff7c91ce7f314eb0debbdfd46258633b11106a1e8609a52345a5d65593
-PKG_SOURCE_DATE:=2025-08-15
-PKG_SOURCE_VERSION:=93f6df0240e53115f488357ae83bcf0ae25422d2
+PKG_MIRROR_HASH:=d787e64420b6b8410ee4a432cbaaeba0d116ef0d6bb6d670289229f049d10bf7
+PKG_SOURCE_DATE:=2025-08-17
+PKG_SOURCE_VERSION:=892647b81d30fcec8d275a2c5da05b94192c095d
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Sun Aug 17 02:12:52 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 05:12:52 -0400
Subject: [openwrt/openwrt]  ipq40xx: switch to kernel 6.12
In-Reply-To: <175542197276.1134353.1887499992242247018@git-01.infra.openwrt.org>
References: <175542197276.1134353.1887499992242247018@git-01.infra.openwrt.org>
Message-ID: <mailman.121595.1755421976.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/750f2abd8865e64e252af4b7cb5b04e0c60cb325

commit 750f2abd8865e64e252af4b7cb5b04e0c60cb325
Author: Goetz Goerisch <ggoerisch at gmail.com>
AuthorDate: Thu Aug 14 13:36:41 2025 +0200

    ipq40xx: switch to kernel 6.12
    
    Let's switch the ipq40xx target to use kernel 6.12 by default.
    
    Signed-off-by: Goetz Goerisch <ggoerisch at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19778
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/ipq40xx/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/ipq40xx/Makefile b/target/linux/ipq40xx/Makefile
index 39bc0e1774..35412846f9 100644
--- a/target/linux/ipq40xx/Makefile
+++ b/target/linux/ipq40xx/Makefile
@@ -8,8 +8,7 @@ CPU_TYPE:=cortex-a7
 CPU_SUBTYPE:=neon-vfpv4
 SUBTARGETS:=generic chromium mikrotik
 
-KERNEL_PATCHVER:=6.6
-KERNEL_TESTING_PATCHVER:=6.12
+KERNEL_PATCHVER:=6.12
 
 KERNELNAME:=zImage Image dtbs
 



From lede-commits at lists.infradead.org  Sun Aug 17 08:20:31 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 11:20:31 -0400
Subject: [openwrt/openwrt]  realtek: create central DTS macro include
In-Reply-To: <175544403123.2872465.17737998067729579367@git-01.infra.openwrt.org>
References: <175544403123.2872465.17737998067729579367@git-01.infra.openwrt.org>
Message-ID: <mailman.121646.1755444035.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9037f815ee9d32758c233929093e1fc3f7a6be79

commit 9037f815ee9d32758c233929093e1fc3f7a6be79
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Thu Aug 14 01:40:06 2025 -0400

    realtek: create central DTS macro include
    
    The Realtek DTS's use several macros for convenient phy/port definition.
    These are repeated for the RTL83xx targets and most are missing for the
    RTL93xx targets. In the near future we want to add high port count
    switches with 1GBit Ethernet for them too. As a preparation provide a
    central include so the definition is only needed once and is available
    for all targets.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19772
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/dts/macros.dtsi  | 63 +++++++++++++++++++++++++++++++++++
 target/linux/realtek/dts/rtl838x.dtsi | 61 +--------------------------------
 target/linux/realtek/dts/rtl839x.dtsi | 61 +--------------------------------
 target/linux/realtek/dts/rtl930x.dtsi | 10 ++----
 target/linux/realtek/dts/rtl931x.dtsi |  9 +----
 5 files changed, 68 insertions(+), 136 deletions(-)

diff --git a/target/linux/realtek/dts/macros.dtsi b/target/linux/realtek/dts/macros.dtsi
new file mode 100644
index 0000000000..66925fb791
--- /dev/null
+++ b/target/linux/realtek/dts/macros.dtsi
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#define STRINGIZE(s) #s
+#define LAN_LABEL(p, s) STRINGIZE(p ## s)
+#define SWITCH_PORT_LABEL(n) LAN_LABEL(lan, n)
+
+#define INTERNAL_PHY(n) \
+	phy##n: ethernet-phy@##n { \
+		reg = <##n>; \
+		compatible = "ethernet-phy-ieee802.3-c22"; \
+		phy-is-integrated; \
+	};
+
+#define INTERNAL_PHY_SDS(n, s) \
+	phy##n: ethernet-phy@##n { \
+		reg = <##n>; \
+		compatible = "ethernet-phy-ieee802.3-c22"; \
+		phy-is-integrated; \
+		sds = <##s>; \
+	};
+
+#define EXTERNAL_PHY(n) \
+	phy##n: ethernet-phy@##n { \
+		reg = <##n>; \
+		compatible = "ethernet-phy-ieee802.3-c22"; \
+	};
+
+#define EXTERNAL_SFP_PHY(n) \
+	phy##n: ethernet-phy@##n { \
+		compatible = "ethernet-phy-ieee802.3-c22"; \
+		sfp; \
+		media = "fibre"; \
+		reg = <##n>; \
+	};
+
+#define EXTERNAL_SFP_PHY_FULL(n, s) \
+	phy##n: ethernet-phy@##n { \
+		compatible = "ethernet-phy-ieee802.3-c22"; \
+		sfp = <&sfp##s>; \
+		reg = <##n>; \
+	};
+
+#define SWITCH_PORT(n, s, m) \
+	port##n: port@##n { \
+		reg = <##n>; \
+		label = SWITCH_PORT_LABEL(s) ; \
+		phy-handle = <&phy##n>; \
+		phy-mode = #m ; \
+	};
+
+#define SWITCH_SFP_PORT(n, s, m) \
+	port##n: port@##n { \
+		reg = <##n>; \
+		label = SWITCH_PORT_LABEL(s) ; \
+		phy-handle = <&phy##n>; \
+		phy-mode = #m ; \
+		fixed-link { \
+			speed = <1000>; \
+			full-duplex; \
+		}; \
+	};
diff --git a/target/linux/realtek/dts/rtl838x.dtsi b/target/linux/realtek/dts/rtl838x.dtsi
index 035ff029c9..2b9938899b 100644
--- a/target/linux/realtek/dts/rtl838x.dtsi
+++ b/target/linux/realtek/dts/rtl838x.dtsi
@@ -1,70 +1,11 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include "macros.dtsi"
 #include <dt-bindings/clock/rtl83xx-clk.h>
 #include <dt-bindings/gpio/gpio.h>
 
 /dts-v1/;
 
-#define STRINGIZE(s) #s
-#define LAN_LABEL(p, s) STRINGIZE(p ## s)
-#define SWITCH_PORT_LABEL(n) LAN_LABEL(lan, n)
-
-#define INTERNAL_PHY(n) \
-	phy##n: ethernet-phy@##n { \
-		reg = <##n>; \
-		compatible = "ethernet-phy-ieee802.3-c22"; \
-		phy-is-integrated; \
-	};
-
-#define INTERNAL_PHY_SDS(n, s) \
-	phy##n: ethernet-phy@##n { \
-		reg = <##n>; \
-		compatible = "ethernet-phy-ieee802.3-c22"; \
-		phy-is-integrated; \
-		sds = <##s>; \
-	};
-
-#define EXTERNAL_PHY(n) \
-	phy##n: ethernet-phy@##n { \
-		reg = <##n>; \
-		compatible = "ethernet-phy-ieee802.3-c22"; \
-	};
-
-#define EXTERNAL_SFP_PHY(n) \
-	phy##n: ethernet-phy@##n { \
-		compatible = "ethernet-phy-ieee802.3-c22"; \
-		sfp; \
-		media = "fibre"; \
-		reg = <##n>; \
-	};
-
-#define EXTERNAL_SFP_PHY_FULL(n, s) \
-	phy##n: ethernet-phy@##n { \
-		compatible = "ethernet-phy-ieee802.3-c22"; \
-		sfp = <&sfp##s>; \
-		reg = <##n>; \
-	};
-
-#define SWITCH_PORT(n, s, m) \
-	port##n: port@##n { \
-		reg = <##n>; \
-		label = SWITCH_PORT_LABEL(s) ; \
-		phy-handle = <&phy##n>; \
-		phy-mode = #m ; \
-	};
-
-#define SWITCH_SFP_PORT(n, s, m) \
-	port##n: port@##n { \
-		reg = <##n>; \
-		label = SWITCH_PORT_LABEL(s) ; \
-		phy-handle = <&phy##n>; \
-		phy-mode = #m ; \
-		fixed-link { \
-			speed = <1000>; \
-			full-duplex; \
-		}; \
-	};
-
 / {
 	#address-cells = <1>;
 	#size-cells = <1>;
diff --git a/target/linux/realtek/dts/rtl839x.dtsi b/target/linux/realtek/dts/rtl839x.dtsi
index 29458269fa..24b178c723 100644
--- a/target/linux/realtek/dts/rtl839x.dtsi
+++ b/target/linux/realtek/dts/rtl839x.dtsi
@@ -1,69 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include "macros.dtsi"
 #include <dt-bindings/clock/rtl83xx-clk.h>
 
 /dts-v1/;
 
-#define STRINGIZE(s) #s
-#define LAN_LABEL(p, s) STRINGIZE(p ## s)
-#define SWITCH_PORT_LABEL(n) LAN_LABEL(lan, n)
-
-#define INTERNAL_PHY(n) \
-	phy##n: ethernet-phy@##n { \
-		reg = <##n>; \
-		compatible = "ethernet-phy-ieee802.3-c22"; \
-		phy-is-integrated; \
-	};
-
-#define INTERNAL_PHY_SDS(n, s) \
-	phy##n: ethernet-phy@##n { \
-		reg = <##n>; \
-		compatible = "ethernet-phy-ieee802.3-c22"; \
-		phy-is-integrated; \
-		sds = <##s>; \
-	};
-
-#define EXTERNAL_PHY(n) \
-	phy##n: ethernet-phy@##n { \
-		reg = <##n>; \
-		compatible = "ethernet-phy-ieee802.3-c22"; \
-	};
-
-#define EXTERNAL_SFP_PHY(n) \
-	phy##n: ethernet-phy@##n { \
-		compatible = "ethernet-phy-ieee802.3-c22"; \
-		sfp; \
-		media = "fibre"; \
-		reg = <##n>; \
-	};
-
-#define EXTERNAL_SFP_PHY_FULL(n, s) \
-	phy##n: ethernet-phy@##n { \
-		compatible = "ethernet-phy-ieee802.3-c22"; \
-		sfp = <&sfp##s>; \
-		reg = <##n>; \
-	};
-
-#define SWITCH_PORT(n, s, m) \
-	port@##n { \
-		reg = <##n>; \
-		label = SWITCH_PORT_LABEL(s) ; \
-		phy-handle = <&phy##n>; \
-		phy-mode = #m ; \
-	};
-
-#define SWITCH_SFP_PORT(n, s, m) \
-	port@##n { \
-		reg = <##n>; \
-		label = SWITCH_PORT_LABEL(s) ; \
-		phy-handle = <&phy##n>; \
-		phy-mode = #m ; \
-		fixed-link { \
-			speed = <1000>; \
-			full-duplex; \
-		}; \
-	};
-
 / {
 	#address-cells = <1>;
 	#size-cells = <1>;
diff --git a/target/linux/realtek/dts/rtl930x.dtsi b/target/linux/realtek/dts/rtl930x.dtsi
index 5423f996e2..02d8c47e7c 100644
--- a/target/linux/realtek/dts/rtl930x.dtsi
+++ b/target/linux/realtek/dts/rtl930x.dtsi
@@ -1,14 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-/dts-v1/;
+#include "macros.dtsi"
 
-#define INTERNAL_PHY_SDS(n, s) \
-	phy##n: ethernet-phy@##n { \
-		reg = <##n>; \
-		compatible = "ethernet-phy-ieee802.3-c22"; \
-		phy-is-integrated; \
-		sds = <##s>; \
-	};
+/dts-v1/;
 
 / {
 	#address-cells = <1>;
diff --git a/target/linux/realtek/dts/rtl931x.dtsi b/target/linux/realtek/dts/rtl931x.dtsi
index ef45258cb5..ff3d5c8f29 100644
--- a/target/linux/realtek/dts/rtl931x.dtsi
+++ b/target/linux/realtek/dts/rtl931x.dtsi
@@ -1,17 +1,10 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
+#include "macros.dtsi"
 #include <dt-bindings/interrupt-controller/mips-gic.h>
 
 /dts-v1/;
 
-#define INTERNAL_PHY_SDS(n, s) \
-	phy##n: ethernet-phy@##n { \
-		reg = <##n>; \
-		compatible = "ethernet-phy-ieee802.3-c22"; \
-		phy-is-integrated; \
-		sds = <##s>; \
-	};
-
 / {
 	#address-cells = <1>;
 	#size-cells = <1>;



From lede-commits at lists.infradead.org  Sun Aug 17 08:24:40 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 11:24:40 -0400
Subject: [openwrt/openwrt]  realtek: register ethernet device after NAPI
 context init
In-Reply-To: <175544428054.2889655.16883723333308839802@git-01.infra.openwrt.org>
References: <175544428054.2889655.16883723333308839802@git-01.infra.openwrt.org>
Message-ID: <mailman.121647.1755444284.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5dbf55bebb4f0f7af241c712dbf036abea767e13

commit 5dbf55bebb4f0f7af241c712dbf036abea767e13
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Fri Aug 15 12:16:39 2025 -0400

    realtek: register ethernet device after NAPI context init
    
    Booting Realtek switches via TFTP will have a chance of ~5% to
    fail with the following dump on SMP devices. Sample taken from
    RTL931x.
    
    [    1.318320] rtl931x_chip_init: init ENCAP done
    [    1.323360] rtl931x_chip_init: init MIB done
    [    1.328337] rtl931x_chip_init: init ACL done
    [    1.333219] rtl931x_chip_init: init ALE done
    [    1.344307] CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 806c5c4c
    [    1.356418] Oops[#1]:
    [    1.359067] CPU: 0 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.12.40 #0
    [    1.366582] Hardware name: Linksys LGS352C
    [    1.371226] $ 0   : 00000000 00000001 00000000 80b6cc44
    [    1.377179] $ 4   : 836b0540 00000000 00000000 83011d38
    [    1.383119] $ 8   : 00000000 ffffefff 00000001 80b08c08
    [    1.389071] $12   : ffffffea 83011d34 00000072 00000558
    [    1.395060] $16   : 836b0540 00000000 00000100 83011ebf
    [    1.401003] $20   : 83011ec0 83011ec8 ffff8b3c 80b00000
    [    1.406984] $24   : 00000000 80b08c38
    [    1.412922] $28   : 83038000 83011e70 82fb37a0 806c5c4c
    [    1.418888] Hi    : 0000014b
    [    1.422201] Lo    : c74d8000
    [    1.425490] epc   : 00000000 0x0
    [    1.429191] ra    : 806c5c4c __napi_poll+0x4c/0x208
    [    1.434728] Status: 11000403 KERNEL EXL IE
    [    1.439497] Cause : 50800008 (ExcCode 02)
    [    1.444040] BadVA : 00000000
    [    1.447330] PrId  : 0001a120 (MIPS interAptiv (multi))
    [    1.453157] Modules linked in:
    [    1.456641] Process swapper/0 (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000)
    [    1.465742] Stack : 82faf248 80a8d558 817ed500 ffff8b3a 836b0540 8066a348 82fb2bc0 836b0540
    [    1.475209]         82fb3600 00000100 0000012c 806c6274 00000000 00000017 00000002 80196134
    [    1.484701]         80b00000 83011ed0 83011eb8 83011e00 83011ec0 83011ec0 83011ec8 83011ec8
    [    1.494233]         00000001 81920000 81920000 80aefe4c 836b0000 00000000 00000000 00000001
    [    1.503686]         00000100 00000000 83011f20 80aefde0 00000000 8019ac14 80b01550 00000000
    [    1.513144]         ...
    [    1.515957] Call Trace:
    [    1.515996]
    [    1.520458] [<8066a348>] rtl93xx_net_irq+0x1a4/0x1ac
    [    1.526116] [<806c6274>] net_rx_action+0x18c/0x360
    [    1.531576] [<80196134>] __handle_irq_event_percpu+0x58/0x16c
    [    1.538111] [<8019ac14>] handle_level_irq+0x1e0/0x1f4
    [    1.543870] [<80133588>] handle_softirqs+0x14c/0x2ec
    [    1.549488] [<801339e4>] irq_exit+0x84/0xb4
    [    1.554183] [<805527dc>] plat_irq_dispatch+0x90/0xdc
    [    1.559764] [<801019f0>] except_vec_vi_end+0xc4/0xd0
    [    1.565337]
    
    A network interrupt may be received before the device is setup
    properly. In this case NAPI structures are missing and __napi_poll()
    will find a NULL pointer in n->poll. Avoid this by registering the
    device after initialization is complete.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19787
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
index 37dab0f2db..cc3166340b 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
@@ -3277,10 +3277,6 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
 	if (err)
 		return err;
 
-	err = devm_register_netdev(&pdev->dev, dev);
-	if (err)
-		return err;
-
 	for (int i = 0; i < priv->rxrings; i++) {
 		priv->rx_qs[i].id = i;
 		priv->rx_qs[i].priv = priv;
@@ -3289,6 +3285,10 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, dev);
 
+	err = devm_register_netdev(&pdev->dev, dev);
+	if (err)
+		return err;
+
 	phy_mode = PHY_INTERFACE_MODE_NA;
 	err = of_get_phy_mode(dn, &phy_mode);
 	if (err < 0) {



From lede-commits at lists.infradead.org  Sun Aug 17 08:32:23 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 11:32:23 -0400
Subject: [openwrt/openwrt]  realtek: add rtl8231-aux to rtl931x.dtsi
In-Reply-To: <175544474228.2916705.285609659893897879@git-01.infra.openwrt.org>
References: <175544474228.2916705.285609659893897879@git-01.infra.openwrt.org>
Message-ID: <mailman.121650.1755444745.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9dbc04785c4e13c2b7ceeaf00a5565d4d42f65d9

commit 9dbc04785c4e13c2b7ceeaf00a5565d4d42f65d9
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Thu Aug 14 07:18:22 2025 -0400

    realtek: add rtl8231-aux to rtl931x.dtsi
    
    The RTL8231 auxiliary controller is not defined in the rtl931x.dtsi.
    Additionally the pinmux is configured at the wrong address. Fix
    this.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19776
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/dts/rtl931x.dtsi | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/target/linux/realtek/dts/rtl931x.dtsi b/target/linux/realtek/dts/rtl931x.dtsi
index ff3d5c8f29..2335d33932 100644
--- a/target/linux/realtek/dts/rtl931x.dtsi
+++ b/target/linux/realtek/dts/rtl931x.dtsi
@@ -210,25 +210,29 @@
 
 			status = "disabled";
 		};
+
+		mdio_aux: mdio-aux {
+			compatible = "realtek,rtl9310-aux-mdio";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			pinctrl-0 = <&pinmux_gpio_mdio_en>;
+			pinctrl-names = "default";
+
+			status = "disabled";
+		};
 	};
 
-	pinmux: pinmux at 1b001358 {
+	pinmux at 1b0007d4 {
 		compatible = "pinctrl-single";
-		reg = <0x1b001358 0x4>;
+		reg = <0x1b0007d4 0x4>;
 
 		pinctrl-single,bit-per-mux;
 		pinctrl-single,register-width = <32>;
 		pinctrl-single,function-mask = <0x1>;
 		#pinctrl-cells = <2>;
 
-		/* Enable GPIO6 and GPIO7, possibly unknown others */
-		pinmux_disable_jtag: disable_jtag {
-			pinctrl-single,bits = <0x0 0x0 0x8000>;
-		};
-
-		/* Controls GPIO0 */
-		pinmux_disable_sys_led: disable_sys_led {
-			pinctrl-single,bits = <0x0 0x0 0x100>;
+		pinmux_gpio_mdio_en: gpio-mdio-en {
+			pinctrl-single,bits = <0x0 0x100 0x100>;
 		};
 	};
 



From lede-commits at lists.infradead.org  Sun Aug 17 08:32:22 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 11:32:22 -0400
Subject: [openwrt/openwrt]  realtek: rtl8231-aux: add RTL931x support
In-Reply-To: <175544474228.2916705.285609659893897879@git-01.infra.openwrt.org>
References: <175544474228.2916705.285609659893897879@git-01.infra.openwrt.org>
Message-ID: <mailman.121651.1755444745.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2cb7044f79947164171d77340b2ac726dbff33df

commit 2cb7044f79947164171d77340b2ac726dbff33df
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Thu Aug 14 07:13:49 2025 -0400

    realtek: rtl8231-aux: add RTL931x support
    
    The auxiliary RTL8231 controller driver is missing RTL931x support.
    Add it by defining the proper register and matching compatible.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19776
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...23-net-mdio-Add-Realtek-Otto-auxiliary-controller.patch | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/target/linux/realtek/patches-6.12/723-net-mdio-Add-Realtek-Otto-auxiliary-controller.patch b/target/linux/realtek/patches-6.12/723-net-mdio-Add-Realtek-Otto-auxiliary-controller.patch
index 7315899b3f..ad11b90752 100644
--- a/target/linux/realtek/patches-6.12/723-net-mdio-Add-Realtek-Otto-auxiliary-controller.patch
+++ b/target/linux/realtek/patches-6.12/723-net-mdio-Add-Realtek-Otto-auxiliary-controller.patch
@@ -49,7 +49,7 @@ Signed-off-by: Sander Vanheule <sander at svanheule.net>
  obj-$(CONFIG_MDIO_THUNDER)		+= mdio-thunder.o
 --- /dev/null
 +++ b/drivers/net/mdio/mdio-realtek-otto-aux.c
-@@ -0,0 +1,175 @@
+@@ -0,0 +1,187 @@
 +// SPDX-License-Identifier: GPL-2.0-or-later
 +
 +#include <linux/mfd/core.h>
@@ -65,6 +65,7 @@ Signed-off-by: Sander Vanheule <sander at svanheule.net>
 +#define RTL8380_EXT_GPIO_INDIRECT_ACCESS	0xA09C
 +#define RTL8390_EXT_GPIO_INDIRECT_ACCESS	0x0224
 +#define RTL9300_EXT_GPIO_INDIRECT_ACCESS	0xC620
++#define RTL9310_EXT_GPIO_INDIRECT_ACCESS	0x07F4
 +
 +#define RTL83XX_AUX_MDIO_DATA_OFFSET		16
 +#define RTL83XX_AUX_MDIO_RCMD_FAIL		0
@@ -106,6 +107,13 @@ Signed-off-by: Sander Vanheule <sander at svanheule.net>
 +	.timeout_us = 19000,
 +};
 +
++static const struct realtek_aux_mdio_info info_rtl931x = {
++	.cmd_reg = RTL9310_EXT_GPIO_INDIRECT_ACCESS,
++	.data_offset = RTL93XX_AUX_MDIO_DATA_OFFSET,
++	.rcmd_fail_mask = RTL93XX_AUX_MDIO_RCMD_FAIL,
++	.timeout_us = 19000,
++};
++
 +struct realtek_aux_mdio_ctrl {
 +	struct device *dev;
 +	struct regmap *map;
@@ -209,6 +217,10 @@ Signed-off-by: Sander Vanheule <sander at svanheule.net>
 +		.compatible = "realtek,rtl9300-aux-mdio",
 +		.data = &info_rtl930x,
 +	},
++	{
++		.compatible = "realtek,rtl9310-aux-mdio",
++		.data = &info_rtl931x,
++	},
 +	{ /* sentinel */ }
 +};
 +MODULE_DEVICE_TABLE(of, realtek_aux_mdio_of_match);



From lede-commits at lists.infradead.org  Sun Aug 17 08:32:24 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 11:32:24 -0400
Subject: [openwrt/openwrt]  realtek: add RTL8231 driver configuration to
 kernel build
In-Reply-To: <175544474228.2916705.285609659893897879@git-01.infra.openwrt.org>
References: <175544474228.2916705.285609659893897879@git-01.infra.openwrt.org>
Message-ID: <mailman.121652.1755444746.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/992ca859e39f76677be43358b3084876bc2ee83a

commit 992ca859e39f76677be43358b3084876bc2ee83a
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Thu Aug 14 07:21:39 2025 -0400

    realtek: add RTL8231 driver configuration to kernel build
    
    Now that the driver has been enhanced for RTL931x devices and
    the DTS is up to date, activate the needed kernel configuration
    for the two RTL931x subtargets.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19776
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/rtl931x/config-6.12      | 6 ++++--
 target/linux/realtek/rtl931x_nand/config-6.12 | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/target/linux/realtek/rtl931x/config-6.12 b/target/linux/realtek/rtl931x/config-6.12
index 5762ca139d..51887043a0 100644
--- a/target/linux/realtek/rtl931x/config-6.12
+++ b/target/linux/realtek/rtl931x/config-6.12
@@ -112,6 +112,7 @@ CONFIG_IRQ_WORK=y
 CONFIG_JFFS2_ZLIB=y
 CONFIG_KMAP_LOCAL=y
 CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_RTL8231 is not set
 CONFIG_LIBFDT=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_MACH_REALTEK_RTL=y
@@ -120,9 +121,9 @@ CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
 CONFIG_MDIO_I2C=y
-# CONFIG_MDIO_REALTEK_OTTO_AUX is not set
+CONFIG_MDIO_REALTEK_OTTO_AUX=y
 CONFIG_MDIO_SMBUS=y
-# CONFIG_MFD_RTL8231 is not set
+CONFIG_MFD_RTL8231=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGRATION=y
 CONFIG_MIPS=y
@@ -196,6 +197,7 @@ CONFIG_PHYLIB=y
 CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYLINK=y
 CONFIG_PINCTRL=y
+CONFIG_PINCTRL_RTL8231=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_SYSCON=y
 CONFIG_PREEMPT_NONE_BUILD=y
diff --git a/target/linux/realtek/rtl931x_nand/config-6.12 b/target/linux/realtek/rtl931x_nand/config-6.12
index df7505522a..e65b6043fe 100644
--- a/target/linux/realtek/rtl931x_nand/config-6.12
+++ b/target/linux/realtek/rtl931x_nand/config-6.12
@@ -112,6 +112,7 @@ CONFIG_IRQ_WORK=y
 CONFIG_JFFS2_ZLIB=y
 CONFIG_KMAP_LOCAL=y
 CONFIG_LEDS_GPIO=y
+# CONFIG_LEDS_RTL8231 is not set
 CONFIG_LIBFDT=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_MACH_REALTEK_RTL=y
@@ -120,9 +121,9 @@ CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
 CONFIG_MDIO_I2C=y
-# CONFIG_MDIO_REALTEK_OTTO_AUX is not set
+CONFIG_MDIO_REALTEK_OTTO_AUX=y
 CONFIG_MDIO_SMBUS=y
-# CONFIG_MFD_RTL8231 is not set
+CONFIG_MFD_RTL8231=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGRATION=y
 CONFIG_MIPS=y
@@ -200,6 +201,7 @@ CONFIG_PHYLIB=y
 CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYLINK=y
 CONFIG_PINCTRL=y
+CONFIG_PINCTRL_RTL8231=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_SYSCON=y
 CONFIG_PREEMPT_NONE_BUILD=y



From lede-commits at lists.infradead.org  Sun Aug 17 08:37:51 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 11:37:51 -0400
Subject: [openwrt/openwrt]  ipset: update to 7.24
In-Reply-To: <175544507159.2936759.17850616382582388697@git-01.infra.openwrt.org>
References: <175544507159.2936759.17850616382582388697@git-01.infra.openwrt.org>
Message-ID: <mailman.121653.1755445075.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ca6d648382fe4d65c1f59cf0fc8f9fd7be26d69f

commit ca6d648382fe4d65c1f59cf0fc8f9fd7be26d69f
Author: gongzi miao <miaogongzi0227 at gmail.com>
AuthorDate: Sat Aug 9 04:56:01 2025 +0800

    ipset: update to 7.24
    
    release notes:
    7.24: https://www.spinics.net/lists/netfilter-devel/msg91440.html
    7.23: https://www.spinics.net/lists/netfilter-devel/msg89840.html
    7.22: https://www.spinics.net/lists/netfilter-devel/msg86745.html
    
    Signed-off-by: gongzi miao <miaogongzi0227 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19719
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/network/utils/ipset/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/utils/ipset/Makefile b/package/network/utils/ipset/Makefile
index c62bbd8b68..8ba7999554 100644
--- a/package/network/utils/ipset/Makefile
+++ b/package/network/utils/ipset/Makefile
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ipset
-PKG_VERSION:=7.21
+PKG_VERSION:=7.24
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://ipset.netfilter.org
-PKG_HASH:=e2c6ce4fcf3acb3893ca5d35c86935f80ad76fc5ccae601185842df760e0bc69
+PKG_HASH:=fbe3424dff222c1cb5e5c34d38b64524b2217ce80226c14fdcbb13b29ea36112
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Sun Aug 17 09:56:21 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 12:56:21 -0400
Subject: [openwrt/openwrt]  mt7621: zyxel nwa-ax: set mac address in dts
In-Reply-To: <175544978116.3207550.8348984361754913885@git-01.infra.openwrt.org>
References: <175544978116.3207550.8348984361754913885@git-01.infra.openwrt.org>
Message-ID: <mailman.121680.1755449785.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1180dd6bf7197e40ccafddb707cfef8ccb39dfa5

commit 1180dd6bf7197e40ccafddb707cfef8ccb39dfa5
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Wed Aug 13 16:34:05 2025 -0700

    mt7621: zyxel nwa-ax: set mac address in dts
    
    Support in mt76 has existed for quite a while. Use it.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19771
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi     | 20 ++++++++++++++++++--
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac          |  6 ------
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi b/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi
index cd6f63a78e..4505eb9c77 100644
--- a/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi
+++ b/target/linux/ramips/dts/mt7621_zyxel_nwa-ax.dtsi
@@ -117,7 +117,9 @@
 				#size-cells = <1>;
 
 				macaddr_mrd_1fff8: macaddr at 1fff8 {
+					compatible = "mac-base";
 					reg = <0x1fff8 0x6>;
+					#nvmem-cell-cells = <1>;
 				};
 			};
 		};
@@ -134,12 +136,26 @@
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
 		nvmem-cell-names = "eeprom", "precal";
-		/* MAC-Address set in userspace */
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		band at 0 {
+			reg = <0>;
+			nvmem-cells = <&macaddr_mrd_1fff8 0>;
+			nvmem-cell-names = "mac-address";
+		};
+
+		band at 1 {
+			reg = <1>;
+			nvmem-cells = <&macaddr_mrd_1fff8 1>;
+			nvmem-cell-names = "mac-address";
+		};
 	};
 };
 
 &gmac0 {
-	nvmem-cells = <&macaddr_mrd_1fff8>;
+	nvmem-cells = <&macaddr_mrd_1fff8 0>;
 	nvmem-cell-names = "mac-address";
 };
 
diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 21ab3f16ea..2dd11f6760 100644
--- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -245,12 +245,6 @@ case "$board" in
 		[ "$PHYNBR" = "0" ] && macaddr_setbit_la "$hw_mac_addr" > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && echo -n "$hw_mac_addr" > /sys${DEVPATH}/macaddress
 		;;
-	zyxel,nwa50ax|\
-	zyxel,nwa55axe)
-		hw_mac_addr="$(mtd_get_mac_binary mrd 0x1fff8)"
-		[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
-		[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
-		;;
 	zyxel,wsm20)
 		hw_mac_addr="$(mtd_get_mac_binary Factory 0x1fdfa)"
 		[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress



From lede-commits at lists.infradead.org  Sun Aug 17 10:01:39 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 13:01:39 -0400
Subject: [openwrt/openwrt]  fman-ucode: Bump to lf-6.12.20-2.0.0
In-Reply-To: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
References: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
Message-ID: <mailman.121681.1755450102.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3b73b15e2d3a0f4134532cd77135eb5d6780a4e6

commit 3b73b15e2d3a0f4134532cd77135eb5d6780a4e6
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Sun Jun 8 16:14:40 2025 +0200

    fman-ucode: Bump to lf-6.12.20-2.0.0
    
    Bump fman-ucode to version lf-6.12.20-2.0.0.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19152
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/layerscape/fman-ucode/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/layerscape/fman-ucode/Makefile b/package/firmware/layerscape/fman-ucode/Makefile
index 2056bc5a99..825983b2d1 100644
--- a/package/firmware/layerscape/fman-ucode/Makefile
+++ b/package/firmware/layerscape/fman-ucode/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fman-ucode
-PKG_VERSION:=6.6.3.1.0.0
+PKG_VERSION:=6.12.20.2.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/qoriq-fm-ucode
-PKG_SOURCE_VERSION:=lf-6.6.3-1.0.0
-PKG_MIRROR_HASH:=6bb9dd8ae0ac7b2ba0e5bc5e0590732167844a1b2c9316fbdcdd04e600785b0c
+PKG_SOURCE_VERSION:=lf-6.12.20-2.0.0
+PKG_MIRROR_HASH:=15b5df228b23b4cbdd1af484c98069b558d32ece15a80f0dabe22af6e5ee1ba1
 
 PKG_FLAGS:=nonshared
 



From lede-commits at lists.infradead.org  Sun Aug 17 10:01:45 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 13:01:45 -0400
Subject: [openwrt/openwrt]  kernel/layerscape: Create kernel files for v6.12
 (from v6.6)
In-Reply-To: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
References: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
Message-ID: <mailman.121684.1755450102.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c3a94894c9eb3823d6d5e018f0a2dd4dfb3a9f2c

commit c3a94894c9eb3823d6d5e018f0a2dd4dfb3a9f2c
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Sun Jun 8 10:40:24 2025 +0200

    kernel/layerscape: Create kernel files for v6.12 (from v6.6)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19152
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/layerscape/armv7/{config-6.6 => config-6.12}                 | 0
 target/linux/layerscape/armv8_64b/{config-6.6 => config-6.12}             | 0
 .../302-arm64-dts-ls1012a-update-with-ppfe-support.patch                  | 0
 .../303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch        | 0
 .../304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch        | 0
 .../305-arm64-dts-ls1046a-rdb-Update-qspi-spi-rx-bus-width-t.patch        | 0
 .../400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch        | 0
 .../{patches-6.6 => patches-6.12}/701-staging-add-fsl_ppfe-driver.patch   | 0
 .../702-phy-Add-2.5G-SGMII-interface-mode.patch                           | 0
 .../703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch        | 0
 10 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/layerscape/armv7/config-6.6 b/target/linux/layerscape/armv7/config-6.12
similarity index 100%
rename from target/linux/layerscape/armv7/config-6.6
rename to target/linux/layerscape/armv7/config-6.12
diff --git a/target/linux/layerscape/armv8_64b/config-6.6 b/target/linux/layerscape/armv8_64b/config-6.12
similarity index 100%
rename from target/linux/layerscape/armv8_64b/config-6.6
rename to target/linux/layerscape/armv8_64b/config-6.12
diff --git a/target/linux/layerscape/patches-6.6/302-arm64-dts-ls1012a-update-with-ppfe-support.patch b/target/linux/layerscape/patches-6.12/302-arm64-dts-ls1012a-update-with-ppfe-support.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.6/302-arm64-dts-ls1012a-update-with-ppfe-support.patch
rename to target/linux/layerscape/patches-6.12/302-arm64-dts-ls1012a-update-with-ppfe-support.patch
diff --git a/target/linux/layerscape/patches-6.6/303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch b/target/linux/layerscape/patches-6.12/303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.6/303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch
rename to target/linux/layerscape/patches-6.12/303-arm64-dts-ls1012a-frdm-workaround-by-updating-qspi-f.patch
diff --git a/target/linux/layerscape/patches-6.6/304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch b/target/linux/layerscape/patches-6.12/304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.6/304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch
rename to target/linux/layerscape/patches-6.12/304-arm64-dts-ls1012a-rdb-workaround-by-updating-qspi-fl.patch
diff --git a/target/linux/layerscape/patches-6.6/305-arm64-dts-ls1046a-rdb-Update-qspi-spi-rx-bus-width-t.patch b/target/linux/layerscape/patches-6.12/305-arm64-dts-ls1046a-rdb-Update-qspi-spi-rx-bus-width-t.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.6/305-arm64-dts-ls1046a-rdb-Update-qspi-spi-rx-bus-width-t.patch
rename to target/linux/layerscape/patches-6.12/305-arm64-dts-ls1046a-rdb-Update-qspi-spi-rx-bus-width-t.patch
diff --git a/target/linux/layerscape/patches-6.6/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch b/target/linux/layerscape/patches-6.12/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.6/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
rename to target/linux/layerscape/patches-6.12/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
diff --git a/target/linux/layerscape/patches-6.6/701-staging-add-fsl_ppfe-driver.patch b/target/linux/layerscape/patches-6.12/701-staging-add-fsl_ppfe-driver.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.6/701-staging-add-fsl_ppfe-driver.patch
rename to target/linux/layerscape/patches-6.12/701-staging-add-fsl_ppfe-driver.patch
diff --git a/target/linux/layerscape/patches-6.6/702-phy-Add-2.5G-SGMII-interface-mode.patch b/target/linux/layerscape/patches-6.12/702-phy-Add-2.5G-SGMII-interface-mode.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.6/702-phy-Add-2.5G-SGMII-interface-mode.patch
rename to target/linux/layerscape/patches-6.12/702-phy-Add-2.5G-SGMII-interface-mode.patch
diff --git a/target/linux/layerscape/patches-6.6/703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch b/target/linux/layerscape/patches-6.12/703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch
similarity index 100%
rename from target/linux/layerscape/patches-6.6/703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch
rename to target/linux/layerscape/patches-6.12/703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch



From lede-commits at lists.infradead.org  Sun Aug 17 10:01:40 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 13:01:40 -0400
Subject: [openwrt/openwrt]  ls-ddr-phy: bump to lf-6.12.20-2.0.0
In-Reply-To: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
References: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
Message-ID: <mailman.121685.1755450105.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1beaad1c31414f608780e7710f19eb7f536fe6a3

commit 1beaad1c31414f608780e7710f19eb7f536fe6a3
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Sun Jun 8 16:18:15 2025 +0200

    ls-ddr-phy: bump to lf-6.12.20-2.0.0
    
    Bump ls-ddr-phy to version lf-6.12.20-2.0.0.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19152
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/layerscape/ls-ddr-phy/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/layerscape/ls-ddr-phy/Makefile b/package/firmware/layerscape/ls-ddr-phy/Makefile
index 322f383bd6..ff7637ce2f 100644
--- a/package/firmware/layerscape/ls-ddr-phy/Makefile
+++ b/package/firmware/layerscape/ls-ddr-phy/Makefile
@@ -6,13 +6,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ls-ddr-phy
-PKG_VERSION:=6.6.3.1.0.0
+PKG_VERSION:=6.12.20.2.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/NXP/ddr-phy-binary.git
-PKG_SOURCE_VERSION:=lf-6.6.3-1.0.0
-PKG_MIRROR_HASH:=7a1a35b3060adba875c507be3a5c800fa0c461103aaeb8eb0eab11f1f4b8139f
+PKG_SOURCE_VERSION:=lf-6.12.20-2.0.0
+PKG_MIRROR_HASH:=162616b23041e345a9a12080005ee1c24c9903d6809c60a022588a1c7f5b1577
 PKG_BUILD_DEPENDS:=tfa-layerscape/host
 
 PKG_LICENSE:=EULA



From lede-commits at lists.infradead.org  Sun Aug 17 10:01:43 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 13:01:43 -0400
Subject: [openwrt/openwrt]  uboot-layerscape: bump to lf-6.12.20-2.0.0
In-Reply-To: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
References: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
Message-ID: <mailman.121686.1755450105.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c773c3f4d3771080c98bbab78cdcf623e4c837af

commit c773c3f4d3771080c98bbab78cdcf623e4c837af
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Sun Jun 8 16:36:31 2025 +0200

    uboot-layerscape: bump to lf-6.12.20-2.0.0
    
    This commit bumps u-boot layerscape package to lf-6.12.20-2.0.0 version.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19152
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/boot/uboot-layerscape/Makefile                      |  6 +++---
 ...0-layerscape-adjust-LS1021A-IOT-config-for-OpenWrt.patch | 13 ++++++-------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile
index ba0bd113da..3fad12efe4 100644
--- a/package/boot/uboot-layerscape/Makefile
+++ b/package/boot/uboot-layerscape/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=uboot-layerscape
-PKG_VERSION:=6.6.23.2.0.0
+PKG_VERSION:=6.12.20.2.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/u-boot
-PKG_SOURCE_VERSION:=lf-6.6.23-2.0.0
-PKG_MIRROR_HASH:=41e089fde1d0b3b0998e6af33d5f4c2b62860bda6cd1e6a0e8d47dfd5749005d
+PKG_SOURCE_VERSION:=lf-6.12.20-2.0.0
+PKG_MIRROR_HASH:=13594333aa3ee131d5832b4da88f73cf0744d98c28e90ad3e03594788c486e37
 
 include $(INCLUDE_DIR)/u-boot.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/boot/uboot-layerscape/patches/0900-layerscape-adjust-LS1021A-IOT-config-for-OpenWrt.patch b/package/boot/uboot-layerscape/patches/0900-layerscape-adjust-LS1021A-IOT-config-for-OpenWrt.patch
index c2a13e27f7..5a62cc387b 100644
--- a/package/boot/uboot-layerscape/patches/0900-layerscape-adjust-LS1021A-IOT-config-for-OpenWrt.patch
+++ b/package/boot/uboot-layerscape/patches/0900-layerscape-adjust-LS1021A-IOT-config-for-OpenWrt.patch
@@ -17,24 +17,23 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
 
 --- a/configs/ls1021aiot_sdcard_defconfig
 +++ b/configs/ls1021aiot_sdcard_defconfig
-@@ -14,7 +14,7 @@ CONFIG_SYS_I2C_MXC_I2C3=y
+@@ -13,14 +13,14 @@ CONFIG_SYS_I2C_MXC_I2C2=y
+ CONFIG_SYS_I2C_MXC_I2C3=y
  CONFIG_DM_GPIO=y
  CONFIG_DEFAULT_DEVICE_TREE="ls1021a-iot-duart"
- CONFIG_SPL_TEXT_BASE=0x10000000
 -CONFIG_SYS_MONITOR_LEN=524288
 +CONFIG_SYS_MONITOR_LEN=786432
  CONFIG_SPL_MMC=y
  CONFIG_SPL_SERIAL=y
  CONFIG_SPL_STACK=0x1001d000
-@@ -43,7 +43,7 @@ CONFIG_SPL_MAX_SIZE=0x1a000
- CONFIG_SPL_PAD_TO=0x1c000
+ CONFIG_SPL_TEXT_BASE=0x10000000
  CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
  CONFIG_SPL_BSS_START_ADDR=0x80100000
 -CONFIG_SPL_BSS_MAX_SIZE=0x80000
 +CONFIG_SPL_BSS_MAX_SIZE=0xc0000
- CONFIG_SPL_FSL_PBL=y
- # CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
- CONFIG_SPL_SYS_MALLOC=y
+ CONFIG_SYS_LOAD_ADDR=0x82000000
+ CONFIG_SPL=y
+ CONFIG_PCI=y
 @@ -67,8 +67,11 @@ CONFIG_CMD_MII=y
  # CONFIG_CMD_MDIO is not set
  CONFIG_CMD_PING=y



From lede-commits at lists.infradead.org  Sun Aug 17 10:01:41 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 13:01:41 -0400
Subject: [openwrt/openwrt]  ls-rcw: Bump to lf-6.12.20-2.0.0
In-Reply-To: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
References: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
Message-ID: <mailman.121687.1755450105.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/430ad5dca49fa7c0f4cdb6c28392003bb19cca8e

commit 430ad5dca49fa7c0f4cdb6c28392003bb19cca8e
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Sun Jun 8 16:26:51 2025 +0200

    ls-rcw: Bump to lf-6.12.20-2.0.0
    
    Bump ls-rcw package to lf-6.12.20-2.0.0.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19152
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/layerscape/ls-rcw/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/layerscape/ls-rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile
index 901b0b72ef..e50011e7bc 100644
--- a/package/firmware/layerscape/ls-rcw/Makefile
+++ b/package/firmware/layerscape/ls-rcw/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ls-rcw
-PKG_VERSION:=6.6.23.2.0.0
+PKG_VERSION:=6.12.20.2.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/rcw
-PKG_SOURCE_VERSION:=lf-6.6.23-2.0.0
-PKG_MIRROR_HASH:=f5e62ac040564eb97f4d1c58496a1586a470008469cb4daee6d7c70be7fdfa07
+PKG_SOURCE_VERSION:=lf-6.12.20-2.0.0
+PKG_MIRROR_HASH:=8436e04a01fa7a0da3512dae035b47122691fc860fa2c36da20552bceec9246a
 
 PKG_FLAGS:=nonshared
 



From lede-commits at lists.infradead.org  Sun Aug 17 10:01:44 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 13:01:44 -0400
Subject: [openwrt/openwrt]  tfa-layerscape: Bump to lf-6.12.20-2.0.0
In-Reply-To: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
References: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
Message-ID: <mailman.121688.1755450105.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d4ce853945a6c1b6e496ae7176736df1eab3c00c

commit d4ce853945a6c1b6e496ae7176736df1eab3c00c
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Sat Jun 21 07:41:46 2025 +0200

    tfa-layerscape: Bump to lf-6.12.20-2.0.0
    
    Bump tfa-layerscape to version lf-6.12.20-2.0.0
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19152
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/boot/tfa-layerscape/Makefile               | 10 +--
 .../patches/001-fiptool-hostbuild-fixes.patch      | 72 +++++++++++-----------
 ...ols-fix-create_pbl-and-byte_swap-host-bui.patch | 16 ++---
 3 files changed, 49 insertions(+), 49 deletions(-)

diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile
index a6519ca02d..ab885b4b85 100644
--- a/package/boot/tfa-layerscape/Makefile
+++ b/package/boot/tfa-layerscape/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tfa-layerscape
-PKG_VERSION:=6.6.23.2.0.0
-PKG_RELEASE:=2
+PKG_VERSION:=6.12.20.2.0.0
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/atf
-PKG_SOURCE_VERSION:=lf-6.6.23-2.0.0
-PKG_MIRROR_HASH:=628a95ba60a593ae0575ee9ede1154445ec3a86a07b18e4947e06e13c2b67859
+PKG_SOURCE_VERSION:=lf-6.12.20-2.0.0
+PKG_MIRROR_HASH:=1e1c74900113a8d4354c06fdcedfff2cd6b0899b4a063d393de98f8ca358dfd2
 PKG_BUILD_DEPENDS:=tfa-layerscape/host
 
 include $(INCLUDE_DIR)/host-build.mk
@@ -162,7 +162,7 @@ TFA_TARGETS := \
   lx2160a-rdb-sdboot
 
 TFA_MAKE_FLAGS += \
-	$(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-no-warn-rwx-segments") \
+	$(if $(CONFIG_BINUTILS_VERSION_2_37)$(CONFIG_BINUTILS_VERSION_2_38),,LDFLAGS="-Wl,--no-warn-rwx-segments") \
 	fip pbl \
 	BOOT_MODE=$(BOOT_MODE) \
 	RCW=$(STAGING_DIR_IMAGE)/fsl_$(BUILD_VARIANT)-rcw.bin \
diff --git a/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch b/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch
index db91bd75dd..2a891277ab 100644
--- a/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch
+++ b/package/boot/tfa-layerscape/patches/001-fiptool-hostbuild-fixes.patch
@@ -1,6 +1,6 @@
 --- a/Makefile
 +++ b/Makefile
-@@ -128,10 +128,6 @@ CRTTOOL			?=	${CRTTOOLPATH}/cert_create$
+@@ -105,10 +105,6 @@ CRTTOOL			?=	${CRTTOOLPATH}/cert_create$
  ENCTOOLPATH		?=	tools/encrypt_fw
  ENCTOOL			?=	${ENCTOOLPATH}/encrypt_fw${BIN_EXT}
  
@@ -11,55 +11,55 @@
  # Variables for use with sptool
  SPTOOLPATH		?=	tools/sptool
  SPTOOL			?=	${SPTOOLPATH}/sptool.py
-@@ -1597,13 +1593,6 @@ endif #(CHECKPATCH)
+@@ -1622,13 +1618,6 @@ endif #(CHECKPATCH)
  clean:
- 	@echo "  CLEAN"
+ 	$(s)echo "  CLEAN"
  	$(call SHELL_REMOVE_DIR,${BUILD_PLAT})
 -ifdef UNIX_MK
--	${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
+-	$(q)${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
 -else
 -# Clear the MAKEFLAGS as we do not want
 -# to pass the gnumake flags to nmake.
--	${Q}set MAKEFLAGS= && ${MSVC_NMAKE} /nologo /f ${FIPTOOLPATH}/Makefile.msvc FIPTOOLPATH=$(subst /,\,$(FIPTOOLPATH)) FIPTOOL=$(subst /,\,$(FIPTOOL)) clean
+-	$(q)set MAKEFLAGS= && ${MSVC_NMAKE} /nologo /f ${FIPTOOLPATH}/Makefile.msvc FIPTOOLPATH=$(subst /,\,$(FIPTOOLPATH)) FIPTOOL=$(subst /,\,$(FIPTOOL)) clean
 -endif #(UNIX_MK)
- 	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} clean
- 	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${ENCTOOLPATH} clean
- 	${Q}${MAKE} --no-print-directory -C ${ROMLIBPATH} clean
-@@ -1612,13 +1601,6 @@ realclean distclean:
- 	@echo "  REALCLEAN"
+ 	$(q)${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} clean
+ 	$(q)${MAKE} PLAT=${PLAT} --no-print-directory -C ${ENCTOOLPATH} clean
+ 	$(q)${MAKE} --no-print-directory -C ${ROMLIBPATH} clean
+@@ -1637,13 +1626,6 @@ realclean distclean:
+ 	$(s)echo "  REALCLEAN"
  	$(call SHELL_REMOVE_DIR,${BUILD_BASE})
  	$(call SHELL_DELETE_ALL, ${CURDIR}/cscope.*)
 -ifdef UNIX_MK
--	${Q}${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
+-	$(q)${MAKE} --no-print-directory -C ${FIPTOOLPATH} clean
 -else
 -# Clear the MAKEFLAGS as we do not want
 -# to pass the gnumake flags to nmake.
--	${Q}set MAKEFLAGS= && ${MSVC_NMAKE} /nologo /f ${FIPTOOLPATH}/Makefile.msvc FIPTOOLPATH=$(subst /,\,$(FIPTOOLPATH)) FIPTOOL=$(subst /,\,$(FIPTOOL)) realclean
+-	$(q)set MAKEFLAGS= && ${MSVC_NMAKE} /nologo /f ${FIPTOOLPATH}/Makefile.msvc FIPTOOLPATH=$(subst /,\,$(FIPTOOLPATH)) FIPTOOL=$(subst /,\,$(FIPTOOL)) realclean
 -endif #(UNIX_MK)
- 	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} realclean
- 	${Q}${MAKE} PLAT=${PLAT} --no-print-directory -C ${ENCTOOLPATH} realclean
- 	${Q}${MAKE} --no-print-directory -C ${ROMLIBPATH} clean
-@@ -1674,7 +1656,7 @@ certificates: ${CRT_DEPS} ${CRTTOOL}
- 	@${ECHO_BLANK_LINE}
+ 	$(q)${MAKE} PLAT=${PLAT} --no-print-directory -C ${CRTTOOLPATH} realclean
+ 	$(q)${MAKE} PLAT=${PLAT} --no-print-directory -C ${ENCTOOLPATH} realclean
+ 	$(q)${MAKE} --no-print-directory -C ${ROMLIBPATH} clean
+@@ -1698,7 +1680,7 @@ certificates: ${CRT_DEPS} ${CRTTOOL}
+ 	$(s)echo
  endif #(GENERATE_COT)
  
 -${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS} ${FIPTOOL}
 +${BUILD_PLAT}/${FIP_NAME}: ${FIP_DEPS}
  	$(eval ${CHECK_FIP_CMD})
- 	${Q}${FIPTOOL} create ${FIP_ARGS} $@
- 	${Q}${FIPTOOL} info $@
-@@ -1691,7 +1673,7 @@ fwu_certificates: ${FWU_CRT_DEPS} ${CRTT
- 	@${ECHO_BLANK_LINE}
+ 	$(q)${FIPTOOL} create ${FIP_ARGS} $@
+ 	$(q)${FIPTOOL} info $@
+@@ -1715,7 +1697,7 @@ fwu_certificates: ${FWU_CRT_DEPS} ${CRTT
+ 	$(s)echo
  endif #(GENERATE_COT)
  
 -${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP_DEPS} ${FIPTOOL}
 +${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP_DEPS}
  	$(eval ${CHECK_FWU_FIP_CMD})
- 	${Q}${FIPTOOL} create ${FWU_FIP_ARGS} $@
- 	${Q}${FIPTOOL} info $@
-@@ -1699,19 +1681,9 @@ ${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP
- 	@echo "Built $@ successfully"
- 	@${ECHO_BLANK_LINE}
+ 	$(q)${FIPTOOL} create ${FWU_FIP_ARGS} $@
+ 	$(q)${FIPTOOL} info $@
+@@ -1723,19 +1705,9 @@ ${BUILD_PLAT}/${FWU_FIP_NAME}: ${FWU_FIP
+ 	$(s)echo "Built $@ successfully"
+ 	$(s)echo
  
 -fiptool: ${FIPTOOL}
  fip: ${BUILD_PLAT}/${FIP_NAME}
@@ -67,27 +67,27 @@
  
 -${FIPTOOL}: FORCE
 -ifdef UNIX_MK
--	${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" FIPTOOL=${FIPTOOL} OPENSSL_DIR=${OPENSSL_DIR} DEBUG=${DEBUG} V=${V} --no-print-directory -C ${FIPTOOLPATH} all
+-	$(q)${MAKE} PLAT=${PLAT} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" FIPTOOL=${FIPTOOL} OPENSSL_DIR=${OPENSSL_DIR} DEBUG=${DEBUG} --no-print-directory -C ${FIPTOOLPATH} all
 -else
 -# Clear the MAKEFLAGS as we do not want
 -# to pass the gnumake flags to nmake.
--	${Q}set MAKEFLAGS= && ${MSVC_NMAKE} /nologo /f ${FIPTOOLPATH}/Makefile.msvc FIPTOOLPATH=$(subst /,\,$(FIPTOOLPATH)) FIPTOOL=$(subst /,\,$(FIPTOOL))
+-	$(q)set MAKEFLAGS= && ${MSVC_NMAKE} /nologo /f ${FIPTOOLPATH}/Makefile.msvc FIPTOOLPATH=$(subst /,\,$(FIPTOOLPATH)) FIPTOOL=$(subst /,\,$(FIPTOOL))
 -endif #(UNIX_MK)
 -
  romlib.bin: libraries FORCE
- 	${Q}${MAKE} PLAT_DIR=${PLAT_DIR} BUILD_PLAT=${BUILD_PLAT} ENABLE_BTI=${ENABLE_BTI} ARM_ARCH_MINOR=${ARM_ARCH_MINOR} INCLUDES='${INCLUDES}' DEFINES='${DEFINES}' --no-print-directory -C ${ROMLIBPATH} all
+ 	$(q)${MAKE} PLAT_DIR=${PLAT_DIR} BUILD_PLAT=${BUILD_PLAT} ENABLE_BTI=${ENABLE_BTI} ARM_ARCH_MINOR=${ARM_ARCH_MINOR} INCLUDES=$(call escape-shell,$(INCLUDES)) DEFINES=$(call escape-shell,$(DEFINES)) --no-print-directory -C ${ROMLIBPATH} all
  
 --- a/tools/fiptool/Makefile
 +++ b/tools/fiptool/Makefile
-@@ -81,7 +81,7 @@ all: --openssl ${PROJECT}
+@@ -74,7 +74,7 @@ all: --openssl ${PROJECT}
  
  ${PROJECT}: ${OBJECTS} Makefile
- 	@echo "  HOSTLD  $@"
--	${Q}${HOSTCC} ${OBJECTS} -o $@ $(LDOPTS)
-+	${Q}${HOSTCC} ${OBJECTS} -o $@ $(LDOPTS) $(LDFLAGS)
- 	@${ECHO_BLANK_LINE}
- 	@echo "Built $@ successfully"
- 	@${ECHO_BLANK_LINE}
+ 	$(s)echo "  HOSTLD  $@"
+-	$(q)$(host-cc) ${OBJECTS} -o $@ $(LDOPTS)
++	$(q)$(host-cc) ${OBJECTS} -o $@ $(LDOPTS) $(LDFLAGS)
+ 	$(s)echo
+ 	$(s)echo "Built $@ successfully"
+ 	$(s)echo
 --- a/tools/fiptool/plat_fiptool/nxp/plat_fiptool.mk
 +++ b/tools/fiptool/plat_fiptool/nxp/plat_fiptool.mk
 @@ -21,11 +21,11 @@ INCLUDE_PATHS += -I${PLAT_DEF_UUID_OID_C
diff --git a/package/boot/tfa-layerscape/patches/003-plat-nxp-tools-fix-create_pbl-and-byte_swap-host-bui.patch b/package/boot/tfa-layerscape/patches/003-plat-nxp-tools-fix-create_pbl-and-byte_swap-host-bui.patch
index 73c5c66cae..9fd55bd69b 100644
--- a/package/boot/tfa-layerscape/patches/003-plat-nxp-tools-fix-create_pbl-and-byte_swap-host-bui.patch
+++ b/package/boot/tfa-layerscape/patches/003-plat-nxp-tools-fix-create_pbl-and-byte_swap-host-bui.patch
@@ -16,17 +16,17 @@ Signed-off-by: Biwen Li <biwen.li at nxp.com>
 @@ -19,8 +19,6 @@ ifeq ($(RCW),"")
  else
  	# Generate header for bl2.bin
- 	$(Q)$(CST_DIR)/create_hdr_isbc --in ${BUILD_PLAT}/bl2.bin --out ${BUILD_PLAT}/hdr_bl2 ${BL2_INPUT_FILE}
+ 	$(q)$(CST_DIR)/create_hdr_isbc --in ${BUILD_PLAT}/bl2.bin --out ${BUILD_PLAT}/hdr_bl2 ${BL2_INPUT_FILE}
 -	# Compile create_pbl tool
--	${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};\
+-	$(q)${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};\
  	# Add bl2.bin to RCW
  	${CREATE_PBL} -r ${RCW} -i ${BUILD_PLAT}/bl2.bin -b ${BOOT_MODE} -c ${SOC_NUM} -d ${BL2_BASE} -e ${BL2_BASE}\
  			-o ${BUILD_PLAT}/bl2_${BOOT_MODE}.pbl ;\
 @@ -42,7 +40,6 @@ ifeq ($(RCW),"")
- 	${Q}echo "Platform ${PLAT} requires rcw file. Please set RCW to point to the right RCW file for boot mode ${BOOT_MODE}"
+ 	$(s)echo "Platform ${PLAT} requires rcw file. Please set RCW to point to the right RCW file for boot mode ${BOOT_MODE}"
  else
  	# -a option appends the image for Chassis 3 devices in case of non secure boot
--	${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};
+-	$(q)${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};
  	${CREATE_PBL} -r ${RCW} -i ${BUILD_PLAT}/bl2.bin -b ${BOOT_MODE} -c ${SOC_NUM} -d ${BL2_BASE} -e ${BL2_BASE} \
  	-o ${BUILD_PLAT}/bl2_${BOOT_MODE}.pbl ;
  # Swapping of RCW is required for QSPi Chassis 2 devices
@@ -34,19 +34,19 @@ Signed-off-by: Biwen Li <biwen.li at nxp.com>
 +++ b/tools/nxp/create_pbl/pbl_ch3.mk
 @@ -26,9 +26,6 @@ else
  	# Generate header for bl2.bin
- 	$(Q)$(CST_DIR)/create_hdr_isbc --in ${BUILD_PLAT}/bl2.bin --out ${BUILD_PLAT}/hdr_bl2 ${BL2_INPUT_FILE}
+ 	$(q)$(CST_DIR)/create_hdr_isbc --in ${BUILD_PLAT}/bl2.bin --out ${BUILD_PLAT}/hdr_bl2 ${BL2_INPUT_FILE}
  
 -	# Compile create_pbl tool
--	${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};\
+-	$(q)${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};\
 -
  	# Add Block Copy command for bl2.bin to RCW
  	${CREATE_PBL} -r ${RCW} -i ${BUILD_PLAT}/bl2.bin -b ${BOOT_MODE} -c ${SOC_NUM} -d ${BL2_BASE} -e ${BL2_BASE}\
  			-o ${BUILD_PLAT}/bl2_${BOOT_MODE}.pbl -f ${BL2_SRC_OFFSET};\
 @@ -56,8 +53,6 @@ else  #SECURE_BOOT
  ifeq ($(RCW),"")
- 	${Q}echo "Platform ${PLAT} requires rcw file. Please set RCW to point to the right RCW file for boot mode ${BOOT_MODE}"
+ 	$(s)echo "Platform ${PLAT} requires rcw file. Please set RCW to point to the right RCW file for boot mode ${BOOT_MODE}"
  else
--	${Q}${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};
+-	$(q)${MAKE} CPPFLAGS="-DVERSION='\"${VERSION_STRING}\"'" --no-print-directory -C ${CREATE_PBL_TOOL_PATH};
 -
  	# Add Block Copy command and populate boot loc ptrfor bl2.bin to RCW
  	${CREATE_PBL} -r ${RCW} -i ${BUILD_PLAT}/bl2.bin -b ${BOOT_MODE} -c ${SOC_NUM} -d ${BL2_BASE} -e ${BL2_BASE} \



From lede-commits at lists.infradead.org  Sun Aug 17 10:01:42 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 13:01:42 -0400
Subject: [openwrt/openwrt]  ppfe-firmware: Bump to lf-6.12.20-2.0.0
In-Reply-To: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
References: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
Message-ID: <mailman.121691.1755450105.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3930d2c44c3959780cc99768111985028497a06f

commit 3930d2c44c3959780cc99768111985028497a06f
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Sun Jun 8 16:29:27 2025 +0200

    ppfe-firmware: Bump to lf-6.12.20-2.0.0
    
    Bump ppfe-firmware package to lf-6.12.20-2.0.0.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19152
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/layerscape/ppfe-firmware/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/layerscape/ppfe-firmware/Makefile b/package/firmware/layerscape/ppfe-firmware/Makefile
index 2b0c5f3207..52df30c36d 100644
--- a/package/firmware/layerscape/ppfe-firmware/Makefile
+++ b/package/firmware/layerscape/ppfe-firmware/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ppfe
-PKG_VERSION:=6.6.3.1.0.0
+PKG_VERSION:=6.12.20.2.0.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/qoriq-engine-pfe-bin
-PKG_SOURCE_VERSION:=lf-6.6.3-1.0.0
-PKG_MIRROR_HASH:=836da0d1ace6c5896c434940b5f06ae9ddcb871959e9f5aa3df75d67e39aec41
+PKG_SOURCE_VERSION:=lf-6.12.20-2.0.0
+PKG_MIRROR_HASH:=57ff6ebc78e774a12f64ac7d4738621edabdeee3a46c6ee69343ba0a8bff73cd
 
 PKG_FLAGS:=nonshared
 



From lede-commits at lists.infradead.org  Sun Aug 17 10:01:48 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 13:01:48 -0400
Subject: [openwrt/openwrt]  layerscape: 6.12: refresh kernel config
In-Reply-To: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
References: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
Message-ID: <mailman.121692.1755450105.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5bbb991f965aaa81c061890d53d7092639d7fc49

commit 5bbb991f965aaa81c061890d53d7092639d7fc49
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Sun Jun 8 13:49:31 2025 +0200

    layerscape: 6.12: refresh kernel config
    
    Done by `make kernel_oldconfig`.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19152
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/layerscape/armv7/config-6.12     | 32 +++++++--------
 target/linux/layerscape/armv8_64b/config-6.12 | 59 +++++++++++++--------------
 2 files changed, 45 insertions(+), 46 deletions(-)

diff --git a/target/linux/layerscape/armv7/config-6.12 b/target/linux/layerscape/armv7/config-6.12
index a9447291ce..d5e63221e0 100644
--- a/target/linux/layerscape/armv7/config-6.12
+++ b/target/linux/layerscape/armv7/config-6.12
@@ -72,7 +72,6 @@ CONFIG_BLK_MQ_PCI=y
 CONFIG_BLK_MQ_VIRTIO=y
 CONFIG_BLK_PM=y
 CONFIG_BOUNCE=y
-CONFIG_BRCMSTB_GISB_ARB=y
 CONFIG_BROADCOM_PHY=y
 CONFIG_BUFFER_HEAD=y
 CONFIG_CACHE_L2X0=y
@@ -88,13 +87,13 @@ CONFIG_CLKSRC_MMIO=y
 # CONFIG_CLK_IMX8MQ is not set
 # CONFIG_CLK_IMX8ULP is not set
 # CONFIG_CLK_IMX93 is not set
+# CONFIG_CLK_IMX95_BLK_CTL is not set
 CONFIG_CLK_QORIQ=y
 # CONFIG_CLK_VEXPRESS_OSC is not set
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMA=y
 CONFIG_CMA_ALIGNMENT=8
 CONFIG_CMA_AREAS=7
-# CONFIG_CMA_DEBUG is not set
 # CONFIG_CMA_DEBUGFS is not set
 CONFIG_CMA_SIZE_MBYTES=64
 # CONFIG_CMA_SIZE_SEL_MAX is not set
@@ -140,6 +139,7 @@ CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_MENU=y
 CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
 CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MITIGATIONS=y
 CONFIG_CPU_PABRT_V7=y
 CONFIG_CPU_PM=y
 CONFIG_CPU_RMAP=y
@@ -148,15 +148,14 @@ CONFIG_CPU_THERMAL=y
 CONFIG_CPU_THUMB_CAPABLE=y
 CONFIG_CPU_TLB_V7=y
 CONFIG_CPU_V7=y
-CONFIG_CRASH_CORE=y
 CONFIG_CRC16=y
-# CONFIG_CRC32_SARWATE is not set
-CONFIG_CRC32_SLICEBY8=y
 CONFIG_CRC_CCITT=y
+CONFIG_CRC_ITU_T=y
 CONFIG_CROSS_MEMORY_ATTACH=y
 CONFIG_CRYPTO_CRC32=y
 CONFIG_CRYPTO_CRC32C=y
 CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_ECB=y
 CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
 CONFIG_CRYPTO_LIB_GF128MUL=y
@@ -185,8 +184,9 @@ CONFIG_DETECT_HUNG_TASK=y
 CONFIG_DMADEVICES=y
 CONFIG_DMA_CMA=y
 CONFIG_DMA_ENGINE=y
+CONFIG_DMA_NEED_SYNC=y
 CONFIG_DMA_OF=y
-CONFIG_DMA_OPS=y
+CONFIG_DMA_OPS_HELPERS=y
 CONFIG_DMA_SHARED_BUFFER=y
 CONFIG_DMA_VIRTUAL_CHANNELS=y
 CONFIG_DNOTIFY=y
@@ -221,6 +221,7 @@ CONFIG_FSL_RCPM=y
 CONFIG_FSL_XGMAC_MDIO=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
+CONFIG_FS_POSIX_ACL=y
 CONFIG_FTRACE=y
 # CONFIG_FTRACE_SYSCALLS is not set
 CONFIG_FUNCTION_ALIGNMENT=0
@@ -230,13 +231,13 @@ CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
-CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
 CONFIG_GENERIC_BUG=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_DEVICES=y
 CONFIG_GENERIC_CPU_VULNERABILITIES=y
 CONFIG_GENERIC_EARLY_IOREMAP=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
@@ -284,13 +285,11 @@ CONFIG_HOTPLUG_CORE_SYNC=y
 CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_HVC_DRIVER=y
-CONFIG_HW_CONSOLE=y
 CONFIG_HW_RANDOM=y
 CONFIG_HZ_FIXED=0
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_COMPAT=y
 CONFIG_I2C_DEMUX_PINCTRL=y
 CONFIG_I2C_DESIGNWARE_CORE=y
 CONFIG_I2C_DESIGNWARE_PLATFORM=y
@@ -376,7 +375,6 @@ CONFIG_MMC_SDHCI=y
 # CONFIG_MMC_SDHCI_ESDHC_IMX is not set
 CONFIG_MMC_SDHCI_IO_ACCESSORS=y
 CONFIG_MMC_SDHCI_OF_ESDHC=y
-# CONFIG_MMC_SDHCI_PCI is not set
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
@@ -410,6 +408,7 @@ CONFIG_NATIONAL_PHY=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_SRCU_NMI_SAFE=y
 CONFIG_NEON=y
+CONFIG_NET_DEVMEM=y
 CONFIG_NET_EGRESS=y
 CONFIG_NET_FAILOVER=y
 CONFIG_NET_FLOW_LIMIT=y
@@ -426,6 +425,8 @@ CONFIG_NO_HZ=y
 CONFIG_NO_HZ_COMMON=y
 CONFIG_NO_HZ_IDLE=y
 CONFIG_NR_CPUS=16
+# CONFIG_NSM is not set
+CONFIG_NTFS3_FS=y
 CONFIG_NTFS_FS=y
 CONFIG_NVMEM=y
 # CONFIG_NVMEM_IMX_IIM is not set
@@ -476,6 +477,7 @@ CONFIG_PCI_HOST_GENERIC=y
 CONFIG_PCI_LAYERSCAPE=y
 CONFIG_PCI_MSI=y
 CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PER_VMA_LOCK=y
 CONFIG_PGTABLE_LEVELS=3
 CONFIG_PHYLIB=y
 CONFIG_PHYLIB_LEDS=y
@@ -483,6 +485,7 @@ CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_PID_NS=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_IMX8ULP is not set
+# CONFIG_PINCTRL_IMX91 is not set
 # CONFIG_PINCTRL_IMX93 is not set
 # CONFIG_PINCTRL_IMXRT1050 is not set
 # CONFIG_PINCTRL_IMXRT1170 is not set
@@ -499,7 +502,6 @@ CONFIG_PM_SLEEP=y
 CONFIG_PM_SLEEP_SMP=y
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_BRCMKONA=y
-CONFIG_POWER_RESET_BRCMSTB=y
 CONFIG_POWER_RESET_GPIO=y
 CONFIG_POWER_RESET_GPIO_RESTART=y
 CONFIG_POWER_RESET_SYSCON=y
@@ -507,7 +509,6 @@ CONFIG_POWER_RESET_SYSCON_POWEROFF=y
 CONFIG_POWER_RESET_VEXPRESS=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_PPS=y
-CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PRINTK_TIME=y
 CONFIG_PROC_CHILDREN=y
 CONFIG_PROC_PAGE_MONITOR=y
@@ -537,6 +538,7 @@ CONFIG_REGMAP_I2C=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_REGMAP_SPI=y
 CONFIG_RESET_CONTROLLER=y
+# CONFIG_RESET_IMX8MP_AUDIOMIX is not set
 CONFIG_RFS_ACCEL=y
 CONFIG_RPS=y
 CONFIG_RTC_CLASS=y
@@ -586,7 +588,6 @@ CONFIG_SMP_ON_UP=y
 CONFIG_SMSC_PHY=y
 CONFIG_SOCK_DIAG=y
 CONFIG_SOCK_RX_QUEUE_MAPPING=y
-CONFIG_SOC_BRCMSTB=y
 CONFIG_SOC_BUS=y
 # CONFIG_SOC_IMX50 is not set
 # CONFIG_SOC_IMX51 is not set
@@ -615,6 +616,7 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 CONFIG_SPI_SPIDEV=y
 CONFIG_SPI_XILINX=y
+CONFIG_SPLIT_PTE_PTLOCKS=y
 CONFIG_SPMI=y
 # CONFIG_SPMI_HISI3670 is not set
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
@@ -624,9 +626,7 @@ CONFIG_SQUASHFS_LZO=y
 CONFIG_SQUASHFS_ZLIB=y
 CONFIG_SRAM=y
 CONFIG_SRAM_EXEC=y
-# CONFIG_SSIF_IPMI_BMC is not set
 CONFIG_STACKTRACE=y
-CONFIG_STAGING_BOARD=y
 # CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_SUSPEND=y
 CONFIG_SUSPEND_FREEZER=y
@@ -665,6 +665,7 @@ CONFIG_VIRTIO=y
 CONFIG_VIRTIO_ANCHOR=y
 CONFIG_VIRTIO_BLK=y
 CONFIG_VIRTIO_CONSOLE=y
+# CONFIG_VIRTIO_DEBUG is not set
 CONFIG_VIRTIO_MMIO=y
 CONFIG_VIRTIO_NET=y
 CONFIG_VIRTIO_PCI=y
@@ -685,7 +686,6 @@ CONFIG_XXHASH=y
 CONFIG_XZ_DEC_ARM=y
 CONFIG_XZ_DEC_ARMTHUMB=y
 CONFIG_XZ_DEC_BCJ=y
-CONFIG_XZ_DEC_IA64=y
 CONFIG_XZ_DEC_POWERPC=y
 CONFIG_XZ_DEC_SPARC=y
 CONFIG_XZ_DEC_X86=y
diff --git a/target/linux/layerscape/armv8_64b/config-6.12 b/target/linux/layerscape/armv8_64b/config-6.12
index c2d22a9a49..ad3dbe13b0 100644
--- a/target/linux/layerscape/armv8_64b/config-6.12
+++ b/target/linux/layerscape/armv8_64b/config-6.12
@@ -15,14 +15,17 @@ CONFIG_ARCH_MMAP_RND_BITS_MAX=33
 CONFIG_ARCH_MMAP_RND_BITS_MIN=18
 CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
 CONFIG_ARCH_NXP=y
+CONFIG_ARCH_PKEY_BITS=3
 CONFIG_ARCH_PROC_KCORE_TEXT=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_STACKWALK=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_WANTS_EXECMEM_LATE=y
 CONFIG_ARCH_WANTS_NO_INSTR=y
 CONFIG_ARCH_WANTS_THP_SWAP=y
 CONFIG_ARM64=y
 CONFIG_ARM64_4K_PAGES=y
+CONFIG_ARM64_CONTPTE=y
 CONFIG_ARM64_ERRATUM_1165522=y
 CONFIG_ARM64_ERRATUM_1286807=y
 CONFIG_ARM64_ERRATUM_2051678=y
@@ -38,12 +41,11 @@ CONFIG_ARM64_ERRATUM_832075=y
 CONFIG_ARM64_ERRATUM_843419=y
 CONFIG_ARM64_HW_AFDBM=y
 CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
-CONFIG_ARM64_PAGE_SHIFT=12
 CONFIG_ARM64_PA_BITS=48
 CONFIG_ARM64_PA_BITS_48=y
+CONFIG_ARM64_PLATFORM_DEVICES=y
 CONFIG_ARM64_PTR_AUTH=y
 CONFIG_ARM64_PTR_AUTH_KERNEL=y
-CONFIG_ARM64_SME=y
 CONFIG_ARM64_SVE=y
 CONFIG_ARM64_TAGGED_ADDR_ABI=y
 CONFIG_ARM64_VA_BITS=48
@@ -62,7 +64,6 @@ CONFIG_ARM_GIC_V2M=y
 CONFIG_ARM_GIC_V3=y
 CONFIG_ARM_GIC_V3_ITS=y
 CONFIG_ARM_GIC_V3_ITS_FSL_MC=y
-CONFIG_ARM_GIC_V3_ITS_PCI=y
 # CONFIG_ARM_PL172_MPMC is not set
 CONFIG_ARM_PSCI_CPUIDLE=y
 CONFIG_ARM_PSCI_FW=y
@@ -86,12 +87,10 @@ CONFIG_BALLOON_COMPACTION=y
 CONFIG_BATTERY_BQ27XXX=y
 # CONFIG_BATTERY_BQ27XXX_DT_UPDATES_NVM is not set
 CONFIG_BATTERY_BQ27XXX_I2C=y
-CONFIG_BLK_CGROUP_PUNT_BIO=y
 CONFIG_BLK_DEV_BSG=y
 CONFIG_BLK_DEV_BSGLIB=y
 CONFIG_BLK_DEV_BSG_COMMON=y
 CONFIG_BLK_DEV_INTEGRITY=y
-CONFIG_BLK_DEV_INTEGRITY_T10=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
@@ -120,7 +119,6 @@ CONFIG_CLZ_TAB=y
 CONFIG_CMA=y
 CONFIG_CMA_ALIGNMENT=8
 CONFIG_CMA_AREAS=7
-# CONFIG_CMA_DEBUG is not set
 # CONFIG_CMA_DEBUGFS is not set
 CONFIG_CMA_SIZE_MBYTES=16
 # CONFIG_CMA_SIZE_SEL_MAX is not set
@@ -164,10 +162,7 @@ CONFIG_CPU_MITIGATIONS=y
 CONFIG_CPU_PM=y
 CONFIG_CPU_RMAP=y
 CONFIG_CPU_THERMAL=y
-CONFIG_CRASH_CORE=y
 CONFIG_CRC16=y
-# CONFIG_CRC32_SARWATE is not set
-CONFIG_CRC32_SLICEBY8=y
 CONFIG_CRC64=y
 CONFIG_CRC64_ROCKSOFT=y
 CONFIG_CRC7=y
@@ -211,6 +206,7 @@ CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_HW=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
 CONFIG_CRYPTO_LIB_CURVE25519_GENERIC=y
+CONFIG_CRYPTO_LIB_CURVE25519_INTERNAL=y
 CONFIG_CRYPTO_LIB_DES=y
 CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_SHA1=y
@@ -236,7 +232,6 @@ CONFIG_DECOMPRESS_LZMA=y
 CONFIG_DECOMPRESS_LZO=y
 CONFIG_DECOMPRESS_XZ=y
 CONFIG_DETECT_HUNG_TASK=y
-CONFIG_DIMLIB=y
 CONFIG_DMADEVICES=y
 CONFIG_DMATEST=y
 CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC=y
@@ -244,9 +239,10 @@ CONFIG_DMA_CMA=y
 CONFIG_DMA_DIRECT_REMAP=y
 CONFIG_DMA_ENGINE=y
 CONFIG_DMA_ENGINE_RAID=y
+CONFIG_DMA_NEED_SYNC=y
 # CONFIG_DMA_NUMA_CMA is not set
 CONFIG_DMA_OF=y
-CONFIG_DMA_OPS=y
+CONFIG_DMA_OPS_HELPERS=y
 CONFIG_DMA_SHARED_BUFFER=y
 CONFIG_DMA_VIRTUAL_CHANNELS=y
 CONFIG_DNOTIFY=y
@@ -267,19 +263,14 @@ CONFIG_FAILOVER=y
 CONFIG_FANOTIFY=y
 CONFIG_FAT_FS=y
 CONFIG_FB=y
-CONFIG_FB_ARMCLCD=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_IMAGEBLIT=y
 CONFIG_FB_CORE=y
 CONFIG_FB_DEFERRED_IO=y
-CONFIG_FB_IOMEM_FOPS=y
 CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_SYSMEM_FOPS=y
 CONFIG_FB_SYSMEM_HELPERS=y
 CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
 CONFIG_FB_SYS_COPYAREA=y
 CONFIG_FB_SYS_FILLRECT=y
-CONFIG_FB_SYS_FOPS=y
 CONFIG_FB_SYS_IMAGEBLIT=y
 CONFIG_FHANDLE=y
 CONFIG_FIXED_PHY=y
@@ -319,6 +310,7 @@ CONFIG_FSL_RCPM=y
 CONFIG_FSL_XGMAC_MDIO=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
+CONFIG_FS_POSIX_ACL=y
 CONFIG_FUNCTION_ALIGNMENT=4
 CONFIG_FUNCTION_ALIGNMENT_4B=y
 CONFIG_FUSE_FS=y
@@ -328,7 +320,6 @@ CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 # CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set
 CONFIG_GARP=y
-CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_ARGS=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_NUMA=y
@@ -338,6 +329,7 @@ CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_DEVICES=y
 CONFIG_GENERIC_CPU_VULNERABILITIES=y
 CONFIG_GENERIC_CSUM=y
 CONFIG_GENERIC_EARLY_IOREMAP=y
@@ -374,22 +366,23 @@ CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HIBERNATE_CALLBACKS=y
 CONFIG_HIBERNATION=y
+CONFIG_HIBERNATION_COMP_LZO=y
+CONFIG_HIBERNATION_DEF_COMP="lzo"
 CONFIG_HIBERNATION_SNAPSHOT_DEV=y
 CONFIG_HOTPLUG_CORE_SYNC=y
 CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLB_PAGE=y
+CONFIG_HUGETLB_PMD_PAGE_TABLE_SHARING=y
 CONFIG_HVC_DRIVER=y
 CONFIG_HVC_IRQ=y
 CONFIG_HVC_XEN=y
 CONFIG_HVC_XEN_FRONTEND=y
-CONFIG_HW_CONSOLE=y
 CONFIG_HW_RANDOM=y
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
 CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_COMPAT=y
 CONFIG_I2C_DESIGNWARE_CORE=y
 CONFIG_I2C_DESIGNWARE_PLATFORM=y
 CONFIG_I2C_HELPER_AUTO=y
@@ -439,6 +432,7 @@ CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_DOMAIN_HIERARCHY=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_MSI_IOMMU=y
+CONFIG_IRQ_MSI_LIB=y
 CONFIG_IRQ_WORK=y
 # CONFIG_ISDN is not set
 CONFIG_JBD2=y
@@ -461,6 +455,7 @@ CONFIG_LOGO=y
 CONFIG_LOGO_LINUX_CLUT224=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LRU_GEN_WALKS_MMU=y
 CONFIG_LS_EXTIRQ=y
 CONFIG_LS_SCFG_MSI=y
 CONFIG_LZO_COMPRESS=y
@@ -490,7 +485,6 @@ CONFIG_MMC_BLOCK_MINORS=32
 CONFIG_MMC_SDHCI=y
 CONFIG_MMC_SDHCI_IO_ACCESSORS=y
 CONFIG_MMC_SDHCI_OF_ESDHC=y
-# CONFIG_MMC_SDHCI_PCI is not set
 CONFIG_MMC_SDHCI_PLTFM=y
 CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MMU_NOTIFIER=y
@@ -551,6 +545,7 @@ CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
 CONFIG_NEED_SG_DMA_FLAGS=y
 CONFIG_NEED_SG_DMA_LENGTH=y
 CONFIG_NET_DEVLINK=y
+CONFIG_NET_DEVMEM=y
 CONFIG_NET_DSA=y
 CONFIG_NET_DSA_MSCC_FELIX=y
 CONFIG_NET_DSA_MSCC_FELIX_DSA_LIB=y
@@ -571,9 +566,12 @@ CONFIG_NODES_SHIFT=2
 CONFIG_NO_HZ_COMMON=y
 CONFIG_NO_HZ_IDLE=y
 CONFIG_NR_CPUS=64
+# CONFIG_NSM is not set
 CONFIG_NUMA=y
 CONFIG_NUMA_BALANCING=y
 CONFIG_NUMA_BALANCING_DEFAULT_ENABLED=y
+# CONFIG_NUMA_EMU is not set
+CONFIG_NUMA_MEMBLKS=y
 CONFIG_NVMEM=y
 CONFIG_NVMEM_LAYERSCAPE_SFP=y
 CONFIG_NVMEM_LAYOUTS=y
@@ -628,6 +626,7 @@ CONFIG_PCI_LAYERSCAPE=y
 CONFIG_PCI_MSI=y
 CONFIG_PCS_LYNX=y
 CONFIG_PER_VMA_LOCK=y
+CONFIG_PGTABLE_HAS_HUGE_LEAVES=y
 CONFIG_PGTABLE_LEVELS=4
 CONFIG_PHYLIB=y
 CONFIG_PHYLIB_LEDS=y
@@ -672,7 +671,6 @@ CONFIG_QUEUED_RWLOCKS=y
 CONFIG_QUEUED_SPINLOCKS=y
 CONFIG_QUOTA=y
 CONFIG_QUOTACTL=y
-CONFIG_RAID6_PQ=y
 # CONFIG_RANDOMIZE_KSTACK_OFFSET is not set
 CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RAS=y
@@ -699,9 +697,9 @@ CONFIG_RTC_DRV_PCF2127=y
 CONFIG_RTC_DRV_PL031=y
 CONFIG_RTC_I2C_AND_SPI=y
 CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_SCHED_HW_PRESSURE=y
 CONFIG_SCHED_INFO=y
 CONFIG_SCHED_MC=y
-CONFIG_SCHED_THERMAL_PRESSURE=y
 CONFIG_SCSI=y
 CONFIG_SCSI_COMMON=y
 # CONFIG_SCSI_PROC_FS is not set
@@ -729,8 +727,7 @@ CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SERIAL_SC16IS7XX=y
-CONFIG_SERIAL_SC16IS7XX_CORE=y
-# CONFIG_SERIAL_SC16IS7XX_I2C is not set
+CONFIG_SERIAL_SC16IS7XX_I2C=y
 CONFIG_SERIAL_SC16IS7XX_SPI=y
 CONFIG_SERIAL_XILINX_PS_UART=y
 CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
@@ -756,6 +753,8 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 CONFIG_SPI_NXP_FLEXSPI=y
 CONFIG_SPI_PL022=y
+CONFIG_SPLIT_PMD_PTLOCKS=y
+CONFIG_SPLIT_PTE_PTLOCKS=y
 CONFIG_SPMI=y
 # CONFIG_SPMI_HISI3670 is not set
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
@@ -793,6 +792,7 @@ CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
 CONFIG_TRANSPARENT_HUGEPAGE=y
 CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y
 # CONFIG_TRANSPARENT_HUGEPAGE_MADVISE is not set
+# CONFIG_TRANSPARENT_HUGEPAGE_NEVER is not set
 CONFIG_TRANS_TABLE=y
 CONFIG_TREE_RCU=y
 CONFIG_TREE_SRCU=y
@@ -806,15 +806,16 @@ CONFIG_UIO_MF624=y
 CONFIG_UIO_NETX=y
 CONFIG_UIO_PCI_GENERIC=y
 CONFIG_UIO_PDRV_GENIRQ=y
-# CONFIG_UIO_PRUSS is not set
 CONFIG_UIO_SERCOS3=y
 CONFIG_UNINLINE_SPIN_UNLOCK=y
 CONFIG_UNIX_DIAG=y
 CONFIG_UNMAP_KERNEL_AT_EL0=y
 CONFIG_USB_SUPPORT=y
 CONFIG_USER_NS=y
+CONFIG_USER_STACKTRACE_SUPPORT=y
 CONFIG_USE_PERCPU_NUMA_NODE_ID=y
 CONFIG_UTS_NS=y
+CONFIG_VDSO_GETRANDOM=y
 CONFIG_VEXPRESS_CONFIG=y
 CONFIG_VFAT_FS=y
 CONFIG_VFIO=y
@@ -831,13 +832,13 @@ CONFIG_VFIO_PCI_MMAP=y
 CONFIG_VFIO_VIRQFD=y
 CONFIG_VGA_ARB=y
 CONFIG_VGA_ARB_MAX_GPUS=16
-CONFIG_VIDEOMODE_HELPERS=y
-CONFIG_VIDEO_CMDLINE=y
+CONFIG_VIDEO=y
 CONFIG_VIRTIO=y
 CONFIG_VIRTIO_ANCHOR=y
 CONFIG_VIRTIO_BALLOON=y
 CONFIG_VIRTIO_BLK=y
 CONFIG_VIRTIO_CONSOLE=y
+# CONFIG_VIRTIO_DEBUG is not set
 # CONFIG_VIRTIO_IOMMU is not set
 CONFIG_VIRTIO_MMIO=y
 CONFIG_VIRTIO_NET=y
@@ -882,13 +883,11 @@ CONFIG_XEN_SYS_HYPERVISOR=y
 CONFIG_XEN_XENBUS_FRONTEND=y
 CONFIG_XFS_FS=y
 CONFIG_XFS_RT=y
-CONFIG_XOR_BLOCKS=y
 CONFIG_XPS=y
 CONFIG_XXHASH=y
 CONFIG_XZ_DEC_ARM=y
 CONFIG_XZ_DEC_ARMTHUMB=y
 CONFIG_XZ_DEC_BCJ=y
-CONFIG_XZ_DEC_IA64=y
 CONFIG_XZ_DEC_POWERPC=y
 CONFIG_XZ_DEC_SPARC=y
 CONFIG_XZ_DEC_X86=y



From lede-commits at lists.infradead.org  Sun Aug 17 10:01:47 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 13:01:47 -0400
Subject: [openwrt/openwrt]  layerscape: kernel: 6.12: refresh patches
In-Reply-To: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
References: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
Message-ID: <mailman.121693.1755450105.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5ca632e01615c15a8fae79dfb0214cac2cd48388

commit 5ca632e01615c15a8fae79dfb0214cac2cd48388
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Sun Jun 8 12:52:10 2025 +0200

    layerscape: kernel: 6.12: refresh patches
    
    Patches 400,701,702 were taken from 6.12 nxp tree.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19152
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch |  25 ++---
 .../701-staging-add-fsl_ppfe-driver.patch          | 117 +++++++++++++++------
 .../702-phy-Add-2.5G-SGMII-interface-mode.patch    |  49 +++++----
 ...12-fix-compilation-warning-for-fsl-ppfe-.patch} |   4 +-
 4 files changed, 131 insertions(+), 64 deletions(-)

diff --git a/target/linux/layerscape/patches-6.12/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch b/target/linux/layerscape/patches-6.12/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
index 008a146cc9..71dc41569a 100644
--- a/target/linux/layerscape/patches-6.12/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
+++ b/target/linux/layerscape/patches-6.12/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
@@ -1,6 +1,6 @@
-From bd3fa0b0ed51dd6a6564c01d37b36ff475f87ed4 Mon Sep 17 00:00:00 2001
+From fa47ee1700323a0c3163c18941659692e5c22cff Mon Sep 17 00:00:00 2001
 From: Han Xu <han.xu at nxp.com>
-Date: Tue, 14 Apr 2020 11:58:44 -0500
+Date: Tue, 23 Jan 2024 20:51:49 -0600
 Subject: [PATCH] LF-20-3 mtd: spi-nor: Use 1 bit mode of spansion(s25fs512s)
  flash
 
@@ -15,13 +15,14 @@ Signed-off-by: Kuldeep Singh <kuldeep.singh at nxp.com>
 
 --- a/drivers/mtd/spi-nor/spansion.c
 +++ b/drivers/mtd/spi-nor/spansion.c
-@@ -799,8 +799,8 @@ static const struct flash_info spansion_
- 		MFR_FLAGS(USE_CLSR)
- 	},
- 	{ "s25fs512s",  INFO6(0x010220, 0x4d0081, 256 * 1024, 256)
--		NO_SFDP_FLAGS(SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ)
- 		MFR_FLAGS(USE_CLSR)
-+		FIXUP_FLAGS(SPI_NOR_4B_OPCODES)
- 		.fixups = &s25fs_s_nor_fixups, },
- 	{ "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024,  64) },
- 	{ "s25sl12801", INFO(0x012018, 0x0301,  64 * 1024, 256) },
+@@ -828,9 +828,9 @@ static const struct flash_info spansion_
+ 		.name = "s25fs512s",
+ 		.size = SZ_64M,
+ 		.sector_size = SZ_256K,
+-		.no_sfdp_flags = SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ,
+ 		.mfr_flags = USE_CLSR,
+ 		.fixups = &s25fs_s_nor_fixups,
++		.fixup_flags = SPI_NOR_4B_OPCODES,
+ 	}, {
+ 		.id = SNOR_ID(0x01, 0x20, 0x18, 0x03, 0x00),
+ 		.name = "s25sl12800",
diff --git a/target/linux/layerscape/patches-6.12/701-staging-add-fsl_ppfe-driver.patch b/target/linux/layerscape/patches-6.12/701-staging-add-fsl_ppfe-driver.patch
index 964b452f7d..04efc15270 100644
--- a/target/linux/layerscape/patches-6.12/701-staging-add-fsl_ppfe-driver.patch
+++ b/target/linux/layerscape/patches-6.12/701-staging-add-fsl_ppfe-driver.patch
@@ -1,4 +1,4 @@
-From 9ee016f90af0bbcac576af881f1760ee9d9e38e0 Mon Sep 17 00:00:00 2001
+From 81f5150aba929b222783a60a408b9a20a23bd171 Mon Sep 17 00:00:00 2001
 From: Calvin Johnson <calvin.johnson at nxp.com>
 Date: Sat, 16 Sep 2017 07:05:49 +0530
 Subject: [PATCH] staging: add fsl_ppfe driver
@@ -6,8 +6,8 @@ MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
 
-This is squash of all commits with ppfe driver taken from NXP 6.6 tree:
-https://github.com/nxp-qoriq/linux/tree/lf-6.6.y
+This is squash of all commits with ppfe driver taken from NXP 6.12 tree:
+https://github.com/nxp-qoriq/linux/tree/lf-6.12.y
 
 net: fsl_ppfe: dts binding for ppfe
 
@@ -606,6 +606,60 @@ together as no users anymore.
 
 Fixes: 9d95b13bd084 ("staging: fsl_ppfe: Remove C45 check and related code in driver")
 Reviewed-by: Jason Liu <jason.hui.liu at nxp.com>
+Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
+
+LF-13827-2 net: pfe: fix Wmissing-prototypes build warnings
+
+drivers/staging/fsl_ppfe/pfe_firmware.c:128:5: warning: no previous prototype for ?pfe_load_elf? [-Wmissing-prototypes]
+  128 | int pfe_load_elf(int pe_mask, const u8 *fw, struct pfe *pfe)
+      |     ^~~~~~~~~~~~
+drivers/staging/fsl_ppfe/pfe_firmware.c:185:5: warning: no previous prototype for ?get_firmware_in_fdt? [-Wmissing-prototypes]
+  185 | int get_firmware_in_fdt(const u8 **pe_fw, const char *name)
+      |     ^~~~~~~~~~~~~~~~~~~
+
+Reviewed-by: Wei Fang <wei.fang at nxp.com>
+Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
+
+LF-13827-3 net/pfe: use $(src) instead of $(srctree)/$(src)
+
+Cope with upstream change
+b1992c3772e6 ("kbuild: use $(src) instead of $(srctree)/$(src) for source directory")
+
+Reviewed-by: Wei Fang <wei.fang at nxp.com>
+Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
+
+LF-13827-6 net: ppfe: update the usage of eventfd_signal
+
+Cope with the API change since the commit
+1808acc4fab2 ("eventfd: simplify eventfd_signal()")
+
+Otherwise will meet the following build error:
+drivers/staging/fsl_ppfe/pfe_cdev.c: In function ?hif_us_isr?:
+drivers/staging/fsl_ppfe/pfe_cdev.c:112:17: error: too many arguments to function ?eventfd_signal?
+  112 |                 eventfd_signal(trigger, 1);
+      |                 ^~~~~~~~~~~~~~
+
+Reviewed-by: Wei Fang <wei.fang at nxp.com>
+Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
+
+LF-13827-7 net: pfe: Replace strlcpy() with strscpy() for many drivers
+
+Cope with upstream change:
+commit d26270061ae6 ("string: Remove strlcpy()")
+
+e.g.
+../drivers/i2c/busses/i2c-flexio.c: In function ?imx_flexio_i2c_master_probe?:
+../drivers/i2c/busses/i2c-flexio.c:683:9: error: implicit declaration of function ?strlcpy?; did you mean ?strncpy?? [-Werror=implicit-function-declaration]
+  683 |         strlcpy(i2c_dev->adapter.name, dev_name(i2c_dev->dev),
+      |         ^~~~~~~
+      |         strncpy
+
+Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
+
+drivers: make all local platform_driver::remove() return void
+
+0edb555a65d1 ("platform: Make platform_driver::remove() return void")
+
 Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 ---
  .../devicetree/bindings/net/fsl_ppfe/pfe.txt  |  199 ++
@@ -642,13 +696,13 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
  drivers/staging/fsl_ppfe/pfe_hif_lib.h        |  229 ++
  drivers/staging/fsl_ppfe/pfe_hw.c             |  164 ++
  drivers/staging/fsl_ppfe/pfe_hw.h             |   15 +
- .../staging/fsl_ppfe/pfe_ls1012a_platform.c   |  383 +++
+ .../staging/fsl_ppfe/pfe_ls1012a_platform.c   |  381 +++
  drivers/staging/fsl_ppfe/pfe_mod.c            |  158 +
  drivers/staging/fsl_ppfe/pfe_mod.h            |  103 +
  drivers/staging/fsl_ppfe/pfe_perfmon.h        |   26 +
  drivers/staging/fsl_ppfe/pfe_sysfs.c          |  840 ++++++
  drivers/staging/fsl_ppfe/pfe_sysfs.h          |   17 +
- 40 files changed, 10977 insertions(+)
+ 40 files changed, 10975 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/net/fsl_ppfe/pfe.txt
  create mode 100644 drivers/staging/fsl_ppfe/Kconfig
  create mode 100644 drivers/staging/fsl_ppfe/Makefile
@@ -891,7 +945,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +};
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -8360,6 +8360,14 @@ F:	drivers/ptp/ptp_qoriq.c
+@@ -9107,6 +9107,14 @@ F:	drivers/ptp/ptp_qoriq.c
  F:	drivers/ptp/ptp_qoriq_debugfs.c
  F:	include/linux/fsl/ptp_qoriq.h
  
@@ -908,7 +962,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
  L:	linux-spi at vger.kernel.org
 --- a/drivers/staging/Kconfig
 +++ b/drivers/staging/Kconfig
-@@ -78,4 +78,6 @@ source "drivers/staging/qlge/Kconfig"
+@@ -64,4 +64,6 @@ source "drivers/staging/fieldbus/Kconfig
  
  source "drivers/staging/vme_user/Kconfig"
  
@@ -917,10 +971,10 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
  endif # STAGING
 --- a/drivers/staging/Makefile
 +++ b/drivers/staging/Makefile
-@@ -28,3 +28,4 @@ obj-$(CONFIG_PI433)		+= pi433/
+@@ -21,3 +21,4 @@ obj-$(CONFIG_GREYBUS)		+= greybus/
+ obj-$(CONFIG_BCM2835_VCHIQ)	+= vc04_services/
  obj-$(CONFIG_XIL_AXIS_FIFO)	+= axis-fifo/
  obj-$(CONFIG_FIELDBUS_DEV)     += fieldbus/
- obj-$(CONFIG_QLGE)		+= qlge/
 +obj-$(CONFIG_FSL_PPFE)		+= fsl_ppfe/
 --- /dev/null
 +++ b/drivers/staging/fsl_ppfe/Kconfig
@@ -953,7 +1007,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +# Makefile for Freesecale PPFE driver
 +#
 +
-+ccflags-y +=  -I $(srctree)/$(src)/include  -I $(srctree)/$(src)
++ccflags-y +=  -I $(src)/include  -I $(src)
 +
 +obj-$(CONFIG_FSL_PPFE) += pfe.o
 +
@@ -2619,7 +2673,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +		 */
 +		writel_relaxed(int_enable_mask, HIF_INT_ENABLE);
 +
-+		eventfd_signal(trigger, 1);
++		eventfd_signal(trigger);
 +	}
 +
 +	return IRQ_HANDLED;
@@ -3652,7 +3706,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +/* pfe_eth_sysfs_exit
 + *
 + */
-+void pfe_eth_sysfs_exit(struct net_device *ndev)
++static void pfe_eth_sysfs_exit(struct net_device *ndev)
 +{
 +#ifdef PFE_ETH_TX_STATS
 +	device_remove_file(&ndev->dev, &dev_attr_tx_stats);
@@ -3853,10 +3907,10 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +static void pfe_eth_get_drvinfo(struct net_device *ndev, struct ethtool_drvinfo
 +				*drvinfo)
 +{
-+	strlcpy(drvinfo->driver, DRV_NAME, sizeof(drvinfo->driver));
-+	strlcpy(drvinfo->version, DRV_VERSION, sizeof(drvinfo->version));
-+	strlcpy(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));
-+	strlcpy(drvinfo->bus_info, "N/A", sizeof(drvinfo->bus_info));
++	strscpy(drvinfo->driver, DRV_NAME, sizeof(drvinfo->driver));
++	strscpy(drvinfo->version, DRV_VERSION, sizeof(drvinfo->version));
++	strscpy(drvinfo->fw_version, "N/A", sizeof(drvinfo->fw_version));
++	strscpy(drvinfo->bus_info, "N/A", sizeof(drvinfo->bus_info));
 +}
 +
 +/*
@@ -4724,7 +4778,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +/*
 + *  pfe_eth_shutdown
 + */
-+int pfe_eth_shutdown(struct net_device *ndev, int wake)
++static int pfe_eth_shutdown(struct net_device *ndev, int wake)
 +{
 +	struct pfe_eth_priv_s *priv = netdev_priv(ndev);
 +	int i, qstatus, id;
@@ -5054,7 +5108,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +	}
 +}
 +
-+void pfe_tx_get_req_desc(struct sk_buff *skb, unsigned int *n_desc, unsigned int
++static void pfe_tx_get_req_desc(struct sk_buff *skb, unsigned int *n_desc, unsigned int
 +				*n_segs)
 +{
 +	struct skb_shared_info *sh = skb_shinfo(skb);
@@ -5168,8 +5222,8 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +
 +/* pfe_eth_enet_addr_byte_mac
 + */
-+int pfe_eth_enet_addr_byte_mac(u8 *enet_byte_addr,
-+			       struct pfe_mac_addr *enet_addr)
++static int pfe_eth_enet_addr_byte_mac(u8 *enet_byte_addr,
++				      struct pfe_mac_addr *enet_addr)
 +{
 +	if (!enet_byte_addr || !enet_addr) {
 +		return -1;
@@ -6121,7 +6175,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 + * @return		0 on success, a negative value on error
 + *
 + */
-+int pfe_load_elf(int pe_mask, const u8 *fw, struct pfe *pfe)
++static int pfe_load_elf(int pe_mask, const u8 *fw, struct pfe *pfe)
 +{
 +	struct elf32_hdr *elf_hdr = (struct elf32_hdr *)fw;
 +	Elf32_Half sections = be16_to_cpu(elf_hdr->e_shnum);
@@ -6178,7 +6232,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +	return rc;
 +}
 +
-+int get_firmware_in_fdt(const u8 **pe_fw, const char *name)
++static int get_firmware_in_fdt(const u8 **pe_fw, const char *name)
 +{
 +	struct device_node *np;
 +	const unsigned int *len;
@@ -6541,8 +6595,8 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 + * aligned)
 + * @param[in] len		Number of bytes to copy
 + */
-+void pe_mem_memcpy_to32(int id, u32 mem_access_addr, const void *src, unsigned
-+int len)
++static void pe_mem_memcpy_to32(int id, u32 mem_access_addr, const void *src,
++			       unsigned int len)
 +{
 +	u32 offset = 0, val, addr;
 +	unsigned int len32 = len >> 2;
@@ -7470,7 +7524,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +/* GEMAC enable pause tx function.
 + * @param[in] base GEMAC base address
 + */
-+void gemac_enable_pause_tx(void *base)
++static void __maybe_unused gemac_enable_pause_tx(void *base)
 +{
 +	writel(EMAC_RX_SECTION_EMPTY_V, base + EMAC_RX_SECTION_EMPTY);
 +}
@@ -7478,7 +7532,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +/* GEMAC disable pause tx function.
 + * @param[in] base GEMAC base address
 + */
-+void gemac_disable_pause_tx(void *base)
++static void __maybe_unused gemac_disable_pause_tx(void *base)
 +{
 +	writel(0x0, base + EMAC_RX_SECTION_EMPTY);
 +}
@@ -8124,7 +8178,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +			  hif->descr_baseaddr_v, hif->descr_baseaddr_p);
 +}
 +
-+void pfe_hif_desc_dump(struct pfe_hif *hif)
++static void __maybe_unused pfe_hif_desc_dump(struct pfe_hif *hif)
 +{
 +	struct hif_desc	*desc;
 +	unsigned long desc_p;
@@ -10254,7 +10308,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +#endif /* _PFE_HW_H_ */
 --- /dev/null
 +++ b/drivers/staging/fsl_ppfe/pfe_ls1012a_platform.c
-@@ -0,0 +1,380 @@
+@@ -0,0 +1,381 @@
 +// SPDX-License-Identifier: GPL-2.0+
 +/*
 + * Copyright 2015-2016 Freescale Semiconductor, Inc.
@@ -10519,10 +10573,11 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +static void pfe_platform_remove(struct platform_device *pdev)
 +{
 +	struct pfe *pfe = platform_get_drvdata(pdev);
++	int rc;
 +
 +	pr_info("%s\n", __func__);
 +
-+	pfe_remove(pfe);
++	rc = pfe_remove(pfe);
 +
 +	iounmap(pfe->cbus_baseaddr);
 +
@@ -10535,7 +10590,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +
 +#ifdef CONFIG_PM
 +#ifdef CONFIG_PM_SLEEP
-+int pfe_platform_suspend(struct device *dev)
++static int pfe_platform_suspend(struct device *dev)
 +{
 +	struct pfe *pfe = platform_get_drvdata(to_platform_device(dev));
 +	struct net_device *netdev;
@@ -10621,7 +10676,7 @@ Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
 +
 +static struct platform_driver pfe_platform_driver = {
 +	.probe = pfe_platform_probe,
-+	.remove_new = pfe_platform_remove,
++	.remove = pfe_platform_remove,
 +	.driver = {
 +		.name = "pfe",
 +		.of_match_table = pfe_match,
diff --git a/target/linux/layerscape/patches-6.12/702-phy-Add-2.5G-SGMII-interface-mode.patch b/target/linux/layerscape/patches-6.12/702-phy-Add-2.5G-SGMII-interface-mode.patch
index b4e527214e..92e71276bf 100644
--- a/target/linux/layerscape/patches-6.12/702-phy-Add-2.5G-SGMII-interface-mode.patch
+++ b/target/linux/layerscape/patches-6.12/702-phy-Add-2.5G-SGMII-interface-mode.patch
@@ -1,4 +1,4 @@
-From 3823e4e1078a95e26b9a69e88c9bf862b0267e1c Mon Sep 17 00:00:00 2001
+From 5677c6ef5f4096f3149a4e8cfd1438bc9eb2e8a4 Mon Sep 17 00:00:00 2001
 From: Bhaskar Upadhaya <Bhaskar.Upadhaya at nxp.com>
 Date: Wed, 29 Nov 2017 15:27:57 +0530
 Subject: [PATCH] phy: Add 2.5G SGMII interface mode
@@ -8,11 +8,22 @@ in existing phy_interface list
 
 Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya at nxp.com>
 ---
- drivers/net/phy/phy-core.c | 1 +
- drivers/net/phy/phylink.c  | 2 ++
- include/linux/phy.h        | 3 +++
- 3 files changed, 6 insertions(+)
+ Documentation/devicetree/bindings/net/ethernet-controller.yaml | 1 +
+ drivers/net/phy/phy-core.c                                     | 1 +
+ drivers/net/phy/phylink.c                                      | 2 ++
+ include/linux/phy.h                                            | 3 +++
+ 4 files changed, 7 insertions(+)
 
+--- a/Documentation/devicetree/bindings/net/ethernet-controller.yaml
++++ b/Documentation/devicetree/bindings/net/ethernet-controller.yaml
+@@ -65,6 +65,7 @@ properties:
+       - mii
+       - gmii
+       - sgmii
++      - sgmii-2500
+       - psgmii
+       - qsgmii
+       - qusgmii
 --- a/drivers/net/phy/phy-core.c
 +++ b/drivers/net/phy/phy-core.c
 @@ -138,6 +138,7 @@ int phy_interface_num_ports(phy_interfac
@@ -25,15 +36,15 @@ Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya at nxp.com>
  	case PHY_INTERFACE_MODE_QUSGMII:
 --- a/drivers/net/phy/phylink.c
 +++ b/drivers/net/phy/phylink.c
-@@ -231,6 +231,7 @@ static int phylink_interface_max_speed(p
+@@ -230,6 +230,7 @@ static int phylink_interface_max_speed(p
+ 	case PHY_INTERFACE_MODE_GMII:
  		return SPEED_1000;
  
- 	case PHY_INTERFACE_MODE_2500BASEX:
 +	case PHY_INTERFACE_MODE_2500SGMII:
+ 	case PHY_INTERFACE_MODE_2500BASEX:
+ 	case PHY_INTERFACE_MODE_10G_QXGMII:
  		return SPEED_2500;
- 
- 	case PHY_INTERFACE_MODE_5GBASER:
-@@ -539,6 +540,7 @@ unsigned long phylink_get_capabilities(p
+@@ -544,6 +545,7 @@ static unsigned long phylink_get_capabil
  		break;
  
  	case PHY_INTERFACE_MODE_2500BASEX:
@@ -43,20 +54,20 @@ Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya at nxp.com>
  
 --- a/include/linux/phy.h
 +++ b/include/linux/phy.h
-@@ -165,6 +165,7 @@ typedef enum {
- 	PHY_INTERFACE_MODE_10GKR,
+@@ -170,6 +170,7 @@ typedef enum {
  	PHY_INTERFACE_MODE_QUSGMII,
  	PHY_INTERFACE_MODE_1000BASEKX,
+ 	PHY_INTERFACE_MODE_10G_QXGMII,
 +	PHY_INTERFACE_MODE_2500SGMII,
  	PHY_INTERFACE_MODE_MAX,
  } phy_interface_t;
  
-@@ -286,6 +287,8 @@ static inline const char *phy_modes(phy_
- 		return "100base-x";
- 	case PHY_INTERFACE_MODE_QUSGMII:
- 		return "qusgmii";
+@@ -235,6 +236,8 @@ static inline const char *phy_modes(phy_
+ 		return "gmii";
+ 	case PHY_INTERFACE_MODE_SGMII:
+ 		return "sgmii";
 +	case PHY_INTERFACE_MODE_2500SGMII:
 +		return "sgmii-2500";
- 	default:
- 		return "unknown";
- 	}
+ 	case PHY_INTERFACE_MODE_TBI:
+ 		return "tbi";
+ 	case PHY_INTERFACE_MODE_REVMII:
diff --git a/target/linux/layerscape/patches-6.12/703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch b/target/linux/layerscape/patches-6.12/703-layerscape-6.12-fix-compilation-warning-for-fsl-ppfe-.patch
similarity index 98%
rename from target/linux/layerscape/patches-6.12/703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch
rename to target/linux/layerscape/patches-6.12/703-layerscape-6.12-fix-compilation-warning-for-fsl-ppfe-.patch
index d49488ab4c..2d724bb582 100644
--- a/target/linux/layerscape/patches-6.12/703-layerscape-6.1-fix-compilation-warning-for-fsl-ppfe-.patch
+++ b/target/linux/layerscape/patches-6.12/703-layerscape-6.12-fix-compilation-warning-for-fsl-ppfe-.patch
@@ -194,7 +194,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
  		return;
  
 @@ -186,16 +186,16 @@ static void pfe_hif_free_descr(struct pf
- void pfe_hif_desc_dump(struct pfe_hif *hif)
+ static void __maybe_unused pfe_hif_desc_dump(struct pfe_hif *hif)
  {
  	struct hif_desc	*desc;
 -	unsigned long desc_p;
@@ -213,7 +213,7 @@ Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
  	for (ii = 0; ii < hif->rx_ring_size; ii++) {
  		pr_info("status: %08x, ctrl: %08x, data: %08x, next: %x\n",
  			readl(&desc->status), readl(&desc->ctrl),
-@@ -204,10 +204,10 @@ void pfe_hif_desc_dump(struct pfe_hif *h
+@@ -204,10 +204,10 @@ static void __maybe_unused pfe_hif_desc_
  	}
  
  	desc = hif->tx_base;



From lede-commits at lists.infradead.org  Sun Aug 17 10:03:29 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 13:03:29 -0400
Subject: [openwrt/openwrt]  optee-os-stm32: bump to 4.7.0
In-Reply-To: <175545020962.3236464.15635631624354344613@git-01.infra.openwrt.org>
References: <175545020962.3236464.15635631624354344613@git-01.infra.openwrt.org>
Message-ID: <mailman.121699.1755450212.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/96e5e12d408edb5278bad59cb347e8bd7dd695d7

commit 96e5e12d408edb5278bad59cb347e8bd7dd695d7
Author: Thomas Richard <thomas.richard at bootlin.com>
AuthorDate: Thu Aug 14 17:00:32 2025 +0200

    optee-os-stm32: bump to 4.7.0
    
    Bump optee-os-stm32 to upstream release 4.7.0.
    
    Signed-off-by: Thomas Richard <thomas.richard at bootlin.com>
    Link: https://github.com/openwrt/openwrt/pull/19779
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/boot/optee-os-stm32/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/boot/optee-os-stm32/Makefile b/package/boot/optee-os-stm32/Makefile
index cfe1ac15f2..563e6b18a6 100644
--- a/package/boot/optee-os-stm32/Makefile
+++ b/package/boot/optee-os-stm32/Makefile
@@ -7,10 +7,10 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_VERSION:=4.6.0
+PKG_VERSION:=4.7.0
 PKG_RELEASE:=1
 
-PKG_HASH:=0c947c6972bf50c483cb993af01041d4094b1e03711c7246cdde6ba2ffc351fe
+PKG_HASH:=976b9c184678516038d4e79766608e81d10bf136f76fd0db2dc48f90f994fbd9
 PKG_MAINTAINER:=Thomas Richard <thomas.richard at bootlin.com>
 
 OPTEE_USE_INTREE_DTC:=1



From lede-commits at lists.infradead.org  Sun Aug 17 10:03:30 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 13:03:30 -0400
Subject: [openwrt/openwrt]  uboot-stm32: bump to 2025.07
In-Reply-To: <175545020962.3236464.15635631624354344613@git-01.infra.openwrt.org>
References: <175545020962.3236464.15635631624354344613@git-01.infra.openwrt.org>
Message-ID: <mailman.121700.1755450213.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d72157f4e3bef8767be4d1c699102292361fdbd2

commit d72157f4e3bef8767be4d1c699102292361fdbd2
Author: Thomas Richard <thomas.richard at bootlin.com>
AuthorDate: Thu Aug 14 17:03:04 2025 +0200

    uboot-stm32: bump to 2025.07
    
    Now devicetrees imported from Linux kernel release are used, so update
    DEVICE_TREE to use correct path. A patch was backported to increase
    SYS_MALLOC_F_LEN for stm32mp13 (more alloc space is needed due to SCMI
    update to protocol v2.0).
    
    Signed-off-by: Thomas Richard <thomas.richard at bootlin.com>
    Link: https://github.com/openwrt/openwrt/pull/19779
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/boot/uboot-stm32/Makefile                  |  6 ++---
 ...32mp13-increase-SYS_MALLOC_F_LEN-to-0x210.patch | 27 ++++++++++++++++++++++
 2 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/package/boot/uboot-stm32/Makefile b/package/boot/uboot-stm32/Makefile
index 8803504095..534857c07f 100644
--- a/package/boot/uboot-stm32/Makefile
+++ b/package/boot/uboot-stm32/Makefile
@@ -7,10 +7,10 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_VERSION:=2025.04
+PKG_VERSION:=2025.07
 PKG_RELEASE:=1
 
-PKG_HASH:=439d3bef296effd54130be6a731c5b118be7fddd7fcc663ccbc5fb18294d8718
+PKG_HASH:=0f933f6c5a426895bf306e93e6ac53c60870e4b54cda56d95211bec99e63bec7
 PKG_MAINTAINER:=Thomas Richard <thomas.richard at bootlin.com>
 
 UBOOT_USE_INTREE_DTC:=1
@@ -56,7 +56,7 @@ UBOOT_TARGETS := \
 		 stm32mp157c-dk2 \
 		 stm32mp157c-dk2-scmi
 
-UBOOT_MAKE_FLAGS += DEVICE_TREE=$(DEVICE_TREE)
+UBOOT_MAKE_FLAGS += DEVICE_TREE=st/$(DEVICE_TREE)
 
 UBOOT_CUSTOMIZE_CONFIG := \
 	--disable TOOLS_MKEFICAPSULE
diff --git a/package/boot/uboot-stm32/patches/001-configs-stm32mp13-increase-SYS_MALLOC_F_LEN-to-0x210.patch b/package/boot/uboot-stm32/patches/001-configs-stm32mp13-increase-SYS_MALLOC_F_LEN-to-0x210.patch
new file mode 100644
index 0000000000..b93fb52a6f
--- /dev/null
+++ b/package/boot/uboot-stm32/patches/001-configs-stm32mp13-increase-SYS_MALLOC_F_LEN-to-0x210.patch
@@ -0,0 +1,27 @@
+From 1cdb64ad3aa9d6cd4a02adc09fcc1015f90e2fb9 Mon Sep 17 00:00:00 2001
+From: Patrice Chotard <patrice.chotard at foss.st.com>
+Date: Mon, 9 Jun 2025 14:53:13 +0200
+Subject: [PATCH] configs: stm32mp13: increase SYS_MALLOC_F_LEN to 0x210000
+
+Due SCMI update to protocol v2.0, we need to increase
+SYS_MALLOC_F_LEN value to avoid following message:
+alloc space exhausted ptr 200040 limit 200000
+
+Set SYS_MALLOC_F_LEN to 0x210000 to fix this issue.
+
+Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
+---
+ configs/stm32mp13_defconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/configs/stm32mp13_defconfig
++++ b/configs/stm32mp13_defconfig
+@@ -1,7 +1,7 @@
+ CONFIG_ARM=y
+ CONFIG_ARCH_STM32MP=y
+ CONFIG_TFABOOT=y
+-CONFIG_SYS_MALLOC_F_LEN=0x180000
++CONFIG_SYS_MALLOC_F_LEN=0x210000
+ CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0xc0400000
+ CONFIG_ENV_OFFSET=0x900000
+ CONFIG_DEFAULT_DEVICE_TREE="st/stm32mp135f-dk"



From lede-commits at lists.infradead.org  Sun Aug 17 10:01:49 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 17 Aug 2025 13:01:49 -0400
Subject: [openwrt/openwrt]  layerscape: add 6.12 testing kernel
In-Reply-To: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
References: <175545009909.3228592.1249033002295318014@git-01.infra.openwrt.org>
Message-ID: <mailman.121701.1755450737.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8a22855636d2e33c2270cdd49b55a4b0d96eec70

commit 8a22855636d2e33c2270cdd49b55a4b0d96eec70
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Sun Jun 8 13:51:07 2025 +0200

    layerscape: add 6.12 testing kernel
    
    The support is done. Let's set 6.12 as testing kernel.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19152
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/layerscape/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/layerscape/Makefile b/target/linux/layerscape/Makefile
index e0bc544f43..50dd63e599 100644
--- a/target/linux/layerscape/Makefile
+++ b/target/linux/layerscape/Makefile
@@ -8,6 +8,7 @@ BOARD:=layerscape
 BOARDNAME:=NXP Layerscape
 
 KERNEL_PATCHVER:=6.6
+KERNEL_TESTING_PATCHVER:=6.12
 
 FEATURES:=squashfs nand usb pcie gpio fpu ubifs ext4 rootfs-part boot-part
 SUBTARGETS:=armv8_64b armv7



From lede-commits at lists.infradead.org  Tue Aug 19 11:04:10 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 19 Aug 2025 14:04:10 -0400
Subject: [openwrt/openwrt]  ipq40xx: dts: reduce the maximum SPI clock
 frequency to 24MHz
In-Reply-To: <175562665017.3802296.4598933426002904575@git-01.infra.openwrt.org>
References: <175562665017.3802296.4598933426002904575@git-01.infra.openwrt.org>
Message-ID: <mailman.123855.1755634361.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3ff8a3dca8bc24296f501b3c74214eb5005354bf

commit 3ff8a3dca8bc24296f501b3c74214eb5005354bf
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Mon Aug 11 18:52:30 2025 +0800

    ipq40xx: dts: reduce the maximum SPI clock frequency to 24MHz
    
    The IPQ4019 datasheet indicates that the maximum supported SPI
    frequency is 25 MHz. My experiment on SKSpruce WIA3300-20 shows
    that exceeding this threshold can lead to instability of SPI
    peripheral. Limit the SPI clock frequency to the QSDK recommended
    value 24MHz to enhance stability.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19744
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts | 2 +-
 .../files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts      | 2 +-
 .../files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi      | 2 +-
 .../files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts        | 2 +-
 .../files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts        | 2 +-
 .../files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts       | 4 ++--
 .../files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts     | 2 +-
 .../ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts | 4 ++--
 .../files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dtsi        | 2 +-
 .../files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts        | 2 +-
 10 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
index f2690a095d..627ccd5b70 100644
--- a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
+++ b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
@@ -160,7 +160,7 @@
 	flash at 0 {
 		reg = <0>;
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <40000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
index 8b75a57074..50cac400d7 100644
--- a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
+++ b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
@@ -150,7 +150,7 @@
 		#size-cells = <0>;
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <50000000>;
+		spi-max-frequency = <24000000>;
 		m25p,fast-read;
 
 		partitions {
diff --git a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
index a13fc71987..367dd20a7a 100644
--- a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
+++ b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
@@ -190,7 +190,7 @@
 	mx25l12805d at 0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <45000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
index d91725dfb7..ae244a6696 100644
--- a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
+++ b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
@@ -155,7 +155,7 @@
 	flash at 0 {
 		reg = <0>;
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <40000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
index 2b79169c0d..d33afc7d38 100644
--- a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
+++ b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
@@ -170,7 +170,7 @@
 	flash at 0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <50000000>;
+		spi-max-frequency = <24000000>;
 		status = "okay";
 		m25p,fast-read;
 
diff --git a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
index 946b3b3038..7477d5ddc4 100644
--- a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
+++ b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
@@ -182,7 +182,7 @@
 		compatible = "jedec,spi-nor";
 		reg = <0>;
 		linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
-		spi-max-frequency = <30000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
@@ -236,7 +236,7 @@
 	spi-nand at 1 {
 		compatible = "spi-nand";
 		reg = <1>;
-		spi-max-frequency = <30000000>;
+		spi-max-frequency = <24000000>;
 
 		/*
 		 * U-boot looks for "spinand,mt29f" node,
diff --git a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
index d434145278..f588d94142 100644
--- a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
+++ b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
@@ -159,7 +159,7 @@
 	flash at 0 {
 		reg = <0>;
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <40000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
index 982ceef044..fc862a25b1 100644
--- a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
+++ b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
@@ -206,7 +206,7 @@
 
 	flash at 0 {
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <50000000>;
+		spi-max-frequency = <24000000>;
 		reg = <0>;
 
 		partitions {
@@ -298,7 +298,7 @@
 	nand at 1 {
 		compatible = "spi-nand";
 		reg = <1>;
-		spi-max-frequency = <48000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dtsi b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dtsi
index f8b458f9f7..83dd4b925b 100644
--- a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dtsi
+++ b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dtsi
@@ -123,7 +123,7 @@
 	flash at 0 {
 		reg = <0>;
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <40000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
index bd7f1b5cb9..bbc93c083d 100644
--- a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
+++ b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
@@ -226,7 +226,7 @@
 	flash at 0 {
 		reg = <0>;
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <40000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";



From lede-commits at lists.infradead.org  Tue Aug 19 11:06:13 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 19 Aug 2025 14:06:13 -0400
Subject: [openwrt/openwrt]  realtek: mdio: rtl931x: move functions over to bus
In-Reply-To: <175562677307.3811886.16902223801120473385@git-01.infra.openwrt.org>
References: <175562677307.3811886.16902223801120473385@git-01.infra.openwrt.org>
Message-ID: <mailman.123856.1755634361.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/070d8eb4d57038f3986027cd6d4610bd27ec2d59

commit 070d8eb4d57038f3986027cd6d4610bd27ec2d59
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Mon Aug 11 04:34:00 2025 -0400

    realtek: mdio: rtl931x: move functions over to bus
    
    This commit repeats the mdio function relocation from the other targets.
    In short that means:
    
    - phy read/write functions are moved away from the phy driver
    - SerDes read/write functions are moved away from the dsa driver
    - All gets consolidated into the mdio driver (inside the ethernet driver)
    
    This is mostly a copy/paste to keep the changes small. The SerDes phy mapping
    and the simplification of the central bus functions will come later.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19743
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../mips/include/asm/mach-rtl838x/mach-rtl83xx.h   |   4 -
 .../files-6.12/drivers/net/dsa/rtl83xx/common.c    |   2 -
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c   |   2 -
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c   |   1 -
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h   |   5 -
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c   |   1 -
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c   | 144 ------------
 .../files-6.12/drivers/net/ethernet/rtl838x_eth.c  | 249 ++++++++++++++++++++-
 .../files-6.12/drivers/net/ethernet/rtl838x_eth.h  |   3 +
 .../files-6.12/drivers/net/phy/rtl83xx-phy.c       | 118 +++-------
 .../files-6.12/drivers/net/phy/rtl83xx-phy.h       |   4 -
 11 files changed, 277 insertions(+), 256 deletions(-)

diff --git a/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h b/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
index 808cbd245c..72abbadc1e 100644
--- a/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
+++ b/target/linux/realtek/files-6.12/arch/mips/include/asm/mach-rtl838x/mach-rtl83xx.h
@@ -414,8 +414,4 @@ struct rtl83xx_soc_info {
 	int cpu_port;
 };
 
-/* rtl83xx-related functions used across subsystems */
-int rtl931x_read_phy(u32 port, u32 page, u32 reg, u32 *val);
-int rtl931x_write_phy(u32 port, u32 page, u32 reg, u32 val);
-
 #endif   /* _MACH_RTL838X_H_ */
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
index 9ccf1e1840..eef52e4ac2 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/common.c
@@ -29,8 +29,6 @@ extern const struct dsa_switch_ops rtl930x_switch_ops;
 extern const struct phylink_pcs_ops rtl83xx_pcs_ops;
 extern const struct phylink_pcs_ops rtl93xx_pcs_ops;
 
-DEFINE_MUTEX(smi_lock);
-
 int rtl83xx_port_get_stp_state(struct rtl838x_switch_priv *priv, int port)
 {
 	u32 msti = 0;
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c
index e0c8d73fa4..2fed65adab 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.c
@@ -23,8 +23,6 @@
 #define RTL838X_VLAN_PORT_TAG_STS_CTRL_OTAG_STS_MASK		GENMASK(3,2)
 #define RTL838X_VLAN_PORT_TAG_STS_CTRL_ITAG_STS_MASK		GENMASK(1,0)
 
-extern struct mutex smi_lock;
-
 /* see_dal_maple_acl_log2PhyTmplteField and src/app/diag_v2/src/diag_acl.c */
 /* Definition of the RTL838X-specific template field IDs as used in the PIE */
 enum template_field_id {
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c
index 87ba9e0fbc..0d433c0b56 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl839x.c
@@ -20,7 +20,6 @@
 #define RTL839X_VLAN_PORT_TAG_STS_CTRL_IGR_P_OTAG_KEEP_MASK	GENMASK(1,1)
 #define RTL839X_VLAN_PORT_TAG_STS_CTRL_IGR_P_ITAG_KEEP_MASK	GENMASK(0,0)
 
-extern struct mutex smi_lock;
 extern struct rtl83xx_soc_info soc_info;
 
 /* Definition of the RTL839X-specific template field IDs as used in the PIE */
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
index 7dff91e3b7..ef5230d92e 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
@@ -192,11 +192,6 @@ void rtl931x_print_matrix(void);
 int rtl83xx_lag_add(struct dsa_switch *ds, int group, int port, struct netdev_lag_upper_info *info);
 int rtl83xx_lag_del(struct dsa_switch *ds, int group, int port);
 
-/* phy functions that will need to be moved to the future mdio driver */
-
-int rtl931x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val);
-int rtl931x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val);
-
 /*
  * TODO: The following functions are currently not in use. So compiler will complain if
  * they are static and not made available externally. To preserve them for future use
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
index d7f611f943..f6a5affb43 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
@@ -33,7 +33,6 @@
 /* get shift for given led in any set */
 #define RTL930X_LED_SET_LEDX_SHIFT(x) (16 * (x % 2))
 
-extern struct mutex smi_lock;
 extern struct rtl83xx_soc_info soc_info;
 
 /* Definition of the RTL930X-specific template field IDs as used in the PIE */
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
index 36103b43dd..226b7ce5d3 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
@@ -25,7 +25,6 @@
 #define RTL931X_VLAN_PORT_TAG_ITPID_IDX_MASK			GENMASK(2,1)
 #define RTL931X_VLAN_PORT_TAG_ITPID_KEEP_MASK			GENMASK(0,0)
 
-extern struct mutex smi_lock;
 extern struct rtl83xx_soc_info soc_info;
 
 /* Definition of the RTL931X-specific template field IDs as used in the PIE */
@@ -317,149 +316,6 @@ irqreturn_t rtl931x_switch_irq(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-int rtl931x_write_phy(u32 port, u32 page, u32 reg, u32 val)
-{
-	u32 v;
-	int err = 0;
-
-	val &= 0xffff;
-	if (port > 63 || page > 4095 || reg > 31)
-		return -ENOTSUPP;
-
-	mutex_lock(&smi_lock);
-	pr_debug("%s: writing to phy %d %d %d %d\n", __func__, port, page, reg, val);
-	/* Clear both port registers */
-	sw_w32(0, RTL931X_SMI_INDRT_ACCESS_CTRL_2);
-	sw_w32(0, RTL931X_SMI_INDRT_ACCESS_CTRL_2 + 4);
-	sw_w32_mask(0, BIT(port % 32), RTL931X_SMI_INDRT_ACCESS_CTRL_2 + (port / 32) * 4);
-
-	sw_w32_mask(0xffff, val, RTL931X_SMI_INDRT_ACCESS_CTRL_3);
-
-	v = reg << 6 | page << 11 ;
-	sw_w32(v, RTL931X_SMI_INDRT_ACCESS_CTRL_0);
-
-	sw_w32(0x1ff, RTL931X_SMI_INDRT_ACCESS_CTRL_1);
-
-	v |= BIT(4) | 1; /* Write operation and execute */
-	sw_w32(v, RTL931X_SMI_INDRT_ACCESS_CTRL_0);
-
-	do {
-	} while (sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_0) & 0x1);
-
-	if (sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_0) & 0x2)
-		err = -EIO;
-
-	mutex_unlock(&smi_lock);
-
-	return err;
-}
-
-int rtl931x_read_phy(u32 port, u32 page, u32 reg, u32 *val)
-{
-	u32 v;
-
-	if (port > 63 || page > 4095 || reg > 31)
-		return -ENOTSUPP;
-
-	mutex_lock(&smi_lock);
-
-	sw_w32(port << 5, RTL931X_SMI_INDRT_ACCESS_BC_PHYID_CTRL);
-
-	v = reg << 6 | page << 11 | 1;
-	sw_w32(v, RTL931X_SMI_INDRT_ACCESS_CTRL_0);
-
-	do {
-	} while (sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_0) & 0x1);
-
-	v = sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_0);
-	*val = sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_3);
-	*val = (*val & 0xffff0000) >> 16;
-
-	pr_debug("%s: port %d, page: %d, reg: %x, val: %x, v: %08x\n",
-		__func__, port, page, reg, *val, v);
-
-	mutex_unlock(&smi_lock);
-
-	return 0;
-}
-
-/* Read an mmd register of the PHY */
-int rtl931x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val)
-{
-	int err = 0;
-	u32 v;
-	/* Select PHY register type
-	 * If select 1G/10G MMD register type, registers EXT_PAGE, MAIN_PAGE and REG settings are don?t care.
-	 * 0x0  Normal register (Clause 22)
-	 * 0x1: 1G MMD register (MMD via Clause 22 registers 13 and 14)
-	 * 0x2: 10G MMD register (MMD via Clause 45)
-	 */
-	int type = 2;
-
-	mutex_lock(&smi_lock);
-
-	/* Set PHY to access via port-number */
-	sw_w32(port << 5, RTL931X_SMI_INDRT_ACCESS_BC_PHYID_CTRL);
-
-	/* Set MMD device number and register to write to */
-	sw_w32(devnum << 16 | regnum, RTL931X_SMI_INDRT_ACCESS_MMD_CTRL);
-
-	v = type << 2 | BIT(0); /* MMD-access-type | EXEC */
-	sw_w32(v, RTL931X_SMI_INDRT_ACCESS_CTRL_0);
-
-	do {
-		v = sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_0);
-	} while (v & BIT(0));
-
-	/* Check for error condition */
-	if (v & BIT(1))
-		err = -EIO;
-
-	*val = sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_3) >> 16;
-
-	pr_debug("%s: port %d, dev: %x, regnum: %x, val: %x (err %d)\n", __func__,
-		 port, devnum, regnum, *val, err);
-
-	mutex_unlock(&smi_lock);
-
-	return err;
-}
-
-/* Write to an mmd register of the PHY */
-int rtl931x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val)
-{
-	int err = 0;
-	u32 v;
-	int type = 2;
-	u64 pm;
-
-	mutex_lock(&smi_lock);
-
-	/* Set PHY to access via port-mask */
-	pm = (u64)1 << port;
-	sw_w32((u32)pm, RTL931X_SMI_INDRT_ACCESS_CTRL_2);
-	sw_w32((u32)(pm >> 32), RTL931X_SMI_INDRT_ACCESS_CTRL_2 + 4);
-
-	/* Set data to write */
-	sw_w32_mask(0xffff, val, RTL931X_SMI_INDRT_ACCESS_CTRL_3);
-
-	/* Set MMD device number and register to write to */
-	sw_w32(devnum << 16 | regnum, RTL931X_SMI_INDRT_ACCESS_MMD_CTRL);
-
-	v = BIT(4) | type << 2 | BIT(0); /* WRITE | MMD-access-type | EXEC */
-	sw_w32(v, RTL931X_SMI_INDRT_ACCESS_CTRL_0);
-
-	do {
-		v = sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_0);
-	} while (v & BIT(0));
-
-	pr_debug("%s: port %d, dev: %x, regnum: %x, val: %x (err %d)\n", __func__,
-		 port, devnum, regnum, val, err);
-	mutex_unlock(&smi_lock);
-
-	return err;
-}
-
 void rtl931x_print_matrix(void)
 {
 	struct table_reg *r = rtl_table_get(RTL9310_TBL_2, 1);
diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
index cc3166340b..ddfdabacb6 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
@@ -69,10 +69,13 @@ extern int rtl931x_write_sds_phy(int phy_addr, int page, int phy_reg, u16 v);
 #define RTMDIO_ABS		BIT(2)
 #define RTMDIO_PKG		BIT(3)
 
-#define RTMDIO_838X_BASE		(0xe780)
-#define RTMDIO_839X_BASE		(0xa000)
-#define RTMDIO_930X_SDS_INDACS_CMD	(0x03B0)
-#define RTMDIO_930X_SDS_INDACS_DATA	(0x03B4)
+/* MDIO SerDes registers */
+#define RTMDIO_838X_BASE			(0xe780)
+#define RTMDIO_839X_BASE			(0xa000)
+#define RTMDIO_930X_SDS_INDACS_CMD		(0x03B0)
+#define RTMDIO_930X_SDS_INDACS_DATA		(0x03B4)
+#define RTMDIO_931X_SERDES_INDRT_ACCESS_CTRL	(0x5638)
+#define RTMDIO_931X_SERDES_INDRT_DATA_CTRL	(0x563C)
 
 struct p_hdr {
 	uint8_t		*buf;
@@ -2394,6 +2397,228 @@ static int rtmdio_930x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val)
 	return err;
 }
 
+/*
+ * The RTL931x family has 14 "frontend" SerDes that are cascaded. All operations (e.g. reset) work
+ * on this frontend view while their registers are distributed over a total of least 26 background
+ * SerDes. Two types of SerDes exist:
+ *
+ * An "even" SerDes with numbers 0, 1, 2, 4, 6, 8, 10, 12 works on one background SerDes.
+ *
+ * The "odd" SerDes with numbers 3, 5, 7, 9, 11 & 13 SerDes consist of a total of 3 background
+ * SerDes (one analog and two XSGMII) each with its own page/register set. So it gives this
+ * mapping:
+
+ * Frontend SerDes  |  0  1  2  3  4  5  6  7  8  9 10 11 12 13
+ * -----------------+------------------------------------------
+ * Backend SerDes 1 |  0  1  2  3  6  7 10 11 14 15 18 19 22 23
+ * Backend SerDes 2 |  0  1  2  4  6  8 10 12 14 16 18 20 22 24
+ * Backend SerDes 3 |  0  1  2  5  6  9 10 13 14 17 18 21 22 25
+ *
+ * Align this for readability by simulating a total of 576 pages and mix them as follows.
+ *
+ * frontend page		"even" frontend SerDes		"odd" frontend SerDes
+ * page 0x000-0x03f (analog):	page 0x000-0x03f back SDS	page 0x000-0x03f back SDS
+ * page 0x100-0x13f (XSGMII1):	page 0x000-0x03f back SDS	page 0x000-0x03f back SDS+1
+ * page 0x200-0x23f (XSGMII2):	page 0x000-0x03f back SDS	page 0x000-0x03f back SDS+2
+ */ 
+
+int rtmdio_931x_read_sds_phy(int sds, int page, int regnum)
+{
+	u32 cmd = sds << 2 | page << 7 | regnum << 13 | 1;
+	int i, ret = -EIO;
+
+	pr_debug("%s: phy_addr(SDS-ID) %d, phy_reg: %d\n", __func__, sds, regnum);
+
+	mutex_lock(&rtmdio_lock_sds);
+	sw_w32(cmd, RTMDIO_931X_SERDES_INDRT_ACCESS_CTRL);
+
+	for (i = 0; i < 100; i++) {
+		if (!(sw_r32(RTMDIO_931X_SERDES_INDRT_ACCESS_CTRL) & 0x1))
+			break;
+		mdelay(1);
+	}
+
+	if (i < 100)
+		ret = sw_r32(RTMDIO_931X_SERDES_INDRT_DATA_CTRL) & 0xffff;
+
+	mutex_unlock(&rtmdio_lock_sds);
+
+	pr_debug("%s: returning %08x\n", __func__, ret);
+
+	return ret;
+}
+
+int rtmdio_931x_write_sds_phy(int sds, int page, int regnum, u16 val)
+{
+	u32 cmd = sds << 2 | page << 7 | regnum << 13;;
+	int i, ret = -EIO;
+
+	mutex_lock(&rtmdio_lock_sds);
+	sw_w32(cmd, RTMDIO_931X_SERDES_INDRT_ACCESS_CTRL);
+	sw_w32(val, RTMDIO_931X_SERDES_INDRT_DATA_CTRL);
+
+	cmd = sw_r32(RTMDIO_931X_SERDES_INDRT_ACCESS_CTRL) | 0x3;
+	sw_w32(cmd, RTMDIO_931X_SERDES_INDRT_ACCESS_CTRL);
+
+	for (i = 0; i < 100; i++) {
+		if (!(sw_r32(RTMDIO_931X_SERDES_INDRT_ACCESS_CTRL) & 0x1))
+			break;
+		mdelay(1);
+	}
+
+	mutex_unlock(&rtmdio_lock_sds);
+
+	if (i < 100)
+		ret = 0;
+
+	return ret;
+}
+
+/* RTL931x specific MDIO functions */
+
+static int rtmdio_931x_write_phy(u32 port, u32 page, u32 reg, u32 val)
+{
+	u32 v;
+	int err = 0;
+
+	val &= 0xffff;
+	if (port > 63 || page > 4095 || reg > 31)
+		return -ENOTSUPP;
+
+	mutex_lock(&rtmdio_lock);
+	pr_debug("%s: writing to phy %d %d %d %d\n", __func__, port, page, reg, val);
+	/* Clear both port registers */
+	sw_w32(0, RTL931X_SMI_INDRT_ACCESS_CTRL_2);
+	sw_w32(0, RTL931X_SMI_INDRT_ACCESS_CTRL_2 + 4);
+	sw_w32_mask(0, BIT(port % 32), RTL931X_SMI_INDRT_ACCESS_CTRL_2 + (port / 32) * 4);
+
+	sw_w32_mask(0xffff, val, RTL931X_SMI_INDRT_ACCESS_CTRL_3);
+
+	v = reg << 6 | page << 11 ;
+	sw_w32(v, RTL931X_SMI_INDRT_ACCESS_CTRL_0);
+
+	sw_w32(0x1ff, RTL931X_SMI_INDRT_ACCESS_CTRL_1);
+
+	v |= BIT(4) | 1; /* Write operation and execute */
+	sw_w32(v, RTL931X_SMI_INDRT_ACCESS_CTRL_0);
+
+	do {
+	} while (sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_0) & 0x1);
+
+	if (sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_0) & 0x2)
+		err = -EIO;
+
+	mutex_unlock(&rtmdio_lock);
+
+	return err;
+}
+
+static int rtmdio_931x_read_phy(u32 port, u32 page, u32 reg, u32 *val)
+{
+	u32 v;
+
+	if (port > 63 || page > 4095 || reg > 31)
+		return -ENOTSUPP;
+
+	mutex_lock(&rtmdio_lock);
+
+	sw_w32(port << 5, RTL931X_SMI_INDRT_ACCESS_BC_PHYID_CTRL);
+
+	v = reg << 6 | page << 11 | 1;
+	sw_w32(v, RTL931X_SMI_INDRT_ACCESS_CTRL_0);
+
+	do {
+	} while (sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_0) & 0x1);
+
+	v = sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_0);
+	*val = sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_3);
+	*val = (*val & 0xffff0000) >> 16;
+
+	pr_debug("%s: port %d, page: %d, reg: %x, val: %x, v: %08x\n",
+		__func__, port, page, reg, *val, v);
+
+	mutex_unlock(&rtmdio_lock);
+
+	return 0;
+}
+
+/* Read an mmd register of the PHY */
+static int rtmdio_931x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val)
+{
+	int err = 0;
+	u32 v;
+	/* Select PHY register type
+	 * If select 1G/10G MMD register type, registers EXT_PAGE, MAIN_PAGE and REG settings are don?t care.
+	 * 0x0  Normal register (Clause 22)
+	 * 0x1: 1G MMD register (MMD via Clause 22 registers 13 and 14)
+	 * 0x2: 10G MMD register (MMD via Clause 45)
+	 */
+	int type = 2;
+
+	mutex_lock(&rtmdio_lock);
+
+	/* Set PHY to access via port-number */
+	sw_w32(port << 5, RTL931X_SMI_INDRT_ACCESS_BC_PHYID_CTRL);
+
+	/* Set MMD device number and register to write to */
+	sw_w32(devnum << 16 | regnum, RTL931X_SMI_INDRT_ACCESS_MMD_CTRL);
+
+	v = type << 2 | BIT(0); /* MMD-access-type | EXEC */
+	sw_w32(v, RTL931X_SMI_INDRT_ACCESS_CTRL_0);
+
+	do {
+		v = sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_0);
+	} while (v & BIT(0));
+
+	/* Check for error condition */
+	if (v & BIT(1))
+		err = -EIO;
+
+	*val = sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_3) >> 16;
+
+	pr_debug("%s: port %d, dev: %x, regnum: %x, val: %x (err %d)\n", __func__,
+		 port, devnum, regnum, *val, err);
+
+	mutex_unlock(&rtmdio_lock);
+
+	return err;
+}
+
+/* Write to an mmd register of the PHY */
+static int rtmdio_931x_write_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 val)
+{
+	int err = 0;
+	u32 v;
+	int type = 2;
+	u64 pm;
+
+	mutex_lock(&rtmdio_lock);
+
+	/* Set PHY to access via port-mask */
+	pm = (u64)1 << port;
+	sw_w32((u32)pm, RTL931X_SMI_INDRT_ACCESS_CTRL_2);
+	sw_w32((u32)(pm >> 32), RTL931X_SMI_INDRT_ACCESS_CTRL_2 + 4);
+
+	/* Set data to write */
+	sw_w32_mask(0xffff, val, RTL931X_SMI_INDRT_ACCESS_CTRL_3);
+
+	/* Set MMD device number and register to write to */
+	sw_w32(devnum << 16 | regnum, RTL931X_SMI_INDRT_ACCESS_MMD_CTRL);
+
+	v = BIT(4) | type << 2 | BIT(0); /* WRITE | MMD-access-type | EXEC */
+	sw_w32(v, RTL931X_SMI_INDRT_ACCESS_CTRL_0);
+
+	do {
+		v = sw_r32(RTL931X_SMI_INDRT_ACCESS_CTRL_0);
+	} while (v & BIT(0));
+
+	pr_debug("%s: port %d, dev: %x, regnum: %x, val: %x (err %d)\n", __func__,
+		 port, devnum, regnum, val, err);
+	mutex_unlock(&rtmdio_lock);
+
+	return err;
+}
+
 /* These are the core functions of our new Realtek SoC MDIO bus. */
 
 static int rtmdio_read_c45(struct mii_bus *bus, int addr, int devnum, int regnum)
@@ -2506,8 +2731,8 @@ static int rtmdio_93xx_read(struct mii_bus *bus, int addr, int regnum)
 
 	priv->raw[addr] = (priv->page[addr] == priv->rawpage);
 	if (priv->phy_is_internal[addr]) {
-		return rtl931x_read_sds_phy(priv->sds_id[addr],
-					    priv->page[addr], regnum);
+		return rtmdio_931x_read_sds_phy(priv->sds_id[addr],
+						priv->page[addr], regnum);
 	}
 
 	err = (*priv->read_phy)(addr, priv->page[addr], regnum, &val);
@@ -2594,8 +2819,8 @@ static int rtmdio_93xx_write(struct mii_bus *bus, int addr, int regnum, u16 val)
 	if (!priv->raw[addr] && (regnum != RTMDIO_PAGE_SELECT || page == priv->rawpage)) {
 		priv->raw[addr] = (page == priv->rawpage);
 		if (priv->phy_is_internal[addr]) {
-			return rtl931x_write_sds_phy(priv->sds_id[addr],
-						     page, regnum, val);
+			return rtmdio_931x_write_sds_phy(priv->sds_id[addr],
+							 page, regnum, val);
 		}
 
 		err = (*priv->write_phy)(addr, page, regnum, val);
@@ -2922,10 +3147,10 @@ static int rtl838x_mdio_init(struct rtl838x_eth_priv *priv)
 		priv->mii_bus->read = rtmdio_93xx_read;
 		priv->mii_bus->write = rtmdio_93xx_write;
 		priv->mii_bus->reset = rtmdio_931x_reset;
-		bus_priv->read_mmd_phy = rtl931x_read_mmd_phy;
-		bus_priv->write_mmd_phy = rtl931x_write_mmd_phy;
-		bus_priv->read_phy = rtl931x_read_phy;
-		bus_priv->write_phy = rtl931x_write_phy;
+		bus_priv->read_mmd_phy = rtmdio_931x_read_mmd_phy;
+		bus_priv->write_mmd_phy = rtmdio_931x_write_mmd_phy;
+		bus_priv->read_phy = rtmdio_931x_read_phy;
+		bus_priv->write_phy = rtmdio_931x_write_phy;
 		bus_priv->cpu_port = RTL931X_CPU_PORT;
 		bus_priv->rawpage = 0x1fff;
 		break;
diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
index edeea8f6e2..a24cb891d2 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
@@ -466,4 +466,7 @@ int rtmdio_838x_write_phy(u32 port, u32 page, u32 reg, u32 val);
 int rtmdio_930x_read_sds_phy(int sds, int page, int regnum);
 int rtmdio_930x_write_sds_phy(int sds, int page, int regnum, u16 val);
 
+int rtmdio_931x_read_sds_phy(int sds, int page, int regnum);
+int rtmdio_931x_write_sds_phy(int sds, int page, int regnum, u16 val);
+
 #endif /* _RTL838X_ETH_H */
diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index 98066bf233..9b51a97abf 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -19,7 +19,7 @@
 #include "rtl83xx-phy.h"
 
 extern struct rtl83xx_soc_info soc_info;
-extern struct mutex smi_lock;
+
 extern int phy_package_port_write_paged(struct phy_device *phydev, int port, int page, u32 regnum, u16 val);
 extern int phy_package_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val);
 extern int phy_package_port_read_paged(struct phy_device *phydev, int port, int page, u32 regnum);
@@ -28,6 +28,9 @@ extern int phy_package_read_paged(struct phy_device *phydev, int page, u32 regnu
 extern int rtmdio_930x_read_sds_phy(int sds, int page, int regnum);
 extern int rtmdio_930x_write_sds_phy(int sds, int page, int regnum, u16 val);
 
+extern int rtmdio_931x_read_sds_phy(int sds, int page, int regnum);
+extern int rtmdio_931x_write_sds_phy(int sds, int page, int regnum, u16 val);
+
 #define PHY_PAGE_2	2
 #define PHY_PAGE_4	4
 
@@ -295,53 +298,6 @@ static u32 rtl9300_sds_mode_get(int sds_num)
 	return v & RTL930X_SDS_MASK;
 }
 
-int rtl931x_read_sds_phy(int phy_addr, int page, int phy_reg)
-{
-	int i;
-	u32 cmd = phy_addr << 2 | page << 7 | phy_reg << 13 | 1;
-
-	pr_debug("%s: phy_addr(SDS-ID) %d, phy_reg: %d\n", __func__, phy_addr, phy_reg);
-	sw_w32(cmd, RTL931X_SERDES_INDRT_ACCESS_CTRL);
-
-	for (i = 0; i < 100; i++) {
-		if (!(sw_r32(RTL931X_SERDES_INDRT_ACCESS_CTRL) & 0x1))
-			break;
-		mdelay(1);
-	}
-
-	if (i >= 100)
-		return -EIO;
-
-	pr_debug("%s: returning %04x\n", __func__, sw_r32(RTL931X_SERDES_INDRT_DATA_CTRL) & 0xffff);
-
-	return sw_r32(RTL931X_SERDES_INDRT_DATA_CTRL) & 0xffff;
-}
-
-int rtl931x_write_sds_phy(int phy_addr, int page, int phy_reg, u16 v)
-{
-	int i;
-	u32 cmd;
-
-	cmd = phy_addr << 2 | page << 7 | phy_reg << 13;
-	sw_w32(cmd, RTL931X_SERDES_INDRT_ACCESS_CTRL);
-
-	sw_w32(v, RTL931X_SERDES_INDRT_DATA_CTRL);
-
-	cmd =  sw_r32(RTL931X_SERDES_INDRT_ACCESS_CTRL) | 0x3;
-	sw_w32(cmd, RTL931X_SERDES_INDRT_ACCESS_CTRL);
-
-	for (i = 0; i < 100; i++) {
-		if (!(sw_r32(RTL931X_SERDES_INDRT_ACCESS_CTRL) & 0x1))
-			break;
-		mdelay(1);
-	}
-
-	if (i >= 100)
-		return -EIO;
-
-	return 0;
-}
-
 /* Read the link and speed status of the 2 internal SGMII/1000Base-X
  * ports of the RTL838x SoCs
  */
@@ -2949,18 +2905,18 @@ static void rtl9310_sds_field_w(int sds, u32 page, u32 reg, int end_bit, int sta
 	if (l < 32) {
 		u32 mask = BIT(l) - 1;
 
-		data = rtl931x_read_sds_phy(sds, page, reg);
+		data = rtmdio_931x_read_sds_phy(sds, page, reg);
 		data &= ~(mask << start_bit);
 		data |= (v & mask) << start_bit;
 	}
 
-	rtl931x_write_sds_phy(sds, page, reg, data);
+	rtmdio_931x_write_sds_phy(sds, page, reg, data);
 }
 
 static u32 rtl9310_sds_field_r(int sds, u32 page, u32 reg, int end_bit, int start_bit)
 {
 	int l = end_bit - start_bit + 1;
-	u32 v = rtl931x_read_sds_phy(sds, page, reg);
+	u32 v = rtmdio_931x_read_sds_phy(sds, page, reg);
 
 	if (l >= 32)
 		return v;
@@ -3187,9 +3143,9 @@ static void rtl931x_cmu_type_set(u32 asds, phy_interface_t mode, int chiptype)
 	        __func__, cmu_type, cmu_page, frc_cmu_spd, lane, asds);
 
 	if (cmu_type == 1) {
-		pr_info("%s A CMU page 0x28 0x7 %08x\n", __func__, rtl931x_read_sds_phy(asds, 0x28, 0x7));
+		pr_info("%s A CMU page 0x28 0x7 %08x\n", __func__, rtmdio_931x_read_sds_phy(asds, 0x28, 0x7));
 		rtl9310_sds_field_w(asds, cmu_page, 0x7, 15, 15, 0);
-		pr_info("%s B CMU page 0x28 0x7 %08x\n", __func__, rtl931x_read_sds_phy(asds, 0x28, 0x7));
+		pr_info("%s B CMU page 0x28 0x7 %08x\n", __func__, rtmdio_931x_read_sds_phy(asds, 0x28, 0x7));
 		if (chiptype) {
 			rtl9310_sds_field_w(asds, cmu_page, 0xd, 14, 14, 0);
 		}
@@ -3201,7 +3157,7 @@ static void rtl931x_cmu_type_set(u32 asds, phy_interface_t mode, int chiptype)
 		rtl9310_sds_field_w(evenSds, 0x20, 0x12, 15, 13, frc_cmu_spd);
 	}
 
-	pr_info("%s CMU page 0x28 0x7 %08x\n", __func__, rtl931x_read_sds_phy(asds, 0x28, 0x7));
+	pr_info("%s CMU page 0x28 0x7 %08x\n", __func__, rtmdio_931x_read_sds_phy(asds, 0x28, 0x7));
 	return;
 }
 
@@ -3212,15 +3168,15 @@ static void rtl931x_sds_rx_rst(u32 sds)
 	if (sds < 2)
 		return;
 
-	rtl931x_write_sds_phy(asds, 0x2e, 0x12, 0x2740);
-	rtl931x_write_sds_phy(asds, 0x2f, 0x0, 0x0);
-	rtl931x_write_sds_phy(asds, 0x2f, 0x2, 0x2010);
-	rtl931x_write_sds_phy(asds, 0x20, 0x0, 0xc10);
+	rtmdio_931x_write_sds_phy(asds, 0x2e, 0x12, 0x2740);
+	rtmdio_931x_write_sds_phy(asds, 0x2f, 0x0, 0x0);
+	rtmdio_931x_write_sds_phy(asds, 0x2f, 0x2, 0x2010);
+	rtmdio_931x_write_sds_phy(asds, 0x20, 0x0, 0xc10);
 
-	rtl931x_write_sds_phy(asds, 0x2e, 0x12, 0x27c0);
-	rtl931x_write_sds_phy(asds, 0x2f, 0x0, 0xc000);
-	rtl931x_write_sds_phy(asds, 0x2f, 0x2, 0x6010);
-	rtl931x_write_sds_phy(asds, 0x20, 0x0, 0xc30);
+	rtmdio_931x_write_sds_phy(asds, 0x2e, 0x12, 0x27c0);
+	rtmdio_931x_write_sds_phy(asds, 0x2f, 0x0, 0xc000);
+	rtmdio_931x_write_sds_phy(asds, 0x2f, 0x2, 0x6010);
+	rtmdio_931x_write_sds_phy(asds, 0x20, 0x0, 0xc30);
 
 	mdelay(50);
 }
@@ -3314,17 +3270,17 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 	val = rtl9310_sds_field_r(asds, 0x1F, 0x9, 11, 6);
 
 	pr_info("%s: fibermode %08X stored mode 0x%x analog SDS %d", __func__,
-			rtl931x_read_sds_phy(asds, 0x1f, 0x9), val, asds);
+			rtmdio_931x_read_sds_phy(asds, 0x1f, 0x9), val, asds);
 	pr_info("%s: SGMII mode %08X in 0x24 0x9 analog SDS %d", __func__,
-			rtl931x_read_sds_phy(asds, 0x24, 0x9), asds);
+			rtmdio_931x_read_sds_phy(asds, 0x24, 0x9), asds);
 	pr_info("%s: CMU mode %08X stored even SDS %d", __func__,
-			rtl931x_read_sds_phy(asds & ~1, 0x20, 0x12), asds & ~1);
+			rtmdio_931x_read_sds_phy(asds & ~1, 0x20, 0x12), asds & ~1);
 	pr_info("%s: serdes_mode_ctrl %08X", __func__,  RTL931X_SERDES_MODE_CTRL + 4 * (sds >> 2));
-	pr_info("%s CMU page 0x24 0x7 %08x\n", __func__, rtl931x_read_sds_phy(asds, 0x24, 0x7));
-	pr_info("%s CMU page 0x26 0x7 %08x\n", __func__, rtl931x_read_sds_phy(asds, 0x26, 0x7));
-	pr_info("%s CMU page 0x28 0x7 %08x\n", __func__, rtl931x_read_sds_phy(asds, 0x28, 0x7));
-	pr_info("%s XSG page 0x0 0xe %08x\n", __func__, rtl931x_read_sds_phy(dSds, 0x0, 0xe));
-	pr_info("%s XSG2 page 0x0 0xe %08x\n", __func__, rtl931x_read_sds_phy(dSds + 1, 0x0, 0xe));
+	pr_info("%s CMU page 0x24 0x7 %08x\n", __func__, rtmdio_931x_read_sds_phy(asds, 0x24, 0x7));
+	pr_info("%s CMU page 0x26 0x7 %08x\n", __func__, rtmdio_931x_read_sds_phy(asds, 0x26, 0x7));
+	pr_info("%s CMU page 0x28 0x7 %08x\n", __func__, rtmdio_931x_read_sds_phy(asds, 0x28, 0x7));
+	pr_info("%s XSG page 0x0 0xe %08x\n", __func__, rtmdio_931x_read_sds_phy(dSds, 0x0, 0xe));
+	pr_info("%s XSG2 page 0x0 0xe %08x\n", __func__, rtmdio_931x_read_sds_phy(dSds + 1, 0x0, 0xe));
 
 	model_info = sw_r32(RTL93XX_MODEL_NAME_INFO);
 	if ((model_info >> 4) & 0x1) {
@@ -3340,7 +3296,7 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 		dSds = (sds - 1) * 2;
 
 	pr_info("%s: 2.5gbit %08X dsds %d", __func__,
-	        rtl931x_read_sds_phy(dSds, 0x1, 0x14), dSds);
+	        rtmdio_931x_read_sds_phy(dSds, 0x1, 0x14), dSds);
 
 	pr_info("%s: RTL931X_PS_SERDES_OFF_MODE_CTRL_ADDR 0x%08X\n", __func__, sw_r32(RTL931X_PS_SERDES_OFF_MODE_CTRL_ADDR));
 	ori = sw_r32(RTL931X_PS_SERDES_OFF_MODE_CTRL_ADDR);
@@ -3377,13 +3333,13 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 			rtl9310_sds_field_w(asds, 0x6, 0x2, 12, 12, 1);
 
 			for (int i = 0; i < sizeof(sds_config_10p3125g_type1) / sizeof(sds_config); ++i) {
-				rtl931x_write_sds_phy(asds, sds_config_10p3125g_type1[i].page - 0x4, sds_config_10p3125g_type1[i].reg, sds_config_10p3125g_type1[i].data);
+				rtmdio_931x_write_sds_phy(asds, sds_config_10p3125g_type1[i].page - 0x4, sds_config_10p3125g_type1[i].reg, sds_config_10p3125g_type1[i].data);
 			}
 
 			evenSds = asds - (asds % 2);
 
 			for (int i = 0; i < sizeof(sds_config_10p3125g_cmu_type1) / sizeof(sds_config); ++i) {
-				rtl931x_write_sds_phy(evenSds,
+				rtmdio_931x_write_sds_phy(evenSds,
 				                      sds_config_10p3125g_cmu_type1[i].page - 0x4, sds_config_10p3125g_cmu_type1[i].reg, sds_config_10p3125g_cmu_type1[i].data);
 			}
 
@@ -3400,13 +3356,13 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 			rtl9310_sds_field_w(asds, 0x2f, 0x1, 11, 0, 0x00);
 
 			rtl9310_sds_field_w(asds, 0x2e, 0xf, 12, 6, 0x7F);
-			rtl931x_write_sds_phy(asds, 0x2f, 0x12, 0xaaa);
+			rtmdio_931x_write_sds_phy(asds, 0x2f, 0x12, 0xaaa);
 
 			rtl931x_sds_rx_rst(sds);
 
-			rtl931x_write_sds_phy(asds, 0x7, 0x10, op_code);
-			rtl931x_write_sds_phy(asds, 0x6, 0x1d, 0x0480);
-			rtl931x_write_sds_phy(asds, 0x6, 0xe, 0x0400);
+			rtmdio_931x_write_sds_phy(asds, 0x7, 0x10, op_code);
+			rtmdio_931x_write_sds_phy(asds, 0x6, 0x1d, 0x0480);
+			rtmdio_931x_write_sds_phy(asds, 0x6, 0xe, 0x0400);
 		}
 		break;
 
@@ -3458,16 +3414,16 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 
 	if (sds >= 2 && sds <= 13) {
 		if (chiptype)
-			rtl931x_write_sds_phy(asds, 0x2E, 0x1, board_sds_tx_type1[sds - 2]);
+			rtmdio_931x_write_sds_phy(asds, 0x2E, 0x1, board_sds_tx_type1[sds - 2]);
 		else {
 			val = 0xa0000;
 			sw_w32(val, RTL93XX_CHIP_INFO);
 			val = sw_r32(RTL93XX_CHIP_INFO);
 			if (val & BIT(28)) /* consider 9311 etc. RTL9313_CHIP_ID == HWP_CHIP_ID(unit)) */
 			{
-				rtl931x_write_sds_phy(asds, 0x2E, 0x1, board_sds_tx2[sds - 2]);
+				rtmdio_931x_write_sds_phy(asds, 0x2E, 0x1, board_sds_tx2[sds - 2]);
 			} else {
-				rtl931x_write_sds_phy(asds, 0x2E, 0x1, board_sds_tx[sds - 2]);
+				rtmdio_931x_write_sds_phy(asds, 0x2E, 0x1, board_sds_tx[sds - 2]);
 			}
 			val = 0;
 			sw_w32(val, RTL93XX_CHIP_INFO);
@@ -3523,7 +3479,7 @@ int rtl931x_sds_cmu_band_get(int sds, phy_interface_t mode)
 	sds -= (sds % 2);
 	asds = rtl931x_get_analog_sds(sds);
 	page += 1;
-	rtl931x_write_sds_phy(asds, 0x1f, 0x02, 73);
+	rtmdio_931x_write_sds_phy(asds, 0x1f, 0x02, 73);
 
 	rtl9310_sds_field_w(asds, page, 0x5, 15, 15, 1);
 	band = rtl9310_sds_field_r(asds, 0x1f, 0x15, 8, 3);
diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
index f57eb50867..652e27a5c5 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
@@ -60,16 +60,12 @@ struct __attribute__ ((__packed__)) fw_header {
 #define RTL930X_MAC_FORCE_MODE_CTRL		(0xCA1C)
 
 /* Registers of the internal SerDes of the 9310 */
-#define RTL931X_SERDES_INDRT_ACCESS_CTRL	(0x5638)
-#define RTL931X_SERDES_INDRT_DATA_CTRL		(0x563C)
 #define RTL931X_SERDES_MODE_CTRL		(0x13cc)
 #define RTL931X_PS_SERDES_OFF_MODE_CTRL_ADDR	(0x13F4)
 #define RTL931X_MAC_SERDES_MODE_CTRL(sds)	(0x136C + (((sds) << 2)))
 
 int rtl9300_serdes_setup(int port, int sds_num, phy_interface_t phy_mode);
 
-int rtl931x_read_sds_phy(int phy_addr, int page, int phy_reg);
-int rtl931x_write_sds_phy(int phy_addr, int page, int phy_reg, u16 v);
 int rtl931x_sds_cmu_band_get(int sds, phy_interface_t mode);
 void rtl931x_sds_init(u32 sds, phy_interface_t mode);
 



From lede-commits at lists.infradead.org  Wed Aug 20 00:57:49 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 20 Aug 2025 03:57:49 -0400
Subject: [openwrt/openwrt]  mac80211: remove rt2x00_platform_data
In-Reply-To: <175567666986.3601326.1588657512538110183@git-01.infra.openwrt.org>
References: <175567666986.3601326.1588657512538110183@git-01.infra.openwrt.org>
Message-ID: <mailman.124329.1755676673.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4d3a35f36891b65ca2989fb9d9ae7170ac946177

commit 4d3a35f36891b65ca2989fb9d9ae7170ac946177
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Mon Aug 18 12:49:43 2025 -0700

    mac80211: remove rt2x00_platform_data
    
    All of this uses OF now. No need to keep platform data around.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19804
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/kernel/mac80211/Makefile                   |  1 -
 .../601-rt2x00-introduce-rt2x00_platform_h.patch   | 32 ---------------
 ...-Add-support-for-loading-EEPROM-from-user.patch | 14 ++++---
 ...-Add-option-to-pass-EEPROM-file-name-from.patch | 43 --------------------
 ...0-Add-support-for-loading-EEPROM-from-MTD.patch | 13 +++---
 ...4-wifi-rt2x00-Support-EEPROM-swap-binding.patch |  4 +-
 ...0-support-loading-eeprom-from-NVMEM-cells.patch |  7 ++--
 ...ding-EEPROM-from-devicetree-embedded-data.patch |  2 +-
 ...low_disabling_bands_through_platform_data.patch | 47 ----------------------
 .../607-rt2x00-add_platform_data_mac_addr.patch    | 25 ------------
 ...-rt2x00-allow_disabling_bands_through_dts.patch |  8 ++--
 .../rt2x00/611-rt2x00-add-AP+STA-support.patch     |  2 +-
 ...import-support-for-external-LNA-on-MT7620.patch |  4 +-
 .../generic/files/include/linux/rt2x00_platform.h  | 23 -----------
 14 files changed, 25 insertions(+), 200 deletions(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 23f639ee00..b4cdf5420d 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -335,7 +335,6 @@ ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
   ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
     define Build/Configure
 	  cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h
-	  cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h
     endef
   endif
 endif
diff --git a/package/kernel/mac80211/patches/rt2x00/601-rt2x00-introduce-rt2x00_platform_h.patch b/package/kernel/mac80211/patches/rt2x00/601-rt2x00-introduce-rt2x00_platform_h.patch
deleted file mode 100644
index 1e6211a470..0000000000
--- a/package/kernel/mac80211/patches/rt2x00/601-rt2x00-introduce-rt2x00_platform_h.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- /dev/null
-+++ b/include/linux/rt2x00_platform.h
-@@ -0,0 +1,19 @@
-+/*
-+ * Platform data definition for the rt2x00 driver
-+ *
-+ * Copyright (C) 2011 Gabor Juhos <juhosg at openwrt.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify it
-+ * under the terms of the GNU General Public License version 2 as published
-+ * by the Free Software Foundation.
-+ *
-+ */
-+
-+#ifndef _RT2X00_PLATFORM_H
-+#define _RT2X00_PLATFORM_H
-+
-+struct rt2x00_platform_data {
-+	char *eeprom_file_name;
-+};
-+
-+#endif /* _RT2X00_PLATFORM_H */
---- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
-@@ -28,6 +28,7 @@
- #include <linux/average.h>
- #include <linux/usb.h>
- #include <linux/clk.h>
-+#include <linux/rt2x00_platform.h>
- 
- #include <net/mac80211.h>
- 
diff --git a/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch b/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch
index 39d8edb998..1eba6a79db 100644
--- a/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch
+++ b/package/kernel/mac80211/patches/rt2x00/602-01-wifi-rt2x00-Add-support-for-loading-EEPROM-from-user.patch
@@ -100,7 +100,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	.drv_init_registers	= rt2800mmio_init_registers,
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
-@@ -693,6 +693,7 @@ enum rt2x00_capability_flags {
+@@ -692,6 +692,7 @@ enum rt2x00_capability_flags {
  	REQUIRE_HT_TX_DESC,
  	REQUIRE_PS_AUTOWAKE,
  	REQUIRE_DELAYED_RFKILL,
@@ -108,7 +108,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  
  	/*
  	 * Capabilities
-@@ -1505,4 +1506,13 @@ void rt2x00lib_remove_dev(struct rt2x00_
+@@ -1504,4 +1505,13 @@ void rt2x00lib_remove_dev(struct rt2x00_
  int rt2x00lib_suspend(struct rt2x00_dev *rt2x00dev);
  int rt2x00lib_resume(struct rt2x00_dev *rt2x00dev);
  
@@ -124,7 +124,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  #endif /* RT2X00_H */
 --- /dev/null
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
-@@ -0,0 +1,77 @@
+@@ -0,0 +1,79 @@
 +// SPDX-License-Identifier: GPL-2.0-or-later
 +/*	Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn at gmail.com>
 + *	Copyright (C) 2004 - 2009 Gertjan van Wingerde <gwingerde at gmail.com>
@@ -137,6 +137,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 +
 +#include <linux/kernel.h>
 +#include <linux/module.h>
++#include <linux/of.h>
 +
 +#include "rt2x00.h"
 +#include "rt2x00soc.h"
@@ -144,10 +145,11 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 +static const char *
 +rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev)
 +{
-+	struct rt2x00_platform_data *pdata = rt2x00dev->dev->platform_data;
++	struct device_node *np = rt2x00dev->dev->of_node;
++	const char *eep;
 +
-+	if (pdata && pdata->eeprom_file_name)
-+		return pdata->eeprom_file_name;
++	if (np && !of_property_read_string(np, "ralink,eeprom", &eep))
++		return eep;
 +
 +	return NULL;
 +}
diff --git a/package/kernel/mac80211/patches/rt2x00/602-02-wifi-rt2x00-Add-option-to-pass-EEPROM-file-name-from.patch b/package/kernel/mac80211/patches/rt2x00/602-02-wifi-rt2x00-Add-option-to-pass-EEPROM-file-name-from.patch
deleted file mode 100644
index 90055b911f..0000000000
--- a/package/kernel/mac80211/patches/rt2x00/602-02-wifi-rt2x00-Add-option-to-pass-EEPROM-file-name-from.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 15329d8b206d9c04ffad49aecd37f5d0bfb85768 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Sun, 15 Oct 2023 14:23:19 +0200
-Subject: [PATCH 2/5] wifi: rt2x00: Add option to pass EEPROM file name from DT
-
-Add option to pass EEPROM file name from DT using ralink,eeprom binding.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
----
- drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
---- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
-@@ -10,6 +10,7 @@
- 
- #include <linux/kernel.h>
- #include <linux/module.h>
-+#include <linux/of.h>
- 
- #include "rt2x00.h"
- #include "rt2x00soc.h"
-@@ -18,10 +19,20 @@ static const char *
- rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev)
- {
- 	struct rt2x00_platform_data *pdata = rt2x00dev->dev->platform_data;
-+#ifdef CONFIG_OF
-+	struct device_node *np;
-+	const char *eep;
-+#endif
- 
- 	if (pdata && pdata->eeprom_file_name)
- 		return pdata->eeprom_file_name;
- 
-+#ifdef CONFIG_OF
-+	np = rt2x00dev->dev->of_node;
-+	if (np && !of_property_read_string(np, "ralink,eeprom", &eep))
-+		return eep;
-+#endif
-+
- 	return NULL;
- }
- 
diff --git a/package/kernel/mac80211/patches/rt2x00/602-03-wifi-rt2x00-Add-support-for-loading-EEPROM-from-MTD.patch b/package/kernel/mac80211/patches/rt2x00/602-03-wifi-rt2x00-Add-support-for-loading-EEPROM-from-MTD.patch
index fab4bf39c0..befd59491f 100644
--- a/package/kernel/mac80211/patches/rt2x00/602-03-wifi-rt2x00-Add-support-for-loading-EEPROM-from-MTD.patch
+++ b/package/kernel/mac80211/patches/rt2x00/602-03-wifi-rt2x00-Add-support-for-loading-EEPROM-from-MTD.patch
@@ -24,15 +24,14 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	  Supported chips: RT2880, RT3050, RT3052, RT3350, RT3352.
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
-@@ -10,11 +10,69 @@
- 
+@@ -11,10 +11,66 @@
  #include <linux/kernel.h>
  #include <linux/module.h>
+ #include <linux/of.h>
 +#if IS_ENABLED(CONFIG_MTD)
 +#include <linux/mtd/mtd.h>
 +#include <linux/mtd/partitions.h>
 +#endif
- #include <linux/of.h>
  
  #include "rt2x00.h"
  #include "rt2x00soc.h"
@@ -40,8 +39,6 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 +#if IS_ENABLED(CONFIG_MTD)
 +static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev)
 +{
-+	int ret = -EINVAL;
-+#ifdef CONFIG_OF
 +	struct device_node *np = rt2x00dev->dev->of_node, *mtd_np = NULL;
 +	int size, offset = 0;
 +	struct mtd_info *mtd;
@@ -49,6 +46,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 +	const __be32 *list;
 +	phandle phandle;
 +	size_t retlen;
++	int ret;
 +
 +	list = of_get_property(np, "ralink,mtd-eeprom", &size);
 +	if (!list)
@@ -79,13 +77,12 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 +		       &retlen, (u_char *)rt2x00dev->eeprom);
 +	put_mtd_device(mtd);
 +
-+	if (retlen != rt2x00dev->ops->eeprom_size || ret) {
++	if (ret || retlen != rt2x00dev->ops->eeprom_size) {
 +		dev_err(rt2x00dev->dev, "failed to load eeprom from device \"%s\"\n", part);
 +		return ret;
 +	}
 +
 +	dev_info(rt2x00dev->dev, "loaded eeprom from mtd device \"%s\"\n", part);
-+#endif
 +
 +	return ret;
 +}
@@ -94,7 +91,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  static const char *
  rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev)
  {
-@@ -83,6 +141,14 @@ err_exit:
+@@ -74,6 +130,14 @@ err_exit:
  
  int rt2x00lib_read_eeprom(struct rt2x00_dev *rt2x00dev)
  {
diff --git a/package/kernel/mac80211/patches/rt2x00/602-04-wifi-rt2x00-Support-EEPROM-swap-binding.patch b/package/kernel/mac80211/patches/rt2x00/602-04-wifi-rt2x00-Support-EEPROM-swap-binding.patch
index 392910d224..184b73f271 100644
--- a/package/kernel/mac80211/patches/rt2x00/602-04-wifi-rt2x00-Support-EEPROM-swap-binding.patch
+++ b/package/kernel/mac80211/patches/rt2x00/602-04-wifi-rt2x00-Support-EEPROM-swap-binding.patch
@@ -33,12 +33,12 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev)
  {
  	int ret = -EINVAL;
-@@ -66,6 +79,8 @@ static int rt2800lib_read_eeprom_mtd(str
+@@ -65,6 +78,8 @@ static int rt2800lib_read_eeprom_mtd(str
  		return ret;
  	}
  
 +	rt2800lib_eeprom_swap(rt2x00dev);
 +
  	dev_info(rt2x00dev->dev, "loaded eeprom from mtd device \"%s\"\n", part);
- #endif
  
+ 	return ret;
diff --git a/package/kernel/mac80211/patches/rt2x00/602-05-wifi-rt2x00-support-loading-eeprom-from-NVMEM-cells.patch b/package/kernel/mac80211/patches/rt2x00/602-05-wifi-rt2x00-support-loading-eeprom-from-NVMEM-cells.patch
index e6633363bd..30b5de904c 100644
--- a/package/kernel/mac80211/patches/rt2x00/602-05-wifi-rt2x00-support-loading-eeprom-from-NVMEM-cells.patch
+++ b/package/kernel/mac80211/patches/rt2x00/602-05-wifi-rt2x00-support-loading-eeprom-from-NVMEM-cells.patch
@@ -21,12 +21,11 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00eeprom.c
-@@ -14,12 +14,12 @@
+@@ -15,11 +15,11 @@
  #include <linux/mtd/mtd.h>
  #include <linux/mtd/partitions.h>
  #endif
 +#include <linux/nvmem-consumer.h>
- #include <linux/of.h>
  
  #include "rt2x00.h"
  #include "rt2x00soc.h"
@@ -43,7 +42,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  static int rt2800lib_read_eeprom_mtd(struct rt2x00_dev *rt2x00dev)
  {
  	int ret = -EINVAL;
-@@ -88,6 +89,40 @@ static int rt2800lib_read_eeprom_mtd(str
+@@ -86,6 +87,40 @@ static int rt2800lib_read_eeprom_mtd(str
  }
  #endif
  
@@ -84,7 +83,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  static const char *
  rt2x00lib_get_eeprom_file_name(struct rt2x00_dev *rt2x00dev)
  {
-@@ -164,6 +199,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
+@@ -153,6 +188,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
  		return 0;
  #endif
  
diff --git a/package/kernel/mac80211/patches/rt2x00/603-wifi-rt2x00-Add-support-for-loading-EEPROM-from-devicetree-embedded-data.patch b/package/kernel/mac80211/patches/rt2x00/603-wifi-rt2x00-Add-support-for-loading-EEPROM-from-devicetree-embedded-data.patch
index 0ef946a6cb..9e6cfb4d07 100644
--- a/package/kernel/mac80211/patches/rt2x00/603-wifi-rt2x00-Add-support-for-loading-EEPROM-from-devicetree-embedded-data.patch
+++ b/package/kernel/mac80211/patches/rt2x00/603-wifi-rt2x00-Add-support-for-loading-EEPROM-from-devicetree-embedded-data.patch
@@ -63,7 +63,7 @@ Signed-off-by: Coia Prant <coiaprant at gmail.com>
  #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_
+@@ -182,6 +203,10 @@ int rt2x00lib_read_eeprom(struct rt2x00_
  {
  	int ret;
  
diff --git a/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch b/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch
deleted file mode 100644
index a554707bda..0000000000
--- a/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/include/linux/rt2x00_platform.h
-+++ b/include/linux/rt2x00_platform.h
-@@ -14,6 +14,9 @@
- 
- struct rt2x00_platform_data {
- 	char *eeprom_file_name;
-+
-+	int disable_2ghz;
-+	int disable_5ghz;
- };
- 
- #endif /* _RT2X00_PLATFORM_H */
---- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1008,6 +1008,22 @@ static int rt2x00lib_probe_hw_modes(stru
- 	unsigned int num_rates;
- 	unsigned int i;
- 
-+	if (rt2x00dev->dev->platform_data) {
-+		struct rt2x00_platform_data *pdata;
-+
-+		pdata = rt2x00dev->dev->platform_data;
-+		if (pdata->disable_2ghz)
-+			spec->supported_bands &= ~SUPPORT_BAND_2GHZ;
-+		if (pdata->disable_5ghz)
-+			spec->supported_bands &= ~SUPPORT_BAND_5GHZ;
-+	}
-+
-+	if ((spec->supported_bands & SUPPORT_BAND_BOTH) == 0) {
-+		rt2x00_err(rt2x00dev, "No supported bands\n");
-+		return -EINVAL;
-+	}
-+
-+
- 	num_rates = 0;
- 	if (spec->supported_rates & SUPPORT_RATE_CCK)
- 		num_rates += 4;
---- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h
-@@ -398,6 +398,7 @@ struct hw_mode_spec {
- 	unsigned int supported_bands;
- #define SUPPORT_BAND_2GHZ	0x00000001
- #define SUPPORT_BAND_5GHZ	0x00000002
-+#define SUPPORT_BAND_BOTH	(SUPPORT_BAND_2GHZ | SUPPORT_BAND_5GHZ)
- 
- 	unsigned int supported_rates;
- #define SUPPORT_RATE_CCK	0x00000001
diff --git a/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch b/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch
deleted file mode 100644
index 79f99ffdf4..0000000000
--- a/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -990,6 +990,12 @@ static void rt2x00lib_rate(struct ieee80
- 
- void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr)
- {
-+	struct rt2x00_platform_data *pdata;
-+
-+	pdata = rt2x00dev->dev->platform_data;
-+	if (pdata && pdata->mac_address)
-+		ether_addr_copy(eeprom_mac_addr, pdata->mac_address);
-+
- 	of_get_mac_address(rt2x00dev->dev->of_node, eeprom_mac_addr);
- 
- 	if (!is_valid_ether_addr(eeprom_mac_addr)) {
---- a/include/linux/rt2x00_platform.h
-+++ b/include/linux/rt2x00_platform.h
-@@ -14,6 +14,7 @@
- 
- struct rt2x00_platform_data {
- 	char *eeprom_file_name;
-+	const u8 *mac_address;
- 
- 	int disable_2ghz;
- 	int disable_5ghz;
diff --git a/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch b/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch
index 31f2f0261f..7a44d1725f 100644
--- a/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch
+++ b/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch
@@ -1,10 +1,9 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1013,6 +1013,16 @@ static int rt2x00lib_probe_hw_modes(stru
+@@ -1007,6 +1007,14 @@ static int rt2x00lib_probe_hw_modes(stru
  	struct ieee80211_rate *rates;
  	unsigned int num_rates;
  	unsigned int i;
-+#ifdef CONFIG_OF
 +	struct device_node *np = rt2x00dev->dev->of_node;
 +	unsigned int enabled;
 +	if (!of_property_read_u32(np, "ralink,2ghz",
@@ -13,7 +12,6 @@
 +	if (!of_property_read_u32(np, "ralink,5ghz",
 +                                          &enabled) && !enabled)
 +		spec->supported_bands &= ~SUPPORT_BAND_5GHZ;
-+#endif /* CONFIG_OF */
  
- 	if (rt2x00dev->dev->platform_data) {
- 		struct rt2x00_platform_data *pdata;
+ 	num_rates = 0;
+ 	if (spec->supported_rates & SUPPORT_RATE_CCK)
diff --git a/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch b/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch
index 9564f02edd..64291e8f89 100644
--- a/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch
+++ b/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1362,7 +1362,7 @@ static inline void rt2x00lib_set_if_comb
+@@ -1338,7 +1338,7 @@ static inline void rt2x00lib_set_if_comb
  	 */
  	if_limit = &rt2x00dev->if_limits_ap;
  	if_limit->max = rt2x00dev->ops->max_ap_intf;
diff --git a/package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch
index 7b63c7ab5f..c1889401b9 100644
--- a/package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch
+++ b/package/kernel/mac80211/patches/rt2x00/994-rt2x00-import-support-for-external-LNA-on-MT7620.patch
@@ -80,10 +80,10 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  #include <linux/usb.h>
  #include <linux/clk.h>
 +#include <linux/pinctrl/consumer.h>
- #include <linux/rt2x00_platform.h>
  
  #include <net/mac80211.h>
-@@ -1017,6 +1018,11 @@ struct rt2x00_dev {
+ 
+@@ -1015,6 +1016,11 @@ struct rt2x00_dev {
  
  	/* Clock for System On Chip devices. */
  	struct clk *clk;
diff --git a/target/linux/generic/files/include/linux/rt2x00_platform.h b/target/linux/generic/files/include/linux/rt2x00_platform.h
deleted file mode 100644
index e10377e21b..0000000000
--- a/target/linux/generic/files/include/linux/rt2x00_platform.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Platform data definition for the rt2x00 driver
- *
- * Copyright (C) 2011 Gabor Juhos <juhosg at openwrt.org>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation.
- *
- */
-
-#ifndef _RT2X00_PLATFORM_H
-#define _RT2X00_PLATFORM_H
-
-struct rt2x00_platform_data {
-	char *eeprom_file_name;
-	const u8 *mac_address;
-
-	int disable_2ghz;
-	int disable_5ghz;
-};
-
-#endif /* _RT2X00_PLATFORM_H */



From lede-commits at lists.infradead.org  Wed Aug 20 02:15:19 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 20 Aug 2025 05:15:19 -0400
Subject: [openwrt/openwrt]  airoha: pwm: use devm
In-Reply-To: <175568131821.4055579.17330994247368281872@git-01.infra.openwrt.org>
References: <175568131821.4055579.17330994247368281872@git-01.infra.openwrt.org>
Message-ID: <mailman.124430.1755683495.1866309.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/1c817247186bcce50e4cbf0c737fe113843214ae

commit 1c817247186bcce50e4cbf0c737fe113843214ae
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat Apr 26 16:48:12 2025 -0700

    airoha: pwm: use devm
    
    Removes the need for a remove function in platform_device.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18660
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit aa4c96b9250c06d07cde145441e391453f87ccb2)
---
 .../108-pwm-airoha-Add-support-for-EN7581-SoC.patch      | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/target/linux/airoha/patches-6.6/108-pwm-airoha-Add-support-for-EN7581-SoC.patch b/target/linux/airoha/patches-6.6/108-pwm-airoha-Add-support-for-EN7581-SoC.patch
index 8f83c696c4..0b114d5f53 100644
--- a/target/linux/airoha/patches-6.6/108-pwm-airoha-Add-support-for-EN7581-SoC.patch
+++ b/target/linux/airoha/patches-6.6/108-pwm-airoha-Add-support-for-EN7581-SoC.patch
@@ -48,7 +48,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  obj-$(CONFIG_PWM_ATMEL_HLCDC_PWM)	+= pwm-atmel-hlcdc.o
 --- /dev/null
 +++ b/drivers/pwm/pwm-airoha.c
-@@ -0,0 +1,400 @@
+@@ -0,0 +1,388 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Copyright 2022 Markus Gothe <markus.gothe at genexis.eu>
@@ -414,18 +414,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 +	if (IS_ERR(pc->regmap))
 +		return PTR_ERR(pc->regmap);
 +
-+	platform_set_drvdata(pdev, pc);
-+
-+	return pwmchip_add(&pc->chip);
-+}
-+
-+static int airoha_pwm_remove(struct platform_device *pdev)
-+{
-+	struct airoha_pwm *pc = platform_get_drvdata(pdev);
-+
-+	pwmchip_remove(&pc->chip);
-+
-+	return 0;
++	return devm_pwmchip_add(&pdev->dev, &pc->chip);
 +}
 +
 +static const struct of_device_id airoha_pwm_of_match[] = {
@@ -440,7 +429,6 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 +		.of_match_table = airoha_pwm_of_match,
 +	},
 +	.probe = airoha_pwm_probe,
-+	.remove = airoha_pwm_remove,
 +};
 +module_platform_driver(airoha_pwm_driver);
 +



From lede-commits at lists.infradead.org  Wed Aug 20 02:15:18 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 20 Aug 2025 05:15:18 -0400
Subject: [openwrt/openwrt]  airoha: drop MTD Airoha parser patch
In-Reply-To: <175568131821.4055579.17330994247368281872@git-01.infra.openwrt.org>
References: <175568131821.4055579.17330994247368281872@git-01.infra.openwrt.org>
Message-ID: <mailman.124431.1755683495.1866309.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/1fef2116ac9512bf03f8daaa47292f9fce786970

commit 1fef2116ac9512bf03f8daaa47292f9fce786970
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Tue Feb 18 20:35:00 2025 +0100

    airoha: drop MTD Airoha parser patch
    
    Drop Airoha MTD parser patch as a better solution was agreed with a
    fixed partition table.
    
    Tested-by: Aleksander Jan Bajkowski <olek2 at wp.pl> # tested on Quantum W1700k
    Link: https://github.com/openwrt/openwrt/pull/18112
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit 90dee1ab30809ee415a8f18965ec2193d438195c)
---
 ...-mtd-parser-add-support-for-Airoha-parser.patch | 170 ---------------------
 1 file changed, 170 deletions(-)

diff --git a/target/linux/airoha/patches-6.6/902-mtd-parser-add-support-for-Airoha-parser.patch b/target/linux/airoha/patches-6.6/902-mtd-parser-add-support-for-Airoha-parser.patch
deleted file mode 100644
index 590d0d9faa..0000000000
--- a/target/linux/airoha/patches-6.6/902-mtd-parser-add-support-for-Airoha-parser.patch
+++ /dev/null
@@ -1,170 +0,0 @@
-From ca46c5834ba3a74595a93d7a491fa9c943be7c30 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Sun, 28 Jul 2024 12:15:53 +0200
-Subject: [PATCH 3/3] mtd: parser: add support for Airoha parser
-
-Add support for Airoha parser based on a post parse ofpart function.
-
-Airoha partition table follow normal fixed-partition implementation
-with a special implementation for the ART partition. This is always the
-past partition and is placed from the end of the flash - the partition
-size.
-
-To enable this special implementation for ART partition, the relevant
-node require the "airoha,dynamic-art" compatible. With that declared,
-offset value is ignored and real offset is updated with the calculated
-value.
-
-Due to usage of specific bad block management driver, the MTD size might
-vary hence the ART partition offset needs to be dynamically parsed and
-can't be declared statically.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
----
- drivers/mtd/parsers/Kconfig         | 10 ++++++
- drivers/mtd/parsers/Makefile        |  1 +
- drivers/mtd/parsers/ofpart_airoha.c | 56 +++++++++++++++++++++++++++++
- drivers/mtd/parsers/ofpart_airoha.h | 18 ++++++++++
- drivers/mtd/parsers/ofpart_core.c   |  6 ++++
- 5 files changed, 91 insertions(+)
- create mode 100644 drivers/mtd/parsers/ofpart_airoha.c
- create mode 100644 drivers/mtd/parsers/ofpart_airoha.h
-
---- a/drivers/mtd/parsers/Kconfig
-+++ b/drivers/mtd/parsers/Kconfig
-@@ -93,6 +93,16 @@ config MTD_OF_PARTS
- 	  flash memory node, as described in
- 	  Documentation/devicetree/bindings/mtd/mtd.yaml.
- 
-+config MTD_OF_PARTS_AIROHA
-+	bool "Airoha EN7815 partitioning support"
-+	depends on MTD_OF_PARTS && (ARCH_AIROHA || COMPILE_TEST)
-+	default ARCH_AIROHA
-+	help
-+	  This provides partitions parser for Airoha EN7815 family devices
-+	  that can have dynamic "ART" partition at the end of the flash.
-+	  It takes care of finding the correct offset and update property
-+	  with it.
-+
- config MTD_OF_PARTS_BCM4908
- 	bool "BCM4908 partitioning support"
- 	depends on MTD_OF_PARTS && (ARCH_BCMBCA || COMPILE_TEST)
---- a/drivers/mtd/parsers/Makefile
-+++ b/drivers/mtd/parsers/Makefile
-@@ -7,6 +7,7 @@ obj-$(CONFIG_MTD_CMDLINE_PARTS)		+= cmdl
- obj-$(CONFIG_MTD_MYLOADER_PARTS)		+= myloader.o
- obj-$(CONFIG_MTD_OF_PARTS)		+= ofpart.o
- ofpart-y				+= ofpart_core.o
-+ofpart-$(CONFIG_MTD_OF_PARTS_AIROHA)	+= ofpart_airoha.o
- ofpart-$(CONFIG_MTD_OF_PARTS_BCM4908)	+= ofpart_bcm4908.o
- ofpart-$(CONFIG_MTD_OF_PARTS_LINKSYS_NS)+= ofpart_linksys_ns.o
- obj-$(CONFIG_MTD_PARSER_IMAGETAG)	+= parser_imagetag.o
---- /dev/null
-+++ b/drivers/mtd/parsers/ofpart_airoha.c
-@@ -0,0 +1,56 @@
-+// SPDX-License-Identifier: GPL-2.0
-+/*
-+ * Copyright (C) 2024 Christian Marangi <ansuelsmth at gmail.com>
-+ */
-+
-+#include <linux/mtd/mtd.h>
-+#include <linux/mtd/partitions.h>
-+
-+#include "ofpart_airoha.h"
-+
-+int airoha_partitions_post_parse(struct mtd_info *mtd,
-+				 struct mtd_partition *parts,
-+				 int nr_parts)
-+{
-+	struct mtd_partition *part;
-+	int len, a_cells, s_cells;
-+	struct device_node *pp;
-+	struct property *prop;
-+	const __be32 *reg;
-+	__be32 *new_reg;
-+
-+	part = &parts[nr_parts - 1];
-+	pp = part->of_node;
-+
-+	/* Skip if ART partition have a valid offset instead of a dynamic one */
-+	if (!of_device_is_compatible(pp, "airoha,dynamic-art"))
-+		return 0;
-+
-+	/* ART partition is set at the end of flash - size */
-+	part->offset = mtd->size - part->size;
-+
-+	/* Update the offset with the new calculate value in DT */
-+	prop = kzalloc(sizeof(*prop), GFP_KERNEL);
-+	if (!prop)
-+		return -ENOMEM;
-+
-+	/* Reg already validated by fixed-partition parser */
-+	reg = of_get_property(pp, "reg", &len);
-+
-+	/* Fixed partition */
-+	a_cells = of_n_addr_cells(pp);
-+	s_cells = of_n_size_cells(pp);
-+
-+	prop->name = "reg";
-+	prop->length = (a_cells + s_cells) * sizeof(__be32);
-+	prop->value = kmemdup(reg, (a_cells + s_cells) * sizeof(__be32),
-+			      GFP_KERNEL);
-+	new_reg = prop->value;
-+	memset(new_reg, 0, a_cells * sizeof(__be32));
-+	new_reg[a_cells - 1] = cpu_to_be32(part->offset);
-+	if (a_cells > 1)
-+		new_reg[0] = cpu_to_be32(part->offset >> 32);
-+	of_update_property(pp, prop);
-+
-+	return 0;
-+}
---- /dev/null
-+++ b/drivers/mtd/parsers/ofpart_airoha.h
-@@ -0,0 +1,18 @@
-+/* SPDX-License-Identifier: GPL-2.0 */
-+#ifndef __OFPART_AIROHA_H
-+#define __OFPART_AIROHA_H
-+
-+#ifdef CONFIG_MTD_OF_PARTS_AIROHA
-+int airoha_partitions_post_parse(struct mtd_info *mtd,
-+				 struct mtd_partition *parts,
-+				 int nr_parts);
-+#else
-+static inline int airoha_partitions_post_parse(struct mtd_info *mtd,
-+					       struct mtd_partition *parts,
-+					       int nr_parts)
-+{
-+	return -EOPNOTSUPP;
-+}
-+#endif
-+
-+#endif
---- a/drivers/mtd/parsers/ofpart_core.c
-+++ b/drivers/mtd/parsers/ofpart_core.c
-@@ -16,6 +16,7 @@
- #include <linux/slab.h>
- #include <linux/mtd/partitions.h>
- 
-+#include "ofpart_airoha.h"
- #include "ofpart_bcm4908.h"
- #include "ofpart_linksys_ns.h"
- 
-@@ -23,6 +24,10 @@ struct fixed_partitions_quirks {
- 	int (*post_parse)(struct mtd_info *mtd, struct mtd_partition *parts, int nr_parts);
- };
- 
-+static struct fixed_partitions_quirks airoha_partitions_quirks = {
-+	.post_parse = airoha_partitions_post_parse,
-+};
-+
- static struct fixed_partitions_quirks bcm4908_partitions_quirks = {
- 	.post_parse = bcm4908_partitions_post_parse,
- };
-@@ -192,6 +197,7 @@ static const struct of_device_id parse_o
- 	/* Generic */
- 	{ .compatible = "fixed-partitions" },
- 	/* Customized */
-+	{ .compatible = "airoha,fixed-partitions", .data = &airoha_partitions_quirks, },
- 	{ .compatible = "brcm,bcm4908-partitions", .data = &bcm4908_partitions_quirks, },
- 	{ .compatible = "linksys,ns-partitions", .data = &linksys_ns_partitions_quirks, },
- 	{},



From lede-commits at lists.infradead.org  Wed Aug 20 02:15:21 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 20 Aug 2025 05:15:21 -0400
Subject: [openwrt/openwrt]  airoha: backport minor fixes for ethernet driver
In-Reply-To: <175568131821.4055579.17330994247368281872@git-01.infra.openwrt.org>
References: <175568131821.4055579.17330994247368281872@git-01.infra.openwrt.org>
Message-ID: <mailman.124434.1755683495.1866309.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/62cee22812b0de9fc0517eb83362c14a798f5fa2

commit 62cee22812b0de9fc0517eb83362c14a798f5fa2
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Tue Mar 4 23:53:39 2025 +0100

    airoha: backport minor fixes for ethernet driver
    
    Backport some upstream patch for Airoha ethernet driver in preparation
    for Flow Offload support.
    
    Tested-by: Aleksander Jan Bajkowski <olek2 at wp.pl> # tested on Quantum W1700k
    Tested-by: Andrew LaMarche <andrewjlamarche at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18166
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit afea8bda0d9fc34032d7da04806c7f6caf971369)
---
 ...airoha-Fix-wrong-GDM4-register-definition.patch | 46 +++++++++++++++
 ...ha-Fix-TSO-support-for-header-cloned-skbs.patch | 65 ++++++++++++++++++++++
 ...t-airoha-Reset-BQL-stopping-the-netdevice.patch | 47 ++++++++++++++++
 3 files changed, 158 insertions(+)

diff --git a/target/linux/airoha/patches-6.6/045-v6.14-net-airoha-Fix-wrong-GDM4-register-definition.patch b/target/linux/airoha/patches-6.6/045-v6.14-net-airoha-Fix-wrong-GDM4-register-definition.patch
new file mode 100644
index 0000000000..e14dd3e6d5
--- /dev/null
+++ b/target/linux/airoha/patches-6.6/045-v6.14-net-airoha-Fix-wrong-GDM4-register-definition.patch
@@ -0,0 +1,46 @@
+From d31a49d37cb132b31cc6683eef2122f8609d6229 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Mon, 20 Jan 2025 16:41:40 +0100
+Subject: [PATCH] net: airoha: Fix wrong GDM4 register definition
+
+Fix wrong GDM4 register definition, in Airoha SDK GDM4 is defined at
+offset 0x2400 but this doesn't make sense as it does conflict with the
+CDM4 that is in the same location.
+
+Following the pattern where each GDM base is at the FWD_CFG, currently
+GDM4 base offset is set to 0x2500. This is correct but REG_GDM4_FWD_CFG
+and REG_GDM4_SRC_PORT_SET are still using the SDK reference with the
+0x2400 offset. Fix these 2 define by subtracting 0x100 to each register
+to reflect the real address location.
+
+Fixes: 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC")
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Acked-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Reviewed-by: Jacob Keller <jacob.e.keller at intel.com>
+Link: https://patch.msgid.link/20250120154148.13424-1-ansuelsmth at gmail.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/ethernet/mediatek/airoha_eth.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c
+index 415d784de741..09f448f29124 100644
+--- a/drivers/net/ethernet/mediatek/airoha_eth.c
++++ b/drivers/net/ethernet/mediatek/airoha_eth.c
+@@ -266,11 +266,11 @@
+ #define REG_GDM3_FWD_CFG		GDM3_BASE
+ #define GDM3_PAD_EN_MASK		BIT(28)
+ 
+-#define REG_GDM4_FWD_CFG		(GDM4_BASE + 0x100)
++#define REG_GDM4_FWD_CFG		GDM4_BASE
+ #define GDM4_PAD_EN_MASK		BIT(28)
+ #define GDM4_SPORT_OFFSET0_MASK		GENMASK(11, 8)
+ 
+-#define REG_GDM4_SRC_PORT_SET		(GDM4_BASE + 0x33c)
++#define REG_GDM4_SRC_PORT_SET		(GDM4_BASE + 0x23c)
+ #define GDM4_SPORT_OFF2_MASK		GENMASK(19, 16)
+ #define GDM4_SPORT_OFF1_MASK		GENMASK(15, 12)
+ #define GDM4_SPORT_OFF0_MASK		GENMASK(11, 8)
+-- 
+2.48.1
+
diff --git a/target/linux/airoha/patches-6.6/046-v6.15-net-airoha-Fix-TSO-support-for-header-cloned-skbs.patch b/target/linux/airoha/patches-6.6/046-v6.15-net-airoha-Fix-TSO-support-for-header-cloned-skbs.patch
new file mode 100644
index 0000000000..b381612c39
--- /dev/null
+++ b/target/linux/airoha/patches-6.6/046-v6.15-net-airoha-Fix-TSO-support-for-header-cloned-skbs.patch
@@ -0,0 +1,65 @@
+From c6287e1a858e336cc202b484c6138a0fe252c6b3 Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Thu, 13 Feb 2025 16:34:20 +0100
+Subject: [PATCH] net: airoha: Fix TSO support for header cloned skbs
+
+For GSO packets, skb_cow_head() will reallocate the skb for TSO header
+cloned skbs in airoha_dev_xmit(). For this reason, sinfo pointer can be
+no more valid. Fix the issue relying on skb_shinfo() macro directly in
+airoha_dev_xmit().
+
+The problem exists since
+commit 23020f049327 ("net: airoha: Introduce ethernet support for EN7581 SoC")
+but it is not a user visible, since we can't currently enable TSO
+for DSA user ports since we are missing to initialize net_device
+vlan_features field.
+
+Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek at intel.com>
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Link: https://patch.msgid.link/20250213-airoha-en7581-flowtable-offload-v4-1-b69ca16d74db at kernel.org
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/ethernet/mediatek/airoha_eth.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c
+index 09f448f29124..aa5f220ddbcf 100644
+--- a/drivers/net/ethernet/mediatek/airoha_eth.c
++++ b/drivers/net/ethernet/mediatek/airoha_eth.c
+@@ -2556,11 +2556,10 @@ static u16 airoha_dev_select_queue(struct net_device *dev, struct sk_buff *skb,
+ static netdev_tx_t airoha_dev_xmit(struct sk_buff *skb,
+ 				   struct net_device *dev)
+ {
+-	struct skb_shared_info *sinfo = skb_shinfo(skb);
+ 	struct airoha_gdm_port *port = netdev_priv(dev);
++	u32 nr_frags = 1 + skb_shinfo(skb)->nr_frags;
+ 	u32 msg0, msg1, len = skb_headlen(skb);
+ 	struct airoha_qdma *qdma = port->qdma;
+-	u32 nr_frags = 1 + sinfo->nr_frags;
+ 	struct netdev_queue *txq;
+ 	struct airoha_queue *q;
+ 	void *data = skb->data;
+@@ -2583,8 +2582,9 @@ static netdev_tx_t airoha_dev_xmit(struct sk_buff *skb,
+ 		if (skb_cow_head(skb, 0))
+ 			goto error;
+ 
+-		if (sinfo->gso_type & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) {
+-			__be16 csum = cpu_to_be16(sinfo->gso_size);
++		if (skb_shinfo(skb)->gso_type & (SKB_GSO_TCPV4 |
++						 SKB_GSO_TCPV6)) {
++			__be16 csum = cpu_to_be16(skb_shinfo(skb)->gso_size);
+ 
+ 			tcp_hdr(skb)->check = (__force __sum16)csum;
+ 			msg0 |= FIELD_PREP(QDMA_ETH_TXMSG_TSO_MASK, 1);
+@@ -2613,7 +2613,7 @@ static netdev_tx_t airoha_dev_xmit(struct sk_buff *skb,
+ 	for (i = 0; i < nr_frags; i++) {
+ 		struct airoha_qdma_desc *desc = &q->desc[index];
+ 		struct airoha_queue_entry *e = &q->entry[index];
+-		skb_frag_t *frag = &sinfo->frags[i];
++		skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
+ 		dma_addr_t addr;
+ 		u32 val;
+ 
+-- 
+2.48.1
+
diff --git a/target/linux/airoha/patches-6.6/047-v6.13-net-airoha-Reset-BQL-stopping-the-netdevice.patch b/target/linux/airoha/patches-6.6/047-v6.13-net-airoha-Reset-BQL-stopping-the-netdevice.patch
new file mode 100644
index 0000000000..4a53e64aa3
--- /dev/null
+++ b/target/linux/airoha/patches-6.6/047-v6.13-net-airoha-Reset-BQL-stopping-the-netdevice.patch
@@ -0,0 +1,47 @@
+From c9f947769b77c8e8f318bfc8a0777e5d20c44d8d Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Thu, 17 Oct 2024 16:01:41 +0200
+Subject: [PATCH] net: airoha: Reset BQL stopping the netdevice
+
+Run airoha_qdma_cleanup_tx_queue() in ndo_stop callback in order to
+unmap pending skbs. Moreover, reset BQL txq state stopping the netdevice,
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Reviewed-by: Hariprasad Kelam <hkelam at marvell.com>
+Message-ID: <20241017-airoha-en7581-reset-bql-v1-1-08c0c9888de5 at kernel.org>
+Signed-off-by: Andrew Lunn <andrew at lunn.ch>
+---
+ drivers/net/ethernet/mediatek/airoha_eth.c | 10 +++++++++-
+ 1 file changed, 9 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c
+index 21d6eed8aece..f463a505f5ba 100644
+--- a/drivers/net/ethernet/mediatek/airoha_eth.c
++++ b/drivers/net/ethernet/mediatek/airoha_eth.c
+@@ -2342,7 +2342,7 @@ static int airoha_dev_stop(struct net_device *dev)
+ {
+ 	struct airoha_gdm_port *port = netdev_priv(dev);
+ 	struct airoha_qdma *qdma = port->qdma;
+-	int err;
++	int i, err;
+ 
+ 	netif_tx_disable(dev);
+ 	err = airoha_set_gdm_ports(qdma->eth, false);
+@@ -2353,6 +2353,14 @@ static int airoha_dev_stop(struct net_device *dev)
+ 			  GLOBAL_CFG_TX_DMA_EN_MASK |
+ 			  GLOBAL_CFG_RX_DMA_EN_MASK);
+ 
++	for (i = 0; i < ARRAY_SIZE(qdma->q_tx); i++) {
++		if (!qdma->q_tx[i].ndesc)
++			continue;
++
++		airoha_qdma_cleanup_tx_queue(&qdma->q_tx[i]);
++		netdev_tx_reset_subqueue(dev, i);
++	}
++
+ 	return 0;
+ }
+ 
+-- 
+2.48.1
+



From lede-commits at lists.infradead.org  Wed Aug 20 02:15:20 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 20 Aug 2025 05:15:20 -0400
Subject: [openwrt/openwrt]  airoha: replace PCIe patch with upstream version
In-Reply-To: <175568131821.4055579.17330994247368281872@git-01.infra.openwrt.org>
References: <175568131821.4055579.17330994247368281872@git-01.infra.openwrt.org>
Message-ID: <mailman.124435.1755683495.1866309.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/30bd948a1ce88bc6d5ad7aaf9b146677bb00ab4e

commit 30bd948a1ce88bc6d5ad7aaf9b146677bb00ab4e
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Tue Mar 4 22:59:45 2025 +0100

    airoha: replace PCIe patch with upstream version
    
    Replace PCIe patch with upstream version and update DTS with new PBUS
    CSR property now required.
    
    Tested-by: Aleksander Jan Bajkowski <olek2 at wp.pl> # tested on Quantum W1700k
    Tested-by: Andrew LaMarche <andrewjlamarche at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18166
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit 921d4385640af05637e9459c805855077cbd33c0)
---
 target/linux/airoha/dts/an7581.dtsi                |  6 +-
 ...-gen3-Rely-on-clk_bulk_prepare_enable-in.patch} |  1 -
 ...-gen3-Move-reset-assert-callbacks-in-.po.patch} |  3 -
 ...-gen3-Add-comment-about-initialization-o.patch} |  3 -
 ...-gen3-Move-reset-delay-in-mtk_pcie_en758.patch} |  3 -
 ...-gen3-Rely-on-msleep-in-mtk_pcie_en7581_.patch} |  3 -
 ...-gen3-Avoid-PCIe-resetting-via-PERST-for.patch} |  3 -
 ...k-gen3-Remove-leftover-mac_reset-assert-f.patch | 34 +++++++++
 ...k-gen3-Configure-PBUS_CSR-registers-for-E.patch | 81 ++++++++++++++++++++++
 ...k-gen3-Configure-PBUS_CSR-registers-for-E.patch | 81 ----------------------
 ...k-gen3-Remove-mac_reset-assert-leftover-f.patch | 26 -------
 11 files changed, 120 insertions(+), 124 deletions(-)

diff --git a/target/linux/airoha/dts/an7581.dtsi b/target/linux/airoha/dts/an7581.dtsi
index 762a6aa1a8..3b9f0c6d65 100644
--- a/target/linux/airoha/dts/an7581.dtsi
+++ b/target/linux/airoha/dts/an7581.dtsi
@@ -433,7 +433,7 @@
 			reg = <0x0 0x1fa20000 0x0 0x388>;
 		};
 
-		syscon at 1fbe3400 {
+		pbus_csr: syscon at 1fbe3400 {
 			compatible = "airoha,en7581-pbus-csr", "syscon";
 			reg = <0x0 0x1fbe3400 0x0 0xff>;
 		};
@@ -603,6 +603,8 @@
 				 <&scuclk EN7581_PCIE2_RST>;
 			reset-names = "phy-lane0", "phy-lane1", "phy-lane2";
 
+			mediatek,pbus-csr = <&pbus_csr 0x0 0x4>;
+
 			interrupts = <GIC_SPI 39 IRQ_TYPE_LEVEL_HIGH>;
 			bus-range = <0x00 0xff>;
 			#interrupt-cells = <1>;
@@ -644,6 +646,8 @@
 				 <&scuclk EN7581_PCIE2_RST>;
 			reset-names = "phy-lane0", "phy-lane1", "phy-lane2";
 
+			mediatek,pbus-csr = <&pbus_csr 0x8 0xc>;
+
 			interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
 			bus-range = <0x00 0xff>;
 			#interrupt-cells = <1>;
diff --git a/target/linux/airoha/patches-6.6/401-PCI-mediatek-gen3-Rely-on-clk_bulk_prepare_enable-in.patch b/target/linux/airoha/patches-6.6/042-01-v6.14-PCI-mediatek-gen3-Rely-on-clk_bulk_prepare_enable-in.patch
similarity index 95%
rename from target/linux/airoha/patches-6.6/401-PCI-mediatek-gen3-Rely-on-clk_bulk_prepare_enable-in.patch
rename to target/linux/airoha/patches-6.6/042-01-v6.14-PCI-mediatek-gen3-Rely-on-clk_bulk_prepare_enable-in.patch
index e1ba4cbac2..9e353f7926 100644
--- a/target/linux/airoha/patches-6.6/401-PCI-mediatek-gen3-Rely-on-clk_bulk_prepare_enable-in.patch
+++ b/target/linux/airoha/patches-6.6/042-01-v6.14-PCI-mediatek-gen3-Rely-on-clk_bulk_prepare_enable-in.patch
@@ -1,5 +1,4 @@
 From 0e7a622da17da0042294860cdb7a2fac091d25b1 Mon Sep 17 00:00:00 2001
-Message-ID: <0e7a622da17da0042294860cdb7a2fac091d25b1.1736960708.git.lorenzo at kernel.org>
 From: Lorenzo Bianconi <lorenzo at kernel.org>
 Date: Wed, 8 Jan 2025 10:50:40 +0100
 Subject: [PATCH 1/6] PCI: mediatek-gen3: Rely on clk_bulk_prepare_enable() in
diff --git a/target/linux/airoha/patches-6.6/402-PCI-mediatek-gen3-Move-reset-assert-callbacks-in-.po.patch b/target/linux/airoha/patches-6.6/042-02-v6.14-PCI-mediatek-gen3-Move-reset-assert-callbacks-in-.po.patch
similarity index 92%
rename from target/linux/airoha/patches-6.6/402-PCI-mediatek-gen3-Move-reset-assert-callbacks-in-.po.patch
rename to target/linux/airoha/patches-6.6/042-02-v6.14-PCI-mediatek-gen3-Move-reset-assert-callbacks-in-.po.patch
index de2b20195c..ed5636d4fd 100644
--- a/target/linux/airoha/patches-6.6/402-PCI-mediatek-gen3-Move-reset-assert-callbacks-in-.po.patch
+++ b/target/linux/airoha/patches-6.6/042-02-v6.14-PCI-mediatek-gen3-Move-reset-assert-callbacks-in-.po.patch
@@ -1,7 +1,4 @@
 From e4c7dfd953f7618f0ccb70d87c1629634f306fab Mon Sep 17 00:00:00 2001
-Message-ID: <e4c7dfd953f7618f0ccb70d87c1629634f306fab.1736960708.git.lorenzo at kernel.org>
-In-Reply-To: <0e7a622da17da0042294860cdb7a2fac091d25b1.1736960708.git.lorenzo at kernel.org>
-References: <0e7a622da17da0042294860cdb7a2fac091d25b1.1736960708.git.lorenzo at kernel.org>
 From: Lorenzo Bianconi <lorenzo at kernel.org>
 Date: Wed, 8 Jan 2025 10:50:41 +0100
 Subject: [PATCH 2/6] PCI: mediatek-gen3: Move reset/assert callbacks in
diff --git a/target/linux/airoha/patches-6.6/403-PCI-mediatek-gen3-Add-comment-about-initialization-o.patch b/target/linux/airoha/patches-6.6/042-03-v6.14-PCI-mediatek-gen3-Add-comment-about-initialization-o.patch
similarity index 84%
rename from target/linux/airoha/patches-6.6/403-PCI-mediatek-gen3-Add-comment-about-initialization-o.patch
rename to target/linux/airoha/patches-6.6/042-03-v6.14-PCI-mediatek-gen3-Add-comment-about-initialization-o.patch
index c8165ced63..785e5bd761 100644
--- a/target/linux/airoha/patches-6.6/403-PCI-mediatek-gen3-Add-comment-about-initialization-o.patch
+++ b/target/linux/airoha/patches-6.6/042-03-v6.14-PCI-mediatek-gen3-Add-comment-about-initialization-o.patch
@@ -1,7 +1,4 @@
 From 0c9d2d2ef0d916b490a9222ed20ff4616fca876d Mon Sep 17 00:00:00 2001
-Message-ID: <0c9d2d2ef0d916b490a9222ed20ff4616fca876d.1736960708.git.lorenzo at kernel.org>
-In-Reply-To: <0e7a622da17da0042294860cdb7a2fac091d25b1.1736960708.git.lorenzo at kernel.org>
-References: <0e7a622da17da0042294860cdb7a2fac091d25b1.1736960708.git.lorenzo at kernel.org>
 From: Lorenzo Bianconi <lorenzo at kernel.org>
 Date: Wed, 8 Jan 2025 10:50:42 +0100
 Subject: [PATCH 3/6] PCI: mediatek-gen3: Add comment about initialization
diff --git a/target/linux/airoha/patches-6.6/404-PCI-mediatek-gen3-Move-reset-delay-in-mtk_pcie_en758.patch b/target/linux/airoha/patches-6.6/042-04-v6.14-PCI-mediatek-gen3-Move-reset-delay-in-mtk_pcie_en758.patch
similarity index 89%
rename from target/linux/airoha/patches-6.6/404-PCI-mediatek-gen3-Move-reset-delay-in-mtk_pcie_en758.patch
rename to target/linux/airoha/patches-6.6/042-04-v6.14-PCI-mediatek-gen3-Move-reset-delay-in-mtk_pcie_en758.patch
index cf8e1f473b..1e6d4cd092 100644
--- a/target/linux/airoha/patches-6.6/404-PCI-mediatek-gen3-Move-reset-delay-in-mtk_pcie_en758.patch
+++ b/target/linux/airoha/patches-6.6/042-04-v6.14-PCI-mediatek-gen3-Move-reset-delay-in-mtk_pcie_en758.patch
@@ -1,7 +1,4 @@
 From 90d4e466c9ea2010f33880a36317a8486ccbe082 Mon Sep 17 00:00:00 2001
-Message-ID: <90d4e466c9ea2010f33880a36317a8486ccbe082.1736960708.git.lorenzo at kernel.org>
-In-Reply-To: <0e7a622da17da0042294860cdb7a2fac091d25b1.1736960708.git.lorenzo at kernel.org>
-References: <0e7a622da17da0042294860cdb7a2fac091d25b1.1736960708.git.lorenzo at kernel.org>
 From: Lorenzo Bianconi <lorenzo at kernel.org>
 Date: Wed, 8 Jan 2025 10:50:43 +0100
 Subject: [PATCH 4/6] PCI: mediatek-gen3: Move reset delay in
diff --git a/target/linux/airoha/patches-6.6/405-PCI-mediatek-gen3-Rely-on-msleep-in-mtk_pcie_en7581_.patch b/target/linux/airoha/patches-6.6/042-05-v6.14-PCI-mediatek-gen3-Rely-on-msleep-in-mtk_pcie_en7581_.patch
similarity index 85%
rename from target/linux/airoha/patches-6.6/405-PCI-mediatek-gen3-Rely-on-msleep-in-mtk_pcie_en7581_.patch
rename to target/linux/airoha/patches-6.6/042-05-v6.14-PCI-mediatek-gen3-Rely-on-msleep-in-mtk_pcie_en7581_.patch
index cbd28e19f1..eb89411d59 100644
--- a/target/linux/airoha/patches-6.6/405-PCI-mediatek-gen3-Rely-on-msleep-in-mtk_pcie_en7581_.patch
+++ b/target/linux/airoha/patches-6.6/042-05-v6.14-PCI-mediatek-gen3-Rely-on-msleep-in-mtk_pcie_en7581_.patch
@@ -1,7 +1,4 @@
 From c98bee18d0a094e37100c85effe5e161418f8644 Mon Sep 17 00:00:00 2001
-Message-ID: <c98bee18d0a094e37100c85effe5e161418f8644.1736960708.git.lorenzo at kernel.org>
-In-Reply-To: <0e7a622da17da0042294860cdb7a2fac091d25b1.1736960708.git.lorenzo at kernel.org>
-References: <0e7a622da17da0042294860cdb7a2fac091d25b1.1736960708.git.lorenzo at kernel.org>
 From: Lorenzo Bianconi <lorenzo at kernel.org>
 Date: Wed, 8 Jan 2025 10:50:44 +0100
 Subject: [PATCH 5/6] PCI: mediatek-gen3: Rely on msleep() in
diff --git a/target/linux/airoha/patches-6.6/406-PCI-mediatek-gen3-Avoid-PCIe-resetting-via-PERST-for.patch b/target/linux/airoha/patches-6.6/042-06-v6.14-PCI-mediatek-gen3-Avoid-PCIe-resetting-via-PERST-for.patch
similarity index 94%
rename from target/linux/airoha/patches-6.6/406-PCI-mediatek-gen3-Avoid-PCIe-resetting-via-PERST-for.patch
rename to target/linux/airoha/patches-6.6/042-06-v6.14-PCI-mediatek-gen3-Avoid-PCIe-resetting-via-PERST-for.patch
index cdc6e353aa..d18d6f6b5a 100644
--- a/target/linux/airoha/patches-6.6/406-PCI-mediatek-gen3-Avoid-PCIe-resetting-via-PERST-for.patch
+++ b/target/linux/airoha/patches-6.6/042-06-v6.14-PCI-mediatek-gen3-Avoid-PCIe-resetting-via-PERST-for.patch
@@ -1,7 +1,4 @@
 From 491cb9c5084790aafa02e843349492c284373231 Mon Sep 17 00:00:00 2001
-Message-ID: <491cb9c5084790aafa02e843349492c284373231.1736960708.git.lorenzo at kernel.org>
-In-Reply-To: <0e7a622da17da0042294860cdb7a2fac091d25b1.1736960708.git.lorenzo at kernel.org>
-References: <0e7a622da17da0042294860cdb7a2fac091d25b1.1736960708.git.lorenzo at kernel.org>
 From: Lorenzo Bianconi <lorenzo at kernel.org>
 Date: Thu, 9 Jan 2025 00:30:45 +0100
 Subject: [PATCH 6/6] PCI: mediatek-gen3: Avoid PCIe resetting via PERST# for
diff --git a/target/linux/airoha/patches-6.6/043-v6.15-PCI-mediatek-gen3-Remove-leftover-mac_reset-assert-f.patch b/target/linux/airoha/patches-6.6/043-v6.15-PCI-mediatek-gen3-Remove-leftover-mac_reset-assert-f.patch
new file mode 100644
index 0000000000..b4a69eb684
--- /dev/null
+++ b/target/linux/airoha/patches-6.6/043-v6.15-PCI-mediatek-gen3-Remove-leftover-mac_reset-assert-f.patch
@@ -0,0 +1,34 @@
+From b6d7bb0d3bd74b491e2e6fd59c4d5110d06fd63b Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Sat, 1 Feb 2025 12:00:18 +0100
+Subject: [PATCH] PCI: mediatek-gen3: Remove leftover mac_reset assert for
+ Airoha EN7581 SoC
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Remove a leftover assert for mac_reset line in mtk_pcie_en7581_power_up().
+
+This is not harmful since EN7581 does not requires mac_reset and
+mac_reset is not defined in EN7581 device tree.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
+Reviewed-by: Philipp Zabel <p.zabel at pengutronix.de>
+Link: https://lore.kernel.org/r/20250201-pcie-en7581-remove-mac_reset-v2-1-a06786cdc683 at kernel.org
+[kwilczynski: commit log]
+Signed-off-by: Krzysztof Wilczy?ski <kwilczynski at kernel.org>
+---
+ drivers/pci/controller/pcie-mediatek-gen3.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/pci/controller/pcie-mediatek-gen3.c
++++ b/drivers/pci/controller/pcie-mediatek-gen3.c
+@@ -902,7 +902,6 @@ static int mtk_pcie_en7581_power_up(stru
+ 	 */
+ 	reset_control_bulk_assert(pcie->soc->phy_resets.num_resets,
+ 				  pcie->phy_resets);
+-	reset_control_assert(pcie->mac_reset);
+ 
+ 	/* Wait for the time needed to complete the reset lines assert. */
+ 	msleep(PCIE_EN7581_RESET_TIME_MS);
diff --git a/target/linux/airoha/patches-6.6/044-v6.15-PCI-mediatek-gen3-Configure-PBUS_CSR-registers-for-E.patch b/target/linux/airoha/patches-6.6/044-v6.15-PCI-mediatek-gen3-Configure-PBUS_CSR-registers-for-E.patch
new file mode 100644
index 0000000000..6470e03bb5
--- /dev/null
+++ b/target/linux/airoha/patches-6.6/044-v6.15-PCI-mediatek-gen3-Configure-PBUS_CSR-registers-for-E.patch
@@ -0,0 +1,81 @@
+From 249b78298078448a699c39356d27d8183af4b281 Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Tue, 25 Feb 2025 09:04:07 +0100
+Subject: [PATCH] PCI: mediatek-gen3: Configure PBUS_CSR registers for EN7581
+ SoC
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Configure PBus base address and address mask to allow the hw
+to detect if a given address is accessible on PCIe controller.
+
+Fixes: f6ab898356dd ("PCI: mediatek-gen3: Add Airoha EN7581 support")
+Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Link: https://lore.kernel.org/r/20250225-en7581-pcie-pbus-csr-v4-2-24324382424a at kernel.org
+Signed-off-by: Krzysztof Wilczy?ski <kwilczynski at kernel.org>
+---
+ drivers/pci/controller/pcie-mediatek-gen3.c | 28 ++++++++++++++++++++-
+ 1 file changed, 27 insertions(+), 1 deletion(-)
+
+--- a/drivers/pci/controller/pcie-mediatek-gen3.c
++++ b/drivers/pci/controller/pcie-mediatek-gen3.c
+@@ -15,6 +15,7 @@
+ #include <linux/irqchip/chained_irq.h>
+ #include <linux/irqdomain.h>
+ #include <linux/kernel.h>
++#include <linux/mfd/syscon.h>
+ #include <linux/module.h>
+ #include <linux/msi.h>
+ #include <linux/of_device.h>
+@@ -24,6 +25,7 @@
+ #include <linux/platform_device.h>
+ #include <linux/pm_domain.h>
+ #include <linux/pm_runtime.h>
++#include <linux/regmap.h>
+ #include <linux/reset.h>
+ 
+ #include "../pci.h"
+@@ -892,9 +894,13 @@ static int mtk_pcie_parse_port(struct mt
+ 
+ static int mtk_pcie_en7581_power_up(struct mtk_gen3_pcie *pcie)
+ {
++	struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie);
+ 	struct device *dev = pcie->dev;
++	struct resource_entry *entry;
++	struct regmap *pbus_regmap;
++	u32 val, args[2], size;
++	resource_size_t addr;
+ 	int err;
+-	u32 val;
+ 
+ 	/*
+ 	 * The controller may have been left out of reset by the bootloader
+@@ -907,6 +913,26 @@ static int mtk_pcie_en7581_power_up(stru
+ 	msleep(PCIE_EN7581_RESET_TIME_MS);
+ 
+ 	/*
++	 * Configure PBus base address and base address mask to allow the
++	 * hw to detect if a given address is accessible on PCIe controller.
++	 */
++	pbus_regmap = syscon_regmap_lookup_by_phandle_args(dev->of_node,
++							   "mediatek,pbus-csr",
++							   ARRAY_SIZE(args),
++							   args);
++	if (IS_ERR(pbus_regmap))
++		return PTR_ERR(pbus_regmap);
++
++	entry = resource_list_first_type(&host->windows, IORESOURCE_MEM);
++	if (!entry)
++		return -ENODEV;
++
++	addr = entry->res->start - entry->offset;
++	regmap_write(pbus_regmap, args[0], lower_32_bits(addr));
++	size = lower_32_bits(resource_size(entry->res));
++	regmap_write(pbus_regmap, args[1], GENMASK(31, __fls(size)));
++
++	/*
+ 	 * Unlike the other MediaTek Gen3 controllers, the Airoha EN7581
+ 	 * requires PHY initialization and power-on before PHY reset deassert.
+ 	 */
diff --git a/target/linux/airoha/patches-6.6/407-PCI-mediatek-gen3-Configure-PBUS_CSR-registers-for-E.patch b/target/linux/airoha/patches-6.6/407-PCI-mediatek-gen3-Configure-PBUS_CSR-registers-for-E.patch
deleted file mode 100644
index 49b8752dca..0000000000
--- a/target/linux/airoha/patches-6.6/407-PCI-mediatek-gen3-Configure-PBUS_CSR-registers-for-E.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From ca4217f3117dceb2d01e179d02031a8758404624 Mon Sep 17 00:00:00 2001
-Message-ID: <ca4217f3117dceb2d01e179d02031a8758404624.1736961235.git.lorenzo at kernel.org>
-From: Lorenzo Bianconi <lorenzo at kernel.org>
-Date: Tue, 3 Sep 2024 23:14:02 +0200
-Subject: [PATCH] PCI: mediatek-gen3: Configure PBUS_CSR registers for EN7581
- SoC
-
-Configure PBus base address and address mask in order to allow the hw
-detecting if a given address is on PCIE0, PCIE1 or PCIE2.
-
-Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
----
- drivers/pci/controller/pcie-mediatek-gen3.c | 29 ++++++++++++++++++++-
- 1 file changed, 28 insertions(+), 1 deletion(-)
-
---- a/drivers/pci/controller/pcie-mediatek-gen3.c
-+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
-@@ -15,6 +15,7 @@
- #include <linux/irqchip/chained_irq.h>
- #include <linux/irqdomain.h>
- #include <linux/kernel.h>
-+#include <linux/mfd/syscon.h>
- #include <linux/module.h>
- #include <linux/msi.h>
- #include <linux/of_device.h>
-@@ -24,6 +25,7 @@
- #include <linux/platform_device.h>
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-+#include <linux/regmap.h>
- #include <linux/reset.h>
- 
- #include "../pci.h"
-@@ -122,6 +124,13 @@
- 
- #define PCIE_MTK_RESET_TIME_US		10
- 
-+#define PCIE_EN7581_PBUS_ADDR(_n)	(0x00 + ((_n) << 3))
-+#define PCIE_EN7581_PBUS_ADDR_MASK(_n)	(0x04 + ((_n) << 3))
-+#define PCIE_EN7581_PBUS_BASE_ADDR(_n)	\
-+	((_n) == 2 ? 0x28000000 :	\
-+	 (_n) == 1 ? 0x24000000 : 0x20000000)
-+#define PCIE_EN7581_PBUS_BASE_ADDR_MASK	GENMASK(31, 26)
-+
- /* Time in ms needed to complete PCIe reset on EN7581 SoC */
- #define PCIE_EN7581_RESET_TIME_MS	100
- 
-@@ -893,7 +902,8 @@ static int mtk_pcie_parse_port(struct mt
- static int mtk_pcie_en7581_power_up(struct mtk_gen3_pcie *pcie)
- {
- 	struct device *dev = pcie->dev;
--	int err;
-+	struct regmap *map;
-+	int err, slot;
- 	u32 val;
- 
- 	/*
-@@ -907,6 +917,23 @@ static int mtk_pcie_en7581_power_up(stru
- 	/* Wait for the time needed to complete the reset lines assert. */
- 	msleep(PCIE_EN7581_RESET_TIME_MS);
- 
-+	map = syscon_regmap_lookup_by_compatible("airoha,en7581-pbus-csr");
-+	if (IS_ERR(map))
-+		return PTR_ERR(map);
-+
-+	/*
-+	 * Configure PBus base address and address mask in order to allow the
-+	 * hw detecting if a given address is on PCIE0, PCIE1 or PCIE2.
-+	 */
-+	slot = of_get_pci_domain_nr(dev->of_node);
-+	if (slot < 0)
-+		return slot;
-+
-+	regmap_write(map, PCIE_EN7581_PBUS_ADDR(slot),
-+		     PCIE_EN7581_PBUS_BASE_ADDR(slot));
-+	regmap_write(map, PCIE_EN7581_PBUS_ADDR_MASK(slot),
-+		     PCIE_EN7581_PBUS_BASE_ADDR_MASK);
-+
- 	/*
- 	 * Unlike the other MediaTek Gen3 controllers, the Airoha EN7581
- 	 * requires PHY initialization and power-on before PHY reset deassert.
diff --git a/target/linux/airoha/patches-6.6/408-PCI-mediatek-gen3-Remove-mac_reset-assert-leftover-f.patch b/target/linux/airoha/patches-6.6/408-PCI-mediatek-gen3-Remove-mac_reset-assert-leftover-f.patch
deleted file mode 100644
index f1512a95cf..0000000000
--- a/target/linux/airoha/patches-6.6/408-PCI-mediatek-gen3-Remove-mac_reset-assert-leftover-f.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From c4defe43ce17a87e6341d126ba736d9f7ebdc541 Mon Sep 17 00:00:00 2001
-Message-ID: <c4defe43ce17a87e6341d126ba736d9f7ebdc541.1736962769.git.lorenzo at kernel.org>
-From: Lorenzo Bianconi <lorenzo at kernel.org>
-Date: Wed, 15 Jan 2025 18:36:26 +0100
-Subject: [PATCH] PCI: mediatek-gen3: Remove mac_reset assert leftover for
- Airoha EN7581 SoC.
-
-Remove a leftover assert for mac_reset line in mtk_pcie_en7581_power_up().
-This is not armful since EN7581 does not requires mac_reset and
-mac_reset is not defined in EN7581 device tree.
-
-Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
----
- drivers/pci/controller/pcie-mediatek-gen3.c | 1 -
- 1 file changed, 1 deletion(-)
-
---- a/drivers/pci/controller/pcie-mediatek-gen3.c
-+++ b/drivers/pci/controller/pcie-mediatek-gen3.c
-@@ -912,7 +912,6 @@ static int mtk_pcie_en7581_power_up(stru
- 	 */
- 	reset_control_bulk_assert(pcie->soc->phy_resets.num_resets,
- 				  pcie->phy_resets);
--	reset_control_assert(pcie->mac_reset);
- 
- 	/* Wait for the time needed to complete the reset lines assert. */
- 	msleep(PCIE_EN7581_RESET_TIME_MS);



From lede-commits at lists.infradead.org  Wed Aug 20 05:57:19 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 20 Aug 2025 08:57:19 -0400
Subject: [openwrt/openwrt]  tools: lzop: add patch bumping minimum CMake
 version to 3.5
In-Reply-To: <175569463973.894787.5242457990816184763@git-01.infra.openwrt.org>
References: <175569463973.894787.5242457990816184763@git-01.infra.openwrt.org>
Message-ID: <mailman.124653.1755696112.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5290e2f52356359bdc76ba7161b012412b0baeb6

commit 5290e2f52356359bdc76ba7161b012412b0baeb6
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Tue Aug 19 22:40:12 2025 +0200

    tools: lzop: add patch bumping minimum CMake version to 3.5
    
    Recent CMake releases require at least version 3.5.
    
    Link: https://github.com/openwrt/openwrt/pull/19813
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 tools/lzop/patches/002-bump-minimum-cmake-version.patch | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/tools/lzop/patches/002-bump-minimum-cmake-version.patch b/tools/lzop/patches/002-bump-minimum-cmake-version.patch
new file mode 100644
index 0000000000..62a389e9e0
--- /dev/null
+++ b/tools/lzop/patches/002-bump-minimum-cmake-version.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,7 +8,7 @@
+ # All Rights Reserved.
+ #
+ 
+-cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
++cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
+ 
+ #
+ # simple usage example (Unix):



From lede-commits at lists.infradead.org  Wed Aug 20 14:31:14 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 20 Aug 2025 17:31:14 -0400
Subject: [openwrt/openwrt]  ath79: switch default kernel to 6.12
In-Reply-To: <175572547410.3029129.11303544092601088016@git-01.infra.openwrt.org>
References: <175572547410.3029129.11303544092601088016@git-01.infra.openwrt.org>
Message-ID: <mailman.125273.1755738780.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/db86a07bdf9f9902164aa033be112f8a5dba8d96

commit db86a07bdf9f9902164aa033be112f8a5dba8d96
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Wed Aug 20 21:09:38 2025 +0800

    ath79: switch default kernel to 6.12
    
    We have not received any negative feedback in the past three months.
    It's time to switch the default kernel to 6.12.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19821
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/ath79/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/ath79/Makefile b/target/linux/ath79/Makefile
index 8e04d7a8ec..1058834a75 100644
--- a/target/linux/ath79/Makefile
+++ b/target/linux/ath79/Makefile
@@ -8,8 +8,7 @@ SUBTARGETS:=generic mikrotik nand tiny
 
 FEATURES:=ramdisk squashfs usbgadget
 
-KERNEL_PATCHVER:=6.6
-KERNEL_TESTING_PATCHVER:=6.12
+KERNEL_PATCHVER:=6.12
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Wed Aug 20 14:31:15 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 20 Aug 2025 17:31:15 -0400
Subject: [openwrt/openwrt]  ath79: remove 6.6 kernel patches and configs
In-Reply-To: <175572547410.3029129.11303544092601088016@git-01.infra.openwrt.org>
References: <175572547410.3029129.11303544092601088016@git-01.infra.openwrt.org>
Message-ID: <mailman.125274.1755738780.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/43ef1a468cae0157418048106e1aa8b885b88246

commit 43ef1a468cae0157418048106e1aa8b885b88246
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Wed Aug 20 21:10:11 2025 +0800

    ath79: remove 6.6 kernel patches and configs
    
    Remove old kernel support to prepare for the next LTS release.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19821
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/ath79/config-6.6                      | 225 -----
 ...9-convert-to-dynamic-GPIO-base-allocation.patch |  32 -
 .../100-reset-ath79-read-back-reset-register.patch |  33 -
 ...1-reset-ath79-reset-ETH-switch-for-AR9344.patch | 105 ---
 ...-ath79-intc-add-irq-cascade-driver-for-QC.patch | 168 ----
 ...irqchip-irq-ath79-cpu-drop-OF-init-helper.patch |  23 -
 ...bindings-PCI-qcom-ar7100-adds-binding-doc.patch |  57 --
 .../311-MIPS-pci-ar71xx-convert-to-OF.patch        | 206 -----
 ...bindings-PCI-qcom-ar7240-adds-binding-doc.patch |  61 --
 .../313-MIPS-pci-ar724x-convert-to-OF.patch        | 213 -----
 .../314-MIPS-ath79-remove-irq-code-from-pci.patch  | 149 ----
 ...IPS-pci-ar724x-add-QCA9550-reset-sequence.patch | 130 ---
 ...MIPS-ath79-swizzle-pci-address-for-ar71xx.patch | 109 ---
 ...-ar724x-clear-power-down-of-pll-on-AR934x.patch |  34 -
 ...r724x-deassert-the-reset-of-PCIe-endpoint.patch |  41 -
 .../ath79/patches-6.6/330-missing-registers.patch  |  20 -
 ...-ath79-add-missing-QCA955x-GMAC-registers.patch |  90 --
 .../ath79/patches-6.6/332-ath79-sgmii-config.patch |  30 -
 .../340-register_gpio_driver_earlier.patch         |  26 -
 .../341-wifi-ath9k-obtain-system-gpios.patch       | 233 ------
 .../patches-6.6/350-MIPS-ath79-ath9k-exports.patch |  36 -
 .../351-MIPS-ath79-common-exports.patch            |  26 -
 ...0-MIPS-ath79-export-UART1-reference-clock.patch |  67 --
 .../370-MIPS-ath79-sanitize-symbols.patch          |  77 --
 ...mtd-nor-support-mtd-name-from-device-tree.patch |  53 --
 .../patches-6.6/410-mtd-cybertan-trx-parser.patch  |  45 -
 .../patches-6.6/430-mtd-ar934x-nand-driver.patch   |  34 -
 .../patches-6.6/700-phy-add-ath79-usb-phys.patch   | 285 -------
 .../701-usb-add-more-OF-quirk-properties.patch     |  24 -
 .../710-net-use-downstream-ag71xx.patch            |  34 -
 .../720-mdio_bitbang_ignore_ta_value.patch         |  40 -
 ...tbang-prevent-rescheduling-during-command.patch |  94 ---
 .../730-ar8216-make-reg-access-atomic.patch        |  59 --
 ...00-leds-add-reset-controller-based-driver.patch | 186 -----
 ...ore-the-abused-interrupt-map-on-pcie-node.patch |  33 -
 ...ort-skip-reset-control-for-syscon-devices.patch |  37 -
 .../patches-6.6/900-unaligned_access_hacks.patch   | 909 ---------------------
 .../ath79/patches-6.6/910-mikrotik-rb4xx.patch     | 121 ---
 .../ath79/patches-6.6/911-mikrotik-rb91x.patch     |  96 ---
 39 files changed, 4241 deletions(-)

diff --git a/target/linux/ath79/config-6.6 b/target/linux/ath79/config-6.6
deleted file mode 100644
index 3efe718368..0000000000
--- a/target/linux/ath79/config-6.6
+++ /dev/null
@@ -1,225 +0,0 @@
-# CONFIG_AG71XX is not set
-CONFIG_AG71XX_LEGACY=y
-# CONFIG_AG71XX_LEGACY_DEBUG is not set
-CONFIG_AG71XX_LEGACY_DEBUG_FS=y
-CONFIG_AR8216_PHY=y
-CONFIG_AR8216_PHY_LEDS=y
-CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
-CONFIG_ARCH_MMAP_RND_BITS_MAX=15
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_AT803X_PHY=y
-CONFIG_ATH79=y
-CONFIG_ATH79_WDT=y
-CONFIG_BLK_MQ_PCI=y
-CONFIG_CEVT_R4K=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
-CONFIG_CMDLINE_BOOL=y
-# CONFIG_CMDLINE_OVERRIDE is not set
-CONFIG_COMMON_CLK=y
-CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
-CONFIG_COMPAT_32BIT_TIME=y
-CONFIG_CPU_BIG_ENDIAN=y
-CONFIG_CPU_GENERIC_DUMP_TLB=y
-CONFIG_CPU_HAS_DIEI=y
-CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_CPU_HAS_RIXI=y
-CONFIG_CPU_HAS_SYNC=y
-CONFIG_CPU_MIPS32=y
-CONFIG_CPU_MIPS32_R2=y
-CONFIG_CPU_MIPSR2=y
-CONFIG_CPU_MITIGATIONS=y
-CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
-CONFIG_CPU_R4K_CACHE_TLB=y
-CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
-CONFIG_CPU_SUPPORTS_MSA=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_LIB_GF128MUL=y
-CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
-CONFIG_CRYPTO_LIB_SHA1=y
-CONFIG_CRYPTO_LIB_UTILS=y
-CONFIG_CSRC_R4K=y
-CONFIG_DEBUG_INFO=y
-CONFIG_DMA_NONCOHERENT=y
-CONFIG_DTC=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_ETHERNET_PACKET_MANGLE=y
-CONFIG_EXCLUSIVE_SYSTEM_RAM=y
-CONFIG_FIXED_PHY=y
-CONFIG_FORCE_NR_CPUS=y
-CONFIG_FS_IOMAP=y
-CONFIG_FUNCTION_ALIGNMENT=0
-CONFIG_FWNODE_MDIO=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_FW_LOADER_SYSFS=y
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_GETTIMEOFDAY=y
-CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_GENERIC_IRQ_CHIP=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_LIB_ASHLDI3=y
-CONFIG_GENERIC_LIB_ASHRDI3=y
-CONFIG_GENERIC_LIB_CMPDI2=y
-CONFIG_GENERIC_LIB_LSHRDI3=y
-CONFIG_GENERIC_LIB_UCMPDI2=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_PHY=y
-CONFIG_GENERIC_PINCONF=y
-CONFIG_GENERIC_PINCTRL_GROUPS=y
-CONFIG_GENERIC_PINMUX_FUNCTIONS=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GPIOLIB_IRQCHIP=y
-CONFIG_GPIO_74X164=y
-CONFIG_GPIO_ATH79=y
-CONFIG_GPIO_CDEV=y
-CONFIG_GPIO_GENERIC=y
-# CONFIG_GPIO_LATCH_MIKROTIK is not set
-# CONFIG_GPIO_RB91X_KEY is not set
-CONFIG_HARDWARE_WATCHPOINTS=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HZ_PERIODIC=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_MIPS_CPU=y
-CONFIG_IRQ_WORK=y
-CONFIG_LEDS_GPIO=y
-# CONFIG_LEDS_RESET is not set
-CONFIG_LIBFDT=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_MDIO_BITBANG=y
-CONFIG_MDIO_BUS=y
-CONFIG_MDIO_DEVICE=y
-CONFIG_MDIO_DEVRES=y
-CONFIG_MDIO_GPIO=y
-# CONFIG_MFD_RB4XX_CPLD is not set
-CONFIG_MFD_SYSCON=y
-CONFIG_MIGRATION=y
-CONFIG_MIPS=y
-CONFIG_MIPS_ASID_BITS=8
-CONFIG_MIPS_ASID_SHIFT=0
-CONFIG_MIPS_CLOCK_VSYSCALL=y
-# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
-# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
-CONFIG_MIPS_CMDLINE_FROM_DTB=y
-CONFIG_MIPS_L1_CACHE_SHIFT=5
-# CONFIG_MIPS_NO_APPENDED_DTB is not set
-CONFIG_MIPS_RAW_APPENDED_DTB=y
-CONFIG_MIPS_SPRAM=y
-CONFIG_MMU_LAZY_TLB_REFCOUNT=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_GEOMETRY=y
-# CONFIG_MTD_CFI_I2 is not set
-# CONFIG_MTD_CFI_INTELEXT is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-# CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_4 is not set
-CONFIG_MTD_PARSER_CYBERTAN=y
-# CONFIG_MTD_PARSER_TPLINK_SAFELOADER is not set
-CONFIG_MTD_PHYSMAP=y
-CONFIG_MTD_SPI_NOR=y
-CONFIG_MTD_SPLIT_ELF_FW=y
-CONFIG_MTD_SPLIT_LZMA_FW=y
-CONFIG_MTD_SPLIT_SEAMA_FW=y
-CONFIG_MTD_SPLIT_TPLINK_FW=y
-CONFIG_MTD_SPLIT_UIMAGE_FW=y
-CONFIG_MTD_SPLIT_WRGG_FW=y
-CONFIG_MTD_VIRT_CONCAT=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NET_EGRESS=y
-CONFIG_NET_INGRESS=y
-CONFIG_NET_SELFTESTS=y
-CONFIG_NET_XGRESS=y
-CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
-CONFIG_NVMEM=y
-CONFIG_NVMEM_LAYOUTS=y
-CONFIG_NVMEM_LAYOUT_U_BOOT_ENV=y
-CONFIG_NVMEM_SYSFS=y
-CONFIG_NVMEM_U_BOOT_ENV=y
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_OF_MDIO=y
-CONFIG_PAGE_POOL=y
-CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
-CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
-CONFIG_PCI=y
-CONFIG_PCI_AR71XX=y
-CONFIG_PCI_AR724X=y
-CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_DRIVERS_LEGACY=y
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PGTABLE_LEVELS=2
-CONFIG_PHYLIB=y
-CONFIG_PHYLIB_LEDS=y
-# CONFIG_PHY_AR7100_USB is not set
-# CONFIG_PHY_AR7200_USB is not set
-# CONFIG_PHY_ATH79_USB is not set
-CONFIG_PINCTRL=y
-CONFIG_PREEMPT_NONE_BUILD=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_QCOM_NET_PHYLIB=y
-CONFIG_RANDSTRUCT_NONE=y
-CONFIG_RATIONAL=y
-CONFIG_REGMAP=y
-CONFIG_REGMAP_MMIO=y
-CONFIG_REGULATOR=y
-CONFIG_RESET_ATH79=y
-CONFIG_RESET_CONTROLLER=y
-CONFIG_SERIAL_8250_NR_UARTS=1
-CONFIG_SERIAL_8250_RUNTIME_UARTS=1
-CONFIG_SERIAL_AR933X=y
-CONFIG_SERIAL_AR933X_CONSOLE=y
-CONFIG_SERIAL_AR933X_NR_UARTS=2
-CONFIG_SERIAL_MCTRL_GPIO=y
-CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SPI=y
-CONFIG_SPI_AR934X=y
-CONFIG_SPI_ATH79=y
-CONFIG_SPI_BITBANG=y
-CONFIG_SPI_GPIO=y
-CONFIG_SPI_MASTER=y
-CONFIG_SPI_MEM=y
-# CONFIG_SPI_RB4XX is not set
-# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
-CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
-CONFIG_SQUASHFS_DECOMP_SINGLE=y
-CONFIG_SWCONFIG=y
-CONFIG_SWCONFIG_LEDS=y
-CONFIG_SWPHY=y
-CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYS_HAS_CPU_MIPS32_R2=y
-CONFIG_SYS_HAS_EARLY_PRINTK=y
-CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
-CONFIG_SYS_SUPPORTS_MIPS16=y
-CONFIG_SYS_SUPPORTS_ZBOOT=y
-CONFIG_SYS_SUPPORTS_ZBOOT_UART_PROM=y
-CONFIG_TARGET_ISA_REV=2
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TINY_SRCU=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USE_OF=y
-CONFIG_ZBOOT_LOAD_ADDRESS=0x0
diff --git a/target/linux/ath79/patches-6.6/001-v6.11-gpio-ath79-convert-to-dynamic-GPIO-base-allocation.patch b/target/linux/ath79/patches-6.6/001-v6.11-gpio-ath79-convert-to-dynamic-GPIO-base-allocation.patch
deleted file mode 100644
index 4222639d4d..0000000000
--- a/target/linux/ath79/patches-6.6/001-v6.11-gpio-ath79-convert-to-dynamic-GPIO-base-allocation.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 9a473c2a093e0d1c466bf86073230e2c8b658977 Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Wed, 26 Jun 2024 08:33:18 +0800
-Subject: gpio: ath79: convert to dynamic GPIO base allocation
-
-ath79 target has already been converted to device tree based platform.
-Use dynamic GPIO numberspace base to suppress the warning:
-
-gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
-
-Tested on Atheros AR7241 and AR9344.
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
-Suggested-by: Jonas Gorski <jonas.gorski at gmail.com>
-Link: https://lore.kernel.org/r/TYCP286MB089598EA71E964BD8AB9EFD3BCD62 at TYCP286MB0895.JPNP286.PROD.OUTLOOK.COM
-[Bartosz: tweaked the commit message]
-Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski at linaro.org>
----
- drivers/gpio/gpio-ath79.c | 2 --
- 1 file changed, 2 deletions(-)
-
---- a/drivers/gpio/gpio-ath79.c
-+++ b/drivers/gpio/gpio-ath79.c
-@@ -273,8 +273,6 @@ static int ath79_gpio_probe(struct platf
- 		dev_err(dev, "bgpio_init failed\n");
- 		return err;
- 	}
--	/* Use base 0 to stay compatible with legacy platforms */
--	ctrl->gc.base = 0;
- 
- 	/* Optional interrupt setup */
- 	if (!np || of_property_read_bool(np, "interrupt-controller")) {
diff --git a/target/linux/ath79/patches-6.6/100-reset-ath79-read-back-reset-register.patch b/target/linux/ath79/patches-6.6/100-reset-ath79-read-back-reset-register.patch
deleted file mode 100644
index 7aa501514d..0000000000
--- a/target/linux/ath79/patches-6.6/100-reset-ath79-read-back-reset-register.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 661edfc3dab943a67c8821353b63cc23057f7ce9 Mon Sep 17 00:00:00 2001
-From: David Bauer <mail at david-bauer.net>
-Date: Tue, 9 Jan 2024 20:48:46 +0100
-Subject: [PATCH] reset: ath79: read back reset register
-
-Read back the reset register in order to flush the cache. This fixes
-spurious reboot hangs on TP-Link TL-WDR3600 and TL-WDR4300 with Zentel
-DRAM chips.
-
-This issue was fixed in the past, but switching to the reset-driver
-specific implementation removed the old fix.
-
-Link: https://github.com/freifunk-gluon/gluon/issues/2904
-Link: https://github.com/openwrt/openwrt/issues/13043
-Link: https://dev.archive.openwrt.org/ticket/17839
-Link: f8a7bfe1cb2c ("MIPS: ath79: fix system restart")
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
----
- drivers/reset/reset-ath79.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/drivers/reset/reset-ath79.c
-+++ b/drivers/reset/reset-ath79.c
-@@ -37,6 +37,8 @@ static int ath79_reset_update(struct res
- 	else
- 		val &= ~BIT(id);
- 	writel(val, ath79_reset->base);
-+	/* Flush cache */
-+	readl(ath79_reset->base);
- 	spin_unlock_irqrestore(&ath79_reset->lock, flags);
- 
- 	return 0;
diff --git a/target/linux/ath79/patches-6.6/101-reset-ath79-reset-ETH-switch-for-AR9344.patch b/target/linux/ath79/patches-6.6/101-reset-ath79-reset-ETH-switch-for-AR9344.patch
deleted file mode 100644
index 5d9daf1c1c..0000000000
--- a/target/linux/ath79/patches-6.6/101-reset-ath79-reset-ETH-switch-for-AR9344.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From: David Bauer <mail at david-bauer.net>
-Date: Tue, 2 Jan 2025 19:22:40 +0100
-Subject: [PATCH] reset: ath79: reset ETH switch for AR9344
-
-According to datasheet, on AR9344 the switch and switch analog need to
-be reset first before initiating a full reset.
-
-Resetting these systems fixes spurious reset hangs on Atheros AR9344
-SoCs.
-
-Link: https://github.com/freifunk-gluon/gluon/issues/2904
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
-
---- a/drivers/reset/reset-ath79.c
-+++ b/drivers/reset/reset-ath79.c
-@@ -12,8 +12,11 @@
- #include <linux/platform_device.h>
- #include <linux/reset-controller.h>
- #include <linux/reboot.h>
-+#include <linux/delay.h>
-+#include <linux/of.h>
- 
- struct ath79_reset {
-+	struct platform_device *pdev;
- 	struct reset_controller_dev rcdev;
- 	struct notifier_block restart_nb;
- 	void __iomem *base;
-@@ -21,16 +24,13 @@ struct ath79_reset {
- };
- 
- #define FULL_CHIP_RESET 24
-+#define ETH_SWITCH_RESET 8
-+#define ETH_SWITCH_ARESET 12
- 
--static int ath79_reset_update(struct reset_controller_dev *rcdev,
-+static void __ath79_reset_update_unlocked(struct ath79_reset *ath79_reset,
- 			unsigned long id, bool assert)
- {
--	struct ath79_reset *ath79_reset =
--		container_of(rcdev, struct ath79_reset, rcdev);
--	unsigned long flags;
- 	u32 val;
--
--	spin_lock_irqsave(&ath79_reset->lock, flags);
- 	val = readl(ath79_reset->base);
- 	if (assert)
- 		val |= BIT(id);
-@@ -39,6 +39,17 @@ static int ath79_reset_update(struct res
- 	writel(val, ath79_reset->base);
- 	/* Flush cache */
- 	readl(ath79_reset->base);
-+}
-+
-+static int ath79_reset_update(struct reset_controller_dev *rcdev,
-+			unsigned long id, bool assert)
-+{
-+	struct ath79_reset *ath79_reset =
-+		container_of(rcdev, struct ath79_reset, rcdev);
-+	unsigned long flags;
-+
-+	spin_lock_irqsave(&ath79_reset->lock, flags);
-+	__ath79_reset_update_unlocked(ath79_reset, id, assert);
- 	spin_unlock_irqrestore(&ath79_reset->lock, flags);
- 
- 	return 0;
-@@ -79,8 +90,28 @@ static int ath79_reset_restart_handler(s
- {
- 	struct ath79_reset *ath79_reset =
- 		container_of(nb, struct ath79_reset, restart_nb);
-+	unsigned long flags;
- 
--	ath79_reset_assert(&ath79_reset->rcdev, FULL_CHIP_RESET);
-+	spin_lock_irqsave(&ath79_reset->lock, flags);
-+
-+	if (of_device_is_compatible(ath79_reset->pdev->dev.of_node, "qca,ar9340-reset")) {
-+		/**
-+		 * AR9344 has been observed to hang on reboot in rare cases.
-+		 *
-+		 * Datasheet states to reset the ETH switch systems before asserting
-+		 * full chip reset. See page 111 of the AR9344 datasheet.
-+		 */
-+		__ath79_reset_update_unlocked(ath79_reset, ETH_SWITCH_RESET, true);
-+		mdelay(1);
-+		__ath79_reset_update_unlocked(ath79_reset, ETH_SWITCH_ARESET, true);
-+		mdelay(1);
-+		__ath79_reset_update_unlocked(ath79_reset, FULL_CHIP_RESET, true);
-+		mdelay(10);
-+	} else {
-+		__ath79_reset_update_unlocked(ath79_reset, FULL_CHIP_RESET, true);
-+	}
-+
-+	spin_unlock_irqrestore(&ath79_reset->lock, flags);
- 
- 	return NOTIFY_DONE;
- }
-@@ -95,6 +126,8 @@ static int ath79_reset_probe(struct plat
- 	if (!ath79_reset)
- 		return -ENOMEM;
- 
-+	ath79_reset->pdev = pdev;
-+
- 	ath79_reset->base = devm_platform_ioremap_resource(pdev, 0);
- 	if (IS_ERR(ath79_reset->base))
- 		return PTR_ERR(ath79_reset->base);
diff --git a/target/linux/ath79/patches-6.6/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch b/target/linux/ath79/patches-6.6/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch
deleted file mode 100644
index ceda511c21..0000000000
--- a/target/linux/ath79/patches-6.6/300-irqchip-irq-ath79-intc-add-irq-cascade-driver-for-QC.patch
+++ /dev/null
@@ -1,168 +0,0 @@
-From f3eacff2310a60348a755c50a8da6fc251fc8587 Mon Sep 17 00:00:00 2001
-From: John Crispin <john at phrozen.org>
-Date: Tue, 6 Mar 2018 09:55:13 +0100
-Subject: [PATCH 07/33] irqchip/irq-ath79-intc: add irq cascade driver for
- QCA9556 SoCs
-
-Signed-off-by: John Crispin <john at phrozen.org>
----
- drivers/irqchip/Makefile         |   1 +
- drivers/irqchip/irq-ath79-intc.c | 142 +++++++++++++++++++++++++++++++++++++++
- 2 files changed, 143 insertions(+)
- create mode 100644 drivers/irqchip/irq-ath79-intc.c
-
---- a/drivers/irqchip/Makefile
-+++ b/drivers/irqchip/Makefile
-@@ -4,6 +4,7 @@ obj-$(CONFIG_IRQCHIP)			+= irqchip.o
- obj-$(CONFIG_AL_FIC)			+= irq-al-fic.o
- obj-$(CONFIG_ALPINE_MSI)		+= irq-alpine-msi.o
- obj-$(CONFIG_ATH79)			+= irq-ath79-cpu.o
-+obj-$(CONFIG_ATH79)			+= irq-ath79-intc.o
- obj-$(CONFIG_ATH79)			+= irq-ath79-misc.o
- obj-$(CONFIG_ARCH_BCM2835)		+= irq-bcm2835.o
- obj-$(CONFIG_ARCH_BCM2835)		+= irq-bcm2836.o
---- /dev/null
-+++ b/drivers/irqchip/irq-ath79-intc.c
-@@ -0,0 +1,142 @@
-+/*
-+ *  Atheros AR71xx/AR724x/AR913x specific interrupt handling
-+ *
-+ *  Copyright (C) 2018 John Crispin <john at phrozen.org>
-+ *
-+ *  This program is free software; you can redistribute it and/or modify it
-+ *  under the terms of the GNU General Public License version 2 as published
-+ *  by the Free Software Foundation.
-+ */
-+
-+#include <linux/interrupt.h>
-+#include <linux/irqchip.h>
-+#include <linux/of.h>
-+#include <linux/of_irq.h>
-+#include <linux/irqdomain.h>
-+
-+#include <asm/irq_cpu.h>
-+#include <asm/mach-ath79/ath79.h>
-+#include <asm/mach-ath79/ar71xx_regs.h>
-+
-+#define ATH79_MAX_INTC_CASCADE	3
-+
-+struct ath79_intc {
-+	struct irq_chip chip;
-+	u32 irq;
-+	u32 pending_mask;
-+	u32 int_status;
-+	u32 irq_mask[ATH79_MAX_INTC_CASCADE];
-+	u32 irq_wb_chan[ATH79_MAX_INTC_CASCADE];
-+};
-+
-+static void ath79_intc_irq_handler(struct irq_desc *desc)
-+{
-+	struct irq_domain *domain = irq_desc_get_handler_data(desc);
-+	struct ath79_intc *intc = domain->host_data;
-+	u32 pending;
-+
-+	pending = ath79_reset_rr(intc->int_status);
-+	pending &= intc->pending_mask;
-+
-+	if (pending) {
-+		int i;
-+
-+		for (i = 0; i < domain->hwirq_max; i++)
-+			if (pending & intc->irq_mask[i]) {
-+				if (intc->irq_wb_chan[i] != 0xffffffff)
-+					ath79_ddr_wb_flush(intc->irq_wb_chan[i]);
-+				generic_handle_irq(irq_find_mapping(domain, i));
-+			}
-+	} else {
-+		spurious_interrupt();
-+	}
-+}
-+
-+static void ath79_intc_irq_enable(struct irq_data *d)
-+{
-+	struct ath79_intc *intc = d->domain->host_data;
-+	enable_irq(intc->irq);
-+}
-+
-+static void ath79_intc_irq_disable(struct irq_data *d)
-+{
-+	struct ath79_intc *intc = d->domain->host_data;
-+	disable_irq(intc->irq);
-+}
-+
-+static int ath79_intc_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw)
-+{
-+	struct ath79_intc *intc = d->host_data;
-+
-+	irq_set_chip_and_handler(irq, &intc->chip, handle_level_irq);
-+
-+	return 0;
-+}
-+
-+static const struct irq_domain_ops ath79_irq_domain_ops = {
-+	.xlate = irq_domain_xlate_onecell,
-+	.map = ath79_intc_map,
-+};
-+
-+static int __init ath79_intc_of_init(
-+	struct device_node *node, struct device_node *parent)
-+{
-+	struct irq_domain *domain;
-+	struct ath79_intc *intc;
-+	int cnt, cntwb, i, err;
-+
-+	cnt = of_property_count_u32_elems(node, "qca,pending-bits");
-+	if (cnt > ATH79_MAX_INTC_CASCADE)
-+		panic("Too many INTC pending bits\n");
-+
-+	intc = kzalloc(sizeof(*intc), GFP_KERNEL);
-+	if (!intc)
-+		panic("Failed to allocate INTC memory\n");
-+	intc->chip = dummy_irq_chip;
-+	intc->chip.name = "INTC";
-+	intc->chip.irq_disable = ath79_intc_irq_disable;
-+	intc->chip.irq_enable = ath79_intc_irq_enable;
-+
-+	if (of_property_read_u32(node, "qca,int-status-addr", &intc->int_status) < 0) {
-+		panic("Missing address of interrupt status register\n");
-+	}
-+
-+	of_property_read_u32_array(node, "qca,pending-bits", intc->irq_mask, cnt);
-+	for (i = 0; i < cnt; i++) {
-+		intc->pending_mask |= intc->irq_mask[i];
-+		intc->irq_wb_chan[i] = 0xffffffff;
-+	}
-+
-+	cntwb = of_count_phandle_with_args(
-+		node, "qca,ddr-wb-channels", "#qca,ddr-wb-channel-cells");
-+
-+	for (i = 0; i < cntwb; i++) {
-+		struct of_phandle_args args;
-+		u32 irq = i;
-+
-+		of_property_read_u32_index(
-+			node, "qca,ddr-wb-channel-interrupts", i, &irq);
-+		if (irq >= ATH79_MAX_INTC_CASCADE)
-+			continue;
-+
-+		err = of_parse_phandle_with_args(
-+			node, "qca,ddr-wb-channels",
-+			"#qca,ddr-wb-channel-cells",
-+			i, &args);
-+		if (err)
-+			return err;
-+
-+		intc->irq_wb_chan[irq] = args.args[0];
-+	}
-+
-+	intc->irq = irq_of_parse_and_map(node, 0);
-+	if (!intc->irq)
-+		panic("Failed to get INTC IRQ");
-+
-+	domain = irq_domain_add_linear(node, cnt, &ath79_irq_domain_ops, intc);
-+	irq_set_chained_handler_and_data(intc->irq, ath79_intc_irq_handler, domain);
-+
-+	return 0;
-+}
-+IRQCHIP_DECLARE(ath79_intc, "qca,ar9340-intc",
-+		ath79_intc_of_init);
diff --git a/target/linux/ath79/patches-6.6/301-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch b/target/linux/ath79/patches-6.6/301-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch
deleted file mode 100644
index 13117d9a8e..0000000000
--- a/target/linux/ath79/patches-6.6/301-irqchip-irq-ath79-cpu-drop-OF-init-helper.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From e029f998594f151008ecbfa024e2957edd2a5189 Mon Sep 17 00:00:00 2001
-From: John Crispin <john at phrozen.org>
-Date: Tue, 6 Mar 2018 09:58:19 +0100
-Subject: [PATCH 08/33] irqchip/irq-ath79-cpu: drop !OF init helper
-
-Signed-off-by: John Crispin <john at phrozen.org>
----
- drivers/irqchip/irq-ath79-cpu.c | 7 -------
- 1 file changed, 7 deletions(-)
-
---- a/drivers/irqchip/irq-ath79-cpu.c
-+++ b/drivers/irqchip/irq-ath79-cpu.c
-@@ -85,10 +85,3 @@ static int __init ar79_cpu_intc_of_init(
- }
- IRQCHIP_DECLARE(ar79_cpu_intc, "qca,ar7100-cpu-intc",
- 		ar79_cpu_intc_of_init);
--
--void __init ath79_cpu_irq_init(unsigned irq_wb_chan2, unsigned irq_wb_chan3)
--{
--	irq_wb_chan[2] = irq_wb_chan2;
--	irq_wb_chan[3] = irq_wb_chan3;
--	mips_cpu_irq_init();
--}
diff --git a/target/linux/ath79/patches-6.6/310-dt-bindings-PCI-qcom-ar7100-adds-binding-doc.patch b/target/linux/ath79/patches-6.6/310-dt-bindings-PCI-qcom-ar7100-adds-binding-doc.patch
deleted file mode 100644
index cf0a75c791..0000000000
--- a/target/linux/ath79/patches-6.6/310-dt-bindings-PCI-qcom-ar7100-adds-binding-doc.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 4a4f869ec58ed8910b9b2e68d0eee50957e9bb20 Mon Sep 17 00:00:00 2001
-From: John Crispin <john at phrozen.org>
-Date: Mon, 25 Jun 2018 15:52:10 +0200
-Subject: [PATCH 17/33] dt-bindings: PCI: qcom,ar7100: adds binding doc
-
-With the driver being converted from platform_data to pure OF, we need to
-also add some docs.
-
-Cc: Rob Herring <robh+dt at kernel.org>
-Cc: devicetree at vger.kernel.org
-Signed-off-by: John Crispin <john at phrozen.org>
----
- .../devicetree/bindings/pci/qcom,ar7100-pci.txt    | 38 ++++++++++++++++++++++
- 1 file changed, 38 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/pci/qcom,ar7100-pci.txt
-
---- /dev/null
-+++ b/Documentation/devicetree/bindings/pci/qcom,ar7100-pci.txt
-@@ -0,0 +1,38 @@
-+* Qualcomm Atheros AR7100 PCI express root complex
-+
-+Required properties:
-+- compatible: should contain "qcom,ar7100-pci" to identify the core.
-+- reg: Should contain the register ranges as listed in the reg-names property.
-+- reg-names: Definition: Must include the following entries
-+	- "cfg_base"	IO Memory
-+- #address-cells: set to <3>
-+- #size-cells: set to <2>
-+- ranges: ranges for the PCI memory and I/O regions
-+- interrupt-map-mask and interrupt-map: standard PCI
-+	properties to define the mapping of the PCIe interface to interrupt
-+	numbers.
-+- #interrupt-cells: set to <1>
-+- interrupt-controller: define to enable the builtin IRQ cascade.
-+
-+Optional properties:
-+- interrupt-parent: phandle to the MIPS IRQ controller
-+
-+* Example for ar7100
-+	pcie at 180c0000 {
-+		compatible = "qca,ar7100-pci";
-+		#address-cells = <3>;
-+		#size-cells = <2>;
-+		bus-range = <0x0 0x0>;
-+		reg = <0x17010000 0x100>;
-+		reg-names = "cfg_base";
-+		ranges = <0x2000000 0 0x10000000 0x10000000 0 0x07000000
-+			  0x1000000 0 0x00000000 0x00000000 0 0x00000001>;
-+		interrupt-parent = <&cpuintc>;
-+		interrupts = <2>;
-+
-+		interrupt-controller;
-+		#interrupt-cells = <1>;
-+
-+		interrupt-map-mask = <0 0 0 1>;
-+		interrupt-map = <0 0 0 0 &pcie0 0>;
-+	};
diff --git a/target/linux/ath79/patches-6.6/311-MIPS-pci-ar71xx-convert-to-OF.patch b/target/linux/ath79/patches-6.6/311-MIPS-pci-ar71xx-convert-to-OF.patch
deleted file mode 100644
index 8842f16511..0000000000
--- a/target/linux/ath79/patches-6.6/311-MIPS-pci-ar71xx-convert-to-OF.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-From 1855ab6b1d27f5b38a648baf57ff6a534afec26d Mon Sep 17 00:00:00 2001
-From: John Crispin <john at phrozen.org>
-Date: Sat, 23 Jun 2018 15:07:23 +0200
-Subject: [PATCH 18/33] MIPS: pci-ar71xx: convert to OF
-
-With the ath79 target getting converted to pure OF, we can drop all the
-platform data code and add the missing OF bits to the driver. We also add
-a irq domain for the PCI/e controllers cascade, thus making it usable from
-dts files.
-
-Signed-off-by: John Crispin <john at phrozen.org>
----
- arch/mips/pci/pci-ar71xx.c | 82 +++++++++++++++++++++++-----------------------
- 1 file changed, 41 insertions(+), 41 deletions(-)
-
---- a/arch/mips/pci/pci-ar71xx.c
-+++ b/arch/mips/pci/pci-ar71xx.c
-@@ -15,8 +15,11 @@
- #include <linux/pci.h>
- #include <linux/pci_regs.h>
- #include <linux/interrupt.h>
-+#include <linux/irqchip/chained_irq.h>
- #include <linux/init.h>
- #include <linux/platform_device.h>
-+#include <linux/of_irq.h>
-+#include <linux/of_pci.h>
- 
- #include <asm/mach-ath79/ar71xx_regs.h>
- #include <asm/mach-ath79/ath79.h>
-@@ -46,12 +49,13 @@
- #define AR71XX_PCI_IRQ_COUNT		5
- 
- struct ar71xx_pci_controller {
-+	struct device_node *np;
- 	void __iomem *cfg_base;
- 	int irq;
--	int irq_base;
- 	struct pci_controller pci_ctrl;
- 	struct resource io_res;
- 	struct resource mem_res;
-+	struct irq_domain *domain;
- };
- 
- /* Byte lane enable bits */
-@@ -225,29 +229,30 @@ static struct pci_ops ar71xx_pci_ops = {
- 
- static void ar71xx_pci_irq_handler(struct irq_desc *desc)
- {
--	struct ar71xx_pci_controller *apc;
- 	void __iomem *base = ath79_reset_base;
-+	struct irq_chip *chip = irq_desc_get_chip(desc);
-+	struct ar71xx_pci_controller *apc = irq_desc_get_handler_data(desc);
- 	u32 pending;
- 
--	apc = irq_desc_get_handler_data(desc);
--
-+	chained_irq_enter(chip, desc);
- 	pending = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_STATUS) &
- 		  __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
- 
- 	if (pending & AR71XX_PCI_INT_DEV0)
--		generic_handle_irq(apc->irq_base + 0);
-+		generic_handle_irq(irq_linear_revmap(apc->domain, 1));
- 
- 	else if (pending & AR71XX_PCI_INT_DEV1)
--		generic_handle_irq(apc->irq_base + 1);
-+		generic_handle_irq(irq_linear_revmap(apc->domain, 2));
- 
- 	else if (pending & AR71XX_PCI_INT_DEV2)
--		generic_handle_irq(apc->irq_base + 2);
-+		generic_handle_irq(irq_linear_revmap(apc->domain, 3));
- 
- 	else if (pending & AR71XX_PCI_INT_CORE)
--		generic_handle_irq(apc->irq_base + 4);
-+		generic_handle_irq(irq_linear_revmap(apc->domain, 4));
- 
- 	else
- 		spurious_interrupt();
-+	chained_irq_exit(chip, desc);
- }
- 
- static void ar71xx_pci_irq_unmask(struct irq_data *d)
-@@ -258,7 +263,7 @@ static void ar71xx_pci_irq_unmask(struct
- 	u32 t;
- 
- 	apc = irq_data_get_irq_chip_data(d);
--	irq = d->irq - apc->irq_base;
-+	irq = irq_linear_revmap(apc->domain, d->irq);
- 
- 	t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
- 	__raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
-@@ -275,7 +280,7 @@ static void ar71xx_pci_irq_mask(struct i
- 	u32 t;
- 
- 	apc = irq_data_get_irq_chip_data(d);
--	irq = d->irq - apc->irq_base;
-+	irq = irq_linear_revmap(apc->domain, d->irq);
- 
- 	t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
- 	__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
-@@ -291,24 +296,31 @@ static struct irq_chip ar71xx_pci_irq_ch
- 	.irq_mask_ack	= ar71xx_pci_irq_mask,
- };
- 
-+static int ar71xx_pci_irq_map(struct irq_domain *d,
-+			      unsigned int irq, irq_hw_number_t hw)
-+{
-+	struct ar71xx_pci_controller *apc = d->host_data;
-+
-+	irq_set_chip_and_handler(irq, &ar71xx_pci_irq_chip, handle_level_irq);
-+	irq_set_chip_data(irq, apc);
-+
-+	return 0;
-+}
-+
-+static const struct irq_domain_ops ar71xx_pci_domain_ops = {
-+	.xlate = irq_domain_xlate_onecell,
-+	.map = ar71xx_pci_irq_map,
-+};
-+
- static void ar71xx_pci_irq_init(struct ar71xx_pci_controller *apc)
- {
- 	void __iomem *base = ath79_reset_base;
--	int i;
- 
- 	__raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_ENABLE);
- 	__raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_STATUS);
- 
--	BUILD_BUG_ON(ATH79_PCI_IRQ_COUNT < AR71XX_PCI_IRQ_COUNT);
--
--	apc->irq_base = ATH79_PCI_IRQ_BASE;
--	for (i = apc->irq_base;
--	     i < apc->irq_base + AR71XX_PCI_IRQ_COUNT; i++) {
--		irq_set_chip_and_handler(i, &ar71xx_pci_irq_chip,
--					 handle_level_irq);
--		irq_set_chip_data(i, apc);
--	}
--
-+	apc->domain = irq_domain_add_linear(apc->np, AR71XX_PCI_IRQ_COUNT,
-+					    &ar71xx_pci_domain_ops, apc);
- 	irq_set_chained_handler_and_data(apc->irq, ar71xx_pci_irq_handler,
- 					 apc);
- }
-@@ -325,10 +337,14 @@ static void ar71xx_pci_reset(void)
- 	mdelay(100);
- }
- 
-+static const struct of_device_id ar71xx_pci_ids[] = {
-+	{ .compatible = "qca,ar7100-pci" },
-+	{},
-+};
-+
- static int ar71xx_pci_probe(struct platform_device *pdev)
- {
- 	struct ar71xx_pci_controller *apc;
--	struct resource *res;
- 	u32 t;
- 
- 	apc = devm_kzalloc(&pdev->dev, sizeof(struct ar71xx_pci_controller),
-@@ -345,26 +361,6 @@ static int ar71xx_pci_probe(struct platf
- 	if (apc->irq < 0)
- 		return -EINVAL;
- 
--	res = platform_get_resource_byname(pdev, IORESOURCE_IO, "io_base");
--	if (!res)
--		return -EINVAL;
--
--	apc->io_res.parent = res;
--	apc->io_res.name = "PCI IO space";
--	apc->io_res.start = res->start;
--	apc->io_res.end = res->end;
--	apc->io_res.flags = IORESOURCE_IO;
--
--	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mem_base");
--	if (!res)
--		return -EINVAL;
--
--	apc->mem_res.parent = res;
--	apc->mem_res.name = "PCI memory space";
--	apc->mem_res.start = res->start;
--	apc->mem_res.end = res->end;
--	apc->mem_res.flags = IORESOURCE_MEM;
--
- 	ar71xx_pci_reset();
- 
- 	/* setup COMMAND register */
-@@ -377,9 +373,11 @@ static int ar71xx_pci_probe(struct platf
- 
- 	ar71xx_pci_irq_init(apc);
- 
-+	apc->np = pdev->dev.of_node;
- 	apc->pci_ctrl.pci_ops = &ar71xx_pci_ops;
- 	apc->pci_ctrl.mem_resource = &apc->mem_res;
- 	apc->pci_ctrl.io_resource = &apc->io_res;
-+	pci_load_of_ranges(&apc->pci_ctrl, pdev->dev.of_node);
- 
- 	register_pci_controller(&apc->pci_ctrl);
- 
-@@ -390,6 +388,7 @@ static struct platform_driver ar71xx_pci
- 	.probe = ar71xx_pci_probe,
- 	.driver = {
- 		.name = "ar71xx-pci",
-+		.of_match_table = ar71xx_pci_ids,
- 	},
- };
- 
diff --git a/target/linux/ath79/patches-6.6/312-dt-bindings-PCI-qcom-ar7240-adds-binding-doc.patch b/target/linux/ath79/patches-6.6/312-dt-bindings-PCI-qcom-ar7240-adds-binding-doc.patch
deleted file mode 100644
index a32c9bdcde..0000000000
--- a/target/linux/ath79/patches-6.6/312-dt-bindings-PCI-qcom-ar7240-adds-binding-doc.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From ea27764bc3ef2a05decf3ae05edffc289cd0d93c Mon Sep 17 00:00:00 2001
-From: John Crispin <john at phrozen.org>
-Date: Mon, 25 Jun 2018 15:52:02 +0200
-Subject: [PATCH 19/33] dt-bindings: PCI: qcom,ar7240: adds binding doc
-
-With the driver being converted from platform_data to pure OF, we need to
-also add some docs.
-
-Cc: Rob Herring <robh+dt at kernel.org>
-Cc: devicetree at vger.kernel.org
-Signed-off-by: John Crispin <john at phrozen.org>
----
- .../devicetree/bindings/pci/qcom,ar7240-pci.txt    | 42 ++++++++++++++++++++++
- 1 file changed, 42 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/pci/qcom,ar7240-pci.txt
-
---- /dev/null
-+++ b/Documentation/devicetree/bindings/pci/qcom,ar7240-pci.txt
-@@ -0,0 +1,42 @@
-+* Qualcomm Atheros AR724X PCI express root complex
-+
-+Required properties:
-+- compatible: should contain "qcom,ar7240-pci" to identify the core.
-+- reg: Should contain the register ranges as listed in the reg-names property.
-+- reg-names: Definition: Must include the following entries
-+	- "crp_base"	Configuration registers
-+	- "ctrl_base"	Control registers
-+	- "cfg_base"	IO Memory
-+- #address-cells: set to <3>
-+- #size-cells: set to <2>
-+- ranges: ranges for the PCI memory and I/O regions
-+- interrupt-map-mask and interrupt-map: standard PCI
-+	properties to define the mapping of the PCIe interface to interrupt
-+	numbers.
-+- #interrupt-cells: set to <1>
-+- interrupt-parent: phandle to the MIPS IRQ controller
-+
-+Optional properties:
-+- interrupt-controller: define to enable the builtin IRQ cascade.
-+
-+* Example for qca9557
-+	pcie at 180c0000 {
-+		compatible = "qcom,ar7240-pci";
-+		#address-cells = <3>;
-+		#size-cells = <2>;
-+		bus-range = <0x0 0x0>;
-+		reg = <0x180c0000 0x1000>,
-+		      <0x180f0000 0x100>,
-+		      <0x14000000 0x1000>;
-+		reg-names = "crp_base", "ctrl_base", "cfg_base";
-+		ranges = <0x2000000 0 0x10000000 0x10000000 0 0x04000000
-+			  0x1000000 0 0x00000000 0x00000000 0 0x00000001>;
-+		interrupt-parent = <&intc2>;
-+		interrupts = <1>;
-+
-+		interrupt-controller;
-+		#interrupt-cells = <1>;
-+
-+		interrupt-map-mask = <0 0 0 1>;
-+		interrupt-map = <0 0 0 0 &pcie0 0>;
-+	};
diff --git a/target/linux/ath79/patches-6.6/313-MIPS-pci-ar724x-convert-to-OF.patch b/target/linux/ath79/patches-6.6/313-MIPS-pci-ar724x-convert-to-OF.patch
deleted file mode 100644
index b8c106d6ab..0000000000
--- a/target/linux/ath79/patches-6.6/313-MIPS-pci-ar724x-convert-to-OF.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From a522ee0199d5d3ea114ca2e211f6ac398d3e8e0b Mon Sep 17 00:00:00 2001
-From: John Crispin <john at phrozen.org>
-Date: Sat, 23 Jun 2018 15:07:37 +0200
-Subject: [PATCH 20/33] MIPS: pci-ar724x: convert to OF
-
-With the ath79 target getting converted to pure OF, we can drop all the
-platform data code and add the missing OF bits to the driver. We also add
-a irq domain for the PCI/e controllers cascade, thus making it usable from
-dts files.
-
-Signed-off-by: John Crispin <john at phrozen.org>
----
- arch/mips/pci/pci-ar724x.c | 88 ++++++++++++++++++++++------------------------
- 1 file changed, 42 insertions(+), 46 deletions(-)
-
---- a/arch/mips/pci/pci-ar724x.c
-+++ b/arch/mips/pci/pci-ar724x.c
-@@ -11,8 +11,11 @@
- #include <linux/init.h>
- #include <linux/delay.h>
- #include <linux/platform_device.h>
-+#include <linux/irqchip/chained_irq.h>
- #include <asm/mach-ath79/ath79.h>
- #include <asm/mach-ath79/ar71xx_regs.h>
-+#include <linux/of_irq.h>
-+#include <linux/of_pci.h>
- 
- #define AR724X_PCI_REG_APP		0x00
- #define AR724X_PCI_REG_RESET		0x18
-@@ -42,17 +45,20 @@ struct ar724x_pci_controller {
- 	void __iomem *crp_base;
- 
- 	int irq;
--	int irq_base;
- 
- 	bool link_up;
- 	bool bar0_is_cached;
- 	u32  bar0_value;
- 
-+	struct device_node *np;
- 	struct pci_controller pci_controller;
-+	struct irq_domain *domain;
- 	struct resource io_res;
- 	struct resource mem_res;
- };
- 
-+static struct irq_chip ar724x_pci_irq_chip;
-+
- static inline bool ar724x_pci_check_link(struct ar724x_pci_controller *apc)
- {
- 	u32 reset;
-@@ -228,35 +234,31 @@ static struct pci_ops ar724x_pci_ops = {
- 
- static void ar724x_pci_irq_handler(struct irq_desc *desc)
- {
--	struct ar724x_pci_controller *apc;
--	void __iomem *base;
-+	struct irq_chip *chip = irq_desc_get_chip(desc);
-+	struct ar724x_pci_controller *apc = irq_desc_get_handler_data(desc);
- 	u32 pending;
- 
--	apc = irq_desc_get_handler_data(desc);
--	base = apc->ctrl_base;
--
--	pending = __raw_readl(base + AR724X_PCI_REG_INT_STATUS) &
--		  __raw_readl(base + AR724X_PCI_REG_INT_MASK);
-+	chained_irq_enter(chip, desc);
-+	pending = __raw_readl(apc->ctrl_base + AR724X_PCI_REG_INT_STATUS) &
-+		  __raw_readl(apc->ctrl_base + AR724X_PCI_REG_INT_MASK);
- 
- 	if (pending & AR724X_PCI_INT_DEV0)
--		generic_handle_irq(apc->irq_base + 0);
--
-+		generic_handle_irq(irq_linear_revmap(apc->domain, 1));
- 	else
- 		spurious_interrupt();
-+	chained_irq_exit(chip, desc);
- }
- 
- static void ar724x_pci_irq_unmask(struct irq_data *d)
- {
- 	struct ar724x_pci_controller *apc;
- 	void __iomem *base;
--	int offset;
- 	u32 t;
- 
- 	apc = irq_data_get_irq_chip_data(d);
- 	base = apc->ctrl_base;
--	offset = apc->irq_base - d->irq;
- 
--	switch (offset) {
-+	switch (irq_linear_revmap(apc->domain, d->irq)) {
- 	case 0:
- 		t = __raw_readl(base + AR724X_PCI_REG_INT_MASK);
- 		__raw_writel(t | AR724X_PCI_INT_DEV0,
-@@ -270,14 +272,12 @@ static void ar724x_pci_irq_mask(struct i
- {
- 	struct ar724x_pci_controller *apc;
- 	void __iomem *base;
--	int offset;
- 	u32 t;
- 
- 	apc = irq_data_get_irq_chip_data(d);
- 	base = apc->ctrl_base;
--	offset = apc->irq_base - d->irq;
- 
--	switch (offset) {
-+	switch (irq_linear_revmap(apc->domain, d->irq)) {
- 	case 0:
- 		t = __raw_readl(base + AR724X_PCI_REG_INT_MASK);
- 		__raw_writel(t & ~AR724X_PCI_INT_DEV0,
-@@ -302,26 +302,34 @@ static struct irq_chip ar724x_pci_irq_ch
- 	.irq_mask_ack	= ar724x_pci_irq_mask,
- };
- 
-+static int ar724x_pci_irq_map(struct irq_domain *d,
-+			      unsigned int irq, irq_hw_number_t hw)
-+{
-+	struct ar724x_pci_controller *apc = d->host_data;
-+
-+	irq_set_chip_and_handler(irq, &ar724x_pci_irq_chip, handle_level_irq);
-+	irq_set_chip_data(irq, apc);
-+
-+	return 0;
-+}
-+
-+static const struct irq_domain_ops ar724x_pci_domain_ops = {
-+	.xlate = irq_domain_xlate_onecell,
-+	.map = ar724x_pci_irq_map,
-+};
-+
- static void ar724x_pci_irq_init(struct ar724x_pci_controller *apc,
- 				int id)
- {
- 	void __iomem *base;
--	int i;
- 
- 	base = apc->ctrl_base;
- 
- 	__raw_writel(0, base + AR724X_PCI_REG_INT_MASK);
- 	__raw_writel(0, base + AR724X_PCI_REG_INT_STATUS);
- 
--	apc->irq_base = ATH79_PCI_IRQ_BASE + (id * AR724X_PCI_IRQ_COUNT);
--
--	for (i = apc->irq_base;
--	     i < apc->irq_base + AR724X_PCI_IRQ_COUNT; i++) {
--		irq_set_chip_and_handler(i, &ar724x_pci_irq_chip,
--					 handle_level_irq);
--		irq_set_chip_data(i, apc);
--	}
--
-+	apc->domain = irq_domain_add_linear(apc->np, 2,
-+					    &ar724x_pci_domain_ops, apc);
- 	irq_set_chained_handler_and_data(apc->irq, ar724x_pci_irq_handler,
- 					 apc);
- }
-@@ -360,7 +368,6 @@ static void ar724x_pci_hw_init(struct ar
- static int ar724x_pci_probe(struct platform_device *pdev)
- {
- 	struct ar724x_pci_controller *apc;
--	struct resource *res;
- 	int id;
- 
- 	id = pdev->id;
-@@ -388,29 +395,11 @@ static int ar724x_pci_probe(struct platf
- 	if (apc->irq < 0)
- 		return -EINVAL;
- 
--	res = platform_get_resource_byname(pdev, IORESOURCE_IO, "io_base");
--	if (!res)
--		return -EINVAL;
--
--	apc->io_res.parent = res;
--	apc->io_res.name = "PCI IO space";
--	apc->io_res.start = res->start;
--	apc->io_res.end = res->end;
--	apc->io_res.flags = IORESOURCE_IO;
--
--	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mem_base");
--	if (!res)
--		return -EINVAL;
--
--	apc->mem_res.parent = res;
--	apc->mem_res.name = "PCI memory space";
--	apc->mem_res.start = res->start;
--	apc->mem_res.end = res->end;
--	apc->mem_res.flags = IORESOURCE_MEM;
--
-+	apc->np = pdev->dev.of_node;
- 	apc->pci_controller.pci_ops = &ar724x_pci_ops;
- 	apc->pci_controller.io_resource = &apc->io_res;
- 	apc->pci_controller.mem_resource = &apc->mem_res;
-+	pci_load_of_ranges(&apc->pci_controller, pdev->dev.of_node);
- 
- 	/*
- 	 * Do the full PCIE Root Complex Initialization Sequence if the PCIe
-@@ -432,10 +421,16 @@ static int ar724x_pci_probe(struct platf
- 	return 0;
- }
- 
-+static const struct of_device_id ar724x_pci_ids[] = {
-+	{ .compatible = "qcom,ar7240-pci" },
-+	{},
-+};
-+
- static struct platform_driver ar724x_pci_driver = {
- 	.probe = ar724x_pci_probe,
- 	.driver = {
- 		.name = "ar724x-pci",
-+		.of_match_table = ar724x_pci_ids,
- 	},
- };
- 
diff --git a/target/linux/ath79/patches-6.6/314-MIPS-ath79-remove-irq-code-from-pci.patch b/target/linux/ath79/patches-6.6/314-MIPS-ath79-remove-irq-code-from-pci.patch
deleted file mode 100644
index 01549eec68..0000000000
--- a/target/linux/ath79/patches-6.6/314-MIPS-ath79-remove-irq-code-from-pci.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From: John Crispin <john at phrozen.org>
-Subject: ath79: fix remove irq code from pci driver patch
-
-This patch got mangled in the void while rebasing it.
-
-Submitted-by: John Crispin <john at phrozen.org>
----
- arch/mips/pci/pci-ar71xx.c                    | 107 ------------------
- 1 file changed, 141 deletions(-)
-
---- a/arch/mips/pci/pci-ar71xx.c
-+++ b/arch/mips/pci/pci-ar71xx.c
-@@ -51,11 +51,9 @@
- struct ar71xx_pci_controller {
- 	struct device_node *np;
- 	void __iomem *cfg_base;
--	int irq;
- 	struct pci_controller pci_ctrl;
- 	struct resource io_res;
- 	struct resource mem_res;
--	struct irq_domain *domain;
- };
- 
- /* Byte lane enable bits */
-@@ -227,104 +225,6 @@ static struct pci_ops ar71xx_pci_ops = {
- 	.write	= ar71xx_pci_write_config,
- };
- 
--static void ar71xx_pci_irq_handler(struct irq_desc *desc)
--{
--	void __iomem *base = ath79_reset_base;
--	struct irq_chip *chip = irq_desc_get_chip(desc);
--	struct ar71xx_pci_controller *apc = irq_desc_get_handler_data(desc);
--	u32 pending;
--
--	chained_irq_enter(chip, desc);
--	pending = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_STATUS) &
--		  __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
--
--	if (pending & AR71XX_PCI_INT_DEV0)
--		generic_handle_irq(irq_linear_revmap(apc->domain, 1));
--
--	else if (pending & AR71XX_PCI_INT_DEV1)
--		generic_handle_irq(irq_linear_revmap(apc->domain, 2));
--
--	else if (pending & AR71XX_PCI_INT_DEV2)
--		generic_handle_irq(irq_linear_revmap(apc->domain, 3));
--
--	else if (pending & AR71XX_PCI_INT_CORE)
--		generic_handle_irq(irq_linear_revmap(apc->domain, 4));
--
--	else
--		spurious_interrupt();
--	chained_irq_exit(chip, desc);
--}
--
--static void ar71xx_pci_irq_unmask(struct irq_data *d)
--{
--	struct ar71xx_pci_controller *apc;
--	unsigned int irq;
--	void __iomem *base = ath79_reset_base;
--	u32 t;
--
--	apc = irq_data_get_irq_chip_data(d);
--	irq = irq_linear_revmap(apc->domain, d->irq);
--
--	t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
--	__raw_writel(t | (1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
--
--	/* flush write */
--	__raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
--}
--
--static void ar71xx_pci_irq_mask(struct irq_data *d)
--{
--	struct ar71xx_pci_controller *apc;
--	unsigned int irq;
--	void __iomem *base = ath79_reset_base;
--	u32 t;
--
--	apc = irq_data_get_irq_chip_data(d);
--	irq = irq_linear_revmap(apc->domain, d->irq);
--
--	t = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
--	__raw_writel(t & ~(1 << irq), base + AR71XX_RESET_REG_PCI_INT_ENABLE);
--
--	/* flush write */
--	__raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
--}
--
--static struct irq_chip ar71xx_pci_irq_chip = {
--	.name		= "AR71XX PCI",
--	.irq_mask	= ar71xx_pci_irq_mask,
--	.irq_unmask	= ar71xx_pci_irq_unmask,
--	.irq_mask_ack	= ar71xx_pci_irq_mask,
--};
--
--static int ar71xx_pci_irq_map(struct irq_domain *d,
--			      unsigned int irq, irq_hw_number_t hw)
--{
--	struct ar71xx_pci_controller *apc = d->host_data;
--
--	irq_set_chip_and_handler(irq, &ar71xx_pci_irq_chip, handle_level_irq);
--	irq_set_chip_data(irq, apc);
--
--	return 0;
--}
--
--static const struct irq_domain_ops ar71xx_pci_domain_ops = {
--	.xlate = irq_domain_xlate_onecell,
--	.map = ar71xx_pci_irq_map,
--};
--
--static void ar71xx_pci_irq_init(struct ar71xx_pci_controller *apc)
--{
--	void __iomem *base = ath79_reset_base;
--
--	__raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_ENABLE);
--	__raw_writel(0, base + AR71XX_RESET_REG_PCI_INT_STATUS);
--
--	apc->domain = irq_domain_add_linear(apc->np, AR71XX_PCI_IRQ_COUNT,
--					    &ar71xx_pci_domain_ops, apc);
--	irq_set_chained_handler_and_data(apc->irq, ar71xx_pci_irq_handler,
--					 apc);
--}
--
- static void ar71xx_pci_reset(void)
- {
- 	ath79_device_reset_set(AR71XX_RESET_PCI_BUS | AR71XX_RESET_PCI_CORE);
-@@ -357,10 +257,6 @@ static int ar71xx_pci_probe(struct platf
- 	if (IS_ERR(apc->cfg_base))
- 		return PTR_ERR(apc->cfg_base);
- 
--	apc->irq = platform_get_irq(pdev, 0);
--	if (apc->irq < 0)
--		return -EINVAL;
--
- 	ar71xx_pci_reset();
- 
- 	/* setup COMMAND register */
-@@ -371,8 +267,6 @@ static int ar71xx_pci_probe(struct platf
- 	/* clear bus errors */
- 	ar71xx_pci_check_error(apc, 1);
- 
--	ar71xx_pci_irq_init(apc);
--
- 	apc->np = pdev->dev.of_node;
- 	apc->pci_ctrl.pci_ops = &ar71xx_pci_ops;
- 	apc->pci_ctrl.mem_resource = &apc->mem_res;
diff --git a/target/linux/ath79/patches-6.6/315-MIPS-pci-ar724x-add-QCA9550-reset-sequence.patch b/target/linux/ath79/patches-6.6/315-MIPS-pci-ar724x-add-QCA9550-reset-sequence.patch
deleted file mode 100644
index 375dec8ba2..0000000000
--- a/target/linux/ath79/patches-6.6/315-MIPS-pci-ar724x-add-QCA9550-reset-sequence.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From: David Bauer <mail at david-bauer.net>
-Date: Sat, 11 Apr 2020 14:03:12 +0200
-Subject: MIPS: pci-ar724x: add QCA9550 reset sequence
-
-The QCA9550 family of SoCs have a slightly different reset
-sequence compared to older chips.
-
-Normally the bootloader performs this sequence, however
-some bootloader implementation expect the operating system
-to clear the reset.
-
-Also get the resets from OF to support handling of the second
-PCIe root-complex on the QCA9558.
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
-
---- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-@@ -390,6 +390,7 @@
- #define QCA955X_PLL_CPU_CONFIG_REG		0x00
- #define QCA955X_PLL_DDR_CONFIG_REG		0x04
- #define QCA955X_PLL_CLK_CTRL_REG		0x08
-+#define QCA955X_PLL_PCIE_CONFIG_REG		0x0c
- #define QCA955X_PLL_ETH_XMII_CONTROL_REG	0x28
- #define QCA955X_PLL_ETH_SGMII_CONTROL_REG	0x48
- #define QCA955X_PLL_ETH_SGMII_SERDES_REG	0x4c
-@@ -475,6 +476,9 @@
- #define QCA956X_PLL_CLK_CTRL_CPU_DDRCLK_FROM_CPUPLL	BIT(21)
- #define QCA956X_PLL_CLK_CTRL_AHBCLK_FROM_DDRPLL		BIT(24)
- 
-+#define QCA955X_PLL_PCIE_CONFIG_PLL_PWD			BIT(30)
-+#define QCA955X_PLL_PCIE_CONFIG_PLL_BYPASS		BIT(16)
-+
- #define QCA956X_PLL_SWITCH_CLOCK_SPARE_I2C_CLK_SELB		BIT(5)
- #define QCA956X_PLL_SWITCH_CLOCK_SPARE_MDIO_CLK_SEL0_1		BIT(6)
- #define QCA956X_PLL_SWITCH_CLOCK_SPARE_UART1_CLK_SEL		BIT(7)
---- a/arch/mips/pci/pci-ar724x.c
-+++ b/arch/mips/pci/pci-ar724x.c
-@@ -8,6 +8,7 @@
- 
- #include <linux/irq.h>
- #include <linux/pci.h>
-+#include <linux/reset.h>
- #include <linux/init.h>
- #include <linux/delay.h>
- #include <linux/platform_device.h>
-@@ -55,6 +56,9 @@ struct ar724x_pci_controller {
- 	struct irq_domain *domain;
- 	struct resource io_res;
- 	struct resource mem_res;
-+
-+	struct reset_control *hc_reset;
-+	struct reset_control *phy_reset;
- };
- 
- static struct irq_chip ar724x_pci_irq_chip;
-@@ -340,18 +344,30 @@ static void ar724x_pci_hw_init(struct ar
- 	int wait = 0;
- 
- 	/* deassert PCIe host controller and PCIe PHY reset */
--	ath79_device_reset_clear(AR724X_RESET_PCIE);
--	ath79_device_reset_clear(AR724X_RESET_PCIE_PHY);
-+	reset_control_deassert(apc->hc_reset);
-+	reset_control_deassert(apc->phy_reset);
- 
--	/* remove the reset of the PCIE PLL */
--	ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
--	ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_RESET;
--	ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
--
--	/* deassert bypass for the PCIE PLL */
--	ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
--	ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_BYPASS;
--	ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
-+	if (of_device_is_compatible(apc->np, "qcom,qca9550-pci")) {
-+		/* remove the reset of the PCIE PLL */
-+		ppl = ath79_pll_rr(QCA955X_PLL_PCIE_CONFIG_REG);
-+		ppl &= ~QCA955X_PLL_PCIE_CONFIG_PLL_PWD;
-+		ath79_pll_wr(QCA955X_PLL_PCIE_CONFIG_REG, ppl);
-+
-+		/* deassert bypass for the PCIE PLL */
-+		ppl = ath79_pll_rr(QCA955X_PLL_PCIE_CONFIG_REG);
-+		ppl &= ~QCA955X_PLL_PCIE_CONFIG_PLL_BYPASS;
-+		ath79_pll_wr(QCA955X_PLL_PCIE_CONFIG_REG, ppl);
-+	} else {
-+		/* remove the reset of the PCIE PLL */
-+		ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
-+		ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_RESET;
-+		ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
-+
-+		/* deassert bypass for the PCIE PLL */
-+		ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
-+		ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_BYPASS;
-+		ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
-+	}
- 
- 	/* set PCIE Application Control to ready */
- 	app = __raw_readl(apc->ctrl_base + AR724X_PCI_REG_APP);
-@@ -395,6 +411,14 @@ static int ar724x_pci_probe(struct platf
- 	if (apc->irq < 0)
- 		return -EINVAL;
- 
-+	apc->hc_reset = devm_reset_control_get_exclusive(&pdev->dev, "hc");
-+	if (IS_ERR(apc->hc_reset))
-+		return PTR_ERR(apc->hc_reset);
-+
-+	apc->phy_reset = devm_reset_control_get_exclusive(&pdev->dev, "phy");
-+	if (IS_ERR(apc->phy_reset))
-+		return PTR_ERR(apc->phy_reset);
-+
- 	apc->np = pdev->dev.of_node;
- 	apc->pci_controller.pci_ops = &ar724x_pci_ops;
- 	apc->pci_controller.io_resource = &apc->io_res;
-@@ -405,7 +429,7 @@ static int ar724x_pci_probe(struct platf
- 	 * Do the full PCIE Root Complex Initialization Sequence if the PCIe
- 	 * host controller is in reset.
- 	 */
--	if (ath79_reset_rr(AR724X_RESET_REG_RESET_MODULE) & AR724X_RESET_PCIE)
-+	if (reset_control_status(apc->hc_reset))
- 		ar724x_pci_hw_init(apc);
- 
- 	apc->link_up = ar724x_pci_check_link(apc);
-@@ -423,6 +447,7 @@ static int ar724x_pci_probe(struct platf
- 
- static const struct of_device_id ar724x_pci_ids[] = {
- 	{ .compatible = "qcom,ar7240-pci" },
-+	{ .compatible = "qcom,qca9550-pci" },
- 	{},
- };
- 
diff --git a/target/linux/ath79/patches-6.6/316-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch b/target/linux/ath79/patches-6.6/316-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch
deleted file mode 100644
index 1e2715b84c..0000000000
--- a/target/linux/ath79/patches-6.6/316-MIPS-ath79-swizzle-pci-address-for-ar71xx.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From: Gabor Juhos <juhosg at openwrt.org>
-Subject: [PATCH] ar71xx: swizzle address for PCI byte/word access on AR71xx
-
-Closes #11683.
-
-SVN-Revision: 32639
----
- .../mips/include/asm/mach-ath79/mangle-port.h | 111 ++++++++++++++++++
- 1 file changed, 111 insertions(+)
- create mode 100644 arch/mips/include/asm/mach-ath79/mangle-port.h
-
---- /dev/null
-+++ b/arch/mips/include/asm/mach-ath79/mangle-port.h
-@@ -0,0 +1,37 @@
-+/*
-+ *  Copyright (C) 2012 Gabor Juhos <juhosg at openwrt.org>
-+ *
-+ *  This file was derived from: inlude/asm-mips/mach-generic/mangle-port.h
-+ *      Copyright (C) 2003, 2004 Ralf Baechle
-+ *
-+ *  This program is free software; you can redistribute it and/or modify it
-+ *  under the terms of the GNU General Public License version 2 as published
-+ *  by the Free Software Foundation.
-+ */
-+
-+#ifndef __ASM_MACH_ATH79_MANGLE_PORT_H
-+#define __ASM_MACH_ATH79_MANGLE_PORT_H
-+
-+#ifdef CONFIG_PCI_AR71XX
-+extern unsigned long (ath79_pci_swizzle_b)(unsigned long port);
-+extern unsigned long (ath79_pci_swizzle_w)(unsigned long port);
-+#else
-+#define ath79_pci_swizzle_b(port) (port)
-+#define ath79_pci_swizzle_w(port) (port)
-+#endif
-+
-+#define __swizzle_addr_b(port)	ath79_pci_swizzle_b(port)
-+#define __swizzle_addr_w(port)	ath79_pci_swizzle_w(port)
-+#define __swizzle_addr_l(port)	(port)
-+#define __swizzle_addr_q(port)	(port)
-+
-+# define ioswabb(a, x)           (x)
-+# define __mem_ioswabb(a, x)     (x)
-+# define ioswabw(a, x)           (x)
-+# define __mem_ioswabw(a, x)     cpu_to_le16(x)
-+# define ioswabl(a, x)           (x)
-+# define __mem_ioswabl(a, x)     cpu_to_le32(x)
-+# define ioswabq(a, x)           (x)
-+# define __mem_ioswabq(a, x)     cpu_to_le64(x)
-+
-+#endif /* __ASM_MACH_ATH79_MANGLE_PORT_H */
---- a/arch/mips/pci/pci-ar71xx.c
-+++ b/arch/mips/pci/pci-ar71xx.c
-@@ -68,6 +68,45 @@ static const u32 ar71xx_pci_read_mask[8]
- 	0, 0xff, 0xffff, 0, 0xffffffff, 0, 0, 0
- };
- 
-+static unsigned long (*__ath79_pci_swizzle_b)(unsigned long port);
-+static unsigned long (*__ath79_pci_swizzle_w)(unsigned long port);
-+
-+static inline bool ar71xx_is_pci_addr(unsigned long port)
-+{
-+	unsigned long phys = CPHYSADDR(port);
-+
-+	return (phys >= AR71XX_PCI_MEM_BASE &&
-+		phys < AR71XX_PCI_MEM_BASE + AR71XX_PCI_MEM_SIZE);
-+}
-+
-+static unsigned long ar71xx_pci_swizzle_b(unsigned long port)
-+{
-+	return ar71xx_is_pci_addr(port) ? port ^ 3 : port;
-+}
-+
-+static unsigned long ar71xx_pci_swizzle_w(unsigned long port)
-+{
-+	return ar71xx_is_pci_addr(port) ? port ^ 2 : port;
-+}
-+
-+unsigned long ath79_pci_swizzle_b(unsigned long port)
-+{
-+	if (__ath79_pci_swizzle_b)
-+		return __ath79_pci_swizzle_b(port);
-+
-+	return port;
-+}
-+EXPORT_SYMBOL(ath79_pci_swizzle_b);
-+
-+unsigned long ath79_pci_swizzle_w(unsigned long port)
-+{
-+	if (__ath79_pci_swizzle_w)
-+		return __ath79_pci_swizzle_w(port);
-+
-+	return port;
-+}
-+EXPORT_SYMBOL(ath79_pci_swizzle_w);
-+
- static inline u32 ar71xx_pci_get_ble(int where, int size, int local)
- {
- 	u32 t;
-@@ -275,6 +314,9 @@ static int ar71xx_pci_probe(struct platf
- 
- 	register_pci_controller(&apc->pci_ctrl);
- 
-+	__ath79_pci_swizzle_b = ar71xx_pci_swizzle_b;
-+	__ath79_pci_swizzle_w = ar71xx_pci_swizzle_w;
-+
- 	return 0;
- }
- 
diff --git a/target/linux/ath79/patches-6.6/317-MIPS-pci-ar724x-clear-power-down-of-pll-on-AR934x.patch b/target/linux/ath79/patches-6.6/317-MIPS-pci-ar724x-clear-power-down-of-pll-on-AR934x.patch
deleted file mode 100644
index dfb7e483a7..0000000000
--- a/target/linux/ath79/patches-6.6/317-MIPS-pci-ar724x-clear-power-down-of-pll-on-AR934x.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From f2ca10b22ace3ce53b4e3f189bf1dd53a4482475 Mon Sep 17 00:00:00 2001
-From: INAGAKI Hiroshi <musashino.open at gmail.com>
-Date: Fri, 26 Apr 2024 23:53:58 +0900
-Subject: [PATCH 1/2] MIPS: pci-ar724x: clear power down of pll on AR934x
-
-Fix PCIe initialization on AR934x by clearing PLL_PWD bit in addition to
-PPL_RESET bit of AR724x.
-
-Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
----
-
---- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-@@ -347,6 +347,8 @@
- #define AR934X_PLL_CPU_DDR_CLK_CTRL_DDRCLK_FROM_DDRPLL	BIT(21)
- #define AR934X_PLL_CPU_DDR_CLK_CTRL_AHBCLK_FROM_DDRPLL	BIT(24)
- 
-+#define AR934X_PLL_PCIE_CONFIG_PLL_PWD		BIT(30)
-+
- #define AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL	BIT(6)
- 
- #define QCA953X_PLL_CPU_CONFIG_REG		0x00
---- a/arch/mips/pci/pci-ar724x.c
-+++ b/arch/mips/pci/pci-ar724x.c
-@@ -360,7 +360,8 @@ static void ar724x_pci_hw_init(struct ar
- 	} else {
- 		/* remove the reset of the PCIE PLL */
- 		ppl = ath79_pll_rr(AR724X_PLL_REG_PCIE_CONFIG);
--		ppl &= ~AR724X_PLL_REG_PCIE_CONFIG_PPL_RESET;
-+		ppl &= ~(AR934X_PLL_PCIE_CONFIG_PLL_PWD |
-+			 AR724X_PLL_REG_PCIE_CONFIG_PPL_RESET);
- 		ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
- 
- 		/* deassert bypass for the PCIE PLL */
diff --git a/target/linux/ath79/patches-6.6/318-MIPS-pci-ar724x-deassert-the-reset-of-PCIe-endpoint.patch b/target/linux/ath79/patches-6.6/318-MIPS-pci-ar724x-deassert-the-reset-of-PCIe-endpoint.patch
deleted file mode 100644
index c906bdbbb6..0000000000
--- a/target/linux/ath79/patches-6.6/318-MIPS-pci-ar724x-deassert-the-reset-of-PCIe-endpoint.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 859c93981a8994ffa69967b44b247d2e7d6a01f1 Mon Sep 17 00:00:00 2001
-From: INAGAKI Hiroshi <musashino.open at gmail.com>
-Date: Fri, 26 Apr 2024 23:54:57 +0900
-Subject: [PATCH 2/2] MIPS: pci-ar724x: deassert the reset of PCIe endpoint
-
-Fix PCIe initialization by de-assertion of PCIe endpoint reset.
-
-Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
----
-
---- a/arch/mips/pci/pci-ar724x.c
-+++ b/arch/mips/pci/pci-ar724x.c
-@@ -25,6 +25,7 @@
- 
- #define AR724X_PCI_APP_LTSSM_ENABLE	BIT(0)
- 
-+#define AR724X_PCI_RESET_EP_RESET_L	BIT(2)
- #define AR724X_PCI_RESET_LINK_UP	BIT(0)
- 
- #define AR724X_PCI_INT_DEV0		BIT(14)
-@@ -340,7 +341,7 @@ static void ar724x_pci_irq_init(struct a
- 
- static void ar724x_pci_hw_init(struct ar724x_pci_controller *apc)
- {
--	u32 ppl, app;
-+	u32 ppl, rst, app;
- 	int wait = 0;
- 
- 	/* deassert PCIe host controller and PCIe PHY reset */
-@@ -370,6 +371,11 @@ static void ar724x_pci_hw_init(struct ar
- 		ath79_pll_wr(AR724X_PLL_REG_PCIE_CONFIG, ppl);
- 	}
- 
-+	/* deassert the reset state of the PCIE endpoint */
-+	rst = __raw_readl(apc->ctrl_base + AR724X_PCI_REG_RESET);
-+	rst |= AR724X_PCI_RESET_EP_RESET_L;
-+	__raw_writel(rst, apc->ctrl_base + AR724X_PCI_REG_RESET);
-+
- 	/* set PCIE Application Control to ready */
- 	app = __raw_readl(apc->ctrl_base + AR724X_PCI_REG_APP);
- 	app |= AR724X_PCI_APP_LTSSM_ENABLE;
diff --git a/target/linux/ath79/patches-6.6/330-missing-registers.patch b/target/linux/ath79/patches-6.6/330-missing-registers.patch
deleted file mode 100644
index d05e741c7e..0000000000
--- a/target/linux/ath79/patches-6.6/330-missing-registers.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From: Christian Lamparter <chunkeey at gmail.com>
-Subject: [PATCH] ath79: gmac: add parsers for rxd(v)- and tx(d|en)-delay for
-
-    ath79: gmac: add parsers for rxd(v)- and tx(d|en)-delay for AR9344
-
-    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
-
---- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-@@ -1233,6 +1233,10 @@
- #define AR934X_ETH_CFG_RDV_DELAY        BIT(16)
- #define AR934X_ETH_CFG_RDV_DELAY_MASK   0x3
- #define AR934X_ETH_CFG_RDV_DELAY_SHIFT  16
-+#define AR934X_ETH_CFG_TXD_DELAY_MASK   0x3
-+#define AR934X_ETH_CFG_TXD_DELAY_SHIFT  18
-+#define AR934X_ETH_CFG_TXE_DELAY_MASK   0x3
-+#define AR934X_ETH_CFG_TXE_DELAY_SHIFT  20
- 
- /*
-  * QCA953X GMAC Interface
diff --git a/target/linux/ath79/patches-6.6/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch b/target/linux/ath79/patches-6.6/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch
deleted file mode 100644
index 5d9c77c69f..0000000000
--- a/target/linux/ath79/patches-6.6/331-MIPS-ath79-add-missing-QCA955x-GMAC-registers.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 60efe35257b063ce584968f9f80b437030ce6ba6 Mon Sep 17 00:00:00 2001
-From: David Bauer <mail at david-bauer.net>
-Date: Mon, 18 Mar 2019 00:54:06 +0100
-Subject: [PATCH] MIPS: ath79: add missing QCA955x GMAC registers
-
-This adds missing GMAC register definitions for the Qualcomm Atheros
-QCA955X series MIPS SoCs.
-
-They originate from the platforms U-Boot code and the AVM FRITZ!WLAN
-Repeater 450E's GPL tarball.
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
----
- .../mips/include/asm/mach-ath79/ar71xx_regs.h | 54 +++++++++++++++++++
- 1 file changed, 54 insertions(+)
-
---- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-@@ -1253,7 +1253,12 @@
-  */
- 
- #define QCA955X_GMAC_REG_ETH_CFG	0x00
-+#define QCA955X_GMAC_REG_SGMII_RESET	0x14
- #define QCA955X_GMAC_REG_SGMII_SERDES	0x18
-+#define QCA955X_GMAC_REG_MR_AN_CONTROL	0x1c
-+#define QCA955X_GMAC_REG_MR_AN_STATUS	0x20
-+#define QCA955X_GMAC_REG_SGMII_CONFIG	0x34
-+#define QCA955X_GMAC_REG_SGMII_DEBUG	0x58
- 
- #define QCA955X_ETH_CFG_RGMII_EN	BIT(0)
- #define QCA955X_ETH_CFG_MII_GE0		BIT(1)
-@@ -1275,9 +1280,58 @@
- #define QCA955X_ETH_CFG_TXE_DELAY_MASK	0x3
- #define QCA955X_ETH_CFG_TXE_DELAY_SHIFT	20
- 
-+#define QCA955X_SGMII_RESET_RX_CLK_N_RESET	0
-+#define QCA955X_SGMII_RESET_RX_CLK_N		BIT(0)
-+#define QCA955X_SGMII_RESET_TX_CLK_N		BIT(1)
-+#define QCA955X_SGMII_RESET_RX_125M_N		BIT(2)
-+#define QCA955X_SGMII_RESET_TX_125M_N		BIT(3)
-+#define QCA955X_SGMII_RESET_HW_RX_125M_N	BIT(4)
-+
- #define QCA955X_SGMII_SERDES_LOCK_DETECT_STATUS	BIT(15)
- #define QCA955X_SGMII_SERDES_RES_CALIBRATION_SHIFT 23
- #define QCA955X_SGMII_SERDES_RES_CALIBRATION_MASK 0xf
-+
-+#define QCA955X_MR_AN_CONTROL_SPEED_SEL1	BIT(6)
-+#define QCA955X_MR_AN_CONTROL_DUPLEX_MODE	BIT(8)
-+#define QCA955X_MR_AN_CONTROL_RESTART_AN	BIT(9)
-+#define QCA955X_MR_AN_CONTROL_POWER_DOWN	BIT(11)
-+#define QCA955X_MR_AN_CONTROL_AN_ENABLE		BIT(12)
-+#define QCA955X_MR_AN_CONTROL_SPEED_SEL0	BIT(13)
-+#define QCA955X_MR_AN_CONTROL_LOOPBACK		BIT(14)
-+#define QCA955X_MR_AN_CONTROL_PHY_RESET		BIT(15)
-+
-+#define QCA955X_MR_AN_STATUS_EXT_CAP		BIT(0)
-+#define QCA955X_MR_AN_STATUS_LINK_UP		BIT(2)
-+#define QCA955X_MR_AN_STATUS_AN_ABILITY		BIT(3)
-+#define QCA955X_MR_AN_STATUS_REMOTE_FAULT	BIT(4)
-+#define QCA955X_MR_AN_STATUS_AN_COMPLETE	BIT(5)
-+#define QCA955X_MR_AN_STATUS_NO_PREAMBLE	BIT(6)
-+#define QCA955X_MR_AN_STATUS_BASE_PAGE		BIT(7)
-+
-+#define QCA955X_SGMII_CONFIG_MODE_CTRL_SHIFT		0
-+#define QCA955X_SGMII_CONFIG_MODE_CTRL_MASK		0x7
-+#define QCA955X_SGMII_CONFIG_ENABLE_SGMII_TX_PAUSE	BIT(3)
-+#define QCA955X_SGMII_CONFIG_MR_REG4_CHANGED		BIT(4)
-+#define QCA955X_SGMII_CONFIG_FORCE_SPEED		BIT(5)
-+#define QCA955X_SGMII_CONFIG_SPEED_SHIFT		6
-+#define QCA955X_SGMII_CONFIG_SPEED_MASK			0xc0
-+#define QCA955X_SGMII_CONFIG_REMOTE_PHY_LOOPBACK	BIT(8)
-+#define QCA955X_SGMII_CONFIG_NEXT_PAGE_LOADED		BIT(9)
-+#define QCA955X_SGMII_CONFIG_MDIO_ENABLE		BIT(10)
-+#define QCA955X_SGMII_CONFIG_MDIO_PULSE			BIT(11)
-+#define QCA955X_SGMII_CONFIG_MDIO_COMPLETE		BIT(12)
-+#define QCA955X_SGMII_CONFIG_PRBS_ENABLE		BIT(13)
-+#define QCA955X_SGMII_CONFIG_BERT_ENABLE		BIT(14)
-+
-+#define QCA955X_SGMII_DEBUG_TX_STATE_MASK	0xff
-+#define QCA955X_SGMII_DEBUG_TX_STATE_SHIFT	0
-+#define QCA955X_SGMII_DEBUG_RX_STATE_MASK	0xff00
-+#define QCA955X_SGMII_DEBUG_RX_STATE_SHIFT	8
-+#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_MASK	0xff0000
-+#define QCA955X_SGMII_DEBUG_RX_SYNC_STATE_SHIFT	16
-+#define QCA955X_SGMII_DEBUG_ARB_STATE_MASK	0xf000000
-+#define QCA955X_SGMII_DEBUG_ARB_STATE_SHIFT	24
-+
- /*
-  * QCA956X GMAC Interface
-  */
diff --git a/target/linux/ath79/patches-6.6/332-ath79-sgmii-config.patch b/target/linux/ath79/patches-6.6/332-ath79-sgmii-config.patch
deleted file mode 100644
index 6f6217ce75..0000000000
--- a/target/linux/ath79/patches-6.6/332-ath79-sgmii-config.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: David Bauer <mail at david-bauer.net>
-Subject: [PATCH] ath79: force SGMII SerDes mode to MAC operation
-
-The mode on the SGMII SerDes on the QCA9563 is 1000 Base-X by default.
-This only allows for 1000 Mbit/s links, however when used with an SGMII
-PHY in 100 Mbit/s link mode, the link remains dead.
-
-This strictly has nothing to do with the SerDes calibration, however it
-is done at the same point in the QCA reference U-Boot which is the
-blueprint for everything happening here. As the current state is more or
-less a hack, this should be fine.
-
-This fixes the issues outlined above on a TP-Link EAP-225 Outdoor.
-
-Reported-by: Tom Herbers <freifunk at tomherbers.de>
-Tested-by: Tom Herbers <freifunk at tomherbers.de>
-Submitted-by: David Bauer <mail at david-bauer.net>
----
- arch/mips/include/asm/mach-ath79/ar71xx_regs.h           | 1 +
- 1 files changed, 1 insertion(+)
-
---- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-@@ -1382,5 +1382,6 @@
- 
- #define QCA956X_SGMII_CONFIG_MODE_CTRL_SHIFT	0
- #define QCA956X_SGMII_CONFIG_MODE_CTRL_MASK	0x7
-+#define QCA956X_SGMII_CONFIG_MODE_CTRL_SGMII_MAC	0x2
- 
- #endif /* __ASM_MACH_AR71XX_REGS_H */
diff --git a/target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch b/target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch
deleted file mode 100644
index a3bdf890c4..0000000000
--- a/target/linux/ath79/patches-6.6/340-register_gpio_driver_earlier.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From: John Crispin <john at phrozen.org>
-Subject: ath79: Register GPIO driver earlier
-
-HACK: register the GPIO driver earlier to ensure that gpio_request calls
-from mach files succeed.
-
-Submitted-by: John Crispin <john at phrozen.org>
----
- drivers/gpio/gpio-ath79.c                     | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
---- a/drivers/gpio/gpio-ath79.c
-+++ b/drivers/gpio/gpio-ath79.c
-@@ -300,7 +300,11 @@ static struct platform_driver ath79_gpio
- 	.probe = ath79_gpio_probe,
- };
- 
--module_platform_driver(ath79_gpio_driver);
-+static int __init ath79_gpio_init(void)
-+{
-+	return platform_driver_register(&ath79_gpio_driver);
-+}
-+postcore_initcall(ath79_gpio_init);
- 
- MODULE_DESCRIPTION("Atheros AR71XX/AR724X/AR913X GPIO API support");
- MODULE_LICENSE("GPL v2");
diff --git a/target/linux/ath79/patches-6.6/341-wifi-ath9k-obtain-system-gpios.patch b/target/linux/ath79/patches-6.6/341-wifi-ath9k-obtain-system-gpios.patch
deleted file mode 100644
index a43e3537e6..0000000000
--- a/target/linux/ath79/patches-6.6/341-wifi-ath9k-obtain-system-gpios.patch
+++ /dev/null
@@ -1,233 +0,0 @@
-From patchwork Tue Apr 23 12:12:33 2024
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-X-Patchwork-Submitter: Linus Walleij <linus.walleij at linaro.org>
-X-Patchwork-Id: 1926515
-Return-Path: 
- <linux-gpio+bounces-5755-incoming=patchwork.ozlabs.org at vger.kernel.org>
-X-Original-To: incoming at patchwork.ozlabs.org
-Delivered-To: patchwork-incoming at legolas.ozlabs.org
-Authentication-Results: legolas.ozlabs.org;
-	dkim=pass (2048-bit key;
- unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256
- header.s=google header.b=qX99TQMM;
-	dkim-atps=neutral
-Authentication-Results: legolas.ozlabs.org;
- spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org
- (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org;
- envelope-from=linux-gpio+bounces-5755-incoming=patchwork.ozlabs.org at vger.kernel.org;
- receiver=patchwork.ozlabs.org)
-Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org
- [IPv6:2604:1380:45e3:2400::1])
-	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
-	 key-exchange X25519 server-signature ECDSA (secp384r1))
-	(No client certificate requested)
-	by legolas.ozlabs.org (Postfix) with ESMTPS id 4VP1Gc6RZKz1yZP
-	for <incoming at patchwork.ozlabs.org>; Tue, 23 Apr 2024 22:12:56 +1000 (AEST)
-Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org
- [52.25.139.140])
-	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
-	(No client certificate requested)
-	by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5BB9C28522A
-	for <incoming at patchwork.ozlabs.org>; Tue, 23 Apr 2024 12:12:55 +0000 (UTC)
-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
-	by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F83B8563D;
-	Tue, 23 Apr 2024 12:12:41 +0000 (UTC)
-Authentication-Results: smtp.subspace.kernel.org;
-	dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org
- header.b="qX99TQMM"
-X-Original-To: linux-gpio at vger.kernel.org
-Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com
- [209.85.208.179])
-	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
-	(No client certificate requested)
-	by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8F3C82865
-	for <linux-gpio at vger.kernel.org>; Tue, 23 Apr 2024 12:12:37 +0000 (UTC)
-Authentication-Results: smtp.subspace.kernel.org;
- arc=none smtp.client-ip=209.85.208.179
-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
-	t=1713874361; cv=none;
- b=d6RcvcAu8hBYAK8Io489ZHQpJVXPwuokP6iMcAkbvElCerbXD6jAdqdi+RjDlo5C49GHGO4FQ19UwQn/VE//qSwiK1ulTSBp3OkvAmyb7yYAFnDs9AVNWRw+5/NxeFNn3fj5PyvqVymIbaJKabfrOVNwkz/5JMHxEIJtr6Crmog=
-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
-	s=arc-20240116; t=1713874361; c=relaxed/simple;
-	bh=0eXJ5AIjzz1TBGZ8SlshIPrEHZaZwZfYEdof+dSpu4Y=;
-	h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc;
- b=EfFtruUxRIGy+jylEiJ2rPEyPCjGCc8ptT9FVxe6s0O/kW38Y6196xVQeiSV2tSKVCEOIO+9HoqmpgdKsJE7gU9++EcrasP96MYpsklYpc2zsWW3b8QEhfxfZ9Ai/idyYihE2u9dQ7a143P/Ij/twDrZTt24wO/mtHDrE5XcCFI=
-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
- dmarc=pass (p=none dis=none) header.from=linaro.org;
- spf=pass smtp.mailfrom=linaro.org;
- dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org
- header.b=qX99TQMM; arc=none smtp.client-ip=209.85.208.179
-Authentication-Results: smtp.subspace.kernel.org;
- dmarc=pass (p=none dis=none) header.from=linaro.org
-Authentication-Results: smtp.subspace.kernel.org;
- spf=pass smtp.mailfrom=linaro.org
-Received: by mail-lj1-f179.google.com with SMTP id
- 38308e7fff4ca-2dd041acff1so40839131fa.1
-        for <linux-gpio at vger.kernel.org>;
- Tue, 23 Apr 2024 05:12:37 -0700 (PDT)
-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
-        d=linaro.org; s=google; t=1713874356; x=1714479156;
- darn=vger.kernel.org;
-        h=cc:to:message-id:content-transfer-encoding:mime-version:subject
-         :date:from:from:to:cc:subject:date:message-id:reply-to;
-        bh=vysJsMiH5IVqdTs4yMwZxZ7nUmt2aG7eBhkn8qm8hvI=;
-        b=qX99TQMMdHbskFYUaw8c93sIJsUhKmj/WPdyahHcupUhwn5wol4aVoPczkOKYwJZhE
-         eoInxzjAHIl3UNKyvPPrD4MrbLcSoFT6mTFMsgRQYUghsLattmGcqIebu9XT556dBhsf
-         DydmpqGgnTOIa+IEknFxg24mo8Xn2LVmDC7LSGEYykUy1xLHd1NSq56YEaYXC7641xeZ
-         9TOL0rZszeGld5cCS3013EmEeXQGCC3lAP83Eb48vbFXjPojkN0s40rZ2s8YpVsGT0iP
-         LeLVtP/E8XJqi4YipKryKSgbgOvQ1Bclle5+s+2qcJQNnSEjekMwR59BIRs3OZH2SRfN
-         gQdQ==
-X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
-        d=1e100.net; s=20230601; t=1713874356; x=1714479156;
-        h=cc:to:message-id:content-transfer-encoding:mime-version:subject
-         :date:from:x-gm-message-state:from:to:cc:subject:date:message-id
-         :reply-to;
-        bh=vysJsMiH5IVqdTs4yMwZxZ7nUmt2aG7eBhkn8qm8hvI=;
-        b=jEBH4NQ7SzFi2tnb1lgL06IchnBJoscNgKesjlorvou6X/9wDE/VbgxNFKR0zWwdTk
-         BEjG/ifFJxLmM9jdaCKu5cJc4yiDNXp7yZd48D71V34zJ4aINAGAx4hcOKqf95neFknx
-         nsFPpBFnTYFEpCLF0TebVoL6h6ehPzSojmkArzsrMppNvW2cwJ5gDlkqy2y4SezLanmM
-         6iU0ksnwE0bb2iLkahhgo00Ejt33yqxwa+3xBfhOe9oYKSSZYnY7qVq055SSwt9IAq+H
-         REGyJN+GrvupTHagiioYe3LPXDPdOui9ZixXXDllw1t1yGUy+TkJu8xSqtvHEfg81FHP
-         AxtA==
-X-Forwarded-Encrypted: i=1;
- AJvYcCUbxzPklfPYrLgyY1I0ycuj7Dh04dcGVonYocA2mzxzlAEV107o0ELlFqr3O9Td+tV/t0eV9ly9YAbTY6n1XPnFXS5dsYYAZw6RHw==
-X-Gm-Message-State: AOJu0YxsC7zdakTzntbiRFnN2A7yTrR0x+IpR6ce6eGn5kHeqIBi1km+
-	zTVpRulbch3JsmzVDbCbbAAYoBkNgEA568YL6zdjVARnvFwNz1cqatOrR1AXUm0=
-X-Google-Smtp-Source: 
- AGHT+IHBRMGvaJM98f86Z6m/RfVhK2XejjNGF3EvcRq/4x3oGM0DKpd2PbeCJdgmzHjLPVVbdsNzJg==
-X-Received: by 2002:a2e:9852:0:b0:2d8:a98d:18e with SMTP id
- e18-20020a2e9852000000b002d8a98d018emr7955886ljj.8.1713874355700;
-        Tue, 23 Apr 2024 05:12:35 -0700 (PDT)
-Received: from [192.168.1.140] ([85.235.12.238])
-        by smtp.gmail.com with ESMTPSA id
- x6-20020a2e7c06000000b002da179d8d25sm1628982ljc.64.2024.04.23.05.12.33
-        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
-        Tue, 23 Apr 2024 05:12:35 -0700 (PDT)
-From: Linus Walleij <linus.walleij at linaro.org>
-Date: Tue, 23 Apr 2024 14:12:33 +0200
-Subject: [PATCH v2] wifi: ath9k: Obtain system GPIOS from descriptors
-Precedence: bulk
-X-Mailing-List: linux-gpio at vger.kernel.org
-List-Id: <linux-gpio.vger.kernel.org>
-List-Subscribe: <mailto:linux-gpio+subscribe at vger.kernel.org>
-List-Unsubscribe: <mailto:linux-gpio+unsubscribe at vger.kernel.org>
-MIME-Version: 1.0
-Message-Id: <20240423-descriptors-wireless-v2-1-6d1d03b30bfa at linaro.org>
-X-B4-Tracking: v=1; b=H4sIALClJ2YC/22Nyw6CMBBFf4XM2hpanrLyPwyL0o4wCaFkxqCG9
- N+txKXLc5Nz7g6CTCjQZTswbiQUlgTmlIGb7DKiIp8YTG7KXBujPIpjWh+BRT2JcUYRNbTeXir
- v7FBUkNSV8U6vI3vrE08kSXgfL5v+rr9gof8HN61yhdo1rvJ125T1dabFcjgHHqGPMX4Ao4iiN
- LkAAAA=
-To: Kalle Valo <kvalo at kernel.org>,
-  Andy Shevchenko <andriy.shevchenko at linux.intel.com>,
-  Arnd Bergmann <arnd at arndb.de>, Alban Bedel <albeu at free.fr>,
-  Bartosz Golaszewski <brgl at bgdev.pl>, =?utf-8?q?Toke_H=C3=B8iland-J=C3=B8rg?=
-	=?utf-8?q?ensen?= <toke at toke.dk>
-Cc: linux-wireless at vger.kernel.org, brcm80211-dev-list.pdl at broadcom.com,
- linux-gpio at vger.kernel.org, Linus Walleij <linus.walleij at linaro.org>
-X-Mailer: b4 0.13.0
-
-The ath9k has an odd use of system-wide GPIOs: if the chip
-does not have internal GPIO capability, it will try to obtain a
-GPIO line from the system GPIO controller:
-
-  if (BIT(gpio) & ah->caps.gpio_mask)
-        ath9k_hw_gpio_cfg_wmac(...);
-  else if (AR_SREV_SOC(ah))
-        ath9k_hw_gpio_cfg_soc(ah, gpio, out, label);
-
-Where ath9k_hw_gpio_cfg_soc() will attempt to issue
-gpio_request_one() passing the local GPIO number of the controller
-(0..31) to gpio_request_one().
-
-This is somewhat peculiar and possibly even dangerous: there is
-nowadays no guarantee of the numbering of these system-wide
-GPIOs, and assuming that GPIO 0..31 as used by ath9k would
-correspond to GPIOs 0..31 on the system as a whole seems a bit
-wild.
-
-Register all 32 GPIOs at index 0..31 directly in the ATH79K
-GPIO driver and associate with WIFI if and only if we are probing
-ATH79K wifi from the AHB bus (used for SoCs).
-
-Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
----
-Changes in v2:
-- Define all the descriptors directly in the ATH79K
-  GPIO driver in case the driver want to request them directly.
-- Link to v1: https://lore.kernel.org/r/20240131-descriptors-wireless-v1-0-e1c7c5d68746 at linaro.org
----
- drivers/gpio/gpio-ath79.c           | 47 ++++++++++++++++++++++++++++++++++++-
- drivers/net/wireless/ath/ath9k/hw.c | 29 ++++++++++++-----------
- drivers/net/wireless/ath/ath9k/hw.h |  3 ++-
- 3 files changed, 63 insertions(+), 16 deletions(-)
-
-
----
-base-commit: 4cece764965020c22cff7665b18a012006359095
-change-id: 20240122-descriptors-wireless-b8da95dcab35
-
-Best regards,
-
---- a/drivers/gpio/gpio-ath79.c
-+++ b/drivers/gpio/gpio-ath79.c
-@@ -9,6 +9,7 @@
-  */
- 
- #include <linux/gpio/driver.h>
-+#include <linux/gpio/machine.h> /* For WLAN GPIOs */
- #include <linux/platform_device.h>
- #include <linux/platform_data/gpio-ath79.h>
- #include <linux/of.h>
-@@ -222,6 +223,37 @@ static const struct of_device_id ath79_g
- };
- MODULE_DEVICE_TABLE(of, ath79_gpio_of_match);
- 
-+/*
-+ * This registers all of the ath79k GPIOs as descriptors to be picked
-+ * directly from the ATH79K wifi driver if the two are jitted together
-+ * in the same SoC.
-+ */
-+#define ATH79K_WIFI_DESCS 32
-+static int ath79_gpio_register_wifi_descriptors(struct device *dev,
-+						const char *label)
-+{
-+	struct gpiod_lookup_table *lookup;
-+	int i;
-+
-+	/* Create a gpiod lookup using gpiochip-local offsets + 1 for NULL */
-+	lookup = devm_kzalloc(dev,
-+			      struct_size(lookup, table, ATH79K_WIFI_DESCS + 1),
-+			      GFP_KERNEL);
-+
-+	if (!lookup)
-+		return -ENOMEM;
-+
-+	for (i = 0; i < ATH79K_WIFI_DESCS; i++) {
-+		lookup->table[i] = (struct gpiod_lookup)
-+			GPIO_LOOKUP_IDX(label, i, "ath9k", i,
-+					GPIO_ACTIVE_HIGH);
-+	}
-+
-+	gpiod_add_lookup_table(lookup);
-+
-+	return 0;
-+}
-+
- static int ath79_gpio_probe(struct platform_device *pdev)
- {
- 	struct ath79_gpio_platform_data *pdata = dev_get_platdata(&pdev->dev);
-@@ -289,7 +321,11 @@ static int ath79_gpio_probe(struct platf
- 		girq->handler = handle_simple_irq;
- 	}
- 
--	return devm_gpiochip_add_data(dev, &ctrl->gc, ctrl);
-+	err = devm_gpiochip_add_data(dev, &ctrl->gc, ctrl);
-+	if (err)
-+		return err;
-+
-+	return ath79_gpio_register_wifi_descriptors(dev, ctrl->gc.label);
- }
- 
- static struct platform_driver ath79_gpio_driver = {
diff --git a/target/linux/ath79/patches-6.6/350-MIPS-ath79-ath9k-exports.patch b/target/linux/ath79/patches-6.6/350-MIPS-ath79-ath9k-exports.patch
deleted file mode 100644
index e460fe58f3..0000000000
--- a/target/linux/ath79/patches-6.6/350-MIPS-ath79-ath9k-exports.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From: John Crispin <john at phrozen.org>
-Subject: [PATCH] ath79: make ahb wifi work
-
-Submitted-by: John Crispin <john at phrozen.org>
----
- arch/mips/ath79/common.c                      | 3 +++
- mips/include/asm/mach-ath79/ath79.h           | 1+
- 1 file changed, 4 insertions(+)
-
---- a/arch/mips/ath79/common.c
-+++ b/arch/mips/ath79/common.c
-@@ -31,11 +31,13 @@ EXPORT_SYMBOL_GPL(ath79_ddr_freq);
- 
- enum ath79_soc_type ath79_soc;
- unsigned int ath79_soc_rev;
-+EXPORT_SYMBOL_GPL(ath79_soc_rev);
- 
- void __iomem *ath79_pll_base;
- void __iomem *ath79_reset_base;
- EXPORT_SYMBOL_GPL(ath79_reset_base);
--static void __iomem *ath79_ddr_base;
-+void __iomem *ath79_ddr_base;
-+EXPORT_SYMBOL_GPL(ath79_ddr_base);
- static void __iomem *ath79_ddr_wb_flush_base;
- static void __iomem *ath79_ddr_pci_win_base;
- 
---- a/arch/mips/include/asm/mach-ath79/ath79.h
-+++ b/arch/mips/include/asm/mach-ath79/ath79.h
-@@ -149,6 +149,7 @@ void ath79_ddr_wb_flush(unsigned int reg
- void ath79_ddr_set_pci_windows(void);
- 
- extern void __iomem *ath79_pll_base;
-+extern void __iomem *ath79_ddr_base;
- extern void __iomem *ath79_reset_base;
- 
- static inline void ath79_pll_wr(unsigned reg, u32 val)
diff --git a/target/linux/ath79/patches-6.6/351-MIPS-ath79-common-exports.patch b/target/linux/ath79/patches-6.6/351-MIPS-ath79-common-exports.patch
deleted file mode 100644
index befcf2d50f..0000000000
--- a/target/linux/ath79/patches-6.6/351-MIPS-ath79-common-exports.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From: Luiz Angelo Daros de Luca <luizluca at gmail.com>
-Subject: [PATCH] ath79: export ath79_pll_base
-
-This symbol is declared as extern but nobody exported it.
-Any module including arch/mips/include/asm/mach-ath79/ath79.h
-will not build. Without this export, ag71xx.ko will not build
-as a module and the build will fail like this:
-
-ERROR: modpost: "ath79_pll_base" [drivers/net/ethernet/atheros/ag71xx/ag71xx.ko] undefined!
-
-The ath79_pll_base symbol is accessed in the ath79_pll_wr() inline function.
-
----
- arch/mips/ath79/common.c                      | 1 +
- 1 file changed, 1 insertions(+)
-
---- a/arch/mips/ath79/common.c
-+++ b/arch/mips/ath79/common.c
-@@ -34,6 +34,7 @@ unsigned int ath79_soc_rev;
- EXPORT_SYMBOL_GPL(ath79_soc_rev);
- 
- void __iomem *ath79_pll_base;
-+EXPORT_SYMBOL_GPL(ath79_pll_base);
- void __iomem *ath79_reset_base;
- EXPORT_SYMBOL_GPL(ath79_reset_base);
- void __iomem *ath79_ddr_base;
diff --git a/target/linux/ath79/patches-6.6/360-MIPS-ath79-export-UART1-reference-clock.patch b/target/linux/ath79/patches-6.6/360-MIPS-ath79-export-UART1-reference-clock.patch
deleted file mode 100644
index ae2f5aa0cd..0000000000
--- a/target/linux/ath79/patches-6.6/360-MIPS-ath79-export-UART1-reference-clock.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From: Daniel Golle <daniel at makrotopia.org>
-Subject: [PATCH] ath79: add support for Atheros AR934x HS UART
-
-AR934x chips also got the 'old' qca,ar9330-uart in addition to the
-'new' ns16550a compatible one. Add support for UART1 clock selector as
-well as device-tree bindings in ar934x.dtsi to make use of that uart.
-
-Reported-by: Piotr Dymacz <pepe2k at gmail.com>
-Submitted-by: Daniel Golle <daniel at makrotopia.org>
----
- arch/mips/ath79/clock.c                       | 7 +++++++
- .../mips/include/asm/mach-ath79/ar71xx_regs.h | 1 +
- include/dt-bindings/clock/ath79-clk.h         | 3 ++-
- 3 files changed, 10 insertions(+), 1 deletion(-)
-
---- a/arch/mips/ath79/clock.c
-+++ b/arch/mips/ath79/clock.c
-@@ -40,6 +40,7 @@ static const char * const clk_names[ATH7
- 	[ATH79_CLK_AHB] = "ahb",
- 	[ATH79_CLK_REF] = "ref",
- 	[ATH79_CLK_MDIO] = "mdio",
-+	[ATH79_CLK_UART1] = "uart1",
- };
- 
- static const char * __init ath79_clk_name(int type)
-@@ -344,6 +345,9 @@ static void __init ar934x_clocks_init(vo
- 	if (clk_ctrl & AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL)
- 		ath79_set_clk(ATH79_CLK_MDIO, 100 * 1000 * 1000);
- 
-+	if (clk_ctrl & AR934X_PLL_SWITCH_CLOCK_CONTROL_UART1_CLK_SEL)
-+		ath79_set_clk(ATH79_CLK_UART1, 100 * 1000 * 1000);
-+
- 	iounmap(dpll_base);
- }
- 
-@@ -649,6 +653,9 @@ static void __init ath79_clocks_init_dt(
- 	if (!clks[ATH79_CLK_MDIO])
- 		clks[ATH79_CLK_MDIO] = clks[ATH79_CLK_REF];
- 
-+	if (!clks[ATH79_CLK_UART1])
-+		clks[ATH79_CLK_UART1] = clks[ATH79_CLK_REF];
-+
- 	if (of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data)) {
- 		pr_err("%pOF: could not register clk provider\n", np);
- 		goto err_iounmap;
---- a/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-+++ b/arch/mips/include/asm/mach-ath79/ar71xx_regs.h
-@@ -350,6 +350,7 @@
- #define AR934X_PLL_PCIE_CONFIG_PLL_PWD		BIT(30)
- 
- #define AR934X_PLL_SWITCH_CLOCK_CONTROL_MDIO_CLK_SEL	BIT(6)
-+#define AR934X_PLL_SWITCH_CLOCK_CONTROL_UART1_CLK_SEL	BIT(7)
- 
- #define QCA953X_PLL_CPU_CONFIG_REG		0x00
- #define QCA953X_PLL_DDR_CONFIG_REG		0x04
---- a/include/dt-bindings/clock/ath79-clk.h
-+++ b/include/dt-bindings/clock/ath79-clk.h
-@@ -11,7 +11,8 @@
- #define ATH79_CLK_AHB		2
- #define ATH79_CLK_REF		3
- #define ATH79_CLK_MDIO		4
-+#define ATH79_CLK_UART1		5
- 
--#define ATH79_CLK_END		5
-+#define ATH79_CLK_END		6
- 
- #endif /* __DT_BINDINGS_ATH79_CLK_H */
diff --git a/target/linux/ath79/patches-6.6/370-MIPS-ath79-sanitize-symbols.patch b/target/linux/ath79/patches-6.6/370-MIPS-ath79-sanitize-symbols.patch
deleted file mode 100644
index e6aeef5115..0000000000
--- a/target/linux/ath79/patches-6.6/370-MIPS-ath79-sanitize-symbols.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 3fc8585cf76022dba7496627074d42af88c30718 Mon Sep 17 00:00:00 2001
-From: John Crispin <john at phrozen.org>
-Date: Sat, 23 Jun 2018 15:16:55 +0200
-Subject: [PATCH 32/33] MIPS: ath79: sanitize symbols
-
-We no longer need to select which SoCs are supported as the whole arch
-code is always built. So lets drop all the SoC symbols
-
-Signed-off-by: John Crispin <john at phrozen.org>
----
- arch/mips/Kconfig       |  2 ++
- arch/mips/ath79/Kconfig | 44 +++++---------------------------------------
- arch/mips/pci/Makefile  |  2 +-
- 3 files changed, 8 insertions(+), 40 deletions(-)
-
---- a/arch/mips/Kconfig
-+++ b/arch/mips/Kconfig
-@@ -255,6 +255,8 @@ config ATH79
- 	select SYS_SUPPORTS_BIG_ENDIAN
- 	select SYS_SUPPORTS_MIPS16
- 	select SYS_SUPPORTS_ZBOOT_UART_PROM
-+	select HAVE_PCI
-+	select USB_ARCH_HAS_EHCI
- 	select USE_OF
- 	select USB_EHCI_ROOT_HUB_TT if USB_EHCI_HCD_PLATFORM
- 	help
---- a/arch/mips/ath79/Kconfig
-+++ b/arch/mips/ath79/Kconfig
-@@ -1,32 +1,14 @@
- # SPDX-License-Identifier: GPL-2.0
- if ATH79
- 
--config SOC_AR71XX
--	select HAVE_PCI
--	def_bool n
--
--config SOC_AR724X
--	select HAVE_PCI
--	select PCI_AR724X if PCI
--	def_bool n
--
--config SOC_AR913X
--	def_bool n
--
--config SOC_AR933X
--	def_bool n
--
--config SOC_AR934X
--	select HAVE_PCI
--	select PCI_AR724X if PCI
--	def_bool n
--
--config SOC_QCA955X
--	select HAVE_PCI
--	select PCI_AR724X if PCI
-+config PCI_AR71XX
-+	bool "PCI support for AR7100 type SoCs"
-+	depends on PCI
- 	def_bool n
- 
- config PCI_AR724X
-+	bool "PCI support for AR724x type SoCs"
-+	depends on PCI
- 	def_bool n
- 
- endif
---- a/arch/mips/pci/Makefile
-+++ b/arch/mips/pci/Makefile
-@@ -19,7 +19,7 @@ obj-$(CONFIG_BCM63XX)		+= pci-bcm63xx.o
- 					ops-bcm63xx.o
- obj-$(CONFIG_MIPS_ALCHEMY)	+= pci-alchemy.o
- obj-$(CONFIG_PCI_AR2315)	+= pci-ar2315.o
--obj-$(CONFIG_SOC_AR71XX)	+= pci-ar71xx.o
-+obj-$(CONFIG_PCI_AR71XX)	+= pci-ar71xx.o
- obj-$(CONFIG_PCI_AR724X)	+= pci-ar724x.o
- obj-$(CONFIG_PCI_XTALK_BRIDGE)	+= pci-xtalk-bridge.o
- #
diff --git a/target/linux/ath79/patches-6.6/400-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/ath79/patches-6.6/400-mtd-nor-support-mtd-name-from-device-tree.patch
deleted file mode 100644
index 62d402625d..0000000000
--- a/target/linux/ath79/patches-6.6/400-mtd-nor-support-mtd-name-from-device-tree.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From f32bc2aa01edcba2f2ed5db151cf183eac9ef919 Mon Sep 17 00:00:00 2001
-From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
-Date: Sat, 25 Feb 2017 16:42:50 +0000
-Subject: mtd: nor: support mtd name from device tree
-
-Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
----
- drivers/mtd/spi-nor/spi-nor.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
---- a/drivers/mtd/spi-nor/core.c
-+++ b/drivers/mtd/spi-nor/core.c
-@@ -3420,12 +3420,19 @@ static void spi_nor_set_mtd_info(struct
- {
- 	struct mtd_info *mtd = &nor->mtd;
- 	struct device *dev = nor->dev;
-+	struct device_node *np = spi_nor_get_flash_node(nor);
-+	const char __maybe_unused *of_mtd_name = NULL;
- 
- 	spi_nor_set_mtd_locking_ops(nor);
- 	spi_nor_set_mtd_otp_ops(nor);
- 
- 	mtd->dev.parent = dev;
--	if (!mtd->name)
-+#ifdef CONFIG_MTD_OF_PARTS
-+	of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
-+#endif
-+	if (of_mtd_name)
-+		mtd->name = of_mtd_name;
-+	else if (!mtd->name)
- 		mtd->name = dev_name(dev);
- 	mtd->type = MTD_NORFLASH;
- 	mtd->flags = MTD_CAP_NORFLASH;
---- a/drivers/mtd/mtdcore.c
-+++ b/drivers/mtd/mtdcore.c
-@@ -870,6 +870,17 @@ out_error:
-  */
- static void mtd_set_dev_defaults(struct mtd_info *mtd)
- {
-+#ifdef CONFIG_MTD_OF_PARTS
-+	const char __maybe_unused *of_mtd_name = NULL;
-+	struct device_node *np;
-+
-+	np = mtd_get_of_node(mtd);
-+	if (np && !mtd->name) {
-+		of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
-+		if (of_mtd_name)
-+			mtd->name = of_mtd_name;
-+	} else
-+#endif
- 	if (mtd->dev.parent) {
- 		if (!mtd->owner && mtd->dev.parent->driver)
- 			mtd->owner = mtd->dev.parent->driver->owner;
diff --git a/target/linux/ath79/patches-6.6/410-mtd-cybertan-trx-parser.patch b/target/linux/ath79/patches-6.6/410-mtd-cybertan-trx-parser.patch
deleted file mode 100644
index d0e8aec0d5..0000000000
--- a/target/linux/ath79/patches-6.6/410-mtd-cybertan-trx-parser.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From: Christian Lamparter <chunkeey at gmail.com>
-Subject: [PATCH] ath79: port cybertan_part from ar71xx
-
-This patch ports the cybertan_part code from ar71xx and converts the
-driver to a DT-supported mtd parser. As a result, it will no longer
-add the u-boot, nvram and art partitions, which were never part of
-the special Cybertan header.
-
-Instead these partitions have to be specified in the DT, which has the
-upside of making it possible to add properties (i.e.: read-only), labels
-and references to these important partitions.
-
-Submitted-by: Christian Lamparter <chunkeey at gmail.com>
----
- drivers/mtd/parsers/Makefile                  | 1 +
- drivers/mtd/parsers/Kconfig                   | 8 ++++++++
- 2 files changed, 9 insertions(+)
-
---- a/drivers/mtd/parsers/Makefile
-+++ b/drivers/mtd/parsers/Makefile
-@@ -9,6 +9,7 @@ obj-$(CONFIG_MTD_OF_PARTS)		+= ofpart.o
- ofpart-y				+= ofpart_core.o
- ofpart-$(CONFIG_MTD_OF_PARTS_BCM4908)	+= ofpart_bcm4908.o
- ofpart-$(CONFIG_MTD_OF_PARTS_LINKSYS_NS)+= ofpart_linksys_ns.o
-+obj-$(CONFIG_MTD_PARSER_CYBERTAN)	+= parser_cybertan.o
- obj-$(CONFIG_MTD_PARSER_IMAGETAG)	+= parser_imagetag.o
- obj-$(CONFIG_MTD_AFS_PARTS)		+= afs.o
- obj-$(CONFIG_MTD_PARSER_TPLINK_SAFELOADER)	+= tplink_safeloader.o
---- a/drivers/mtd/parsers/Kconfig
-+++ b/drivers/mtd/parsers/Kconfig
-@@ -112,6 +112,14 @@ config MTD_OF_PARTS_LINKSYS_NS
- 	  two "firmware" partitions. Currently used firmware has to be detected
- 	  using CFE environment variable.
- 
-+config MTD_PARSER_CYBERTAN
-+	tristate "Parser for Cybertan format partitions"
-+	depends on MTD && (ATH79 || COMPILE_TEST)
-+	help
-+	  Cybertan has a proprietory header than encompasses a Broadcom trx
-+	  header. This driver will parse the header and take care of the
-+	  special offsets that result in the extra headers.
-+
- config MTD_PARSER_IMAGETAG
- 	tristate "Parser for BCM963XX Image Tag format partitions"
- 	depends on BCM63XX || BMIPS_GENERIC || COMPILE_TEST
diff --git a/target/linux/ath79/patches-6.6/430-mtd-ar934x-nand-driver.patch b/target/linux/ath79/patches-6.6/430-mtd-ar934x-nand-driver.patch
deleted file mode 100644
index fc4c3804a7..0000000000
--- a/target/linux/ath79/patches-6.6/430-mtd-ar934x-nand-driver.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From: Gabor Juhos <juhosg at openwrt.org>
-Subject: ar71xx: ar934x_nfc: experimental NAND Flash Controller driver for AR934x
-
-SVN-Revision: 33385
----
- drivers/mtd/nand/raw/Kconfig                  | 8 ++++++++
- drivers/mtd/nand/raw/Makefile                 | 1 +
- 2 files changed, 9 insertions(+)
-
---- a/drivers/mtd/nand/raw/Kconfig
-+++ b/drivers/mtd/nand/raw/Kconfig
-@@ -542,4 +542,12 @@ config MTD_NAND_DISKONCHIP_BBTWRITE
- 	  load time (assuming you build diskonchip as a module) with the module
- 	  parameter "inftl_bbt_write=1".
- 
-+config MTD_NAND_AR934X
-+	tristate "Support for NAND controller on Qualcomm Atheros AR934x/QCA955x SoCs"
-+	depends on ATH79 || COMPILE_TEST
-+	depends on HAS_IOMEM
-+	help
-+	  Enables support for NAND controller on Qualcomm Atheros SoCs.
-+	  This controller is found on AR934x and QCA955x SoCs.
-+
- endif # MTD_RAW_NAND
---- a/drivers/mtd/nand/raw/Makefile
-+++ b/drivers/mtd/nand/raw/Makefile
-@@ -57,6 +57,7 @@ obj-$(CONFIG_MTD_NAND_INTEL_LGM)	+= inte
- obj-$(CONFIG_MTD_NAND_ROCKCHIP)		+= rockchip-nand-controller.o
- obj-$(CONFIG_MTD_NAND_PL35X)		+= pl35x-nand-controller.o
- obj-$(CONFIG_MTD_NAND_RENESAS)		+= renesas-nand-controller.o
-+obj-$(CONFIG_MTD_NAND_AR934X)		+= ar934x_nand.o
- 
- nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o
- nand-objs += nand_onfi.o
diff --git a/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch b/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch
deleted file mode 100644
index 1c1b2f2ca1..0000000000
--- a/target/linux/ath79/patches-6.6/700-phy-add-ath79-usb-phys.patch
+++ /dev/null
@@ -1,285 +0,0 @@
-From 08c9d6ceef01893678a5d2e8a15517c745417f21 Mon Sep 17 00:00:00 2001
-From: John Crispin <john at phrozen.org>
-Date: Tue, 6 Mar 2018 10:04:05 +0100
-Subject: [PATCH 04/27] phy: add ath79 usb phys
-
-Signed-off-by: John Crispin <john at phrozen.org>
----
- drivers/phy/Kconfig          |  16 ++++++
- drivers/phy/Makefile         |   2 +
- drivers/phy/phy-ar7100-usb.c | 124 +++++++++++++++++++++++++++++++++++++++++++
- drivers/phy/phy-ar7200-usb.c | 108 +++++++++++++++++++++++++++++++++++++
- 4 files changed, 250 insertions(+)
- create mode 100644 drivers/phy/phy-ar7100-usb.c
- create mode 100644 drivers/phy/phy-ar7200-usb.c
-
---- a/drivers/phy/Kconfig
-+++ b/drivers/phy/Kconfig
-@@ -25,6 +25,22 @@ config GENERIC_PHY_MIPI_DPHY
- 	  Provides a number of helpers a core functions for MIPI D-PHY
- 	  drivers to us.
- 
-+config PHY_AR7100_USB
-+	tristate "Atheros AR7100 USB PHY driver"
-+	depends on ATH79 || COMPILE_TEST
-+	default y if USB_EHCI_HCD_PLATFORM
-+	select GENERIC_PHY
-+	help
-+	  Enable this to support the USB PHY on Atheros AR7100 SoCs.
-+
-+config PHY_AR7200_USB
-+	tristate "Atheros AR7200 USB PHY driver"
-+	depends on ATH79 || COMPILE_TEST
-+	default y if USB_EHCI_HCD_PLATFORM
-+	select GENERIC_PHY
-+	help
-+	  Enable this to support the USB PHY on Atheros AR7200 SoCs.
-+
- config PHY_LPC18XX_USB_OTG
- 	tristate "NXP LPC18xx/43xx SoC USB OTG PHY driver"
- 	depends on OF && (ARCH_LPC18XX || COMPILE_TEST)
---- a/drivers/phy/Makefile
-+++ b/drivers/phy/Makefile
-@@ -4,6 +4,8 @@
- #
- 
- obj-$(CONFIG_GENERIC_PHY)		+= phy-core.o
-+obj-$(CONFIG_PHY_AR7100_USB)		+= phy-ar7100-usb.o
-+obj-$(CONFIG_PHY_AR7200_USB)		+= phy-ar7200-usb.o
- obj-$(CONFIG_GENERIC_PHY_MIPI_DPHY)	+= phy-core-mipi-dphy.o
- obj-$(CONFIG_PHY_CAN_TRANSCEIVER)	+= phy-can-transceiver.o
- obj-$(CONFIG_PHY_LPC18XX_USB_OTG)	+= phy-lpc18xx-usb-otg.o
---- /dev/null
-+++ b/drivers/phy/phy-ar7100-usb.c
-@@ -0,0 +1,117 @@
-+/*
-+ * Copyright (C) 2018 John Crispin <john at phrozen.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+#include <linux/phy/phy.h>
-+#include <linux/delay.h>
-+#include <linux/reset.h>
-+#include <linux/of_gpio.h>
-+
-+#include <asm/mach-ath79/ath79.h>
-+#include <asm/mach-ath79/ar71xx_regs.h>
-+
-+struct ar7100_usb_phy {
-+	struct reset_control	*rst_phy;
-+	struct reset_control	*rst_host;
-+	struct reset_control	*rst_ohci_dll;
-+	void __iomem		*io_base;
-+	struct phy		*phy;
-+	int			gpio;
-+};
-+
-+static int ar7100_usb_phy_power_off(struct phy *phy)
-+{
-+	struct ar7100_usb_phy *priv = phy_get_drvdata(phy);
-+	int err = 0;
-+
-+	err |= reset_control_assert(priv->rst_host);
-+	err |= reset_control_assert(priv->rst_phy);
-+	err |= reset_control_assert(priv->rst_ohci_dll);
-+
-+	return err;
-+}
-+
-+static int ar7100_usb_phy_power_on(struct phy *phy)
-+{
-+	struct ar7100_usb_phy *priv = phy_get_drvdata(phy);
-+	int err = 0;
-+
-+	err |= ar7100_usb_phy_power_off(phy);
-+	mdelay(100);
-+	err |= reset_control_deassert(priv->rst_ohci_dll);
-+	err |= reset_control_deassert(priv->rst_phy);
-+	err |= reset_control_deassert(priv->rst_host);
-+	mdelay(500);
-+	iowrite32(0xf0000, priv->io_base + AR71XX_USB_CTRL_REG_CONFIG);
-+	iowrite32(0x20c00, priv->io_base + AR71XX_USB_CTRL_REG_FLADJ);
-+
-+	return err;
-+}
-+
-+static const struct phy_ops ar7100_usb_phy_ops = {
-+	.power_on	= ar7100_usb_phy_power_on,
-+	.power_off	= ar7100_usb_phy_power_off,
-+	.owner		= THIS_MODULE,
-+};
-+
-+static int ar7100_usb_phy_probe(struct platform_device *pdev)
-+{
-+	struct phy_provider *phy_provider;
-+	struct ar7100_usb_phy *priv;
-+
-+	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
-+	if (!priv)
-+		return -ENOMEM;
-+
-+	priv->io_base = devm_platform_ioremap_resource(pdev, 0);
-+	if (IS_ERR(priv->io_base))
-+		return PTR_ERR(priv->io_base);
-+
-+	priv->rst_phy = devm_reset_control_get(&pdev->dev, "phy");
-+	if (IS_ERR(priv->rst_phy))
-+		return dev_err_probe(&pdev->dev, PTR_ERR(priv->rst_phy), "phy reset is missing");
-+
-+	priv->rst_host = devm_reset_control_get(&pdev->dev, "host");
-+	if (IS_ERR(priv->rst_host))
-+		return dev_err_probe(&pdev->dev, PTR_ERR(priv->rst_host), "host reset is missing");
-+
-+	priv->rst_ohci_dll = devm_reset_control_get(&pdev->dev, "usb-ohci-dll");
-+	if (IS_ERR(priv->rst_ohci_dll))
-+		return dev_err_probe(&pdev->dev, PTR_ERR(priv->rst_host), "ohci-dll reset is missing");
-+
-+	priv->phy = devm_phy_create(&pdev->dev, NULL, &ar7100_usb_phy_ops);
-+	if (IS_ERR(priv->phy))
-+		return dev_err_probe(&pdev->dev, PTR_ERR(priv->phy), "failed to create PHY");
-+
-+	phy_set_drvdata(priv->phy, priv);
-+
-+	phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate);
-+
-+	return PTR_ERR_OR_ZERO(phy_provider);
-+}
-+
-+static const struct of_device_id ar7100_usb_phy_of_match[] = {
-+	{ .compatible = "qca,ar7100-usb-phy" },
-+	{}
-+};
-+MODULE_DEVICE_TABLE(of, ar7100_usb_phy_of_match);
-+
-+static struct platform_driver ar7100_usb_phy_driver = {
-+	.probe	= ar7100_usb_phy_probe,
-+	.driver = {
-+		.of_match_table	= ar7100_usb_phy_of_match,
-+		.name		= "ar7100-usb-phy",
-+	}
-+};
-+module_platform_driver(ar7100_usb_phy_driver);
-+
-+MODULE_DESCRIPTION("ATH79 USB PHY driver");
-+MODULE_AUTHOR("Alban Bedel <albeu at free.fr>");
-+MODULE_LICENSE("GPL");
---- /dev/null
-+++ b/drivers/phy/phy-ar7200-usb.c
-@@ -0,0 +1,111 @@
-+/*
-+ * Copyright (C) 2015 Alban Bedel <albeu at free.fr>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+#include <linux/phy/phy.h>
-+#include <linux/reset.h>
-+#include <linux/of_gpio.h>
-+
-+struct ar7200_usb_phy {
-+	struct reset_control	*rst_phy;
-+	struct reset_control	*rst_phy_analog;
-+	struct reset_control	*suspend_override;
-+	struct phy		*phy;
-+	int			gpio;
-+};
-+
-+static int ar7200_usb_phy_power_on(struct phy *phy)
-+{
-+	struct ar7200_usb_phy *priv = phy_get_drvdata(phy);
-+	int err = 0;
-+
-+	if (priv->suspend_override)
-+		err = reset_control_assert(priv->suspend_override);
-+	if (priv->rst_phy)
-+		err |= reset_control_deassert(priv->rst_phy);
-+	if (priv->rst_phy_analog)
-+		err |= reset_control_deassert(priv->rst_phy_analog);
-+
-+	return err;
-+}
-+
-+static int ar7200_usb_phy_power_off(struct phy *phy)
-+{
-+	struct ar7200_usb_phy *priv = phy_get_drvdata(phy);
-+	int err = 0;
-+
-+	if (priv->suspend_override)
-+		err = reset_control_deassert(priv->suspend_override);
-+	if (priv->rst_phy)
-+		err |= reset_control_assert(priv->rst_phy);
-+	if (priv->rst_phy_analog)
-+		err |= reset_control_assert(priv->rst_phy_analog);
-+
-+	return err;
-+}
-+
-+static const struct phy_ops ar7200_usb_phy_ops = {
-+	.power_on	= ar7200_usb_phy_power_on,
-+	.power_off	= ar7200_usb_phy_power_off,
-+	.owner		= THIS_MODULE,
-+};
-+
-+static int ar7200_usb_phy_probe(struct platform_device *pdev)
-+{
-+	struct phy_provider *phy_provider;
-+	struct ar7200_usb_phy *priv;
-+
-+	priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
-+	if (!priv)
-+		return -ENOMEM;
-+
-+	priv->rst_phy = devm_reset_control_get(&pdev->dev, "phy");
-+	if (IS_ERR(priv->rst_phy))
-+		return dev_err_probe(&pdev->dev, PTR_ERR(priv->rst_phy), "phy reset is missing");
-+
-+	priv->rst_phy_analog = devm_reset_control_get_optional(
-+		&pdev->dev, "phy-analog");
-+	if (IS_ERR(priv->rst_phy_analog))
-+		return PTR_ERR(priv->rst_phy_analog);
-+
-+	priv->suspend_override = devm_reset_control_get_optional(
-+		&pdev->dev, "suspend-override");
-+	if (IS_ERR(priv->suspend_override))
-+		return PTR_ERR(priv->suspend_override);
-+
-+	priv->phy = devm_phy_create(&pdev->dev, NULL, &ar7200_usb_phy_ops);
-+	if (IS_ERR(priv->phy))
-+		return dev_err_probe(&pdev->dev, PTR_ERR(priv->phy), "failed to create PHY");
-+
-+	phy_set_drvdata(priv->phy, priv);
-+
-+	phy_provider = devm_of_phy_provider_register(&pdev->dev, of_phy_simple_xlate);
-+
-+	return PTR_ERR_OR_ZERO(phy_provider);
-+}
-+
-+static const struct of_device_id ar7200_usb_phy_of_match[] = {
-+	{ .compatible = "qca,ar7200-usb-phy" },
-+	{}
-+};
-+MODULE_DEVICE_TABLE(of, ar7200_usb_phy_of_match);
-+
-+static struct platform_driver ar7200_usb_phy_driver = {
-+	.probe	= ar7200_usb_phy_probe,
-+	.driver = {
-+		.of_match_table	= ar7200_usb_phy_of_match,
-+		.name		= "ar7200-usb-phy",
-+	}
-+};
-+module_platform_driver(ar7200_usb_phy_driver);
-+
-+MODULE_DESCRIPTION("ATH79 USB PHY driver");
-+MODULE_AUTHOR("Alban Bedel <albeu at free.fr>");
-+MODULE_LICENSE("GPL");
diff --git a/target/linux/ath79/patches-6.6/701-usb-add-more-OF-quirk-properties.patch b/target/linux/ath79/patches-6.6/701-usb-add-more-OF-quirk-properties.patch
deleted file mode 100644
index 293a359884..0000000000
--- a/target/linux/ath79/patches-6.6/701-usb-add-more-OF-quirk-properties.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 2201818e5bd33f389beceb3943fdfcf5a698fc5b Mon Sep 17 00:00:00 2001
-From: John Crispin <john at phrozen.org>
-Date: Tue, 6 Mar 2018 10:01:43 +0100
-Subject: [PATCH 05/27] usb: add more OF/quirk properties
-
-Signed-off-by: John Crispin <john at phrozen.org>
----
- drivers/usb/host/ehci-platform.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
---- a/drivers/usb/host/ehci-platform.c
-+++ b/drivers/usb/host/ehci-platform.c
-@@ -274,6 +274,11 @@ static int ehci_platform_probe(struct pl
- 	ehci = hcd_to_ehci(hcd);
- 
- 	if (pdata == &ehci_platform_defaults && dev->dev.of_node) {
-+		of_property_read_u32(dev->dev.of_node, "caps-offset", &pdata->caps_offset);
-+
-+		if (of_property_read_bool(dev->dev.of_node, "has-synopsys-hc-bug"))
-+			pdata->has_synopsys_hc_bug = 1;
-+
- 		if (of_property_read_bool(dev->dev.of_node, "big-endian-regs"))
- 			ehci->big_endian_mmio = 1;
- 
diff --git a/target/linux/ath79/patches-6.6/710-net-use-downstream-ag71xx.patch b/target/linux/ath79/patches-6.6/710-net-use-downstream-ag71xx.patch
deleted file mode 100644
index 0997aa1ab8..0000000000
--- a/target/linux/ath79/patches-6.6/710-net-use-downstream-ag71xx.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From: John Crispin <john at phrozen.org>
-Subject: [PATCH] ath79: add new OF only target for QCA MIPS silicon
-
-This target aims to replace ar71xx mid-term. The big part that is still
-missing is making the MMIO/AHB wifi work using OF. NAND and mikrotik
-subtargets will follow.
-
-Submitted-by: John Crispin <john at phrozen.org>
----
- drivers/net/ethernet/atheros/Kconfig          | 8 +-------
- drivers/net/ethernet/atheros/Makefile         | 2 +-
- 2 files changed, 2 insertions(+), 8 deletions(-)
-
---- a/drivers/net/ethernet/atheros/Kconfig
-+++ b/drivers/net/ethernet/atheros/Kconfig
-@@ -26,6 +26,8 @@ config AG71XX
- 	  If you wish to compile a kernel for AR7XXX/91XXX and enable
- 	  ethernet support, then you should always answer Y to this.
- 
-+source "drivers/net/ethernet/atheros/ag71xx/Kconfig"
-+
- config ATL2
- 	tristate "Atheros L2 Fast Ethernet support"
- 	depends on PCI
---- a/drivers/net/ethernet/atheros/Makefile
-+++ b/drivers/net/ethernet/atheros/Makefile
-@@ -4,6 +4,7 @@
- #
- 
- obj-$(CONFIG_AG71XX) += ag71xx.o
-+obj-$(CONFIG_AG71XX_LEGACY) += ag71xx/
- obj-$(CONFIG_ATL1) += atlx/
- obj-$(CONFIG_ATL2) += atlx/
- obj-$(CONFIG_ATL1E) += atl1e/
diff --git a/target/linux/ath79/patches-6.6/720-mdio_bitbang_ignore_ta_value.patch b/target/linux/ath79/patches-6.6/720-mdio_bitbang_ignore_ta_value.patch
deleted file mode 100644
index ce6b16c34e..0000000000
--- a/target/linux/ath79/patches-6.6/720-mdio_bitbang_ignore_ta_value.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From: Jonas Gorski <jogo at openwrt.org>
-Subject: ar71xx: add a workaround for ar8316 not always driving the TA bit to low
-
-AR8316 behind a GPIO bitbanged MDIO bus fails to drive the turnaround bit
-to low despite returning a valid value. Ignore it and just use the
-returned value anyway.
-
-SVN-Revision: 28422
----
- drivers/net/mdio/mdio-bitbang.c               | 16 ++-----------------
- 1 file changed, 2 insertions(+), 14 deletions(-)
-
---- a/drivers/net/mdio/mdio-bitbang.c
-+++ b/drivers/net/mdio/mdio-bitbang.c
-@@ -148,23 +148,11 @@ static void mdiobb_cmd_addr(struct mdiob
- static int mdiobb_read_common(struct mii_bus *bus, int phy)
- {
- 	struct mdiobb_ctrl *ctrl = bus->priv;
--	int ret, i;
-+	int ret;
- 
- 	ctrl->ops->set_mdio_dir(ctrl, 0);
- 
--	/* check the turnaround bit: the PHY should be driving it to zero, if this
--	 * PHY is listed in phy_ignore_ta_mask as having broken TA, skip that
--	 */
--	if (mdiobb_get_bit(ctrl) != 0 &&
--	    !(bus->phy_ignore_ta_mask & (1 << phy))) {
--		/* PHY didn't drive TA low -- flush any bits it
--		 * may be trying to send.
--		 */
--		for (i = 0; i < 32; i++)
--			mdiobb_get_bit(ctrl);
--
--		return 0xffff;
--	}
-+	mdiobb_get_bit(ctrl);
- 
- 	ret = mdiobb_get_num(ctrl, 16);
- 	mdiobb_get_bit(ctrl);
diff --git a/target/linux/ath79/patches-6.6/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch b/target/linux/ath79/patches-6.6/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch
deleted file mode 100644
index 26c40e132b..0000000000
--- a/target/linux/ath79/patches-6.6/721-phy-mdio-bitbang-prevent-rescheduling-during-command.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From 66e584435ac0de6e0abeb6d7166fe4fe25d6bb73 Mon Sep 17 00:00:00 2001
-From: Jonas Gorski <jogo at openwrt.org>
-Date: Tue, 16 Jun 2015 13:15:08 +0200
-Subject: [PATCH] phy/mdio-bitbang: prevent rescheduling during command
-
-It seems some phys have some maximum timings for accessing the MDIO line,
-resulting in bit errors under cpu stress. Prevent this from happening by
-disabling interrupts when sending commands.
-
-Signed-off-by: Jonas Gorski <jogo at openwrt.org>
----
- drivers/net/mdio/mdio-bitbang.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
---- a/drivers/net/mdio/mdio-bitbang.c
-+++ b/drivers/net/mdio/mdio-bitbang.c
-@@ -14,6 +14,7 @@
-  * Vitaly Bordug <vbordug at ru.mvista.com>
-  */
- 
-+#include <linux/irqflags.h>
- #include <linux/delay.h>
- #include <linux/mdio-bitbang.h>
- #include <linux/module.h>
-@@ -161,22 +162,32 @@ static int mdiobb_read_common(struct mii
- 
- int mdiobb_read_c22(struct mii_bus *bus, int phy, int reg)
- {
-+	int ret;
-+	unsigned long flags;
- 	struct mdiobb_ctrl *ctrl = bus->priv;
- 
-+	local_irq_save(flags);
- 	mdiobb_cmd(ctrl, ctrl->op_c22_read, phy, reg);
- 
--	return mdiobb_read_common(bus, phy);
-+	ret = mdiobb_read_common(bus, phy);
-+	local_irq_restore(flags);
-+	return ret;
- }
- EXPORT_SYMBOL(mdiobb_read_c22);
- 
- int mdiobb_read_c45(struct mii_bus *bus, int phy, int devad, int reg)
- {
-+	int ret;
-+	unsigned long flags;
- 	struct mdiobb_ctrl *ctrl = bus->priv;
- 
-+	local_irq_save(flags);
- 	mdiobb_cmd_addr(ctrl, phy, devad, reg);
- 	mdiobb_cmd(ctrl, MDIO_C45_READ, phy, devad);
- 
--	return mdiobb_read_common(bus, phy);
-+	ret = mdiobb_read_common(bus, phy);
-+	local_irq_restore(flags);
-+	return ret;
- }
- EXPORT_SYMBOL(mdiobb_read_c45);
- 
-@@ -197,22 +208,32 @@ static int mdiobb_write_common(struct mi
- 
- int mdiobb_write_c22(struct mii_bus *bus, int phy, int reg, u16 val)
- {
-+	int ret;
-+	unsigned long flags;
- 	struct mdiobb_ctrl *ctrl = bus->priv;
- 
-+	local_irq_save(flags);
- 	mdiobb_cmd(ctrl, ctrl->op_c22_write, phy, reg);
- 
--	return mdiobb_write_common(bus, val);
-+	ret = mdiobb_write_common(bus, val);
-+	local_irq_restore(flags);
-+	return ret;
- }
- EXPORT_SYMBOL(mdiobb_write_c22);
- 
- int mdiobb_write_c45(struct mii_bus *bus, int phy, int devad, int reg, u16 val)
- {
-+	int ret;
-+	unsigned long flags;
- 	struct mdiobb_ctrl *ctrl = bus->priv;
- 
-+	local_irq_save(flags);
- 	mdiobb_cmd_addr(ctrl, phy, devad, reg);
- 	mdiobb_cmd(ctrl, MDIO_C45_WRITE, phy, devad);
- 
--	return mdiobb_write_common(bus, val);
-+	ret = mdiobb_write_common(bus, val);
-+	local_irq_restore(flags);
-+	return ret;
- }
- EXPORT_SYMBOL(mdiobb_write_c45);
- 
diff --git a/target/linux/ath79/patches-6.6/730-ar8216-make-reg-access-atomic.patch b/target/linux/ath79/patches-6.6/730-ar8216-make-reg-access-atomic.patch
deleted file mode 100644
index 16d9005699..0000000000
--- a/target/linux/ath79/patches-6.6/730-ar8216-make-reg-access-atomic.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From b3797d1a92afe97c173b00fdb7824cedba24eef0 Mon Sep 17 00:00:00 2001
-From: Chuanhong Guo <gch981213 at gmail.com>
-Date: Sun, 20 Sep 2020 01:00:45 +0800
-Subject: [PATCH] ath79: ar8216: make switch register access atomic
-
-due to some unknown reason these register accesses sometimes fail
-on the integrated switch without this patch.
-
-THIS ONLY WORKS ON ATH79 AND MAY BREAK THE DRIVER ON OTHER PLATFORMS!
-The mdio bus on ath79 works in polling mode and doesn't rely on
-any interrupt. This patch breaks the driver on any mdio master
-with interrupts used.
-
----
---- a/drivers/net/phy/ar8216.c
-+++ b/drivers/net/phy/ar8216.c
-@@ -251,6 +251,7 @@ ar8xxx_mii_write32(struct ar8xxx_priv *p
- u32
- ar8xxx_read(struct ar8xxx_priv *priv, int reg)
- {
-+	unsigned long flags;
- 	struct mii_bus *bus = priv->mii_bus;
- 	u16 r1, r2, page;
- 	u32 val;
-@@ -258,11 +259,13 @@ ar8xxx_read(struct ar8xxx_priv *priv, in
- 	split_addr((u32) reg, &r1, &r2, &page);
- 
- 	mutex_lock(&bus->mdio_lock);
-+	local_irq_save(flags);
- 
- 	bus->write(bus, 0x18, 0, page);
- 	wait_for_page_switch();
- 	val = ar8xxx_mii_read32(priv, 0x10 | r2, r1);
- 
-+	local_irq_restore(flags);
- 	mutex_unlock(&bus->mdio_lock);
- 
- 	return val;
-@@ -271,17 +274,20 @@ ar8xxx_read(struct ar8xxx_priv *priv, in
- void
- ar8xxx_write(struct ar8xxx_priv *priv, int reg, u32 val)
- {
-+	unsigned long flags;
- 	struct mii_bus *bus = priv->mii_bus;
- 	u16 r1, r2, page;
- 
- 	split_addr((u32) reg, &r1, &r2, &page);
- 
- 	mutex_lock(&bus->mdio_lock);
-+	local_irq_save(flags);
- 
- 	bus->write(bus, 0x18, 0, page);
- 	wait_for_page_switch();
- 	ar8xxx_mii_write32(priv, 0x10 | r2, r1, val);
- 
-+	local_irq_restore(flags);
- 	mutex_unlock(&bus->mdio_lock);
- }
- 
diff --git a/target/linux/ath79/patches-6.6/800-leds-add-reset-controller-based-driver.patch b/target/linux/ath79/patches-6.6/800-leds-add-reset-controller-based-driver.patch
deleted file mode 100644
index e84cc00f4b..0000000000
--- a/target/linux/ath79/patches-6.6/800-leds-add-reset-controller-based-driver.patch
+++ /dev/null
@@ -1,186 +0,0 @@
-From ecbd9c87f073f097d9fe56390353e64e963e866a Mon Sep 17 00:00:00 2001
-From: John Crispin <john at phrozen.org>
-Date: Tue, 6 Mar 2018 10:03:03 +0100
-Subject: [PATCH 03/27] leds: add reset-controller based driver
-
-Signed-off-by: John Crispin <john at phrozen.org>
----
- drivers/leds/Kconfig      |  11 ++++
- drivers/leds/Makefile     |   1 +
- drivers/leds/leds-reset.c | 137 ++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 149 insertions(+)
- create mode 100644 drivers/leds/leds-reset.c
-
---- a/drivers/leds/Kconfig
-+++ b/drivers/leds/Kconfig
-@@ -911,6 +911,17 @@ source "drivers/leds/flash/Kconfig"
- comment "RGB LED drivers"
- source "drivers/leds/rgb/Kconfig"
- 
-+config LEDS_RESET
-+	tristate "LED support for reset-controller API"
-+	depends on LEDS_CLASS
-+	depends on RESET_CONTROLLER
-+	help
-+	  This option enables support for LEDs connected to pins driven by reset
-+	  controllers. Yes, DNI actual built HW like that.
-+
-+	  To compile this driver as a module, choose M here: the module
-+	  will be called leds-reset.
-+
- comment "LED Triggers"
- source "drivers/leds/trigger/Kconfig"
- 
---- /dev/null
-+++ b/drivers/leds/leds-reset.c
-@@ -0,0 +1,140 @@
-+/*
-+ * Copyright (C) 2018 John Crispin <john at phrozen.org>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ */
-+#include <linux/err.h>
-+#include <linux/reset.h>
-+#include <linux/kernel.h>
-+#include <linux/leds.h>
-+#include <linux/module.h>
-+#include <linux/of.h>
-+#include <linux/platform_device.h>
-+#include <linux/reset.h>
-+
-+struct reset_led_data {
-+	struct led_classdev cdev;
-+	struct reset_control *rst;
-+};
-+
-+static inline struct reset_led_data *
-+			cdev_to_reset_led_data(struct led_classdev *led_cdev)
-+{
-+	return container_of(led_cdev, struct reset_led_data, cdev);
-+}
-+
-+static void reset_led_set(struct led_classdev *led_cdev,
-+	enum led_brightness value)
-+{
-+	struct reset_led_data *led_dat = cdev_to_reset_led_data(led_cdev);
-+
-+	if (value == LED_OFF)
-+		reset_control_assert(led_dat->rst);
-+	else
-+		reset_control_deassert(led_dat->rst);
-+}
-+
-+struct reset_leds_priv {
-+	int num_leds;
-+	struct reset_led_data leds[];
-+};
-+
-+static inline int sizeof_reset_leds_priv(int num_leds)
-+{
-+	return sizeof(struct reset_leds_priv) +
-+		(sizeof(struct reset_led_data) * num_leds);
-+}
-+
-+static struct reset_leds_priv *reset_leds_create(struct platform_device *pdev)
-+{
-+	struct device *dev = &pdev->dev;
-+	struct fwnode_handle *child;
-+	struct reset_leds_priv *priv;
-+	int count, ret;
-+
-+	count = device_get_child_node_count(dev);
-+	if (!count)
-+		return ERR_PTR(-ENODEV);
-+
-+	priv = devm_kzalloc(dev, sizeof_reset_leds_priv(count), GFP_KERNEL);
-+	if (!priv)
-+		return ERR_PTR(-ENOMEM);
-+
-+	device_for_each_child_node(dev, child) {
-+		struct reset_led_data *led = &priv->leds[priv->num_leds];
-+		struct device_node *np = to_of_node(child);
-+
-+		ret = fwnode_property_read_string(child, "label", &led->cdev.name);
-+		if (!led->cdev.name) {
-+			fwnode_handle_put(child);
-+			return ERR_PTR(-EINVAL);
-+		}
-+		led->rst = __of_reset_control_get(np, NULL, 0, 0, 0, true);
-+		if (IS_ERR(led->rst))
-+			return ERR_PTR(-EINVAL);
-+
-+		fwnode_property_read_string(child, "linux,default-trigger",
-+						&led->cdev.default_trigger);
-+
-+		led->cdev.brightness_set = reset_led_set;
-+		ret = devm_led_classdev_register(&pdev->dev, &led->cdev);
-+		if (ret < 0)
-+			return ERR_PTR(ret);
-+		led->cdev.dev->of_node = np;
-+		priv->num_leds++;
-+	}
-+
-+	return priv;
-+}
-+
-+static const struct of_device_id of_reset_leds_match[] = {
-+	{ .compatible = "reset-leds", },
-+	{},
-+};
-+
-+MODULE_DEVICE_TABLE(of, of_reset_leds_match);
-+
-+static int reset_led_probe(struct platform_device *pdev)
-+{
-+	struct reset_leds_priv *priv;
-+
-+	priv = reset_leds_create(pdev);
-+	if (IS_ERR(priv))
-+		return PTR_ERR(priv);
-+
-+	platform_set_drvdata(pdev, priv);
-+
-+	return 0;
-+}
-+
-+static void reset_led_shutdown(struct platform_device *pdev)
-+{
-+	struct reset_leds_priv *priv = platform_get_drvdata(pdev);
-+	int i;
-+
-+	for (i = 0; i < priv->num_leds; i++) {
-+		struct reset_led_data *led = &priv->leds[i];
-+
-+		if (!(led->cdev.flags & LED_RETAIN_AT_SHUTDOWN))
-+			reset_led_set(&led->cdev, LED_OFF);
-+	}
-+}
-+
-+static struct platform_driver reset_led_driver = {
-+	.probe		= reset_led_probe,
-+	.shutdown	= reset_led_shutdown,
-+	.driver		= {
-+		.name	= "leds-reset",
-+		.of_match_table = of_reset_leds_match,
-+	},
-+};
-+
-+module_platform_driver(reset_led_driver);
-+
-+MODULE_AUTHOR("John Crispin <john at phrozen.org>");
-+MODULE_DESCRIPTION("reset controller LED driver");
-+MODULE_LICENSE("GPL");
-+MODULE_ALIAS("platform:leds-reset");
---- a/drivers/leds/Makefile
-+++ b/drivers/leds/Makefile
-@@ -89,6 +89,7 @@ obj-$(CONFIG_LEDS_TURRIS_OMNIA)		+= leds
- obj-$(CONFIG_LEDS_WM831X_STATUS)	+= leds-wm831x-status.o
- obj-$(CONFIG_LEDS_WM8350)		+= leds-wm8350.o
- obj-$(CONFIG_LEDS_WRAP)			+= leds-wrap.o
-+obj-$(CONFIG_LEDS_RESET)		+= leds-reset.o
- 
- # LED SPI Drivers
- obj-$(CONFIG_LEDS_CR0014114)		+= leds-cr0014114.o
diff --git a/target/linux/ath79/patches-6.6/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch b/target/linux/ath79/patches-6.6/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch
deleted file mode 100644
index b53461e37f..0000000000
--- a/target/linux/ath79/patches-6.6/810-ath79-ignore-the-abused-interrupt-map-on-pcie-node.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Wed, 31 May 2023 00:15:23 +0000
-Subject: [PATCH] ath79: ignore the abused interrupt-map on pcie node
-
-ath79 PCIe interrupt controller has stopped working correctly. This
-is because the DT exposing a non-sensical interrupt-map property,
-and their drivers relying on the kernel ignoring this property[1].
-
-This patch fix the pcie init error:
-ath9k 0000:00:00.0: of_irq_parse_pci: failed with rc=-14
-
-Notice:
-This is just a workaround, not a fix. PCIe driver and related dts
-node need to be rewritten.
-
-[1] https://lore.kernel.org/all/20211201114102.13446-1-maz at kernel.org/
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
----
- drivers/of/irq.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/drivers/of/irq.c
-+++ b/drivers/of/irq.c
-@@ -94,6 +94,8 @@ EXPORT_SYMBOL_GPL(of_irq_find_parent);
-  * drawing board.
-  */
- static const char * const of_irq_imap_abusers[] = {
-+	"qca,ar7100-pci",
-+	"qcom,ar7240-pci",
- 	"CBEA,platform-spider-pic",
- 	"sti,platform-spider-pic",
- 	"realtek,rtl-intc",
diff --git a/target/linux/ath79/patches-6.6/820-mfd-syscon-support-skip-reset-control-for-syscon-devices.patch b/target/linux/ath79/patches-6.6/820-mfd-syscon-support-skip-reset-control-for-syscon-devices.patch
deleted file mode 100644
index 3bdc2faf3f..0000000000
--- a/target/linux/ath79/patches-6.6/820-mfd-syscon-support-skip-reset-control-for-syscon-devices.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Wed, 13 Mar 2024 22:36:31 +0800
-Subject: [PATCH] mfd: syscon: support skip reset control for syscon devices
-
-Some platform device drivers(e.g. ag71xx) expect exclusive reset
-control. Fetching reset controller for syscon[1] will break these
-drivers. This patch introduces a new property 'syscon-no-reset'
-to skip it.
-
-[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit?id=7d1e3bd94828ad9fc86f55253cd6fec8edd65394
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
----
- drivers/mfd/syscon.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/drivers/mfd/syscon.c
-+++ b/drivers/mfd/syscon.c
-@@ -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;
- 
- 	WARN_ON(!mutex_is_locked(&syscon_list_lock));
- 
-@@ -133,7 +133,8 @@ static struct syscon *of_syscon_register
- 				goto err_attach_clk;
- 		}
- 
--		reset = of_reset_control_get_optional_exclusive(np, NULL);
-+		if (!of_property_read_bool(np, "syscon-no-reset"))
-+			reset = of_reset_control_get_optional_exclusive(np, NULL);
- 		if (IS_ERR(reset)) {
- 			ret = PTR_ERR(reset);
- 			goto err_attach_clk;
diff --git a/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch
deleted file mode 100644
index 9168d5e973..0000000000
--- a/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch
+++ /dev/null
@@ -1,909 +0,0 @@
-From: Felix Fietkau <nbd at openwrt.org>
-Subject: [PATCH] ar71xx: fix unaligned access in a few more places
-
-SVN-Revision: 35130
----
- arch/mips/include/asm/checksum.h              | 83 +++---------------
- include/uapi/linux/ip.h                       |  2 +-
- include/uapi/linux/ipv6.h                     |  2 +-
- include/uapi/linux/tcp.h                      |  4 ++--
- include/uapi/linux/udp.h                      |  2 +-
- net/netfilter/nf_conntrack_core.c             |  4 ++--
- include/uapi/linux/icmp.h                     |  2 +-
- include/uapi/linux/in6.h                      |  2 +-
- net/ipv6/tcp_ipv6.c                           |  9 +++--
- net/ipv6/datagram.c                           |  6 ++--
- net/ipv6/exthdrs.c                            |  2 +-
- include/linux/types.h                         |  5 +++
- net/ipv4/af_inet.c                            |  4 ++--
- net/ipv4/tcp_output.c                         | 69 +++++++++--------
- include/uapi/linux/igmp.h                     |  8 +++---
- net/core/flow_dissector.c                     |  2 +-
- include/uapi/linux/icmpv6.h                   |  2 +-
- include/net/ndisc.h                           | 10 ++++----
- net/sched/cls_u32.c                           |  6 +++---
- net/ipv6/ip6_offload.c                        |  2 +-
- include/net/addrconf.h                        |  2 +-
- include/net/inet_ecn.h                        |  4 ++--
- include/net/ipv6.h                            | 23 +++++----
- include/net/secure_seq.h                      |  1 +
- include/uapi/linux/in.h                       |  2 +-
- net/ipv6/ip6_fib.h                            |  2 +-
- net/netfilter/nf_conntrack_proto_tcp.c        |  2 +-
- net/xfrm/xfrm_input.c                         |  4 ++--
- net/ipv4/tcp_input.c                          | 12 ++++---
- include/uapi/linux/if_pppox.h                 |  1 +
- net/ipv6/netfilter/nf_log_ipv6.c              |  4 ++--
- include/net/neighbour.h                       |  6 +++--
- include/uapi/linux/netfilter_arp/arp_tables.h |  2 +-
- net/core/utils.c                              | 10 +++++--
- include/linux/etherdevice.h                   | 11 ++++---
- net/ipv4/tcp_offload.c                        |  6 +++---
- net/ipv6/netfilter/ip6table_mangle.c          |  4 ++--
- 37 file changed, 171 insertions(+), 141 deletions(-)
-
---- a/arch/mips/include/asm/checksum.h
-+++ b/arch/mips/include/asm/checksum.h
-@@ -100,26 +100,30 @@ static inline __sum16 ip_fast_csum(const
- 	const unsigned int *stop = word + ihl;
- 	unsigned int csum;
- 	int carry;
-+	unsigned int w;
- 
--	csum = word[0];
--	csum += word[1];
--	carry = (csum < word[1]);
-+	csum = net_hdr_word(word++);
-+
-+	w = net_hdr_word(word++);
-+	csum += w;
-+	carry = (csum < w);
- 	csum += carry;
- 
--	csum += word[2];
--	carry = (csum < word[2]);
-+	w = net_hdr_word(word++);
-+	csum += w;
-+	carry = (csum < w);
- 	csum += carry;
- 
--	csum += word[3];
--	carry = (csum < word[3]);
-+	w = net_hdr_word(word++);
-+	csum += w;
-+	carry = (csum < w);
- 	csum += carry;
- 
--	word += 4;
- 	do {
--		csum += *word;
--		carry = (csum < *word);
-+		w = net_hdr_word(word++);
-+		csum += w;
-+		carry = (csum < w);
- 		csum += carry;
--		word++;
- 	} while (word != stop);
- 
- 	return csum_fold(csum);
-@@ -179,74 +183,6 @@ static inline __sum16 ip_compute_csum(co
- 	return csum_fold(csum_partial(buff, len, 0));
- }
- 
--#define _HAVE_ARCH_IPV6_CSUM
--static __inline__ __sum16 csum_ipv6_magic(const struct in6_addr *saddr,
--					  const struct in6_addr *daddr,
--					  __u32 len, __u8 proto,
--					  __wsum sum)
--{
--	__wsum tmp;
--
--	__asm__(
--	"	.set	push		# csum_ipv6_magic\n"
--	"	.set	noreorder	\n"
--	"	.set	noat		\n"
--	"	addu	%0, %5		# proto (long in network byte order)\n"
--	"	sltu	$1, %0, %5	\n"
--	"	addu	%0, $1		\n"
--
--	"	addu	%0, %6		# csum\n"
--	"	sltu	$1, %0, %6	\n"
--	"	lw	%1, 0(%2)	# four words source address\n"
--	"	addu	%0, $1		\n"
--	"	addu	%0, %1		\n"
--	"	sltu	$1, %0, %1	\n"
--
--	"	lw	%1, 4(%2)	\n"
--	"	addu	%0, $1		\n"
--	"	addu	%0, %1		\n"
--	"	sltu	$1, %0, %1	\n"
--
--	"	lw	%1, 8(%2)	\n"
--	"	addu	%0, $1		\n"
--	"	addu	%0, %1		\n"
--	"	sltu	$1, %0, %1	\n"
--
--	"	lw	%1, 12(%2)	\n"
--	"	addu	%0, $1		\n"
--	"	addu	%0, %1		\n"
--	"	sltu	$1, %0, %1	\n"
--
--	"	lw	%1, 0(%3)	\n"
--	"	addu	%0, $1		\n"
--	"	addu	%0, %1		\n"
--	"	sltu	$1, %0, %1	\n"
--
--	"	lw	%1, 4(%3)	\n"
--	"	addu	%0, $1		\n"
--	"	addu	%0, %1		\n"
--	"	sltu	$1, %0, %1	\n"
--
--	"	lw	%1, 8(%3)	\n"
--	"	addu	%0, $1		\n"
--	"	addu	%0, %1		\n"
--	"	sltu	$1, %0, %1	\n"
--
--	"	lw	%1, 12(%3)	\n"
--	"	addu	%0, $1		\n"
--	"	addu	%0, %1		\n"
--	"	sltu	$1, %0, %1	\n"
--
--	"	addu	%0, $1		# Add final carry\n"
--	"	.set	pop"
--	: "=&r" (sum), "=&r" (tmp)
--	: "r" (saddr), "r" (daddr),
--	  "0" (htonl(len)), "r" (htonl(proto)), "r" (sum)
--	: "memory");
--
--	return csum_fold(sum);
--}
--
- #include <asm-generic/checksum.h>
- #endif /* CONFIG_GENERIC_CSUM */
- 
---- a/include/uapi/linux/ip.h
-+++ b/include/uapi/linux/ip.h
-@@ -106,7 +106,7 @@ struct iphdr {
- 		__be32	daddr;
- 	);
- 	/*The options start here. */
--};
-+} __attribute__((packed, aligned(2)));
- 
- 
- struct ip_auth_hdr {
---- a/include/uapi/linux/ipv6.h
-+++ b/include/uapi/linux/ipv6.h
-@@ -135,7 +135,7 @@ struct ipv6hdr {
- 		struct	in6_addr	saddr;
- 		struct	in6_addr	daddr;
- 	);
--};
-+} __attribute__((packed, aligned(2)));
- 
- 
- /* index values for the variables in ipv6_devconf */
---- a/include/uapi/linux/tcp.h
-+++ b/include/uapi/linux/tcp.h
-@@ -55,7 +55,7 @@ struct tcphdr {
- 	__be16	window;
- 	__sum16	check;
- 	__be16	urg_ptr;
--};
-+} __attribute__((packed, aligned(2)));
- 
- /*
-  *	The union cast uses a gcc extension to avoid aliasing problems
-@@ -65,7 +65,7 @@ struct tcphdr {
- union tcp_word_hdr {
- 	struct tcphdr hdr;
- 	__be32        words[5];
--};
-+} __attribute__((packed, aligned(2)));
- 
- #define tcp_flag_word(tp) (((union tcp_word_hdr *)(tp))->words[3])
- 
---- a/include/uapi/linux/udp.h
-+++ b/include/uapi/linux/udp.h
-@@ -25,7 +25,7 @@ struct udphdr {
- 	__be16	dest;
- 	__be16	len;
- 	__sum16	check;
--};
-+} __attribute__((packed, aligned(2)));
- 
- /* UDP socket options */
- #define UDP_CORK	1	/* Never send partially complete segments */
---- a/net/netfilter/nf_conntrack_core.c
-+++ b/net/netfilter/nf_conntrack_core.c
-@@ -298,8 +298,8 @@ nf_ct_get_tuple(const struct sk_buff *sk
- 
- 	switch (l3num) {
- 	case NFPROTO_IPV4:
--		tuple->src.u3.ip = ap[0];
--		tuple->dst.u3.ip = ap[1];
-+		tuple->src.u3.ip = net_hdr_word(ap++);
-+		tuple->dst.u3.ip = net_hdr_word(ap);
- 		break;
- 	case NFPROTO_IPV6:
- 		memcpy(tuple->src.u3.ip6, ap, sizeof(tuple->src.u3.ip6));
---- a/include/uapi/linux/icmp.h
-+++ b/include/uapi/linux/icmp.h
-@@ -102,7 +102,7 @@ struct icmphdr {
- 	} frag;
- 	__u8	reserved[4];
-   } un;
--};
-+} __attribute__((packed, aligned(2)));
- 
- 
- /*
---- a/include/uapi/linux/in6.h
-+++ b/include/uapi/linux/in6.h
-@@ -43,7 +43,7 @@ struct in6_addr {
- #define s6_addr16		in6_u.u6_addr16
- #define s6_addr32		in6_u.u6_addr32
- #endif
--};
-+} __attribute__((packed, aligned(2)));
- #endif /* __UAPI_DEF_IN6_ADDR */
- 
- #if __UAPI_DEF_SOCKADDR_IN6
---- a/net/ipv6/tcp_ipv6.c
-+++ b/net/ipv6/tcp_ipv6.c
-@@ -35,6 +35,7 @@
- #include <linux/ipsec.h>
- #include <linux/times.h>
- #include <linux/slab.h>
-+#include <asm/unaligned.h>
- #include <linux/uaccess.h>
- #include <linux/ipv6.h>
- #include <linux/icmpv6.h>
-@@ -891,10 +892,10 @@ static void tcp_v6_send_response(const s
- 	topt = (__be32 *)(t1 + 1);
- 
- 	if (tsecr) {
--		*topt++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
--				(TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP);
--		*topt++ = htonl(tsval);
--		*topt++ = htonl(tsecr);
-+		put_unaligned_be32((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
-+				(TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP, topt++);
-+		put_unaligned_be32(tsval, topt++);
-+		put_unaligned_be32(tsecr, topt++);
- 	}
- 
- 	if (mrst)
---- a/include/linux/ipv6.h
-+++ b/include/linux/ipv6.h
-@@ -6,6 +6,7 @@
- 
- #define ipv6_optlen(p)  (((p)->hdrlen+1) << 3)
- #define ipv6_authlen(p) (((p)->hdrlen+2) << 2)
-+
- /*
-  * This structure contains configuration options per IPv6 link.
-  */
---- a/net/ipv6/datagram.c
-+++ b/net/ipv6/datagram.c
-@@ -499,7 +499,7 @@ int ipv6_recv_error(struct sock *sk, str
- 				ipv6_iface_scope_id(&sin->sin6_addr,
- 						    IP6CB(skb)->iif);
- 		} else {
--			ipv6_addr_set_v4mapped(*(__be32 *)(nh + serr->addr_offset),
-+			ipv6_addr_set_v4mapped(net_hdr_word(nh + serr->addr_offset),
- 					       &sin->sin6_addr);
- 			sin->sin6_scope_id = 0;
- 		}
-@@ -853,12 +853,12 @@ int ip6_datagram_send_ctl(struct net *ne
- 			}
- 
- 			if (fl6->flowlabel&IPV6_FLOWINFO_MASK) {
--				if ((fl6->flowlabel^*(__be32 *)CMSG_DATA(cmsg))&~IPV6_FLOWINFO_MASK) {
-+				if ((fl6->flowlabel^net_hdr_word(CMSG_DATA(cmsg)))&~IPV6_FLOWINFO_MASK) {
- 					err = -EINVAL;
- 					goto exit_f;
- 				}
- 			}
--			fl6->flowlabel = IPV6_FLOWINFO_MASK & *(__be32 *)CMSG_DATA(cmsg);
-+			fl6->flowlabel = IPV6_FLOWINFO_MASK & net_hdr_word(CMSG_DATA(cmsg));
- 			break;
- 
- 		case IPV6_2292HOPOPTS:
---- a/net/ipv6/exthdrs.c
-+++ b/net/ipv6/exthdrs.c
-@@ -982,7 +982,7 @@ static bool ipv6_hop_jumbo(struct sk_buf
- 		goto drop;
- 	}
- 
--	pkt_len = ntohl(*(__be32 *)(nh + optoff + 2));
-+	pkt_len = ntohl(net_hdr_word(nh + optoff + 2));
- 	if (pkt_len <= IPV6_MAXPLEN) {
- 		icmpv6_param_prob_reason(skb, ICMPV6_HDR_FIELD, optoff + 2,
- 					 SKB_DROP_REASON_IP_INHDR);
---- a/include/linux/types.h
-+++ b/include/linux/types.h
-@@ -245,5 +245,11 @@ typedef void (*swap_func_t)(void *a, voi
- typedef int (*cmp_r_func_t)(const void *a, const void *b, const void *priv);
- typedef int (*cmp_func_t)(const void *a, const void *b);
- 
-+struct net_hdr_word {
-+       u32 words[1];
-+} __attribute__((packed, aligned(2)));
-+
-+#define net_hdr_word(_p) (((struct net_hdr_word *) (_p))->words[0])
-+
- #endif /*  __ASSEMBLY__ */
- #endif /* _LINUX_TYPES_H */
---- a/net/ipv4/af_inet.c
-+++ b/net/ipv4/af_inet.c
-@@ -1506,8 +1506,8 @@ struct sk_buff *inet_gro_receive(struct
- 		goto out;
- 
- 	NAPI_GRO_CB(skb)->proto = proto;
--	id = ntohl(*(__be32 *)&iph->id);
--	flush = (u16)((ntohl(*(__be32 *)iph) ^ skb_gro_len(skb)) | (id & ~IP_DF));
-+	id = ntohl(net_hdr_word(&iph->id));
-+	flush = (u16)((ntohl(net_hdr_word(iph)) ^ skb_gro_len(skb)) | (id & ~IP_DF));
- 	id >>= 16;
- 
- 	list_for_each_entry(p, head, list) {
---- a/net/ipv4/tcp_output.c
-+++ b/net/ipv4/tcp_output.c
-@@ -625,48 +625,53 @@ static void tcp_options_write(struct tcp
- 	u16 options = opts->options;	/* mungable copy */
- 
- 	if (unlikely(OPTION_MD5 & options)) {
--		*ptr++ = htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
--			       (TCPOPT_MD5SIG << 8) | TCPOLEN_MD5SIG);
-+		net_hdr_word(ptr++) =
-+			htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
-+			      (TCPOPT_MD5SIG << 8) | TCPOLEN_MD5SIG);
- 		/* overload cookie hash location */
- 		opts->hash_location = (__u8 *)ptr;
- 		ptr += 4;
- 	}
- 
- 	if (unlikely(opts->mss)) {
--		*ptr++ = htonl((TCPOPT_MSS << 24) |
--			       (TCPOLEN_MSS << 16) |
--			       opts->mss);
-+		net_hdr_word(ptr++) =
-+			htonl((TCPOPT_MSS << 24) | (TCPOLEN_MSS << 16) |
-+			      opts->mss);
- 	}
- 
- 	if (likely(OPTION_TS & options)) {
- 		if (unlikely(OPTION_SACK_ADVERTISE & options)) {
--			*ptr++ = htonl((TCPOPT_SACK_PERM << 24) |
--				       (TCPOLEN_SACK_PERM << 16) |
--				       (TCPOPT_TIMESTAMP << 8) |
--				       TCPOLEN_TIMESTAMP);
-+			net_hdr_word(ptr++) =
-+				htonl((TCPOPT_SACK_PERM << 24) |
-+				      (TCPOLEN_SACK_PERM << 16) |
-+				      (TCPOPT_TIMESTAMP << 8) |
-+				      TCPOLEN_TIMESTAMP);
- 			options &= ~OPTION_SACK_ADVERTISE;
- 		} else {
--			*ptr++ = htonl((TCPOPT_NOP << 24) |
--				       (TCPOPT_NOP << 16) |
--				       (TCPOPT_TIMESTAMP << 8) |
--				       TCPOLEN_TIMESTAMP);
-+			net_hdr_word(ptr++) =
-+				htonl((TCPOPT_NOP << 24) |
-+				      (TCPOPT_NOP << 16) |
-+				      (TCPOPT_TIMESTAMP << 8) |
-+				      TCPOLEN_TIMESTAMP);
- 		}
--		*ptr++ = htonl(opts->tsval);
--		*ptr++ = htonl(opts->tsecr);
-+		net_hdr_word(ptr++) = htonl(opts->tsval);
-+		net_hdr_word(ptr++) = htonl(opts->tsecr);
- 	}
- 
- 	if (unlikely(OPTION_SACK_ADVERTISE & options)) {
--		*ptr++ = htonl((TCPOPT_NOP << 24) |
--			       (TCPOPT_NOP << 16) |
--			       (TCPOPT_SACK_PERM << 8) |
--			       TCPOLEN_SACK_PERM);
-+		net_hdr_word(ptr++) =
-+			htonl((TCPOPT_NOP << 24) |
-+			      (TCPOPT_NOP << 16) |
-+			      (TCPOPT_SACK_PERM << 8) |
-+			      TCPOLEN_SACK_PERM);
- 	}
- 
- 	if (unlikely(OPTION_WSCALE & options)) {
--		*ptr++ = htonl((TCPOPT_NOP << 24) |
--			       (TCPOPT_WINDOW << 16) |
--			       (TCPOLEN_WINDOW << 8) |
--			       opts->ws);
-+		net_hdr_word(ptr++) =
-+			htonl((TCPOPT_NOP << 24) |
-+			      (TCPOPT_WINDOW << 16) |
-+			      (TCPOLEN_WINDOW << 8) |
-+			      opts->ws);
- 	}
- 
- 	if (unlikely(opts->num_sack_blocks)) {
-@@ -674,16 +679,17 @@ static void tcp_options_write(struct tcp
- 			tp->duplicate_sack : tp->selective_acks;
- 		int this_sack;
- 
--		*ptr++ = htonl((TCPOPT_NOP  << 24) |
--			       (TCPOPT_NOP  << 16) |
--			       (TCPOPT_SACK <<  8) |
--			       (TCPOLEN_SACK_BASE + (opts->num_sack_blocks *
-+		net_hdr_word(ptr++) =
-+			htonl((TCPOPT_NOP << 24) |
-+			      (TCPOPT_NOP << 16) |
-+			      (TCPOPT_SACK << 8) |
-+			      (TCPOLEN_SACK_BASE + (opts->num_sack_blocks *
- 						     TCPOLEN_SACK_PERBLOCK)));
- 
- 		for (this_sack = 0; this_sack < opts->num_sack_blocks;
- 		     ++this_sack) {
--			*ptr++ = htonl(sp[this_sack].start_seq);
--			*ptr++ = htonl(sp[this_sack].end_seq);
-+			net_hdr_word(ptr++) = htonl(sp[this_sack].start_seq);
-+			net_hdr_word(ptr++) = htonl(sp[this_sack].end_seq);
- 		}
- 
- 		tp->rx_opt.dsack = 0;
-@@ -696,13 +702,14 @@ static void tcp_options_write(struct tcp
- 
- 		if (foc->exp) {
- 			len = TCPOLEN_EXP_FASTOPEN_BASE + foc->len;
--			*ptr = htonl((TCPOPT_EXP << 24) | (len << 16) |
-+			net_hdr_word(ptr) =
-+				htonl((TCPOPT_EXP << 24) | (len << 16) |
- 				     TCPOPT_FASTOPEN_MAGIC);
- 			p += TCPOLEN_EXP_FASTOPEN_BASE;
- 		} else {
- 			len = TCPOLEN_FASTOPEN_BASE + foc->len;
--			*p++ = TCPOPT_FASTOPEN;
--			*p++ = len;
-+			net_hdr_word(p++) = TCPOPT_FASTOPEN;
-+			net_hdr_word(p++) = len;
- 		}
- 
- 		memcpy(p, foc->val, foc->len);
---- a/include/uapi/linux/igmp.h
-+++ b/include/uapi/linux/igmp.h
-@@ -33,7 +33,7 @@ struct igmphdr {
- 	__u8 code;		/* For newer IGMP */
- 	__sum16 csum;
- 	__be32 group;
--};
-+} __attribute__((packed, aligned(2)));
- 
- /* V3 group record types [grec_type] */
- #define IGMPV3_MODE_IS_INCLUDE		1
-@@ -49,7 +49,7 @@ struct igmpv3_grec {
- 	__be16	grec_nsrcs;
- 	__be32	grec_mca;
- 	__be32	grec_src[];
--};
-+} __attribute__((packed, aligned(2)));
- 
- struct igmpv3_report {
- 	__u8 type;
-@@ -58,7 +58,7 @@ struct igmpv3_report {
- 	__be16 resv2;
- 	__be16 ngrec;
- 	struct igmpv3_grec grec[];
--};
-+} __attribute__((packed, aligned(2)));
- 
- struct igmpv3_query {
- 	__u8 type;
-@@ -79,7 +79,7 @@ struct igmpv3_query {
- 	__u8 qqic;
- 	__be16 nsrcs;
- 	__be32 srcs[];
--};
-+} __attribute__((packed, aligned(2)));
- 
- #define IGMP_HOST_MEMBERSHIP_QUERY	0x11	/* From RFC1112 */
- #define IGMP_HOST_MEMBERSHIP_REPORT	0x12	/* Ditto */
---- a/net/core/flow_dissector.c
-+++ b/net/core/flow_dissector.c
-@@ -132,7 +132,7 @@ __be32 __skb_flow_get_ports(const struct
- 		ports = __skb_header_pointer(skb, thoff + poff,
- 					     sizeof(_ports), data, hlen, &_ports);
- 		if (ports)
--			return *ports;
-+			return (__be32)net_hdr_word(ports);
- 	}
- 
- 	return 0;
---- a/include/uapi/linux/icmpv6.h
-+++ b/include/uapi/linux/icmpv6.h
-@@ -78,7 +78,7 @@ struct icmp6hdr {
- #define icmp6_addrconf_other	icmp6_dataun.u_nd_ra.other
- #define icmp6_rt_lifetime	icmp6_dataun.u_nd_ra.rt_lifetime
- #define icmp6_router_pref	icmp6_dataun.u_nd_ra.router_pref
--};
-+} __attribute__((packed, aligned(2)));
- 
- 
- #define ICMPV6_ROUTER_PREF_LOW		0x3
---- a/include/net/ndisc.h
-+++ b/include/net/ndisc.h
-@@ -93,7 +93,7 @@ struct ra_msg {
-         struct icmp6hdr		icmph;
- 	__be32			reachable_time;
- 	__be32			retrans_timer;
--};
-+} __attribute__((packed, aligned(2)));
- 
- struct rd_msg {
- 	struct icmp6hdr icmph;
-@@ -372,10 +372,10 @@ static inline u32 ndisc_hashfn(const voi
- {
- 	const u32 *p32 = pkey;
- 
--	return (((p32[0] ^ hash32_ptr(dev)) * hash_rnd[0]) +
--		(p32[1] * hash_rnd[1]) +
--		(p32[2] * hash_rnd[2]) +
--		(p32[3] * hash_rnd[3]));
-+	return (((net_hdr_word(&p32[0]) ^ hash32_ptr(dev)) * hash_rnd[0]) +
-+		(net_hdr_word(&p32[1]) * hash_rnd[1]) +
-+		(net_hdr_word(&p32[2]) * hash_rnd[2]) +
-+		(net_hdr_word(&p32[3]) * hash_rnd[3]));
- }
- 
- static inline struct neighbour *__ipv6_neigh_lookup_noref(struct net_device *dev, const void *pkey)
---- a/net/sched/cls_u32.c
-+++ b/net/sched/cls_u32.c
-@@ -167,7 +167,7 @@ next_knode:
- 			data = skb_header_pointer(skb, toff, 4, &hdata);
- 			if (!data)
- 				goto out;
--			if ((*data ^ key->val) & key->mask) {
-+			if ((net_hdr_word(data) ^ key->val) & key->mask) {
- 				n = rcu_dereference_bh(n->next);
- 				goto next_knode;
- 			}
-@@ -218,8 +218,8 @@ check_terminal:
- 						  &hdata);
- 			if (!data)
- 				goto out;
--			sel = ht->divisor & u32_hash_fold(*data, &n->sel,
--							  n->fshift);
-+			sel = ht->divisor & u32_hash_fold(net_hdr_word(data),
-+							  &n->sel, n->fshift);
- 		}
- 		if (!(n->sel.flags & (TC_U32_VAROFFSET | TC_U32_OFFSET | TC_U32_EAT)))
- 			goto next_ht;
---- a/net/ipv6/ip6_offload.c
-+++ b/net/ipv6/ip6_offload.c
-@@ -273,7 +273,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
- 			continue;
- 
- 		iph2 = (struct ipv6hdr *)(p->data + off);
--		first_word = *(__be32 *)iph ^ *(__be32 *)iph2;
-+		first_word = net_hdr_word(iph) ^ net_hdr_word(iph2);
- 
- 		/* All fields must match except length and Traffic Class.
- 		 * XXX skbs on the gro_list have all been parsed and pulled
---- a/include/net/addrconf.h
-+++ b/include/net/addrconf.h
-@@ -52,7 +52,7 @@ struct prefix_info {
- 	__be32			reserved2;
- 
- 	struct in6_addr		prefix;
--};
-+} __attribute__((packed, aligned(2)));
- 
- /* rfc4861 4.6.2: IPv6 PIO is 32 bytes in size */
- static_assert(sizeof(struct prefix_info) == 32);
---- a/include/net/inet_ecn.h
-+++ b/include/net/inet_ecn.h
-@@ -138,9 +138,9 @@ static inline int IP6_ECN_set_ce(struct
- 	if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
- 		return 0;
- 
--	from = *(__be32 *)iph;
-+	from = net_hdr_word(iph);
- 	to = from | htonl(INET_ECN_CE << 20);
--	*(__be32 *)iph = to;
-+	net_hdr_word(iph) = to;
- 	if (skb->ip_summed == CHECKSUM_COMPLETE)
- 		skb->csum = csum_add(csum_sub(skb->csum, (__force __wsum)from),
- 				     (__force __wsum)to);
---- a/include/net/ipv6.h
-+++ b/include/net/ipv6.h
-@@ -149,7 +149,7 @@ struct frag_hdr {
- 	__u8	reserved;
- 	__be16	frag_off;
- 	__be32	identification;
--};
-+} __attribute__((packed, aligned(2)));
- 
- /*
-  * Jumbo payload option, as described in RFC 2675 2.
-@@ -649,8 +649,8 @@ static inline void __ipv6_addr_set_half(
- 	}
- #endif
- #endif
--	addr[0] = wh;
--	addr[1] = wl;
-+	net_hdr_word(&addr[0]) = wh;
-+	net_hdr_word(&addr[1]) = wl;
- }
- 
- static inline void ipv6_addr_set(struct in6_addr *addr,
-@@ -709,6 +709,8 @@ static inline bool ipv6_prefix_equal(con
- 	const __be32 *a1 = addr1->s6_addr32;
- 	const __be32 *a2 = addr2->s6_addr32;
- 	unsigned int pdw, pbi;
-+	/* Used for last <32-bit fraction of prefix */
-+	u32 pbia1, pbia2;
- 
- 	/* check complete u32 in prefix */
- 	pdw = prefixlen >> 5;
-@@ -717,7 +719,9 @@ static inline bool ipv6_prefix_equal(con
- 
- 	/* check incomplete u32 in prefix */
- 	pbi = prefixlen & 0x1f;
--	if (pbi && ((a1[pdw] ^ a2[pdw]) & htonl((0xffffffff) << (32 - pbi))))
-+	pbia1 = net_hdr_word(&a1[pdw]);
-+	pbia2 = net_hdr_word(&a2[pdw]);
-+	if (pbi && ((pbia1 ^ pbia2) & htonl((0xffffffff) << (32 - pbi))))
- 		return false;
- 
- 	return true;
-@@ -839,13 +843,13 @@ static inline void ipv6_addr_set_v4mappe
-  */
- static inline int __ipv6_addr_diff32(const void *token1, const void *token2, int addrlen)
- {
--	const __be32 *a1 = token1, *a2 = token2;
-+	const struct in6_addr *a1 = token1, *a2 = token2;
- 	int i;
- 
- 	addrlen >>= 2;
- 
- 	for (i = 0; i < addrlen; i++) {
--		__be32 xb = a1[i] ^ a2[i];
-+		__be32 xb = a1->s6_addr32[i] ^ a2->s6_addr32[i];
- 		if (xb)
- 			return i * 32 + 31 - __fls(ntohl(xb));
- 	}
-@@ -1040,17 +1044,18 @@ static inline u32 ip6_multipath_hash_fie
- static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass,
- 				__be32 flowlabel)
- {
--	*(__be32 *)hdr = htonl(0x60000000 | (tclass << 20)) | flowlabel;
-+	net_hdr_word((__be32 *)hdr) =
-+		htonl(0x60000000 | (tclass << 20)) | flowlabel;
- }
- 
- static inline __be32 ip6_flowinfo(const struct ipv6hdr *hdr)
- {
--	return *(__be32 *)hdr & IPV6_FLOWINFO_MASK;
-+	return net_hdr_word((__be32 *)hdr) & IPV6_FLOWINFO_MASK;
- }
- 
- static inline __be32 ip6_flowlabel(const struct ipv6hdr *hdr)
- {
--	return *(__be32 *)hdr & IPV6_FLOWLABEL_MASK;
-+	return net_hdr_word((__be32 *)hdr) & IPV6_FLOWLABEL_MASK;
- }
- 
- static inline u8 ip6_tclass(__be32 flowinfo)
---- a/include/net/secure_seq.h
-+++ b/include/net/secure_seq.h
-@@ -3,6 +3,7 @@
- #define _NET_SECURE_SEQ
- 
- #include <linux/types.h>
-+#include <linux/in6.h>
- 
- struct net;
- 
---- a/include/uapi/linux/in.h
-+++ b/include/uapi/linux/in.h
-@@ -91,7 +91,7 @@ enum {
- /* Internet address. */
- struct in_addr {
- 	__be32	s_addr;
--};
-+} __attribute__((packed, aligned(2)));
- #endif
- 
- #define IP_TOS		1
---- a/net/ipv6/ip6_fib.c
-+++ b/net/ipv6/ip6_fib.c
-@@ -141,7 +141,7 @@ static __be32 addr_bit_set(const void *t
- 	 * See include/asm-generic/bitops/le.h.
- 	 */
- 	return (__force __be32)(1 << ((~fn_bit ^ BITOP_BE32_SWIZZLE) & 0x1f)) &
--	       addr[fn_bit >> 5];
-+	       net_hdr_word(&addr[fn_bit >> 5]);
- }
- 
- struct fib6_info *fib6_info_alloc(gfp_t gfp_flags, bool with_fib6_nh)
---- a/net/netfilter/nf_conntrack_proto_tcp.c
-+++ b/net/netfilter/nf_conntrack_proto_tcp.c
-@@ -406,7 +406,7 @@ static void tcp_sack(const struct sk_buf
- 
- 	/* Fast path for timestamp-only option */
- 	if (length == TCPOLEN_TSTAMP_ALIGNED
--	    && *(__be32 *)ptr == htonl((TCPOPT_NOP << 24)
-+	    && net_hdr_word(ptr) == htonl((TCPOPT_NOP << 24)
- 				       | (TCPOPT_NOP << 16)
- 				       | (TCPOPT_TIMESTAMP << 8)
- 				       | TCPOLEN_TIMESTAMP))
---- a/net/xfrm/xfrm_input.c
-+++ b/net/xfrm/xfrm_input.c
-@@ -168,8 +168,8 @@ int xfrm_parse_spi(struct sk_buff *skb,
- 	if (!pskb_may_pull(skb, hlen))
- 		return -EINVAL;
- 
--	*spi = *(__be32 *)(skb_transport_header(skb) + offset);
--	*seq = *(__be32 *)(skb_transport_header(skb) + offset_seq);
-+	*spi = net_hdr_word(skb_transport_header(skb) + offset);
-+	*seq = net_hdr_word(skb_transport_header(skb) + offset_seq);
- 	return 0;
- }
- EXPORT_SYMBOL(xfrm_parse_spi);
---- a/net/ipv4/tcp_input.c
-+++ b/net/ipv4/tcp_input.c
-@@ -4283,14 +4283,16 @@ static bool tcp_parse_aligned_timestamp(
- {
- 	const __be32 *ptr = (const __be32 *)(th + 1);
- 
--	if (*ptr == htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16)
--			  | (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) {
-+	if (net_hdr_word(ptr) ==
-+	    htonl((TCPOPT_NOP << 24) | (TCPOPT_NOP << 16) |
-+		  (TCPOPT_TIMESTAMP << 8) | TCPOLEN_TIMESTAMP)) {
- 		tp->rx_opt.saw_tstamp = 1;
- 		++ptr;
--		tp->rx_opt.rcv_tsval = ntohl(*ptr);
-+		tp->rx_opt.rcv_tsval = get_unaligned_be32(ptr);
- 		++ptr;
--		if (*ptr)
--			tp->rx_opt.rcv_tsecr = ntohl(*ptr) - tp->tsoffset;
-+		if (net_hdr_word(ptr))
-+			tp->rx_opt.rcv_tsecr = get_unaligned_be32(ptr) -
-+					       tp->tsoffset;
- 		else
- 			tp->rx_opt.rcv_tsecr = 0;
- 		return true;
---- a/include/uapi/linux/if_pppox.h
-+++ b/include/uapi/linux/if_pppox.h
-@@ -51,6 +51,7 @@ struct pppoe_addr {
-  */
- struct pptp_addr {
- 	__u16		call_id;
-+	__u16		pad;
- 	struct in_addr	sin_addr;
- };
- 
---- a/include/net/neighbour.h
-+++ b/include/net/neighbour.h
-@@ -286,8 +286,10 @@ static inline bool neigh_key_eq128(const
- 	const u32 *n32 = (const u32 *)n->primary_key;
- 	const u32 *p32 = pkey;
- 
--	return ((n32[0] ^ p32[0]) | (n32[1] ^ p32[1]) |
--		(n32[2] ^ p32[2]) | (n32[3] ^ p32[3])) == 0;
-+	return ((n32[0] ^ net_hdr_word(&p32[0])) |
-+		(n32[1] ^ net_hdr_word(&p32[1])) |
-+		(n32[2] ^ net_hdr_word(&p32[2])) |
-+		(n32[3] ^ net_hdr_word(&p32[3]))) == 0;
- }
- 
- static inline struct neighbour *___neigh_lookup_noref(
---- a/include/uapi/linux/netfilter_arp/arp_tables.h
-+++ b/include/uapi/linux/netfilter_arp/arp_tables.h
-@@ -70,7 +70,7 @@ struct arpt_arp {
- 	__u8 flags;
- 	/* Inverse flags */
- 	__u16 invflags;
--};
-+} __attribute__((aligned(4)));
- 
- /* Values for "flag" field in struct arpt_ip (general arp structure).
-  * No flags defined yet.
---- a/net/core/utils.c
-+++ b/net/core/utils.c
-@@ -460,8 +460,14 @@ void inet_proto_csum_replace16(__sum16 *
- 			       bool pseudohdr)
- {
- 	__be32 diff[] = {
--		~from[0], ~from[1], ~from[2], ~from[3],
--		to[0], to[1], to[2], to[3],
-+		~net_hdr_word(&from[0]),
-+		~net_hdr_word(&from[1]),
-+		~net_hdr_word(&from[2]),
-+		~net_hdr_word(&from[3]),
-+		net_hdr_word(&to[0]),
-+		net_hdr_word(&to[1]),
-+		net_hdr_word(&to[2]),
-+		net_hdr_word(&to[3]),
- 	};
- 	if (skb->ip_summed != CHECKSUM_PARTIAL) {
- 		*sum = csum_fold(csum_partial(diff, sizeof(diff),
---- a/include/linux/etherdevice.h
-+++ b/include/linux/etherdevice.h
-@@ -555,7 +555,7 @@ static inline bool is_etherdev_addr(cons
-  * @b: Pointer to Ethernet header
-  *
-  * Compare two Ethernet headers, returns 0 if equal.
-- * This assumes that the network header (i.e., IP header) is 4-byte
-+ * This assumes that the network header (i.e., IP header) is 2-byte
-  * aligned OR the platform can handle unaligned access.  This is the
-  * case for all packets coming into netif_receive_skb or similar
-  * entry points.
-@@ -578,11 +578,12 @@ static inline unsigned long compare_ethe
- 	fold |= *(unsigned long *)(a + 6) ^ *(unsigned long *)(b + 6);
- 	return fold;
- #else
--	u32 *a32 = (u32 *)((u8 *)a + 2);
--	u32 *b32 = (u32 *)((u8 *)b + 2);
-+	const u16 *a16 = a;
-+	const u16 *b16 = b;
- 
--	return (*(u16 *)a ^ *(u16 *)b) | (a32[0] ^ b32[0]) |
--	       (a32[1] ^ b32[1]) | (a32[2] ^ b32[2]);
-+	return (a16[0] ^ b16[0]) | (a16[1] ^ b16[1]) | (a16[2] ^ b16[2]) |
-+	       (a16[3] ^ b16[3]) | (a16[4] ^ b16[4]) | (a16[5] ^ b16[5]) |
-+	       (a16[6] ^ b16[6]);
- #endif
- }
- 
---- a/net/ipv4/tcp_offload.c
-+++ b/net/ipv4/tcp_offload.c
-@@ -66,7 +66,7 @@ static struct sk_buff *__tcpv4_gso_segme
- 	th2 = tcp_hdr(seg->next);
- 	iph2 = ip_hdr(seg->next);
- 
--	if (!(*(const u32 *)&th->source ^ *(const u32 *)&th2->source) &&
-+	if (!(net_hdr_word(&th->source) ^ net_hdr_word(&th2->source)) &&
- 	    iph->daddr == iph2->daddr && iph->saddr == iph2->saddr)
- 		return segs;
- 
-@@ -267,7 +267,7 @@ struct sk_buff *tcp_gro_lookup(struct li
- 			continue;
- 
- 		th2 = tcp_hdr(p);
--		if (*(u32 *)&th->source ^ *(u32 *)&th2->source) {
-+		if (net_hdr_word(&th->source) ^ net_hdr_word(&th2->source)) {
- 			NAPI_GRO_CB(p)->same_flow = 0;
- 			continue;
- 		}
-@@ -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)
--		flush |= *(u32 *)((u8 *)th + i) ^
--			 *(u32 *)((u8 *)th2 + i);
-+		flush |= net_hdr_word((u8 *)th + i) ^
-+			 net_hdr_word((u8 *)th2 + i);
- 
- 	/* When we receive our second frame we can made a decision on if we
- 	 * continue this flow as an atomic flow with a fixed ID or if we use
---- a/net/ipv6/netfilter/ip6table_mangle.c
-+++ b/net/ipv6/netfilter/ip6table_mangle.c
-@@ -44,7 +44,7 @@ ip6t_mangle_out(void *priv, struct sk_bu
- 	hop_limit = ipv6_hdr(skb)->hop_limit;
- 
- 	/* flowlabel and prio (includes version, which shouldn't change either */
--	flowlabel = *((u_int32_t *)ipv6_hdr(skb));
-+	flowlabel = net_hdr_word(ipv6_hdr(skb));
- 
- 	ret = ip6t_do_table(priv, skb, state);
- 
-@@ -53,7 +53,7 @@ ip6t_mangle_out(void *priv, struct sk_bu
- 	     !ipv6_addr_equal(&ipv6_hdr(skb)->daddr, &daddr) ||
- 	     skb->mark != mark ||
- 	     ipv6_hdr(skb)->hop_limit != hop_limit ||
--	     flowlabel != *((u_int32_t *)ipv6_hdr(skb)))) {
-+	     flowlabel != net_hdr_word(ipv6_hdr(skb)))) {
- 		err = ip6_route_me_harder(state->net, state->sk, skb);
- 		if (err < 0)
- 			ret = NF_DROP_ERR(err);
diff --git a/target/linux/ath79/patches-6.6/910-mikrotik-rb4xx.patch b/target/linux/ath79/patches-6.6/910-mikrotik-rb4xx.patch
deleted file mode 100644
index 674cc2fe66..0000000000
--- a/target/linux/ath79/patches-6.6/910-mikrotik-rb4xx.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From: Christopher Hill <ch6574 at gmail.com>
-Subject: [PATCH] ath79: add Mikrotik rb4xx series drivers
-
-This adds 3 Mikrotik rb4xx series drivers as follows:
-
-rb4xx-cpld: This is in the mfd subsystem, and is the parent CPLD device
-that interfaces between the SoC SPI bus and its two children below.
-rb4xx-gpio: This is the GPIO expander.
-rb4xx-nand: This is the NAND driver.
-
-The history of this code comes in three phases.
-
-1. The first is a May 2015 attempt to push the equivalient ar71xx rb4xx
-drivers upstream. See https://lore.kernel.org/patchwork/patch/940880/.
-
-Module-author: Gabor Juhos <juhosg at openwrt.org>
-Module-author: Imre Kaloz <kaloz at openwrt.org>
-Module-author: Bert Vermeulen <bert at biot.com>
-
-2. Next several ar71xx patches were applied bringing the code current.
-
-commit 7bbf4117c6fe4b764d9d7c62fb2bcf6dd93bff2c
-Submitted-by: Hauke Mehrtens <hauke at hauke-m.de>
-
-commit af79fdbe4af32a287798b579141204bda056b8aa
-commit 889272d92db689fd9c910243635e44c9d8323095
-commit e21cb649a235180563363b8af5ba8296b9ac0baa
-commit 7c09fa4a7492ca436f2c94bd9a465b7c5bbeed6f
-Submitted-by: Felix Fietkau <nbd at nbd.name>
-
-3. Finally a heavy refactor to split the driver into the three new
-subsystems, and updated to work with the device tree configuration, plus
-updates and review feedback incorporated
-
-Reviewed-by: Thibaut VAR?NE <hacks at slashdirt.org>
-Submitted-by: Christopher Hill <ch6574 at gmail.com>
----
- drivers/mfd/Kconfig                           | 8 ++++++++
- drivers/mfd/Makefile                          | 1 +
- drivers/gpio/Kconfig                          | 6 ++++++
- drivers/gpio/Makefile                         | 1 +
- drivers/mtd/nand/raw/Kconfig                  | 7 +++++++
- drivers/mtd/nand/raw/Makefile                 | 1 +
- 6 files changed, 24 insertions(+)
-
---- a/drivers/mfd/Kconfig
-+++ b/drivers/mfd/Kconfig
-@@ -2261,6 +2261,14 @@ config RAVE_SP_CORE
- 	  Select this to get support for the Supervisory Processor
- 	  device found on several devices in RAVE line of hardware.
- 
-+config MFD_RB4XX_CPLD
-+	tristate "CPLD driver for Mikrotik RB4xx series boards"
-+	select MFD_CORE
-+	depends on ATH79 || COMPILE_TEST
-+	help
-+	  Enables support for the CPLD chip (NAND & GPIO) on Mikrotik
-+	  Routerboard RB4xx series.
-+
- config SGI_MFD_IOC3
- 	bool "SGI IOC3 core driver"
- 	depends on PCI && MIPS && 64BIT
---- a/drivers/mfd/Makefile
-+++ b/drivers/mfd/Makefile
-@@ -269,6 +269,7 @@ obj-$(CONFIG_MFD_KHADAS_MCU) 	+= khadas-
- obj-$(CONFIG_MFD_ACER_A500_EC)	+= acer-ec-a500.o
- obj-$(CONFIG_MFD_QCOM_PM8008)	+= qcom-pm8008.o
- 
-+obj-$(CONFIG_MFD_RB4XX_CPLD)	+= rb4xx-cpld.o
- obj-$(CONFIG_SGI_MFD_IOC3)	+= ioc3.o
- obj-$(CONFIG_MFD_SIMPLE_MFD_I2C)	+= simple-mfd-i2c.o
- obj-$(CONFIG_MFD_SMPRO)		+= smpro-core.o
---- a/drivers/gpio/Kconfig
-+++ b/drivers/gpio/Kconfig
-@@ -1696,6 +1696,12 @@ config GPIO_SODAVILLE
- 	help
- 	  Say Y here to support Intel Sodaville GPIO.
- 
-+config GPIO_RB4XX
-+	tristate "GPIO expander for Mikrotik RB4xx series boards"
-+	depends on MFD_RB4XX_CPLD
-+	help
-+	  GPIO driver for Mikrotik Routerboard RB4xx series.
-+
- endmenu
- 
- menu "SPI GPIO expanders"
---- a/drivers/gpio/Makefile
-+++ b/drivers/gpio/Makefile
-@@ -131,6 +131,7 @@ obj-$(CONFIG_GPIO_PL061)		+= gpio-pl061.
- obj-$(CONFIG_GPIO_PMIC_EIC_SPRD)	+= gpio-pmic-eic-sprd.o
- obj-$(CONFIG_GPIO_PXA)			+= gpio-pxa.o
- obj-$(CONFIG_GPIO_RASPBERRYPI_EXP)	+= gpio-raspberrypi-exp.o
-+obj-$(CONFIG_GPIO_RB4XX)		+= gpio-rb4xx.o
- obj-$(CONFIG_GPIO_RC5T583)		+= gpio-rc5t583.o
- obj-$(CONFIG_GPIO_RCAR)			+= gpio-rcar.o
- obj-$(CONFIG_GPIO_RDA)			+= gpio-rda.o
---- a/drivers/mtd/nand/raw/Kconfig
-+++ b/drivers/mtd/nand/raw/Kconfig
-@@ -550,4 +550,11 @@ config MTD_NAND_AR934X
- 	  Enables support for NAND controller on Qualcomm Atheros SoCs.
- 	  This controller is found on AR934x and QCA955x SoCs.
- 
-+config MTD_NAND_RB4XX
-+	tristate "Support for NAND driver for Mikrotik RB4xx series boards"
-+	depends on MFD_RB4XX_CPLD
-+	help
-+	  Enables support for the NAND flash chip on Mikrotik Routerboard
-+	  RB4xx series.
-+
- endif # MTD_RAW_NAND
---- a/drivers/mtd/nand/raw/Makefile
-+++ b/drivers/mtd/nand/raw/Makefile
-@@ -58,6 +58,7 @@ obj-$(CONFIG_MTD_NAND_ROCKCHIP)		+= rock
- obj-$(CONFIG_MTD_NAND_PL35X)		+= pl35x-nand-controller.o
- obj-$(CONFIG_MTD_NAND_RENESAS)		+= renesas-nand-controller.o
- obj-$(CONFIG_MTD_NAND_AR934X)		+= ar934x_nand.o
-+obj-$(CONFIG_MTD_NAND_RB4XX)		+= nand_rb4xx.o
- 
- nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o
- nand-objs += nand_onfi.o
diff --git a/target/linux/ath79/patches-6.6/911-mikrotik-rb91x.patch b/target/linux/ath79/patches-6.6/911-mikrotik-rb91x.patch
deleted file mode 100644
index ddb7b52cbe..0000000000
--- a/target/linux/ath79/patches-6.6/911-mikrotik-rb91x.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From: Denis Kalashnikov <denis281089 at gmail.com>
-Subject: [PATCH] ath79: add support for reset key on MikroTik RB912UAG-2HPnD
-
-On MikroTik RB91x board series a reset key shares SoC gpio
-line #15 with NAND ALE and NAND IO7. So we need a custom
-gpio driver to manage this non-trivial connection schema.
-Also rb91x-nand needs to have an ability to disable a polling
-of the key while it works with NAND.
-
-While we've been integrating rb91x-key into a firmware, we've
-figured out that:
-* In the gpio-latch driver we need to add a "cansleep" suffix to
-several gpiolib calls,
-* When gpio-latch and rb91x-nand fail to get a gpio and an error
-is -EPROBE_DEFER, they shouldn't report about this, since this
-actually is not an error and occurs when the gpio-latch probe
-function is called before the rb91x-key probe.
-We fix these related things here too.
-
-Submitted-by: Denis Kalashnikov <denis281089 at gmail.com>
-Reviewed-by: Sergey Ryazanov <ryazanov.s.a at gmail.com>
-Tested-by: Koen Vandeputte <koen.vandeputte at ncentric.com>
----
- drivers/gpio/Kconfig                          | 11 +++++++++++
- drivers/gpio/Makefile                         |  2 ++
- drivers/mtd/nand/raw/Kconfig                  |  6 ++++++
- drivers/mtd/nand/raw/Makefile                 |  1 +
- 7 files changed, 20 insertions(+)
-
---- a/drivers/gpio/Kconfig
-+++ b/drivers/gpio/Kconfig
-@@ -371,6 +371,12 @@ config GPIO_IXP4XX
- 
- 	  If unsure, say N.
- 
-+config GPIO_LATCH_MIKROTIK
-+	tristate "MikroTik RouterBOARD GPIO latch support"
-+	depends on ATH79
-+	help
-+	  GPIO driver for latch on some MikroTik RouterBOARDs.
-+
- config GPIO_LOGICVC
- 	tristate "Xylon LogiCVC GPIO support"
- 	depends on MFD_SYSCON && OF
-@@ -553,6 +559,10 @@ config GPIO_ROCKCHIP
- 	help
- 	  Say yes here to support GPIO on Rockchip SoCs.
- 
-+config GPIO_RB91X_KEY
-+	tristate "MikroTik RB91x board series reset key support"
-+	depends on ATH79
-+
- config GPIO_SAMA5D2_PIOBU
- 	tristate "SAMA5D2 PIOBU GPIO support"
- 	depends on MFD_SYSCON
---- a/drivers/gpio/Makefile
-+++ b/drivers/gpio/Makefile
-@@ -81,6 +81,7 @@ obj-$(CONFIG_GPIO_IXP4XX)		+= gpio-ixp4x
- obj-$(CONFIG_GPIO_JANZ_TTL)		+= gpio-janz-ttl.o
- obj-$(CONFIG_GPIO_KEMPLD)		+= gpio-kempld.o
- obj-$(CONFIG_GPIO_LATCH)		+= gpio-latch.o
-+obj-$(CONFIG_GPIO_LATCH_MIKROTIK)	+= gpio-latch-mikrotik.o
- obj-$(CONFIG_GPIO_LJCA) 		+= gpio-ljca.o
- obj-$(CONFIG_GPIO_LOGICVC)		+= gpio-logicvc.o
- obj-$(CONFIG_GPIO_LOONGSON1)		+= gpio-loongson1.o
-@@ -132,6 +133,7 @@ obj-$(CONFIG_GPIO_PMIC_EIC_SPRD)	+= gpio
- obj-$(CONFIG_GPIO_PXA)			+= gpio-pxa.o
- obj-$(CONFIG_GPIO_RASPBERRYPI_EXP)	+= gpio-raspberrypi-exp.o
- obj-$(CONFIG_GPIO_RB4XX)		+= gpio-rb4xx.o
-+obj-$(CONFIG_GPIO_RB91X_KEY)		+= gpio-rb91x-key.o
- obj-$(CONFIG_GPIO_RC5T583)		+= gpio-rc5t583.o
- obj-$(CONFIG_GPIO_RCAR)			+= gpio-rcar.o
- obj-$(CONFIG_GPIO_RDA)			+= gpio-rda.o
---- a/drivers/mtd/nand/raw/Kconfig
-+++ b/drivers/mtd/nand/raw/Kconfig
-@@ -557,4 +557,10 @@ config MTD_NAND_RB4XX
- 	  Enables support for the NAND flash chip on Mikrotik Routerboard
- 	  RB4xx series.
- 
-+config MTD_NAND_RB91X
-+	tristate "MikroTik RB91x NAND driver support"
-+	depends on ATH79 && MTD_RAW_NAND
-+	help
-+	  Enables support for the NAND flash chip on MikroTik RB91x series.
-+
- endif # MTD_RAW_NAND
---- a/drivers/mtd/nand/raw/Makefile
-+++ b/drivers/mtd/nand/raw/Makefile
-@@ -59,6 +59,7 @@ obj-$(CONFIG_MTD_NAND_PL35X)		+= pl35x-n
- obj-$(CONFIG_MTD_NAND_RENESAS)		+= renesas-nand-controller.o
- obj-$(CONFIG_MTD_NAND_AR934X)		+= ar934x_nand.o
- obj-$(CONFIG_MTD_NAND_RB4XX)		+= nand_rb4xx.o
-+obj-$(CONFIG_MTD_NAND_RB91X)		+= rb91x_nand.o
- 
- nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o
- nand-objs += nand_onfi.o



From lede-commits at lists.infradead.org  Wed Aug 20 14:33:53 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 20 Aug 2025 17:33:53 -0400
Subject: [openwrt/openwrt]  tools/squashfs4: update to 4.7.2
In-Reply-To: <175572563373.3033757.1828316924516836404@git-01.infra.openwrt.org>
References: <175572563373.3033757.1828316924516836404@git-01.infra.openwrt.org>
Message-ID: <mailman.125280.1755738780.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d01165a6ce039a65d4a83f32fe3051ed66dbdfdd

commit d01165a6ce039a65d4a83f32fe3051ed66dbdfdd
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Wed Aug 20 19:32:11 2025 +0800

    tools/squashfs4: update to 4.7.2
    
    This minor version update only includes some build fixes and
    improvements.
    
    Release Notes:
      https://github.com/plougher/squashfs-tools/releases/tag/4.7.1
      https://github.com/plougher/squashfs-tools/releases/tag/4.7.2
    
    Remove upstream patches:
      001-thread-add-the-missing-pthread.h-header.patch[1]
      002-print_pager-add-missing-includes.patch[2]
    
    [1] https://github.com/plougher/squashfs-tools/commit/b6e9f4b62cc3e762ceeddc0fc099f7d65f7b7361
    [2] https://github.com/plougher/squashfs-tools/commit/05a895b3f996d1ac157d95b04980f5f047e7dbf7
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19820
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 tools/squashfs4/Makefile                           | 10 +++----
 ...1-thread-add-the-missing-pthread.h-header.patch | 28 ------------------
 .../002-print_pager-add-missing-includes.patch     | 34 ----------------------
 3 files changed, 5 insertions(+), 67 deletions(-)

diff --git a/tools/squashfs4/Makefile b/tools/squashfs4/Makefile
index 910502114b..94679bd79d 100644
--- a/tools/squashfs4/Makefile
+++ b/tools/squashfs4/Makefile
@@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=squashfs4
 PKG_CPE_ID:=cpe:/a:phillip_lougher:squashfs
-PKG_VERSION:=4.7.0
-PKG_RELEASE=2
+PKG_VERSION:=4.7.2
+PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools
-PKG_SOURCE_DATE:=2025-06-04
-PKG_SOURCE_VERSION:=2e87d42ed089dc31990d83eeb07437b9d085d6d1
-PKG_MIRROR_HASH:=ff5c545b8d64e1c3a1316abde0b6ba297c267fa3daed264eff2038dc99649869
+PKG_SOURCE_DATE:=2025-08-19
+PKG_SOURCE_VERSION:=99d23a31b471433c51e9c145aeba2ab1536e34df
+PKG_MIRROR_HASH:=229a1b8f465fa0f576b5ace1753a8e9d28a2c4254ec2b019668baa676094f6c3
 
 HOST_BUILD_PARALLEL:=1
 
diff --git a/tools/squashfs4/patches/001-thread-add-the-missing-pthread.h-header.patch b/tools/squashfs4/patches/001-thread-add-the-missing-pthread.h-header.patch
deleted file mode 100644
index 58d374fe29..0000000000
--- a/tools/squashfs4/patches/001-thread-add-the-missing-pthread.h-header.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 8931019e6be6e584538ae38978ff68d5b53c96fe Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Wed, 4 Jun 2025 19:53:39 +0800
-Subject: [PATCH] thread: add the missing pthread.h header
-
-Fix build error on macos:
-
-In file included from mksquashfs_help.c:35:
-./thread.h:46:39: error: unknown type name 'pthread_mutex_t'; did you mean 'pthread_attr_t'?
-   46 | extern void wait_thread_idle(int tid, pthread_mutex_t *mutex);
-      |                                       ^~~~~~~~~~~~~~~
-      |                                       pthread_attr_t
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
----
- squashfs-tools/thread.h | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/squashfs-tools/thread.h
-+++ b/squashfs-tools/thread.h
-@@ -22,6 +22,7 @@
-  *
-  * thread.h
-  */
-+#include <pthread.h>
- 
- #define TRUE 1
- #define FALSE 0
diff --git a/tools/squashfs4/patches/002-print_pager-add-missing-includes.patch b/tools/squashfs4/patches/002-print_pager-add-missing-includes.patch
deleted file mode 100644
index 4e29c1e2f5..0000000000
--- a/tools/squashfs4/patches/002-print_pager-add-missing-includes.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 05a895b3f996d1ac157d95b04980f5f047e7dbf7 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton at arm.com>
-Date: Fri, 6 Jun 2025 15:23:07 +0100
-Subject: [PATCH] print_pager: add missing includes
-
-When building with musl:
-
-  print_pager.h:33:25: error: unknown type name 'pid_t'
-     33 | extern void wait_to_die(pid_t process);
-        |                         ^~~~~
-  print_pager.h:34:25: error: unknown type name 'pid_t'
-     34 | extern FILE *exec_pager(pid_t *process);
-        |                         ^~~~~
-
-print_pager.h uses pid_t and FILE, so add the required #includes to
-ensure that these are defined.
-
-Signed-off-by: Ross Burton <ross.burton at arm.com>
----
- squashfs-tools/print_pager.h | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/squashfs-tools/print_pager.h
-+++ b/squashfs-tools/print_pager.h
-@@ -30,6 +30,9 @@
- #define MORE_PAGER 2
- #define UNKNOWN_PAGER 3
- 
-+#include <stdio.h>
-+#include <sys/types.h>
-+
- extern void wait_to_die(pid_t process);
- extern FILE *exec_pager(pid_t *process);
- extern int get_column_width();



From lede-commits at lists.infradead.org  Wed Aug 20 14:43:11 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 20 Aug 2025 17:43:11 -0400
Subject: [openwrt/openwrt]  toolchain: gcc: update GCC13 to 13.4
In-Reply-To: <175572619170.3058975.14356482627229330130@git-01.infra.openwrt.org>
References: <175572619170.3058975.14356482627229330130@git-01.infra.openwrt.org>
Message-ID: <mailman.125285.1755739101.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/44a5d1c4488cc57adf806f0cbbee17374feaaf7d

commit 44a5d1c4488cc57adf806f0cbbee17374feaaf7d
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Tue Jun 10 21:32:13 2025 +0800

    toolchain: gcc: update GCC13 to 13.4
    
    Release Notes:
      https://gcc.gnu.org/gcc-13/changes.html
    
    All patches are automatically refreshed.
    
    Build-tested on:
      ath79/generic(MIPS)
      ipq40xx/generic(ARMv7)
      mediatek/filogic(ARMv8)
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19089
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 toolchain/gcc/Config.version                                    | 2 +-
 toolchain/gcc/common.mk                                         | 4 ++--
 toolchain/gcc/patches-13.x/010-documentation.patch              | 2 +-
 toolchain/gcc/patches-13.x/230-musl_libssp.patch                | 2 +-
 toolchain/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch | 2 +-
 toolchain/gcc/patches-13.x/920-specs_nonfatal_getenv.patch      | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 063a2dc9ce..5960fe3d9b 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -14,7 +14,7 @@ config GCC_VERSION
 	string
 	default EXTERNAL_GCC_VERSION	if EXTERNAL_TOOLCHAIN && !NATIVE_TOOLCHAIN
 	default "12.3.0"	if GCC_VERSION_12
-	default "13.3.0"	if GCC_VERSION_13
+	default "13.4.0"	if GCC_VERSION_13
 	default "15.2.0"	if GCC_VERSION_15
 	default "14.3.0"
 
diff --git a/toolchain/gcc/common.mk b/toolchain/gcc/common.mk
index 3c1167724e..8bd898e095 100644
--- a/toolchain/gcc/common.mk
+++ b/toolchain/gcc/common.mk
@@ -38,8 +38,8 @@ ifeq ($(PKG_VERSION),12.3.0)
   PKG_HASH:=949a5d4f99e786421a93b532b22ffab5578de7321369975b91aec97adfda8c3b
 endif
 
-ifeq ($(PKG_VERSION),13.3.0)
-  PKG_HASH:=0845e9621c9543a13f484e94584a49ffc0129970e9914624235fc1d061a0c083
+ifeq ($(PKG_VERSION),13.4.0)
+  PKG_HASH:=9c4ce6dbb040568fdc545588ac03c5cbc95a8dbf0c7aa490170843afb59ca8f5
 endif
 
 ifeq ($(PKG_VERSION),14.3.0)
diff --git a/toolchain/gcc/patches-13.x/010-documentation.patch b/toolchain/gcc/patches-13.x/010-documentation.patch
index 9646568afe..cdb0819133 100644
--- a/toolchain/gcc/patches-13.x/010-documentation.patch
+++ b/toolchain/gcc/patches-13.x/010-documentation.patch
@@ -12,7 +12,7 @@ Date:   Tue Feb 26 16:16:33 2013 +0000
 
 --- a/gcc/Makefile.in
 +++ b/gcc/Makefile.in
-@@ -3397,18 +3397,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
+@@ -3398,18 +3398,10 @@ doc/gcc.info: $(TEXI_GCC_FILES)
  doc/gccint.info: $(TEXI_GCCINT_FILES)
  doc/cppinternals.info: $(TEXI_CPPINT_FILES)
  
diff --git a/toolchain/gcc/patches-13.x/230-musl_libssp.patch b/toolchain/gcc/patches-13.x/230-musl_libssp.patch
index fee068e1d6..aa59f4fa48 100644
--- a/toolchain/gcc/patches-13.x/230-musl_libssp.patch
+++ b/toolchain/gcc/patches-13.x/230-musl_libssp.patch
@@ -1,6 +1,6 @@
 --- a/gcc/gcc.cc
 +++ b/gcc/gcc.cc
-@@ -972,7 +972,9 @@ proper position among the other output f
+@@ -975,7 +975,9 @@ proper position among the other output f
  #endif
  
  #ifndef LINK_SSP_SPEC
diff --git a/toolchain/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch b/toolchain/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch
index 2ca42ad777..87a3cab838 100644
--- a/toolchain/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch
+++ b/toolchain/gcc/patches-13.x/300-mips_Os_cpu_rtx_cost_model.patch
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/gcc/config/mips/mips.cc
 +++ b/gcc/config/mips/mips.cc
-@@ -20219,7 +20219,7 @@ mips_option_override (void)
+@@ -20228,7 +20228,7 @@ mips_option_override (void)
      flag_pcc_struct_return = 0;
  
    /* Decide which rtx_costs structure to use.  */
diff --git a/toolchain/gcc/patches-13.x/920-specs_nonfatal_getenv.patch b/toolchain/gcc/patches-13.x/920-specs_nonfatal_getenv.patch
index 265ca22c0c..bd965660f4 100644
--- a/toolchain/gcc/patches-13.x/920-specs_nonfatal_getenv.patch
+++ b/toolchain/gcc/patches-13.x/920-specs_nonfatal_getenv.patch
@@ -7,7 +7,7 @@ Date:   Sat Apr 21 03:02:39 2012 +0000
 
 --- a/gcc/gcc.cc
 +++ b/gcc/gcc.cc
-@@ -10174,8 +10174,10 @@ getenv_spec_function (int argc, const ch
+@@ -10184,8 +10184,10 @@ getenv_spec_function (int argc, const ch
      }
  
    if (!value)



From lede-commits at lists.infradead.org  Thu Aug 21 02:22:15 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 21 Aug 2025 05:22:15 -0400
Subject: [openwrt/openwrt]  realtek: RTL930x/RTL931x led_set defines
In-Reply-To: <175576813528.1669777.6494205499534819565@git-01.infra.openwrt.org>
References: <175576813528.1669777.6494205499534819565@git-01.infra.openwrt.org>
Message-ID: <mailman.125796.1755778429.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5d44b115f1fef40a6b023d098056d8affbe029ae

commit 5d44b115f1fef40a6b023d098056d8affbe029ae
Author: Bevan Weiss <bevan.weiss at gmail.com>
AuthorDate: Sun Jul 27 14:12:32 2025 +1000

    realtek: RTL930x/RTL931x led_set defines
    
    Add defines for RTL930x and RTL931x led_set 'modes' (to avoid magic numbers
    in dts files).
    
    Signed-off-by: Bevan Weiss <bevan.weiss at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19791
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/realtek/dts/macros.dtsi | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/target/linux/realtek/dts/macros.dtsi b/target/linux/realtek/dts/macros.dtsi
index 66925fb791..b47b782669 100644
--- a/target/linux/realtek/dts/macros.dtsi
+++ b/target/linux/realtek/dts/macros.dtsi
@@ -61,3 +61,19 @@
 			full-duplex; \
 		}; \
 	};
+
+// LED Set mode definitions
+#define RTL93XX_LED_SET_NONE        (0)
+#define RTL93XX_LED_SET_10G         (1 << 0)
+#define RTL93XX_LED_SET_5G          (1 << 1)
+#define RTL93XX_LED_SET_2P5G        (1 << 3)
+#define RTL93XX_LED_SET_1G          (1 << 5)
+#define RTL93XX_LED_SET_100M        (1 << 7)
+#define RTL93XX_LED_SET_10M         (1 << 8)
+#define RTL93XX_LED_SET_LINK        (1 << 9)
+#define RTL93XX_LED_SET_LINK_BLINK  (1 << 10)
+#define RTL93XX_LED_SET_ACT         (1 << 11)
+#define RTL93XX_LED_SET_RX          (1 << 12)
+#define RTL93XX_LED_SET_TX          (1 << 13)
+#define RTL93XX_LED_SET_COLLISION   (1 << 14)
+#define RTL93XX_LED_SET_DUPLEX      (1 << 15)



From lede-commits at lists.infradead.org  Thu Aug 21 02:22:16 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 21 Aug 2025 05:22:16 -0400
Subject: [openwrt/openwrt]  realtek: RTL930x led_set count error message tidy
 up + dev_ print fixups
In-Reply-To: <175576813528.1669777.6494205499534819565@git-01.infra.openwrt.org>
References: <175576813528.1669777.6494205499534819565@git-01.infra.openwrt.org>
Message-ID: <mailman.125797.1755778429.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/00c16754cd367fbd052f96bcdca66dcfffe54121

commit 00c16754cd367fbd052f96bcdca66dcfffe54121
Author: Bevan Weiss <bevan.weiss at gmail.com>
AuthorDate: Mon Aug 18 18:12:57 2025 +1000

    realtek: RTL930x led_set count error message tidy up + dev_ print fixups
    
    Whilst testing Hasivo s1100wp-8gt-se LED configuration, several error
    messages were presented which didn't indicate which led_set they were
    referencing, nor what the value was that caused the invalid configuration.
    
    Migrate to use dev_ print messages for this function.
    And tidy up both when the error message is reported (don't show it when
    an led_set isn't in the DTS) and what details the message presents.
    
    Signed-off-by: Bevan Weiss <bevan.weiss at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19791
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c   | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
index f6a5affb43..c84ed6cca0 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
@@ -2244,12 +2244,12 @@ static void rtl930x_set_distribution_algorithm(int group, int algoidx, u32 algom
 static void rtl930x_led_init(struct rtl838x_switch_priv *priv)
 {
 	struct device_node *node;
+	struct device *dev = priv->dev;
 	u32 pm = 0;
 
-	pr_debug("%s called\n", __func__);
 	node = of_find_compatible_node(NULL, NULL, "realtek,rtl9300-leds");
 	if (!node) {
-		pr_debug("%s No compatible LED node found\n", __func__);
+		dev_dbg(dev, "No compatible LED node found\n");
 		return;
 	}
 
@@ -2271,10 +2271,14 @@ static void rtl930x_led_init(struct rtl838x_switch_priv *priv)
 		sprintf(set_name, "led_set%d", set);
 		leds_in_this_set = of_property_count_u32_elems(node, set_name);
 
-		if (leds_in_this_set == 0 || leds_in_this_set > sizeof(set_config)) {
-			pr_err("%s led_set configuration invalid skipping over this set\n", __func__);
+		if (leds_in_this_set <= 0 || leds_in_this_set > sizeof(set_config)) {
+			if (leds_in_this_set != -EINVAL) {
+				dev_err(dev, "%s invalid, skipping this set, leds_in_this_set=%d, should be (0, %d]\n",
+					set_name, leds_in_this_set, sizeof(set_config));
+			}
 			continue;
 		}
+		dev_info(dev, "%s has %d LEDs configured\n", set_name, leds_in_this_set);
 
 		if (of_property_read_u32_array(node, set_name, set_config, leds_in_this_set)) {
 			break;
@@ -2323,7 +2327,7 @@ static void rtl930x_led_init(struct rtl838x_switch_priv *priv)
 	sw_w32(pm, RTL930X_LED_PORT_COMBO_MASK_CTRL);
 
 	for (int i = 0; i < 24; i++)
-		pr_debug("%s %08x: %08x\n",__func__, 0xbb00cc00 + i * 4, sw_r32(0xcc00 + i * 4));
+		dev_dbg(dev, "%08x: %08x\n", 0xbb00cc00 + i * 4, sw_r32(0xcc00 + i * 4));
 }
 
 const struct rtl838x_reg rtl930x_reg = {



From lede-commits at lists.infradead.org  Thu Aug 21 08:07:51 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 21 Aug 2025 11:07:51 -0400
Subject: [openwrt/openwrt]  generic: backport some flow offload helper patch
In-Reply-To: <175578887181.3216719.4235371406321549928@git-01.infra.openwrt.org>
References: <175578887181.3216719.4235371406321549928@git-01.infra.openwrt.org>
Message-ID: <mailman.126184.1755803522.1866309.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/97a75a72e3fffdc686c7ed7d0bb794f29a682221

commit 97a75a72e3fffdc686c7ed7d0bb794f29a682221
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Feb 5 22:23:21 2025 +0100

    generic: backport some flow offload helper patch
    
    Backport some flow offload helper patch in preparation for Airoha Flow
    Offload support.
    
    Link: https://github.com/openwrt/openwrt/pull/18166
    (cherry picked from commit 34ba7e8a8ab10900a3ca80fc40e7cafd1e7edb50)
    [ drop merged patch 705-v6.12-netdevice-add-netdev... ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...offload-add-control-flag-checking-helpers.patch | 101 +++++++++++++++++++++
 ...pv6_addr_-cpu_to_be32-be32_to_cpu-helpers.patch |  40 ++++++++
 2 files changed, 141 insertions(+)

diff --git a/target/linux/generic/backport-6.6/703-v6.10-flow_offload-add-control-flag-checking-helpers.patch b/target/linux/generic/backport-6.6/703-v6.10-flow_offload-add-control-flag-checking-helpers.patch
new file mode 100644
index 0000000000..457dac16d4
--- /dev/null
+++ b/target/linux/generic/backport-6.6/703-v6.10-flow_offload-add-control-flag-checking-helpers.patch
@@ -0,0 +1,101 @@
+From d11e63119432bdb55065d094cb6fd37e9147c70d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Asbj=C3=B8rn=20Sloth=20T=C3=B8nnesen?= <ast at fiberby.net>
+Date: Thu, 11 Apr 2024 10:52:54 +0000
+Subject: [PATCH] flow_offload: add control flag checking helpers
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+These helpers aim to help drivers, with checking
+for the presence of unsupported control flags.
+
+For drivers supporting at least one control flag:
+  flow_rule_is_supp_control_flags()
+
+For drivers using flow_rule_match_control(), but not using flags:
+  flow_rule_has_control_flags()
+
+For drivers not using flow_rule_match_control():
+  flow_rule_match_has_control_flags()
+
+While primarily aimed at FLOW_DISSECTOR_KEY_CONTROL
+and flow_rule_match_control(), then the first two
+can also be used with FLOW_DISSECTOR_KEY_ENC_CONTROL
+and flow_rule_match_enc_control().
+
+These helpers mirrors the existing check done in sfc:
+  drivers/net/ethernet/sfc/tc.c +276
+
+Only compile-tested.
+
+Signed-off-by: Asbj?rn Sloth T?nnesen <ast at fiberby.net>
+Reviewed-by: Louis Peens <louis.peens at corigine.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ include/net/flow_offload.h | 55 ++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 55 insertions(+)
+
+--- a/include/net/flow_offload.h
++++ b/include/net/flow_offload.h
+@@ -449,6 +449,61 @@ static inline bool flow_rule_match_key(c
+ 	return dissector_uses_key(rule->match.dissector, key);
+ }
+ 
++/**
++ * flow_rule_is_supp_control_flags() - check for supported control flags
++ * @supp_flags: control flags supported by driver
++ * @ctrl_flags: control flags present in rule
++ * @extack: The netlink extended ACK for reporting errors.
++ *
++ * Return: true if only supported control flags are set, false otherwise.
++ */
++static inline bool flow_rule_is_supp_control_flags(const u32 supp_flags,
++						   const u32 ctrl_flags,
++						   struct netlink_ext_ack *extack)
++{
++	if (likely((ctrl_flags & ~supp_flags) == 0))
++		return true;
++
++	NL_SET_ERR_MSG_FMT_MOD(extack,
++			       "Unsupported match on control.flags %#x",
++			       ctrl_flags);
++
++	return false;
++}
++
++/**
++ * flow_rule_has_control_flags() - check for presence of any control flags
++ * @ctrl_flags: control flags present in rule
++ * @extack: The netlink extended ACK for reporting errors.
++ *
++ * Return: true if control flags are set, false otherwise.
++ */
++static inline bool flow_rule_has_control_flags(const u32 ctrl_flags,
++					       struct netlink_ext_ack *extack)
++{
++	return !flow_rule_is_supp_control_flags(0, ctrl_flags, extack);
++}
++
++/**
++ * flow_rule_match_has_control_flags() - match and check for any control flags
++ * @rule: The flow_rule under evaluation.
++ * @extack: The netlink extended ACK for reporting errors.
++ *
++ * Return: true if control flags are set, false otherwise.
++ */
++static inline bool flow_rule_match_has_control_flags(struct flow_rule *rule,
++						     struct netlink_ext_ack *extack)
++{
++	struct flow_match_control match;
++
++	if (!flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_CONTROL))
++		return false;
++
++	flow_rule_match_control(rule, &match);
++
++	return flow_rule_has_control_flags(match.mask->flags, extack);
++}
++
+ struct flow_stats {
+ 	u64	pkts;
+ 	u64	bytes;
diff --git a/target/linux/generic/backport-6.6/704-v6.12-ipv6-Add-ipv6_addr_-cpu_to_be32-be32_to_cpu-helpers.patch b/target/linux/generic/backport-6.6/704-v6.12-ipv6-Add-ipv6_addr_-cpu_to_be32-be32_to_cpu-helpers.patch
new file mode 100644
index 0000000000..2f4eec6953
--- /dev/null
+++ b/target/linux/generic/backport-6.6/704-v6.12-ipv6-Add-ipv6_addr_-cpu_to_be32-be32_to_cpu-helpers.patch
@@ -0,0 +1,40 @@
+From f40a455d01f80c6638be382d75cb1c4e7748d8af Mon Sep 17 00:00:00 2001
+From: Simon Horman <horms at kernel.org>
+Date: Tue, 13 Aug 2024 14:33:47 +0100
+Subject: [PATCH] ipv6: Add ipv6_addr_{cpu_to_be32,be32_to_cpu} helpers
+
+Add helpers to convert an ipv6 addr, expressed as an array
+of words, from CPU to big-endian byte order, and vice versa.
+
+No functional change intended.
+Compile tested only.
+
+Suggested-by: Andrew Lunn <andrew at lunn.ch>
+Link: https://lore.kernel.org/netdev/c7684349-535c-45a4-9a74-d47479a50020 at lunn.ch/
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Signed-off-by: Simon Horman <horms at kernel.org>
+Link: https://patch.msgid.link/20240813-ipv6_addr-helpers-v2-1-5c974f8cca3e at kernel.org
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ include/net/ipv6.h | 12 ++++++++++++
+ 1 file changed, 12 insertions(+)
+
+--- a/include/net/ipv6.h
++++ b/include/net/ipv6.h
+@@ -1382,4 +1382,16 @@ static inline void ip6_sock_set_recvpkti
+ 	release_sock(sk);
+ }
+ 
++#define IPV6_ADDR_WORDS 4
++
++static inline void ipv6_addr_cpu_to_be32(__be32 *dst, const u32 *src)
++{
++	cpu_to_be32_array(dst, src, IPV6_ADDR_WORDS);
++}
++
++static inline void ipv6_addr_be32_to_cpu(u32 *dst, const __be32 *src)
++{
++	be32_to_cpu_array(dst, src, IPV6_ADDR_WORDS);
++}
++
+ #endif /* _NET_IPV6_H */



From lede-commits at lists.infradead.org  Thu Aug 21 13:46:28 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 21 Aug 2025 16:46:28 -0400
Subject: [openwrt/openwrt]  ramips: add support for Hongdian H7920 v40
In-Reply-To: <175580918863.381349.15038230856782394625@git-01.infra.openwrt.org>
References: <175580918863.381349.15038230856782394625@git-01.infra.openwrt.org>
Message-ID: <mailman.126584.1755828845.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/05db6b3c5aa1eebbaf510f9954f2c7d2bb7a0963

commit 05db6b3c5aa1eebbaf510f9954f2c7d2bb7a0963
Author: Coia Prant <coiaprant at gmail.com>
AuthorDate: Sat Aug 9 01:35:57 2025 +0800

    ramips: add support for Hongdian H7920 v40
    
    This is an industrial 4G router equipped with OpenWrt SNAPSHOT OEM
    customized version
    
    WARNING: The original firmware device tree is modified from evb
    boards, and the device tree name is evb board. This submitted device
    tree is a modified version, which deletes the non-this-device parts
    and adds GPIO watchdog.
    
    Specification:
    - SoC: MediaTek MT7628NN
    - Flash: 16 MB
    - RAM: 128 MB
    - Power: DC 5V-36V 1.5A
    - Ethernet: 1x WAN [slot not install], 1x LAN (10/100 Mbps)
    - Wireless radio: 802.11n 2.4g-only [antenna not install]
    - LED:
      System/Power (RUN): GPIO/37 active-low
      Modem: GPIO/3 active-low
      RF (Modem Signal): GPIO/2 active-low
    - Button:
      WPS / RESET: GPIO/11 active-low
    - UART: 1x UART on PCB - 115200 8N1
    - Serial / COM: 1X RS232/RS485 on board (GPIO/6 hi:RS485 lo:RS232)
    - GPIO Watchdog: GPIO/0 mode=toggle timeout=1s
    - Modem: 1x Built-in modem on board (Power: GPIO/4 active-high)
    - PCIe: 1x miniPCIe for modem [slot not install]
    - SIM Slots: 1x SIM Slots
    
    Issue:
    - Factory partition not store mac address on original firmware
    
    Flash instruction:
    Using SSH/Telnet:
    1. Connect the board to the computer via RJ45 Ethernet
    2. Login 192.168.8.1 with root password "superzxmn" (SSH Port 22, Telnet Port 5188)
    3. Download openwrt firmware on the computer.
    4. Use scp or sftp put firmware to board /tmp
    5. Use command "mtd -r write openwrt-ramips-mt76x8-hongdian_h7920-v40-squashfs-sysupgrade.bin firmware"
       to flash
    
    Original Firmware Dump / More details:
    https://blog.gov.cooking/archives/research-hongdian-h7920-v40-and-flash.html
    
    Signed-off-by: Coia Prant <coiaprant at gmail.com>
    Tested-by: Coia Prant <coiaprant at gmail.com>
    (cherry picked from commit ebee9462273d3d30dbd29434e4f715ce39f80efc)
    Link: https://github.com/openwrt/openwrt/pull/19716
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../ramips/dts/mt7628an_hongdian_h7920-v40.dts     | 171 +++++++++++++++++++++
 target/linux/ramips/image/mt76x8.mk                |   9 ++
 .../mt76x8/base-files/etc/board.d/02_network       |   4 +-
 .../mt76x8/base-files/etc/board.d/03_gpio_switches |  20 +++
 4 files changed, 203 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/mt7628an_hongdian_h7920-v40.dts b/target/linux/ramips/dts/mt7628an_hongdian_h7920-v40.dts
new file mode 100644
index 0000000000..76c395c382
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_hongdian_h7920-v40.dts
@@ -0,0 +1,171 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "hongdian,h7920-v40", "mediatek,mt7628an-soc";
+	model = "Hongdian H7920 v40";
+
+	aliases {
+		led-boot = &led_sys;
+		led-failsafe = &led_sys;
+		led-running = &led_sys;
+		led-upgrade = &led_sys;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,115200";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led-rf {
+			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = "rf";
+		};
+
+		led-net {
+			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_MOBILE;
+		};
+
+		led_sys: led-sys {
+			gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_POWER;
+			default-state = "on";
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	watchdog {
+		compatible = "linux,wdt-gpio";
+
+		gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+		hw_algo = "toggle";
+		hw_margin_ms = <600>;
+		always-running;
+	};
+
+	gpio-export {
+		compatible = "gpio-export";
+
+		gpio_modem_power {
+			gpio-export,name = "modem_power";
+			gpio-export,output = <0>;
+			gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
+		};
+
+		gpio_serial_rs485_mode {
+			gpio-export,name = "serial_rs485_mode";
+			gpio-export,output = <0>;
+			gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&watchdog {
+	status = "disabled";
+};
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <40000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x30000>;
+				read-only;
+			};
+
+			partition at 30000 {
+				label = "u-boot-env";
+				reg = <0x30000 0x10000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "factory";
+				reg = <0x40000 0x10000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x400>;
+					};
+
+					macaddr_factory_28: macaddr at 28 {
+						reg = <0x28 0x6>;
+					};
+				};
+			};
+
+			partition at 50000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x50000 0xfb0000>;
+			};
+		};
+	};
+};
+
+&state_default {
+	gpio {
+		groups = "i2s", "gpio", "refclk";
+		function = "gpio";
+	};
+};
+
+&ethernet {
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
+};
+
+&esw {
+	mediatek,portmap = <0x3e>;
+	mediatek,portdisable = <0x3c>;
+};
+
+&wmac {
+	status = "okay";
+
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+};
+
+&uart1 {
+	status = "okay";
+};
+
+&pcie {
+	status = "okay";
+};
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index c7168cc936..314f8e1e9f 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -321,6 +321,15 @@ define Device/hiwifi_hc5861b
 endef
 TARGET_DEVICES += hiwifi_hc5861b
 
+define Device/hongdian_h7920-v40
+  IMAGE_SIZE := 16064k
+  DEVICE_VENDOR := Hongdian
+  DEVICE_MODEL := H7920
+  DEVICE_VARIANT := v40
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi
+endef
+TARGET_DEVICES += hongdian_h7920-v40
+
 define Device/iptime_a3
   IMAGE_SIZE := 7936k
   UIMAGE_NAME := a3
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
index 23ec31f912..372821c3b8 100644
--- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
@@ -107,7 +107,8 @@ ramips_setup_interfaces()
 			"2:lan:2" "3:lan:1" "4:wan" "6 at eth0"
 		;;
 	duzun,dm06|\
-	glinet,gl-mt300n-v2)
+	glinet,gl-mt300n-v2|\
+	hongdian,h7920-v40)
 		ucidef_add_switch "switch0" \
 			"1:lan" "0:wan" "6 at eth0"
 		;;
@@ -277,6 +278,7 @@ ramips_setup_macs()
 	totolink,a3)
 		wan_mac=$(mtd_get_mac_binary u-boot 0x1fc40)
 		;;
+	hongdian,h7920-v40|\
 	jotale,js76x8-8m|\
 	jotale,js76x8-16m|\
 	jotale,js76x8-32m|\
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/mt76x8/base-files/etc/board.d/03_gpio_switches
new file mode 100644
index 0000000000..c70e59c480
--- /dev/null
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/03_gpio_switches
@@ -0,0 +1,20 @@
+#
+# Copyright (C) 2025 OpenWrt.org
+#
+
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+board=$(board_name)
+
+case "$board" in
+hongdian,h7920-v40)
+	ucidef_add_gpio_switch "modem_enable" "Modem power" "modem_power" "1"
+	ucidef_add_gpio_switch "switch_serial_mode" "Switch RS232 to RS485" "serial_rs485_mode" "0"
+	;;
+esac
+
+board_config_flush
+
+exit 0



From lede-commits at lists.infradead.org  Thu Aug 21 13:50:08 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 21 Aug 2025 16:50:08 -0400
Subject: [openwrt/openwrt]  mediatek: filogic: D-Link M30/M60: include
 initramfs in recovery
In-Reply-To: <175580940864.398120.6073977544952389892@git-01.infra.openwrt.org>
References: <175580940864.398120.6073977544952389892@git-01.infra.openwrt.org>
Message-ID: <mailman.126593.1755829168.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/124f61eddbdc668ef5fc709b90510278f041bb64

commit 124f61eddbdc668ef5fc709b90510278f041bb64
Author: Mateusz Krzak <kszaquitto+github at gmail.com>
AuthorDate: Thu May 22 18:36:38 2025 +0200

    mediatek: filogic: D-Link M30/M60: include initramfs in recovery
    
    Currently, if OEM recovery flashes OpenWrt to second ubi1,
    OpenWrt cannot boot. With this commit, recovery image is built
    with initramfs kernel, so that it can boot from either ubi or ubi1.
    
    This adds an extra step to OpenWrt installation from OEM:
    user needs to sysupgrade from initramfs to full system.
    
    Signed-off-by: Mateusz Krzak <kszaquitto+github at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18878
    (cherry picked from commit 6615c8cfc85f1373cf93a9fc08cb1cb3bbefc964)
    Signed-off-by: Mateusz Krzak <kszaquitto+github at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19595
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/mediatek/image/filogic.mk | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index ab5a2b7c87..38db49c692 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -860,7 +860,10 @@ define Device/dlink_aquila-pro-ai-m30-a1
   IMAGES += recovery.bin
   IMAGE_SIZE := 51200k
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
-  IMAGE/recovery.bin := sysupgrade-tar | pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E6110001 \x6A\x28\xEE\x0B \x00\x00\x2C\x00 \x00\x00\x20\x03 \x61\x6E
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+  IMAGE/recovery.bin := append-image-stage initramfs-kernel.bin | sysupgrade-tar kernel=$$$$@ |\
+    pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E6110001 \x6A\x28\xEE\x0B \x00\x00\x2C\x00 \x00\x00\x20\x03 \x61\x6E
+endif
 endef
 TARGET_DEVICES += dlink_aquila-pro-ai-m30-a1
 
@@ -874,7 +877,10 @@ define Device/dlink_aquila-pro-ai-m60-a1
   IMAGES += recovery.bin
   IMAGE_SIZE := 51200k
   IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
-  IMAGE/recovery.bin := sysupgrade-tar | pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E8202001 \x30\x6C\x19\x0C \x00\x00\x2C\x00 \x00\x00\x20\x03 \x82\x6E
+ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
+  IMAGE/recovery.bin := append-image-stage initramfs-kernel.bin | sysupgrade-tar kernel=$$$$@ |\
+    pad-to $$(IMAGE_SIZE) | dlink-ai-recovery-header DLK6E8202001 \x30\x6C\x19\x0C \x00\x00\x2C\x00 \x00\x00\x20\x03 \x82\x6E
+endif
 endef
 TARGET_DEVICES += dlink_aquila-pro-ai-m60-a1
 



From lede-commits at lists.infradead.org  Thu Aug 21 13:55:35 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 21 Aug 2025 16:55:35 -0400
Subject: [openwrt/openwrt]  mediatek: add support for OpenFi 6C
In-Reply-To: <175580973589.425752.5192402287824616404@git-01.infra.openwrt.org>
References: <175580973589.425752.5192402287824616404@git-01.infra.openwrt.org>
Message-ID: <mailman.126596.1755829330.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/191d73846909142c694c6c24e4b8334f9f3d4df1

commit 191d73846909142c694c6c24e4b8334f9f3d4df1
Author: Jiasheng Zhu <newbanyaya at gmail.com>
AuthorDate: Sun Jul 27 00:55:08 2025 +0800

    mediatek: add support for OpenFi 6C
    
    PR of openwrt:main: https://github.com/openwrt/openwrt/pull/19512
    
    OpenFi 6C is a portable Wi-Fi 6 travel router based on MediaTek MT7981B+MT7976CN.
    
    Two slightly different versions have been sold. The V1 board has a green color and lacks the modem LED. The V2 board is black and has a LED for the modem.
    
    Specifications:
    - SoC: MediaTek MT7981B (Filogic 820) 1.3GHz dual-core ARM Cortex-A53
    - RAM: 1GB DDR4
    - Flash: 256MB SPI NAND
    - Wireless: 2.4GHz/5GHz 802.11ax
    - Ethernet: 1x 10/100/1000M LAN
    - USB: 1x USB 3.0 Type-A port
    - Expansion: M.2 slot for 5G modem
    - Cooling: PWM-controlled fan
    - Buttons: Reset, Mode switch
    - LEDs: System, Ethernet, 5G WiFi, Modem status
    
    **Installation via U-Boot web page**
    
    1. Set static IP 192.168.21.2/255.255.255.0 on your computer.
    2. Connect to the Ethernet port and hold the reset button while booting the device. Wait for 6-8 seconds, and release the reset button.
    3. Open U-boot web page on your browser at http://192.168.21.1
    4. Select the OpenWRT sysupgrade image, upload it, and start the upgrade.
    5. Wait for automatic reboot.
    
    **Installation via sysupgrade**
    
    Flash the sysupgrade file via LuCI upgrade page without saving the settings.
    
    Signed-off-by: Jiasheng Zhu <newbanyaya at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19512
    (cherry picked from commit 536a25ebf849b2de22792786b4c6f0c15471ee93)
    Link: https://github.com/openwrt/openwrt/pull/19536
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/mediatek/dts/mt7981b-openfi-6c.dts    | 272 +++++++++++++++++++++
 .../filogic/base-files/etc/board.d/01_leds         |   3 +
 .../filogic/base-files/etc/board.d/02_network      |   1 +
 target/linux/mediatek/image/filogic.mk             |  13 +
 4 files changed, 289 insertions(+)

diff --git a/target/linux/mediatek/dts/mt7981b-openfi-6c.dts b/target/linux/mediatek/dts/mt7981b-openfi-6c.dts
new file mode 100644
index 0000000000..24de354576
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-openfi-6c.dts
@@ -0,0 +1,272 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+#include "mt7981.dtsi"
+
+/ {
+	model = "OpenFi 6C";
+	compatible = "openfi,6c", "mediatek,mt7981";
+
+	aliases {
+		led-boot = &led_sys_green;
+		led-failsafe = &led_sys_green;
+		led-running = &led_sys_green;
+		led-upgrade = &led_sys_green;
+		serial0 = &uart0;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+		};
+
+		mode {
+			label = "mode";
+			linux,input-type = <EV_SW>;
+			linux,code = <BTN_0>;
+			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	gpio-leds {
+		compatible = "gpio-leds";
+
+		led_sys_green: led-0 {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 2 GPIO_ACTIVE_LOW>;
+		};
+
+		led-1 {
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 34 GPIO_ACTIVE_LOW>;
+		};
+
+		led-2 {
+			function = LED_FUNCTION_WLAN_5GHZ;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 35 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
+		};
+
+		led-3 {
+			function = LED_FUNCTION_MOBILE;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	gpio-export {
+		compatible = "gpio-export";
+
+		modem_power {
+			gpio-export,name = "modem_power";
+			gpio-export,output = <1>;
+			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
+		};
+
+		modem_reset {
+			gpio-export,name = "modem_reset";
+			gpio-export,output = <1>;
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+		};
+
+		modem_reset_2 {
+			gpio-export,name = "modem_reset_2";
+			gpio-export,output = <0>;
+			gpios = <&pio 12 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	usb_vbus: regulator-usb-vbus {
+		compatible = "regulator-fixed";
+		regulator-name = "usb_vbus";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpio = <&pio 8 GPIO_ACTIVE_LOW>;
+		regulator-boot-on;
+	};
+};
+
+&fan {
+	pwms = <&pwm 0 40000 0>;
+	status = "okay";
+};
+
+&eth {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mdio_pins>;
+	status = "okay";
+
+	gmac1: mac at 1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+		nvmem-cells = <&macaddr_factory_4 0>;
+		nvmem-cell-names = "mac-address";
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	status = "okay";
+
+	spi_nand: flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-nand";
+		reg = <0>;
+		spi-max-frequency = <52000000>;
+
+		spi-cal-enable;
+		spi-cal-mode = "read-data";
+		spi-cal-datalen = <7>;
+		spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
+		spi-cal-addrlen = <5>;
+		spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
+
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+		mediatek,nmbm;
+		mediatek,bmt-max-ratio = <1>;
+		mediatek,bmt-max-reserved-blocks = <64>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "BL2";
+				reg = <0x00000 0x0100000>;
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "u-boot-env";
+				reg = <0x0100000 0x0080000>;
+			};
+
+			factory: partition at 180000 {
+				label = "Factory";
+				reg = <0x180000 0x0200000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x1000>;
+					};
+
+					macaddr_factory_4: macaddr at 4 {
+						compatible = "mac-base";
+						reg = <0x4 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+
+			partition at 380000 {
+				label = "FIP";
+				reg = <0x380000 0x0200000>;
+				read-only;
+			};
+
+			partition at 580000 {
+				label = "hw";
+				reg = <0x0580000 0x0080000>;
+				read-only;
+			};
+
+			partition at 600000 {
+				label = "cfg";
+				reg = <0x0600000 0x0080000>;
+				read-only;
+			};
+
+			partition at 680000 {
+				label = "ubi";
+				reg = <0x680000 0xe980000>;
+			};
+		};
+	};
+};
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+	};
+
+	pwm_pins: pwm-pins {
+		mux {
+			function = "pwm";
+			groups = "pwm0_0", "pwm1_0";
+		};
+	};
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+	vbus-supply = <&usb_vbus>;
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&wifi {
+	#address-cells = <1>;
+	#size-cells = <0>;
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+	status = "okay";
+
+	band at 0 {
+		reg = <0>;
+		nvmem-cells = <&macaddr_factory_4 2>;
+		nvmem-cell-names = "mac-address";
+	};
+
+	band at 1 {
+		reg = <1>;
+		nvmem-cells = <&macaddr_factory_4 3>;
+		nvmem-cell-names = "mac-address";
+	};
+};
+
+&pwm {
+	pinctrl-names = "default";
+	pinctrl-0 = <&pwm_pins>;
+	status = "okay";
+};
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
index bafb7bb073..7c2e31a0b5 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
@@ -95,6 +95,9 @@ openembed,som7981)
 	ucidef_set_led_netdev "lanact" "LANACT" "amber:lan" "eth1" "rx tx"
 	ucidef_set_led_netdev "lanlink" "LANLINK" "green:lan" "eth1" "link"
 	;;
+openfi,6c)
+	ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0" "link tx rx"
+	;;
 openwrt,one)
 	ucidef_set_led_netdev "wanact" "WANACT" "mdio-bus:0f:green:wan" "eth0" "rx tx"
 	ucidef_set_led_netdev "wanlink" "WANLINK" "mdio-bus:0f:amber:wan" "eth0" "link"
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
index 6daace1d41..59a7a720f3 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -85,6 +85,7 @@ mediatek_setup_interfaces()
 	cudy,ap3000-v1|\
 	cudy,re3000-v1|\
 	netgear,wax220|\
+	openfi,6c|\
 	ubnt,unifi-6-plus|\
 	wavlink,wl-wn573hx3|\
 	zyxel,nwa50ax-pro)
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 38db49c692..ac039b3476 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -1476,6 +1476,19 @@ define Device/openembed_som7981
 endef
 TARGET_DEVICES += openembed_som7981
 
+define Device/openfi_6c
+  DEVICE_VENDOR := OpenFi
+  DEVICE_MODEL := 6C
+  DEVICE_DTS := mt7981b-openfi-6c
+  DEVICE_DTS_DIR := ../dts
+  DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3
+  KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
+  KERNEL_INITRAMFS := kernel-bin | lzma | \
+        fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += openfi_6c
+
 define Device/openwrt_one
   DEVICE_VENDOR := OpenWrt
   DEVICE_MODEL := One



From lede-commits at lists.infradead.org  Thu Aug 21 13:59:47 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 21 Aug 2025 16:59:47 -0400
Subject: [openwrt/openwrt]  ipq40xx: dts: reduce the maximum SPI clock
 frequency to 24MHz
In-Reply-To: <175580998709.447931.16978708455371356117@git-01.infra.openwrt.org>
References: <175580998709.447931.16978708455371356117@git-01.infra.openwrt.org>
Message-ID: <mailman.126601.1755829492.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/e627539601d61099970ff41317f34dbc74342c75

commit e627539601d61099970ff41317f34dbc74342c75
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Mon Aug 11 18:52:30 2025 +0800

    ipq40xx: dts: reduce the maximum SPI clock frequency to 24MHz
    
    The IPQ4019 datasheet indicates that the maximum supported SPI
    frequency is 25 MHz. My experiment on SKSpruce WIA3300-20 shows
    that exceeding this threshold can lead to instability of SPI
    peripheral. Limit the SPI clock frequency to the QSDK recommended
    value 24MHz to enhance stability.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19744
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit 3ff8a3dca8bc24296f501b3c74214eb5005354bf)
    Link: https://github.com/openwrt/openwrt/pull/19796
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts  | 2 +-
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts       | 2 +-
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi       | 2 +-
 .../ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts | 2 +-
 .../ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts | 2 +-
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts        | 4 ++--
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts      | 2 +-
 .../ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts  | 4 ++--
 .../ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dtsi | 2 +-
 .../ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts | 2 +-
 10 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
index f2690a095d..627ccd5b70 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
@@ -160,7 +160,7 @@
 	flash at 0 {
 		reg = <0>;
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <40000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
index 8b75a57074..50cac400d7 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
@@ -150,7 +150,7 @@
 		#size-cells = <0>;
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <50000000>;
+		spi-max-frequency = <24000000>;
 		m25p,fast-read;
 
 		partitions {
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
index a13fc71987..367dd20a7a 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
@@ -190,7 +190,7 @@
 	mx25l12805d at 0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <45000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
index d91725dfb7..ae244a6696 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
@@ -155,7 +155,7 @@
 	flash at 0 {
 		reg = <0>;
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <40000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
index 2b79169c0d..d33afc7d38 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
@@ -170,7 +170,7 @@
 	flash at 0 {
 		compatible = "jedec,spi-nor";
 		reg = <0>;
-		spi-max-frequency = <50000000>;
+		spi-max-frequency = <24000000>;
 		status = "okay";
 		m25p,fast-read;
 
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
index 946b3b3038..7477d5ddc4 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
@@ -182,7 +182,7 @@
 		compatible = "jedec,spi-nor";
 		reg = <0>;
 		linux,modalias = "m25p80", "mx25l1606e", "n25q128a11";
-		spi-max-frequency = <30000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
@@ -236,7 +236,7 @@
 	spi-nand at 1 {
 		compatible = "spi-nand";
 		reg = <1>;
-		spi-max-frequency = <30000000>;
+		spi-max-frequency = <24000000>;
 
 		/*
 		 * U-boot looks for "spinand,mt29f" node,
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
index d434145278..f588d94142 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
@@ -159,7 +159,7 @@
 	flash at 0 {
 		reg = <0>;
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <40000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
index 982ceef044..fc862a25b1 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
@@ -206,7 +206,7 @@
 
 	flash at 0 {
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <50000000>;
+		spi-max-frequency = <24000000>;
 		reg = <0>;
 
 		partitions {
@@ -298,7 +298,7 @@
 	nand at 1 {
 		compatible = "spi-nand";
 		reg = <1>;
-		spi-max-frequency = <48000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dtsi
index f8b458f9f7..83dd4b925b 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dtsi
@@ -123,7 +123,7 @@
 	flash at 0 {
 		reg = <0>;
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <40000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
index bd7f1b5cb9..bbc93c083d 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
@@ -226,7 +226,7 @@
 	flash at 0 {
 		reg = <0>;
 		compatible = "jedec,spi-nor";
-		spi-max-frequency = <40000000>;
+		spi-max-frequency = <24000000>;
 
 		partitions {
 			compatible = "fixed-partitions";



From lede-commits at lists.infradead.org  Fri Aug 22 00:05:49 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 22 Aug 2025 03:05:49 -0400
Subject: [openwrt/openwrt]  include: make APK .list files reproducible
In-Reply-To: <175584634985.3149412.13584211545708638805@git-01.infra.openwrt.org>
References: <175584634985.3149412.13584211545708638805@git-01.infra.openwrt.org>
Message-ID: <mailman.127079.1755861643.1866309.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/aff2f096235b62cdccc47b9e453c318c8f90e1f6

commit aff2f096235b62cdccc47b9e453c318c8f90e1f6
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Fri Aug 22 00:16:02 2025 +0200

    include: make APK .list files reproducible
    
    The order may vary between builds, a re-build showed that error locally. Run
    `sort` to have this fixed.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 include/package-pack.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/package-pack.mk b/include/package-pack.mk
index 14500473c9..318d8ee5f6 100644
--- a/include/package-pack.mk
+++ b/include/package-pack.mk
@@ -353,7 +353,7 @@ else
 
 	if [ -n "$(USERID)" ]; then echo $(USERID) > $$(IDIR_$(1))/lib/apk/packages/$(1).rusers; fi;
 	if [ -n "$(ALTERNATIVES)" ]; then echo $(ALTERNATIVES) > $$(IDIR_$(1))/lib/apk/packages/$(1).alternatives; fi;
-	(cd $$(IDIR_$(1)) && find . -type f,l -printf "/%P\n" > $$(IDIR_$(1))/lib/apk/packages/$(1).list)
+	(cd $$(IDIR_$(1)) && find . -type f,l -printf "/%P\n" | sort > $$(IDIR_$(1))/lib/apk/packages/$(1).list)
 	# Move conffiles to IDIR and build conffiles_static with csums
 	if [ -f $$(ADIR_$(1))/conffiles ]; then \
 		mv -f $$(ADIR_$(1))/conffiles $$(IDIR_$(1))/lib/apk/packages/$(1).conffiles; \



From lede-commits at lists.infradead.org  Fri Aug 22 02:24:47 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 22 Aug 2025 05:24:47 -0400
Subject: [openwrt/openwrt]  uboot-layerscape: do not build efimkcapsule tool
In-Reply-To: <175585468713.3769481.10292723318871639297@git-01.infra.openwrt.org>
References: <175585468713.3769481.10292723318871639297@git-01.infra.openwrt.org>
Message-ID: <mailman.127225.1755872096.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5b3c82358971a4da1ad6d7a718692bdc03a38d12

commit 5b3c82358971a4da1ad6d7a718692bdc03a38d12
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Fri Aug 22 09:06:43 2025 +0800

    uboot-layerscape: do not build efimkcapsule tool
    
    OpenWrt layerscape target does not use this command. If the host is
    missing gnutls, this tool will fail to build. Fix build error:
    
    tools/mkeficapsule.c:20:10: fatal error: gnutls/gnutls.h: No such file or directory
       20 | #include <gnutls/gnutls.h>
          |          ^~~~~~~~~~~~~~~~~
    
    Fixes: c773c3f4d377 ("uboot-layerscape: bump to lf-6.12.20-2.0.0")
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19836
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/boot/uboot-layerscape/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile
index 3fad12efe4..f97cdd9faf 100644
--- a/package/boot/uboot-layerscape/Makefile
+++ b/package/boot/uboot-layerscape/Makefile
@@ -151,6 +151,9 @@ UBOOT_TARGETS := \
   fsl_ls1021a-twr-sdboot \
   fsl_ls1021a-iot-sdboot
 
+UBOOT_CUSTOMIZE_CONFIG := \
+	--disable TOOLS_MKEFICAPSULE
+
 define Build/InstallDev
 	$(INSTALL_DIR) $(STAGING_DIR_IMAGE)
 	$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(UBOOT_IMAGE) \



From lede-commits at lists.infradead.org  Fri Aug 22 03:34:53 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 22 Aug 2025 06:34:53 -0400
Subject: [openwrt/openwrt]  toolchain/binutils: export ZSTD_CFLAGS/LIBS to fix
 non-Linux build
In-Reply-To: <175585889357.4088374.8338448770213243542@git-01.infra.openwrt.org>
References: <175585889357.4088374.8338448770213243542@git-01.infra.openwrt.org>
Message-ID: <mailman.127309.1755876540.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3b54f821d0337fbe2e06b005cd8bd682a99df20d

commit 3b54f821d0337fbe2e06b005cd8bd682a99df20d
Author: Mark Mentovai <mark at mentovai.com>
AuthorDate: Sun Aug 17 00:41:29 2025 -0400

    toolchain/binutils: export ZSTD_CFLAGS/LIBS to fix non-Linux build
    
    This is what 66dfbca262f4e6ebc1b4f94fb1c4482894c26d0c (updated by
    2872ff7be19cfd20c95c4cbc880c0af38f82ea15) did for toolchain/gdb, but for
    toolchain/binutils, following the switch to binutils-2.44 by default in
    854d88be8ad4f26059deeb3748617ca32dfdff15.
    
    Signed-off-by: Mark Mentovai <mark at mentovai.com>
    Link: https://github.com/openwrt/openwrt/pull/19833
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 toolchain/binutils/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile
index 84f12c6ad3..7077195e27 100644
--- a/toolchain/binutils/Makefile
+++ b/toolchain/binutils/Makefile
@@ -38,6 +38,9 @@ PATCH_DIR:=./patches/$(PKG_VERSION)
 
 include $(INCLUDE_DIR)/toolchain-build.mk
 
+export ZSTD_CFLAGS=-I$(STAGING_DIR_HOST)/include -pthread
+export ZSTD_LIBS=-L$(STAGING_DIR_HOST)/lib -lzstd -lpthread
+
 ifdef CONFIG_GCC_USE_GRAPHITE
   GRAPHITE_CONFIGURE:= --with-isl=$(STAGING_DIR_HOST)
 else



From lede-commits at lists.infradead.org  Fri Aug 22 11:19:15 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 22 Aug 2025 14:19:15 -0400
Subject: [openwrt/openwrt]  omap: enable 6.12 testing kernel
In-Reply-To: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
References: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
Message-ID: <mailman.128024.1755925076.1866309.lede-commits@lists.infradead.org>

lynxis pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/db0b0e14be4ce3cb39d89dfff1a2cba10a91b17c

commit db0b0e14be4ce3cb39d89dfff1a2cba10a91b17c
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Wed May 7 08:53:22 2025 +0200

    omap: enable 6.12 testing kernel
    
    The omap target now supports 6.12 kernel as testing.
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 target/linux/omap/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/omap/Makefile b/target/linux/omap/Makefile
index 67db2aa07d..ba432ca103 100644
--- a/target/linux/omap/Makefile
+++ b/target/linux/omap/Makefile
@@ -13,6 +13,7 @@ CPU_SUBTYPE:=vfpv3
 SUBTARGETS:=generic
 
 KERNEL_PATCHVER:=6.6
+KERNEL_TESTING_PATCHVER:=6.12
 
 KERNELNAME:=zImage dtbs
 



From lede-commits at lists.infradead.org  Fri Aug 22 11:19:14 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 22 Aug 2025 14:19:14 -0400
Subject: [openwrt/openwrt]  omap: update kernel 6.12 config
In-Reply-To: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
References: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
Message-ID: <mailman.128025.1755925076.1866309.lede-commits@lists.infradead.org>

lynxis pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9273904ac7571728668c2cfa4474e1f55c2604d7

commit 9273904ac7571728668c2cfa4474e1f55c2604d7
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Wed May 7 08:52:57 2025 +0200

    omap: update kernel 6.12 config
    
    Plain `make kernel_oldconfig`
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 target/linux/omap/config-6.12 | 25 +++++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/target/linux/omap/config-6.12 b/target/linux/omap/config-6.12
index 43ab179121..39b63c50cd 100644
--- a/target/linux/omap/config-6.12
+++ b/target/linux/omap/config-6.12
@@ -27,6 +27,7 @@ CONFIG_ARM_ATAG_DTB_COMPAT=y
 CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
 CONFIG_ARM_CPUIDLE=y
 CONFIG_ARM_CPU_SUSPEND=y
+# CONFIG_ARM_DEBUG_WX is not set
 CONFIG_ARM_ERRATA_430973=y
 CONFIG_ARM_ERRATA_720789=y
 CONFIG_ARM_ERRATA_754322=y
@@ -37,6 +38,7 @@ CONFIG_ARM_HEAVY_MB=y
 CONFIG_ARM_L1_CACHE_SHIFT=6
 CONFIG_ARM_L1_CACHE_SHIFT_6=y
 CONFIG_ARM_OMAP2PLUS_CPUFREQ=y
+CONFIG_ARM_PAN=y
 CONFIG_ARM_PATCH_IDIV=y
 CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_ARM_THUMB=y
@@ -75,7 +77,6 @@ CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMA=y
 CONFIG_CMA_ALIGNMENT=8
 CONFIG_CMA_AREAS=7
-# CONFIG_CMA_DEBUG is not set
 # CONFIG_CMA_DEBUGFS is not set
 CONFIG_CMA_SIZE_MBYTES=16
 # CONFIG_CMA_SIZE_SEL_MAX is not set
@@ -139,9 +140,7 @@ CONFIG_CRC_ITU_T=y
 CONFIG_CRC_T10DIF=y
 CONFIG_CRYPTO_AES_ARM=y
 CONFIG_CRYPTO_AES_ARM_BS=y
-CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y
 CONFIG_CRYPTO_CBC=y
-CONFIG_CRYPTO_CHACHA20_NEON=y
 CONFIG_CRYPTO_CRC32=y
 CONFIG_CRYPTO_CRC32C=y
 CONFIG_CRYPTO_CRCT10DIF=y
@@ -199,15 +198,20 @@ CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
 CONFIG_DMADEVICES=y
 CONFIG_DMA_CMA=y
 CONFIG_DMA_ENGINE=y
+CONFIG_DMA_NEED_SYNC=y
 CONFIG_DMA_OF=y
 CONFIG_DMA_OMAP=y
-CONFIG_DMA_OPS=y
+CONFIG_DMA_OPS_HELPERS=y
 CONFIG_DMA_SHARED_BUFFER=y
 CONFIG_DMA_VIRTUAL_CHANNELS=y
 CONFIG_DNS_RESOLVER=y
 CONFIG_DRM=y
 CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_BRIDGE_CONNECTOR=y
 CONFIG_DRM_DISPLAY_CONNECTOR=y
+CONFIG_DRM_DISPLAY_HDMI_HELPER=y
+CONFIG_DRM_DISPLAY_HDMI_STATE_HELPER=y
+CONFIG_DRM_DISPLAY_HELPER=y
 CONFIG_DRM_KMS_HELPER=y
 CONFIG_DRM_MIPI_DSI=y
 CONFIG_DRM_OMAP=y
@@ -223,6 +227,7 @@ CONFIG_DRM_PANEL_TPO_TD043MTEA1=y
 CONFIG_DRM_SIMPLE_BRIDGE=y
 CONFIG_DRM_TI_TFP410=y
 CONFIG_DRM_TI_TPD12S015=y
+# CONFIG_DRM_WERROR is not set
 CONFIG_DTC=y
 CONFIG_DT_IDLE_STATES=y
 CONFIG_EDAC_ATOMIC_SCRUB=y
@@ -252,6 +257,7 @@ CONFIG_GENERIC_BUG=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_DEVICES=y
 CONFIG_GENERIC_CPU_VULNERABILITIES=y
 CONFIG_GENERIC_EARLY_IOREMAP=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
@@ -406,6 +412,7 @@ CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_SRCU_NMI_SAFE=y
 CONFIG_NEON=y
 CONFIG_NET_DEVLINK=y
+CONFIG_NET_DEVMEM=y
 CONFIG_NET_EGRESS=y
 CONFIG_NET_FLOW_LIMIT=y
 CONFIG_NET_HANDSHAKE=y
@@ -442,6 +449,7 @@ CONFIG_OF_MDIO=y
 CONFIG_OID_REGISTRY=y
 CONFIG_OLD_SIGACTION=y
 CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_OMAP2PLUS_PRM=y
 CONFIG_OMAP2_DSS_DPI=y
 CONFIG_OMAP2_DSS_DSI=y
 CONFIG_OMAP2_DSS_HDMI_COMMON=y
@@ -476,8 +484,8 @@ CONFIG_PAGE_OFFSET=0xC0000000
 CONFIG_PAGE_POOL=y
 CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
 CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
-CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PER_VMA_LOCK=y
 CONFIG_PGTABLE_LEVELS=2
 CONFIG_PHYLIB=y
 CONFIG_PHYLIB_LEDS=y
@@ -498,7 +506,6 @@ CONFIG_POWER_AVS_OMAP=y
 CONFIG_POWER_AVS_OMAP_CLASS3=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_PPS=y
-CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PRINTK_TIME=y
 CONFIG_PROC_EVENTS=y
 CONFIG_PROFILING=y
@@ -506,7 +513,6 @@ CONFIG_PTP_1588_CLOCK=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_PWM=y
 # CONFIG_PWM_OMAP_DMTIMER is not set
-CONFIG_PWM_SYSFS=y
 CONFIG_PWM_TIECAP=y
 CONFIG_PWM_TIEHRPWM=y
 # CONFIG_PWM_TWL is not set
@@ -611,7 +617,6 @@ CONFIG_SND_SOC_TI_SDMA_PCM=y
 CONFIG_SND_SOC_TI_UDMA_PCM=y
 CONFIG_SND_SOC_TWL4030=y
 CONFIG_SND_SOC_TWL6040=y
-CONFIG_SND_VERBOSE_PRINTK=y
 CONFIG_SOCK_RX_QUEUE_MAPPING=y
 CONFIG_SOC_AM33XX=y
 CONFIG_SOC_AM43XX=y
@@ -629,6 +634,7 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 CONFIG_SPI_OMAP24XX=y
 CONFIG_SPI_TI_QSPI=y
+CONFIG_SPLIT_PTE_PTLOCKS=y
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 CONFIG_SRAM=y
 CONFIG_SRAM_EXEC=y
@@ -701,9 +707,8 @@ CONFIG_USE_OF=y
 CONFIG_VFAT_FS=y
 CONFIG_VFP=y
 CONFIG_VFPv3=y
+CONFIG_VIDEO=y
 CONFIG_VIDEOMODE_HELPERS=y
-CONFIG_VIDEO_CMDLINE=y
-CONFIG_VIDEO_NOMODESET=y
 CONFIG_WATCHDOG_CORE=y
 CONFIG_XFRM_ALGO=y
 CONFIG_XFRM_MIGRATE=y



From lede-commits at lists.infradead.org  Fri Aug 22 11:19:09 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 22 Aug 2025 14:19:09 -0400
Subject: [openwrt/openwrt]  omap: update kernel 6.6 config
In-Reply-To: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
References: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
Message-ID: <mailman.128026.1755925076.1866309.lede-commits@lists.infradead.org>

lynxis pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c4eb2425ed8e429bf526f9eae13f48771c82b297

commit c4eb2425ed8e429bf526f9eae13f48771c82b297
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Wed May 7 08:42:28 2025 +0200

    omap: update kernel 6.6 config
    
    Plain `make kernel_oldconfig`
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 target/linux/omap/config-6.6 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/linux/omap/config-6.6 b/target/linux/omap/config-6.6
index 7a99a9c297..43ab179121 100644
--- a/target/linux/omap/config-6.6
+++ b/target/linux/omap/config-6.6
@@ -163,6 +163,9 @@ CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_HW=y
 CONFIG_CRYPTO_JITTERENTROPY=y
+CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64
+CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32
+CONFIG_CRYPTO_JITTERENTROPY_OSR=1
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
 CONFIG_CRYPTO_LIB_DES=y
 CONFIG_CRYPTO_LIB_GF128MUL=y
@@ -238,6 +241,7 @@ CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
+CONFIG_FS_POSIX_ACL=y
 CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y



From lede-commits at lists.infradead.org  Fri Aug 22 11:19:12 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 22 Aug 2025 14:19:12 -0400
Subject: [openwrt/openwrt]  omap: refresh kernel 6.12 patches
In-Reply-To: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
References: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
Message-ID: <mailman.128027.1755925076.1866309.lede-commits@lists.infradead.org>

lynxis pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1b16dffeb6764c5cd8fd44a5614ccd38d8cc5da1

commit 1b16dffeb6764c5cd8fd44a5614ccd38d8cc5da1
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Wed May 7 08:50:21 2025 +0200

    omap: refresh kernel 6.12 patches
    
    Plain `make target/linux/refresh`
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 target/linux/omap/patches-6.12/900-use-cpsw-ethernet-driver.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/omap/patches-6.12/900-use-cpsw-ethernet-driver.patch b/target/linux/omap/patches-6.12/900-use-cpsw-ethernet-driver.patch
index 31fa0028c6..5ac202a228 100644
--- a/target/linux/omap/patches-6.12/900-use-cpsw-ethernet-driver.patch
+++ b/target/linux/omap/patches-6.12/900-use-cpsw-ethernet-driver.patch
@@ -19,7 +19,7 @@ Signed-off-by: Jan Hoffmann <jan at 3e8.eu>
 
 --- a/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi
 +++ b/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi
-@@ -358,27 +358,24 @@
+@@ -382,27 +382,24 @@
  	};
  };
  



From lede-commits at lists.infradead.org  Fri Aug 22 11:19:11 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 22 Aug 2025 14:19:11 -0400
Subject: [openwrt/openwrt]  kernel/omap: Restore kernel files for v6.6
In-Reply-To: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
References: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
Message-ID: <mailman.128028.1755925076.1866309.lede-commits@lists.infradead.org>

lynxis pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2baec9856b8e5d68afc87aa219af2600e847d4e5

commit 2baec9856b8e5d68afc87aa219af2600e847d4e5
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Wed May 7 08:44:19 2025 +0200

    kernel/omap: 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
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 target/linux/omap/config-6.6                       | 720 +++++++++++++++++++++
 .../patches-6.6/900-use-cpsw-ethernet-driver.patch |  93 +++
 2 files changed, 813 insertions(+)

diff --git a/target/linux/omap/config-6.6 b/target/linux/omap/config-6.6
new file mode 100644
index 0000000000..43ab179121
--- /dev/null
+++ b/target/linux/omap/config-6.6
@@ -0,0 +1,720 @@
+# CONFIG_AHCI_DM816 is not set
+CONFIG_ALIGNMENT_TRAP=y
+CONFIG_AM335X_CONTROL_USB=y
+CONFIG_AM335X_PHY_USB=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MULTIPLATFORM=y
+CONFIG_ARCH_MULTI_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED=y
+CONFIG_ARCH_OMAP=y
+CONFIG_ARCH_OMAP2PLUS=y
+CONFIG_ARCH_OMAP2PLUS_TYPICAL=y
+CONFIG_ARCH_OMAP3=y
+CONFIG_ARCH_OMAP4=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_STACKWALK=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARM=y
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
+CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_ARM_CPUIDLE=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_ERRATA_430973=y
+CONFIG_ARM_ERRATA_720789=y
+CONFIG_ARM_ERRATA_754322=y
+CONFIG_ARM_ERRATA_775420=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_HAS_GROUP_RELOCS=y
+CONFIG_ARM_HEAVY_MB=y
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+CONFIG_ARM_OMAP2PLUS_CPUFREQ=y
+CONFIG_ARM_PATCH_IDIV=y
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_THUMBEE=y
+CONFIG_ARM_TI_CPUFREQ=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_VIRT_EXT=y
+CONFIG_ASSOCIATIVE_ARRAY=y
+CONFIG_AT803X_PHY=y
+CONFIG_ATA=y
+CONFIG_AUDIT=y
+CONFIG_AUDITSYSCALL=y
+CONFIG_AUDIT_GENERIC=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_TPS65217 is not set
+CONFIG_BCH=y
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=16384
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_PM=y
+CONFIG_BOUNCE=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_BUFFER_HEAD=y
+CONFIG_CACHE_L2X0=y
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CEC_CORE=y
+# CONFIG_CHARGER_TPS65217 is not set
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLKSRC_TI_32K=y
+CONFIG_CLK_TWL6040=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMA=y
+CONFIG_CMA_ALIGNMENT=8
+CONFIG_CMA_AREAS=7
+# CONFIG_CMA_DEBUG is not set
+# CONFIG_CMA_DEBUGFS is not set
+CONFIG_CMA_SIZE_MBYTES=16
+# CONFIG_CMA_SIZE_SEL_MAX is not set
+CONFIG_CMA_SIZE_SEL_MBYTES=y
+# CONFIG_CMA_SIZE_SEL_MIN is not set
+# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
+# CONFIG_CMA_SYSFS is not set
+CONFIG_CMDLINE="root=/dev/mmcblk0p2 rootwait console=ttyO2,115200"
+CONFIG_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_COMMON_CLK=y
+# CONFIG_COMMON_CLK_PALMAS is not set
+# CONFIG_COMMON_CLK_TI_ADPLL is not set
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONFIGFS_FS=y
+CONFIG_CONNECTOR=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
+CONFIG_CONTIG_ALLOC=y
+CONFIG_CPUFREQ_DT=y
+CONFIG_CPUFREQ_DT_PLATDEV=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_GOV_ATTR_SET=y
+CONFIG_CPU_FREQ_GOV_COMMON=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MITIGATIONS=y
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SPECTRE=y
+CONFIG_CPU_THERMAL=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRAMFS=y
+CONFIG_CRC16=y
+CONFIG_CRC7=y
+CONFIG_CRC_CCITT=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CRYPTO_AES_ARM=y
+CONFIG_CRYPTO_AES_ARM_BS=y
+CONFIG_CRYPTO_ARCH_HAVE_LIB_CHACHA=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_CHACHA20_NEON=y
+CONFIG_CRYPTO_CRC32=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_CRCT10DIF=y
+CONFIG_CRYPTO_CRYPTD=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_DEV_OMAP=y
+CONFIG_CRYPTO_DEV_OMAP_AES=y
+CONFIG_CRYPTO_DEV_OMAP_DES=y
+CONFIG_CRYPTO_DEV_OMAP_SHAM=y
+CONFIG_CRYPTO_DRBG=y
+CONFIG_CRYPTO_DRBG_HMAC=y
+CONFIG_CRYPTO_DRBG_MENU=y
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_ENGINE=y
+CONFIG_CRYPTO_GENIV=y
+CONFIG_CRYPTO_GHASH_ARM_CE=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_JITTERENTROPY=y
+CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKS=64
+CONFIG_CRYPTO_JITTERENTROPY_MEMORY_BLOCKSIZE=32
+CONFIG_CRYPTO_JITTERENTROPY_OSR=1
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_DES=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_LZO=y
+# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
+# CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is not set
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_RNG_DEFAULT=y
+CONFIG_CRYPTO_SEQIV=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA1_ARM=y
+CONFIG_CRYPTO_SHA1_ARM_NEON=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA256_ARM=y
+CONFIG_CRYPTO_SHA3=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_CRYPTO_SHA512_ARM=y
+CONFIG_CRYPTO_SIG2=y
+CONFIG_CRYPTO_SIMD=y
+CONFIG_CRYPTO_ZSTD=y
+CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DDR=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DMADEVICES=y
+CONFIG_DMA_CMA=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OMAP=y
+CONFIG_DMA_OPS=y
+CONFIG_DMA_SHARED_BUFFER=y
+CONFIG_DMA_VIRTUAL_CHANNELS=y
+CONFIG_DNS_RESOLVER=y
+CONFIG_DRM=y
+CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_DISPLAY_CONNECTOR=y
+CONFIG_DRM_KMS_HELPER=y
+CONFIG_DRM_MIPI_DSI=y
+CONFIG_DRM_OMAP=y
+CONFIG_DRM_PANEL=y
+CONFIG_DRM_PANEL_BRIDGE=y
+CONFIG_DRM_PANEL_LG_LB035Q02=y
+CONFIG_DRM_PANEL_NEC_NL8048HL11=y
+CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
+CONFIG_DRM_PANEL_SHARP_LS037V7DW01=y
+CONFIG_DRM_PANEL_SONY_ACX565AKM=y
+CONFIG_DRM_PANEL_TPO_TD028TTEC1=y
+CONFIG_DRM_PANEL_TPO_TD043MTEA1=y
+CONFIG_DRM_SIMPLE_BRIDGE=y
+CONFIG_DRM_TI_TFP410=y
+CONFIG_DRM_TI_TPD12S015=y
+CONFIG_DTC=y
+CONFIG_DT_IDLE_STATES=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EEPROM_93CX6=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_EXT4_FS=y
+CONFIG_EXTCON=y
+CONFIG_EXTCON_PALMAS=y
+CONFIG_EXTCON_USB_GPIO=y
+CONFIG_F2FS_FS=y
+CONFIG_FANOTIFY=y
+CONFIG_FAT_FS=y
+CONFIG_FHANDLE=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FUNCTION_ALIGNMENT=0
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ARCH_TOPOLOGY=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_PINCTRL_GROUPS=y
+CONFIG_GENERIC_PINMUX_FUNCTIONS=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_VDSO_32=y
+CONFIG_GLOB=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_OMAP=y
+CONFIG_GPIO_PALMAS=y
+CONFIG_GPIO_PCA953X=y
+CONFIG_GPIO_PCA953X_IRQ=y
+CONFIG_GPIO_PCF857X=y
+# CONFIG_GPIO_TPS65218 is not set
+CONFIG_GPIO_TPS65910=y
+CONFIG_GPIO_TWL4030=y
+CONFIG_GPIO_TWL6040=y
+CONFIG_GRACE_PERIOD=y
+CONFIG_GRO_CELLS=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HAVE_SMP=y
+CONFIG_HDMI=y
+CONFIG_HIGHMEM=y
+CONFIG_HIGHPTE=y
+CONFIG_HSI=y
+CONFIG_HSI_BOARDINFO=y
+# CONFIG_HSI_CHAR is not set
+CONFIG_HWMON=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_OMAP=y
+CONFIG_HZ_FIXED=0
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_OMAP=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQSTACKS=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_JFFS2_LZO=y
+CONFIG_JFFS2_RUBIN=y
+CONFIG_KALLSYMS=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_KCMP=y
+CONFIG_KEYS=y
+CONFIG_KMAP_LOCAL=y
+CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
+CONFIG_KPROBES=y
+CONFIG_KRETPROBES=y
+CONFIG_KS8851=y
+CONFIG_KS8851_MLL=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_LCD_PLATFORM=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PWM=y
+CONFIG_LEDS_TRIGGER_BACKLIGHT=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_ONESHOT=y
+CONFIG_LEGACY_DIRECT_IO=y
+CONFIG_LIBCRC32C=y
+CONFIG_LIBFDT=y
+CONFIG_LOCKD=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MACH_OMAP_GENERIC=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_MDIO_BITBANG=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+# CONFIG_MDIO_GPIO is not set
+CONFIG_MEMORY=y
+CONFIG_MEMORY_ISOLATION=y
+CONFIG_MFD_CORE=y
+CONFIG_MFD_PALMAS=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MFD_TI_AM335X_TSCADC=y
+CONFIG_MFD_TPS65217=y
+CONFIG_MFD_TPS65218=y
+CONFIG_MFD_TPS65910=y
+CONFIG_MFD_TWL4030_AUDIO=y
+CONFIG_MICREL_PHY=y
+CONFIG_MIGHT_HAVE_CACHE_L2X0=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+# CONFIG_MMC_OMAP is not set
+CONFIG_MMC_OMAP_HS=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_EXTERNAL_DMA=y
+CONFIG_MMC_SDHCI_OMAP=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MSDOS_FS=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_NAND_CORE=y
+CONFIG_MTD_NAND_ECC=y
+CONFIG_MTD_NAND_ECC_SW_HAMMING=y
+CONFIG_MTD_NAND_OMAP2=y
+CONFIG_MTD_NAND_OMAP_BCH=y
+CONFIG_MTD_NAND_OMAP_BCH_BUILD=y
+CONFIG_MTD_ONENAND=y
+# CONFIG_MTD_ONENAND_2X_PROGRAM is not set
+# CONFIG_MTD_ONENAND_GENERIC is not set
+CONFIG_MTD_ONENAND_OMAP2=y
+# CONFIG_MTD_ONENAND_OTP is not set
+CONFIG_MTD_ONENAND_VERIFY_WRITE=y
+CONFIG_MTD_OOPS=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_RAW_NAND=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+# CONFIG_MTD_UBI_BLOCK is not set
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+# CONFIG_MUSB_PIO_ONLY is not set
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_SRCU_NMI_SAFE=y
+CONFIG_NEON=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_EGRESS=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_HANDSHAKE=y
+CONFIG_NET_INGRESS=y
+CONFIG_NET_KEY=y
+CONFIG_NET_KEY_MIGRATE=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NET_XGRESS=y
+CONFIG_NFS_ACL_SUPPORT=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_USE_KERNEL_DNS=y
+# CONFIG_NFS_USE_LEGACY_DNS is not set
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_NLS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_NO_HZ=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NR_CPUS=4
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OID_REGISTRY=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_OMAP2_DSS_DPI=y
+CONFIG_OMAP2_DSS_DSI=y
+CONFIG_OMAP2_DSS_HDMI_COMMON=y
+CONFIG_OMAP2_DSS_MIN_FCK_PER_PCK=0
+CONFIG_OMAP2_DSS_SDI=y
+CONFIG_OMAP2_DSS_SLEEP_AFTER_VENC_RESET=y
+CONFIG_OMAP2_DSS_VENC=y
+# CONFIG_OMAP3_L2_AUX_SECURE_SAVE_RESTORE is not set
+CONFIG_OMAP3_THERMAL=y
+CONFIG_OMAP4_DSS_HDMI=y
+CONFIG_OMAP4_DSS_HDMI_CEC=y
+CONFIG_OMAP4_THERMAL=y
+CONFIG_OMAP5_DSS_HDMI=y
+CONFIG_OMAP_CONTROL_PHY=y
+CONFIG_OMAP_DM_SYSTIMER=y
+CONFIG_OMAP_DM_TIMER=y
+CONFIG_OMAP_GPMC=y
+# CONFIG_OMAP_GPMC_DEBUG is not set
+CONFIG_OMAP_HWMOD=y
+CONFIG_OMAP_INTERCONNECT=y
+CONFIG_OMAP_INTERCONNECT_BARRIER=y
+CONFIG_OMAP_IRQCHIP=y
+CONFIG_OMAP_OCP2SCP=y
+# CONFIG_OMAP_SSI is not set
+CONFIG_OMAP_USB2=y
+CONFIG_OMAP_WATCHDOG=y
+CONFIG_OPTPROBES=y
+CONFIG_OUTER_CACHE=y
+CONFIG_OUTER_CACHE_SYNC=y
+CONFIG_PADATA=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
+# CONFIG_PHY_DM816X_USB is not set
+CONFIG_PHY_TI_GMII_SEL=y
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_PALMAS is not set
+CONFIG_PL310_ERRATA_588369=y
+CONFIG_PL310_ERRATA_727915=y
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_PM_GENERIC_DOMAINS=y
+CONFIG_PM_GENERIC_DOMAINS_OF=y
+CONFIG_PM_OPP=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
+CONFIG_POWER_AVS_OMAP=y
+CONFIG_POWER_AVS_OMAP_CLASS3=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PPS=y
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PRINTK_TIME=y
+CONFIG_PROC_EVENTS=y
+CONFIG_PROFILING=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_PWM=y
+# CONFIG_PWM_OMAP_DMTIMER is not set
+CONFIG_PWM_SYSFS=y
+CONFIG_PWM_TIECAP=y
+CONFIG_PWM_TIEHRPWM=y
+# CONFIG_PWM_TWL is not set
+# CONFIG_PWM_TWL_LED is not set
+CONFIG_QCOM_NET_PHYLIB=y
+CONFIG_QFMT_V2=y
+CONFIG_QUOTA=y
+CONFIG_QUOTACTL=y
+CONFIG_QUOTA_TREE=y
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_IRQ=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGMAP_SPI=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_PALMAS=y
+CONFIG_REGULATOR_PBIAS=y
+CONFIG_REGULATOR_TI_ABB=y
+CONFIG_REGULATOR_TPS62360=y
+CONFIG_REGULATOR_TPS65023=y
+CONFIG_REGULATOR_TPS6507X=y
+CONFIG_REGULATOR_TPS65217=y
+CONFIG_REGULATOR_TPS65218=y
+CONFIG_REGULATOR_TPS65910=y
+CONFIG_REGULATOR_TWL4030=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RFS_ACCEL=y
+CONFIG_ROOT_NFS=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_DS1307=y
+CONFIG_RTC_DRV_OMAP=y
+CONFIG_RTC_DRV_PALMAS=y
+# CONFIG_RTC_DRV_TPS65910 is not set
+CONFIG_RTC_DRV_TWL4030=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_MC146818_LIB=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_SATA_AHCI_PLATFORM=y
+CONFIG_SATA_HOST=y
+CONFIG_SCHEDSTATS=y
+CONFIG_SCHED_INFO=y
+CONFIG_SCHED_MC=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+CONFIG_SCSI_SCAN_ASYNC=y
+CONFIG_SDIO_UART=y
+CONFIG_SECCOMP=y
+CONFIG_SECCOMP_FILTER=y
+CONFIG_SENSORS_GPIO_FAN=y
+CONFIG_SENSORS_LM75=y
+CONFIG_SENSORS_TMP102=y
+CONFIG_SENSORS_TSL2550=y
+CONFIG_SERIAL_8250_DETECT_IRQ=y
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_FSL=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_NR_UARTS=32
+# CONFIG_SERIAL_8250_OMAP is not set
+CONFIG_SERIAL_8250_RSA=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIAL_OMAP=y
+CONFIG_SERIAL_OMAP_CONSOLE=y
+CONFIG_SERIO=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SG_POOL=y
+CONFIG_SG_SPLIT=y
+CONFIG_SKB_EXTENSIONS=y
+CONFIG_SMC91X=y
+CONFIG_SMP=y
+CONFIG_SMP_ON_UP=y
+CONFIG_SMSC911X=y
+CONFIG_SMSC_PHY=y
+CONFIG_SND=y
+# CONFIG_SND_COMPRESS_OFFLOAD is not set
+CONFIG_SND_DMAENGINE_PCM=y
+CONFIG_SND_JACK=y
+CONFIG_SND_PCM=y
+CONFIG_SND_PCM_OSS=y
+CONFIG_SND_SIMPLE_CARD=y
+CONFIG_SND_SIMPLE_CARD_UTILS=y
+CONFIG_SND_SOC=y
+CONFIG_SND_SOC_DAVINCI_MCASP=y
+CONFIG_SND_SOC_DMIC=y
+CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SOC_NOKIA_RX51 is not set
+# CONFIG_SND_SOC_OMAP3_PANDORA is not set
+CONFIG_SND_SOC_OMAP3_TWL4030=y
+CONFIG_SND_SOC_OMAP_ABE_TWL6040=y
+CONFIG_SND_SOC_OMAP_DMIC=y
+CONFIG_SND_SOC_OMAP_HDMI=y
+CONFIG_SND_SOC_OMAP_MCBSP=y
+CONFIG_SND_SOC_OMAP_MCPDM=y
+CONFIG_SND_SOC_TI_EDMA_PCM=y
+CONFIG_SND_SOC_TI_SDMA_PCM=y
+CONFIG_SND_SOC_TI_UDMA_PCM=y
+CONFIG_SND_SOC_TWL4030=y
+CONFIG_SND_SOC_TWL6040=y
+CONFIG_SND_VERBOSE_PRINTK=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SOC_AM33XX=y
+CONFIG_SOC_AM43XX=y
+CONFIG_SOC_BUS=y
+CONFIG_SOC_HAS_OMAP2_SDRC=y
+CONFIG_SOC_OMAP3430=y
+# CONFIG_SOC_TI81XX is not set
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SOUND_OSS_CORE_PRECLAIM=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SPI_OMAP24XX=y
+CONFIG_SPI_TI_QSPI=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
+CONFIG_SRAM=y
+CONFIG_SRAM_EXEC=y
+CONFIG_STACKTRACE=y
+CONFIG_SUNRPC=y
+CONFIG_SWPHY=y
+CONFIG_SWP_EMULATE=y
+CONFIG_SYNC_FILE=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_THERMAL=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_GOV_FAIR_SHARE=y
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_GOV_USER_SPACE=y
+CONFIG_THERMAL_OF=y
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TI_CPPI41=y
+CONFIG_TI_CPSW=y
+CONFIG_TI_CPSW_SWITCHDEV=y
+CONFIG_TI_CPTS=y
+CONFIG_TI_DAVINCI_EMAC=y
+CONFIG_TI_DAVINCI_MDIO=y
+CONFIG_TI_DMA_CROSSBAR=y
+CONFIG_TI_EDMA=y
+CONFIG_TI_EMIF=y
+# CONFIG_TI_EMIF_SRAM is not set
+CONFIG_TI_PIPE3=y
+CONFIG_TI_PWMSS=y
+CONFIG_TI_SOC_THERMAL=y
+CONFIG_TI_SYSC=y
+CONFIG_TI_THERMAL=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_TWL4030_CORE=y
+CONFIG_TWL4030_POWER=y
+CONFIG_TWL4030_USB=y
+CONFIG_TWL4030_WATCHDOG=y
+# CONFIG_TWL6030_USB is not set
+CONFIG_TWL6040_CORE=y
+CONFIG_UBIFS_FS=y
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USB=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_DWC3=y
+CONFIG_USB_DWC3_DUAL_ROLE=y
+# CONFIG_USB_DWC3_GADGET is not set
+# CONFIG_USB_DWC3_HOST is not set
+CONFIG_USB_DWC3_OMAP=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_HCD_OMAP=y
+# CONFIG_USB_EHCI_HCD_PLATFORM is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_INVENTRA_DMA=y
+CONFIG_USB_MUSB_DSPS=y
+CONFIG_USB_MUSB_DUAL_ROLE=y
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_OMAP2PLUS=y
+CONFIG_USB_MUSB_TUSB6010=y
+CONFIG_USB_PHY=y
+CONFIG_USB_ROLE_SWITCH=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_TI_CPPI41_DMA=y
+CONFIG_USB_TUSB_OMAP_DMA=y
+CONFIG_USE_OF=y
+CONFIG_VFAT_FS=y
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_VIDEOMODE_HELPERS=y
+CONFIG_VIDEO_CMDLINE=y
+CONFIG_VIDEO_NOMODESET=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_XFRM_ALGO=y
+CONFIG_XFRM_MIGRATE=y
+CONFIG_XPS=y
+CONFIG_XXHASH=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMMON=y
+CONFIG_ZSTD_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/omap/patches-6.6/900-use-cpsw-ethernet-driver.patch b/target/linux/omap/patches-6.6/900-use-cpsw-ethernet-driver.patch
new file mode 100644
index 0000000000..31fa0028c6
--- /dev/null
+++ b/target/linux/omap/patches-6.6/900-use-cpsw-ethernet-driver.patch
@@ -0,0 +1,93 @@
+From: Jan Hoffmann <jan at 3e8.eu>
+Date: Sat, 27 Apr 2024 20:41:43 +0200
+Subject: ARM: dts: Use cpsw ethernet driver for some am335x devices
+
+The new cpsw-switch driver requires a vid for every port which is
+reserved for internal usage (defaulting to 1 and 2). As a result, some
+network configurations are impossible, such as a bridge with
+default_pvid of 1 (even if it is not vlan aware).
+
+As a simple workaround, the ti,dual-emac-pvid property could be changed
+to another value, but that would just shift the problem. Instead, switch
+some devices back to the older cpsw ethernet driver.
+
+(This patch is not suitable for upstreaming, it just makes the affected
+devices in OpenWrt usable again with the default network config.)
+
+Signed-off-by: Jan Hoffmann <jan at 3e8.eu>
+---
+
+--- a/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi
++++ b/arch/arm/boot/dts/ti/omap/am335x-bone-common.dtsi
+@@ -358,27 +358,24 @@
+ 	};
+ };
+ 
+-&cpsw_port1 {
++&cpsw_emac0 {
+ 	phy-handle = <&ethphy0>;
+ 	phy-mode = "mii";
+-	ti,dual-emac-pvid = <1>;
+ };
+ 
+-&cpsw_port2 {
+-	status = "disabled";
+-};
+-
+-&mac_sw {
++&mac {
++	slaves = <1>;
+ 	pinctrl-names = "default", "sleep";
+ 	pinctrl-0 = <&cpsw_default>;
+ 	pinctrl-1 = <&cpsw_sleep>;
+ 	status = "okay";
+ };
+ 
+-&davinci_mdio_sw {
++&davinci_mdio {
+ 	pinctrl-names = "default", "sleep";
+ 	pinctrl-0 = <&davinci_mdio_default>;
+ 	pinctrl-1 = <&davinci_mdio_sleep>;
++	status = "okay";
+ 
+ 	ethphy0: ethernet-phy at 0 {
+ 		reg = <0>;
+--- a/arch/arm/boot/dts/ti/omap/am335x-evm.dts
++++ b/arch/arm/boot/dts/ti/omap/am335x-evm.dts
+@@ -682,31 +682,28 @@
+ 	};
+ };
+ 
+-&mac_sw {
++&mac {
++	slaves = <1>;
+ 	pinctrl-names = "default", "sleep";
+ 	pinctrl-0 = <&cpsw_default>;
+ 	pinctrl-1 = <&cpsw_sleep>;
+ 	status = "okay";
+ };
+ 
+-&davinci_mdio_sw {
++&davinci_mdio {
+ 	pinctrl-names = "default", "sleep";
+ 	pinctrl-0 = <&davinci_mdio_default>;
+ 	pinctrl-1 = <&davinci_mdio_sleep>;
++	status = "okay";
+ 
+ 	ethphy0: ethernet-phy at 0 {
+ 		reg = <0>;
+ 	};
+ };
+ 
+-&cpsw_port1 {
++&cpsw_emac0 {
+ 	phy-handle = <&ethphy0>;
+ 	phy-mode = "rgmii-id";
+-	ti,dual-emac-pvid = <1>;
+-};
+-
+-&cpsw_port2 {
+-	 status = "disabled";
+ };
+ 
+ &tscadc {



From lede-commits at lists.infradead.org  Fri Aug 22 11:19:13 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 22 Aug 2025 14:19:13 -0400
Subject: [openwrt/openwrt]  generic: 6.12: add new config symbols
In-Reply-To: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
References: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
Message-ID: <mailman.128031.1755925076.1866309.lede-commits@lists.infradead.org>

lynxis pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cb26a6c0e1bd8a4c89f0726210b19dae6cec766b

commit cb26a6c0e1bd8a4c89f0726210b19dae6cec766b
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Fri May 9 07:33:31 2025 +0200

    generic: 6.12: add new config symbols
    
    Add new config symbols to 6.12 kernel config.
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 target/linux/generic/config-6.12 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/generic/config-6.12 b/target/linux/generic/config-6.12
index 5d931cf995..70139999d2 100644
--- a/target/linux/generic/config-6.12
+++ b/target/linux/generic/config-6.12
@@ -936,6 +936,7 @@ CONFIG_CIFS_XATTR=y
 # CONFIG_CLK_ICST is not set
 # CONFIG_CLK_QORIQ is not set
 # CONFIG_CLK_SP810 is not set
+# CONFIG_CLK_TWL is not set
 CONFIG_CLS_U32_MARK=y
 # CONFIG_CLS_U32_PERF is not set
 # CONFIG_CM32181 is not set



From lede-commits at lists.infradead.org  Fri Aug 22 11:19:10 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 22 Aug 2025 14:19:10 -0400
Subject: [openwrt/openwrt]  kernel/omap: Create kernel files for v6.12 (from
 v6.6)
In-Reply-To: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
References: <175588674966.1842143.11861307719780519759@git-01.infra.openwrt.org>
Message-ID: <mailman.128032.1755925076.1866309.lede-commits@lists.infradead.org>

lynxis pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/72626f8b6af2078841d296ae63a810ae735d6880

commit 72626f8b6af2078841d296ae63a810ae735d6880
Author: Andre Heider <a.heider at gmail.com>
AuthorDate: Wed May 7 08:44:19 2025 +0200

    kernel/omap: Create kernel files for v6.12 (from v6.6)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Andre Heider <a.heider at gmail.com>
---
 target/linux/omap/{config-6.6 => config-6.12}                             | 0
 .../omap/{patches-6.6 => patches-6.12}/900-use-cpsw-ethernet-driver.patch | 0
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/omap/config-6.6 b/target/linux/omap/config-6.12
similarity index 100%
rename from target/linux/omap/config-6.6
rename to target/linux/omap/config-6.12
diff --git a/target/linux/omap/patches-6.6/900-use-cpsw-ethernet-driver.patch b/target/linux/omap/patches-6.12/900-use-cpsw-ethernet-driver.patch
similarity index 100%
rename from target/linux/omap/patches-6.6/900-use-cpsw-ethernet-driver.patch
rename to target/linux/omap/patches-6.12/900-use-cpsw-ethernet-driver.patch



From lede-commits at lists.infradead.org  Sat Aug 23 02:41:26 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 23 Aug 2025 05:41:26 -0400
Subject: [openwrt/openwrt]  ipq40xx: do not build EnGenius EAP1300 and
 ENS620EXT by default
In-Reply-To: <175594208687.1183193.12991727620214201168@git-01.infra.openwrt.org>
References: <175594208687.1183193.12991727620214201168@git-01.infra.openwrt.org>
Message-ID: <mailman.128252.1755942092.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/65ed5f8d6dc392c9cae02c2291910a72cc41a523

commit 65ed5f8d6dc392c9cae02c2291910a72cc41a523
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Thu Aug 21 19:56:15 2025 +0800

    ipq40xx: do not build EnGenius EAP1300 and ENS620EXT by default
    
    The 6.12 kernel has exceeded the kernel size limit. the buildbot
    can no longer build images for them. Developers can try switching
    the kernel type to zImage to enable them again.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19826
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ipq40xx/image/generic.mk | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 393bb991f1..44326520e6 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -463,6 +463,7 @@ define Device/engenius_eap1300
 	KERNEL_SIZE := 5120k
 	IMAGE_SIZE := 25344k
 	IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
+	DEFAULT := n
 endef
 TARGET_DEVICES += engenius_eap1300
 
@@ -532,6 +533,7 @@ define Device/engenius_ens620ext
 	IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | check-size | append-metadata
 	IMAGE/factory_30.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | check-size | SenaoFW $$$$(PRODUCT_ID) $$$$(FW_VER)
 	IMAGE/factory_35.bin := qsdk-ipq-factory-nor | check-size | SenaoFW $$$$(PRODUCT_ID_NEW) $$$$(FW_VER_NEW)
+	DEFAULT := n
 endef
 # Missing DSA Setup
 #TARGET_DEVICES += engenius_ens620ext



From lede-commits at lists.infradead.org  Sat Aug 23 09:15:29 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 23 Aug 2025 12:15:29 -0400
Subject: [openwrt/openwrt]  ramips: fix TP-Link mr600 radio partition offset
In-Reply-To: <175596572913.2619919.15971179354494192585@git-01.infra.openwrt.org>
References: <175596572913.2619919.15971179354494192585@git-01.infra.openwrt.org>
Message-ID: <mailman.128485.1755975004.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e7ed87b83b62cc3920cf1f25abbf6f06c96fee66

commit e7ed87b83b62cc3920cf1f25abbf6f06c96fee66
Author: Stefan D?singer <stefandoesinger at gmail.com>
AuthorDate: Sat Aug 9 17:29:38 2025 +0300

    ramips: fix TP-Link mr600 radio partition offset
    
    This makes 5ghz WiFi work out of the box on these devices, eliminating
    the need to flash a magic blob to the radio partition.
    
    This was found by user BulldozerBSG on the OpenWRT Forums:
    https://forum.openwrt.org/t/tp-link-archer-mr600-exploration/65489/20
    All credit belongs to them. I can confirm the correctness of the
    findings. At least one other user (Iggy87100) confirmed them too.
    
    Signed-off-by: Stefan D?singer <stefandoesinger at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19790
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
index be68471b44..246fd16a72 100644
--- a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
@@ -136,9 +136,26 @@
 				read-only;
 			};
 
+			/* The boot log of the stock kernel suggests the radio partition is at
+			 * 0xfe0000, but this is wrong. The U-Boot log lists it at 0xff0000. The
+			 * WiFi driver's log output indicates the calibration data is read from a
+			 * hardcoded 0xff0000, ignoring mtd partitions:
+			 *
+			 * 0x000000fe0000-0x000000ff0000 : "radio" <- WRONG
+			 * ...
+			 * MT7603E--> ####  read 2.4G cal from flash !! ####
+			 * spiflash_ioctl_read, Read from 0x00ff0000 length 0x10000, ...
+			 *
+			 * Manual inspection shows 0xfe0000 is empty (0xff) bytes. 0xff0000 contains
+			 * the data we want. */
 			partition at fe0000 {
-				label = "radio";
+				label = "filler";
 				reg = <0xfe0000 0x10000>;
+			};
+
+			partition at ff0000 {
+				label = "radio";
+				reg = <0xff0000 0x10000>;
 				read-only;
 
 				nvmem-layout {



From lede-commits at lists.infradead.org  Sat Aug 23 09:57:52 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 23 Aug 2025 12:57:52 -0400
Subject: [openwrt/openwrt]  dropbear: disable login recording with musl libc
In-Reply-To: <175596827057.2759540.14238443700901435344@git-01.infra.openwrt.org>
References: <175596827057.2759540.14238443700901435344@git-01.infra.openwrt.org>
Message-ID: <mailman.128532.1755976157.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e021b8a7461a6a8948f99e56935f29998210a536

commit e021b8a7461a6a8948f99e56935f29998210a536
Author: Konstantin Demin <rockdrilla at gmail.com>
AuthorDate: Wed Aug 20 09:55:47 2025 +0300

    dropbear: disable login recording with musl libc
    
    disallow lastlog/login()/utmp/wtmp with musl libc in order to avoid runtime errors due to musl implementation details.
    
    ref: https://github.com/openwrt/openwrt/issues/19566#issuecomment-3167897095
    
    Signed-off-by: Konstantin Demin <rockdrilla at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19715
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/network/services/dropbear/Config.in | 157 +++++++++++++++-------------
 package/network/services/dropbear/Makefile  |   2 +-
 2 files changed, 83 insertions(+), 76 deletions(-)

diff --git a/package/network/services/dropbear/Config.in b/package/network/services/dropbear/Config.in
index e677ef5edc..796ccae86e 100644
--- a/package/network/services/dropbear/Config.in
+++ b/package/network/services/dropbear/Config.in
@@ -105,101 +105,108 @@ config DROPBEAR_SVR_PUBKEY_OPTIONS
 
 		Default: enabled.
 
-config DROPBEAR_LASTLOG
-	bool "Write lastlog"
-	help
-		/var/log/lastlog is a record of the last login of each user.
-		To view the last login, use "lastlog" command (OpenWrt package shadow-lastlog).
+## ---
+## Nowadays, utmp/wtmp is not supported by musl libc.
+## Ref: https://wiki.musl-libc.org/faq.html#Q:_Why_is_the_utmp/wtmp_functionality_only_implemented_as_stubs?
+
+## utmp-specific notes:
+## In musl, pututline() and related functions are all stubs, and login(), logout() and ttyslot() don't exist.
+## In Dropbear there is an option to write to utmp directly, but it uses ttyslot().
+## So, there is currently no way to make utmp work with musl.
+## Revisit this if/when Dropbear implements ttyslot() or an independent utmp direct write.
+## ---
+comment "* note: lastlog/login()/utmp/wtmp are unavailable with musl libc"
+	depends on USE_MUSL
 
-		If enabled, Drobear will update it with SSH logins.
-		If disabled, SSH logins will not be recorded.
+if !USE_MUSL
 
-		Warning: The lastlog record is considered a security and privacy risk by some.
+	config DROPBEAR_LASTLOG
+		bool "Write lastlog"
+		help
+			/var/log/lastlog is a record of the last login of each user.
+			To view the last login, use "lastlog" command (OpenWrt package shadow-lastlog).
 
-		Default: disabled.
+			If enabled, Drobear will update it with SSH logins.
+			If disabled, SSH logins will not be recorded.
 
-config DROPBEAR_LASTLOG_PATH
-	string "lastlog path:"
-	default "/var/log/lastlog"
-	depends on DROPBEAR_LASTLOG
-	help
-		Default: /var/log/lastlog
+			Warning: The lastlog record is considered a security and privacy risk by some.
 
-config DROPBEAR_WTMP
-	bool "Write wtmp"
-	help
-		/var/log/wtmp is a record of all previous logins.
-		The file needs to be manually created - Dropbear will update it only if it already exists.
-		To view login history, use "last" command, available in Busybox but not included by default.
+			Default: disabled.
 
-		If enabled, Dropbear will add SSH logins to the record.
-		If disabled, SSH logins will not be recorded.
+	config DROPBEAR_LASTLOG_PATH
+		string "lastlog path:"
+		default "/var/log/lastlog"
+		depends on DROPBEAR_LASTLOG
+		help
+			Default: /var/log/lastlog
 
-		Warning: The wtmp record is considered a security and privacy risk by some.
+	config DROPBEAR_LOGINFUNC
+		bool "Use login() and logout() functions"
+		help
+			If enabled, Dropbear will use login() and logout() functions to record logins in utmp and wtmp files.
 
-		Default: disabled.
+			If disabled, see DROPBEAR_UTMP and DROPBEAR_WTMP options.
 
-config DROPBEAR_WTMP_PATH
-	string "wtmp path:"
-	default "/var/log/wtmp"
-	depends on DROPBEAR_WTMP
-	help
-		Default: /var/log/wtmp
-
-# ---- MUSL UTMP ----
-# In musl, pututline() and related functions are all stubs, and login(), logout() and ttyslot() don't exist.
-# In Dropbear there is an option to write to utmp directly, but it uses ttyslot().
-# So, there is currently no way to make utmp work with musl.
-# Revisit this if/when Dropbear implements ttyslot() or an independent utmp direct write.
-comment "* note: utmp is unavailable with musl libc"
-	depends on USE_MUSL
+			Default: disabled.
 
-config DROPBEAR_UTMP
-	bool "Write utmp"
-	depends on !USE_MUSL
-	help
-		/var/run/utmp is a record of currently logged-in users.
-		To view logged-in users, use "w", "who" or "users" commands.
+	comment "* note: utmp/wtmp are handled by libc implementation rather than Dropbear"
+		depends on DROPBEAR_LOGINFUNC
 
-		If enabled, Dropbear will keep it updated with users that log in via SSH.
-		If disabled, SSH logins will not be recorded.
+	config DROPBEAR_WTMP
+		bool "Write wtmp"
+		depends on !DROPBEAR_LOGINFUNC
+		help
+			/var/log/wtmp is a record of all previous logins.
+			The file needs to be manually created - Dropbear will update it only if it already exists.
+			To view login history, use "last" command, available in Busybox but not included by default.
 
-		Warning: The utmp record is considered a security and privacy risk by some.
+			If enabled, Dropbear will add SSH logins to the record.
+			If disabled, SSH logins will not be recorded.
 
-		Default: disabled.
+			Warning: The wtmp record is considered a security and privacy risk by some.
 
-config DROPBEAR_UTMP_PATH
-	string "utmp path:"
-	default "/var/run/utmp"
-	depends on DROPBEAR_UTMP
-	help
-		Default: /var/run/utmp
+			Default: disabled.
 
-# musl pututline() and related functions are all stubs.
-config DROPBEAR_PUTUTLINE
-	bool "Use pututline() to write to utmp"
-	default y if !DROPBEAR_LOGINFUNC
-	depends on !USE_MUSL && !DROPBEAR_LOGINFUNC && DROPBEAR_UTMP
-	help
-		If enabled, Dropbear will use pututline() to write into the utmp file.
-		If disabled, Dropbear will write to utmp file directly.
+	config DROPBEAR_WTMP_PATH
+		string "wtmp path:"
+		default "/var/log/wtmp"
+		depends on DROPBEAR_WTMP
+		help
+			Default: /var/log/wtmp
 
-		Consider using login() and logout() functions via DROPBEAR_LOGINFUNC option if available.
+	config DROPBEAR_UTMP
+		bool "Write utmp"
+		depends on !DROPBEAR_LOGINFUNC
+		help
+			/var/run/utmp is a record of currently logged-in users.
+			To view logged-in users, use "w", "who" or "users" commands.
 
-		Default: enabled if DROPBEAR_UTMP is enabled.
+			If enabled, Dropbear will keep it updated with users that log in via SSH.
+			If disabled, SSH logins will not be recorded.
 
-# musl doesn't have login() and logout()
-config DROPBEAR_LOGINFUNC
-	bool "Use login() and logout() functions"
-	depends on !USE_MUSL
-	select DROPBEAR_UTMP
-	select DROPBEAR_WTMP
-	help
-		If enabled, Dropbear will use login() and logout() functions to record logins in utmp and wtmp files.
-		If disabled, see DROPBEAR_UTMP and DROPBEAR_WTMP options.
+			Warning: The utmp record is considered a security and privacy risk by some.
 
-		Default: disabled.
+			Default: disabled.
+
+	config DROPBEAR_UTMP_PATH
+		string "utmp path:"
+		default "/var/run/utmp"
+		depends on DROPBEAR_UTMP
+		help
+			Default: /var/run/utmp
+
+	config DROPBEAR_PUTUTLINE
+		bool "Use pututline() to write to utmp"
+		depends on DROPBEAR_UTMP
+		help
+			If enabled, Dropbear will use pututline() to write into the utmp file.
+			If disabled, Dropbear will write to utmp file directly.
+
+			PS: DROPBEAR_UTMP_PATH value is likely to be ignored if DROPBEAR_PUTUTLINE is enabled.
+
+			Default: disabled.
 
+endif
 ## </LOGIN OPTIONS>
 
 ## <FEATURES>
diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index 87b1a2459f..59aff2f7cf 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=dropbear
 PKG_VERSION:=2025.88
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \



From lede-commits at lists.infradead.org  Sat Aug 23 09:57:50 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 23 Aug 2025 12:57:50 -0400
Subject: [openwrt/openwrt]  dropbear: fix missing depends for
 sntrup761x25519-sha512
In-Reply-To: <175596827057.2759540.14238443700901435344@git-01.infra.openwrt.org>
References: <175596827057.2759540.14238443700901435344@git-01.infra.openwrt.org>
Message-ID: <mailman.128533.1755976157.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3e5f8a036410987799c9d1cbbd5604aaa94a4a8d

commit 3e5f8a036410987799c9d1cbbd5604aaa94a4a8d
Author: Konstantin Demin <rockdrilla at gmail.com>
AuthorDate: Wed Aug 20 09:55:47 2025 +0300

    dropbear: fix missing depends for sntrup761x25519-sha512
    
    resolves FTBFS where internal option DROPBEAR_SHA512 wasn't enabled by any of options
    
    Signed-off-by: Konstantin Demin <rockdrilla at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19715
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...issing-depends-for-sntrup761x25519-sha512.patch | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/package/network/services/dropbear/patches/052-fix-missing-depends-for-sntrup761x25519-sha512.patch b/package/network/services/dropbear/patches/052-fix-missing-depends-for-sntrup761x25519-sha512.patch
new file mode 100644
index 0000000000..82edb7cd72
--- /dev/null
+++ b/package/network/services/dropbear/patches/052-fix-missing-depends-for-sntrup761x25519-sha512.patch
@@ -0,0 +1,24 @@
+From 4bc1e18948d0918bcb1338a5f1e7856478abf985 Mon Sep 17 00:00:00 2001
+From: Konstantin Demin <rockdrilla at gmail.com>
+Date: Fri, 8 Aug 2025 10:02:44 +0300
+Subject: fix missing depends for sntrup761x25519-sha512
+
+fixes 440b7b5c4f "Add sntrup761x25519-sha512 post-quantum key exchange"
+
+Signed-off-by: Konstantin Demin <rockdrilla at gmail.com>
+Forwarded: https://github.com/mkj/dropbear/pull/375
+---
+ src/sysoptions.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/sysoptions.h
++++ b/src/sysoptions.h
+@@ -207,7 +207,7 @@
+ /* LTC SHA384 depends on SHA512 */
+ #define DROPBEAR_SHA512 ((DROPBEAR_SHA2_512_HMAC) || (DROPBEAR_ECC_521) \
+ 			|| (DROPBEAR_SHA384) || (DROPBEAR_DH_GROUP16) \
+-			|| (DROPBEAR_ED25519))
++			|| (DROPBEAR_ED25519) || (DROPBEAR_SNTRUP761))
+ 
+ #define DROPBEAR_DH_GROUP14 ((DROPBEAR_DH_GROUP14_SHA256) || (DROPBEAR_DH_GROUP14_SHA1))
+ 



From lede-commits at lists.infradead.org  Sat Aug 23 09:57:51 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 23 Aug 2025 12:57:51 -0400
Subject: [openwrt/openwrt]  dropbear: don't limit channel window to 500MB
In-Reply-To: <175596827057.2759540.14238443700901435344@git-01.infra.openwrt.org>
References: <175596827057.2759540.14238443700901435344@git-01.infra.openwrt.org>
Message-ID: <mailman.128534.1755976157.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fb6c22caec09e7a5be99efe5ecd96df28158fee9

commit fb6c22caec09e7a5be99efe5ecd96df28158fee9
Author: Konstantin Demin <rockdrilla at gmail.com>
AuthorDate: Wed Aug 20 09:55:47 2025 +0300

    dropbear: don't limit channel window to 500MB
    
    cherry-pick commit from https://github.com/mkj/dropbear/pull/377
    
    Signed-off-by: Konstantin Demin <rockdrilla at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19715
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../053-Don-t-limit-channel-window-to-500MB.patch  | 65 ++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/package/network/services/dropbear/patches/053-Don-t-limit-channel-window-to-500MB.patch b/package/network/services/dropbear/patches/053-Don-t-limit-channel-window-to-500MB.patch
new file mode 100644
index 0000000000..eb9ab1cc21
--- /dev/null
+++ b/package/network/services/dropbear/patches/053-Don-t-limit-channel-window-to-500MB.patch
@@ -0,0 +1,65 @@
+From a8610f7b98ad4b33ab723602863d60d462fa5af2 Mon Sep 17 00:00:00 2001
+From: Matt Johnston <matt at ucc.asn.au>
+Date: Sun, 10 Aug 2025 19:46:01 +0800
+Subject: Don't limit channel window to 500MB
+
+Previously the channel window and increments were limited to 500MB.
+That is incorrect and causes stuck connections if peers advertise
+a large window, then don't send an increment within the first 500MB.
+
+That's seen with SSH.NET https://github.com/sshnet/SSH.NET/issues/1671
+---
+ src/common-channel.c | 17 ++++++++++-------
+ src/sysoptions.h     |  3 ---
+ 2 files changed, 10 insertions(+), 10 deletions(-)
+
+--- a/src/common-channel.c
++++ b/src/common-channel.c
+@@ -858,17 +858,21 @@ void common_recv_msg_channel_data(struct Channel *channel, int fd,
+ void recv_msg_channel_window_adjust() {
+ 
+ 	struct Channel * channel;
+-	unsigned int incr;
++	unsigned int incr, newwin;
+ 	
+ 	channel = getchannel();
+ 	
+ 	incr = buf_getint(ses.payload);
+-	TRACE(("received window increment %d", incr))
+-	incr = MIN(incr, TRANS_MAX_WIN_INCR);
++	TRACE(("received window increment %u", incr))
+ 	
+-	channel->transwindow += incr;
+-	channel->transwindow = MIN(channel->transwindow, TRANS_MAX_WINDOW);
+-
++	newwin = channel->transwindow + incr;
++	if (newwin < channel->transwindow) {
++		/* Integer overflow, clamp it at maximum.
++		 * Behaviour may be unexpected, senders MUST NOT overflow per rfc4254. */
++		TRACE(("overflow window, prev %u", channel->transwindow));
++		newwin = 0xffffffff;
++	}
++	channel->transwindow = newwin;
+ }
+ 
+ /* Increment the incoming data window for a channel, and let the remote
+@@ -906,7 +910,6 @@ void recv_msg_channel_open() {
+ 
+ 	remotechan = buf_getint(ses.payload);
+ 	transwindow = buf_getint(ses.payload);
+-	transwindow = MIN(transwindow, TRANS_MAX_WINDOW);
+ 	transmaxpacket = buf_getint(ses.payload);
+ 	transmaxpacket = MIN(transmaxpacket, TRANS_MAX_PAYLOAD_LEN);
+ 
+--- a/src/sysoptions.h
++++ b/src/sysoptions.h
+@@ -243,9 +243,6 @@
+ #define RECV_MAX_PACKET_LEN (MAX(35000, ((RECV_MAX_PAYLOAD_LEN)+100)))
+ 
+ /* for channel code */
+-#define TRANS_MAX_WINDOW 500000000 /* 500MB is sufficient, stopping overflow */
+-#define TRANS_MAX_WIN_INCR 500000000 /* overflow prevention */
+-
+ #define RECV_WINDOWEXTEND (opts.recv_window / 3) /* We send a "window extend" every
+ 								RECV_WINDOWEXTEND bytes */
+ #define MAX_RECV_WINDOW (10*1024*1024) /* 10 MB should be enough */



From lede-commits at lists.infradead.org  Sat Aug 23 10:35:07 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 23 Aug 2025 13:35:07 -0400
Subject: [openwrt/openwrt]  realtek: add support for XikeStor SKS8310-8X
In-Reply-To: <175597050785.2892659.12363885610419852848@git-01.infra.openwrt.org>
References: <175597050785.2892659.12363885610419852848@git-01.infra.openwrt.org>
Message-ID: <mailman.128535.1755976167.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/62d50fb1960c7ac31dc6a87e6c37b72cd6c93947

commit 62d50fb1960c7ac31dc6a87e6c37b72cd6c93947
Author: Alexandra Alth <alexandra at alth.de>
AuthorDate: Thu Aug 14 19:55:44 2025 +0200

    realtek: add support for XikeStor SKS8310-8X
    
    XikeStor (Seeker) SKS8310-8X is a 8 ports Multi-Gig switch, based on
    RTL9303.
    
    Specifications:
    
    - SoC              : Realtek RTL9303
    - RAM              : DDR3 512 MiB
    - Flash            : SPI-NOR 32 MiB (Macronix)
    - Ethernet         : 8x 1/2.5/10 Gbps (SFP+)
    - LEDs/Keys (GPIO) : 1x/1x
    - UART             : "Console" port on the front panel
      - type           : RS-232C
      - connector      : RJ-45
      - settings       : 115200 8N1
    - Power            : 12 VDC, 2 A
    
    Flash instruction using initramfs image:
    
     1. Prepare TFTP server & connect to serial port.
     2. Connect your computer to one of the ports on SKS8310-8X with a
        suitable SFP module (some work, some don't).
     3. Power on SKS8310-8X and interrupt autoboot with Shift + A.
     4. Use Shift + Q to drop from vendor CLI to U-Boot CLI.
     5. Enable networking within U-Boot.
            > rtk network on
     6. Set switch IP and TFTP server IP (optional, adjust to your setup).
            > setenv ipaddr <ip>
            > setenv serverip <ip>
     7. Download initramfs image from TFTP server.
            > tftpboot 0x82000000 <image name>
     8. Boot with the downloaded image.
            > bootm 0x82000000
     9. With rambooted OpenWrt, backup the stock firmware if needed.
    10. Copy sysupgrade image to the device.
    11. Perform sysupgrade with the sysupgrade image.
    12. After reboot, you should have functional OpenWrt.
    
    Reverting to stock firmware:
    
     1. Download latest firmware from XikeStor and upload to your device.
     1. Write firmware with 'sysupgrade -F'.
     2. After reboot, stock firmware should boot automatically.
    
    Co-authored-by: Jonas Jelonek <jelonek.jonas at gmail.com>
    Signed-off-by: Alexandra Alth <alexandra at alth.de>
    Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19782
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../realtek/base-files/etc/board.d/02_network      |   4 +
 .../realtek/dts/rtl9303_xikestor_sks8310-8x.dts    | 372 +++++++++++++++++++++
 target/linux/realtek/image/rtl930x.mk              |  18 +
 3 files changed, 394 insertions(+)

diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network
index d3b1f7cd47..fcca2ce6ea 100644
--- a/target/linux/realtek/base-files/etc/board.d/02_network
+++ b/target/linux/realtek/base-files/etc/board.d/02_network
@@ -61,6 +61,10 @@ tplink,tl-st1008f,v2)
 xikestor,sks8300-8x)
 	lan_mac=$(mtd_get_mac_binary board-info 0x1f1)
 	;;
+xikestor,sks8310-8x)
+	lan_mac=$(mtd_get_mac_binary factory 0x80)
+	label_mac="$lan_mac"
+	;;
 *)
 	lan_mac=$(mtd_get_mac_ascii u-boot-env2 mac_start)
 	lan_mac_end=$(mtd_get_mac_ascii u-boot-env2 mac_end)
diff --git a/target/linux/realtek/dts/rtl9303_xikestor_sks8310-8x.dts b/target/linux/realtek/dts/rtl9303_xikestor_sks8310-8x.dts
new file mode 100644
index 0000000000..51526c3532
--- /dev/null
+++ b/target/linux/realtek/dts/rtl9303_xikestor_sks8310-8x.dts
@@ -0,0 +1,372 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "rtl930x.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "xikestor,sks8310-8x", "realtek,rtl9303-soc";
+	model = "XikeStor SKS8310-8X";
+
+	memory at 0 {
+		device_type = "memory";
+		reg = <0x00000000 0x10000000>, /* first 256 MiB */
+		      <0x20000000 0x10000000>; /* remaining 256 MiB */
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		button-reset {
+			label = "reset";
+			gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_sys: led-0 {
+			gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_STATUS;
+		};
+	};
+
+	led_set {
+		compatible = "realtek,rtl9300-leds";
+		active-low;
+
+		/*
+		 * LED set 0
+		 *
+		 * - LED[0](Green): 10G/LINK/ACT
+		 * - LED[1](Amber): 10M/100M/1G/2.5G/5G/LINK/ACT
+		 */
+		led_set0 = <0x0a01 0x0baa>;
+	};
+
+	sfp0: sfp-p1 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c0>;
+		los-gpio = <&gpio1 0 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio1 1 GPIO_ACTIVE_LOW>;
+		tx-disable-gpio = <&gpio1 2 GPIO_ACTIVE_HIGH>;
+		maximum-power-milliwatt = <2900>;
+		#thermal-sensor-cells = <0>;
+	};
+
+	sfp1: sfp-p2 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c1>;
+		los-gpio = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio1 4 GPIO_ACTIVE_LOW>;
+		tx-disable-gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+		maximum-power-milliwatt = <1500>;
+		#thermal-sensor-cells = <0>;
+	};
+
+	sfp2: sfp-p3 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c2>;
+		los-gpio = <&gpio1 6 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio1 7 GPIO_ACTIVE_LOW>;
+		tx-disable-gpio = <&gpio1 8 GPIO_ACTIVE_HIGH>;
+		maximum-power-milliwatt = <1500>;
+		#thermal-sensor-cells = <0>;
+	};
+
+	sfp3: sfp-p4 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c3>;
+		los-gpio = <&gpio1 9 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio1 10 GPIO_ACTIVE_LOW>;
+		tx-disable-gpio = <&gpio1 11 GPIO_ACTIVE_HIGH>;
+		maximum-power-milliwatt = <2000>;
+		#thermal-sensor-cells = <0>;
+	};
+
+	sfp4: sfp-p5 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c4>;
+		los-gpio = <&gpio1 12 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio1 13 GPIO_ACTIVE_LOW>;
+		tx-disable-gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>;
+		maximum-power-milliwatt = <2000>;
+		#thermal-sensor-cells = <0>;
+	};
+
+	sfp5: sfp-p6 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c5>;
+		los-gpio = <&gpio1 21 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio1 22 GPIO_ACTIVE_LOW>;
+		tx-disable-gpio = <&gpio1 23 GPIO_ACTIVE_HIGH>;
+		maximum-power-milliwatt = <1500>;
+		#thermal-sensor-cells = <0>;
+	};
+
+	sfp6: sfp-p7 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c6>;
+		los-gpio = <&gpio1 24 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio1 25 GPIO_ACTIVE_LOW>;
+		tx-disable-gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
+		maximum-power-milliwatt = <1500>;
+		#thermal-sensor-cells = <0>;
+	};
+
+	sfp7: sfp-p8 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c7>;
+		los-gpio = <&gpio1 27 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio1 28 GPIO_ACTIVE_LOW>;
+		tx-disable-gpio = <&gpio1 29 GPIO_ACTIVE_HIGH>;
+		maximum-power-milliwatt = <2900>;
+		#thermal-sensor-cells = <0>;
+	};
+
+};
+
+&i2c_mst1 {
+	status = "okay";
+
+	/* SDA0-7 correspond to GPIO9-16 */
+	i2c0: i2c at 0 {
+		reg = <0>;
+	};
+	i2c1: i2c at 1 {
+		reg = <1>;
+	};
+	i2c2: i2c at 2 {
+		reg = <2>;
+	};
+	i2c3: i2c at 3 {
+		reg = <3>;
+	};
+	i2c4: i2c at 4 {
+		reg = <4>;
+	};
+	i2c5: i2c at 5 {
+		reg = <5>;
+	};
+	i2c6: i2c at 6 {
+		reg = <6>;
+	};
+	i2c7: i2c at 7 {
+		reg = <7>;
+	};
+};
+
+&mdio_aux {
+	status = "okay";
+
+	gpio1: gpio at 0 {
+		compatible = "realtek,rtl8231";
+		reg = <0>;
+
+		gpio-controller;
+		#gpio-cells = <2>;
+		gpio-ranges = <&gpio1 0 0 37>;
+
+		led-controller {
+			compatible = "realtek,rtl8231-leds";
+			status = "disabled";
+		};
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <10000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x1c0000>;
+				read-only;
+			};
+
+			partition at 1c0000 {
+				label = "u-boot-env";
+				reg = <0x1c0000 0x10000>;
+			};
+
+			partition at 1d0000 {
+				label = "sysinfo";
+				reg = <0x1d0000 0x10000>;
+				read-only;
+			};
+
+			partition at 1e0000 {
+				label = "factory";
+				reg = <0x1e0000 0x10000>;
+				read-only;
+			};
+
+			partition at 1f0000 {
+				label = "sysdata";
+				reg = <0x1f0000 0x10000>;
+			};
+
+			partition at 200000 {
+				label = "jffs2_filesystem";
+				reg = <0x200000 0xa00000>;
+			};
+
+			partition at c00000 {
+				compatible = "openwrt,uimage", "denx,uimage";
+				label = "firmware";
+				reg = <0xc00000 0x1400000>;
+				openwrt,ih-magic = <0x93000000>;
+				openwrt,offset = <0x10>;
+			};
+		};
+	};
+};
+
+&ethernet0 {
+	mdio: mdio-bus {
+		compatible = "realtek,rtl838x-mdio";
+		regmap = <&ethernet0>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		INTERNAL_PHY_SDS(0, 2)
+		INTERNAL_PHY_SDS(8, 3)
+		INTERNAL_PHY_SDS(16, 4)
+		INTERNAL_PHY_SDS(20, 5)
+		INTERNAL_PHY_SDS(24, 6)
+		INTERNAL_PHY_SDS(25, 7)
+		INTERNAL_PHY_SDS(26, 8)
+		INTERNAL_PHY_SDS(27, 9)
+	};
+};
+
+&switch0 {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		port at 0 {
+			reg = <0>;
+			label = "lan1";
+			phy-handle = <&phy0>;
+			phy-mode = "1000base-x";
+			sfp = <&sfp0>;
+			managed = "in-band-status";
+			led-set = <0>;
+		};
+
+		port at 8 {
+			reg = <8>;
+			label = "lan2";
+			phy-handle = <&phy8>;
+			phy-mode = "1000base-x";
+			sfp = <&sfp1>;
+			managed = "in-band-status";
+			led-set = <0>;
+		};
+
+		port at 10 {
+			reg = <16>;
+			label = "lan3";
+			phy-handle = <&phy16>;
+			phy-mode = "1000base-x";
+			sfp = <&sfp2>;
+			managed = "in-band-status";
+			led-set = <0>;
+		};
+
+		port at 14 {
+			reg = <20>;
+			label = "lan4";
+			phy-handle = <&phy20>;
+			phy-mode = "1000base-x";
+			sfp = <&sfp3>;
+			managed = "in-band-status";
+			led-set = <0>;
+		};
+
+		port at 18 {
+			reg = <24>;
+			label = "lan5";
+			phy-handle = <&phy24>;
+			phy-mode = "1000base-x";
+			sfp = <&sfp4>;
+			managed = "in-band-status";
+			led-set = <0>;
+		};
+
+		port at 19 {
+			reg = <25>;
+			label = "lan6";
+			phy-handle = <&phy25>;
+			phy-mode = "1000base-x";
+			sfp = <&sfp5>;
+			managed = "in-band-status";
+			led-set = <0>;
+		};
+
+		port at 1a {
+			reg = <26>;
+			label = "lan7";
+			phy-handle = <&phy26>;
+			phy-mode = "1000base-x";
+			sfp = <&sfp6>;
+			managed = "in-band-status";
+			led-set = <0>;
+		};
+
+		port at 1b {
+			reg = <27>;
+			label = "lan8";
+			phy-handle = <&phy27>;
+			phy-mode = "1000base-x";
+			sfp = <&sfp7>;
+			managed = "in-band-status";
+			led-set = <0>;
+		};
+
+		port at 1c {
+			ethernet = <&ethernet0>;
+			reg = <28>;
+			phy-mode = "internal";
+
+			fixed-link {
+				speed = <10000>;
+				full-duplex;
+			};
+		};
+	};
+};
+
+&thermal_zones {
+	sfp-thermal {
+		polling-delay-passive = <10000>;
+		polling-delay = <10000>;
+		thermal-sensors = <&sfp0>, <&sfp1>, <&sfp2>, <&sfp3>, <&sfp4>, <&sfp5>, <&sfp6>, <&sfp7>;
+		trips {
+			sfp-crit {
+				temperature = <110000>;
+				hysteresis = <1000>;
+				type = "critical";
+			};
+		};
+	};
+};
diff --git a/target/linux/realtek/image/rtl930x.mk b/target/linux/realtek/image/rtl930x.mk
index 1887f9a488..27ad175b6e 100644
--- a/target/linux/realtek/image/rtl930x.mk
+++ b/target/linux/realtek/image/rtl930x.mk
@@ -51,6 +51,24 @@ define Device/xikestor_sks8300-8x
 endef
 TARGET_DEVICES += xikestor_sks8300-8x
 
+define Device/xikestor_sks8310-8x
+  SOC := rtl9303
+  UIMAGE_MAGIC := 0x93000000
+  DEVICE_VENDOR := XikeStor
+  DEVICE_MODEL := SKS8310-8X
+  IMAGE_SIZE := 20480k
+  $(Device/kernel-lzma)
+  IMAGE/sysupgrade.bin := \
+    pad-extra 16 | \
+    append-kernel | \
+    pad-to 64k | \
+    append-rootfs | \
+    pad-rootfs | \
+    check-size | \
+    append-metadata
+endef
+TARGET_DEVICES += xikestor_sks8310-8x
+
 define Device/zyxel_xgs1210-12
   SOC := rtl9302
   UIMAGE_MAGIC := 0x93001210



From lede-commits at lists.infradead.org  Sat Aug 23 11:38:27 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 23 Aug 2025 14:38:27 -0400
Subject: [openwrt/openwrt]  kernel: Remove patch for fixed bug
In-Reply-To: <175597430763.3170711.574338472371315645@git-01.infra.openwrt.org>
References: <175597430763.3170711.574338472371315645@git-01.infra.openwrt.org>
Message-ID: <mailman.128539.1755976167.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4cd256c72a7e823e55475786eb1f2a1f7ffcd497

commit 4cd256c72a7e823e55475786eb1f2a1f7ffcd497
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Thu Aug 21 22:07:06 2025 +0200

    kernel: Remove patch for fixed bug
    
    The problem was fixed in upstream kernel in a different way and the
    change was backported to kernel 6.6 in the following change:
    https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=48e8791843206baf76827df1b6ee3cb88a2a17d8
    
    The removed patch changes the endianness again and breaks the
    functionality, use only the upstream code and remove our unneeded patch.
    
    The 823-v6.12-0003-nvmem-layouts-add-U-Boot-env-layout.patch patch was
    adapted in the kernel bump too. It moves the code with the fix now.
    
    Fixes: 05d344cb2ca3 ("kernel: bump 6.6 to 6.6.100")
    Reported-by: Michael Pratt <mcpratt at pm.me>
    Link: https://github.com/openwrt/openwrt/pull/19830
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...boot-env-align-endianness-of-crc32-values.patch | 45 ----------------------
 1 file changed, 45 deletions(-)

diff --git a/target/linux/generic/pending-6.6/802-nvmem-u-boot-env-align-endianness-of-crc32-values.patch b/target/linux/generic/pending-6.6/802-nvmem-u-boot-env-align-endianness-of-crc32-values.patch
deleted file mode 100644
index 29fe668f8d..0000000000
--- a/target/linux/generic/pending-6.6/802-nvmem-u-boot-env-align-endianness-of-crc32-values.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 0e71cac033bb7689c4dfa2e6814191337ef770f5 Mon Sep 17 00:00:00 2001
-From: INAGAKI Hiroshi <musashino.open at gmail.com>
-Date: Thu, 13 Oct 2022 00:51:33 +0900
-Subject: [PATCH] nvmem: layouts: u-boot-env: align endianness of crc32 values
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This patch fixes crc32 error on Big-Endianness system by conversion of
-calculated crc32 value.
-
-Little-Endianness system:
-
-  obtained crc32: Little
-calculated crc32: Little
-
-Big-Endianness system:
-
-  obtained crc32: Little
-calculated crc32: Big
-
-log (APRESIA ApresiaLightGS120GT-SS, RTL8382M, Big-Endianness):
-
-[    8.570000] u_boot_env 18001200.spi:flash at 0:partitions:partition at c0000: Invalid calculated CRC32: 0x88cd6f09 (expected: 0x096fcd88)
-[    8.580000] u_boot_env: probe of 18001200.spi:flash at 0:partitions:partition at c0000 failed with error -22
-
-Fixes: f955dc1445069 ("nvmem: add driver handling U-Boot environment variables")
-
-Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
-Acked-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Tested-by: Christian Lamparter <chunkeey at gmail.com>
-Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla at linaro.org>
----
-
---- a/drivers/nvmem/layouts/u-boot-env.c
-+++ b/drivers/nvmem/layouts/u-boot-env.c
-@@ -148,7 +148,7 @@ int u_boot_env_parse(struct device *dev,
- 	crc32_data_len = dev_size - crc32_data_offset;
- 	data_len = dev_size - data_offset;
- 
--	calc = crc32(~0, buf + crc32_data_offset, crc32_data_len) ^ ~0L;
-+	calc = le32_to_cpu((__le32)crc32(~0, buf + crc32_data_offset, crc32_data_len) ^ ~0L);
- 	if (calc != crc32) {
- 		dev_err(dev, "Invalid calculated CRC32: 0x%08x (expected: 0x%08x)\n", calc, crc32);
- 		err = -EINVAL;



From lede-commits at lists.infradead.org  Sat Aug 23 14:53:43 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 23 Aug 2025 17:53:43 -0400
Subject: [openwrt/openwrt]  mediatek: Add support for Acer Predator Connect
 W6x
In-Reply-To: <175598602396.3926243.735974722582106000@git-01.infra.openwrt.org>
References: <175598602396.3926243.735974722582106000@git-01.infra.openwrt.org>
Message-ID: <mailman.128554.1755986028.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6e04dccb7ad3191e9a48597a1b354bf548ead1d8

commit 6e04dccb7ad3191e9a48597a1b354bf548ead1d8
Author: Qing W <ses1er at gmail.com>
AuthorDate: Thu Aug 21 18:55:42 2025 -0400

    mediatek: Add support for Acer Predator Connect W6x
    
    Product name: Acer Predator Connect W6x
    Product link: https://www.acer.com/us-en/predator/networking/wi-fi/predator-connect-w6x/pdp/FF.G2TTA.001
    
    * Specifications:
    
    SOC: MT7986AV
    RAM: 1024MB
    Flash: 256 MB SPI NAND
    Ports: 4 LAN (1G) & 1 WAN (2.5G)
    WIFI: MT7976GN + MT7976AN
    LED: 1, ws2812b controller
    
    * Installation via UART:
    
    1. Configure TFTP server with IP 192.168.1.66. Copy `openwrt-mediatek-filogic-acer_predator-w6x-initramfs-kernel.bin` to TFTP root and rename to `predator.bin`
    2. Interrupt boot by pressing 0 on startup or select `U-Boot Console` in U-Boot Boot Menu.
    3. Run setenv `serverip 192.168.1.66; setenv ipaddr 192.168.1.1; tftpboot 0x46000000 predator.bin; fdt addr $(fdtcontroladdr); fdt rm /signature; bootm` in uboot console.
    4. Wait for boot complete on Openwrt initramfs env.
    
    ** You can back up the MTD partitions at this point. Refer to Backup Instructions section.
    
    5. On client PC, transfer `openwrt-mediatek-filogic-acer_predator-w6x-squashfs-sysupgrade.bin` to /tmp/ - `scp -O openwrt-mediatek-filogic-acer_predator-w6x-squashfs-sysupgrade.bin root at 192.168.1.1:/tmp/sysupgrade.bin`
    6. On router, run sysupgrade - `sysupgrade -n /tmp/sysupgrade.bin`
    Should now boot to Openwrt. Ensure it boots automatically to Openwrt by replugging the power.
    
    * Backup Instructions:
    
    Layout from stock firmware:
    ```
    [    0.968731] Creating 10 MTD partitions on "nmbm_spim_nand":
    [    0.974297] 0x000000000000-0x000000100000 : "BL2"
    [    0.979424] 0x000000100000-0x000000180000 : "u-boot-env"
    [    0.985032] 0x000000180000-0x000000380000 : "Factory"
    [    0.990379] 0x000000380000-0x000000580000 : "FIP"
    [    0.995378] 0x000000580000-0x000000600000 : "prod"
    [    1.000461] 0x000000600000-0x000000700000 : "dual"
    [    1.005527] 0x000000700000-0x000000800000 : "pot"
    [    1.010516] 0x000000800000-0x000006c00000 : "ubi"
    [    1.015626] 0x000006c00000-0x00000d000000 : "ubi1"
    [    1.020801] 0x00000d000000-0x00000d800000 : "storage"
    ```
    
    Mapping in initramfs env:
    ```
    dev:    size   erasesize  name
    mtd0: 00100000 00020000 "bl2"
    mtd1: 00080000 00020000 "u-boot-env"
    mtd2: 00200000 00020000 "factory"
    mtd3: 00200000 00020000 "fip"
    mtd4: 00020000 00020000 "prod"
    mtd5: 00100000 00020000 "dual"
    mtd6: 00100000 00020000 "pot"
    mtd7: 06400000 00020000 "ubi"
    mtd8: 06400000 00020000 "ubi1"
    mtd9: 00800000 00020000 "storage"
    ```
    1. While in openwrt initramfs environment, back up all the partitions by running the following:
    ```
    cat /dev/mtd0 > /tmp/bl2.bin
    cat /dev/mtd1 > /tmp/u-boot-env.bin
    cat /dev/mtd2 > /tmp/factgory.bin
    cat /dev/mtd3 > /tmp/fip.bin
    cat /dev/mtd4 > /tmp/prod.bin
    cat /dev/mtd5 > /tmp/dual.bin
    cat /dev/mtd6 > /tmp/pot.bin
    cat /dev/mtd7 > /tmp/ubi.bin
    cat /dev/mtd8 > /tmp/ubi1.bin
    cat /dev/mtd9 > /tmp/storage.bin
    ```
    2. Transfer files to client PC for safekeeping. On client PC, run `scp -O root at 192.168.1.1:/tmp/*.bin ./`
    
    * Restore to Stock Firmware:
    
    1. Boot to openwrt initramfs env.
    2. Confirm layout matches as follows by running `cat /proc/mtd`. Ensure dev `mtd7` is named `ubi`:
    ```
    dev:    size   erasesize  name
    mtd0: 00100000 00020000 "bl2"
    mtd1: 00080000 00020000 "u-boot-env"
    mtd2: 00200000 00020000 "factory"
    mtd3: 00200000 00020000 "fip"
    mtd4: 00020000 00020000 "prod"
    mtd5: 00100000 00020000 "dual"
    mtd6: 00100000 00020000 "pot"
    mtd7: 06400000 00020000 "ubi"
    mtd8: 06400000 00020000 "ubi1"
    mtd9: 00800000 00020000 "storage"
    ```
    3. Detach `ubi` partition - `ubidetach -p /dev/mtd7`
    4. Transfer stock firmware's `ubi.bin` to router from client PC: `scp -O ubi.bin root at 192.168.1.1/tmp/`
    5. Format and replace with backup `ubiformat /dev/mtd7 -y -f /tmp/ubi.bin`
    6. Reboot and you should now be back on stock firmware.
    
    * LEDS:
    LED color can be controlled by specifying values in GRB format in `/sys/class/leds/rgb:status/multi_intensity`. Default is `255 255 255` (white).
    Example: `echo '75 0 130' > /sys/class/leds/rgb:status/multi_intensity`
    
    LED brightness can be changed by specifying the value from 0-255 in /sys/class/leds/rgb:status/brightness. Default is `255` (full brightness).
    Example: `echo 100 > /sys/class/leds/rgb:status/brightness`
    
    For persistence across reboots, put the relevant command(s) in /etc/rc.local.
    
    * Notes:
    
    root access on stock firmware:
    Before flashing openwrt, and while in openwrt initramfs env:
    1. Mount /dev/ubi0_2: `mkdir /tmp/ubi0_2; mount -t ubifs /dev/ubi0_2 /tmp/ubi0_2`
    2. Modify `/tmp/ubi0_2/upper/etc/passwd` and change line with `root:x:0:0...` to `root::0:0...`, remove the `x`.
    3. Save and reboot.
    4. You should now be able to log in with root and empty password while booted in stock firmware.
    
    While on Openwrt, subsequent upgrades can be made by sysupgrade, or via Luci. UART should not be necessary unless you want to revert to stock firmeware.
    
    Signed-off-by: Qing W <ses1er at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19754
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../mediatek/dts/mt7986a-acer-predator-w6x.dts     | 352 +++++++++++++++++++++
 .../filogic/base-files/etc/board.d/01_leds         |   3 +
 .../filogic/base-files/etc/board.d/02_network      |   8 +
 .../etc/hotplug.d/ieee80211/11_fix_wifi_mac        |   5 +
 .../base-files/lib/preinit/10_fix_eth_mac.sh       |   9 +
 target/linux/mediatek/image/filogic.mk             |  17 +
 6 files changed, 394 insertions(+)

diff --git a/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts b/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
new file mode 100644
index 0000000000..d46497ec33
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
@@ -0,0 +1,352 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+#include "mt7986a.dtsi"
+
+/ {
+	model = "Acer Predator Connect W6x";
+	compatible = "acer,predator-w6x", "mediatek,mt7986a";
+
+	aliases {
+		serial0 = &uart0;
+	};
+
+    chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory at 0 {
+		reg = <0 0x40000000 0 0x20000000>;
+	};
+
+	reg_1p8v: regulator-1p8v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-1.8V";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_5v: regulator-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		factory {
+			label = "factory";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
+		};
+
+		wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&crypto {
+	status = "okay";
+};
+
+&eth {
+	status = "okay";
+
+	gmac0: mac at 0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "2500base-x";
+
+		fixed-link {
+			speed = <2500>;
+			full-duplex;
+			pause;
+		};
+	};
+	gmac1: mac at 1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "2500base-x";
+		phy-handle = <&phy6>;
+	};
+
+	mdio-bus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		switch at 1f {
+			compatible = "mediatek,mt7531";
+			reg = <31>;
+			reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
+			reset-assert-us = <10000>;
+			reset-deassert-us = <10000>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 1 {
+					reg = <1>;
+					label = "lan1";
+				};
+
+				port at 2 {
+					reg = <2>;
+					label = "lan2";
+				};
+
+				port at 3 {
+					reg = <3>;
+					label = "lan3";
+				};
+
+				port at 4 {
+					reg = <4>;
+					label = "lan4";
+				};
+
+				port at 6 {
+					reg = <6>;
+					label = "cpu";
+					ethernet = <&gmac0>;
+					phy-mode = "2500base-x";
+
+					fixed-link {
+						speed = <2500>;
+						full-duplex;
+						pause;
+					};
+				};
+			};
+		};
+
+		phy6: phy at 6 {
+			compatible = "ethernet-phy-ieee802.3-c45";
+			reg = <6>;
+
+		};
+	};
+};
+
+&pio {
+	spi_flash_pins: spi-flash-pins-33-to-38 {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+		conf-pu {
+			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
+			drive-strength = <8>;
+			mediatek,pull-up-adv = <0>; /* bias-disable */
+		};
+		conf-pd {
+			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
+			drive-strength = <8>;
+			mediatek,pull-down-adv = <0>; /* bias-disable */
+		};
+	};
+
+	spi_led_pins: spic-pins-29-to-32 {
+		mux {
+			function = "spi";
+			groups = "spi1_2";
+		};
+	};
+
+	wf_2g_5g_pins: wf_2g_5g-pins {
+		mux {
+			function = "wifi";
+			groups = "wf_2g", "wf_5g";
+		};
+		conf {
+			pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
+				   "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
+				   "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
+				   "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
+				   "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
+				   "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
+				   "WF1_TOP_CLK", "WF1_TOP_DATA";
+			drive-strength = <4>;
+		};
+	};
+
+	wf_dbdc_pins: wf-dbdc-pins {
+		mux {
+			function = "wifi";
+			groups = "wf_dbdc";
+		};
+		conf {
+			pins = "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4",
+				"WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
+				"WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
+				"WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1",
+				"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
+				"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
+				"WF1_TOP_CLK", "WF1_TOP_DATA";
+			drive-strength = <4>;
+		};
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi_flash_pins>;
+	status = "okay";
+
+	spi_nand at 0 {
+		compatible = "spi-nand";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0>;
+
+		spi-max-frequency = <52000000>;
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "bl2";
+				reg = <0x0 0x100000>;
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "u-boot-env";
+				reg = <0x100000 0x80000>;
+			};
+
+			partition at 180000 {
+				label = "factory";
+				reg = <0x180000 0x200000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x1000>;
+					};
+				};
+			};
+
+			partition at 380000 {
+				label = "fip";
+				reg = <0x380000 0x200000>;
+				read-only;
+			};
+
+			partition at 580000 {
+				label = "prod";
+				reg = <0x580000 0x20000>;
+				read-only;
+			};
+
+			partition at 600000 {
+				label = "dual";
+				reg = <0x600000 0x100000>;
+				read-only;
+			};
+
+			partition at 700000 {
+				label = "pot";
+				reg = <0x700000 0x100000>;
+				read-only;
+			};
+
+			partition at 800000 {
+				label = "ubi";
+				reg = <0x800000 0x6400000>;
+			};
+
+			partition at 6C00000 {
+				label = "ubi1";
+				reg = <0x6C00000 0x6400000>;
+			};
+
+			partition at D000000 {
+				label = "storage";
+				reg = <0xD000000 0x800000>;
+			};
+		};
+	};
+};
+
+&spi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi_led_pins>;
+	status = "okay";
+
+	ws2812b at 0 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "worldsemi,ws2812b";
+		reg = <0>;
+		spi-max-frequency = <3000000>;
+
+		led_status_rgb: led at 0 {
+			reg = <0>;
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RGB>;
+			color-index = <LED_COLOR_ID_RED LED_COLOR_ID_GREEN LED_COLOR_ID_BLUE>;
+		};
+	};
+};
+
+&ssusb {
+	vusb33-supply = <&reg_3p3v>;
+	vbus-supply = <&reg_5v>;
+	status = "okay";
+};
+
+&trng {
+	status = "okay";
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&wifi {
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+	pinctrl-names = "default", "dbdc";
+	pinctrl-0 = <&wf_2g_5g_pins>;
+	pinctrl-1 = <&wf_dbdc_pins>;
+	status = "okay";
+};
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
index 62a0161286..f2b773636c 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
@@ -16,6 +16,9 @@ acer,predator-w6d)
 	ucidef_set_led_netdev "internet" "INTERNET" "mdio-bus:06:amber:wan" "eth1" "link_10 link_100 link_1000 tx rx"
 	ucidef_set_led_netdev "internet" "INTERNET" "mdio-bus:06:green:wan" "eth1" "link_2500 tx rx"
 	;;
+acer,predator-w6x)
+	ucidef_set_led_netdev "wan" "wan" "rgb:status" "eth1"
+	;;
 asus,rt-ax52|\
 snr,snr-cpe-ax2)
 	ucidef_set_led_netdev "wan" "wan" "blue:wan" "wan" "link tx rx"
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
index 64efde9155..c5709f74f4 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -25,6 +25,9 @@ mediatek_setup_interfaces()
 	acer,predator-w6d)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 game" eth1
 		;;
+	acer,predator-w6x)
+		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" eth1
+		;;
 	acer,vero-w6m)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" internet
 		;;
@@ -179,6 +182,11 @@ mediatek_setup_macs()
 		wan_mac=$(mmc_get_mac_ascii u-boot-env WANMAC)
 		lan_mac=$(mmc_get_mac_ascii u-boot-env LANMAC)
 		;;
+	acer,predator-w6x)
+		wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
+		lan_mac=$(macaddr_add "$wan_mac" 1)
+		label_mac=$wan_mac
+		;;
 	bananapi,bpi-r3|\
 	bananapi,bpi-r3-mini|\
 	bananapi,bpi-r4)
diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index 02ae06a4ab..e54056d165 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -27,6 +27,11 @@ case "$board" in
 		[ "$PHYNBR" = "0" ] && mmc_get_mac_ascii u-boot-env 2gMAC > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && mmc_get_mac_ascii u-boot-env 5gMAC > /sys${DEVPATH}/macaddress
 		;;
+	acer,predator-w6x)
+		hw_mac_addr="$(mtd_get_mac_ascii u-boot-env ethaddr)"
+		[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
+		[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 3 > /sys${DEVPATH}/macaddress
+		;;
 	asus,rt-ax59u)
 		CI_UBIPART="UBI_DEV"
 		addr=$(mtd_get_mac_binary_ubi "Factory" 0x4)
diff --git a/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh b/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh
index 5b9e5bd7ad..f5032a2a36 100644
--- a/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/preinit/10_fix_eth_mac.sh
@@ -12,6 +12,15 @@ preinit_set_mac_address() {
 		ip link set dev game address "$lan_mac"
 		ip link set dev eth1 address "$wan_mac"
 		;;
+	acer,predator-w6x)
+		wan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
+		lan_mac=$(macaddr_add "$wan_mac" 1)
+		ip link set dev lan1 address "$lan_mac"
+		ip link set dev lan2 address "$lan_mac"
+		ip link set dev lan3 address "$lan_mac"
+		ip link set dev lan4 address "$lan_mac"
+		ip link set dev eth1 address "$wan_mac"
+		;;
 	acer,vero-w6m)
 		wan_mac=$(mmc_get_mac_ascii u-boot-env WANMAC)
 		lan_mac=$(mmc_get_mac_ascii u-boot-env LANMAC)
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index b1c3398014..434ae11576 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -191,6 +191,23 @@ define Device/acer_predator-w6d
 endef
 TARGET_DEVICES += acer_predator-w6d
 
+define Device/acer_predator-w6x
+  DEVICE_VENDOR := Acer
+  DEVICE_MODEL := Predator Connect W6x
+  DEVICE_DTS := mt7986a-acer-predator-w6x
+  DEVICE_DTS_DIR := ../dts
+  DEVICE_DTS_LOADADDR := 0x47000000
+  KERNEL_IN_UBI := 1
+  UBOOTENV_IN_UBI := 1
+  DEVICE_PACKAGES := kmod-usb3 kmod-leds-ws2812b kmod-mt7915e kmod-mt7986-firmware mt7986-wo-firmware
+  IMAGES := sysupgrade.bin
+  KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
+  KERNEL_INITRAMFS := kernel-bin | lzma | \
+	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += acer_predator-w6x
+
 define Device/acer_vero-w6m
   DEVICE_VENDOR := Acer
   DEVICE_MODEL := Connect Vero W6m



From lede-commits at lists.infradead.org  Sat Aug 23 15:02:09 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 23 Aug 2025 18:02:09 -0400
Subject: [openwrt/openwrt]  realtek: rtl93xx: fix incorrect destination port
 selection
In-Reply-To: <175598652908.3954514.6201512543609035020@git-01.infra.openwrt.org>
References: <175598652908.3954514.6201512543609035020@git-01.infra.openwrt.org>
Message-ID: <mailman.128555.1755986532.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8c42e63a69f61ee9c295c05f00f6c1fba7b85a47

commit 8c42e63a69f61ee9c295c05f00f6c1fba7b85a47
Author: Issam Hamdi <ih at simonwunderlich.de>
AuthorDate: Fri Mar 28 10:39:44 2025 +0100

    realtek: rtl93xx: fix incorrect destination port selection
    
    When testing LLDP and STP, we observed that locally generated multicast
    packets (e.g. LLDP, STP) were not restricted to the designated output
    port(s). For example, when transmitting on `lan1`, the same packet was also
    forwarded to other ports such as `lan2`.
    
    Steps to reproduce:
    
    1. Configure lldpd to use `lan1` in UCI and restart the service
    2. Connect devices to `lan1` and `lan2`
    3. Observe that the device on `lan2` still receives LLDP packets
    
    The issue was caused by an incorrect `FWD_TYPE` setting in the TX CPU TAG,
    which failed to enforce the selected egress port(s).
    
    Fix this by updating the TX CPU TAG to set `FWD_TYPE` correctly, ensuring
    that locally generated packets are transmitted only on the intended
    port(s).
    
    Signed-off-by: Issam Hamdi <ih at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19802
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
index ddfdabacb6..10e4c2d035 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
@@ -156,7 +156,8 @@ static void rtl839x_create_tx_header(struct p_hdr *h, unsigned int dest_port, in
 static void rtl930x_create_tx_header(struct p_hdr *h, unsigned int dest_port, int prio)
 {
 	h->cpu_tag[0] = 0x8000;  /* CPU tag marker */
-	h->cpu_tag[1] = h->cpu_tag[2] = 0;
+	h->cpu_tag[1] = 0x0200; /* Set FWD_TYPE to LOGICAL (2) */
+	h->cpu_tag[2] = 0;
 	h->cpu_tag[3] = 0;
 	h->cpu_tag[4] = 0;
 	h->cpu_tag[5] = 0;
@@ -171,7 +172,8 @@ static void rtl930x_create_tx_header(struct p_hdr *h, unsigned int dest_port, in
 static void rtl931x_create_tx_header(struct p_hdr *h, unsigned int dest_port, int prio)
 {
 	h->cpu_tag[0] = 0x8000;  /* CPU tag marker */
-	h->cpu_tag[1] = h->cpu_tag[2] = 0;
+	h->cpu_tag[1] = 0x0200; /* Set FWD_TYPE to LOGICAL (2) */
+	h->cpu_tag[2] = 0;
 	h->cpu_tag[3] = 0;
 	h->cpu_tag[4] = h->cpu_tag[5] = h->cpu_tag[6] = h->cpu_tag[7] = 0;
 	if (dest_port >= 32) {



From lede-commits at lists.infradead.org  Sat Aug 23 15:22:25 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 23 Aug 2025 18:22:25 -0400
Subject: [openwrt/openwrt]  ath10k-ct-firmware: update to latest stable
 firmware 2021.11.08
In-Reply-To: <175598774543.4036099.9933392411668058833@git-01.infra.openwrt.org>
References: <175598774543.4036099.9933392411668058833@git-01.infra.openwrt.org>
Message-ID: <mailman.128558.1755987754.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3850d60f38b5f2234cd8844f586ab3493b9e6290

commit 3850d60f38b5f2234cd8844f586ab3493b9e6290
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Fri Jun 6 20:32:26 2025 +0800

    ath10k-ct-firmware: update to latest stable firmware 2021.11.08
    
    Release Notes:
    
    * Fall 2021: Optimize compiler options for memory usage and performance.
    
    * Jan 17 2021: Enable peer fixed rate feature (S.G)
    
    Run-tested: QCA9882, QCA9887, QCA9888 and IPQ4019.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19042
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/ath10k-ct-firmware/Makefile | 66 ++++++++++++++--------------
 1 file changed, 33 insertions(+), 33 deletions(-)

diff --git a/package/firmware/ath10k-ct-firmware/Makefile b/package/firmware/ath10k-ct-firmware/Makefile
index 960fc93e15..8bdb59a77a 100644
--- a/package/firmware/ath10k-ct-firmware/Makefile
+++ b/package/firmware/ath10k-ct-firmware/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ath10k-ct-firmware
-PKG_VERSION:=2020.11.08
+PKG_VERSION:=2021.11.08
 PKG_RELEASE:=1
 
 DL_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -30,120 +30,120 @@ define Download/ct-firmware-htt
   URL_FILE:=$($(1)_FIRMWARE_FILE_CT_HTT)
 endef
 
-QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.022
+QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin
 define Download/ath10k-firmware-qca988x-ct
   $(call Download/ct-firmware,QCA988X,)
-  HASH:=398e4380e7e55105f3da0f78af29d1e437404ed3a82597aa4b6daaa7dce1a38e
+  HASH:=1bd53359a721019a1662302ba998abc89c1c44ee0db238aad08e2a7c8da949b3
 endef
 $(eval $(call Download,ath10k-firmware-qca988x-ct))
 
-QCA988X_FIRMWARE_FILE_CT_FULL_HTT:=firmware-2-ct-full-htt-mgt-community-22.bin.lede.022
+QCA988X_FIRMWARE_FILE_CT_FULL_HTT:=firmware-2-ct-full-htt-mgt-community.bin
 define Download/ath10k-firmware-qca988x-ct-full-htt
   $(call Download/ct-firmware-full-htt,QCA988X,)
-  HASH:=990d9cbf79dd81f141257a289f89808bd7726406c9ed845a7e49e5167002ffde
+  HASH:=ca205e4b084668afe9e0dc9fb0d1010c4b30240ac12214baab22bf24656df313
 endef
 $(eval $(call Download,ath10k-firmware-qca988x-ct-full-htt))
 
 
-QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community-22.bin.lede.022
+QCA9887_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin
 define Download/ath10k-firmware-qca9887-ct
   $(call Download/ct-firmware,QCA9887,ath10k-9887)
-  HASH:=a526cb44560da569781e10bf608194b1eff29b250e9887dba6d4d9a15c921c1e
+  HASH:=4bbe3524e029272de7805f52d6730846628a7890ff6d9f3758950dbc2e8591c7
 endef
 $(eval $(call Download,ath10k-firmware-qca9887-ct))
 
-QCA9887_FIRMWARE_FILE_CT_FULL_HTT:=firmware-2-ct-full-htt-mgt-community-22.bin.lede.022
+QCA9887_FIRMWARE_FILE_CT_FULL_HTT:=firmware-2-ct-full-htt-mgt-community.bin
 define Download/ath10k-firmware-qca9887-ct-full-htt
   $(call Download/ct-firmware-full-htt,QCA9887,ath10k-9887)
-  HASH:=0b60fc558b773e9cbd5c2df903c894a030872fdb96390b0cca4b23b7fc7b881f
+  HASH:=1eb7a6d705cdca390c5a2df8a823e854da31e79dcf78e7c9214691386619d28f
 endef
 $(eval $(call Download,ath10k-firmware-qca9887-ct-full-htt))
 
 
-QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.022
+QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-13.bin
 define Download/ath10k-firmware-qca99x0-ct
   $(call Download/ct-firmware,QCA99X0,ath10k-10-4b)
-  HASH:=578ad67976b61a393eb820a05e8eae70ec95f6b803bedbe952b8ff573eb09abe
+  HASH:=ea727a66f2e5ba9a1a8e650c41f4264ce081a4b45b4b86cb2b4a1be70583b87f
 endef
 $(eval $(call Download,ath10k-firmware-qca99x0-ct))
 
-QCA99X0_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.022
+QCA99X0_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-13.bin
 define Download/ath10k-firmware-qca99x0-ct-full-htt
   $(call Download/ct-firmware-full-htt,QCA99X0,ath10k-10-4b)
-  HASH:=8ea5c9f27c048796d406706a9c8471cd070f5aeb768622bb334a04853d557a4d
+  HASH:=ca310564a2363dbade1fd637762e41b7cacf0d9eb27eb0677f3a095a6307026a
 endef
 $(eval $(call Download,ath10k-firmware-qca99x0-ct-full-htt))
 
-QCA99X0_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-12.bin-lede.022
+QCA99X0_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-13.bin
 define Download/ath10k-firmware-qca99x0-ct-htt
   $(call Download/ct-firmware-htt,QCA99X0,ath10k-10-4b)
-  HASH:=7b0b7545114e8dc0f2c70dc8a43a5a48d84d37f2a4673977a692c5f3361445c6
+  HASH:=f3833958a4376ea8f83360fe58e13d6ba239aee090e831a4bf66ced1df070f1d
 endef
 $(eval $(call Download,ath10k-firmware-qca99x0-ct-htt))
 
 
-QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.022
+QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-13.bin
 define Download/ath10k-firmware-qca9984-ct
   $(call Download/ct-firmware,QCA9984,ath10k-9984-10-4b)
-  HASH:=7bfe5bf7c38532fa57db62ebc56ec625583928d5d4736475d5dec4d4ae031154
+  HASH:=6c649ea5ece0685e20c0599c4f0c0ad1bcec91170a4141d4d9e47b8a1dd9a581
 endef
 $(eval $(call Download,ath10k-firmware-qca9984-ct))
 
-QCA9984_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.022
+QCA9984_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-13.bin
 define Download/ath10k-firmware-qca9984-ct-full-htt
   $(call Download/ct-firmware-full-htt,QCA9984,ath10k-9984-10-4b)
-  HASH:=672be40c4d987d7e8e309341262a37cda7baf925416d1dc651284b6d2bd30969
+  HASH:=1986f20846fc293b4901050a30d588cddfcfa1fa9319ce9f6a02178c49575b38
 endef
 $(eval $(call Download,ath10k-firmware-qca9984-ct-full-htt))
 
-QCA9984_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-12.bin-lede.022
+QCA9984_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-13.bin
 define Download/ath10k-firmware-qca9984-ct-htt
   $(call Download/ct-firmware-htt,QCA9984,ath10k-9984-10-4b)
-  HASH:=a24e887f13aca4358ab2b6a42a7212d066e4d19e29b00bb26f9681b1dc8d0eb0
+  HASH:=752aea95c552f44146919e189eb77e4db8f7b7ea304a29d017478833cbec04d1
 endef
 $(eval $(call Download,ath10k-firmware-qca9984-ct-htt))
 
 
-QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.022
+QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-13.bin
 define Download/ath10k-firmware-qca4019-ct
   $(call Download/ct-firmware,QCA4019,ath10k-4019-10-4b)
-  HASH:=503956d9bf09d603e4cf36ac080fa5b5a22032166204e3c15ae898647bc50df3
+  HASH:=4e40999ed315f6d5f9d10fcfcf637427bc96836151a0638a67590e9de0fa10d5
 endef
 $(eval $(call Download,ath10k-firmware-qca4019-ct))
 
-QCA4019_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.022
+QCA4019_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-13.bin
 define Download/ath10k-firmware-qca4019-ct-full-htt
   $(call Download/ct-firmware-full-htt,QCA4019,ath10k-4019-10-4b)
-  HASH:=591bf9ed00fb540d7ba034453f17696e8dd91a4b7d81f7cc1ec41f447fa74831
+  HASH:=b8392441b7b6292cccd174981f371b5589e5ec48aa57adfd0c80932811e6c97a
 endef
 $(eval $(call Download,ath10k-firmware-qca4019-ct-full-htt))
 
-QCA4019_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-12.bin-lede.022
+QCA4019_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-13.bin
 define Download/ath10k-firmware-qca4019-ct-htt
   $(call Download/ct-firmware-htt,QCA4019,ath10k-4019-10-4b)
-  HASH:=06e58a283ff90d021ff7cb58684cbf39750bd71cf91c56b32add64253133929c
+  HASH:=087659d6f4e82a0393cfbf68cfc31514d785d2ce135210ddbdc4672dc4f0078f
 endef
 $(eval $(call Download,ath10k-firmware-qca4019-ct-htt))
 
 
-QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-12.bin-lede.022
+QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-13.bin
 define Download/ath10k-firmware-qca9888-ct
   $(call Download/ct-firmware,QCA9888,ath10k-9888-10-4b)
-  HASH:=82ff5afcf0c9dcdb03b0b40c6eddc81e11b18e4f522f681935b5ec42537972ee
+  HASH:=44e1ecbdfb55b5f100577cbc8fbca8ffe93907d7dc16429e24fcf44603556797
 endef
 $(eval $(call Download,ath10k-firmware-qca9888-ct))
 
-QCA9888_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-12.bin-lede.022
+QCA9888_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-13.bin
 define Download/ath10k-firmware-qca9888-ct-full-htt
   $(call Download/ct-firmware-full-htt,QCA9888,ath10k-9888-10-4b)
-  HASH:=1a741f2cf43fbea24ed831b4e76cbb114b525d1ee9b917ce0000916cbcc42f92
+  HASH:=c1296d199f0a8660d4bdf5bce5cbbb139129eeebffe049fb37dc0c3304305ad4
 endef
 $(eval $(call Download,ath10k-firmware-qca9888-ct-full-htt))
 
-QCA9888_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-12.bin-lede.022
+QCA9888_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-13.bin
 define Download/ath10k-firmware-qca9888-ct-htt
   $(call Download/ct-firmware-htt,QCA9888,ath10k-9888-10-4b)
-  HASH:=34bf07912a2f3fce4a5887c690848bb06d339bd1c86541b0b57b9c45eccc88e4
+  HASH:=2c2fe9aa2d3eb08b6f3285d5faf4b217b52ca7b52199ce6407e915a1379b7fce
 endef
 $(eval $(call Download,ath10k-firmware-qca9888-ct-htt))
 



From lede-commits at lists.infradead.org  Sat Aug 23 15:22:26 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 23 Aug 2025 18:22:26 -0400
Subject: [openwrt/openwrt]  ath10k-ct-firmware: update qca988X firmware to
 latest beta version
In-Reply-To: <175598774543.4036099.9933392411668058833@git-01.infra.openwrt.org>
References: <175598774543.4036099.9933392411668058833@git-01.infra.openwrt.org>
Message-ID: <mailman.128559.1755987757.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cb24806ff1595c41ce2b7d206161ae20442c5a2b

commit cb24806ff1595c41ce2b7d206161ae20442c5a2b
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Fri Jun 6 20:32:26 2025 +0800

    ath10k-ct-firmware: update qca988X firmware to latest beta version
    
    Release Notes:
    
    * Attempt to fix crash in scanning logic by making probe_timer
      ignore re-arm.
    
    Candela Technologies has already used this beta firmware in their
    commercial product "LANforge". On QCA9882, I didn't catch any speed
    or stability issues compared to the previous version. Therefore, I
    think it is worth updating this beta version.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19042
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/ath10k-ct-firmware/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/firmware/ath10k-ct-firmware/Makefile b/package/firmware/ath10k-ct-firmware/Makefile
index 8bdb59a77a..6da65f3b78 100644
--- a/package/firmware/ath10k-ct-firmware/Makefile
+++ b/package/firmware/ath10k-ct-firmware/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ath10k-ct-firmware
-PKG_VERSION:=2021.11.08
+PKG_VERSION:=2022.09.12
 PKG_RELEASE:=1
 
 DL_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -32,15 +32,15 @@ endef
 
 QCA988X_FIRMWARE_FILE_CT:=firmware-2-ct-full-community.bin
 define Download/ath10k-firmware-qca988x-ct
-  $(call Download/ct-firmware,QCA988X,)
-  HASH:=1bd53359a721019a1662302ba998abc89c1c44ee0db238aad08e2a7c8da949b3
+  $(call Download/ct-firmware,QCA988X,ath10k-fw-beta)
+  HASH:=0723e73558e7187f099219bc5de2152336f27c40aa8ca6f2ed7e4f7cbd6049bd
 endef
 $(eval $(call Download,ath10k-firmware-qca988x-ct))
 
 QCA988X_FIRMWARE_FILE_CT_FULL_HTT:=firmware-2-ct-full-htt-mgt-community.bin
 define Download/ath10k-firmware-qca988x-ct-full-htt
-  $(call Download/ct-firmware-full-htt,QCA988X,)
-  HASH:=ca205e4b084668afe9e0dc9fb0d1010c4b30240ac12214baab22bf24656df313
+  $(call Download/ct-firmware-full-htt,QCA988X,ath10k-fw-beta)
+  HASH:=256cc450c02494e450fea9463be1289e3b46fcb5d8ce02a0c97fc86d15703b25
 endef
 $(eval $(call Download,ath10k-firmware-qca988x-ct-full-htt))
 



From lede-commits at lists.infradead.org  Sat Aug 23 15:22:27 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 23 Aug 2025 18:22:27 -0400
Subject: [openwrt/openwrt]  ath10k-ct-firmware: update wave2 chip firmware to
 latest beta version
In-Reply-To: <175598774543.4036099.9933392411668058833@git-01.infra.openwrt.org>
References: <175598774543.4036099.9933392411668058833@git-01.infra.openwrt.org>
Message-ID: <mailman.128560.1755987764.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8c314acc33fe1765f5f15bef5804675b75bc9e7c

commit 8c314acc33fe1765f5f15bef5804675b75bc9e7c
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Fri Jun 6 20:32:26 2025 +0800

    ath10k-ct-firmware: update wave2 chip firmware to latest beta version
    
    Release Notes:
    
    * Support enabling/disabling rts/cts. Not sure if this really works as
      hoped though.
    
    * Improved compiler options to build smaller sized binaries.
    
    * Sept 15, 2022:  Fix per-peer txpower to not over-ride tpc when value
      is 0 (ie, not set yet). This in turn fixes TPC over-ride through the
      txo path.
    
    * April 4, 2023:  Fix uninitialized minccapwr threshold variables,
      reported by Sebastian.
    
    Candela Technologies has already used this beta firmware in their
    commercial product "LANforge". And the -ct firmware homepage states
    that "This is code is not being changed much, and should be considered
    for stable use now." On QCA9888 and IPQ4019, I didn't catch any speed
    or stability issues compared to the previous version. Therefore, I
    think it is worth updating this beta version.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19042
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/ath10k-ct-firmware/Makefile | 74 ++++++++++++++--------------
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/package/firmware/ath10k-ct-firmware/Makefile b/package/firmware/ath10k-ct-firmware/Makefile
index 6da65f3b78..e43611e044 100644
--- a/package/firmware/ath10k-ct-firmware/Makefile
+++ b/package/firmware/ath10k-ct-firmware/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ath10k-ct-firmware
-PKG_VERSION:=2022.09.12
+PKG_VERSION:=2023.04.04
 PKG_RELEASE:=1
 
 DL_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -60,90 +60,90 @@ endef
 $(eval $(call Download,ath10k-firmware-qca9887-ct-full-htt))
 
 
-QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-13.bin
+QCA99X0_FIRMWARE_FILE_CT:=firmware-5-ct-full-community.bin
 define Download/ath10k-firmware-qca99x0-ct
-  $(call Download/ct-firmware,QCA99X0,ath10k-10-4b)
-  HASH:=ea727a66f2e5ba9a1a8e650c41f4264ce081a4b45b4b86cb2b4a1be70583b87f
+  $(call Download/ct-firmware,QCA99X0,ath10k-10-4b/ath10k-fw-beta)
+  HASH:=ef5e9607e7804320a99a8a69524f2981f4b3ff8e42fe9860e36e8e6c6a08954b
 endef
 $(eval $(call Download,ath10k-firmware-qca99x0-ct))
 
-QCA99X0_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-13.bin
+QCA99X0_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community.bin
 define Download/ath10k-firmware-qca99x0-ct-full-htt
-  $(call Download/ct-firmware-full-htt,QCA99X0,ath10k-10-4b)
-  HASH:=ca310564a2363dbade1fd637762e41b7cacf0d9eb27eb0677f3a095a6307026a
+  $(call Download/ct-firmware-full-htt,QCA99X0,ath10k-10-4b/ath10k-fw-beta)
+  HASH:=7965b617e1a3b4b2f12e9313272ae3b765376a90357024e41665483cb3dbc1a5
 endef
 $(eval $(call Download,ath10k-firmware-qca99x0-ct-full-htt))
 
-QCA99X0_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-13.bin
+QCA99X0_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community.bin
 define Download/ath10k-firmware-qca99x0-ct-htt
-  $(call Download/ct-firmware-htt,QCA99X0,ath10k-10-4b)
-  HASH:=f3833958a4376ea8f83360fe58e13d6ba239aee090e831a4bf66ced1df070f1d
+  $(call Download/ct-firmware-htt,QCA99X0,ath10k-10-4b/ath10k-fw-beta)
+  HASH:=78d4df0a5c88209e3be4b10559d9a0dd45f6175bf3033a5f5dac04479821c7a5
 endef
 $(eval $(call Download,ath10k-firmware-qca99x0-ct-htt))
 
 
-QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-13.bin
+QCA9984_FIRMWARE_FILE_CT:=firmware-5-ct-full-community.bin
 define Download/ath10k-firmware-qca9984-ct
-  $(call Download/ct-firmware,QCA9984,ath10k-9984-10-4b)
-  HASH:=6c649ea5ece0685e20c0599c4f0c0ad1bcec91170a4141d4d9e47b8a1dd9a581
+  $(call Download/ct-firmware,QCA9984,ath10k-9984-10-4b/ath10k-fw-beta)
+  HASH:=d0e032352eda9a65a737217f14ac08148ba80bb73215783cf8fe2680948a5184
 endef
 $(eval $(call Download,ath10k-firmware-qca9984-ct))
 
-QCA9984_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-13.bin
+QCA9984_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community.bin
 define Download/ath10k-firmware-qca9984-ct-full-htt
-  $(call Download/ct-firmware-full-htt,QCA9984,ath10k-9984-10-4b)
-  HASH:=1986f20846fc293b4901050a30d588cddfcfa1fa9319ce9f6a02178c49575b38
+  $(call Download/ct-firmware-full-htt,QCA9984,ath10k-9984-10-4b/ath10k-fw-beta)
+  HASH:=40791ec0bb0a26693406752cdff49c8fb5294cccd84939f05b897d6f9544810a
 endef
 $(eval $(call Download,ath10k-firmware-qca9984-ct-full-htt))
 
-QCA9984_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-13.bin
+QCA9984_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community.bin
 define Download/ath10k-firmware-qca9984-ct-htt
-  $(call Download/ct-firmware-htt,QCA9984,ath10k-9984-10-4b)
-  HASH:=752aea95c552f44146919e189eb77e4db8f7b7ea304a29d017478833cbec04d1
+  $(call Download/ct-firmware-htt,QCA9984,ath10k-9984-10-4b/ath10k-fw-beta)
+  HASH:=bef51e1bf7b5dc5a98c355d9835370288251beb34f2243c71b95b496f23bc9fa
 endef
 $(eval $(call Download,ath10k-firmware-qca9984-ct-htt))
 
 
-QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-13.bin
+QCA4019_FIRMWARE_FILE_CT:=firmware-5-ct-full-community.bin
 define Download/ath10k-firmware-qca4019-ct
-  $(call Download/ct-firmware,QCA4019,ath10k-4019-10-4b)
-  HASH:=4e40999ed315f6d5f9d10fcfcf637427bc96836151a0638a67590e9de0fa10d5
+  $(call Download/ct-firmware,QCA4019,ath10k-4019-10-4b/ath10k-fw-beta)
+  HASH:=81b6675616a1216f9becfcd89b4ff17048bf29d18d1a14ccf78c0b8e46a50e79
 endef
 $(eval $(call Download,ath10k-firmware-qca4019-ct))
 
-QCA4019_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-13.bin
+QCA4019_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community.bin
 define Download/ath10k-firmware-qca4019-ct-full-htt
-  $(call Download/ct-firmware-full-htt,QCA4019,ath10k-4019-10-4b)
-  HASH:=b8392441b7b6292cccd174981f371b5589e5ec48aa57adfd0c80932811e6c97a
+  $(call Download/ct-firmware-full-htt,QCA4019,ath10k-4019-10-4b/ath10k-fw-beta)
+  HASH:=99b6a4ee2509b4a932ec7d1b5065b3cc9f6497d44cc63cb0fdf2a5e57b1a8340
 endef
 $(eval $(call Download,ath10k-firmware-qca4019-ct-full-htt))
 
-QCA4019_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-13.bin
+QCA4019_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community.bin
 define Download/ath10k-firmware-qca4019-ct-htt
-  $(call Download/ct-firmware-htt,QCA4019,ath10k-4019-10-4b)
-  HASH:=087659d6f4e82a0393cfbf68cfc31514d785d2ce135210ddbdc4672dc4f0078f
+  $(call Download/ct-firmware-htt,QCA4019,ath10k-4019-10-4b/ath10k-fw-beta)
+  HASH:=6a5b4f39d891ab2a1fddf79a350d061daed800d42df44658fa1e635da16e7bb9
 endef
 $(eval $(call Download,ath10k-firmware-qca4019-ct-htt))
 
 
-QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community-13.bin
+QCA9888_FIRMWARE_FILE_CT:=firmware-5-ct-full-community.bin
 define Download/ath10k-firmware-qca9888-ct
-  $(call Download/ct-firmware,QCA9888,ath10k-9888-10-4b)
-  HASH:=44e1ecbdfb55b5f100577cbc8fbca8ffe93907d7dc16429e24fcf44603556797
+  $(call Download/ct-firmware,QCA9888,ath10k-9888-10-4b/ath10k-fw-beta)
+  HASH:=7d7f16fea259119d834ba7c722036c70de14ed92c206d1a1ff9b45f3d26e1aef
 endef
 $(eval $(call Download,ath10k-firmware-qca9888-ct))
 
-QCA9888_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community-13.bin
+QCA9888_FIRMWARE_FILE_CT_FULL_HTT:=firmware-5-ct-full-htt-mgt-community.bin
 define Download/ath10k-firmware-qca9888-ct-full-htt
-  $(call Download/ct-firmware-full-htt,QCA9888,ath10k-9888-10-4b)
-  HASH:=c1296d199f0a8660d4bdf5bce5cbbb139129eeebffe049fb37dc0c3304305ad4
+  $(call Download/ct-firmware-full-htt,QCA9888,ath10k-9888-10-4b/ath10k-fw-beta)
+  HASH:=d4111ba5f08c146696824875483ce2b26d3251ebf3dfe2d96832a31db4edd98b
 endef
 $(eval $(call Download,ath10k-firmware-qca9888-ct-full-htt))
 
-QCA9888_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community-13.bin
+QCA9888_FIRMWARE_FILE_CT_HTT:=firmware-5-ct-htt-mgt-community.bin
 define Download/ath10k-firmware-qca9888-ct-htt
-  $(call Download/ct-firmware-htt,QCA9888,ath10k-9888-10-4b)
-  HASH:=2c2fe9aa2d3eb08b6f3285d5faf4b217b52ca7b52199ce6407e915a1379b7fce
+  $(call Download/ct-firmware-htt,QCA9888,ath10k-9888-10-4b/ath10k-fw-beta)
+  HASH:=0e48559fc853400686644557e3e231e724acbb5119afde2b2917b364a0964e7d
 endef
 $(eval $(call Download,ath10k-firmware-qca9888-ct-htt))
 



From lede-commits at lists.infradead.org  Sat Aug 23 22:19:05 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 01:19:05 -0400
Subject: [openwrt/openwrt]  udebug: update to Git HEAD (2025-08-24)
In-Reply-To: <175601274526.1660239.4964802391568181414@git-01.infra.openwrt.org>
References: <175601274526.1660239.4964802391568181414@git-01.infra.openwrt.org>
Message-ID: <mailman.128590.1756012749.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/78188ee2bc3aabc4311539cead5c3a58c184945d

commit 78188ee2bc3aabc4311539cead5c3a58c184945d
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 24 07:18:43 2025 +0200

    udebug: update to Git HEAD (2025-08-24)
    
    6e4ffe2c6657 ucode: add function for getting the number of entries in a snapshot
    a62edd89255b ucode: add support for fetching kernel tracepoint events
    edeb4d6dc690 udebug-cli: add support for streaming tracing data
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/udebug/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/udebug/Makefile b/package/libs/udebug/Makefile
index 1acbb16988..fe9ac87219 100644
--- a/package/libs/udebug/Makefile
+++ b/package/libs/udebug/Makefile
@@ -11,9 +11,9 @@ PKG_NAME:=udebug
 CMAKE_INSTALL:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/udebug.git
-PKG_MIRROR_HASH:=d787e64420b6b8410ee4a432cbaaeba0d116ef0d6bb6d670289229f049d10bf7
-PKG_SOURCE_DATE:=2025-08-17
-PKG_SOURCE_VERSION:=892647b81d30fcec8d275a2c5da05b94192c095d
+PKG_MIRROR_HASH:=5e7b713aa1bff3b6480d4bd94d607b9cafed787b3d1cb27513883c83e56b0273
+PKG_SOURCE_DATE:=2025-08-24
+PKG_SOURCE_VERSION:=edeb4d6dc690acb476a47e6b11633b5632b08437
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Sun Aug 24 04:58:39 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 07:58:39 -0400
Subject: [openwrt/openwrt]  uboot-mediatek: adjust the reserved memory regions
In-Reply-To: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
References: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
Message-ID: <mailman.128706.1756036718.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b286fd8a397f1dad36cc66551ffb8904e4915e17

commit b286fd8a397f1dad36cc66551ffb8904e4915e17
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Sun Aug 10 20:16:21 2025 +0800

    uboot-mediatek: adjust the reserved memory regions
    
    * Increase mt7986 ATF reserved memory to 256 kiB to follow the linux
      kernel and Trusted Firmware-A changes.
    
    * Remove unnecessary reserved memory region for the WiFi hardware. The
      u-boot can not drive the WiFi hardware. Hence we don't need to keep
      this memory region.
    
    * Remove useless node labels and update comments.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19741
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../patches/103-01-mt7622-enable-pstore.patch               |  4 ++--
 .../patches/103-02-mt7981-enable-pstore.patch               | 11 +++--------
 .../patches/103-03-mt7986-enable-pstore.patch               | 13 ++++---------
 .../patches/103-04-mt7988-enable-pstore.patch               |  4 ++--
 4 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/package/boot/uboot-mediatek/patches/103-01-mt7622-enable-pstore.patch b/package/boot/uboot-mediatek/patches/103-01-mt7622-enable-pstore.patch
index f085615e70..ac7a6b2f1f 100644
--- a/package/boot/uboot-mediatek/patches/103-01-mt7622-enable-pstore.patch
+++ b/package/boot/uboot-mediatek/patches/103-01-mt7622-enable-pstore.patch
@@ -21,8 +21,8 @@
 +			record-size = <0x1000>;
 +		};
 +
-+		/* 192 KiB reserved for ARM Trusted Firmware (BL31) */
-+		secmon_reserved: secmon at 43000000 {
++		/* 192 KiB reserved for ARM Trusted Firmware (BL31 + BL32) */
++		secmon at 43000000 {
 +			reg = <0x43000000 0x30000>;
 +			no-map;
 +		};
diff --git a/package/boot/uboot-mediatek/patches/103-02-mt7981-enable-pstore.patch b/package/boot/uboot-mediatek/patches/103-02-mt7981-enable-pstore.patch
index 8eaa91f53f..c822585a27 100644
--- a/package/boot/uboot-mediatek/patches/103-02-mt7981-enable-pstore.patch
+++ b/package/boot/uboot-mediatek/patches/103-02-mt7981-enable-pstore.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm/dts/mt7981.dtsi
 +++ b/arch/arm/dts/mt7981.dtsi
-@@ -33,6 +33,35 @@
+@@ -33,6 +33,30 @@
  		};
  	};
  
@@ -21,16 +21,11 @@
 +			record-size = <0x1000>;
 +		};
 +
-+		/* 192 KiB reserved for ARM Trusted Firmware (BL31) */
-+		secmon_reserved: secmon at 43000000 {
++		/* 192 KiB reserved for ARM Trusted Firmware (BL31 + BL32) */
++		secmon at 43000000 {
 +			reg = <0x43000000 0x30000>;
 +			no-map;
 +		};
-+
-+		wmcpu_emi: wmcpu-reserved at 4fc00000 {
-+			no-map;
-+			reg = <0x4fc00000 0x00100000>;
-+		};
 +	};
 +
  	gpt_clk: gpt_dummy20m {
diff --git a/package/boot/uboot-mediatek/patches/103-03-mt7986-enable-pstore.patch b/package/boot/uboot-mediatek/patches/103-03-mt7986-enable-pstore.patch
index 01ad0f919d..dcbf7c8e7a 100644
--- a/package/boot/uboot-mediatek/patches/103-03-mt7986-enable-pstore.patch
+++ b/package/boot/uboot-mediatek/patches/103-03-mt7986-enable-pstore.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm/dts/mt7986.dtsi
 +++ b/arch/arm/dts/mt7986.dtsi
-@@ -50,6 +50,35 @@
+@@ -50,6 +50,30 @@
  		};
  	};
  
@@ -21,16 +21,11 @@
 +			record-size = <0x1000>;
 +		};
 +
-+		/* 192 KiB reserved for ARM Trusted Firmware (BL31) */
-+		secmon_reserved: secmon at 43000000 {
-+			reg = <0x43000000 0x30000>;
++		/* 256 KiB reserved for ARM Trusted Firmware (BL31 + BL32) */
++		secmon at 43000000 {
++			reg = <0x43000000 0x40000>;
 +			no-map;
 +		};
-+
-+		wmcpu_emi: wmcpu-reserved at 4fc00000 {
-+			no-map;
-+			reg = <0x4fc00000 0x00100000>;
-+		};
 +	};
 +
  	dummy_clk: dummy12m {
diff --git a/package/boot/uboot-mediatek/patches/103-04-mt7988-enable-pstore.patch b/package/boot/uboot-mediatek/patches/103-04-mt7988-enable-pstore.patch
index 1f339d4b5b..68372736e5 100644
--- a/package/boot/uboot-mediatek/patches/103-04-mt7988-enable-pstore.patch
+++ b/package/boot/uboot-mediatek/patches/103-04-mt7988-enable-pstore.patch
@@ -21,8 +21,8 @@
 +			record-size = <0x1000>;
 +		};
 +
-+		/* 320 KiB reserved for ARM Trusted Firmware (BL31+BL32) */
-+		secmon_reserved: secmon at 43000000 {
++		/* 320 KiB reserved for ARM Trusted Firmware (BL31 + BL32) */
++		secmon at 43000000 {
 +			reg = <0 0x43000000 0 0x50000>;
 +			no-map;
 +		};



From lede-commits at lists.infradead.org  Sun Aug 24 04:58:32 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 07:58:32 -0400
Subject: [openwrt/openwrt]  mediatek: dts: fix the broken memory node
In-Reply-To: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
References: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
Message-ID: <mailman.128707.1756036718.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6f33529a1249826f0bbedd880c4c27e4cbe8a0f0

commit 6f33529a1249826f0bbedd880c4c27e4cbe8a0f0
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Fri Aug 8 20:53:58 2025 +0800

    mediatek: dts: fix the broken memory node
    
    Add the missing "device_type" property to fix the memory node. The
    Linux kernel can not get the memory size without it. Though u-boot
    can automatically fixup the memory node by adding the "device_type"
    and "reg" properties if the CONFIG_ARCH_FIXUP_FDT_MEMORY symbol is
    enabled, it's better not to rely on this optional feature. This
    patch also adds the reg address for the memory node name to follow
    the naming rules.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19741
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts  |  5 +++--
 .../linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts  |  3 ++-
 .../dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi        |  3 ++-
 .../linux/mediatek/dts/mt7622-elecom-wrc-2533gent.dts   |  5 +++--
 .../linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts  |  3 ++-
 target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi     |  3 ++-
 target/linux/mediatek/dts/mt7622-netgear-wax206.dts     |  3 ++-
 target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi  |  3 ++-
 target/linux/mediatek/dts/mt7622-smartrg-SDG-841-t6.dts |  3 ++-
 target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dtsi   |  3 ++-
 .../mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts    |  3 ++-
 target/linux/mediatek/dts/mt7981a-comfast-cf-e393ax.dts |  3 ++-
 target/linux/mediatek/dts/mt7981b-abt-asr3000.dts       |  1 +
 target/linux/mediatek/dts/mt7981b-asus-rt-ax52.dts      |  3 ++-
 target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts     |  3 ++-
 target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi         |  1 +
 target/linux/mediatek/dts/mt7981b-cmcc-rax3000m.dts     |  3 ++-
 .../dts/mt7981b-creatlentem-clt-r30b1-common.dtsi       |  3 ++-
 target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts |  3 ++-
 .../linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts   |  3 ++-
 target/linux/mediatek/dts/mt7981b-huasifei-wh3000.dts   |  1 +
 target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts       |  3 ++-
 target/linux/mediatek/dts/mt7981b-mercusys-mr80x-v3.dts |  3 ++-
 target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts   |  1 +
 target/linux/mediatek/dts/mt7981b-openembed-som7981.dts |  1 +
 target/linux/mediatek/dts/mt7981b-openwrt-one.dts       |  3 ++-
 target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts       |  3 ++-
 .../mediatek/dts/mt7981b-routerich-ax3000-common.dtsi   |  3 ++-
 target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts    |  3 ++-
 .../mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi   |  3 ++-
 .../linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts  |  3 ++-
 .../linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dts  |  3 ++-
 target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts |  3 ++-
 target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi   |  3 ++-
 target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts     |  3 ++-
 target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts   |  3 ++-
 target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts   |  3 ++-
 .../linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts |  3 ++-
 .../mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts |  1 +
 target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts  |  1 +
 target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts   |  1 +
 target/linux/mediatek/dts/mt7986a-netcore-n60.dts       |  3 ++-
 target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts |  1 +
 .../mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts      |  1 +
 .../mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi      |  3 ++-
 target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts |  3 ++-
 .../dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi         |  3 ++-
 .../mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi    |  3 ++-
 .../linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts |  3 ++-
 .../mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi  |  3 ++-
 target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts   |  3 ++-
 .../linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi   |  3 ++-
 target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi |  3 ++-
 .../arch/arm64/boot/dts/mediatek/mt7981-rfb.dts         |  3 ++-
 .../arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi       |  3 ++-
 ...dts-mediatek-add-MT7988A-reference-board-devic.patch |  5 +++--
 ...189-arm64-dts-mediatek-mt7988a-complete-bpi-r4.patch | 17 +++++++++--------
 57 files changed, 114 insertions(+), 57 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts b/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts
index b8fac373a0..8f24690a3c 100644
--- a/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts
+++ b/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts
@@ -11,8 +11,9 @@
 		label-mac-device = &gmac0;
 	};
 
-	memory {
-		reg = <0 0x40000000 0 0x0F000000>;
+	memory at 40000000 {
+		reg = <0 0x40000000 0 0x0f000000>;
+		device_type = "memory";
 	};
 
 	rtkgsw: rtkgsw at 0 {
diff --git a/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts b/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts
index 82cc970fdd..dee8c77341 100644
--- a/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts
+++ b/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts
@@ -7,8 +7,9 @@
 	model = "Buffalo WSR-3200AX4S";
 	compatible = "buffalo,wsr-3200ax4s", "mediatek,mt7622";
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x1f000000>;
+		device_type = "memory";
 	};
 };
 
diff --git a/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi b/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi
index 8bd58bfe85..ae92fedc58 100644
--- a/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi
+++ b/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi
@@ -45,8 +45,9 @@
 		};
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 };
 
diff --git a/target/linux/mediatek/dts/mt7622-elecom-wrc-2533gent.dts b/target/linux/mediatek/dts/mt7622-elecom-wrc-2533gent.dts
index 7fe5d02e1a..5f8bb3ded8 100644
--- a/target/linux/mediatek/dts/mt7622-elecom-wrc-2533gent.dts
+++ b/target/linux/mediatek/dts/mt7622-elecom-wrc-2533gent.dts
@@ -134,8 +134,9 @@
 		enable-active-high;
 	};
 
-	memory {
-		reg = <0 0x40000000 0 0x3F000000>;
+	memory at 40000000 {
+		reg = <0 0x40000000 0 0x3f000000>;
+		device_type = "memory";
 	};
 
 	reg_1p8v: regulator-1p8v {
diff --git a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts
index 2bf4a33a50..b437fe1b3a 100644
--- a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts
+++ b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts
@@ -25,8 +25,9 @@
 		bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8 swiotlb=512";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x1f000000>;
+		device_type = "memory";
 	};
 
 	leds {
diff --git a/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi b/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi
index 48b25f7a4a..882ab841a7 100644
--- a/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi
+++ b/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi
@@ -80,8 +80,9 @@
 		};
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 
 	reg_1p8v: regulator-1p8v {
diff --git a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
index ab512e7894..6399743223 100644
--- a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
+++ b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
@@ -108,8 +108,9 @@
 		};
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 };
 
diff --git a/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi b/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi
index 24ed92788e..0344d3dc6e 100644
--- a/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi
+++ b/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi
@@ -71,8 +71,9 @@
 		};
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 };
 
diff --git a/target/linux/mediatek/dts/mt7622-smartrg-SDG-841-t6.dts b/target/linux/mediatek/dts/mt7622-smartrg-SDG-841-t6.dts
index 05fd74a7d3..8cf18f5e07 100644
--- a/target/linux/mediatek/dts/mt7622-smartrg-SDG-841-t6.dts
+++ b/target/linux/mediatek/dts/mt7622-smartrg-SDG-841-t6.dts
@@ -90,8 +90,9 @@
 		};
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0x0 0x40000000 0x0 0x40000000>;
+		device_type = "memory";
 	};
 
 	reserved-memory {
diff --git a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dtsi b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dtsi
index 783b0c388e..f23b151968 100644
--- a/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dtsi
+++ b/target/linux/mediatek/dts/mt7622-ubnt-unifi-6-lr.dtsi
@@ -45,8 +45,9 @@
 		};
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x3f000000>;
+		device_type = "memory";
 	};
 
 	reg_1p8v: regulator-1p8v {
diff --git a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts
index ebc8731bc7..d3187cc383 100644
--- a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts
+++ b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts
@@ -26,8 +26,9 @@
 		bootargs = "earlycon=uart8250,mmio32,0x11002000 swiotlb=512 ubi.block=0,fit root=/dev/fit0";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x8000000>;
+		device_type = "memory";
 	};
 
 	leds {
diff --git a/target/linux/mediatek/dts/mt7981a-comfast-cf-e393ax.dts b/target/linux/mediatek/dts/mt7981a-comfast-cf-e393ax.dts
index 8f7598fc7c..1cf13ff6a9 100644
--- a/target/linux/mediatek/dts/mt7981a-comfast-cf-e393ax.dts
+++ b/target/linux/mediatek/dts/mt7981a-comfast-cf-e393ax.dts
@@ -20,8 +20,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>; // 256mb
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts b/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts
index 2b0d39b2c2..651d6461c7 100644
--- a/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts
+++ b/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts
@@ -25,6 +25,7 @@
 
 	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-asus-rt-ax52.dts b/target/linux/mediatek/dts/mt7981b-asus-rt-ax52.dts
index 34cc8ee131..604d318eae 100644
--- a/target/linux/mediatek/dts/mt7981b-asus-rt-ax52.dts
+++ b/target/linux/mediatek/dts/mt7981b-asus-rt-ax52.dts
@@ -19,8 +19,9 @@
 		bootargs-override = "";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 
 	keys {
diff --git a/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts b/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts
index 11ff28b19f..285c721d76 100644
--- a/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts
+++ b/target/linux/mediatek/dts/mt7981b-cetron-ct3003.dts
@@ -24,8 +24,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi b/target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi
index 91644746a6..2029537518 100644
--- a/target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi
@@ -24,6 +24,7 @@
 
 	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m.dts b/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m.dts
index a6803fe7da..36e77eb2c8 100644
--- a/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m.dts
+++ b/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m.dts
@@ -27,8 +27,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1-common.dtsi b/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1-common.dtsi
index 90d9ea04a1..17b820252f 100644
--- a/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1-common.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-creatlentem-clt-r30b1-common.dtsi
@@ -55,8 +55,9 @@
 		};
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 };
 
diff --git a/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts b/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts
index 2719b17656..fd08f724b5 100644
--- a/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts
+++ b/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp.dts
@@ -22,8 +22,9 @@
 		rootdisk = <&firmware>;
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 
 	reg_3p3v: regulator-3p3v {
diff --git a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
index dc62eeefd1..2f141b8c7a 100644
--- a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
+++ b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
@@ -25,8 +25,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-huasifei-wh3000.dts b/target/linux/mediatek/dts/mt7981b-huasifei-wh3000.dts
index 3f58ae42a1..4c1bae087c 100644
--- a/target/linux/mediatek/dts/mt7981b-huasifei-wh3000.dts
+++ b/target/linux/mediatek/dts/mt7981b-huasifei-wh3000.dts
@@ -60,6 +60,7 @@
 
 	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 };
 
diff --git a/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts b/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts
index a571d9afde..0045c452a7 100644
--- a/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts
+++ b/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts
@@ -26,8 +26,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-mercusys-mr80x-v3.dts b/target/linux/mediatek/dts/mt7981b-mercusys-mr80x-v3.dts
index 377c1c71fd..0db7a61f0d 100644
--- a/target/linux/mediatek/dts/mt7981b-mercusys-mr80x-v3.dts
+++ b/target/linux/mediatek/dts/mt7981b-mercusys-mr80x-v3.dts
@@ -22,8 +22,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	keys {
diff --git a/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts b/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
index 5865d9f1a7..707ec2b4ee 100644
--- a/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
+++ b/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
@@ -26,6 +26,7 @@
 
 	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-openembed-som7981.dts b/target/linux/mediatek/dts/mt7981b-openembed-som7981.dts
index 61465d9011..4c3f80ed5e 100644
--- a/target/linux/mediatek/dts/mt7981b-openembed-som7981.dts
+++ b/target/linux/mediatek/dts/mt7981b-openembed-som7981.dts
@@ -25,6 +25,7 @@
 
 	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 
 	beeper {
diff --git a/target/linux/mediatek/dts/mt7981b-openwrt-one.dts b/target/linux/mediatek/dts/mt7981b-openwrt-one.dts
index d1a24db38a..18a569daf8 100644
--- a/target/linux/mediatek/dts/mt7981b-openwrt-one.dts
+++ b/target/linux/mediatek/dts/mt7981b-openwrt-one.dts
@@ -22,8 +22,9 @@
 		rootdisk = <&ubi_fit_volume>;
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 
 	reg_3p3v: regulator-3p3v {
diff --git a/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts b/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts
index db7fa5e870..67ea2ff4c5 100644
--- a/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts
+++ b/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts
@@ -25,8 +25,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-routerich-ax3000-common.dtsi b/target/linux/mediatek/dts/mt7981b-routerich-ax3000-common.dtsi
index 9b41774b88..38fb371d8a 100644
--- a/target/linux/mediatek/dts/mt7981b-routerich-ax3000-common.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-routerich-ax3000-common.dtsi
@@ -108,8 +108,9 @@
 		};
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 };
 
diff --git a/target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts b/target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts
index af6fa90d7e..5815f84912 100644
--- a/target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts
+++ b/target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts
@@ -23,8 +23,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi
index ceb238bde2..4ff39064d5 100644
--- a/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-xiaomi-mi-router-common.dtsi
@@ -19,8 +19,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
index c0f7fff801..80dd203560 100644
--- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
+++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
@@ -22,8 +22,9 @@
 		bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dts
index 67b1eef411..ee066cf538 100644
--- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dts
+++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8103ax.dts
@@ -22,8 +22,9 @@
 		bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts b/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
index d46497ec33..c80f80e1cf 100644
--- a/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
+++ b/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
@@ -19,8 +19,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory at 0 {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	reg_1p8v: regulator-1p8v {
diff --git a/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi b/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi
index 8b35ce2517..f0df588473 100644
--- a/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi
@@ -12,8 +12,9 @@
 		bootargs = "dm-mod.create=\"acer,,,ro,0 1 zero 1 0 0 0\" rootfstype=squashfs,ext4 rootwait root=/dev/mmcblk0p6 fstools_ignore_partname=1";
 	};
 
-	memory at 0 {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	reg_1p8v: regulator-1p8v {
diff --git a/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts b/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts
index 7e0c05618f..d213c76793 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts
@@ -26,8 +26,9 @@
 		bootargs-override = "";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	keys {
diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
index f055118398..712584a3af 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
@@ -25,8 +25,9 @@
 		bootargs-override = "";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	keys {
diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
index 4d5c8410a3..e0faaaa11b 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
@@ -25,8 +25,9 @@
 		bootargs-override = "";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	keys {
diff --git a/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts b/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts
index f39fd96596..6808db80fe 100644
--- a/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts
+++ b/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts
@@ -32,8 +32,9 @@
 		rootdisk-spim-nand = <&nand_rootdisk>;
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x80000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts b/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts
index 10c53596e5..97a96aadea 100644
--- a/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts
+++ b/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts
@@ -26,6 +26,7 @@
 
 	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts b/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts
index 286c24a9f1..a318ad1ae4 100644
--- a/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts
+++ b/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts
@@ -30,6 +30,7 @@
 
 	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts b/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts
index 3af7792971..786c5eb312 100644
--- a/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts
+++ b/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts
@@ -28,6 +28,7 @@
 
 	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7986a-netcore-n60.dts b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts
index 484c93d4a7..6ab0f497c3 100644
--- a/target/linux/mediatek/dts/mt7986a-netcore-n60.dts
+++ b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts
@@ -26,8 +26,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
 	};
 
 	keys {
diff --git a/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts b/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts
index 9f40fec043..3628ad00e1 100644
--- a/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts
+++ b/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts
@@ -25,6 +25,7 @@
 
 	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts b/target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts
index 841501c7cf..12f03e1fda 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts
+++ b/target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts
@@ -25,6 +25,7 @@
 
 	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	gpio-keys {
diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
index 1649b0775d..0056f6f224 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
@@ -22,8 +22,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	reg_3p3v: regulator-3p3v {
diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts b/target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts
index e3d3aa37b2..c2ed7c9a28 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts
+++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts
@@ -26,8 +26,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 
 	reg_3p3v: regulator-3p3v {
diff --git a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi
index fe3e760914..3375434393 100644
--- a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi
@@ -20,8 +20,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	keys {
diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
index b68f386e8b..86c08138ac 100644
--- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
@@ -23,8 +23,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 
 	reg_1p8v: regulator-1p8v {
diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts b/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts
index 20e9146e2a..c2a0ef2ab0 100644
--- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts
+++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts
@@ -27,8 +27,9 @@
 		bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 
 	reg_3p3v: regulator-3p3v {
diff --git a/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi b/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi
index 5522c58af2..964c17e821 100644
--- a/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi
@@ -21,8 +21,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	keys {
diff --git a/target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts b/target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts
index 44a5e21e7c..12e264073d 100644
--- a/target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts
+++ b/target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts
@@ -24,8 +24,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	keys {
diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
index a0a8804726..a8eeebda6c 100644
--- a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
+++ b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
@@ -27,8 +27,9 @@
 		bootargs = "console=ttyS0,115200n1 pci=pcie_bus_perf root=PARTLABEL=rootfs";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0x0 0x40000000 0x0 0x40000000>;
+		device_type = "memory";
 	};
 
 	reserved-memory {
diff --git a/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi b/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi
index 20e7a3839c..1d916d760f 100644
--- a/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi
+++ b/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi
@@ -86,8 +86,9 @@
 		led-upgrade = &led_status_blue;
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0x0 0x40000000 0x0 0x40000000>;
+		device_type = "memory";
 	};
 
 	cpus {
diff --git a/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7981-rfb.dts b/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7981-rfb.dts
index 6fca59d3ef..28bcc155df 100644
--- a/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7981-rfb.dts
+++ b/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7981-rfb.dts
@@ -20,8 +20,9 @@
 		bootargs-append = " root=/dev/fit0 rootwait";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x20000000>;
+		device_type = "memory";
 	};
 
 	reg_3p3v: regulator-3p3v {
diff --git a/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi b/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
index 26d560bd4b..0b6df17214 100644
--- a/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
+++ b/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
@@ -19,8 +19,9 @@
 		stdout-path = "serial0:115200n8";
 	};
 
-	memory {
+	memory at 40000000 {
 		reg = <0 0x40000000 0 0x40000000>;
+		device_type = "memory";
 	};
 
 	reg_1p8v: regulator-1p8v {
diff --git a/target/linux/mediatek/patches-6.12/188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch b/target/linux/mediatek/patches-6.12/188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch
index 23bc2ea203..f968ac15cf 100644
--- a/target/linux/mediatek/patches-6.12/188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch
+++ b/target/linux/mediatek/patches-6.12/188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch
@@ -811,7 +811,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +};
 --- /dev/null
 +++ b/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts
-@@ -0,0 +1,470 @@
+@@ -0,0 +1,471 @@
 +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
 +/*
 + * Copyright (C) 2022 MediaTek Inc.
@@ -836,8 +836,9 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +			    pci=pcie_bus_perf";
 +	};
 +
-+	memory {
++	memory at 40000000 {
 +		reg = <0 0x40000000 0 0x40000000>;
++		device_type = "memory";
 +	};
 +
 +	reg_1p8v: regulator-1p8v {
diff --git a/target/linux/mediatek/patches-6.12/189-arm64-dts-mediatek-mt7988a-complete-bpi-r4.patch b/target/linux/mediatek/patches-6.12/189-arm64-dts-mediatek-mt7988a-complete-bpi-r4.patch
index a8b7a74134..8eccb6f8f1 100644
--- a/target/linux/mediatek/patches-6.12/189-arm64-dts-mediatek-mt7988a-complete-bpi-r4.patch
+++ b/target/linux/mediatek/patches-6.12/189-arm64-dts-mediatek-mt7988a-complete-bpi-r4.patch
@@ -194,7 +194,7 @@ Subject: [PATCH 32/32] WIP: add BPi-R4
  	};
  
  	fan: pwm-fan {
-@@ -50,6 +54,141 @@
+@@ -50,6 +54,142 @@
  		rate-select0-gpios = <&pio 21 GPIO_ACTIVE_LOW>;
  		maximum-power-milliwatt = <3000>;
  	};
@@ -210,8 +210,9 @@ Subject: [PATCH 32/32] WIP: add BPi-R4
 +		led-upgrade = &led_green;
 +	};
 +
-+	memory {
++	memory at 40000000 {
 +		reg = <0x00 0x40000000 0x00 0x10000000>;
++		device_type = "memory";
 +	};
 +
 +	/* SFP1 cage (WAN) */
@@ -336,7 +337,7 @@ Subject: [PATCH 32/32] WIP: add BPi-R4
  };
  
  &cci {
-@@ -174,6 +313,10 @@
+@@ -174,6 +314,10 @@
  	color = <LED_COLOR_ID_GREEN>;
  };
  
@@ -347,7 +348,7 @@ Subject: [PATCH 32/32] WIP: add BPi-R4
  &i2c0 {
  	pinctrl-names = "default";
  	pinctrl-0 = <&i2c0_pins>;
-@@ -265,6 +408,14 @@
+@@ -265,6 +409,14 @@
  			#size-cells = <0>;
  			reg = <1>;
  		};
@@ -362,7 +363,7 @@ Subject: [PATCH 32/32] WIP: add BPi-R4
  	};
  };
  
-@@ -364,34 +515,6 @@
+@@ -364,34 +516,6 @@
  		};
  	};
  
@@ -397,7 +398,7 @@ Subject: [PATCH 32/32] WIP: add BPi-R4
  	i2p5gbe_led0_pins: 2p5gbe-led0-pins {
  		mux {
  			function = "led";
-@@ -399,13 +522,6 @@
+@@ -399,13 +523,6 @@
  		};
  	};
  
@@ -411,7 +412,7 @@ Subject: [PATCH 32/32] WIP: add BPi-R4
  	mmc0_pins_emmc_45: mmc0-emmc-45-pins {
  		mux {
  			function = "flash";
-@@ -427,40 +543,12 @@
+@@ -427,40 +544,12 @@
  		};
  	};
  
@@ -452,7 +453,7 @@ Subject: [PATCH 32/32] WIP: add BPi-R4
  };
  
  &pwm {
-@@ -500,6 +588,32 @@
+@@ -500,6 +589,32 @@
  			reg = <0x0 0x200000>;
  			read-only;
  		};



From lede-commits at lists.infradead.org  Sun Aug 24 04:58:40 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 07:58:40 -0400
Subject: [openwrt/openwrt]  mediatek: dts: remove mt7531 switch reset delay
 time properties
In-Reply-To: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
References: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
Message-ID: <mailman.128710.1756036734.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/26c6fb671e9572bf097c23f762705de8af7363c0

commit 26c6fb671e9572bf097c23f762705de8af7363c0
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Sun Aug 24 14:12:54 2025 +0800

    mediatek: dts: remove mt7531 switch reset delay time properties
    
    mt7531 switch reset delay time is hard coded in the driver. The
    "reset-assert-us" and "reset-deassert-us" won't take effect.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19741
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts | 2 --
 target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi   | 2 --
 target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts   | 3 ---
 target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts   | 3 ---
 4 files changed, 10 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts b/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
index 6869f132ac..b72cf7ecc3 100644
--- a/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
+++ b/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
@@ -102,8 +102,6 @@
 			compatible = "mediatek,mt7531";
 			reg = <31>;
 			reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
-			reset-assert-us = <10000>;
-			reset-deassert-us = <10000>;
 
 			ports {
 				#address-cells = <1>;
diff --git a/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi b/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi
index 73e0d03ed3..f1af6066e1 100644
--- a/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi
@@ -284,8 +284,6 @@
 			compatible = "mediatek,mt7531";
 			reg = <31>;
 			reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
-			reset-assert-us = <10000>;
-			reset-deassert-us = <10000>;
 
 			ports {
 				#address-cells = <1>;
diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
index 9d4548e60d..e4710e5b5b 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
@@ -153,10 +153,7 @@
 	switch: switch at 1f {
 		compatible = "mediatek,mt7531";
 		reg = <31>;
-
 		reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
-		reset-assert-us = <10000>;
-		reset-deassert-us = <10000>;
 	};
 };
 
diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
index 294aa4c8d2..0b59fe910f 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
@@ -180,10 +180,7 @@
 	switch: switch at 1f {
 		compatible = "mediatek,mt7531";
 		reg = <31>;
-
 		reset-gpios = <&pio 5 GPIO_ACTIVE_HIGH>;
-		reset-assert-us = <10000>;
-		reset-deassert-us = <10000>;
 	};
 };
 



From lede-commits at lists.infradead.org  Sun Aug 24 04:58:38 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 07:58:38 -0400
Subject: [openwrt/openwrt]  mediatek: dts: increase mt7986 ATF reserved memory
 to 256 kiB
In-Reply-To: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
References: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
Message-ID: <mailman.128711.1756036734.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2958eeea3b474ce932c432dfb2acd4b51aaa5cd7

commit 2958eeea3b474ce932c432dfb2acd4b51aaa5cd7
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Sun Aug 10 20:15:12 2025 +0800

    mediatek: dts: increase mt7986 ATF reserved memory to 256 kiB
    
    The latest Mediatek open-source Trusted Firmware-A project has
    reserved 256 KiB for BL2 and BL31.
    
    Link: https://lore.kernel.org/all/OSBPR01MB16701BDF64C43EF07390C830BC29A at OSBPR01MB1670.jpnprd01.prod.outlook.com/
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19741
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...ediatek-mt7986-increase-ATF-reserved-memo.patch | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/target/linux/mediatek/patches-6.12/199-arm64-dts-mediatek-mt7986-increase-ATF-reserved-memo.patch b/target/linux/mediatek/patches-6.12/199-arm64-dts-mediatek-mt7986-increase-ATF-reserved-memo.patch
new file mode 100644
index 0000000000..8cef5ba442
--- /dev/null
+++ b/target/linux/mediatek/patches-6.12/199-arm64-dts-mediatek-mt7986-increase-ATF-reserved-memo.patch
@@ -0,0 +1,29 @@
+From 236317dd4e55512933dcdaec3d0b4a0824f5e5bd Mon Sep 17 00:00:00 2001
+From: Shiji Yang <yangshiji66 at outlook.com>
+Date: Sun, 10 Aug 2025 18:11:01 +0800
+Subject: [PATCH] arm64: dts: mediatek: mt7986: increase ATF reserved memory to
+ 256 kiB
+
+The latest Mediatek open-source Trusted Firmware-A project has
+reserved 256 KiB for BL2 and BL31. It is better to increase the
+reserved memory region in the Linux kernel to protect the data.
+
+Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+---
+ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
++++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
+@@ -76,9 +76,9 @@
+ 			record-size = <0x1000>;
+ 		};
+ 
+-		/* 192 KiB reserved for ARM Trusted Firmware (BL31) */
++		/* 256 KiB reserved for ARM Trusted Firmware (BL31 + BL32) */
+ 		secmon_reserved: secmon at 43000000 {
+-			reg = <0 0x43000000 0 0x30000>;
++			reg = <0 0x43000000 0 0x40000>;
+ 			no-map;
+ 		};
+ 



From lede-commits at lists.infradead.org  Sun Aug 24 04:58:33 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 07:58:33 -0400
Subject: [openwrt/openwrt]  mediatek: dts: convert pinctrl bias to the Linux
 generic style
In-Reply-To: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
References: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
Message-ID: <mailman.128712.1756036736.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c089ad8f68ffdcc45ee6fd856bb92266d0a2f2c4

commit c089ad8f68ffdcc45ee6fd856bb92266d0a2f2c4
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Fri Aug 8 21:05:10 2025 +0800

    mediatek: dts: convert pinctrl bias to the Linux generic style
    
    There are two types properties here that can control the pin bias
    resistors. "mediatek,pull-{up,down}-adv" and "bias-pull-{up,down}"
    actually do the same thing[1]. The first type is customized by the
    Mediatek and the second type is widely used in the Linux pinctrl
    framework. To avoid confusing developers, unify pinctrl bias to the
    new Linux generic style.
    
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=cafe19db7751269bf6b4dd2148cbfa9fbe91d651
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19741
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../dts/mt7981a-glinet-gl-x3000-xe3000-common.dtsi | 10 +++---
 target/linux/mediatek/dts/mt7981b-abt-asr3000.dts  |  6 ++--
 target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi    |  6 ++--
 .../mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso   |  6 ++--
 .../linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts  |  5 +--
 .../linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts  |  5 +--
 .../mediatek/dts/mt7981b-glinet-gl-mt2500.dtsi     |  9 +++---
 .../mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts    |  5 +--
 target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts  |  5 +--
 .../linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts |  6 ++--
 .../mediatek/dts/mt7981b-openembed-som7981.dts     |  8 +++--
 target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts  |  5 +--
 .../linux/mediatek/dts/mt7981b-tplink-fr365v1.dts  |  5 +--
 .../mediatek/dts/mt7981b-unielec-u7981-01-nand.dts |  7 ++--
 .../mt7981b-wavlink-wl-3port-128nand-common.dtsi   |  6 ++--
 .../mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts   |  6 ++--
 .../mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts    |  6 ++--
 .../linux/mediatek/dts/mt7981b-yuncore-ax835.dts   |  6 ++--
 .../dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts         |  5 +--
 .../mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts   |  6 ++--
 .../mediatek/dts/mt7986a-acelink-ew-7886cax.dts    |  5 +--
 .../mediatek/dts/mt7986a-acer-predator-w6x.dts     |  5 +--
 .../linux/mediatek/dts/mt7986a-acer-w6-common.dtsi | 17 +++++-----
 .../linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts   |  5 +--
 .../linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts |  5 +--
 .../linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts |  5 +--
 .../mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts  | 37 +++++++++++-----------
 .../dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts     |  5 +--
 .../mediatek/dts/mt7986a-glinet-gl-mt6000.dts      | 16 +++++-----
 .../mediatek/dts/mt7986a-jdcloud-re-cp-03.dts      | 17 +++++-----
 .../linux/mediatek/dts/mt7986a-netcore-n60-pro.dts |  5 +--
 target/linux/mediatek/dts/mt7986a-netcore-n60.dts  |  5 +--
 .../mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts     |  5 +--
 .../mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi | 19 +++++------
 .../mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts |  5 +--
 .../mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi |  5 +--
 .../mediatek/dts/mt7986a-tplink-tl-xtr8488.dts     |  5 +--
 .../dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi    |  5 +--
 .../dts/mt7986a-zyxel-ex5601-t0-common.dtsi        |  5 +--
 .../mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts  |  5 +--
 .../dts/mt7986b-mercusys-mr90x-v1-common.dtsi      |  5 +--
 .../linux/mediatek/dts/mt7986b-netgear-wax220.dts  |  5 +--
 .../linux/mediatek/dts/mt7986b-tplink-re6000xd.dts |  5 +--
 .../mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi    |  6 ++--
 .../mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi     |  2 +-
 .../arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi  | 21 ++++++------
 46 files changed, 202 insertions(+), 146 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7981a-glinet-gl-x3000-xe3000-common.dtsi b/target/linux/mediatek/dts/mt7981a-glinet-gl-x3000-xe3000-common.dtsi
index 11dd1a9edc..fc39d10780 100644
--- a/target/linux/mediatek/dts/mt7981a-glinet-gl-x3000-xe3000-common.dtsi
+++ b/target/linux/mediatek/dts/mt7981a-glinet-gl-x3000-xe3000-common.dtsi
@@ -2,6 +2,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7981b.dtsi"
 
 / {
@@ -223,12 +225,12 @@
 				"SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
 			input-enable;
 			drive-strength = <MTK_DRIVE_12mA>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-clk {
 			pins = "SPI1_CS";
 			drive-strength = <MTK_DRIVE_12mA>;
-			mediatek,pull-down-adv = <2>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 	};
 	mmc0_pins_uhs: mmc0-pins-uhs {
@@ -242,12 +244,12 @@
 				"SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
 			input-enable;
 			drive-strength = <MTK_DRIVE_12mA>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-clk {
 			pins = "SPI1_CS";
 			drive-strength = <MTK_DRIVE_12mA>;
-			mediatek,pull-down-adv = <2>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 	};
 	pcie_pins: pcie-pins {
diff --git a/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts b/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts
index 651d6461c7..bdc6dece8d 100644
--- a/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts
+++ b/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts
@@ -4,6 +4,8 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7981b.dtsi"
 
 / {
@@ -130,13 +132,13 @@
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi b/target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi
index 2029537518..ac08786a24 100644
--- a/target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi
@@ -7,6 +7,8 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7981b.dtsi"
 
 / {
@@ -107,13 +109,13 @@
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso b/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso
index de9ab0e6ff..4b441283a3 100644
--- a/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso
+++ b/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso
@@ -3,6 +3,8 @@
 /dts-v1/;
 /plugin/;
 
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 / {
 	compatible = "cmcc,rax3000m", "mediatek,mt7981";
 
@@ -41,13 +43,13 @@
 				conf-pu {
 					pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 					drive-strength = <8>;
-					mediatek,pull-up-adv = <0>; /* bias-disable */
+					bias-disable; /* bias-disable */
 				};
 
 				conf-pd {
 					pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 					drive-strength = <8>;
-					mediatek,pull-up-adv = <0>; /* bias-disable */
+					bias-disable; /* bias-disable */
 				};
 			};
 		};
diff --git a/target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts
index e1df653800..7b05f4b94c 100644
--- a/target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts
+++ b/target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts
@@ -5,6 +5,7 @@
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7981b.dtsi"
 
@@ -203,13 +204,13 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			bias-pull-up = <103>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			bias-pull-down = <103>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts
index b3864d099d..055dec01e5 100644
--- a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts
+++ b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts
@@ -3,6 +3,7 @@
 /dts-v1/;
 
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7981b.dtsi"
 
@@ -218,13 +219,13 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			bias-pull-up = <103>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			bias-pull-down = <103>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dtsi b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dtsi
index 82cb938058..73d254ff10 100644
--- a/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-glinet-gl-mt2500.dtsi
@@ -2,6 +2,7 @@
 
 /dts-v1/;
 #include "mt7981b.dtsi"
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 / {
 	model = "GL.iNet GL-MT2500";
@@ -84,12 +85,12 @@
 				"SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
 			input-enable;
 			drive-strength = <MTK_DRIVE_12mA>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-clk {
 			pins = "SPI1_CS";
 			drive-strength = <MTK_DRIVE_12mA>;
-			mediatek,pull-down-adv = <2>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 	};
 	mmc0_pins_uhs: mmc0-pins-uhs {
@@ -103,12 +104,12 @@
 				"SPI1_CLK", "SPI1_MOSI", "SPI1_MISO";
 			input-enable;
 			drive-strength = <MTK_DRIVE_12mA>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-clk {
 			pins = "SPI1_CS";
 			drive-strength = <MTK_DRIVE_12mA>;
-			mediatek,pull-down-adv = <2>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
index 2f141b8c7a..0b235d6afd 100644
--- a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
+++ b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7981b.dtsi"
 
@@ -226,13 +227,13 @@
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts b/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts
index 0045c452a7..9b1ef96c15 100644
--- a/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts
+++ b/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7981b.dtsi"
 
@@ -212,13 +213,13 @@
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts b/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
index 707ec2b4ee..9918a32670 100644
--- a/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
+++ b/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
@@ -4,6 +4,8 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7981b.dtsi"
 
 / {
@@ -139,13 +141,13 @@
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-openembed-som7981.dts b/target/linux/mediatek/dts/mt7981b-openembed-som7981.dts
index 4c3f80ed5e..7b0abd472a 100644
--- a/target/linux/mediatek/dts/mt7981b-openembed-som7981.dts
+++ b/target/linux/mediatek/dts/mt7981b-openembed-som7981.dts
@@ -5,6 +5,8 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7981b.dtsi"
 
 / {
@@ -223,13 +225,13 @@
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>;
+			bias-disable;
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>;
+			bias-disable;
 		};
 	};
 
@@ -250,7 +252,7 @@
 	wwan_rst_h: wwan-rst-h {
 		pins = "GPIO_WPS";
 		drive-strength = <8>;
-		mediatek,pull-down-adv = <0>;
+		bias-disable;
 		output-low;
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts b/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts
index 67ea2ff4c5..e614ebac94 100644
--- a/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts
+++ b/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7981b.dtsi"
 
@@ -216,13 +217,13 @@
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts b/target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts
index 5815f84912..78c5927a85 100644
--- a/target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts
+++ b/target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7981b.dtsi"
 
@@ -366,13 +367,13 @@
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-unielec-u7981-01-nand.dts b/target/linux/mediatek/dts/mt7981b-unielec-u7981-01-nand.dts
index 649787ae64..3254ca3145 100644
--- a/target/linux/mediatek/dts/mt7981b-unielec-u7981-01-nand.dts
+++ b/target/linux/mediatek/dts/mt7981b-unielec-u7981-01-nand.dts
@@ -4,6 +4,9 @@
  */
 
 /dts-v1/;
+
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7981b-unielec-u7981-01.dtsi"
 / {
 	model = "Unielec U7981-01 (NAND)";
@@ -87,13 +90,13 @@
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi b/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi
index f796a00810..7317ac5af8 100644
--- a/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi
@@ -2,6 +2,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7981b.dtsi"
 
 / {
@@ -38,13 +40,13 @@
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 			drive-strength = <8>;
-			bias-pull-up = <103>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 			drive-strength = <8>;
-			bias-pull-down = <103>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts
index e5118bc3d1..233743ce79 100644
--- a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts
+++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts
@@ -2,6 +2,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7981b.dtsi"
 
 / {
@@ -169,13 +171,13 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			bias-pull-up = <103>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			bias-pull-down = <103>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts
index 9190134e35..4062d4aaa8 100644
--- a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts
+++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts
@@ -2,6 +2,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7981b.dtsi"
 
 / {
@@ -222,13 +224,13 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			bias-pull-up = <103>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			bias-pull-down = <103>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts b/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts
index eada07b7ab..70a9d10781 100644
--- a/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts
+++ b/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts
@@ -2,6 +2,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7981b.dtsi"
 
 / {
@@ -120,13 +122,13 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			bias-pull-up = <103>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			bias-pull-down = <103>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts
index 6557b0ff4a..ad27b0fd03 100644
--- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts
+++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts
@@ -3,6 +3,7 @@
 /dts-v1/;
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7981b.dtsi"
 
@@ -287,13 +288,13 @@
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
index 80dd203560..2951f9bac7 100644
--- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
+++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
@@ -2,6 +2,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7981b.dtsi"
 
 / {
@@ -291,13 +293,13 @@
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
 			drive-strength = <8>;
-			bias-pull-up = <103>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
 			drive-strength = <8>;
-			bias-pull-down = <103>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-acelink-ew-7886cax.dts b/target/linux/mediatek/dts/mt7986a-acelink-ew-7886cax.dts
index 4add0fd51f..81190e0ccc 100644
--- a/target/linux/mediatek/dts/mt7986a-acelink-ew-7886cax.dts
+++ b/target/linux/mediatek/dts/mt7986a-acelink-ew-7886cax.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -105,12 +106,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts b/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
index c80f80e1cf..3152901f0c 100644
--- a/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
+++ b/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -160,12 +161,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi b/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi
index f0df588473..fceed35093 100644
--- a/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi
@@ -3,6 +3,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -78,24 +79,24 @@
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 
 		conf-clk {
 			pins = "EMMC_CK";
 			drive-strength = <6>;
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 
 		conf-ds {
 			pins = "EMMC_DSL";
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 
 		conf-rst {
 			pins = "EMMC_RSTB";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
 
@@ -111,24 +112,24 @@
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 
 		conf-clk {
 			pins = "EMMC_CK";
 			drive-strength = <6>;
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 
 		conf-ds {
 			pins = "EMMC_DSL";
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 
 		conf-rst {
 			pins = "EMMC_RSTB";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts b/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts
index d213c76793..9061480cb1 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -161,12 +162,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
index 712584a3af..37f9e974ac 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -168,12 +169,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
index e0faaaa11b..c5d753325d 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -195,12 +196,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts b/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts
index 6808db80fe..d4b67f5cfc 100644
--- a/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts
+++ b/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts
@@ -7,6 +7,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -301,14 +302,14 @@
 	en8811_pwr_a: en8811-pwr-a {
 		pins = "GPIO_11";
 		drive-strength = <8>;
-		mediatek,pull-down-adv = <1>;
+		bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
 		output-low;
 	};
 
 	en8811_pwr_b: en8811-pwr-b {
 		pins = "GPIO_12";
 		drive-strength = <8>;
-		mediatek,pull-down-adv = <1>;
+		bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
 		output-low;
 	};
 
@@ -337,21 +338,21 @@
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-clk {
 			pins = "EMMC_CK";
 			drive-strength = <6>;
-			mediatek,pull-down-adv = <2>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 		conf-ds {
 			pins = "EMMC_DSL";
-			mediatek,pull-down-adv = <2>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 	};
 
@@ -366,21 +367,21 @@
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-clk {
 			pins = "EMMC_CK";
 			drive-strength = <6>;
-			mediatek,pull-down-adv = <2>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 		conf-ds {
 			pins = "EMMC_DSL";
-			mediatek,pull-down-adv = <2>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 	};
 
@@ -406,12 +407,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>;
+			bias-disable;
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>;
+			bias-disable;
 		};
 	};
 
@@ -433,32 +434,32 @@
 		ngff-gnss-off {
 			pins = "GPIO_6";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		ngff-pe-rst {
 			pins = "GPIO_7";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		ngff-wwan-off {
 			pins = "GPIO_8";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		ngff-pwr-off {
 			pins = "GPIO_9";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		ngff-rst {
 			pins = "GPIO_10";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		ngff-coex {
 			pins = "SPI1_CS";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts b/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts
index 97a96aadea..d0a280b57a 100644
--- a/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts
+++ b/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -150,12 +151,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts b/target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts
index 1c815ae5ca..2bed134a95 100644
--- a/target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts
+++ b/target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts
@@ -215,21 +215,21 @@
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 		conf-clk {
 			pins = "EMMC_CK";
 			drive-strength = <6>;
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-ds {
 			pins = "EMMC_DSL";
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
 
@@ -244,21 +244,21 @@
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 		conf-clk {
 			pins = "EMMC_CK";
 			drive-strength = <6>;
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-ds {
 			pins = "EMMC_DSL";
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts b/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts
index a318ad1ae4..9daf03c611 100644
--- a/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts
+++ b/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts
@@ -7,6 +7,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -223,21 +224,21 @@
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-clk {
 			pins = "EMMC_CK";
 			drive-strength = <6>;
-			mediatek,pull-down-adv = <2>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 		conf-ds {
 			pins = "EMMC_DSL";
-			mediatek,pull-down-adv = <2>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 	};
 
@@ -252,21 +253,21 @@
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-clk {
 			pins = "EMMC_CK";
 			drive-strength = <6>;
-			mediatek,pull-down-adv = <2>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 		conf-ds {
 			pins = "EMMC_DSL";
-			mediatek,pull-down-adv = <2>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts b/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts
index 786c5eb312..6a8aa0e0d3 100644
--- a/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts
+++ b/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -313,12 +314,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-netcore-n60.dts b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts
index 6ab0f497c3..0f0b2b3f2f 100644
--- a/target/linux/mediatek/dts/mt7986a-netcore-n60.dts
+++ b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -240,12 +241,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts b/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts
index 3628ad00e1..d29d9f855a 100644
--- a/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts
+++ b/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -118,12 +119,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi b/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi
index 41468449de..688b8adbd5 100644
--- a/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi
@@ -8,6 +8,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -409,21 +410,21 @@
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 		conf-clk {
 			pins = "EMMC_CK";
 			drive-strength = <6>;
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-ds {
 			pins = "EMMC_DSL";
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
 
@@ -438,21 +439,21 @@
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 		conf-clk {
 			pins = "EMMC_CK";
 			drive-strength = <6>;
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-ds {
 			pins = "EMMC_DSL";
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
 
@@ -465,7 +466,7 @@
 
 	button_pins: button-pins {
 		pins = "GPIO_12";
-		mediatek,pull-down-adv = <0>; /* bias-disable */
+		bias-disable; /* bias-disable */
 	};
 
 	uart1_pins: uart1-pins {
diff --git a/target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts b/target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts
index 12f03e1fda..6e023de11f 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts
+++ b/target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -278,12 +279,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 	wf_2g_5g_pins: wf_2g_5g-pins {
diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
index 0056f6f224..ad625dca73 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
@@ -3,6 +3,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -243,12 +244,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts b/target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts
index c2ed7c9a28..342a0f98a3 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts
+++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -334,12 +335,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi
index 3375434393..d17f29cceb 100644
--- a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -92,12 +93,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
index 86c08138ac..5c9abff56d 100644
--- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
@@ -8,6 +8,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 / {
 	aliases {
@@ -329,12 +330,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <0>;	/* bias-disable */
+			bias-disable;	/* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <4>;
-			mediatek,pull-down-adv = <0>;	/* bias-disable */
+			bias-disable;	/* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts b/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts
index c2a0ef2ab0..4fcd4110dc 100644
--- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts
+++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986a.dtsi"
 
@@ -313,12 +314,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi b/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi
index 964c17e821..60b82a1ed9 100644
--- a/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986b.dtsi"
 
@@ -181,12 +182,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts b/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts
index 9537afba89..7447186ab5 100644
--- a/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts
+++ b/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986b.dtsi"
 
@@ -132,12 +133,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts b/target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts
index 12e264073d..afc5640fe1 100644
--- a/target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts
+++ b/target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7986b.dtsi"
 
@@ -196,12 +197,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>; /* bias-disable */
+			bias-disable; /* bias-disable */
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
index a8eeebda6c..002908c74b 100644
--- a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
+++ b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
@@ -609,7 +609,7 @@
 &pio {
 	button_pins: button-pins {
 		pins = "GPIO_RESET", "GPIO_WPS";
-		mediatek,pull-down-adv = <0>; /* bias-disable */
+		bias-disable; /* bias-disable */
 	};
 
 	gbe1_led0_pins: gbe1-led0-pins {
@@ -712,12 +712,12 @@
 		conf-scl {
 			pins = "LED_A";
 			drive-strength =  <8>;
-			mediatek,pull-up-adv = <1>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-sda {
 			pins = "LED_E";
 			drive-strength =  <8>;
-			mediatek,pull-up-adv = <0>;
+			bias-disable;
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi b/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi
index 1d916d760f..e5c33fb5d0 100644
--- a/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi
+++ b/target/linux/mediatek/dts/mt7988d-asus-zenwifi-bt8.dtsi
@@ -300,7 +300,7 @@
 &pio {
 	button_pins: button-pins {
 		pins = "GPIO_RESET", "GPIO_WPS";
-		mediatek,pull-down-adv = <0>; /* bias-disable */
+		bias-disable; /* bias-disable */
 	};
 
 	mdio0_pins: mdio0-pins {
diff --git a/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi b/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
index 0b6df17214..5e90ac1fa6 100644
--- a/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
+++ b/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
@@ -5,6 +5,7 @@
  */
 
 /dts-v1/;
+#include <dt-bindings/pinctrl/mt65xx.h>
 #include "mt7986a.dtsi"
 
 / {
@@ -151,21 +152,21 @@
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 		conf-clk {
 			pins = "EMMC_CK";
 			drive-strength = <6>;
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-ds {
 			pins = "EMMC_DSL";
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
 
@@ -180,21 +181,21 @@
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 		conf-clk {
 			pins = "EMMC_CK";
 			drive-strength = <6>;
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-ds {
 			pins = "EMMC_DSL";
-			mediatek,pull-down-adv = <2>;	/* pull-down 50K */
+			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
 			drive-strength = <4>;
-			mediatek,pull-up-adv = <1>;	/* pull-up 10K */
+			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
 
@@ -220,12 +221,12 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <8>;
-			mediatek,pull-up-adv = <0>;	/* bias-disable */
+			bias-disable;	/* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <8>;
-			mediatek,pull-down-adv = <0>;	/* bias-disable */
+			bias-disable;	/* bias-disable */
 		};
 	};
 



From lede-commits at lists.infradead.org  Sun Aug 24 04:58:36 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 07:58:36 -0400
Subject: [openwrt/openwrt]  mediatek: dts: fix some minor dtc warnings
In-Reply-To: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
References: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
Message-ID: <mailman.128715.1756036755.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/bb94280942c1663f398d80ed0f3cb1a67f14e5d9

commit bb94280942c1663f398d80ed0f3cb1a67f14e5d9
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Sat Aug 9 10:05:52 2025 +0800

    mediatek: dts: fix some minor dtc warnings
    
    This patch fixes the following dtc warnings for the recently added
    boards:
    
    ../dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts:329.35-331.4: Warning (unit_address_format): /soc/spi at 1100a000/spi_nand at 0/partitions/partition at 180000/macaddr at 004: unit name should not have leading 0s
    ../dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts:332.35-334.4: Warning (unit_address_format): /soc/spi at 1100a000/spi_nand at 0/partitions/partition at 180000/macaddr at 02a: unit name should not have leading 0s
    ../dts/mt7981b-iptime-ax3000q.dts:267.3-13: Warning (reg_format): /soc/wifi at 18000000/band at 0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
    ../dts/mt7981b-iptime-ax3000q.dts:273.3-13: Warning (reg_format): /soc/wifi at 18000000/band at 1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
    ../dts/mt7981b-iptime-ax3000sm.dts:269.3-13: Warning (reg_format): /soc/wifi at 18000000/band at 0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
    ../dts/mt7981b-iptime-ax3000sm.dts:275.3-13: Warning (reg_format): /soc/wifi at 18000000/band at 1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
    ../dts/mt7981b-snr-snr-cpe-ax2.dts:330.3-13: Warning (reg_format): /soc/wifi at 18000000/band at 0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
    ../dts/mt7981b-snr-snr-cpe-ax2.dts:336.3-13: Warning (reg_format): /soc/wifi at 18000000/band at 1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
    ../dts/mt7981b-gatonetworks-gdsp-sd-boot.dtso:14.5-15: Warning (reg_format): /fragment at 1/__overlay__/card at 0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
    mt7988a-rfb-emmc.dtso:34.5-15: Warning (reg_format): /fragment at 0/__overlay__/card at 0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
    mt7988a-rfb-snfi-nand.dtso:29.7-33: Warning (reg_format): /fragment at 0/__overlay__/flash at 0/partitions/partition at 0:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
    mt7988a-rfb-snfi-nand.dtso:35.7-35: Warning (reg_format): /fragment at 0/__overlay__/flash at 0/partitions/partition at 200000:reg: property has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)
    mt7988a-rfb-sd.dtso:32.5-15: Warning (reg_format): /fragment at 0/__overlay__/card at 0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19741
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../mediatek/dts/mt7981b-gatonetworks-gdsp-sd-boot.dtso    |  2 ++
 target/linux/mediatek/dts/mt7981b-iptime-ax3000q.dts       |  2 ++
 target/linux/mediatek/dts/mt7981b-iptime-ax3000sm.dts      |  2 ++
 target/linux/mediatek/dts/mt7981b-snr-snr-cpe-ax2.dts      |  2 ++
 .../linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts  |  8 ++++----
 ...64-dts-mediatek-add-MT7988A-reference-board-devic.patch | 14 +++++++++++---
 6 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp-sd-boot.dtso b/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp-sd-boot.dtso
index 46a07cf683..98b00217b9 100644
--- a/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp-sd-boot.dtso
+++ b/target/linux/mediatek/dts/mt7981b-gatonetworks-gdsp-sd-boot.dtso
@@ -9,6 +9,8 @@
 	fragment at 1 {
 		target = <&mmc0>;
 		__overlay__ {
+			#address-cells = <1>;
+			#size-cells = <0>;
 			card at 0 {
 				compatible = "mmc-card";
 				reg = <0>;
diff --git a/target/linux/mediatek/dts/mt7981b-iptime-ax3000q.dts b/target/linux/mediatek/dts/mt7981b-iptime-ax3000q.dts
index 89b797666e..d3bb26d398 100644
--- a/target/linux/mediatek/dts/mt7981b-iptime-ax3000q.dts
+++ b/target/linux/mediatek/dts/mt7981b-iptime-ax3000q.dts
@@ -260,6 +260,8 @@
 
 &wifi {
 	status = "okay";
+	#address-cells = <1>;
+	#size-cells = <0>;
 	nvmem-cell-names = "eeprom";
 	nvmem-cells = <&eeprom_factory_0>;
 
diff --git a/target/linux/mediatek/dts/mt7981b-iptime-ax3000sm.dts b/target/linux/mediatek/dts/mt7981b-iptime-ax3000sm.dts
index 1b1ba3deda..3cf854a9d8 100644
--- a/target/linux/mediatek/dts/mt7981b-iptime-ax3000sm.dts
+++ b/target/linux/mediatek/dts/mt7981b-iptime-ax3000sm.dts
@@ -262,6 +262,8 @@
 
 &wifi {
 	status = "okay";
+	#address-cells = <1>;
+	#size-cells = <0>;
 	nvmem-cell-names = "eeprom";
 	nvmem-cells = <&eeprom_factory_0>;
 
diff --git a/target/linux/mediatek/dts/mt7981b-snr-snr-cpe-ax2.dts b/target/linux/mediatek/dts/mt7981b-snr-snr-cpe-ax2.dts
index 48e29d3a6e..c25359bdee 100644
--- a/target/linux/mediatek/dts/mt7981b-snr-snr-cpe-ax2.dts
+++ b/target/linux/mediatek/dts/mt7981b-snr-snr-cpe-ax2.dts
@@ -323,6 +323,8 @@
 
 &wifi {
 	status = "okay";
+	#address-cells = <1>;
+	#size-cells = <0>;
 	nvmem-cell-names = "eeprom";
 	nvmem-cells = <&eeprom_factory_0>;
 
diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts
index 0d886e7a98..fae0cfbb41 100644
--- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts
+++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts
@@ -326,11 +326,11 @@
 	#address-cells = <1>;
 	#size-cells = <1>;
 
-	macaddr_factory_004: macaddr at 004 {
-		reg = <0x004 0x6>;
+	macaddr_factory_004: macaddr at 4 {
+		reg = <0x4 0x6>;
 	};
-	macaddr_factory_02a: macaddr at 02a {
-		reg = <0x02a 0x6>;
+	macaddr_factory_02a: macaddr at 2a {
+		reg = <0x2a 0x6>;
 	};
         eeprom_factory: eeprom at 0 {
 		reg = <0x0 0x1000>;
diff --git a/target/linux/mediatek/patches-6.12/188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch b/target/linux/mediatek/patches-6.12/188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch
index f968ac15cf..0e0236c5fc 100644
--- a/target/linux/mediatek/patches-6.12/188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch
+++ b/target/linux/mediatek/patches-6.12/188-arm64-dts-mediatek-add-MT7988A-reference-board-devic.patch
@@ -56,7 +56,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  dtb-$(CONFIG_ARCH_MEDIATEK) += mt8173-elm-hana.dtb
 --- /dev/null
 +++ b/arch/arm64/boot/dts/mediatek/mt7988a-rfb-emmc.dtso
-@@ -0,0 +1,60 @@
+@@ -0,0 +1,62 @@
 +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
 +/*
 + * Copyright (C) 2021 MediaTek Inc.
@@ -72,6 +72,8 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +	fragment at 0 {
 +		target = <&mmc0>;
 +		__overlay__ {
++			#address-cells = <1>;
++			#size-cells = <0>;
 +			pinctrl-names = "default", "state_uhs";
 +			pinctrl-0 = <&mmc0_pins_emmc_51>;
 +			pinctrl-1 = <&mmc0_pins_emmc_51>;
@@ -424,7 +426,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +};
 --- /dev/null
 +++ b/arch/arm64/boot/dts/mediatek/mt7988a-rfb-sd.dtso
-@@ -0,0 +1,58 @@
+@@ -0,0 +1,60 @@
 +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
 +/*
 + * Copyright (C) 2023 MediaTek Inc.
@@ -442,6 +444,8 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +	fragment at 0 {
 +		target-path = <&mmc0>;
 +		__overlay__ {
++			#address-cells = <1>;
++			#size-cells = <0>;
 +			pinctrl-names = "default", "state_uhs";
 +			pinctrl-0 = <&mmc0_pins_sdcard>;
 +			pinctrl-1 = <&mmc0_pins_sdcard>;
@@ -485,7 +489,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +};
 --- /dev/null
 +++ b/arch/arm64/boot/dts/mediatek/mt7988a-rfb-snfi-nand.dtso
-@@ -0,0 +1,81 @@
+@@ -0,0 +1,85 @@
 +// SPDX-License-Identifier: (GPL-2.0 OR MIT)
 +/*
 + * Copyright (C) 2022 MediaTek Inc.
@@ -512,6 +516,10 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +				spi-rx-bus-width = <4>;
 +
 +				partitions {
++					compatible = "fixed-partitions";
++					#address-cells = <1>;
++					#size-cells = <1>;
++
 +					partition at 0 {
 +						label = "BL2";
 +						reg = <0x00000 0x0200000>;



From lede-commits at lists.infradead.org  Sun Aug 24 04:58:35 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 07:58:35 -0400
Subject: [openwrt/openwrt]  mediatek: dts: mt7981: add back #address-cells and
 #size-cells to eth node
In-Reply-To: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
References: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
Message-ID: <mailman.128716.1756036756.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9688f035b0af0d9ef7784bd1568e416b65dfe1b7

commit 9688f035b0af0d9ef7784bd1568e416b65dfe1b7
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Fri Aug 8 21:10:24 2025 +0800

    mediatek: dts: mt7981: add back #address-cells and #size-cells to eth node
    
    They were lost when ported to the 6.12 kernel.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19741
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch b/target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch
index 828fbc109b..373938f1e4 100644
--- a/target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch
+++ b/target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch
@@ -304,7 +304,7 @@ working:
  		};
  
  		efuse at 11f20000 {
-@@ -211,17 +387,316 @@
+@@ -211,17 +387,318 @@
  			reg = <0 0x11f20000 0 0x1000>;
  			#address-cells = <1>;
  			#size-cells = <1>;
@@ -360,6 +360,8 @@ working:
 +		eth: ethernet at 15100000 {
 +			compatible = "mediatek,mt7981-eth";
 +			reg = <0 0x15100000 0 0x80000>;
++			#address-cells = <1>;
++			#size-cells = <0>;
 +			interrupts = <GIC_SPI 196 IRQ_TYPE_LEVEL_HIGH>,
 +				     <GIC_SPI 197 IRQ_TYPE_LEVEL_HIGH>,
 +				     <GIC_SPI 198 IRQ_TYPE_LEVEL_HIGH>,
@@ -623,7 +625,7 @@ working:
  			reg = <0 0x18000000 0 0x1000000>,
  			      <0 0x10003000 0 0x1000>,
  			      <0 0x11d10000 0 0x1000>;
-@@ -234,6 +709,67 @@
+@@ -234,6 +711,67 @@
  			clock-names = "mcu", "ap2conn";
  			resets = <&watchdog MT7986_TOPRGU_CONSYS_SW_RST>;
  			reset-names = "consys";
@@ -691,7 +693,7 @@ working:
  		};
  	};
  
-@@ -245,4 +781,8 @@
+@@ -245,4 +783,8 @@
  			     <GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
  			     <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>;
  	};



From lede-commits at lists.infradead.org  Sun Aug 24 04:58:37 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 07:58:37 -0400
Subject: [openwrt/openwrt]  mediatek: dts: remove some useless spaces
In-Reply-To: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
References: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
Message-ID: <mailman.128717.1756036756.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5fc5b0c18e983cca0384d94975274624cd02bcc9

commit 5fc5b0c18e983cca0384d94975274624cd02bcc9
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Sat Aug 9 10:40:09 2025 +0800

    mediatek: dts: remove some useless spaces
    
    Use tabs to align and remove some unnecessary spaces.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19741
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/mediatek/dts/mt7981b-snr-snr-cpe-ax2.dts |  2 +-
 .../mediatek/dts/mt7981b-wavlink-wl-wn551x3.dts    |  4 +-
 .../dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts         | 10 ++---
 .../dts/mt7986a-zyxel-ex5601-t0-common.dtsi        | 52 +++++++++++-----------
 4 files changed, 34 insertions(+), 34 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7981b-snr-snr-cpe-ax2.dts b/target/linux/mediatek/dts/mt7981b-snr-snr-cpe-ax2.dts
index c25359bdee..18fe6f3248 100644
--- a/target/linux/mediatek/dts/mt7981b-snr-snr-cpe-ax2.dts
+++ b/target/linux/mediatek/dts/mt7981b-snr-snr-cpe-ax2.dts
@@ -51,7 +51,7 @@
 
 		led-0 {
 			color = <LED_COLOR_ID_RED>;
-			function = LED_FUNCTION_STATUS; // Second WAN led defined below. 
+			function = LED_FUNCTION_STATUS; // Second WAN led defined below.
 			gpios = <&pio 4 GPIO_ACTIVE_LOW>;
 		};
 
diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn551x3.dts b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn551x3.dts
index 0387c73dd1..a56ee8ed80 100644
--- a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn551x3.dts
+++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn551x3.dts
@@ -55,9 +55,9 @@
 };
 
 &usb_phy {
-        status = "okay";
+	status = "okay";
 };
 
 &xhci {
-        status = "okay";
+	status = "okay";
 };
diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts
index fae0cfbb41..64058b3985 100644
--- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts
+++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT 
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
 /dts-v1/;
 #include <dt-bindings/gpio/gpio.h>
@@ -263,7 +263,7 @@
 };
 
 &pio {
-	gpio-line-names = 
+	gpio-line-names =
 			"wps",
 			"reset",
 			"watchdog",
@@ -317,8 +317,8 @@
 
 &wifi {
 	status = "okay";
-        nvmem-cells = <&eeprom_factory>;
-        nvmem-cell-names = "eeprom";
+	nvmem-cells = <&eeprom_factory>;
+	nvmem-cell-names = "eeprom";
 };
 
 &factory {
@@ -332,7 +332,7 @@
 	macaddr_factory_02a: macaddr at 2a {
 		reg = <0x2a 0x6>;
 	};
-        eeprom_factory: eeprom at 0 {
+	eeprom_factory: eeprom at 0 {
 		reg = <0x0 0x1000>;
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
index bdc9166233..fbc4dcfb50 100644
--- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
@@ -158,21 +158,21 @@
 };
 
 &spi0 {
-        pinctrl-names = "default";
-        pinctrl-0 = <&spi_flash_pins>;
-        cs-gpios = <0>, <0>;
-        #address-cells = <1>;
-        #size-cells = <0>;
-        status = "okay";
-
-        spi_nand: spi_nand at 1 {
-                #address-cells = <1>;
-                #size-cells = <1>;
-                compatible = "spi-nand";
-                reg = <1>;
-                spi-max-frequency = <52000000>;
-                spi-tx-bus-width = <4>;
-                spi-rx-bus-width = <4>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi_flash_pins>;
+	cs-gpios = <0>, <0>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+
+	spi_nand: spi_nand at 1 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-nand";
+		reg = <1>;
+		spi-max-frequency = <52000000>;
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
 
 		nand_partitions: partitions {
 			compatible = "fixed-partitions";
@@ -340,11 +340,11 @@
 	};
 
 	uart0_pins: uart0-pins {
-                mux {
-                        function = "uart";
-                        groups = "uart0";
-                };
-        };
+		mux {
+			function = "uart";
+			groups = "uart0";
+		};
+	};
 
 	uart1_pins: uart1-pins {
 		mux {
@@ -394,12 +394,12 @@
 		};
 	};
 
-        usb-oc-hog {
-                gpio-hog;
-                gpios = <7 GPIO_ACTIVE_LOW>;
-                input;
-                line-name = "usb-oc";
-        };
+	usb-oc-hog {
+		gpio-hog;
+		gpios = <7 GPIO_ACTIVE_LOW>;
+		input;
+		line-name = "usb-oc";
+	};
 };
 
 &spi1 {



From lede-commits at lists.infradead.org  Sun Aug 24 04:58:34 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 07:58:34 -0400
Subject: [openwrt/openwrt]  mediatek: dts: use dt-bindings enumerated drive
 strength values
In-Reply-To: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
References: <175603671271.3160849.16958985623704280028@git-01.infra.openwrt.org>
Message-ID: <mailman.128718.1756036756.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f3ce0c29ea0ec56b702a38f3aca84fb6648008ba

commit f3ce0c29ea0ec56b702a38f3aca84fb6648008ba
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Sat Aug 9 10:45:39 2025 +0800

    mediatek: dts: use dt-bindings enumerated drive strength values
    
    The Mediatek pinctrl driver can only accepts drive-strength values
    enumerated in "dt-bindings/pinctrl/mt65xx.h".
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19741
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts   |  4 ++-
 .../mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts   |  6 ++--
 .../mediatek/dts/mt7622-elecom-wrc-2533gent.dts    | 11 ++++---
 .../mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts   |  5 +--
 .../mediatek/dts/mt7622-smartrg-SDG-841-t6.dts     |  5 +--
 .../mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts     |  4 +--
 target/linux/mediatek/dts/mt7981b-abt-asr3000.dts  |  4 +--
 target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi    |  4 +--
 .../mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso   |  4 +--
 .../linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts  |  4 +--
 .../linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts  |  4 +--
 .../mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts    |  4 +--
 target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts  |  4 +--
 .../linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts |  4 +--
 .../mediatek/dts/mt7981b-openembed-som7981.dts     |  6 ++--
 target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts  |  4 +--
 .../linux/mediatek/dts/mt7981b-tplink-fr365v1.dts  |  4 +--
 .../mediatek/dts/mt7981b-unielec-u7981-01-nand.dts |  4 +--
 .../mt7981b-wavlink-wl-3port-128nand-common.dtsi   |  4 +--
 .../mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts   |  4 +--
 .../mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts    |  4 +--
 .../linux/mediatek/dts/mt7981b-yuncore-ax835.dts   |  4 +--
 .../dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts         |  4 +--
 .../mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts   |  4 +--
 .../mediatek/dts/mt7986a-acelink-ew-7886cax.dts    |  8 ++---
 .../mediatek/dts/mt7986a-acer-predator-w6x.dts     |  8 ++---
 .../linux/mediatek/dts/mt7986a-acer-w6-common.dtsi | 16 +++++-----
 .../linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts   |  8 ++---
 .../linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts |  8 ++---
 .../linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts |  8 ++---
 .../mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts  | 36 +++++++++++-----------
 .../dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts     |  6 ++--
 .../mediatek/dts/mt7986a-glinet-gl-mt6000.dts      | 14 ++++-----
 .../mediatek/dts/mt7986a-jdcloud-re-cp-03.dts      | 14 ++++-----
 .../linux/mediatek/dts/mt7986a-netcore-n60-pro.dts |  6 ++--
 target/linux/mediatek/dts/mt7986a-netcore-n60.dts  |  6 ++--
 .../mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts     |  6 ++--
 .../mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi | 14 ++++-----
 .../mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts |  6 ++--
 .../mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi |  4 +--
 .../mediatek/dts/mt7986a-tplink-tl-xdr4288.dts     |  2 +-
 .../mediatek/dts/mt7986a-tplink-tl-xdr6086.dts     |  2 +-
 .../mediatek/dts/mt7986a-tplink-tl-xdr6088.dts     |  2 +-
 .../mediatek/dts/mt7986a-tplink-tl-xtr8488.dts     |  6 ++--
 .../dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi    |  6 ++--
 .../dts/mt7986a-zyxel-ex5601-t0-common.dtsi        |  8 ++---
 .../mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts  |  6 ++--
 .../dts/mt7986b-mercusys-mr90x-v1-common.dtsi      |  6 ++--
 .../linux/mediatek/dts/mt7986b-netgear-wax220.dts  |  8 ++---
 .../linux/mediatek/dts/mt7986b-tplink-re6000xd.dts |  6 ++--
 .../mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi    |  4 +--
 .../arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi  | 20 ++++++------
 .../patches-6.12/117-complete-mt7981b-dtsi.patch   |  2 +-
 53 files changed, 181 insertions(+), 174 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts b/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts
index 8f24690a3c..d016e4d328 100644
--- a/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts
+++ b/target/linux/mediatek/dts/mt7622-buffalo-wsr-2533dhp2.dts
@@ -1,6 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 /dts-v1/;
 
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7622-buffalo-wsr.dtsi"
 
 / {
@@ -39,7 +41,7 @@
 				  "NALE", "NDL0", "NDL1",
 				  "NDL2", "NDL3";
 			input-enable;
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up;
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts b/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts
index dee8c77341..d07d3ec3ee 100644
--- a/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts
+++ b/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts
@@ -1,6 +1,8 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 /dts-v1/;
 
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7622-buffalo-wsr.dtsi"
 
 / {
@@ -25,13 +27,13 @@
 			pins = "SPI_WP", "SPI_HOLD", "SPI_MOSI",
 			       "SPI_MISO", "SPI_CS";
 			input-enable;
-			drive-strength = <16>;
+			drive-strength = <MTK_DRIVE_16mA>;
 			bias-pull-up;
 		};
 
 		conf-clk {
 			pins = "SPI_CLK";
-			drive-strength = <16>;
+			drive-strength = <MTK_DRIVE_16mA>;
 			bias-pull-down;
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7622-elecom-wrc-2533gent.dts b/target/linux/mediatek/dts/mt7622-elecom-wrc-2533gent.dts
index 5f8bb3ded8..fa98310a0a 100644
--- a/target/linux/mediatek/dts/mt7622-elecom-wrc-2533gent.dts
+++ b/target/linux/mediatek/dts/mt7622-elecom-wrc-2533gent.dts
@@ -8,6 +8,7 @@
 /dts-v1/;
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7622.dtsi"
 #include "mt6380.dtsi"
@@ -215,13 +216,13 @@
 			       "NDL3", "NDL4", "NDL5",
 			       "NDL6", "NDL7", "NRB";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up;
 		};
 
 		conf-clk {
 			pins = "NCLE";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-down;
 		};
 	};
@@ -258,7 +259,7 @@
 		conf {
 			pins = "I2S1_IN", "I2S1_OUT", "I2S_BCLK",
 			       "I2S_WS", "I2S_MCLK";
-			drive-strength = <12>;
+			drive-strength = <MTK_DRIVE_12mA>;
 			bias-pull-down;
 		};
 	};
@@ -338,12 +339,12 @@
 			pins = "I2S2_OUT", "I2S4_IN", "I2S3_IN",
 			       "I2S2_IN","I2S4_OUT";
 			input-enable;
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up;
 		};
 		conf-clk {
 			pins = "I2S3_OUT";
-			drive-strength = <12>;
+			drive-strength = <MTK_DRIVE_12mA>;
 			bias-pull-down;
 		};
 		conf-cd {
diff --git a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts
index b437fe1b3a..c78a6f4a07 100644
--- a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts
+++ b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts
@@ -4,6 +4,7 @@
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7622.dtsi"
 #include "mt6380.dtsi"
@@ -159,13 +160,13 @@
 		conf-cmd-data {
 			pins = "SPI_WP", "SPI_HOLD", "SPI_MOSI",
 			       "SPI_MISO", "SPI_CS";
-			drive-strength = <16>;
+			drive-strength = <MTK_DRIVE_16mA>;
 			bias-pull-up;
 		};
 
 		conf-clk {
 			pins = "SPI_CLK";
-			drive-strength = <16>;
+			drive-strength = <MTK_DRIVE_16mA>;
 			bias-pull-down;
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7622-smartrg-SDG-841-t6.dts b/target/linux/mediatek/dts/mt7622-smartrg-SDG-841-t6.dts
index 8cf18f5e07..1a0d8ca63e 100644
--- a/target/linux/mediatek/dts/mt7622-smartrg-SDG-841-t6.dts
+++ b/target/linux/mediatek/dts/mt7622-smartrg-SDG-841-t6.dts
@@ -11,6 +11,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/mt65xx.h>
 
 #include "mt7622.dtsi"
 #include "mt6380.dtsi"
@@ -407,13 +408,13 @@
 			       "NDL3", "NDL4", "NDL5",
 			       "NDL6", "NDL7", "NRB";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up;
 		};
 
 		conf-clk {
 			pins = "NCLE";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-down;
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts
index 1d73b0f7f3..fa0679402c 100644
--- a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts
+++ b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts
@@ -64,13 +64,13 @@
 
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <103>;
 		};
 
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-down = <103>;
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts b/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts
index bdc6dece8d..8190cfcf03 100644
--- a/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts
+++ b/target/linux/mediatek/dts/mt7981b-abt-asr3000.dts
@@ -131,13 +131,13 @@
 
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi b/target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi
index ac08786a24..17ce899a6d 100644
--- a/target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-cmcc-a10.dtsi
@@ -108,13 +108,13 @@
 
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso b/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso
index 4b441283a3..156dd16266 100644
--- a/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso
+++ b/target/linux/mediatek/dts/mt7981b-cmcc-rax3000m-nand.dtso
@@ -42,13 +42,13 @@
 
 				conf-pu {
 					pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-					drive-strength = <8>;
+					drive-strength = <MTK_DRIVE_8mA>;
 					bias-disable; /* bias-disable */
 				};
 
 				conf-pd {
 					pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-					drive-strength = <8>;
+					drive-strength = <MTK_DRIVE_8mA>;
 					bias-disable; /* bias-disable */
 				};
 			};
diff --git a/target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts
index 7b05f4b94c..3b7dc1b65a 100644
--- a/target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts
+++ b/target/linux/mediatek/dts/mt7981b-cudy-re3000-v1.dts
@@ -203,13 +203,13 @@
 
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts
index 055dec01e5..b0ae8279c8 100644
--- a/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts
+++ b/target/linux/mediatek/dts/mt7981b-cudy-wr3000-v1.dts
@@ -218,13 +218,13 @@
 
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
index 0b235d6afd..b9ad67af40 100644
--- a/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
+++ b/target/linux/mediatek/dts/mt7981b-h3c-magic-nx30-pro.dts
@@ -226,13 +226,13 @@
 
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts b/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts
index 9b1ef96c15..b2af74cd6a 100644
--- a/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts
+++ b/target/linux/mediatek/dts/mt7981b-jcg-q30-pro.dts
@@ -212,13 +212,13 @@
 
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts b/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
index 9918a32670..1e6c7a037d 100644
--- a/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
+++ b/target/linux/mediatek/dts/mt7981b-nokia-ea0326gmp.dts
@@ -140,13 +140,13 @@
 
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-openembed-som7981.dts b/target/linux/mediatek/dts/mt7981b-openembed-som7981.dts
index 7b0abd472a..361a1304f8 100644
--- a/target/linux/mediatek/dts/mt7981b-openembed-som7981.dts
+++ b/target/linux/mediatek/dts/mt7981b-openembed-som7981.dts
@@ -224,13 +224,13 @@
 
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable;
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable;
 		};
 	};
@@ -251,7 +251,7 @@
 
 	wwan_rst_h: wwan-rst-h {
 		pins = "GPIO_WPS";
-		drive-strength = <8>;
+		drive-strength = <MTK_DRIVE_8mA>;
 		bias-disable;
 		output-low;
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts b/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts
index e614ebac94..b77eb456c0 100644
--- a/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts
+++ b/target/linux/mediatek/dts/mt7981b-qihoo-360t7.dts
@@ -216,13 +216,13 @@
 
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts b/target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts
index 78c5927a85..8f73aee736 100644
--- a/target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts
+++ b/target/linux/mediatek/dts/mt7981b-tplink-fr365v1.dts
@@ -366,13 +366,13 @@
 
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-unielec-u7981-01-nand.dts b/target/linux/mediatek/dts/mt7981b-unielec-u7981-01-nand.dts
index 3254ca3145..6a9f8e0c00 100644
--- a/target/linux/mediatek/dts/mt7981b-unielec-u7981-01-nand.dts
+++ b/target/linux/mediatek/dts/mt7981b-unielec-u7981-01-nand.dts
@@ -89,13 +89,13 @@
 
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi b/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi
index 7317ac5af8..51b227f1c4 100644
--- a/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi
+++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-3port-128nand-common.dtsi
@@ -39,13 +39,13 @@
 
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts
index 233743ce79..50e61c7306 100644
--- a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts
+++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn573hx3.dts
@@ -170,13 +170,13 @@
 
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts
index 4062d4aaa8..1c424b2a50 100644
--- a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts
+++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3.dts
@@ -223,13 +223,13 @@
 
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts b/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts
index 70a9d10781..09fa20c3ab 100644
--- a/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts
+++ b/target/linux/mediatek/dts/mt7981b-yuncore-ax835.dts
@@ -121,13 +121,13 @@
 
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts
index ad27b0fd03..0d886e7a98 100644
--- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts
+++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax-v2.dts
@@ -287,13 +287,13 @@
 
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
index 2951f9bac7..fa2e46ba3a 100644
--- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
+++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
@@ -292,13 +292,13 @@
 
 		conf-pu {
 			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7986a-acelink-ew-7886cax.dts b/target/linux/mediatek/dts/mt7986a-acelink-ew-7886cax.dts
index 81190e0ccc..682bb660ed 100644
--- a/target/linux/mediatek/dts/mt7986a-acelink-ew-7886cax.dts
+++ b/target/linux/mediatek/dts/mt7986a-acelink-ew-7886cax.dts
@@ -105,12 +105,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -128,7 +128,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
@@ -145,7 +145,7 @@
 				"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 				"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 				"WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts b/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
index 3152901f0c..6869f132ac 100644
--- a/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
+++ b/target/linux/mediatek/dts/mt7986a-acer-predator-w6x.dts
@@ -160,12 +160,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -190,7 +190,7 @@
 				   "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 				   "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 				   "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
@@ -207,7 +207,7 @@
 				"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 				"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 				"WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi b/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi
index fceed35093..73e0d03ed3 100644
--- a/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-acer-w6-common.dtsi
@@ -78,13 +78,13 @@
 			       "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 
 		conf-clk {
 			pins = "EMMC_CK";
-			drive-strength = <6>;
+			drive-strength = <MTK_DRIVE_6mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 
@@ -95,7 +95,7 @@
 
 		conf-rst {
 			pins = "EMMC_RSTB";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
@@ -111,13 +111,13 @@
 			       "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 
 		conf-clk {
 			pins = "EMMC_CK";
-			drive-strength = <6>;
+			drive-strength = <MTK_DRIVE_6mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 
@@ -128,7 +128,7 @@
 
 		conf-rst {
 			pins = "EMMC_RSTB";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
@@ -153,7 +153,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
@@ -170,7 +170,7 @@
 				"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 				"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 				"WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts b/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts
index 9061480cb1..026cd7a157 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-rt-ax59u.dts
@@ -161,12 +161,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -184,7 +184,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
@@ -201,7 +201,7 @@
 				"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 				"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 				"WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
index 37f9e974ac..9d4548e60d 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
@@ -168,12 +168,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -191,7 +191,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
@@ -208,7 +208,7 @@
 				"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 				"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 				"WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
index c5d753325d..294aa4c8d2 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
@@ -195,12 +195,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -218,7 +218,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
@@ -235,7 +235,7 @@
 				"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 				"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 				"WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts b/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts
index d4b67f5cfc..2291d2d7c4 100644
--- a/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts
+++ b/target/linux/mediatek/dts/mt7986a-bananapi-bpi-r3-mini.dts
@@ -301,14 +301,14 @@
 &pio {
 	en8811_pwr_a: en8811-pwr-a {
 		pins = "GPIO_11";
-		drive-strength = <8>;
+		drive-strength = <MTK_DRIVE_8mA>;
 		bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
 		output-low;
 	};
 
 	en8811_pwr_b: en8811-pwr-b {
 		pins = "GPIO_12";
-		drive-strength = <8>;
+		drive-strength = <MTK_DRIVE_8mA>;
 		bias-pull-down = <MTK_PUPD_SET_R1R0_01>;
 		output-low;
 	};
@@ -337,12 +337,12 @@
 			       "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-clk {
 			pins = "EMMC_CK";
-			drive-strength = <6>;
+			drive-strength = <MTK_DRIVE_6mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 		conf-ds {
@@ -351,7 +351,7 @@
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 	};
@@ -366,12 +366,12 @@
 			       "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-clk {
 			pins = "EMMC_CK";
-			drive-strength = <6>;
+			drive-strength = <MTK_DRIVE_6mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 		conf-ds {
@@ -380,7 +380,7 @@
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 	};
@@ -406,12 +406,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable;
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable;
 		};
 	};
@@ -433,32 +433,32 @@
 	usb_ngff_pins: usb-ngff-pins {
 		ngff-gnss-off {
 			pins = "GPIO_6";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		ngff-pe-rst {
 			pins = "GPIO_7";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		ngff-wwan-off {
 			pins = "GPIO_8";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		ngff-pwr-off {
 			pins = "GPIO_9";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		ngff-rst {
 			pins = "GPIO_10";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		ngff-coex {
 			pins = "SPI1_CS";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 	};
@@ -476,7 +476,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
@@ -493,7 +493,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts b/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts
index d0a280b57a..9d2d0de04a 100644
--- a/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts
+++ b/target/linux/mediatek/dts/mt7986a-dlink-aquila-pro-ai-m60-a1.dts
@@ -150,12 +150,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -191,7 +191,7 @@
 				"WF1_HB8",
 				"WF1_TOP_CLK",
 				"WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts b/target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts
index 2bed134a95..529443a1d0 100644
--- a/target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts
+++ b/target/linux/mediatek/dts/mt7986a-glinet-gl-mt6000.dts
@@ -200,7 +200,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
@@ -214,12 +214,12 @@
 			       "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 		conf-clk {
 			pins = "EMMC_CK";
-			drive-strength = <6>;
+			drive-strength = <MTK_DRIVE_6mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-ds {
@@ -228,7 +228,7 @@
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
@@ -243,12 +243,12 @@
 			       "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 		conf-clk {
 			pins = "EMMC_CK";
-			drive-strength = <6>;
+			drive-strength = <MTK_DRIVE_6mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-ds {
@@ -257,7 +257,7 @@
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts b/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts
index 9daf03c611..4a9679b437 100644
--- a/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts
+++ b/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts
@@ -223,12 +223,12 @@
 			       "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-clk {
 			pins = "EMMC_CK";
-			drive-strength = <6>;
+			drive-strength = <MTK_DRIVE_6mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 		conf-ds {
@@ -237,7 +237,7 @@
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 	};
@@ -252,12 +252,12 @@
 			       "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-clk {
 			pins = "EMMC_CK";
-			drive-strength = <6>;
+			drive-strength = <MTK_DRIVE_6mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;
 		};
 		conf-ds {
@@ -266,7 +266,7 @@
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 	};
@@ -284,7 +284,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts b/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts
index 6a8aa0e0d3..1fd6eee705 100644
--- a/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts
+++ b/target/linux/mediatek/dts/mt7986a-netcore-n60-pro.dts
@@ -313,12 +313,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -336,7 +336,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-netcore-n60.dts b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts
index 0f0b2b3f2f..93849f8321 100644
--- a/target/linux/mediatek/dts/mt7986a-netcore-n60.dts
+++ b/target/linux/mediatek/dts/mt7986a-netcore-n60.dts
@@ -240,12 +240,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -263,7 +263,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts b/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts
index d29d9f855a..648fe10f35 100644
--- a/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts
+++ b/target/linux/mediatek/dts/mt7986a-ruijie-rg-x60-pro.dts
@@ -118,12 +118,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -141,7 +141,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi b/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi
index 688b8adbd5..f71ef207f7 100644
--- a/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-smartrg-bonanza-peak.dtsi
@@ -409,12 +409,12 @@
 			       "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 		conf-clk {
 			pins = "EMMC_CK";
-			drive-strength = <6>;
+			drive-strength = <MTK_DRIVE_6mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-ds {
@@ -423,7 +423,7 @@
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
@@ -438,12 +438,12 @@
 			       "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 		conf-clk {
 			pins = "EMMC_CK";
-			drive-strength = <6>;
+			drive-strength = <MTK_DRIVE_6mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-ds {
@@ -452,7 +452,7 @@
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
@@ -503,7 +503,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts b/target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts
index 6e023de11f..b95685de1b 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts
+++ b/target/linux/mediatek/dts/mt7986a-tplink-archer-ax80-v1.dts
@@ -278,12 +278,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -300,7 +300,7 @@
 			"WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			"WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			"WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
index ad625dca73..b6cf8ddc1b 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
@@ -243,12 +243,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr4288.dts b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr4288.dts
index 591d16195e..e7057e6397 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr4288.dts
+++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr4288.dts
@@ -68,7 +68,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr6086.dts b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr6086.dts
index 68a159a8e7..edf583e1cb 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr6086.dts
+++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr6086.dts
@@ -53,7 +53,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr6088.dts b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr6088.dts
index 751909a6aa..18350a2a5a 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr6088.dts
+++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr6088.dts
@@ -68,7 +68,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts b/target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts
index 342a0f98a3..9e7585e871 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts
+++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xtr8488.dts
@@ -334,12 +334,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -357,7 +357,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi
index d17f29cceb..9f8949ba6e 100644
--- a/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-xiaomi-redmi-router-ax6000.dtsi
@@ -92,12 +92,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -122,7 +122,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
index 5c9abff56d..bdc9166233 100644
--- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5601-t0-common.dtsi
@@ -329,12 +329,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-disable;	/* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-disable;	/* bias-disable */
 		};
 	};
@@ -373,7 +373,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
@@ -390,7 +390,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts b/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts
index 4fcd4110dc..0252ab7aba 100644
--- a/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts
+++ b/target/linux/mediatek/dts/mt7986a-zyxel-ex5700-telenor.dts
@@ -313,12 +313,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -332,7 +332,7 @@
 			pins = "WF1_HB1", "WF1_HB2", "WF1_HB3", "WF1_HB4",
 			       "WF1_HB0", "WF1_HB5", "WF1_HB6", "WF1_HB7",
 			       "WF1_HB8", "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
diff --git a/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi b/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi
index 60b82a1ed9..abba04ab08 100644
--- a/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986b-mercusys-mr90x-v1-common.dtsi
@@ -181,12 +181,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -204,7 +204,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts b/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts
index 7447186ab5..1d8dcda8da 100644
--- a/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts
+++ b/target/linux/mediatek/dts/mt7986b-netgear-wax220.dts
@@ -132,12 +132,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -155,7 +155,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
@@ -169,7 +169,7 @@
 			       "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6",
 			       "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10",
 			       "WF0_TOP_CLK", "WF0_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts b/target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts
index afc5640fe1..d3b73a873f 100644
--- a/target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts
+++ b/target/linux/mediatek/dts/mt7986b-tplink-re6000xd.dts
@@ -196,12 +196,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable; /* bias-disable */
 		};
 	};
@@ -219,7 +219,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
index 002908c74b..2de677f9b0 100644
--- a/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
+++ b/target/linux/mediatek/dts/mt7988a-smartrg-mt-stuart.dtsi
@@ -711,12 +711,12 @@
 	sfp_i2c_pins: sfp-i2c-pins {
 		conf-scl {
 			pins = "LED_A";
-			drive-strength =  <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;
 		};
 		conf-sda {
 			pins = "LED_E";
-			drive-strength =  <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable;
 		};
 	};
diff --git a/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi b/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
index 5e90ac1fa6..4eb512f90b 100644
--- a/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
+++ b/target/linux/mediatek/files-6.12/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dtsi
@@ -151,12 +151,12 @@
 			       "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 		conf-clk {
 			pins = "EMMC_CK";
-			drive-strength = <6>;
+			drive-strength = <MTK_DRIVE_6mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-ds {
@@ -165,7 +165,7 @@
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
@@ -180,12 +180,12 @@
 			       "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
 			       "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
 			input-enable;
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 		conf-clk {
 			pins = "EMMC_CK";
-			drive-strength = <6>;
+			drive-strength = <MTK_DRIVE_6mA>;
 			bias-pull-down = <MTK_PUPD_SET_R1R0_10>;	/* pull-down 50K */
 		};
 		conf-ds {
@@ -194,7 +194,7 @@
 		};
 		conf-rst {
 			pins = "EMMC_RSTB";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 			bias-pull-up = <MTK_PUPD_SET_R1R0_01>;	/* pull-up 10K */
 		};
 	};
@@ -220,12 +220,12 @@
 		};
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable;	/* bias-disable */
 		};
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
-			drive-strength = <8>;
+			drive-strength = <MTK_DRIVE_8mA>;
 			bias-disable;	/* bias-disable */
 		};
 	};
@@ -257,7 +257,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 
@@ -274,7 +274,7 @@
 			       "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0",
 			       "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8",
 			       "WF1_TOP_CLK", "WF1_TOP_DATA";
-			drive-strength = <4>;
+			drive-strength = <MTK_DRIVE_4mA>;
 		};
 	};
 };
diff --git a/target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch b/target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch
index 45b9691bc5..828fbc109b 100644
--- a/target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch
+++ b/target/linux/mediatek/patches-6.12/117-complete-mt7981b-dtsi.patch
@@ -284,7 +284,7 @@ working:
 +					       "WF_HB7", "WF_HB8", "WF_HB9", "WF_HB10",
 +					       "WF_TOP_CLK", "WF_TOP_DATA", "WF_XO_REQ",
 +					       "WF_CBA_RESETB", "WF_DIG_RESETB";
-+					drive-strength = <4>;
++					drive-strength = <MTK_DRIVE_4mA>;
 +				};
 +			};
 +



From lede-commits at lists.infradead.org  Sun Aug 24 05:41:27 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 08:41:27 -0400
Subject: [openwrt/openwrt]  ramips: CREALITY BOX WB01
In-Reply-To: <175603928779.3301686.12489370701122716962@git-01.infra.openwrt.org>
References: <175603928779.3301686.12489370701122716962@git-01.infra.openwrt.org>
Message-ID: <mailman.128721.1756039292.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f29bc8736aacf36fc4f339182b74a20489096a2b

commit f29bc8736aacf36fc4f339182b74a20489096a2b
Author: Axel Sepulveda <ansepulveda at uc.cl>
AuthorDate: Wed Feb 19 18:19:03 2025 +0100

    ramips: CREALITY BOX WB01
    
    CREALITY BOX WB01 is small footprint router based on MediaTek MT7688,
    is a device intended to interface Creality brand 3D printers to a cloud service.
    
    Specifications:
    - SoC: MediaTek MT7688AN @ 580MHz
    - RAM: DDR2 128M (Winbond W971GG6SB-25)
    - Flash: BoyaMicro  BY25Q128AS (16 MiB, SPI NOR) handled by BoHong bh25q128as driver
    - WiFi: 2.4GHz 1T1R internal panel antenna
    - Ethernet: 1x LAN (10/100)
    - USB: 2x USB2.0 port (Genesys Logic GL850G 2 port USB 2.0 hub)
    - UART: 3.3V, TX, RX, GND / 56700 8N1 / only pads on PCB
    - microSD SD-XC Class 10 slot
    - micro USB input (for power only)
    - reset button
    - FCC ID: 2AXH6CREALITY-BOX
    
    MAC addresses as verified by OEM firmware:
    vendor   OpenWrt    source
    LAN      eth0       factory 0x2e
    2.4GHz   phy0-ap0   factory 0x04 (label)
    
    LEDs
    color    vendor                OpenWRT     configurable
    red      SD card activity        -             yes
    green    Cloud connectivity    status          yes
    blue     LAN activity          eth0            yes
    yellow   WIFI activity         phy0tpt         yes
    
    Return to OEM & debrick
    - download "cxsw_update.tar.bz2" from manufacturer site
    - extract archive to FAT32 USB stick root
    - put USB stick in USB2 port
    - press & hold reset button
    - power on device while holding reset
    - wait approx 10 sec
    - release reset button
    
    Installation with SD Card
    - power on device
    - wait for device to finish starting
    - copy "openwrt-ramips-mt76x8-creality_wb-01-squashfs-cxsw_update.tar.bz2"
      to root of FAT32 SD card
    - rename openwrt-ramips-mt76x8-creality_wb-01-squashfs-cxsw_update.tar.bz2
      to "cxsw_update.tar.bz2"
    - put SD card in device
    - device will install OpenWRT on internal flash
    
    Installation via telnet:
    - extract the "factory.bin" and "install.sh" from newly created
      openwrt-ramips-mt76x8-creality_wb-01-squashfs-cxsw_update.tar.bz2
      to FAT32 USB stick root
    - telnet to 10.10.10.254, user: root, password: cxswprin
    - plug the USB in USB1 port
    - cd /media/usbdisk/
    - sh install.sh
    - device will write "factory.bin" to internal flash
    
    Co-authored-by: George Brooke <figgyc at figgyc.uk>
    Co-authored-by: Peca Nesovanovic <peca.nesovanovic at sattrakt.com>
    Co-authored-by: shivajiva101 <github.com/shivajiva101>
    Co-authored-by: Axel Sepulveda <ansepulveda at uc.cl>
    
    Signed-off-by: Axel Sepulveda <ansepulveda at uc.cl>
    Link: https://github.com/openwrt/openwrt/pull/19686
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/ramips/dts/mt7628an_creality_wb-01.dts   | 164 +++++++++++++++++++++
 target/linux/ramips/image/mt76x8.mk                |  25 ++++
 .../ramips/mt76x8/base-files/etc/board.d/01_leds   |   3 +
 .../mt76x8/base-files/etc/board.d/02_network       |   1 +
 4 files changed, 193 insertions(+)

diff --git a/target/linux/ramips/dts/mt7628an_creality_wb-01.dts b/target/linux/ramips/dts/mt7628an_creality_wb-01.dts
new file mode 100644
index 0000000000..8e875700bc
--- /dev/null
+++ b/target/linux/ramips/dts/mt7628an_creality_wb-01.dts
@@ -0,0 +1,164 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7628an.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "creality,wb-01", "mediatek,mt7628an-soc";
+	model = "Creality WB-01";
+
+	aliases {
+		led-boot = &led_status;
+		led-failsafe = &led_status;
+		led-upgrade = &led_status;
+		led-running = &led_status;
+		label-mac-device = &wmac;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_wlan2 {
+			function = LED_FUNCTION_WLAN_2GHZ;
+			color = <LED_COLOR_ID_YELLOW>;
+			gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
+		};
+
+		led_lan {
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
+			gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
+		};
+
+		led_status: status {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
+		};
+
+		led_sd {
+			function = LED_FUNCTION_SD;
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
+		};
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <10000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0x30000>;
+				read-only;
+			};
+
+			partition at 30000 {
+				label = "u-boot-env";
+				reg = <0x30000 0x10000>;
+				read-only;
+			};
+
+			factory: partition at 40000 {
+				compatible = "nvmem-cells";
+				label = "factory";
+				reg = <0x40000 0x10000>;
+				#address-cells = <1>;
+				#size-cells = <1>;				
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_factory_4: macaddr at 4 {
+						reg = <0x04 0x6>;
+					};
+
+					macaddr_factory_28: macaddr at 28 {
+						reg = <0x28 0x6>;
+					};					
+				};				
+			};
+
+			partition at 50000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x50000 0xfb0000>;
+			};
+		};
+	};
+};
+
+&esw {
+	mediatek,portmap = <0x3f>;
+	mediatek,portdisable = <0x3e>;
+};
+
+&state_default {
+	gpio {
+		groups = "wdt", "p3led_an", "p1led_an", "p0led_an", "wled_an";
+		function = "gpio";
+	};
+};
+
+&wmac {
+	status = "okay";
+
+	nvmem-cells = <&macaddr_factory_4>;
+	nvmem-cell-names = "macaddr";
+};
+
+&ethernet {
+	nvmem-cells = <&macaddr_factory_28>;
+	nvmem-cell-names = "mac-address";
+};
+
+&pinctrl {
+    ephy-digital;
+
+    sdxc_iot_mode: sdxc_iot_mode {
+        esd {
+            groups = "esd";
+            function = "iot";
+        };
+
+        sdxc {
+            groups = "sdmode";
+            function = "sdxc";
+        };
+    };
+};
+
+&sdhci {
+	status = "okay";
+	pinctrl-0 = <&sdxc_iot_mode>;
+	pinctrl-1 = <&sdxc_iot_mode>;
+	mediatek,cd-low;
+};
+
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index ccd2c1ff23..2d5821b225 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -6,6 +6,20 @@ include ./common-tp-link.mk
 
 DEFAULT_SOC := mt7628an
 
+define Build/creality_wb-01-factory
+	mv $@ $(dir $@)factory.bin
+	$(eval kernel_size=851968)
+	( \
+		echo '#!/bin/sh'; \
+		echo '[ -z "$$2" ] && file="factory.bin" || file="$$2/factory.bin"'; \
+		echo 'file_size=$$(wc -c < $$file)'; \
+		echo 'rootfs_size=$$((file_size - $(kernel_size)))'; \
+		echo 'mtd_write -o 0 -l $(kernel_size) write $$file Kernel'; \
+		echo 'mtd_write -r -o $(kernel_size) -l $$rootfs_size write $$file RootFS'; \
+	) > $(dir $@)install.sh
+	tar cjf $@ -C $(dir $@) factory.bin install.sh
+endef
+
 define Build/elecom-header
 	$(eval model_id=$(1))
 	( \
@@ -185,6 +199,17 @@ define Device/comfast_cf-wr758ac-v2
 endef
 TARGET_DEVICES += comfast_cf-wr758ac-v2
 
+define Device/creality_wb-01
+  IMAGE_SIZE := 16064k
+  IMAGES += cxsw_update.tar.bz2
+  IMAGE/cxsw_update.tar.bz2 := $$(sysupgrade_bin) | creality_wb-01-factory
+  DEVICE_VENDOR := Creality
+  DEVICE_MODEL := WB-01
+  DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620
+  SUPPORTED_DEVICES += creality_wb-01
+endef
+TARGET_DEVICES += creality_wb-01
+
 define Device/cudy_m1200-v1
   IMAGE_SIZE := 15872k
   DEVICE_VENDOR := Cudy
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds
index 761633f7bd..5f74acf45f 100644
--- a/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/01_leds
@@ -24,6 +24,9 @@ yuncore,m300)
 	ucidef_set_led_switch "lan" "lan" "green:lan" "switch0" "0xf"
 	ucidef_set_led_switch "wan" "wan" "green:wan" "switch0" "0x10"
 	;;
+creality,wb-01)
+	ucidef_set_led_switch "lan" "lan" "blue:lan" "switch0" "0x1"
+	;;
 cudy,wr1000)
 	ucidef_set_led_switch "wan" "wan" "blue:wan" "switch0" "0x10"
 	ucidef_set_led_switch "lan1" "lan1" "blue:lan1" "switch0" "0x08"
diff --git a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
index 76993a528a..1abc264719 100644
--- a/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt76x8/base-files/etc/board.d/02_network
@@ -11,6 +11,7 @@ ramips_setup_interfaces()
 	7links,wlr-1230|\
 	7links,wlr-1240|\
 	alfa-network,awusfree1|\
+	creality,wb-01|\	
 	d-team,pbr-d1|\
 	dlink,dap-1325-a1|\
 	glinet,microuter-n300|\



From lede-commits at lists.infradead.org  Sun Aug 24 06:33:40 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 09:33:40 -0400
Subject: [openwrt/openwrt]  ath79: fix LED GPIOs for COMFAST CF-EW71 v2
In-Reply-To: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
References: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
Message-ID: <mailman.128736.1756042417.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/52ec0cbab8c1cf39014174508f67621d4490bba3

commit 52ec0cbab8c1cf39014174508f67621d4490bba3
Author: Felix Golatofski <git at xdfr.de>
AuthorDate: Mon Aug 4 16:59:39 2025 +0200

    ath79: fix LED GPIOs for COMFAST CF-EW71 v2
    
    The vendor DTS defined incorrect GPIOs for the LEDs, which caused them
    to not function properly. Initially, the WAN, WLAN LEDs appeared to
    work, but further testing showed that they were non-functional.
    
    This patch corrects the GPIO assignments in the DTS, restoring full LED
    functionality including blinking, except the power LED which cannot be
    software controlled.
    
    Tested on a CF-EW71 v2 unit.
    
    Fixes: ee3a6adc6c22 ("ath79: add support for Comfast CF-EW71 v2")
    Signed-off-by: Felix Golatofski <git at xdfr.de>
    Link: https://github.com/openwrt/openwrt/pull/19665
    (cherry picked from commit 9ce23ac84009d720bb6d65605508bf8a737b184d)
    Link: https://github.com/openwrt/openwrt/pull/19839
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts b/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts
index 2277646500..0c1e301c51 100644
--- a/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts
@@ -32,13 +32,13 @@
 		led_wan: wan {
 			function = LED_FUNCTION_WAN;
 			color = <LED_COLOR_ID_BLUE>;
-			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
 		};
 
 		wlan {
 			function = LED_FUNCTION_WLAN;
 			color = <LED_COLOR_ID_BLUE>;
-			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
 			linux,default-trigger = "phy0tpt";
 		};
 	};



From lede-commits at lists.infradead.org  Sun Aug 24 06:33:38 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 09:33:38 -0400
Subject: [openwrt/openwrt]  mbedtls: Expose
 MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED config option
In-Reply-To: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
References: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
Message-ID: <mailman.128737.1756042420.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/2cffcdc7ae042c4fea79e8b21362e41aac43b81b

commit 2cffcdc7ae042c4fea79e8b21362e41aac43b81b
Author: Karsten Sperling <ksperling at apple.com>
AuthorDate: Mon Jul 21 16:25:03 2025 +1200

    mbedtls: Expose MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED config option
    
    This enables software that requires this cipher suite (e.g. OpenThread Border
    Router) to be compiled against the shared library rather than a separate copy.
    
    Signed-off-by: Karsten Sperling <ksperling at apple.com>
    Link: https://github.com/openwrt/openwrt/pull/19489
    (cherry picked from commit 97dc9f8dbfde8725ca26ae7ce0f348488e62e29e)
    Link: https://github.com/openwrt/openwrt/pull/19839
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/libs/mbedtls/Config.in | 4 ++++
 package/libs/mbedtls/Makefile  | 1 +
 2 files changed, 5 insertions(+)

diff --git a/package/libs/mbedtls/Config.in b/package/libs/mbedtls/Config.in
index 0a760ed2cb..2009d5db96 100644
--- a/package/libs/mbedtls/Config.in
+++ b/package/libs/mbedtls/Config.in
@@ -84,6 +84,10 @@ config MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
 	bool "MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED"
 	default n
 
+config MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
+	bool "MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED"
+	default n
+
 comment "Curves - unselect old or less-used curves to reduce binary size"
 
 config MBEDTLS_ECP_DP_SECP192R1_ENABLED
diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile
index d6dfd6b68f..d6dc0f7805 100644
--- a/package/libs/mbedtls/Makefile
+++ b/package/libs/mbedtls/Makefile
@@ -53,6 +53,7 @@ MBEDTLS_BUILD_OPTS_CIPHERS= \
   CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED \
   CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED \
   CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED \
+  CONFIG_MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED \
   CONFIG_MBEDTLS_NIST_KW_C \
   CONFIG_MBEDTLS_RIPEMD160_C \
   CONFIG_MBEDTLS_RSA_NO_CRT \



From lede-commits at lists.infradead.org  Sun Aug 24 06:33:37 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 09:33:37 -0400
Subject: [openwrt/openwrt]  mediatek: Remove modules.builtin file
In-Reply-To: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
References: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
Message-ID: <mailman.128738.1756042420.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/f894fa971b6135f14700cb8850856dec548d23b8

commit f894fa971b6135f14700cb8850856dec548d23b8
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Jul 20 17:36:32 2025 +0200

    mediatek: Remove modules.builtin file
    
    This file should be generated automatically at runtime by the kernel
    build system.
    
    Link: https://github.com/openwrt/openwrt/pull/19473
    (cherry picked from commit e53c53b7d59d444a7964fbeaa66609f13c1133f9)
    Link: https://github.com/openwrt/openwrt/pull/19839
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/mediatek/files/drivers/net/phy/rtk/modules.builtin | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/modules.builtin b/target/linux/mediatek/files/drivers/net/phy/rtk/modules.builtin
deleted file mode 100644
index 961a70a150..0000000000
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/modules.builtin
+++ /dev/null
@@ -1 +0,0 @@
-kernel/drivers/net/phy/rtk/rtl8367s_gsw.ko



From lede-commits at lists.infradead.org  Sun Aug 24 06:33:41 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 09:33:41 -0400
Subject: [openwrt/openwrt]  ramips: fix TP-Link mr600 radio partition offset
In-Reply-To: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
References: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
Message-ID: <mailman.128739.1756042420.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/c510f7e9733e05d6496085cec1b2ac9b74f2aa19

commit c510f7e9733e05d6496085cec1b2ac9b74f2aa19
Author: Stefan D?singer <stefandoesinger at gmail.com>
AuthorDate: Sat Aug 9 17:29:38 2025 +0300

    ramips: fix TP-Link mr600 radio partition offset
    
    This makes 5ghz WiFi work out of the box on these devices, eliminating
    the need to flash a magic blob to the radio partition.
    
    This was found by user BulldozerBSG on the OpenWRT Forums:
    https://forum.openwrt.org/t/tp-link-archer-mr600-exploration/65489/20
    All credit belongs to them. I can confirm the correctness of the
    findings. At least one other user (Iggy87100) confirmed them too.
    
    Signed-off-by: Stefan D?singer <stefandoesinger at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19790
    (cherry picked from commit e7ed87b83b62cc3920cf1f25abbf6f06c96fee66)
    Link: https://github.com/openwrt/openwrt/pull/19839
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
index 165b48d209..17a4b1d6aa 100644
--- a/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_mr600-v2-eu.dts
@@ -136,9 +136,26 @@
 				read-only;
 			};
 
+			/* The boot log of the stock kernel suggests the radio partition is at
+			 * 0xfe0000, but this is wrong. The U-Boot log lists it at 0xff0000. The
+			 * WiFi driver's log output indicates the calibration data is read from a
+			 * hardcoded 0xff0000, ignoring mtd partitions:
+			 *
+			 * 0x000000fe0000-0x000000ff0000 : "radio" <- WRONG
+			 * ...
+			 * MT7603E--> ####  read 2.4G cal from flash !! ####
+			 * spiflash_ioctl_read, Read from 0x00ff0000 length 0x10000, ...
+			 *
+			 * Manual inspection shows 0xfe0000 is empty (0xff) bytes. 0xff0000 contains
+			 * the data we want. */
 			partition at fe0000 {
-				label = "radio";
+				label = "filler";
 				reg = <0xfe0000 0x10000>;
+			};
+
+			partition at ff0000 {
+				label = "radio";
+				reg = <0xff0000 0x10000>;
 				read-only;
 
 				nvmem-layout {



From lede-commits at lists.infradead.org  Sun Aug 24 06:33:36 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 09:33:36 -0400
Subject: [openwrt/openwrt]  ca-certificates: Update to 20250419
In-Reply-To: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
References: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
Message-ID: <mailman.128742.1756042420.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/bf0887bd4218c473e086ad4b0652f61f504e6dbf

commit bf0887bd4218c473e086ad4b0652f61f504e6dbf
Author: Fengyu Wu <saldry at proton.me>
AuthorDate: Sat Jul 19 18:57:05 2025 +0800

    ca-certificates: Update to 20250419
    
    upstream changelog:
    
    [ Alexander Kanavin ]
    * update-ca-certificates: add a --sysroot option
    
    [ Julien Cristau ]
    * Update Mozilla certificate authority bundle to version 2.74.
      The following certificate authorities were added (+):
      + D-TRUST BR Root CA 2 2023
      + D-TRUST EV Root CA 2 2023
      The following certificate authorities were removed (-):
      - Entrust Root Certification Authority - G4
      - SecureSign RootCA11
      - Security Communication RootCA3
      - SwissSign Silver CA - G2
    
    Signed-off-by: Fengyu Wu <saldry at proton.me>
    Link: https://github.com/openwrt/openwrt/pull/19462
    (cherry picked from commit 8bf023da765e9893a3fc5a34556326f3aaa68271)
    Link: https://github.com/openwrt/openwrt/pull/19839
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/system/ca-certificates/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/system/ca-certificates/Makefile b/package/system/ca-certificates/Makefile
index 5b282c339e..4febb647ac 100644
--- a/package/system/ca-certificates/Makefile
+++ b/package/system/ca-certificates/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ca-certificates
-PKG_VERSION:=20241223
+PKG_VERSION:=20250419
 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:=dd8286d0a9dd35c756fea5f1df3fed1510fb891f376903891b003cd9b1ad7e03
+PKG_HASH:=33b44ef78653ecd3f0f2f13e5bba6be466be2e7da72182f737912b81798ba5d2
 PKG_INSTALL:=1
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Sun Aug 24 06:33:34 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 09:33:34 -0400
Subject: [openwrt/openwrt]  ltq-adsl-mei: check status register before reading
 mailbox messages
In-Reply-To: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
References: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
Message-ID: <mailman.128743.1756042420.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/ba7b5d23f6977a65613ee32c28c2190cd01b485e

commit ba7b5d23f6977a65613ee32c28c2190cd01b485e
Author: Jan Hoffmann <jan at 3e8.eu>
AuthorDate: Fri Jul 11 20:31:29 2025 +0200

    ltq-adsl-mei: check status register before reading mailbox messages
    
    The interrupt handler reads from the mailbox if no other reason for the
    interrupt is known. If a spurious interrupt is received just after a
    mailbox message has been sent, this means that the response to the
    previous message is read again and returned by DSL_BSP_SendCMV instead
    of the actual response.
    
    To fix this, check the status register before reading from the mailbox
    in the interrupt handler.
    
    Tested on Fritzbox 7320. Without this change, there is occasionally a
    kernel panic due to an out-of-bounds memory access in the ltq-adsl
    driver (in DSL_DRV_DEV_G997_SnrAllocationNscGet), as a result of an
    incorrect value returned by DSL_DRV_DANUBE_CmvRead. This is reproducible
    by calling "dsl_cpe_pipe.sh g997dsnrg 1 1" multiple times.
    
    Signed-off-by: Jan Hoffmann <jan at 3e8.eu>
    Link: https://github.com/openwrt/openwrt/pull/19385
    (cherry picked from commit 6889ea7b9a466b73f59fad9c6ae942728b907200)
    Link: https://github.com/openwrt/openwrt/pull/19839
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c b/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c
index 20a63716a3..5ee5b70b47 100644
--- a/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c
+++ b/package/kernel/lantiq/ltq-adsl-mei/src/drv_mei_cpe.c
@@ -1787,6 +1787,7 @@ extern void ifx_usb_enable_afe_oc(void);
  */
 static irqreturn_t IFX_MEI_IrqHandle (int int1, void *void0)
 {
+	u32 stat;
 	u32 scratch;
 	DSL_DEV_Device_t *pDev = (DSL_DEV_Device_t *) void0;
 #if defined(CONFIG_LTQ_MEI_FW_LOOPBACK) && defined(DFE_PING_TEST)
@@ -1820,6 +1821,12 @@ static irqreturn_t IFX_MEI_IrqHandle (int int1, void *void0)
                 if (dsl_bsp_event_callback[event].function)
                         (*dsl_bsp_event_callback[event].function)(pDev, event, dsl_bsp_event_callback[event].pData);
         } else { // normal message
+                IFX_MEI_LongWordReadOffset (pDev, (u32) ME_ARC2ME_STAT, &stat);
+                if (!(stat & ARC_TO_MEI_MSGAV)) {
+                        // status register indicates there is no message
+                        return IRQ_NONE;
+                }
+
                 IFX_MEI_MailboxRead (pDev, DSL_DEV_PRIVATE(pDev)->CMV_RxMsg, MSG_LENGTH);
                 if (DSL_DEV_PRIVATE(pDev)-> cmv_waiting == 1) {
                         DSL_DEV_PRIVATE(pDev)-> arcmsgav = 1;



From lede-commits at lists.infradead.org  Sun Aug 24 06:33:42 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 09:33:42 -0400
Subject: [openwrt/openwrt]  kernel: Remove patch for fixed bug
In-Reply-To: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
References: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
Message-ID: <mailman.128744.1756042420.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/6bf869db0fe181b28ff71f3145715adc47de1a6b

commit 6bf869db0fe181b28ff71f3145715adc47de1a6b
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Thu Aug 21 22:07:06 2025 +0200

    kernel: Remove patch for fixed bug
    
    The problem was fixed in upstream kernel in a different way and the
    change was backported to kernel 6.6 in the following change:
    https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.6.y&id=48e8791843206baf76827df1b6ee3cb88a2a17d8
    
    The removed patch changes the endianness again and breaks the
    functionality, use only the upstream code and remove our unneeded patch.
    
    The 823-v6.12-0003-nvmem-layouts-add-U-Boot-env-layout.patch patch was
    adapted in the kernel bump too. It moves the code with the fix now.
    
    Fixes: 05d344cb2ca3 ("kernel: bump 6.6 to 6.6.100")
    Reported-by: Michael Pratt <mcpratt at pm.me>
    Link: https://github.com/openwrt/openwrt/pull/19830
    (cherry picked from commit 4cd256c72a7e823e55475786eb1f2a1f7ffcd497)
    Link: https://github.com/openwrt/openwrt/pull/19839
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...boot-env-align-endianness-of-crc32-values.patch | 45 ----------------------
 1 file changed, 45 deletions(-)

diff --git a/target/linux/generic/pending-6.6/802-nvmem-u-boot-env-align-endianness-of-crc32-values.patch b/target/linux/generic/pending-6.6/802-nvmem-u-boot-env-align-endianness-of-crc32-values.patch
deleted file mode 100644
index 29fe668f8d..0000000000
--- a/target/linux/generic/pending-6.6/802-nvmem-u-boot-env-align-endianness-of-crc32-values.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 0e71cac033bb7689c4dfa2e6814191337ef770f5 Mon Sep 17 00:00:00 2001
-From: INAGAKI Hiroshi <musashino.open at gmail.com>
-Date: Thu, 13 Oct 2022 00:51:33 +0900
-Subject: [PATCH] nvmem: layouts: u-boot-env: align endianness of crc32 values
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This patch fixes crc32 error on Big-Endianness system by conversion of
-calculated crc32 value.
-
-Little-Endianness system:
-
-  obtained crc32: Little
-calculated crc32: Little
-
-Big-Endianness system:
-
-  obtained crc32: Little
-calculated crc32: Big
-
-log (APRESIA ApresiaLightGS120GT-SS, RTL8382M, Big-Endianness):
-
-[    8.570000] u_boot_env 18001200.spi:flash at 0:partitions:partition at c0000: Invalid calculated CRC32: 0x88cd6f09 (expected: 0x096fcd88)
-[    8.580000] u_boot_env: probe of 18001200.spi:flash at 0:partitions:partition at c0000 failed with error -22
-
-Fixes: f955dc1445069 ("nvmem: add driver handling U-Boot environment variables")
-
-Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
-Acked-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Tested-by: Christian Lamparter <chunkeey at gmail.com>
-Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla at linaro.org>
----
-
---- a/drivers/nvmem/layouts/u-boot-env.c
-+++ b/drivers/nvmem/layouts/u-boot-env.c
-@@ -148,7 +148,7 @@ int u_boot_env_parse(struct device *dev,
- 	crc32_data_len = dev_size - crc32_data_offset;
- 	data_len = dev_size - data_offset;
- 
--	calc = crc32(~0, buf + crc32_data_offset, crc32_data_len) ^ ~0L;
-+	calc = le32_to_cpu((__le32)crc32(~0, buf + crc32_data_offset, crc32_data_len) ^ ~0L);
- 	if (calc != crc32) {
- 		dev_err(dev, "Invalid calculated CRC32: 0x%08x (expected: 0x%08x)\n", calc, crc32);
- 		err = -EINVAL;



From lede-commits at lists.infradead.org  Sun Aug 24 06:33:39 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 09:33:39 -0400
Subject: [openwrt/openwrt]  kernel: add backport to fix broken PHY LEDs
In-Reply-To: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
References: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
Message-ID: <mailman.128745.1756042420.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/7f683399632dfb1a3f53ed2e04d4871c23ce91a4

commit 7f683399632dfb1a3f53ed2e04d4871c23ce91a4
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Thu Jul 31 19:48:32 2025 +0100

    kernel: add backport to fix broken PHY LEDs
    
    A commit which broke netdev trigger LEDs offloaded to PHYs recently made
    it all the way down to the Linux 6.6 stable branch. The revert has been
    accepted to linux-next, however, a backport to the various -stable trees
    is still pending.
    
    Import the backported revert commit to fix in OpenWrt in the meantime
    until the revert also gets picked to linux-stable.
    
    Link: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=26f732791f2bcab18f59c61915bbe35225f30136
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
    (cherry picked from commit 1de1df1bea94547150f01006062358ebe68ae874)
    Link: https://github.com/openwrt/openwrt/pull/19839
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...-trigger-netdev-Configure-LED-blink-inter.patch | 81 ++++++++++++++++++++++
 1 file changed, 81 insertions(+)

diff --git a/target/linux/generic/backport-6.6/847-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch b/target/linux/generic/backport-6.6/847-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch
new file mode 100644
index 0000000000..192f12d5c8
--- /dev/null
+++ b/target/linux/generic/backport-6.6/847-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch
@@ -0,0 +1,81 @@
+From 26f732791f2bcab18f59c61915bbe35225f30136 Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel at makrotopia.org>
+Date: Sat, 12 Jul 2025 16:39:21 +0100
+Subject: [PATCH] Revert "leds: trigger: netdev: Configure LED blink interval
+ for HW offload"
+
+This reverts commit c629c972b310af41e9e072febb6dae9a299edde6.
+
+While .led_blink_set() would previously put an LED into an unconditional
+permanently blinking state, the offending commit now uses same operation
+to (also?) set the blink timing of the netdev trigger when offloading.
+
+This breaks many if not all of the existing PHY drivers which offer
+offloading LED operations, as those drivers would just put the LED into
+blinking state after .led_blink_set() has been called.
+
+Unfortunately the change even made it into stable kernels for unknown
+reasons, so it should be reverted there as well.
+
+Fixes: c629c972b310a ("leds: trigger: netdev: Configure LED blink interval for HW offload")
+Link: https://lore.kernel.org/linux-leds/c6134e26-2e45-4121-aa15-58aaef327201 at lunn.ch/T/#m9d6fe81bbcb273e59f12bbedbd633edd32118387
+Suggested-by: Andrew Lunn <andrew at lunn.ch>
+Cc: stable at vger.kernel.org
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Link: https://lore.kernel.org/r/6dcc77ee1c9676891d6250d8994850f521426a0f.1752334655.git.daniel at makrotopia.org
+Signed-off-by: Lee Jones <lee at kernel.org>
+---
+ drivers/leds/trigger/ledtrig-netdev.c | 16 +++-------------
+ 1 file changed, 3 insertions(+), 13 deletions(-)
+
+--- a/drivers/leds/trigger/ledtrig-netdev.c
++++ b/drivers/leds/trigger/ledtrig-netdev.c
+@@ -54,7 +54,6 @@ struct led_netdev_data {
+ 	unsigned int last_activity;
+ 
+ 	unsigned long mode;
+-	unsigned long blink_delay;
+ 	int link_speed;
+ 	u8 duplex;
+ 
+@@ -70,10 +69,6 @@ static void set_baseline_state(struct le
+ 	/* Already validated, hw control is possible with the requested mode */
+ 	if (trigger_data->hw_control) {
+ 		led_cdev->hw_control_set(led_cdev, trigger_data->mode);
+-		if (led_cdev->blink_set) {
+-			led_cdev->blink_set(led_cdev, &trigger_data->blink_delay,
+-					    &trigger_data->blink_delay);
+-		}
+ 
+ 		return;
+ 	}
+@@ -415,11 +410,10 @@ static ssize_t interval_store(struct dev
+ 			      size_t size)
+ {
+ 	struct led_netdev_data *trigger_data = led_trigger_get_drvdata(dev);
+-	struct led_classdev *led_cdev = trigger_data->led_cdev;
+ 	unsigned long value;
+ 	int ret;
+ 
+-	if (trigger_data->hw_control && !led_cdev->blink_set)
++	if (trigger_data->hw_control)
+ 		return -EINVAL;
+ 
+ 	ret = kstrtoul(buf, 0, &value);
+@@ -428,13 +422,9 @@ static ssize_t interval_store(struct dev
+ 
+ 	/* impose some basic bounds on the timer interval */
+ 	if (value >= 5 && value <= 10000) {
+-		if (trigger_data->hw_control) {
+-			trigger_data->blink_delay = value;
+-		} else {
+-			cancel_delayed_work_sync(&trigger_data->work);
++		cancel_delayed_work_sync(&trigger_data->work);
+ 
+-			atomic_set(&trigger_data->interval, msecs_to_jiffies(value));
+-		}
++		atomic_set(&trigger_data->interval, msecs_to_jiffies(value));
+ 		set_baseline_state(trigger_data);	/* resets timer */
+ 	}
+ 



From lede-commits at lists.infradead.org  Sun Aug 24 06:33:35 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 09:33:35 -0400
Subject: [openwrt/openwrt]  Note inspiration for this script to give credit
 where it's due
In-Reply-To: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
References: <175604241432.3480843.6878008034510637430@git-01.infra.openwrt.org>
Message-ID: <mailman.128746.1756042420.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/fcaa4fdbbf46063d46bd76f1347a30309911ff13

commit fcaa4fdbbf46063d46bd76f1347a30309911ff13
Author: Bradley M. Kuhn <bkuhn at sfconservancy.org>
AuthorDate: Fri Jul 11 13:13:36 2025 -0700

    Note inspiration for this script to give credit where it's due
    
    There is some confusion in the Git log of this file.  Specifically,
    the commit message on 7b7f1702 incorrectly indicates that there was
    "potential fear" about copyright infringement.
    
    Upon review of this situation, there is, in my opinion, no concern of
    copyright infringement here.  This is not legal advice; it is my
    opinion based of years of work on copyright policy for FOSS.
    
    However, Elliott Mitchell's idea was obviously helpful as inspiration
    in writing this script and deserves credit.  Ideas alone, however,
    are not to my knowledge copyrightable anywhere in the world.
    
    Signed-off-by: Bradley M. Kuhn <bkuhn at sfconservancy.org>
    (cherry picked from commit d8e738e5c4034bbc8bd29db25fb0abafdc2abf17)
    Link: https://github.com/openwrt/openwrt/pull/19839
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 scripts/kernel_bump.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index b1c17d6c39..03e809eedc 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -2,6 +2,9 @@
 # SPDX-License-Identifier: GPL-2.0-or-later
 #
 # Copyright (C) 2024 Olliver Schinagl <oliver at schinagl.nl>
+#
+# This script was implemented from scratch -- inspired by ideas shared
+# with the OpenWrt project by Elliott Mitchell <ehem+openwrt at m5p.com>
 
 set -eu
 if [ -n "${DEBUG_TRACE_SH:-}" ] && \



From lede-commits at lists.infradead.org  Sun Aug 24 06:53:10 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 09:53:10 -0400
Subject: [openwrt/openwrt]  mediatek: filogic: support WAVLINK WL-WN586X3 Rev
 B
In-Reply-To: <175604359035.3540254.11221082502725730206@git-01.infra.openwrt.org>
References: <175604359035.3540254.11221082502725730206@git-01.infra.openwrt.org>
Message-ID: <mailman.128753.1756043593.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/41106141b85a38a285b370f347532dd553660b39

commit 41106141b85a38a285b370f347532dd553660b39
Author: Zhenfu Shi <i0ntempest at i0ntempest.com>
AuthorDate: Wed Aug 20 14:00:26 2025 +1000

    mediatek: filogic: support WAVLINK WL-WN586X3 Rev B
    
    This commit adds support for the WAVLINK WL-WN586X3 Rev B, which swaps
    the 16MB NOR flash for an 128MB NAND flash chip, and uses UBI for
    data partition. This commit utilizes the previous submitted dtsi that
    includes common hardware for a few Wavlink routers.
    
    Hardware
    --------
    - SOC: MediaTek MT7981B
    - RAM: 256MB DDR3
    - Flash: 128MB SPI-NAND (ESMT F50L1G41LB)
    - Ethernet: 2x1Gb Lan 1x1Gb Wan
    - WiFi: MediaTek MT7981B 2x2 DBDC 802.11ax 2T2R (2.4/5) with 4 external and 1 internal antennae
    - LEDs: 2xLan 1x Wan 1x WIFI 1xSTATUS
    
    Installation
    ------------
    Flashing over the vendor WebUI has been tested and unsuccessful (YMMV).
    The image need to be flashed via TFTP which can be activated over the onboard UART serial console:
    1. Connect UART:  TX->board RX, RX->board TX, GND->board GND.
    2. Connect PC to router lan port.
    3. Setup the tftp server on PC, set IP to 192.168.10.100.
    4. Power on the device. Interrupt boot countdown at uboot boot menu and select 2. Upgrade firmware option.
    5. Input the image name and start flashing.
    
    Sample uboot menu:
    ```
      *** U-Boot Boot Menu ***
    
          1. Startup system (Default)
          2. Upgrade firmware
          3. Upgrade ATF BL2
          4. Upgrade ATF FIP
          5. Upgrade single image
          6. Load image
          0. U-Boot console
    ```
    
    NOTE: Do not use the intermediate image here which is for Rev A only:
    https://github.com/themaverickdm/firmware-misc/tree/main/wavlink/wl-wn586x3
    
    MAC Addresses
    -------------
    LAN: 80:3F:5D:xx:xx:x1 (hw, 0x44e, ASCII encoded)
    WAN: 80:3F:5D:xx:xx:x2 (hw, 0x460, ASCII encoded)
     2G: 80:3F:5D:xx:xx:x3 (factory, 0x4, raw binary, also on label)
     5G: 80:3F:5D:xx:xx:x3 (Same as 2G)
    
    Signed-off-by: Zhenfu Shi <i0ntempest at i0ntempest.com>
    Link: https://github.com/openwrt/openwrt/pull/19785
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../mediatek/dts/mt7981b-wavlink-wl-wn586x3b.dts   | 57 ++++++++++++++++++++++
 .../filogic/base-files/etc/board.d/01_leds         |  3 +-
 .../filogic/base-files/etc/board.d/02_network      |  3 +-
 target/linux/mediatek/image/filogic.mk             | 19 ++++++++
 4 files changed, 80 insertions(+), 2 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3b.dts b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3b.dts
new file mode 100644
index 0000000000..10a4cf02a4
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981b-wavlink-wl-wn586x3b.dts
@@ -0,0 +1,57 @@
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+
+#include "mt7981b-wavlink-wl-3port-128nand-common.dtsi"
+
+/ {
+	model = "WAVLINK WL-WN586X3 Rev B";
+	compatible = "wavlink,wl-wn586x3b", "mediatek,mt7981b";
+
+	aliases {
+		label-mac-device = &wifi;
+		led-boot = &led_status_blue;
+		led-failsafe = &led_status_blue;
+		led-running = &led_status_blue;
+		led-upgrade = &led_status_blue;
+		serial0 = &uart0;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led-0 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_WAN;
+			gpios = <&pio 5 GPIO_ACTIVE_LOW>;
+		};
+
+		led-1 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_WLAN;
+			gpios = <&pio 9 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
+		};
+
+		led_status_blue: led-2 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
+		};
+
+		led-3 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_LAN;
+			function-enumerator = <1>;
+			gpios = <&pio 12 GPIO_ACTIVE_LOW>;
+		};
+
+		led-4 {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_LAN;
+			function-enumerator = <2>;
+			gpios = <&pio 13 GPIO_ACTIVE_LOW>;
+		};
+
+	};
+};
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
index f2b773636c..878b1367a0 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
@@ -214,7 +214,8 @@ wavlink,wl-wn551x3)
         ucidef_set_led_netdev "lan-2" "lan-2" "green:lan-2" "lan2" "link tx rx"
         ucidef_set_led_netdev "wan" "wan" "green:wan" "eth1" "link tx rx"
         ;;
-wavlink,wl-wn586x3)
+wavlink,wl-wn586x3|\
+wavlink,wl-wn586x3b)
 	ucidef_set_led_netdev "lan-1" "lan-1" "blue:lan-1" "lan1" "link tx rx"
 	ucidef_set_led_netdev "lan-2" "lan-2" "blue:lan-2" "lan2" "link tx rx"
 	ucidef_set_led_netdev "wan" "wan" "blue:wan" "eth1" "link tx rx"
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
index c5709f74f4..22db184e91 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -145,7 +145,8 @@ mediatek_setup_interfaces()
 		;;
 	tplink,tl-xdr6086|\
 	wavlink,wl-wn551x3|\
-	wavlink,wl-wn586x3)
+	wavlink,wl-wn586x3|\
+	wavlink,wl-wn586x3b)
 		ucidef_set_interfaces_lan_wan "lan1 lan2" eth1
 		;;
 	tplink,archer-ax80-v1)
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 434ae11576..1374f8f1f8 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -2053,6 +2053,25 @@ define Device/wavlink_wl-wn586x3
 endef
 TARGET_DEVICES += wavlink_wl-wn586x3
 
+define Device/wavlink_wl-wn586x3b
+  DEVICE_VENDOR := WAVLINK
+  DEVICE_MODEL := WL-WN586X3B
+  DEVICE_DTS := mt7981b-wavlink-wl-wn586x3b
+  DEVICE_DTS_DIR := ../dts
+  DEVICE_DTS_LOADADDR := 0x47000000
+  UBINIZE_OPTS := -E 5
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  IMAGE_SIZE := 65536k
+  KERNEL_INITRAMFS_SUFFIX := .itb
+  KERNEL_IN_UBI := 1
+  DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
+  IMAGES := factory.bin initramfs-kernel.bin sysupgrade.bin
+  IMAGE/factory.bin := append-ubi | check-size $$(IMAGE_SIZE)
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += wavlink_wl-wn586x3b
+
 define Device/wavlink_wl-wn573hx3
   DEVICE_VENDOR := WAVLINK
   DEVICE_MODEL := WL-WN573HX3



From lede-commits at lists.infradead.org  Sun Aug 24 07:36:03 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 10:36:03 -0400
Subject: [openwrt/openwrt]  ramips: zyxel wsm20: set mac address in dts
In-Reply-To: <175604616389.3680417.1490019357614403522@git-01.infra.openwrt.org>
References: <175604616389.3680417.1490019357614403522@git-01.infra.openwrt.org>
Message-ID: <mailman.128757.1756046170.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/749fa79e016cd3c22ce5ee7a53c4dc61f67c8a8a

commit 749fa79e016cd3c22ce5ee7a53c4dc61f67c8a8a
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Wed Aug 13 17:22:35 2025 -0700

    ramips: zyxel wsm20: set mac address in dts
    
    Support in mt76 has existed for quite a while. Use it.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19799
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ramips/dts/mt7621_zyxel_wsm20.dts        | 19 ++++++++++++++++++-
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac           |  5 -----
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts
index 42dc716027..07e3551317 100644
--- a/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts
+++ b/target/linux/ramips/dts/mt7621_zyxel_wsm20.dts
@@ -121,7 +121,9 @@
 				};
 
 				macaddr_factory_1fdfa: macaddr at 1fdfa {
+					compatible = "mac-base";
 					reg = <0x1fdfa 0x6>;
+					#nvmem-cell-cells = <1>;
 				};
 
 				macaddr_factory_1fdf4: macaddr at 1fdf4 {
@@ -180,7 +182,7 @@
 };
 
 &gmac0 {
-	nvmem-cells = <&macaddr_factory_1fdfa>;
+	nvmem-cells = <&macaddr_factory_1fdfa 0>;
 	nvmem-cell-names = "mac-address";
 };
 
@@ -208,6 +210,21 @@
 		nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
 		nvmem-cell-names = "eeprom", "precal";
 		mediatek,disable-radar-background;
+
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		band at 0 {
+			reg = <0>;
+			nvmem-cells = <&macaddr_factory_1fdfa 1>;
+			nvmem-cell-names = "mac-address";
+		};
+
+		band at 1 {
+			reg = <1>;
+			nvmem-cells = <&macaddr_factory_1fdfa 2>;
+			nvmem-cell-names = "mac-address";
+		};
 	};
 };
 
diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 2dd11f6760..fe09740492 100644
--- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -245,9 +245,4 @@ case "$board" in
 		[ "$PHYNBR" = "0" ] && macaddr_setbit_la "$hw_mac_addr" > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && echo -n "$hw_mac_addr" > /sys${DEVPATH}/macaddress
 		;;
-	zyxel,wsm20)
-		hw_mac_addr="$(mtd_get_mac_binary Factory 0x1fdfa)"
-		[ "$PHYNBR" = "0" ] && macaddr_add $hw_mac_addr 1 > /sys${DEVPATH}/macaddress
-		[ "$PHYNBR" = "1" ] && macaddr_add $hw_mac_addr 2 > /sys${DEVPATH}/macaddress
-		;;
 esac



From lede-commits at lists.infradead.org  Sun Aug 24 07:42:42 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 10:42:42 -0400
Subject: [openwrt/openwrt]  ath79: trendnet,tew-823dru: use nvmem
In-Reply-To: <175604656295.3709729.7187648945257994470@git-01.infra.openwrt.org>
References: <175604656295.3709729.7187648945257994470@git-01.infra.openwrt.org>
Message-ID: <mailman.128758.1756046566.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/132b6862a074f9ebae8ef055b03e7994a2ce469f

commit 132b6862a074f9ebae8ef055b03e7994a2ce469f
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Tue Jun 11 15:37:37 2024 -0700

    ath79: trendnet,tew-823dru: use nvmem
    
    Removes deprecated userspace handling.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/16287
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../ath79/dts/qca9558_trendnet_tew-823dru.dts      | 36 ++++++++++++++++++++--
 .../generic/base-files/etc/board.d/02_network      |  5 ---
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac        |  8 -----
 3 files changed, 34 insertions(+), 15 deletions(-)

diff --git a/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts b/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts
index d2e381eb4b..817ce3bf1e 100644
--- a/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts
+++ b/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts
@@ -11,6 +11,7 @@
 	model = "TRENDNET TEW-823DRU";
 
 	aliases {
+		label-mac-device = &eth1;
 		led-boot = &led_power_green;
 		led-failsafe = &led_power_green;
 		led-running = &led_power_green;
@@ -64,6 +65,13 @@
 
 &pcie0 {
 	status = "okay";
+
+	wifi at 0,0 {
+		compatible = "qcom,ath10k";
+		reg = <0 0 0 0 0>;
+		nvmem-cells = <&maccaddr_mac_wan 1>;
+		nvmem-cell-names = "mac-address";
+	};
 };
 
 &pcie1 {
@@ -133,6 +141,24 @@
 				label = "mac";
 				reg = <0xfe0000 0x010000>;
 				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					maccaddr_mac_lan: macaddr at 4 {
+						compatible = "mac-base";
+						reg = <0x4 0x11>;
+						#nvmem-cell-cells = <1>;
+					};
+
+					maccaddr_mac_wan: macaddr at 18 {
+						compatible = "mac-base";
+						reg = <0x18 0x11>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
 			};
 
 			partition at ff0000 {
@@ -172,6 +198,9 @@
 &eth0 {
 	status = "okay";
 
+	nvmem-cells = <&maccaddr_mac_lan 0>;
+	nvmem-cell-names = "mac-address";
+
 	phy-handle = <&phy0>;
 	pll-data = <0x56000000 0x00000101 0x00001616>;
 
@@ -184,6 +213,9 @@
 &eth1 {
 	status = "okay";
 
+	nvmem-cells = <&maccaddr_mac_wan 0>;
+	nvmem-cell-names = "mac-address";
+
 	pll-data = <0x03000101 0x00000101 0x00001616>;
 
 	fixed-link {
@@ -195,6 +227,6 @@
 &wmac {
 	status = "okay";
 
-	nvmem-cells = <&cal_art_1000>;
-	nvmem-cell-names = "calibration";
+	nvmem-cells = <&cal_art_1000>, <&maccaddr_mac_lan 0>;
+	nvmem-cell-names = "calibration", "mac-address";
 };
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index 545bc14e36..f38eaa7866 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -846,11 +846,6 @@ ath79_setup_macs()
 		base_mac=$(mtd_get_mac_binary info 0x8)
 		wan_mac=$(macaddr_add "$base_mac" 1)
 		;;
-	trendnet,tew-823dru)
-		lan_mac=$(mtd_get_mac_text mac 0x4)
-		wan_mac=$(mtd_get_mac_text mac 0x18)
-		label_mac=$wan_mac
-		;;
 	ubnt,powerbridge-m|\
 	ubnt,rocket-m|\
 	ubnt,unifi)
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 4dfc67e280..9b5593b972 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -112,14 +112,6 @@ case "$board" in
 		[ "$PHYNBR" -eq 1 ] && \
 			macaddr_add $base_mac 1 > /sys${DEVPATH}/macaddress
 		;;
-	trendnet,tew-823dru)
-		# set the 2.4G interface mac address to LAN MAC
-		[ "$PHYNBR" -eq 1 ] && \
-			mtd_get_mac_text mac 4 > /sys${DEVPATH}/macaddress
-		# set the 5G interface mac address to WAN MAC + 1
-		[ "$PHYNBR" -eq 0 ] && \
-			macaddr_add "$(mtd_get_mac_text mac 0x18)" 1 > /sys${DEVPATH}/macaddress
-		;;
 	zyxel,nwa1123-ac)
 		[ "$PHYNBR" -eq 0 ] && \
 			mtd_get_mac_text mib0 0x66 > /sys${DEVPATH}/macaddress



From lede-commits at lists.infradead.org  Sun Aug 24 07:55:39 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 10:55:39 -0400
Subject: [openwrt/openwrt]  ath79: db120: use led-sources for ath9k
In-Reply-To: <175604733919.3752262.995030364781793443@git-01.infra.openwrt.org>
References: <175604733919.3752262.995030364781793443@git-01.infra.openwrt.org>
Message-ID: <mailman.128759.1756047342.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/715f9541e864b80ab65e1ed1a4bb6a8c900b9546

commit 715f9541e864b80ab65e1ed1a4bb6a8c900b9546
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat May 24 18:20:09 2025 -0700

    ath79: db120: use led-sources for ath9k
    
    The ath9k driver creates an ath9k LED by default. Instead of having a
    non functional LED, configure it properly and remove the extra as it's
    not needed.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Tested-by: Zoltan HERPAI wigyori at uid0.hu
    Link: https://github.com/openwrt/openwrt/pull/18907
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ath79/dts/ar9344_atheros_db120.dts | 30 +++++++++----------------
 1 file changed, 11 insertions(+), 19 deletions(-)

diff --git a/target/linux/ath79/dts/ar9344_atheros_db120.dts b/target/linux/ath79/dts/ar9344_atheros_db120.dts
index 5004f40341..1f47ee9a38 100644
--- a/target/linux/ath79/dts/ar9344_atheros_db120.dts
+++ b/target/linux/ath79/dts/ar9344_atheros_db120.dts
@@ -21,12 +21,6 @@
 	leds {
 		compatible = "gpio-leds";
 
-		wlan2g {
-			label = "green:wlan2g";
-			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy0tpt";
-		};
-
 		wlan5g {
 			label = "green:wlan5g";
 			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
@@ -48,16 +42,6 @@
 		};
 	};
 
-	leds-ath9k {
-		compatible = "gpio-leds";
-
-		wlan5g-ath {
-			label = "green:wlan5g-ath";
-			gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy1tpt";
-		};
-	};
-
 	keys {
 		compatible = "gpio-keys";
 
@@ -225,14 +209,17 @@
 &pcie {
 	status = "okay";
 
-	ath9k: wifi at 0,0 {
+	wifi at 0,0 {
 		compatible = "pci168c,0030";
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&calibration_art_5000>;
 		nvmem-cell-names = "calibration";
 		ieee80211-freq-limit = <4900000 5990000>;
-		#gpio-cells = <2>;
-		gpio-controller;
+
+		led {
+			led-sources = <0>;
+			led-active-low;
+		};
 	};
 };
 
@@ -241,6 +228,11 @@
 
 	nvmem-cells = <&calibration_art_1000>;
 	nvmem-cell-names = "calibration";
+
+	led {
+		led-sources = <13>;
+		led-active-low;
+	};
 };
 
 &usb {



From lede-commits at lists.infradead.org  Sun Aug 24 09:00:18 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 12:00:18 -0400
Subject: [openwrt/openwrt]  images: move append-teltonika-metadata to
 image-commands.mk
In-Reply-To: <175605121885.3992801.10034360838577410347@git-01.infra.openwrt.org>
References: <175605121885.3992801.10034360838577410347@git-01.infra.openwrt.org>
Message-ID: <mailman.128780.1756051222.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/53d8303a79f470a8244bd74d8c3bc6c58bd69cd0

commit 53d8303a79f470a8244bd74d8c3bc6c58bd69cd0
Author: Simonas Tamo?aitis <simsasss at gmail.com>
AuthorDate: Wed Aug 6 21:52:15 2025 +0300

    images: move append-teltonika-metadata to image-commands.mk
    
    Move append-teltonika-metadata to image-commands.mk and unify over different targets.
    This method can be used to create valid "factory" images for most of Teltonika devices.
    
    Signed-off-by: Simonas Tamo?aitis <simsasss at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19401
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/image-commands.mk             | 27 +++++++++++++++++++++++++
 target/linux/ath79/image/generic.mk   | 32 ++----------------------------
 target/linux/ipq40xx/image/generic.mk | 17 +++++-----------
 target/linux/ramips/image/mt76x8.mk   | 37 ++++++++++++-----------------------
 4 files changed, 46 insertions(+), 67 deletions(-)

diff --git a/include/image-commands.mk b/include/image-commands.mk
index ea21ca2bf0..781f6ad03b 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -130,6 +130,33 @@ define Build/append-gl-metadata
 	}
 endef
 
+define Build/append-teltonika-metadata
+	echo \
+		'{$(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \
+			"metadata_version": "1.1", \
+			"compat_version": "$(call json_quote,$(compat_version))", \
+			"version":"$(call json_quote,$(VERSION_DIST))-$(call json_quote,$(VERSION_NUMBER))-$(call json_quote,$(REVISION))", \
+			"device_code": [".*"], \
+			"hwver": [".*"], \
+			"batch": [".*"], \
+			"serial": [".*"], \
+			$(if $(DEVICE_COMPAT_MESSAGE),"compat_message": "$(call json_quote,$(DEVICE_COMPAT_MESSAGE))"$(comma)) \
+			$(if $(filter-out 1.0,$(compat_version)),"new_supported_devices": \
+				[$(call metadata_devices,$(SUPPORTED_TELTONIKA_DEVICES))]$(comma) \
+				"supported_devices": ["$(call json_quote,$(legacy_supported_message))"]$(comma)) \
+			$(if $(filter 1.0,$(compat_version)),"supported_devices":[$(call metadata_devices,$(SUPPORTED_TELTONIKA_DEVICES))]$(comma)) \
+			"version_wrt": { \
+			"dist": "$(call json_quote,$(VERSION_DIST))", \
+			"version": "$(call json_quote,$(VERSION_NUMBER))", \
+			"revision": "$(call json_quote,$(REVISION))", \
+			"target": "$(call json_quote,$(TARGETID))", \
+			"board": "$(call json_quote,$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)))" \
+		}, \
+			"hw_support": {}, \
+			"hw_mods": {$(shell i=1; for mod in $(SUPPORTED_TELTONIKA_HW_MODS); do [ $$i -gt 1 ] && echo -n ,; echo -n "\"mod$$i\": \"$$mod\""; i=$$((i+1)); done)} \
+		}' | fwtool -I - $@
+endef
+
 define Build/append-rootfs
 	dd if=$(IMAGE_ROOTFS) >> $@
 endef
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 6e97960207..b4000de232 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -13,6 +13,7 @@ DEVICE_VARS += ELECOM_HWID
 DEVICE_VARS += MOXA_MAGIC MOXA_HWID
 DEVICE_VARS += OPENMESH_CE_TYPE ZYXEL_MODEL_STRING
 DEVICE_VARS += SUPPORTED_TELTONIKA_DEVICES
+DEVICE_VARS += SUPPORTED_TELTONIKA_HW_MODS
 
 define Build/addpattern
 	-$(STAGING_DIR_HOST)/bin/addpattern -B $(ADDPATTERN_ID) \
@@ -153,35 +154,6 @@ define Build/teltonika-v1-header
 	@mv $@.new $@
 endef
 
-metadata_json_teltonika = \
-	'{ $(if $(IMAGE_METADATA),$(IMAGE_METADATA)$(comma)) \
-		"metadata_version": "1.1", \
-		"compat_version": "$(call json_quote,$(compat_version))", \
-		"version":"$(call json_quote,$(VERSION_DIST))-$(call json_quote,$(VERSION_NUMBER))-$(call json_quote,$(REVISION))", \
-		"device_code": [".*"], \
-		"hwver": [".*"], \
-		"batch": [".*"], \
-		"serial": [".*"], \
-		$(if $(DEVICE_COMPAT_MESSAGE),"compat_message": "$(call json_quote,$(DEVICE_COMPAT_MESSAGE))"$(comma)) \
-		$(if $(filter-out 1.0,$(compat_version)),"new_supported_devices": \
-			[$(call metadata_devices,$(SUPPORTED_TELTONIKA_DEVICES))]$(comma) \
-			"supported_devices": ["$(call json_quote,$(legacy_supported_message))"]$(comma)) \
-		$(if $(filter 1.0,$(compat_version)),"supported_devices":[$(call metadata_devices,$(SUPPORTED_TELTONIKA_DEVICES))]$(comma)) \
-		"version_wrt": { \
-			"dist": "$(call json_quote,$(VERSION_DIST))", \
-			"version": "$(call json_quote,$(VERSION_NUMBER))", \
-			"revision": "$(call json_quote,$(REVISION))", \
-			"target": "$(call json_quote,$(TARGETID))", \
-			"board": "$(call json_quote,$(if $(BOARD_NAME),$(BOARD_NAME),$(DEVICE_NAME)))" \
-		}, \
-		"hw_support": {}, \
-		"hw_mods": {} \
-	}'
-
-define Build/append-metadata-teltonika
-	echo $(call metadata_json_teltonika) | fwtool -I - $@
-endef
-
 define Build/wrgg-pad-rootfs
 	$(STAGING_DIR_HOST)/bin/padjffs2 $(IMAGE_ROOTFS) -c 64 >>$@
 endef
@@ -3152,7 +3124,7 @@ define Device/teltonika_rut300
   IMAGE_SIZE := 15552k
   IMAGES += factory.bin
   IMAGE/factory.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
-			 append-rootfs | pad-rootfs | append-metadata-teltonika | \
+			 append-rootfs | pad-rootfs | append-teltonika-metadata | \
 			 check-size $$$$(IMAGE_SIZE)
   IMAGE/sysupgrade.bin = append-kernel | pad-to $$$$(BLOCKSIZE) | \
 			 append-rootfs | pad-rootfs | append-metadata | \
diff --git a/target/linux/ipq40xx/image/generic.mk b/target/linux/ipq40xx/image/generic.mk
index 44326520e6..1376c3eb9a 100644
--- a/target/linux/ipq40xx/image/generic.mk
+++ b/target/linux/ipq40xx/image/generic.mk
@@ -2,6 +2,8 @@
 DEVICE_VARS += NETGEAR_BOARD_ID NETGEAR_HW_ID
 DEVICE_VARS += RAS_BOARD RAS_ROOTFS_SIZE RAS_VERSION
 DEVICE_VARS += WRGG_DEVNAME WRGG_SIGNATURE
+DEVICE_VARS += SUPPORTED_TELTONIKA_DEVICES
+DEVICE_VARS += SUPPORTED_TELTONIKA_HW_MODS
 
 define Build/netgear-fit-padding
 	./netgear-fit-padding.py $@ $@.new
@@ -52,17 +54,6 @@ define Build/append-rootfshdr
 	dd if=$@.new bs=64 count=1 >> $@.$1
 endef
 
-define Build/append-rutx-metadata
-	echo \
-		'{ \
-			"device_code": [".*"], \
-			"hwver": [".*"], \
-			"batch": [".*"], \
-			"serial": [".*"], \
-			"supported_devices":["teltonika,rutx"] \
-		}' | fwtool -I - $@
-endef
-
 define Build/copy-file
 	cat "$(1)" > "$@"
 endef
@@ -1122,13 +1113,15 @@ define Device/teltonika_rutx10
 	$(call Device/UbiFit)
 	DEVICE_VENDOR := Teltonika
 	DEVICE_MODEL := RUTX10
+	SUPPORTED_TELTONIKA_DEVICES := teltonika,rutx
+	SUPPORTED_TELTONIKA_HW_MODS := W25N02KV NAND_GD5F2GXX EG060K RUTX_V12
 	SOC := qcom-ipq4018
 	DEVICE_DTS_CONFIG := config at 5
 	KERNEL_INSTALL := 1
 	BLOCKSIZE := 128k
 	PAGESIZE := 2048
 	FILESYSTEMS := squashfs
-	IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand | append-rutx-metadata
+	IMAGE/factory.ubi := append-ubi | qsdk-ipq-factory-nand | append-teltonika-metadata
 	DEVICE_PACKAGES := kmod-btusb
 endef
 # Missing DSA Setup
diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk
index 2d5821b225..706ec35c0f 100644
--- a/target/linux/ramips/image/mt76x8.mk
+++ b/target/linux/ramips/image/mt76x8.mk
@@ -5,6 +5,8 @@
 include ./common-tp-link.mk
 
 DEFAULT_SOC := mt7628an
+DEVICE_VARS += SUPPORTED_TELTONIKA_DEVICES
+DEVICE_VARS += SUPPORTED_TELTONIKA_HW_MODS
 
 define Build/creality_wb-01-factory
 	mv $@ $(dir $@)factory.bin
@@ -42,25 +44,6 @@ define Build/ravpower-wd009-factory
 	@mv $@.new $@
 endef
 
-define Build/append-teltonika-metadata
-  $(eval model_id=$(word 1,$(1)))
-  $(eval hw_mods=$(subst $(space),$(comma),$(wordlist 2,$(words $(1)),$(1))))
-
-	echo \
-		'{ \
-			"metadata_version": "1.1", \
-			"compat_version": "1.0", \
-			"version": "OpenWrt", \
-			"device_code": [".*"], \
-			"hwver": [".*"], \
-			"batch": [".*"], \
-			"serial": [".*"], \
-			"supported_devices":["teltonika,$(model_id)"], \
-			"hw_support": { }, \
-			"hw_mods": { $(hw_mods) } \
-		}' | fwtool -I - $@
-endef
-
 define Device/7links_wlr-12xx
   IMAGE_SIZE := 7872k
   DEVICE_VENDOR := 7Links
@@ -700,6 +683,8 @@ define Device/teltonika_rut9x1
   DEVICE_MODEL := RUT951
   DEVICE_ALT0_VENDOR := Teltonika
   DEVICE_ALT0_MODEL := RUT901
+  SUPPORTED_TELTONIKA_DEVICES := teltonika,rut9m
+  SUPPORTED_TELTONIKA_HW_MODS := 2c7c_6005 TLA2021 CH343 esim ala440
   IMAGE_SIZE := 15424k
   BLOCKSIZE := 64k
   DEVICE_PACKAGES := uqmi kmod-mt76x2 kmod-usb2 kmod-usb-ohci \
@@ -707,8 +692,7 @@ define Device/teltonika_rut9x1
 	kmod-i2c-mt7628 kmod-usb-net-cdc-ether
   IMAGES += factory.bin
   IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
-	append-rootfs | pad-rootfs | check-size | append-teltonika-metadata rut9m \
-	"mod1":"2c7c_6005" "mod2":"TLA2021" "mod3":"CH343" "mod4":"esim" "mod5":"ala440"
+	append-rootfs | pad-rootfs | check-size | append-teltonika-metadata
   IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 TARGET_DEVICES += teltonika_rut9x1
@@ -718,6 +702,8 @@ define Device/teltonika_rut9x6
   DEVICE_MODEL := RUT956
   DEVICE_ALT0_VENDOR := Teltonika
   DEVICE_ALT0_MODEL := RUT906
+  SUPPORTED_TELTONIKA_DEVICES := teltonika,rut9m
+  SUPPORTED_TELTONIKA_HW_MODS := 2c7c_6005 TLA2021 CH343 esim ala440
   IMAGE_SIZE := 15424k
   BLOCKSIZE := 64k
   DEVICE_PACKAGES := uqmi kmod-mt76x2 kmod-usb2 kmod-usb-ohci \
@@ -725,8 +711,7 @@ define Device/teltonika_rut9x6
 	kmod-hwmon-mcp3021 kmod-scsi-core kmod-usb-storage kmod-usb-acm kmod-usb-net-cdc-ether
   IMAGES += factory.bin
   IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
-	append-rootfs | pad-rootfs | check-size | append-teltonika-metadata rut9m \
-	"mod1":"2c7c_6005" "mod2":"TLA2021" "mod3":"CH343" "mod4":"esim" "mod5":"ala440"
+	append-rootfs | pad-rootfs | check-size | append-teltonika-metadata
   IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 TARGET_DEVICES += teltonika_rut9x6
@@ -1407,11 +1392,12 @@ define Device/teltonika_rut200
   DEVICE_VENDOR := Teltonika
   DEVICE_MODEL := RUT200
   DEVICE_VARIANT := v1-v4
+  SUPPORTED_TELTONIKA_DEVICES := teltonika,rut2m
   IMAGE_SIZE := 15424k
   BLOCKSIZE := 64k
   DEVICE_PACKAGES +=kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-usb-serial-option kmod-usb-net-cdc-ether
   IMAGES += factory.bin
-  IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-teltonika-metadata rut2m
+  IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-teltonika-metadata
   IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 TARGET_DEVICES += teltonika_rut200
@@ -1420,11 +1406,12 @@ define Device/teltonika_rut241
   DEVICE_VENDOR := Teltonika
   DEVICE_MODEL := RUT241
   DEVICE_VARIANT := v1-v4
+  SUPPORTED_TELTONIKA_DEVICES := teltonika,rut2m
   IMAGE_SIZE := 15424k
   BLOCKSIZE := 64k
   DEVICE_PACKAGES += uqmi kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-usb-serial-option
   IMAGES += factory.bin
-  IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-teltonika-metadata rut2m
+  IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-teltonika-metadata
   IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size | append-metadata
 endef
 TARGET_DEVICES += teltonika_rut241



From lede-commits at lists.infradead.org  Sun Aug 24 09:00:19 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 12:00:19 -0400
Subject: [openwrt/openwrt]  mediatek: filogic: add Teltonika RUTC50 support
In-Reply-To: <175605121885.3992801.10034360838577410347@git-01.infra.openwrt.org>
References: <175605121885.3992801.10034360838577410347@git-01.infra.openwrt.org>
Message-ID: <mailman.128783.1756051222.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/69a8c7f71a3fd69a4ef853d340dac3d8bee05490

commit 69a8c7f71a3fd69a4ef853d340dac3d8bee05490
Author: Simonas Tamo?aitis <simsasss at gmail.com>
AuthorDate: Tue May 13 05:56:33 2025 +0300

    mediatek: filogic: add Teltonika RUTC50 support
    
    Specification:
    - MediaTek MT7981A SoC
    - 512 MB RAM
    - 16MB SPI NOR Flash
    - 512MB NAND (split in half for firmware fallback)
    - 5x 10/100/1000 Mbps Ethernet, with passive PoE support on LAN1
    - WLAN      : MediaTek dual-band WiFi 6
      - 2.4 GHz : b/g/n/ax, MIMO 2x2
      - 5 GHz   : a/n/ac/ax, MIMO 2x2
    - Quectel RG520N-EB 5G R16 modem
    - 2.0 USB Type-A HOST port
    - 1x Digital input
    - 1x Digital output
    - 2x SIM slot (can be swapped via AT commands)
    
    GPIO:
    - 1 button (Reset)
    - 13 LEDs (power, 4x WAN status, Wifi 2G, Wifi 5G, 3G, 4G, 5G, RSSI 1,2,3)
    - 3 Modem control (power button, reset, status)
    - 1 USB reset
    - 1 Digital input
    - 1 Digital output
    
    Flashing via OEM WebUI:
    1. Download the firmware image *-squashfs-factory.bin
    2. Upload firmware image via OEM WebUI firmware update, do not keep settings
    
    To revert back to OEM firmware:
    https://wiki.teltonika-networks.com/view/Bootloader_menu
    
    Use "ModemManager" to establish mobile data connection.
    
    Signed-off-by: Simonas Tamo?aitis <simsasss at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19401
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../uboot-envtools/files/mediatek_filogic          |   4 +
 .../mediatek/dts/mt7981a-teltonika-rutc50.dts      | 535 +++++++++++++++++++++
 .../filogic/base-files/etc/board.d/01_leds         |   4 +
 .../base-files/etc/board.d/03_gpio_switches        |   4 +
 .../filogic/base-files/etc/init.d/bootcount        |  22 +
 .../filogic/base-files/lib/upgrade/platform.sh     |   4 +
 target/linux/mediatek/image/filogic.mk             |  20 +
 7 files changed, 593 insertions(+)

diff --git a/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic
index 007fc2ffb6..d07a3d1dcf 100644
--- a/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic
+++ b/package/boot/uboot-tools/uboot-envtools/files/mediatek_filogic
@@ -127,6 +127,10 @@ tplink,archer-ax80-v1)
 ubnt,unifi-6-plus)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x10000"
 	;;
+teltonika,rutc50)
+	local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
+	ubootenv_add_uci_config "$envdev" "0x0" "0x10000" "0x10000"
+	;;
 xiaomi,mi-router-ax3000t|\
 xiaomi,mi-router-wr30u-stock|\
 xiaomi,redmi-router-ax6000-stock)
diff --git a/target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts b/target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts
new file mode 100644
index 0000000000..77be140e93
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981a-teltonika-rutc50.dts
@@ -0,0 +1,535 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+#include "mt7981b.dtsi"
+
+/ {
+	model = "Teltonika RUTC50";
+	compatible = "teltonika,rutc50", "mediatek,mt7981";
+
+	aliases {
+		serial0 = &uart0;
+		label-mac-device = &gmac0;
+		led-boot = &power;
+		led-failsafe = &power;
+		led-running = &power;
+		led-upgrade = &power;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	memory at 40000000 {
+		reg = <0 0x40000000 0 0x10000000>;
+		device_type = "memory";
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 6 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	gpio-export {
+		compatible = "gpio-export";
+
+		gpio_pcie_reset {
+			gpio-export,name = "pcie_reset";
+			gpio-export,output = <1>;
+			gpios = <&pio 3 GPIO_ACTIVE_LOW>;
+		};
+
+		gpio_modem_power {
+			gpio-export,name = "modem_power";
+			gpio-export,output = <0>;
+			gpios = <&pio 9 GPIO_ACTIVE_HIGH>;
+		};
+
+		gpio_modem_reset {
+			gpio-export,name = "modem_reset";
+			gpio-export,output = <0>;
+			gpios = <&pio 10 GPIO_ACTIVE_HIGH>;
+		};
+
+		gpio_modem_status {
+			gpio-export,name = "modem_status";
+			gpio-export,input = <0>;
+			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
+		};
+
+		gpio_digital_input {
+			gpio-export,name = "digital_input";
+			gpio-export,input = <0>;
+			gpios = <&pio 12 GPIO_ACTIVE_HIGH>;
+		};
+
+		gpio_digital_output {
+			gpio-export,name = "digital_output";
+			gpio-export,output = <0>;
+			gpios = <&pio 35 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		power: power {
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 15 GPIO_ACTIVE_LOW>;
+		};
+
+		wan_eth {
+			function = "wan-eth";
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 0 GPIO_ACTIVE_HIGH>;
+		};
+
+		wan_wifi {
+			function = "wan-wifi";
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 1 GPIO_ACTIVE_HIGH>;
+		};
+
+		wan_sim1 {
+			function = "wan-sim1";
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio_hc595 0 GPIO_ACTIVE_HIGH>;
+		};
+
+		wan_sim2 {
+			function = "wan-sim2";
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio_hc595 7 GPIO_ACTIVE_HIGH>;
+		};
+
+		wifi_2g {
+			function = LED_FUNCTION_WLAN_2GHZ;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 14 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "phy0tpt";
+		};
+
+		wifi_5g {
+			function = LED_FUNCTION_WLAN_5GHZ;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&pio 5 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
+		};
+
+		3G {
+			function = "3G";
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio_hc595 6 GPIO_ACTIVE_HIGH>;
+		};
+
+		4G {
+			function = "4G";
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio_hc595 5 GPIO_ACTIVE_HIGH>;
+		};
+
+		5G {
+			function = "5G";
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio_hc595 4 GPIO_ACTIVE_HIGH>;
+		};
+
+		rssi1 {
+			function = "rssi-1";
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio_hc595 3 GPIO_ACTIVE_HIGH>;
+		};
+
+		rssi2 {
+			function = "rssi-2";
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio_hc595 2 GPIO_ACTIVE_HIGH>;
+		};
+
+		rssi3 {
+			function = "rssi-3";
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio_hc595 1 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	watchdog {
+		compatible = "linux,wdt-gpio";
+		gpios = <&pio 2 GPIO_ACTIVE_HIGH>;
+		hw_algo = "toggle";
+		hw_margin_ms = <1000>;
+	};
+};
+
+&eth {
+	pinctrl-names = "default";
+	pinctrl-0 = <&gbe_led0_pins>, <&gbe_led1_pins>;
+	status = "okay";
+
+	gmac0: mac at 0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "2500base-x";
+		nvmem-cells = <&macaddr_config_0 0>;
+		nvmem-cell-names = "mac-address";
+
+		fixed-link {
+			speed = <2500>;
+			full-duplex;
+			pause;
+		};
+	};
+
+	gmac1: mac at 1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		label = "wan";
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+		nvmem-cells = <&macaddr_config_0 1>;
+		nvmem-cell-names = "mac-address";
+	};
+};
+
+&int_gbe_phy_led0{
+	function = LED_FUNCTION_WAN;
+	color = <LED_COLOR_ID_AMBER>;
+	status = "okay";
+};
+
+&int_gbe_phy_led1{
+	function = LED_FUNCTION_WAN;
+	color = <LED_COLOR_ID_GREEN>;
+	status = "okay";
+};
+
+&mdio_bus {
+	switch: switch at 1f {
+		compatible = "mediatek,mt7531";
+		reg = <31>;
+		reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
+		interrupt-controller;
+		#interrupt-cells = <1>;
+		interrupt-parent = <&pio>;
+		interrupts = <38 IRQ_TYPE_LEVEL_HIGH>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+				phy-handle = <&swphy0>;
+				label = "lan4";
+			};
+
+			port at 1 {
+				reg = <1>;
+				phy-handle = <&swphy1>;
+				label = "lan3";
+			};
+
+			port at 2 {
+				reg = <2>;
+				phy-handle = <&swphy2>;
+				label = "lan2";
+			};
+
+			port at 3 {
+				reg = <3>;
+				phy-handle = <&swphy3>;
+				label = "lan1";
+			};
+
+			port at 6 {
+				reg = <6>;
+				label = "cpu";
+				ethernet = <&gmac0>;
+				phy-mode = "2500base-x";
+
+				fixed-link {
+					speed = <2500>;
+					full-duplex;
+					pause;
+				};
+			};
+		};
+
+		mdio {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			swphy0: phy at 0 {
+				reg = <0>;
+
+				mediatek,led-config = <
+					0x21 0x8009 /* BASIC_CTRL */
+					0x22 0x0c00 /* ON_DURATION */
+					0x23 0x1400 /* BLINK_DURATION */
+					0x24 0xc001 /* LED0_ON_CTRL */
+					0x25 0x0003 /* LED0_BLINK_CTRL */
+					0x26 0xc006 /* LED1_ON_CTRL */
+					0x27 0x003c /* LED1_BLINK_CTRL */
+				>;
+			};
+
+			swphy1: phy at 1 {
+				reg = <1>;
+			};
+
+			swphy2: phy at 2 {
+				reg = <2>;
+			};
+
+			swphy3: phy at 3 {
+				reg = <3>;
+			};
+		};
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	status = "okay";
+
+	spi_nand at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-nand";
+		reg = <0>;
+
+		spi-max-frequency = <52000000>;
+		spi-tx-buswidth = <4>;
+		spi-rx-buswidth = <4>;
+
+		mediatek,nmbm;
+		mediatek,bmt-max-ratio = <1>;
+		mediatek,bmt-max-reserved-blocks = <64>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "rutos-a";
+				reg = <0x00000000 0x10000000>;
+			};
+
+			partition at 10000000 {
+				label = "rutos-b";
+				reg = <0x10000000 0x10000000>;
+			};
+		};
+	};
+};
+
+&spi1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spic_pins>;
+	status = "okay";
+
+	gpio_hc595: gpio_hc595 at 0 {
+		compatible = "fairchild,74hc595";
+		reg = <0>;
+		gpio-controller;
+		#gpio-cells = <2>;
+		registers-number = <1>;
+		spi-max-frequency = <10000000>;
+		enable-gpios = <&pio 4 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&spi2 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi2_flash_pins>;
+	status = "okay";
+
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+
+		spi-max-frequency = <4000000>;
+		spi-tx-buswidth = <4>;
+		spi-rx-buswidth = <4>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 00000 {
+				label = "bl2";
+				reg = <0x00000 0x0040000>;
+				read-only;
+			};
+
+			partition at 40000 {
+				label = "u-boot-env";
+				reg = <0x40000 0x0010000>;
+			};
+
+			factory: partition at 50000 {
+				label = "factory";
+				reg = <0x50000 0x00A0000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory_0: eeprom at 0 {
+						reg = <0x0 0x1000>;
+					};
+				};
+			};
+
+			config: partition at f0000	{
+				compatible = "nvmem-cells";
+				#address-cells = <1>;
+				#size-cells = <1>;
+
+				label = "config";
+				reg = <0xF0000 0x0010000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_config_0: macaddr at 0 {
+						compatible = "mac-base";
+						reg = <0x0 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+
+			boot: partition at 100000 {
+				label = "fip";
+				reg = <0x100000 0x0100000>;
+				read-only;
+			};
+
+			partition at 200000 {
+				label = "bootconfig-a";
+				reg = <0x200000 0x010000>;
+			};
+
+			partition at 210000 {
+				label = "bootconfig-b";
+				reg = <0x210000 0x010000>;
+			};
+
+			partition at 220000 {
+				label = "event-log";
+				reg = <0x220000 0x090000>;
+			};
+
+			partition at 2B0000 {
+				label = "recovery";
+				reg = <0x2B0000 0xD50000>;
+			};
+		};
+	};
+};
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+
+		conf-pu {
+			pins = "SPI0_CS", "SPI0_HOLD", "SPI0_WP";
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+		};
+
+		conf-pd {
+			pins = "SPI0_CLK", "SPI0_MOSI", "SPI0_MISO";
+			drive-strength = <MTK_DRIVE_4mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+		};
+	};
+
+	spic_pins: spi1-pins {
+		mux {
+			function = "spi";
+			groups = "spi1_1";
+		};
+	};
+
+	spi2_flash_pins: spi2-pins {
+		mux {
+			function = "spi";
+			groups = "spi2", "spi2_wp_hold";
+		};
+
+		conf-pu {
+			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
+		};
+
+		conf-pd {
+			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
+			drive-strength = <MTK_DRIVE_8mA>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
+		};
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&usb_phy {
+	status = "okay";
+};
+
+&xhci {
+	status = "okay";
+};
+
+&wifi {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	status = "okay";
+	nvmem-cells = <&eeprom_factory_0>;
+	nvmem-cell-names = "eeprom";
+
+	band at 0 {
+		reg = <0>;
+		nvmem-cells = <&macaddr_config_0 2>;
+		nvmem-cell-names = "mac-address";
+	};
+
+	band at 1 {
+		reg = <1>;
+		nvmem-cells = <&macaddr_config_0 3>;
+		nvmem-cell-names = "mac-address";
+	};
+};
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
index 878b1367a0..b590ddb7e0 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
@@ -199,6 +199,10 @@ smartrg,sdg-8733a)
 	ucidef_set_led_netdev "wan-orange" "WAN" "mdio-bus:08:orange:wan" "wan" "link_100 link_1000"
 	ucidef_set_led_netdev "wan-white" "WAN" "mdio-bus:08:white:wan" "wan" "link_10000"
 	;;
+teltonika,rutc50)
+	ucidef_set_led_netdev "wan-green" "WAN" "mdio-bus:00:green:wan" "wan" "link_1000 tx rx"
+	ucidef_set_led_netdev "wan-amber" "WAN" "mdio-bus:00:amber:wan" "wan" "link_100 link_10 tx rx"
+	;;
 tplink,fr365-v1)
 	ucidef_set_led_netdev "port2-green-act" "port-2" "green:port2_act" "port2" "link tx rx"
 	ucidef_set_led_netdev "port1-green-act" "port-1" "green:sfp" "port1" "link tx rx"
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/03_gpio_switches b/target/linux/mediatek/filogic/base-files/etc/board.d/03_gpio_switches
index e2fe814439..89889967a2 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/03_gpio_switches
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/03_gpio_switches
@@ -8,6 +8,10 @@ case "$board" in
 huasifei,wh3000-pro)
 	ucidef_add_gpio_switch "modem_power" "Modem power" "modem_power" "0"
 	;;
+teltonika,rutc50)
+	ucidef_add_gpio_switch "modem_power" "Modem power button" "modem_power" "1"
+	ucidef_add_gpio_switch "modem_reset" "Modem reset" "modem_reset" "0"
+	;;
 zbtlink,zbt-z8102ax|\
 zbtlink,zbt-z8102ax-v2)
 	ucidef_add_gpio_switch "5g1" "Power 1st modem" "5g1" "1"
diff --git a/target/linux/mediatek/filogic/base-files/etc/init.d/bootcount b/target/linux/mediatek/filogic/base-files/etc/init.d/bootcount
index a0e7d40862..415674322f 100755
--- a/target/linux/mediatek/filogic/base-files/etc/init.d/bootcount
+++ b/target/linux/mediatek/filogic/base-files/etc/init.d/bootcount
@@ -23,6 +23,28 @@ boot() {
 		EOF
 		logger "bootcount: rd23 model detected, nvram was updated"
 		;;
+	teltonika,rutc50)
+		#Bootloader expect successfull startup value after update, we need to write success value to bootconfig partition
+		#otherwise bootloader will fallback to previous root partition
+		. /lib/functions.sh
+		local PART="$(cmdline_get_var ubi.mtd)"
+		local MTD_INDEX=$(find_mtd_index bootconfig-a)
+
+		case "$PART" in
+		rutos-a)
+			[ "$(md5sum /dev/mtd$MTD_INDEX | awk '{print $1}')" = "adc4a78e76efc6b4afdc41925e4017c6" ] || {
+				logger -t "bootcount" "saving new failsafe boot config in /dev/mtd$MTD_INDEX bootconfig-a partition rutos-a"
+				echo -ne "\xe1\xb0\xba\xba\x01\x00\xf9\x01\xf8\x01\xf0\x00\x3d\xd4\xfb\x95" | mtd -e bootconfig-a write - bootconfig-a
+			}
+			;;
+		rutos-b)
+			[ "$(md5sum /dev/mtd$MTD_INDEX | awk '{print $1}')" = "2904b3476604ef153d1925acdde062e8" ] || {
+				logger -t "bootcount" "saving new failsafe boot config in /dev/mtd$MTD_INDEX bootconfig-a partition rutos-b"
+				echo -ne "\xe1\xb0\xba\xba\x01\x01\xf7\x01\xf8\x00\xf0\x00\xce\xd4\x44\x08" | mtd -e bootconfig-a write - bootconfig-a
+				}
+			;;
+		esac
+		;;
 	zyxel,ex5700-telenor)
 		fw_setenv uboot_bootcount 0
 		;;
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index 4f29f2be42..a29ad2a6f6 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -174,6 +174,10 @@ platform_do_upgrade() {
 		CI_ROOTPART="rootfs"
 		nand_do_upgrade "$1"
 		;;
+	teltonika,rutc50)
+		CI_UBIPART="$(cmdline_get_var ubi.mtd)"
+		nand_do_upgrade "$1"
+		;;
 	nradio,c8-668gl)
 		CI_DATAPART="rootfs_data"
 		CI_KERNPART="kernel_2nd"
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 1374f8f1f8..4443948b67 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -1,4 +1,6 @@
 DTS_DIR := $(DTS_DIR)/mediatek
+DEVICE_VARS += SUPPORTED_TELTONIKA_DEVICES
+DEVICE_VARS += SUPPORTED_TELTONIKA_HW_MODS
 
 define Image/Prepare
 	# For UBI we want only one extra block
@@ -1869,6 +1871,24 @@ define Device/snr_snr-cpe-ax2
 endef
 TARGET_DEVICES += snr_snr-cpe-ax2
 
+define Device/teltonika_rutc50
+  DEVICE_VENDOR := Teltonika
+  DEVICE_MODEL := RUTC50
+  SUPPORTED_TELTONIKA_DEVICES := teltonika,rutc
+  DEVICE_DTS := mt7981a-teltonika-rutc50
+  DEVICE_DTS_DIR := ../dts
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  KERNEL_IN_UBI := 1
+  UBINIZE_OPTS := -E 5
+  DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 kmod-usb-net-qmi-wwan \
+  kmod-usb-serial-option kmod-gpio-nxp-74hc164
+  IMAGES += factory.bin
+  IMAGE/factory.bin := append-ubi | append-teltonika-metadata
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += teltonika_rutc50
+
 define Device/tenbay_wr3000k
   DEVICE_VENDOR := Tenbay
   DEVICE_MODEL := WR3000K



From lede-commits at lists.infradead.org  Sun Aug 24 10:46:40 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 13:46:40 -0400
Subject: [openwrt/openwrt]  kernel: add NILFS2 fs module
In-Reply-To: <175605760028.168458.2292359967899402845@git-01.infra.openwrt.org>
References: <175605760028.168458.2292359967899402845@git-01.infra.openwrt.org>
Message-ID: <mailman.128798.1756057603.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2b5119e355d9b59181626479f6aa4ef6405690bf

commit 2b5119e355d9b59181626479f6aa4ef6405690bf
Author: Pavlo Samko <bulldozerbsg at gmail.com>
AuthorDate: Fri Mar 14 19:39:31 2025 +0200

    kernel: add NILFS2 fs module
    
    NILFS is a log-structured file system developed for Linux.
    NILFS provides versioning capability of an entire file system
    and continuous snapshotting that allows users to restore files
    mistakenly overwritten or destroyed a while ago.
    
    Signed-off-by: Pavlo Samko <bulldozerbsg at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18247
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/fs.mk | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/package/kernel/linux/modules/fs.mk b/package/kernel/linux/modules/fs.mk
index d818b21d99..32114024e7 100644
--- a/package/kernel/linux/modules/fs.mk
+++ b/package/kernel/linux/modules/fs.mk
@@ -440,6 +440,22 @@ endef
 $(eval $(call KernelPackage,fs-netfs))
 
 
+define KernelPackage/fs-nilfs2
+  SUBMENU:=$(FS_MENU)
+  TITLE:=NILFS2 filesystem support
+  KCONFIG:=CONFIG_NILFS2_FS
+  FILES:=$(LINUX_DIR)/fs/nilfs2/nilfs2.ko
+  AUTOLOAD:=$(call AutoLoad,30,nilfs2)
+  $(call AddDepends/nls)
+endef
+
+define KernelPackage/fs-nilfs2/description
+ Kernel module for NILFS2 filesystem support
+endef
+
+$(eval $(call KernelPackage,fs-nilfs2))
+
+
 define KernelPackage/fs-nfs
   SUBMENU:=$(FS_MENU)
   TITLE:=NFS filesystem client support



From lede-commits at lists.infradead.org  Sun Aug 24 10:46:41 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 13:46:41 -0400
Subject: [openwrt/openwrt]  nilfs-utils: add userspace utilities for NILFS2
In-Reply-To: <175605760028.168458.2292359967899402845@git-01.infra.openwrt.org>
References: <175605760028.168458.2292359967899402845@git-01.infra.openwrt.org>
Message-ID: <mailman.128799.1756057603.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/73a7466e41f386f8bd30fa4b59b246dfe8f4d4e4

commit 73a7466e41f386f8bd30fa4b59b246dfe8f4d4e4
Author: Pavlo Samko <bulldozerbsg at gmail.com>
AuthorDate: Fri Mar 14 19:48:35 2025 +0200

    nilfs-utils: add userspace utilities for NILFS2
    
    NILFS is a log-structured file system developed for Linux.
    NILFS provides versioning capability of an entire file system
    and continuous snapshotting that allows users to restore files
    mistakenly overwritten or destroyed a while ago.
    
    Signed-off-by: Pavlo Samko <bulldozerbsg at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18247
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/utils/nilfs-utils/Makefile | 204 +++++++++++++++++++++++++++++++++++++
 1 file changed, 204 insertions(+)

diff --git a/package/utils/nilfs-utils/Makefile b/package/utils/nilfs-utils/Makefile
new file mode 100644
index 0000000000..17b23b9e25
--- /dev/null
+++ b/package/utils/nilfs-utils/Makefile
@@ -0,0 +1,204 @@
+#
+# Copyright (C) 2025 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=nilfs-utils
+PKG_VERSION:=2.2.11
+PKG_RELEASE:=1
+PKG_URL:=https://nilfs.sourceforge.io
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=https://nilfs.sourceforge.io/download/
+PKG_HASH:=8602897ff0d2c49be9bc76311f0b102088e58b6de4f749009403de06ff2c34cd
+
+PKG_MAINTAINER:=Pavlo Samko <bulldozerbsg at gmail.com>
+PKG_LICENSE:=GPL-2.0
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:nilf:nilfs
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/nilfs-mkfs
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Filesystem
+  TITLE:=create a NILFS2 filesystem
+  DEPENDS:=+libuuid +libblkid
+endef
+
+define Package/nilfs-cleanerd
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Filesystem
+  TITLE:=NILFS2 garbage collector daemon
+  DEPENDS:=+libuuid @KERNEL_POSIX_MQUEUE
+endef
+
+define Package/nilfs-mount
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Filesystem
+  TITLE:=mount, unmount a NILFS2 file system
+  DEPENDS:=+libmount +libblkid +nilfs-cleanerd
+endef
+
+define Package/libnilfs
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=libnilfs
+endef
+
+define Package/libnilfsgc
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=libnilfsgc
+  DEPENDS:=+libnilfs
+endef
+
+define Package/libnilfscleaner
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE:=libnilfscleaner
+  DEPENDS:=+libuuid +nilfs-cleanerd @KERNEL_POSIX_MQUEUE
+endef
+
+define Package/nilfs-clean
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Filesystem
+  TITLE:=run garbage collector on NILFS file system
+  DEPENDS:=+libnilfs +libnilfscleaner
+endef
+
+define Package/nilfs-resize
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Filesystem
+  TITLE:=resize NILFS file system volume size
+  DEPENDS:=+libnilfs +libnilfsgc
+endef
+
+define Package/nilfs-tune
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Filesystem
+  TITLE:=adjust tunable file system parameters on NILFS file system
+  DEPENDS:=+libnilfs
+endef
+
+define Package/nilfs-checkpoint
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Filesystem
+  TITLE:=make, change, remove, list a NILFS2 checkpoint
+  DEPENDS:=+libnilfs
+endef
+
+define Package/nilfs-dumpseg
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Filesystem
+  TITLE:=print segment information of NILFS2
+  DEPENDS:=+libnilfs
+endef
+
+define Package/nilfs-lssu
+  SECTION:=utils
+  CATEGORY:=Utilities
+  SUBMENU:=Filesystem
+  TITLE:=list usage state of NILFS2 segments
+  DEPENDS:=+libnilfs +libnilfsgc
+endef
+
+# libmount is used and support of the selinux context mount options
+# depends on the libmount that distro provides.
+CONFIGURE_ARGS += \
+	--without-selinux
+
+define Package/nilfs-mkfs/install
+	$(INSTALL_DIR) $(1)/sbin
+	$(CP) $(PKG_INSTALL_DIR)/sbin/mkfs.nilfs2 $(1)/sbin/
+endef
+
+define Package/nilfs-cleanerd/install
+	$(INSTALL_DIR) $(1)/etc
+	$(CP) $(PKG_INSTALL_DIR)/etc/nilfs_cleanerd.conf $(1)/etc/
+
+	$(INSTALL_DIR) $(1)/sbin
+	$(CP) $(PKG_INSTALL_DIR)/sbin/nilfs_cleanerd $(1)/sbin/
+endef
+
+define Package/nilfs-mount/install
+	$(INSTALL_DIR) $(1)/sbin
+	$(CP) $(PKG_INSTALL_DIR)/sbin/mount.nilfs2 $(1)/sbin/
+	$(CP) $(PKG_INSTALL_DIR)/sbin/umount.nilfs2 $(1)/sbin/
+endef
+
+define Package/libnilfs/install
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnilfs.so* $(1)/usr/lib/
+endef
+
+define Package/libnilfsgc/install
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnilfsgc.so* $(1)/usr/lib/
+endef
+
+define Package/libnilfscleaner/install
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libnilfscleaner.so* $(1)/usr/lib/
+endef
+
+define Package/nilfs-clean/install
+	$(INSTALL_DIR) $(1)/usr/sbin
+	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/nilfs-clean $(1)/usr/sbin/
+endef
+
+define Package/nilfs-resize/install
+	$(INSTALL_DIR) $(1)/usr/sbin
+	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/nilfs-resize $(1)/usr/sbin/
+endef
+
+define Package/nilfs-tune/install
+	$(INSTALL_DIR) $(1)/usr/sbin
+	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/nilfs-tune $(1)/usr/sbin/
+endef
+
+define Package/nilfs-checkpoint/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/chcp $(1)/usr/bin/
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/lscp $(1)/usr/bin/
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/mkcp $(1)/usr/bin/
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/rmcp $(1)/usr/bin/
+endef
+
+define Package/nilfs-dumpseg/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/dumpseg $(1)/usr/bin/
+endef
+
+define Package/nilfs-lssu/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/lssu $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,nilfs-mkfs))
+$(eval $(call BuildPackage,nilfs-cleanerd))
+$(eval $(call BuildPackage,nilfs-mount))
+$(eval $(call BuildPackage,libnilfs))
+$(eval $(call BuildPackage,libnilfsgc))
+$(eval $(call BuildPackage,libnilfscleaner))
+$(eval $(call BuildPackage,nilfs-clean))
+$(eval $(call BuildPackage,nilfs-resize))
+$(eval $(call BuildPackage,nilfs-tune))
+$(eval $(call BuildPackage,nilfs-checkpoint))
+$(eval $(call BuildPackage,nilfs-dumpseg))
+$(eval $(call BuildPackage,nilfs-lssu))



From lede-commits at lists.infradead.org  Sun Aug 24 10:53:59 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 24 Aug 2025 13:53:59 -0400
Subject: [openwrt/openwrt]  mediatek: remove the aquantia kmod from filogic
 mediatek platforms
In-Reply-To: <175605803930.196627.8600261508724145856@git-01.infra.openwrt.org>
References: <175605803930.196627.8600261508724145856@git-01.infra.openwrt.org>
Message-ID: <mailman.128802.1756058043.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/57a127c9e79db96f4dbf262db9e1a808bd474ddf

commit 57a127c9e79db96f4dbf262db9e1a808bd474ddf
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Mon Jul 21 19:54:43 2025 +0200

    mediatek: remove the aquantia kmod from filogic mediatek platforms
    
    The kmod is installed on all filogic mediatek images, even for devices
    that do not have any aquantia hardware. Remove it.
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19488
    [Do not explicitly remove kmod-phy-aquantia from gatonetworks_gdsp]
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/mediatek/filogic/target.mk | 2 +-
 target/linux/mediatek/image/filogic.mk  | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/target/linux/mediatek/filogic/target.mk b/target/linux/mediatek/filogic/target.mk
index 52ce25de1e..1df1acc695 100644
--- a/target/linux/mediatek/filogic/target.mk
+++ b/target/linux/mediatek/filogic/target.mk
@@ -2,7 +2,7 @@ ARCH:=aarch64
 SUBTARGET:=filogic
 BOARDNAME:=Filogic 8x0 (MT798x)
 CPU_TYPE:=cortex-a53
-DEFAULT_PACKAGES += fitblk kmod-phy-aquantia kmod-crypto-hw-safexcel wpad-basic-mbedtls uboot-envtools
+DEFAULT_PACKAGES += fitblk kmod-crypto-hw-safexcel wpad-basic-mbedtls uboot-envtools
 KERNELNAME:=Image dtbs
 DEFAULT_PROFILE:=openwrt_one
 
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 4443948b67..2799353beb 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -1050,7 +1050,7 @@ define Device/gatonetworks_gdsp
   DEVICE_PACKAGES := e2fsprogs f2fsck mkf2fs fitblk \
     kmod-mt7915e kmod-mt7981-firmware \
     kmod-usb-net-qmi-wwan kmod-usb-serial-option kmod-usb3 \
-    mt7981-wo-firmware -kmod-phy-aquantia
+    mt7981-wo-firmware
   ARTIFACTS := preloader.bin bl31-uboot.fip sdcard.img.gz
   ARTIFACT/preloader.bin := mt7981-bl2 nor-ddr3
   ARTIFACT/bl31-uboot.fip := mt7981-bl31-uboot gatonetworks_gdsp
@@ -1454,7 +1454,7 @@ define Device/mediatek_mt7988a-rfb
   DEVICE_DTS_DIR := $(DTS_DIR)/
   DEVICE_DTC_FLAGS := --pad 4096
   DEVICE_DTS_LOADADDR := 0x45f00000
-  DEVICE_PACKAGES := mt7988-2p5g-phy-firmware kmod-sfp
+  DEVICE_PACKAGES := mt7988-2p5g-phy-firmware kmod-sfp kmod-phy-aquantia
   KERNEL_LOADADDR := 0x46000000
   KERNEL := kernel-bin | gzip
   KERNEL_INITRAMFS := kernel-bin | lzma | \



From lede-commits at lists.infradead.org  Mon Aug 25 01:21:37 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 25 Aug 2025 04:21:37 -0400
Subject: [openwrt/openwrt]  ath79: iodata: extract calibration with nvmem
In-Reply-To: <175611009729.3042195.9042436052511274981@git-01.infra.openwrt.org>
References: <175611009729.3042195.9042436052511274981@git-01.infra.openwrt.org>
Message-ID: <mailman.129104.1756111350.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5eef79a249017eafec422117412bc72a320edfe6

commit 5eef79a249017eafec422117412bc72a320edfe6
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Tue May 20 18:17:32 2025 -0700

    ath79: iodata: extract calibration with nvmem
    
    Userspace handling is deprecated.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18873
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts        | 13 ++++++++++++-
 target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi        |  7 ++++++-
 .../base-files/etc/hotplug.d/firmware/10-ath9k-eeprom       |  4 ----
 .../base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac      | 13 +++++++++----
 4 files changed, 27 insertions(+), 10 deletions(-)

diff --git a/target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts b/target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts
index e1d5f2dac1..6eb072ef2f 100644
--- a/target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts
+++ b/target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts
@@ -159,6 +159,16 @@
 				label = "art";
 				reg = <0xff0000 0x010000>;
 				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					cal_art_1000: calibration at 1000 {
+						reg = <0x1000 0x440>;
+					};
+				};
 			};
 		};
 	};
@@ -207,5 +217,6 @@
 &wmac {
 	status = "okay";
 
-	qca,no-eeprom;
+	nvmem-cells = <&cal_art_1000>;
+	nvmem-cell-names = "calibration";
 };
diff --git a/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi b/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi
index bdba469383..bc05ec559a 100644
--- a/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi
+++ b/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi
@@ -148,6 +148,10 @@
 					#address-cells = <1>;
 					#size-cells = <1>;
 
+					cal_art_1000: calibration at 1000 {
+						reg = <0x1000 0x440>;
+					};
+
 					cal_art_5000: calibration at 5000 {
 						reg = <0x5000 0x844>;
 					};
@@ -199,5 +203,6 @@
 &wmac {
 	status = "okay";
 
-	qca,no-eeprom;
+	nvmem-cells = <&cal_art_1000>;
+	nvmem-cell-names = "calibration";
 };
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
index 89cb3df6f2..f912ad4150 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom
@@ -45,10 +45,6 @@ case "$FIRMWARE" in
 		caldata_extract "art" 0x1000 0x440
 		ath9k_patch_mac $(mtd_get_mac_ascii cfg1 RADIOADDR1)
 		;;
-	iodata,wn-ac1167dgr|\
-	iodata,wn-ac1600dgr|\
-	iodata,wn-ac1600dgr2|\
-	iodata,wn-ag300dgr|\
 	sitecom,wlr-7100|\
 	sitecom,wlr-8100)
 		caldata_extract "art" 0x1000 0x440
diff --git a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 9b5593b972..1774b9f8f2 100644
--- a/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ath79/generic/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -73,18 +73,23 @@ case "$board" in
 		;;
 	iodata,wn-ac1167dgr|\
 	iodata,wn-ac1600dgr|\
-	iodata,wn-ac1600dgr2|\
-	sitecom,wlr-7100|\
-	sitecom,wlr-8100)
+	iodata,wn-ac1600dgr2)
 		# There is no eeprom data for 5 GHz wlan in "art" partition
 		# which would allow to patch the macaddress
 		[ "$PHYNBR" -eq 0 ] && \
 			macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
 		;;
+		[ "$PHYNBR" -eq 1 ] && \
+			macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 0 > /sys${DEVPATH}/macaddress
+		;;
 	iodata,wn-ag300dgr)
 		# There is no eeprom data for 5 GHz wlan in "art" partition
 		# which would allow to patch the macaddress
-		[ "$PHYNBR" -eq 1 ] && \
+		macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" $PHYNBR > /sys${DEVPATH}/macaddress
+		;;
+	sitecom,wlr-7100|\
+	sitecom,wlr-8100)
+		[ "$PHYNBR" -eq 0 ] && \
 			macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1 > /sys${DEVPATH}/macaddress
 		;;
 	nec,wf1200cr|\



From lede-commits at lists.infradead.org  Mon Aug 25 01:21:38 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 25 Aug 2025 04:21:38 -0400
Subject: [openwrt/openwrt]  ath79: iodata: set ath9k LED pin
In-Reply-To: <175611009729.3042195.9042436052511274981@git-01.infra.openwrt.org>
References: <175611009729.3042195.9042436052511274981@git-01.infra.openwrt.org>
Message-ID: <mailman.129105.1756111350.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/48c7a40745c076fb5b237b38b3cc2ec314b15f3e

commit 48c7a40745c076fb5b237b38b3cc2ec314b15f3e
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sun May 25 18:26:22 2025 -0700

    ath79: iodata: set ath9k LED pin
    
    The ath9k driver creates an ath9k LED by default. Instead of having a
    non functional LED, configure it properly and remove the extra as it's
    not needed.
    
    Set the pcie device to qcom,ath10k as the Documentation says, The pci
    line implies it's ath9k when it's actually ath10k.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18873
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts | 11 +++++------
 target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi | 13 ++++++-------
 2 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts b/target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts
index 6eb072ef2f..6e4ec5cbfe 100644
--- a/target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts
+++ b/target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts
@@ -40,12 +40,6 @@
 			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
 		};
 
-		wlan2g {
-			label = "green:wlan2g";
-			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy0tpt";
-		};
-
 		wlan5g {
 			label = "green:wlan5g";
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
@@ -219,4 +213,9 @@
 
 	nvmem-cells = <&cal_art_1000>;
 	nvmem-cell-names = "calibration";
+
+	led {
+		led-sources = <12>;
+		led-active-low;
+	};
 };
diff --git a/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi b/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi
index bc05ec559a..690e0918d9 100644
--- a/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi
+++ b/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi
@@ -35,12 +35,6 @@
 			linux,default-trigger = "phy0tpt";
 		};
 
-		wlan2g {
-			label = "green:wlan2g";
-			gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy1tpt";
-		};
-
 		notification {
 			label = "amber:notification";
 			gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
@@ -185,7 +179,7 @@
 	status = "okay";
 
 	wifi at 0,0 {
-		compatible = "pci168c,003c";
+		compatible = "qcom,ath10k";
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&cal_art_5000>;
 		nvmem-cell-names = "calibration";
@@ -205,4 +199,9 @@
 
 	nvmem-cells = <&cal_art_1000>;
 	nvmem-cell-names = "calibration";
+
+	led {
+		led-sources = <22>;
+		led-active-low;
+	};
 };



From lede-commits at lists.infradead.org  Mon Aug 25 01:30:33 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 25 Aug 2025 04:30:33 -0400
Subject: [openwrt/openwrt]  mold: Update to 2.40.4
In-Reply-To: <175611063304.3072930.1552358568372904008@git-01.infra.openwrt.org>
References: <175611063304.3072930.1552358568372904008@git-01.infra.openwrt.org>
Message-ID: <mailman.129128.1756111836.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b2277e9babb202f830bcb2b34ea3a59899c052c0

commit b2277e9babb202f830bcb2b34ea3a59899c052c0
Author: Carsten Schuette <schuettecarsten at googlemail.com>
AuthorDate: Sun Aug 24 16:07:25 2025 +0200

    mold: Update to 2.40.4
    
    Update mold to 2.40.4
    
    Release notes:
    https://github.com/rui314/mold/releases/tag/v2.40.4
    https://github.com/rui314/mold/releases/tag/v2.40.3
    https://github.com/rui314/mold/releases/tag/v2.40.2
    
    Signed-off-by: Carsten Schuette <schuettecarsten at googlemail.com>
    Link: https://github.com/openwrt/openwrt/pull/19846
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/mold/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/mold/Makefile b/tools/mold/Makefile
index 1bf8a888e0..8c3e33f38f 100644
--- a/tools/mold/Makefile
+++ b/tools/mold/Makefile
@@ -3,13 +3,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mold
-PKG_VERSION:=2.40.1
+PKG_VERSION:=2.40.4
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL_FILE:=v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/rui314/mold/archive/refs/tags
-PKG_HASH:=d1ce09a69941f8158604c3edcc96c7178231e7dba2da66b20f5ef6e112c443b7
+PKG_HASH:=69414c702ec1084e1fa8ca16da24f167f549e5e11e9ecd5d70a8dcda6f08c249
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk



From lede-commits at lists.infradead.org  Mon Aug 25 01:31:53 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 25 Aug 2025 04:31:53 -0400
Subject: [openwrt/openwrt]  ath79: dir-825-c1: set LED pin properly
In-Reply-To: <175611071309.3086857.17096637283559405655@git-01.infra.openwrt.org>
References: <175611071309.3086857.17096637283559405655@git-01.infra.openwrt.org>
Message-ID: <mailman.129155.1756111837.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/acc49770c2a8d2180b5a68b44fe9dda56079e2d9

commit acc49770c2a8d2180b5a68b44fe9dda56079e2d9
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat May 24 20:41:27 2025 -0700

    ath79: dir-825-c1: set LED pin properly
    
    The ath9k driver creates an ath9k LED by default. Instead of having a
    non functional LED, configure it properly and remove the extra as it's
    not needed.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18908
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts | 24 ++++++++++------------
 target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi   |  2 --
 2 files changed, 11 insertions(+), 15 deletions(-)

diff --git a/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts b/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts
index f0ca94f231..d99fd7714d 100644
--- a/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts
+++ b/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts
@@ -41,12 +41,6 @@
 			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
 		};
 
-		wlan2g {
-			label = "blue:wlan2g";
-			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy0tpt";
-		};
-
 		wps {
 			function = LED_FUNCTION_WPS;
 			color = <LED_COLOR_ID_BLUE>;
@@ -65,15 +59,19 @@
 			gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
 		};
 	};
+};
 
-	leds-ath9k {
-		compatible = "gpio-leds";
+&ath9k {
+	led {
+		led-sources = <0>;
+		led-active-low;
+	};
+};
 
-		wlan5g {
-			label = "blue:wlan5g";
-			gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy1tpt";
-		};
+&wmac {
+	led {
+		led-sources = <13>;
+		led-active-low;
 	};
 };
 
diff --git a/target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi b/target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi
index 3c718f5c6e..e4eda6cde7 100644
--- a/target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi
+++ b/target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi
@@ -65,8 +65,6 @@
 		   nvmem-cell-names = "mac-address", "calibration";
 		 */
 		qca,no-eeprom; /* remove this when "mac-address" works  */
-		gpio-controller;
-		#gpio-cells = <2>;
 	};
 };
 



From lede-commits at lists.infradead.org  Mon Aug 25 01:32:48 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 25 Aug 2025 04:32:48 -0400
Subject: [openwrt/openwrt]  ath79: wb2000: use led-sources for ath9k
In-Reply-To: <175611076889.3093293.14005650406807621553@git-01.infra.openwrt.org>
References: <175611076889.3093293.14005650406807621553@git-01.infra.openwrt.org>
Message-ID: <mailman.129169.1756112003.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f5930cb6b5136a275a23bfda59c2dd69883bc0a4

commit f5930cb6b5136a275a23bfda59c2dd69883bc0a4
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat May 24 18:14:47 2025 -0700

    ath79: wb2000: use led-sources for ath9k
    
    The ath9k driver creates an ath9k LED by default. Instead of having a
    non functional LED, configure it properly and remove the extra as it's
    not needed.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18906
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../linux/ath79/dts/ar9344_winchannel_wb2000.dts   | 27 ++++++++--------------
 1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
index 145ff0418e..43e4c7a44e 100644
--- a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
+++ b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts
@@ -38,12 +38,6 @@
 	leds {
 		compatible = "gpio-leds";
 
-		wlan2g {
-			label = "green:2g";
-			gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
-			linux,default-trigger = "phy0tpt";
-		};
-
 		usb {
 			function = LED_FUNCTION_USB;
 			color = <LED_COLOR_ID_GREEN>;
@@ -68,16 +62,6 @@
 			debounce-interval = <60>;
 		};
 	};
-
-	ath9k-leds {
-		compatible = "gpio-leds";
-
-		wlan {
-			label = "green:5g";
-			gpios = <&ath9k 6 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy1tpt";
-		};
-	};
 };
 
 &ref {
@@ -170,8 +154,11 @@
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&macaddr_addr_0 0x10>, <&calibration_art_5000>;
 		nvmem-cell-names = "mac-address", "calibration";
-		#gpio-cells = <2>;
-		gpio-controller;
+
+		led {
+			led-sources = <6>;
+			led-active-low;
+		};
 	};
 };
 
@@ -188,6 +175,10 @@
 
 	nvmem-cells = <&macaddr_addr_0 0>, <&calibration_art_1000>;
 	nvmem-cell-names = "mac-address", "calibration";
+
+	led {
+		led-sources = <20>;
+	};
 };
 
 &mdio0 {



From lede-commits at lists.infradead.org  Mon Aug 25 01:35:43 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 25 Aug 2025 04:35:43 -0400
Subject: [openwrt/openwrt]  ath79: compex_wpj531: remove wrong wifi device
In-Reply-To: <175611094351.3102204.15823765772946808943@git-01.infra.openwrt.org>
References: <175611094351.3102204.15823765772946808943@git-01.infra.openwrt.org>
Message-ID: <mailman.129194.1756112036.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/26a371303fde40f8dc74b2cd8feadb90ab241df4

commit 26a371303fde40f8dc74b2cd8feadb90ab241df4
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat Jun 7 19:47:04 2025 -0700

    ath79: compex_wpj531: remove wrong wifi device
    
    This device does not come with a pci card. It has a slot where one can
    get supplied. What's more, nvmem or ieee80211 frequency limits are not
    applied here. It can just get removed.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18920
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts b/target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts
index 5506da5125..4de17176a0 100644
--- a/target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts
+++ b/target/linux/ath79/dts/qca9531_compex_wpj531-16m.dts
@@ -147,11 +147,6 @@
 
 &pcie0 {
 	status = "okay";
-
-	wifi at 0,0 {
-		compatible = "pci168c,003c";
-		reg = <0x0000 0 0 0 0>;
-	};
 };
 
 &usb_phy {



From lede-commits at lists.infradead.org  Mon Aug 25 01:35:44 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 25 Aug 2025 04:35:44 -0400
Subject: [openwrt/openwrt]  treewide: fix compatible string for ath10k
In-Reply-To: <175611094351.3102204.15823765772946808943@git-01.infra.openwrt.org>
References: <175611094351.3102204.15823765772946808943@git-01.infra.openwrt.org>
Message-ID: <mailman.129195.1756112036.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/369525b9504dcc2a10e57e21054c653f5ffddd44

commit 369525b9504dcc2a10e57e21054c653f5ffddd44
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sun May 25 18:39:55 2025 -0700

    treewide: fix compatible string for ath10k
    
    The ath9k documentation says to use pci168c strings for the compatible
    string, probably because the OWL loader uses it to overide bogus pci IDs
    like abcd. This is not the case with ath10k and the documentation
    explicitly states to use qcom,ath10k.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18920
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts               | 2 +-
 target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts               | 2 +-
 target/linux/ath79/dts/qca9557_ruckus_r500.dts                        | 2 +-
 target/linux/ath79/dts/qca9558_nec_aterm.dtsi                         | 2 +-
 target/linux/ath79/dts/qca9558_nec_wg2200hp.dts                       | 1 -
 target/linux/ath79/dts/qca9563_kuwfi_n650.dts                         | 2 +-
 target/linux/ath79/dts/qca9563_nec_wg1200cr.dts                       | 2 +-
 target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi                    | 2 +-
 target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts                | 2 +-
 .../ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts  | 2 +-
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ad7200-c2600.dtsi   | 4 ++--
 .../ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-d7800.dts   | 4 ++--
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-fap-421e.dts        | 4 ++--
 .../ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-r7500v2.dts | 4 ++--
 .../ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-vr2600v.dts | 4 ++--
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wg2600hp.dts        | 4 ++--
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wxr-2533dhp.dts     | 4 ++--
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-nighthawk.dtsi      | 4 ++--
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-rt4230w-rev6.dts    | 4 ++--
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-tr4400-v2.dts       | 4 ++--
 20 files changed, 29 insertions(+), 30 deletions(-)

diff --git a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts
index 0daabc69a7..114b053c88 100644
--- a/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts
+++ b/target/linux/ath79/dts/qca9531_tplink_archer-d50-v1.dts
@@ -196,7 +196,7 @@
 	status = "okay";
 
 	wifi at 0,0 {
-		compatible = "pci168c,003c";
+		compatible = "qcom,ath10k";
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&cal_art_5000>, <&macaddr_romfile_f100 2>;
 		nvmem-cell-names = "calibration", "mac-address";
diff --git a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
index ff1cff9384..5acd59595b 100644
--- a/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
+++ b/target/linux/ath79/dts/qca9531_tplink_tl-wr902ac-v1.dts
@@ -197,7 +197,7 @@
 	status = "okay";
 
 	wifi at 0,0 {
-		compatible = "pci168c,0050";
+		compatible = "qcom,ath10k";
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&cal_art_5000>, <&macaddr_info_8 (-1)>;
 		nvmem-cell-names = "calibration", "mac-address";
diff --git a/target/linux/ath79/dts/qca9557_ruckus_r500.dts b/target/linux/ath79/dts/qca9557_ruckus_r500.dts
index 53495ac16d..d4200bd3ab 100644
--- a/target/linux/ath79/dts/qca9557_ruckus_r500.dts
+++ b/target/linux/ath79/dts/qca9557_ruckus_r500.dts
@@ -265,7 +265,7 @@
 	status = "okay";
 
 	ath10k: wifi at 0,0 {
-		compatible = "pci168c,003c";
+		compatible = "qcom,ath10k";
 		reg = <0x0000 0 0 0 0>;
 		gpio-controller;
 		#gpio-cells = <2>;
diff --git a/target/linux/ath79/dts/qca9558_nec_aterm.dtsi b/target/linux/ath79/dts/qca9558_nec_aterm.dtsi
index d650927195..b80d53ebfd 100644
--- a/target/linux/ath79/dts/qca9558_nec_aterm.dtsi
+++ b/target/linux/ath79/dts/qca9558_nec_aterm.dtsi
@@ -328,7 +328,7 @@
 	status = "okay";
 
 	wifi: wifi at 0,0 {
-		compatible = "pci168c,003c";
+		compatible = "qcom,ath10k";
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&cal_art_5000>, <&macaddr_config_12>;
 		nvmem-cell-names = "calibration", "mac-address";
diff --git a/target/linux/ath79/dts/qca9558_nec_wg2200hp.dts b/target/linux/ath79/dts/qca9558_nec_wg2200hp.dts
index 91ffe6d84c..6a7065ea6b 100644
--- a/target/linux/ath79/dts/qca9558_nec_wg2200hp.dts
+++ b/target/linux/ath79/dts/qca9558_nec_wg2200hp.dts
@@ -51,7 +51,6 @@
 };
 
 &wifi {
-	compatible = "pci168c,0046";
 	nvmem-cells = <&precal_art_5000>, <&macaddr_config_12>;
 	nvmem-cell-names = "pre-calibration", "mac-address";
 };
diff --git a/target/linux/ath79/dts/qca9563_kuwfi_n650.dts b/target/linux/ath79/dts/qca9563_kuwfi_n650.dts
index 03801dabb3..53950b347e 100644
--- a/target/linux/ath79/dts/qca9563_kuwfi_n650.dts
+++ b/target/linux/ath79/dts/qca9563_kuwfi_n650.dts
@@ -170,7 +170,7 @@
 	status = "okay";
 
 	wifi at 0,0 {
-		compatible = "pci168c,0056";
+		compatible = "qcom,ath10k";
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&precal_art_5000>, <&macaddr_art_0 1>;
 		nvmem-cell-names = "pre-calibration", "mac-address";
diff --git a/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts b/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts
index c9e47938d3..39090d7175 100644
--- a/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts
+++ b/target/linux/ath79/dts/qca9563_nec_wg1200cr.dts
@@ -172,7 +172,7 @@
 	status = "okay";
 
 	wifi at 0,0 {
-		compatible = "pci168c,0056";
+		compatible = "qcom,ath10k";
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&precal_art_5000>;
 		nvmem-cell-names = "pre-calibration";
diff --git a/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi b/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi
index 82a22ca5dc..1e986e0b15 100644
--- a/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi
+++ b/target/linux/ath79/dts/qca9563_yuncore_xd4200.dtsi
@@ -55,7 +55,7 @@
 	status = "okay";
 
 	wifi at 0,0 {
-		compatible = "pci168c,0056";
+		compatible = "qcom,ath10k";
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&precal_art_5000>;
 		nvmem-cell-names = "pre-calibration";
diff --git a/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts b/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts
index 76137c73c4..b674863705 100644
--- a/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts
+++ b/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts
@@ -121,7 +121,7 @@
 	status = "okay";
 
 	wifi at 0,0 {
-		compatible = "pci168c,0046";
+		compatible = "qcom,ath10k";
 		reg = <0 0 0 0 0>;
 
 		nvmem-cells = <&macaddr_info_8 (-1)>, <&precal_art_5000>;
diff --git a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
index 23577bde45..3e49fd5edd 100644
--- a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
+++ b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
@@ -476,7 +476,7 @@
 
 &pcie_bridge0 {
 	wifi at 0,0 {
-		compatible = "pci168c,0040";
+		compatible = "qcom,ath10k";
 		reg = <0x00010000 0 0 0 0>;
 		nvmem-cell-names = "pre-calibration", "mac-address";
 		nvmem-cells = <&precal_art_9000>, <&macaddr_config_0 3>;
diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ad7200-c2600.dtsi b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ad7200-c2600.dtsi
index f306201754..d8e018367e 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ad7200-c2600.dtsi
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ad7200-c2600.dtsi
@@ -316,7 +316,7 @@
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_defaultmac_8 (-1)>, <&precal_radio_1000>;
@@ -336,7 +336,7 @@
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_defaultmac_8 0>, <&precal_radio_5000>;
diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-d7800.dts
index 8077c3a090..24a7d2ca15 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-d7800.dts
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-d7800.dts
@@ -212,7 +212,7 @@
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_art_6 1>, <&precal_art_1000>;
@@ -235,7 +235,7 @@
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_art_6 2>, <&precal_art_5000>;
diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-fap-421e.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-fap-421e.dts
index ad8078cd74..813eb050b4 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-fap-421e.dts
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-fap-421e.dts
@@ -329,7 +329,7 @@
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_appsbl_7ff80 8>;
@@ -350,7 +350,7 @@
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_appsbl_7ff80 16>;
diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-r7500v2.dts
index 6c52d51ebc..469cdaa0a2 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-r7500v2.dts
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-r7500v2.dts
@@ -215,7 +215,7 @@
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_art_6 1>, <&precal_art_1000>;
@@ -238,7 +238,7 @@
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_art_6 2>, <&precal_art_5000>;
diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-vr2600v.dts
index 62530efeb1..3df650eba4 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-vr2600v.dts
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-vr2600v.dts
@@ -344,7 +344,7 @@
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_defaultmac_0 (-1)>, <&precal_ART_1000>;
@@ -364,7 +364,7 @@
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_defaultmac_0 0>, <&precal_ART_5000>;
diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wg2600hp.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wg2600hp.dts
index 0afc9219c9..b97b4325f2 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wg2600hp.dts
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wg2600hp.dts
@@ -466,7 +466,7 @@ switch at 10 {
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_PRODUCTDATA_12>, <&precal_ART_1000>;
@@ -486,7 +486,7 @@ switch at 10 {
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_PRODUCTDATA_c>, <&precal_ART_5000>;
diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wxr-2533dhp.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wxr-2533dhp.dts
index 5807425830..b3561cafe7 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wxr-2533dhp.dts
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wxr-2533dhp.dts
@@ -527,7 +527,7 @@
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_ART_1e>, <&precal_ART_1000>;
@@ -547,7 +547,7 @@
 		ranges;
 
 		wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&macaddr_ART_18>, <&precal_ART_5000>;
diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-nighthawk.dtsi b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-nighthawk.dtsi
index a7f0b1dbf0..a2d916faaf 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-nighthawk.dtsi
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-nighthawk.dtsi
@@ -516,7 +516,7 @@
 		ranges;
 
 		wifi0: wifi at 1,0 {
-			compatible = "pci168c,0046";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 		};
 	};
@@ -534,7 +534,7 @@
 		ranges;
 
 		wifi1: wifi at 1,0 {
-			compatible = "pci168c,0046";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 		};
 	};
diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-rt4230w-rev6.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-rt4230w-rev6.dts
index f10fa367f1..cd63f92db6 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-rt4230w-rev6.dts
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-rt4230w-rev6.dts
@@ -569,7 +569,7 @@
 		ranges;
 
 		wifi0: wifi at 1,0 {
-			compatible = "pci168c,0046";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&precal_ART_1000>;
@@ -592,7 +592,7 @@
 		ranges;
 
 		wifi1: wifi at 1,0 {
-			compatible = "pci168c,0046";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&precal_ART_5000>;
diff --git a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-tr4400-v2.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-tr4400-v2.dts
index 5d86d80047..176ae29337 100644
--- a/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-tr4400-v2.dts
+++ b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-tr4400-v2.dts
@@ -457,7 +457,7 @@
 		ranges;
 
 		wifi0: wifi at 1,0 {
-			compatible = "pci168c,0046";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&precal_ART_1000>, <&macaddr_fw_env_12>;
@@ -480,7 +480,7 @@
 		ranges;
 
 		wifi1: wifi at 1,0 {
-			compatible = "pci168c,0040";
+			compatible = "qcom,ath10k";
 			reg = <0x00010000 0 0 0 0>;
 
 			nvmem-cells = <&precal_ART_5000>, <&macaddr_fw_env_c>;



From lede-commits at lists.infradead.org  Mon Aug 25 01:51:33 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 25 Aug 2025 04:51:33 -0400
Subject: [openwrt/openwrt]  ipq-wifi: update to Git HEAD (2025-08-25)
In-Reply-To: <175611189360.3157798.6222034650517429792@git-01.infra.openwrt.org>
References: <175611189360.3157798.6222034650517429792@git-01.infra.openwrt.org>
Message-ID: <mailman.129259.1756113923.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/30e20d8cb2de37b076c4f3bb0bf3bdfa172a53c5

commit 30e20d8cb2de37b076c4f3bb0bf3bdfa172a53c5
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Aug 25 10:51:03 2025 +0200

    ipq-wifi: update to Git HEAD (2025-08-25)
    
    a510502e7922 qca9988: add BDFs for Xiaomi AIoT Router AC2350
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/firmware/ipq-wifi/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index a31a371d0f..520cf3a375 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -6,9 +6,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
-PKG_SOURCE_DATE:=2025-08-12
-PKG_SOURCE_VERSION:=30b99fc9cc138e2775a0595cfd4dba43dff50ea8
-PKG_MIRROR_HASH:=de3fd5791077c1e91bbf9cf570925bcd2a7c0cf8168b754bf05649bff939ea7b
+PKG_SOURCE_DATE:=2025-08-25
+PKG_SOURCE_VERSION:=a510502e7922b0a61e455e43479a62e7d27cf3ba
+PKG_MIRROR_HASH:=0b8120ce09fdd9176e77b65f2c0866e14aa580ba7e6dd9440f37011418346be7
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Mon Aug 25 04:44:47 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 25 Aug 2025 07:44:47 -0400
Subject: [openwrt/openwrt]  realtek: convert access to RTL931x analog serdes
 pages
In-Reply-To: <175612228732.3809122.15266715842872143713@git-01.infra.openwrt.org>
References: <175612228732.3809122.15266715842872143713@git-01.infra.openwrt.org>
Message-ID: <mailman.129464.1756124684.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a4cbb44c1bc9f87cdd003695a43a79ec99b14fe5

commit a4cbb44c1bc9f87cdd003695a43a79ec99b14fe5
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Wed Aug 20 04:56:19 2025 -0400

    realtek: convert access to RTL931x analog serdes pages
    
    The RTL931x has 14 frontend and at least 26 backend serdes. Currently
    the programming functions always need to determine the right backend
    serdes from the given frontend serdes on their own.
    
    We plan to provide a consistent serdes mapping to all callers as follows
    
    Frontend SerDes  |  0  1  2  3  4  5  6  7  8  9 10 11 12 13
    -----------------+------------------------------------------
    Backend SerDes 1 |  0  1  2  3  6  7 10 11 14 15 18 19 22 23
    Backend SerDes 2 |  0  1  2  4  6  8 10 12 14 16 18 20 22 24
    Backend SerDes 3 |  0  1  2  5  6  9 10 13 14 17 18 21 22 25
    
    frontend page               "even" frontend SerDes     "odd" frontend SerDes
    page 0x000-0x03f (analog):  page 0x000-0x03f back SDS  page 0x000-0x03f back SDS
    page 0x100-0x13f (XSGMII1): page 0x000-0x03f back SDS  page 0x000-0x03f back SDS+1
    page 0x200-0x23f (XSGMII2): page 0x000-0x03f back SDS  page 0x000-0x03f back SDS+2
    
    As a first micro step provide some helpers that simply operate on
    frontend serdes and will determine the backend serdes on their own.
    
    So rtmdio_931x_read_sds_phy() and rtmdio_931x_write_sds_phy() operate
    on backend serdes. While rtmdio_931x_read_sds_phy_**new**() and
    rtmdio_931x_write_sds_phy_**new**() operate on frontend serdes.
    
    This is only an intermediate naming convention and will be cleanup
    afterwards.
    
    In a first step make use of these new functions whenever we
    want to access the analog page. As the pages stay unchanged
    in the new functions conversion is as simple as this:
    
    Old:
    asds = rtl931x_get_analog_sds(...)
    rtmdio_931x_read_sds_phy(asds, ...)
    
    New:
    rtmdio_931x_read_sds_phy_new(sds, ...)
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19818
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../files-6.12/drivers/net/ethernet/rtl838x_eth.c  |  28 ++++
 .../files-6.12/drivers/net/ethernet/rtl838x_eth.h  |   3 +
 .../files-6.12/drivers/net/phy/rtl83xx-phy.c       | 141 ++++++++++++---------
 3 files changed, 113 insertions(+), 59 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
index 10e4c2d035..6b856a1b1e 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
@@ -2424,6 +2424,20 @@ static int rtmdio_930x_read_mmd_phy(u32 port, u32 devnum, u32 regnum, u32 *val)
  * page 0x200-0x23f (XSGMII2):	page 0x000-0x03f back SDS	page 0x000-0x03f back SDS+2
  */ 
 
+static int rtmdio_931x_get_backing_sds(u32 sds, u32 page)
+{
+	int map[] = {0, 1, 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23};
+	int back = map[sds];
+
+	if (page & 0xc0)
+		return -EINVAL; /* hole */
+
+	if ((sds & 1) && (sds != 1))
+		back += (page >> 8); /* distribute "odd" to 3 background SerDes */
+
+	return back;
+}
+
 int rtmdio_931x_read_sds_phy(int sds, int page, int regnum)
 {
 	u32 cmd = sds << 2 | page << 7 | regnum << 13 | 1;
@@ -2450,6 +2464,13 @@ int rtmdio_931x_read_sds_phy(int sds, int page, int regnum)
 	return ret;
 }
 
+int rtmdio_931x_read_sds_phy_new(int sds, int page, int regnum)
+{
+	int backsds = rtmdio_931x_get_backing_sds(sds, page);
+
+	return backsds < 0 ? 0 : rtmdio_931x_read_sds_phy(backsds, page & 0x3f, regnum);
+}
+
 int rtmdio_931x_write_sds_phy(int sds, int page, int regnum, u16 val)
 {
 	u32 cmd = sds << 2 | page << 7 | regnum << 13;;
@@ -2476,6 +2497,13 @@ int rtmdio_931x_write_sds_phy(int sds, int page, int regnum, u16 val)
 	return ret;
 }
 
+int rtmdio_931x_write_sds_phy_new(int sds, int page, int regnum, u16 val)
+{
+	int backsds = rtmdio_931x_get_backing_sds(sds, page);
+
+	return backsds < 0 ? 0 : rtmdio_931x_write_sds_phy(backsds, page & 0x3f, regnum, val);
+}
+
 /* RTL931x specific MDIO functions */
 
 static int rtmdio_931x_write_phy(u32 port, u32 page, u32 reg, u32 val)
diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
index a24cb891d2..f90a7e5978 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.h
@@ -469,4 +469,7 @@ int rtmdio_930x_write_sds_phy(int sds, int page, int regnum, u16 val);
 int rtmdio_931x_read_sds_phy(int sds, int page, int regnum);
 int rtmdio_931x_write_sds_phy(int sds, int page, int regnum, u16 val);
 
+int rtmdio_931x_read_sds_phy_new(int sds, int page, int regnum);
+int rtmdio_931x_write_sds_phy_new(int sds, int page, int regnum, u16 val);
+
 #endif /* _RTL838X_ETH_H */
diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index 9b51a97abf..1cf18b5ca3 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -31,6 +31,9 @@ extern int rtmdio_930x_write_sds_phy(int sds, int page, int regnum, u16 val);
 extern int rtmdio_931x_read_sds_phy(int sds, int page, int regnum);
 extern int rtmdio_931x_write_sds_phy(int sds, int page, int regnum, u16 val);
 
+extern int rtmdio_931x_read_sds_phy_new(int sds, int page, int regnum);
+extern int rtmdio_931x_write_sds_phy_new(int sds, int page, int regnum, u16 val);
+
 #define PHY_PAGE_2	2
 #define PHY_PAGE_4	4
 
@@ -2924,6 +2927,33 @@ static u32 rtl9310_sds_field_r(int sds, u32 page, u32 reg, int end_bit, int star
 	return (v >> start_bit) & (BIT(l) - 1);
 }
 
+static void rtl9310_sds_field_w_new(int sds, u32 page, u32 reg, int end_bit, int start_bit, u32 v)
+{
+	int l = end_bit - start_bit + 1;
+	u32 data = v;
+
+	if (l < 32) {
+		u32 mask = BIT(l) - 1;
+
+		data = rtmdio_931x_read_sds_phy_new(sds, page, reg);
+		data &= ~(mask << start_bit);
+		data |= (v & mask) << start_bit;
+	}
+
+	rtmdio_931x_write_sds_phy_new(sds, page, reg, data);
+}
+
+static u32 rtl9310_sds_field_r_new(int sds, u32 page, u32 reg, int end_bit, int start_bit)
+{
+	int l = end_bit - start_bit + 1;
+	u32 v = rtmdio_931x_read_sds_phy_new(sds, page, reg);
+
+	if (l >= 32)
+		return v;
+
+	return (v >> start_bit) & (BIT(l) - 1);
+}
+
 static void rtl931x_sds_rst(u32 sds)
 {
 	u32 o, v, o_mode;
@@ -2995,14 +3025,13 @@ static u32 rtl931x_get_analog_sds(u32 sds)
 void rtl931x_sds_fiber_disable(u32 sds)
 {
 	u32 v = 0x3F;
-	u32 asds = rtl931x_get_analog_sds(sds);
 
-	rtl9310_sds_field_w(asds, 0x1F, 0x9, 11, 6, v);
+	rtl9310_sds_field_w_new(sds, 0x1F, 0x9, 11, 6, v);
 }
 
 static void rtl931x_sds_fiber_mode_set(u32 sds, phy_interface_t mode)
 {
-	u32 val, asds = rtl931x_get_analog_sds(sds);
+	u32 val;
 
 	/* clear symbol error count before changing mode */
 	rtl931x_symerr_clear(sds, mode);
@@ -3037,7 +3066,7 @@ static void rtl931x_sds_fiber_mode_set(u32 sds, phy_interface_t mode)
 	}
 
 	pr_info("%s writing analog SerDes Mode value %02x\n", __func__, val);
-	rtl9310_sds_field_w(asds, 0x1F, 0x9, 11, 6, val);
+	rtl9310_sds_field_w_new(sds, 0x1F, 0x9, 11, 6, val);
 
 	return;
 }
@@ -3163,20 +3192,18 @@ static void rtl931x_cmu_type_set(u32 asds, phy_interface_t mode, int chiptype)
 
 static void rtl931x_sds_rx_rst(u32 sds)
 {
-	u32 asds = rtl931x_get_analog_sds(sds);
-
 	if (sds < 2)
 		return;
 
-	rtmdio_931x_write_sds_phy(asds, 0x2e, 0x12, 0x2740);
-	rtmdio_931x_write_sds_phy(asds, 0x2f, 0x0, 0x0);
-	rtmdio_931x_write_sds_phy(asds, 0x2f, 0x2, 0x2010);
-	rtmdio_931x_write_sds_phy(asds, 0x20, 0x0, 0xc10);
+	rtmdio_931x_write_sds_phy_new(sds, 0x2e, 0x12, 0x2740);
+	rtmdio_931x_write_sds_phy_new(sds, 0x2f, 0x0, 0x0);
+	rtmdio_931x_write_sds_phy_new(sds, 0x2f, 0x2, 0x2010);
+	rtmdio_931x_write_sds_phy_new(sds, 0x20, 0x0, 0xc10);
 
-	rtmdio_931x_write_sds_phy(asds, 0x2e, 0x12, 0x27c0);
-	rtmdio_931x_write_sds_phy(asds, 0x2f, 0x0, 0xc000);
-	rtmdio_931x_write_sds_phy(asds, 0x2f, 0x2, 0x6010);
-	rtmdio_931x_write_sds_phy(asds, 0x20, 0x0, 0xc30);
+	rtmdio_931x_write_sds_phy_new(sds, 0x2e, 0x12, 0x27c0);
+	rtmdio_931x_write_sds_phy_new(sds, 0x2f, 0x0, 0xc000);
+	rtmdio_931x_write_sds_phy_new(sds, 0x2f, 0x2, 0x6010);
+	rtmdio_931x_write_sds_phy_new(sds, 0x20, 0x0, 0xc30);
 
 	mdelay(50);
 }
@@ -3267,18 +3294,18 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 		return;
 
 	pr_info("%s: set sds %d to mode %d\n", __func__, sds, mode);
-	val = rtl9310_sds_field_r(asds, 0x1F, 0x9, 11, 6);
+	val = rtl9310_sds_field_r_new(sds, 0x1F, 0x9, 11, 6);
 
 	pr_info("%s: fibermode %08X stored mode 0x%x analog SDS %d", __func__,
-			rtmdio_931x_read_sds_phy(asds, 0x1f, 0x9), val, asds);
+			rtmdio_931x_read_sds_phy_new(sds, 0x1f, 0x9), val, asds);
 	pr_info("%s: SGMII mode %08X in 0x24 0x9 analog SDS %d", __func__,
-			rtmdio_931x_read_sds_phy(asds, 0x24, 0x9), asds);
+			rtmdio_931x_read_sds_phy_new(sds, 0x24, 0x9), asds);
 	pr_info("%s: CMU mode %08X stored even SDS %d", __func__,
 			rtmdio_931x_read_sds_phy(asds & ~1, 0x20, 0x12), asds & ~1);
 	pr_info("%s: serdes_mode_ctrl %08X", __func__,  RTL931X_SERDES_MODE_CTRL + 4 * (sds >> 2));
-	pr_info("%s CMU page 0x24 0x7 %08x\n", __func__, rtmdio_931x_read_sds_phy(asds, 0x24, 0x7));
-	pr_info("%s CMU page 0x26 0x7 %08x\n", __func__, rtmdio_931x_read_sds_phy(asds, 0x26, 0x7));
-	pr_info("%s CMU page 0x28 0x7 %08x\n", __func__, rtmdio_931x_read_sds_phy(asds, 0x28, 0x7));
+	pr_info("%s CMU page 0x24 0x7 %08x\n", __func__, rtmdio_931x_read_sds_phy_new(sds, 0x24, 0x7));
+	pr_info("%s CMU page 0x26 0x7 %08x\n", __func__, rtmdio_931x_read_sds_phy_new(sds, 0x26, 0x7));
+	pr_info("%s CMU page 0x28 0x7 %08x\n", __func__, rtmdio_931x_read_sds_phy_new(sds, 0x28, 0x7));
 	pr_info("%s XSG page 0x0 0xe %08x\n", __func__, rtmdio_931x_read_sds_phy(dSds, 0x0, 0xe));
 	pr_info("%s XSG2 page 0x0 0xe %08x\n", __func__, rtmdio_931x_read_sds_phy(dSds + 1, 0x0, 0xe));
 
@@ -3330,10 +3357,10 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 		u32 evenSds;
 
 		if (chiptype) {
-			rtl9310_sds_field_w(asds, 0x6, 0x2, 12, 12, 1);
+			rtl9310_sds_field_w_new(sds, 0x6, 0x2, 12, 12, 1);
 
 			for (int i = 0; i < sizeof(sds_config_10p3125g_type1) / sizeof(sds_config); ++i) {
-				rtmdio_931x_write_sds_phy(asds, sds_config_10p3125g_type1[i].page - 0x4, sds_config_10p3125g_type1[i].reg, sds_config_10p3125g_type1[i].data);
+				rtmdio_931x_write_sds_phy_new(sds, sds_config_10p3125g_type1[i].page - 0x4, sds_config_10p3125g_type1[i].reg, sds_config_10p3125g_type1[i].data);
 			}
 
 			evenSds = asds - (asds % 2);
@@ -3343,32 +3370,32 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 				                      sds_config_10p3125g_cmu_type1[i].page - 0x4, sds_config_10p3125g_cmu_type1[i].reg, sds_config_10p3125g_cmu_type1[i].data);
 			}
 
-			rtl9310_sds_field_w(asds, 0x6, 0x2, 12, 12, 0);
+			rtl9310_sds_field_w_new(sds, 0x6, 0x2, 12, 12, 0);
 		} else {
 
-			rtl9310_sds_field_w(asds, 0x2e, 0xd, 6, 0, 0x0);
-			rtl9310_sds_field_w(asds, 0x2e, 0xd, 7, 7, 0x1);
+			rtl9310_sds_field_w_new(sds, 0x2e, 0xd, 6, 0, 0x0);
+			rtl9310_sds_field_w_new(sds, 0x2e, 0xd, 7, 7, 0x1);
 
-			rtl9310_sds_field_w(asds, 0x2e, 0x1c, 5, 0, 0x1E);
-			rtl9310_sds_field_w(asds, 0x2e, 0x1d, 11, 0, 0x00);
-			rtl9310_sds_field_w(asds, 0x2e, 0x1f, 11, 0, 0x00);
-			rtl9310_sds_field_w(asds, 0x2f, 0x0, 11, 0, 0x00);
-			rtl9310_sds_field_w(asds, 0x2f, 0x1, 11, 0, 0x00);
+			rtl9310_sds_field_w_new(sds, 0x2e, 0x1c, 5, 0, 0x1E);
+			rtl9310_sds_field_w_new(sds, 0x2e, 0x1d, 11, 0, 0x00);
+			rtl9310_sds_field_w_new(sds, 0x2e, 0x1f, 11, 0, 0x00);
+			rtl9310_sds_field_w_new(sds, 0x2f, 0x0, 11, 0, 0x00);
+			rtl9310_sds_field_w_new(sds, 0x2f, 0x1, 11, 0, 0x00);
 
-			rtl9310_sds_field_w(asds, 0x2e, 0xf, 12, 6, 0x7F);
-			rtmdio_931x_write_sds_phy(asds, 0x2f, 0x12, 0xaaa);
+			rtl9310_sds_field_w_new(sds, 0x2e, 0xf, 12, 6, 0x7F);
+			rtmdio_931x_write_sds_phy_new(sds, 0x2f, 0x12, 0xaaa);
 
 			rtl931x_sds_rx_rst(sds);
 
-			rtmdio_931x_write_sds_phy(asds, 0x7, 0x10, op_code);
-			rtmdio_931x_write_sds_phy(asds, 0x6, 0x1d, 0x0480);
-			rtmdio_931x_write_sds_phy(asds, 0x6, 0xe, 0x0400);
+			rtmdio_931x_write_sds_phy_new(sds, 0x7, 0x10, op_code);
+			rtmdio_931x_write_sds_phy_new(sds, 0x6, 0x1d, 0x0480);
+			rtmdio_931x_write_sds_phy_new(sds, 0x6, 0xe, 0x0400);
 		}
 		break;
 
 	case PHY_INTERFACE_MODE_10GBASER: /* MII_10GR / MII_10GR1000BX_AUTO: */
 	                                  /* configure 10GR fiber mode=1 */
-		rtl9310_sds_field_w(asds, 0x1f, 0xb, 1, 1, 1);
+		rtl9310_sds_field_w_new(sds, 0x1f, 0xb, 1, 1, 1);
 
 		/* init fiber_1g */
 		rtl9310_sds_field_w(dSds, 0x3, 0x13, 15, 14, 0);
@@ -3378,9 +3405,9 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 		rtl9310_sds_field_w(dSds, 0x2, 0x0, 13, 13, 0);
 
 		/* init auto */
-		rtl9310_sds_field_w(asds, 0x1f, 13, 15, 0, 0x109e);
-		rtl9310_sds_field_w(asds, 0x1f, 0x6, 14, 10, 0x8);
-		rtl9310_sds_field_w(asds, 0x1f, 0x7, 10, 4, 0x7f);
+		rtl9310_sds_field_w_new(sds, 0x1f, 13, 15, 0, 0x109e);
+		rtl9310_sds_field_w_new(sds, 0x1f, 0x6, 14, 10, 0x8);
+		rtl9310_sds_field_w_new(sds, 0x1f, 0x7, 10, 4, 0x7f);
 		break;
 
 	case PHY_INTERFACE_MODE_HSGMII:
@@ -3396,7 +3423,7 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 		break;
 
 	case PHY_INTERFACE_MODE_SGMII:
-		rtl9310_sds_field_w(asds, 0x24, 0x9, 15, 15, 0);
+		rtl9310_sds_field_w_new(sds, 0x24, 0x9, 15, 15, 0);
 		break;
 
 	case PHY_INTERFACE_MODE_2500BASEX:
@@ -3414,16 +3441,16 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 
 	if (sds >= 2 && sds <= 13) {
 		if (chiptype)
-			rtmdio_931x_write_sds_phy(asds, 0x2E, 0x1, board_sds_tx_type1[sds - 2]);
+			rtmdio_931x_write_sds_phy_new(sds, 0x2E, 0x1, board_sds_tx_type1[sds - 2]);
 		else {
 			val = 0xa0000;
 			sw_w32(val, RTL93XX_CHIP_INFO);
 			val = sw_r32(RTL93XX_CHIP_INFO);
 			if (val & BIT(28)) /* consider 9311 etc. RTL9313_CHIP_ID == HWP_CHIP_ID(unit)) */
 			{
-				rtmdio_931x_write_sds_phy(asds, 0x2E, 0x1, board_sds_tx2[sds - 2]);
+				rtmdio_931x_write_sds_phy_new(sds, 0x2E, 0x1, board_sds_tx2[sds - 2]);
 			} else {
-				rtmdio_931x_write_sds_phy(asds, 0x2E, 0x1, board_sds_tx[sds - 2]);
+				rtmdio_931x_write_sds_phy_new(sds, 0x2E, 0x1, board_sds_tx[sds - 2]);
 			}
 			val = 0;
 			sw_w32(val, RTL93XX_CHIP_INFO);
@@ -3448,23 +3475,21 @@ void rtl931x_sds_init(u32 sds, phy_interface_t mode)
 
 int rtl931x_sds_cmu_band_set(int sds, bool enable, u32 band, phy_interface_t mode)
 {
-	u32 asds;
 	int page = rtl931x_sds_cmu_page_get(mode);
 
 	sds -= (sds % 2);
 	sds = sds & ~1;
-	asds = rtl931x_get_analog_sds(sds);
 	page += 1;
 
 	if (enable) {
-		rtl9310_sds_field_w(asds, page, 0x7, 13, 13, 0);
-		rtl9310_sds_field_w(asds, page, 0x7, 11, 11, 0);
+		rtl9310_sds_field_w_new(sds, page, 0x7, 13, 13, 0);
+		rtl9310_sds_field_w_new(sds, page, 0x7, 11, 11, 0);
 	} else {
-		rtl9310_sds_field_w(asds, page, 0x7, 13, 13, 0);
-		rtl9310_sds_field_w(asds, page, 0x7, 11, 11, 0);
+		rtl9310_sds_field_w_new(sds, page, 0x7, 13, 13, 0);
+		rtl9310_sds_field_w_new(sds, page, 0x7, 11, 11, 0);
 	}
 
-	rtl9310_sds_field_w(asds, page, 0x7, 4, 0, band);
+	rtl9310_sds_field_w_new(sds, page, 0x7, 4, 0, band);
 
 	rtl931x_sds_rst(sds);
 
@@ -3474,15 +3499,14 @@ int rtl931x_sds_cmu_band_set(int sds, bool enable, u32 band, phy_interface_t mod
 int rtl931x_sds_cmu_band_get(int sds, phy_interface_t mode)
 {
 	int page = rtl931x_sds_cmu_page_get(mode);
-	u32 asds, band;
+	u32 band;
 
 	sds -= (sds % 2);
-	asds = rtl931x_get_analog_sds(sds);
 	page += 1;
-	rtmdio_931x_write_sds_phy(asds, 0x1f, 0x02, 73);
+	rtmdio_931x_write_sds_phy_new(sds, 0x1f, 0x02, 73);
 
-	rtl9310_sds_field_w(asds, page, 0x5, 15, 15, 1);
-	band = rtl9310_sds_field_r(asds, 0x1f, 0x15, 8, 3);
+	rtl9310_sds_field_w_new(sds, page, 0x5, 15, 15, 1);
+	band = rtl9310_sds_field_r_new(sds, 0x1f, 0x15, 8, 3);
 	pr_info("%s band is: %d\n", __func__, band);
 
 	return band;
@@ -3503,11 +3527,10 @@ int rtl931x_link_sts_get(u32 sds)
 		latch_sts = rtl9310_sds_field_r(xsg_sdsid_0, 0x1, 30, 8, 0);
 		latch_sts1 = rtl9310_sds_field_r(xsg_sdsid_1, 0x1, 30, 8, 0);
 	} else {
-		u32  asds, dsds;
+		u32 dsds;
 
-		asds = rtl931x_get_analog_sds(sds);
-		sts = rtl9310_sds_field_r(asds, 0x5, 0, 12, 12);
-		latch_sts = rtl9310_sds_field_r(asds, 0x4, 1, 2, 2);
+		sts = rtl9310_sds_field_r_new(sds, 0x5, 0, 12, 12);
+		latch_sts = rtl9310_sds_field_r_new(sds, 0x4, 1, 2, 2);
 
 		dsds = sds < 2 ? sds : (sds - 1) * 2;
 		latch_sts1 = rtl9310_sds_field_r(dsds, 0x2, 1, 2, 2);



From lede-commits at lists.infradead.org  Mon Aug 25 10:52:47 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 25 Aug 2025 13:52:47 -0400
Subject: [openwrt/openwrt]  uboot-mediatek: remove wmcpu_emi dts node
 leftovers
In-Reply-To: <175614436784.1051109.13714381903440169833@git-01.infra.openwrt.org>
References: <175614436784.1051109.13714381903440169833@git-01.infra.openwrt.org>
Message-ID: <mailman.130008.1756144562.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c33df09169a34c7f6eb1804d6b50a1823f2e6bf4

commit c33df09169a34c7f6eb1804d6b50a1823f2e6bf4
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Mon Aug 25 21:13:23 2025 +0800

    uboot-mediatek: remove wmcpu_emi dts node leftovers
    
    wmcpu_emi node was removed in commit:
    b286fd8a397f ("uboot-mediatek: adjust the reserved memory regions")
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19855
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/boot/uboot-mediatek/patches/436-add-glinet-mt6000.patch | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/boot/uboot-mediatek/patches/436-add-glinet-mt6000.patch b/package/boot/uboot-mediatek/patches/436-add-glinet-mt6000.patch
index e51787cbaa..b44a601e9a 100644
--- a/package/boot/uboot-mediatek/patches/436-add-glinet-mt6000.patch
+++ b/package/boot/uboot-mediatek/patches/436-add-glinet-mt6000.patch
@@ -1,6 +1,6 @@
 --- /dev/null
 +++ b/arch/arm/dts/mt7986a-glinet-gl-mt6000.dts
-@@ -0,0 +1,135 @@
+@@ -0,0 +1,131 @@
 +// SPDX-License-Identifier: GPL-2.0
 +
 +/dts-v1/;
@@ -132,10 +132,6 @@
 +	non-removable;
 +	status = "okay";
 +};
-+
-+&wmcpu_emi {
-+	status = "disabled";
-+};
 --- /dev/null
 +++ b/configs/mt7986a_glinet_gl-mt6000_defconfig
 @@ -0,0 +1,104 @@



From lede-commits at lists.infradead.org  Mon Aug 25 10:52:48 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 25 Aug 2025 13:52:48 -0400
Subject: [openwrt/openwrt]  mediatek: dts: use dt-bindings documented bias
 type for UniFi 6 Plus
In-Reply-To: <175614436784.1051109.13714381903440169833@git-01.infra.openwrt.org>
References: <175614436784.1051109.13714381903440169833@git-01.infra.openwrt.org>
Message-ID: <mailman.130009.1756144562.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/43ae8e17e1bcc9730cbc0c9fd06568348a308ae8

commit 43ae8e17e1bcc9730cbc0c9fd06568348a308ae8
Author: Shiji Yang <yangshiji66 at outlook.com>
AuthorDate: Mon Aug 25 21:17:39 2025 +0800

    mediatek: dts: use dt-bindings documented bias type for UniFi 6 Plus
    
    Use macro defined bias types instead of some magic numbers. This can
    help reviewers better understand bias types.
    
    Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
    Link: https://github.com/openwrt/openwrt/pull/19855
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts
index fa0679402c..51b8c42021 100644
--- a/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts
+++ b/target/linux/mediatek/dts/mt7981a-ubnt-unifi-6-plus.dts
@@ -1,6 +1,9 @@
 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
 /dts-v1/;
+
+#include <dt-bindings/pinctrl/mt65xx.h>
+
 #include "mt7981b.dtsi"
 
 / {
@@ -65,13 +68,13 @@
 		conf-pu {
 			pins = "SPI2_CS", "SPI2_HOLD", "SPI2_WP";
 			drive-strength = <MTK_DRIVE_8mA>;
-			bias-pull-up = <103>;
+			bias-pull-up = <MTK_PUPD_SET_R1R0_11>;
 		};
 
 		conf-pd {
 			pins = "SPI2_CLK", "SPI2_MOSI", "SPI2_MISO";
 			drive-strength = <MTK_DRIVE_8mA>;
-			bias-pull-down = <103>;
+			bias-pull-down = <MTK_PUPD_SET_R1R0_11>;
 		};
 	};
 



From lede-commits at lists.infradead.org  Tue Aug 26 01:34:58 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 04:34:58 -0400
Subject: [openwrt/openwrt]  ath79: araknis_an-300-ap-i-n: use led-sources
In-Reply-To: <175619729875.216399.15239542382277685661@git-01.infra.openwrt.org>
References: <175619729875.216399.15239542382277685661@git-01.infra.openwrt.org>
Message-ID: <mailman.130347.1756197434.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c22db9698e0bb56ae72f72b9287e311135c8a382

commit c22db9698e0bb56ae72f72b9287e311135c8a382
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat May 24 18:45:03 2025 -0700

    ath79: araknis_an-300-ap-i-n: use led-sources
    
    The ath9k driver creates an ath9k LED by default. Instead of having a
    non functional LED, configure it properly and remove the extra as it's
    not needed.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/18904
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../ath79/dts/ar9344_araknis_an-300-ap-i-n.dts     | 30 ++++++++--------------
 1 file changed, 11 insertions(+), 19 deletions(-)

diff --git a/target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts b/target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts
index 86e990ffc7..8ad3efb5c4 100644
--- a/target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts
+++ b/target/linux/ath79/dts/ar9344_araknis_an-300-ap-i-n.dts
@@ -38,28 +38,12 @@
 			default-state = "off";
 		};
 
-		wifi5g {
-			label = "blue:wifi5g";
-			gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy0tpt";
-		};
-
 		wps {
 			function = LED_FUNCTION_WPS;
 			color = <LED_COLOR_ID_BLUE>;
 			gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
 		};
 	};
-
-	ath9k-leds {
-		compatible = "gpio-leds";
-
-		wifi2g {
-			label = "blue:wifi2g";
-			gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy1tpt";
-		};
-	};
 };
 
 &mdio0 {
@@ -87,14 +71,17 @@
 &pcie {
 	status = "okay";
 
-	ath9k: wifi at 0,0 {
+	wifi at 0,0 {
 		compatible = "pci168c,0030";
 		reg = <0x0 0 0 0 0>;
 		nvmem-cells = <&macaddr_art_0 1>, <&calibration_art_5000>;
 		nvmem-cell-names = "mac-address", "calibration";
 		ieee80211-freq-limit = <2402000 2482000>;
-		#gpio-cells = <2>;
-		gpio-controller;
+
+		led {
+			led-sources = <0>;
+			led-active-low;
+		};
 	};
 };
 
@@ -105,6 +92,11 @@
 
 	nvmem-cells = <&macaddr_art_0 2>, <&calibration_art_1000>;
 	nvmem-cell-names = "mac-address", "calibration";
+
+	led {
+		led-sources = <12>;
+		led-active-low;
+	};
 };
 
 &art {



From lede-commits at lists.infradead.org  Tue Aug 26 02:54:02 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 05:54:02 -0400
Subject: [openwrt/openwrt]  wifi-scripts: fix reload handling with random
 macaddr
In-Reply-To: <175620204086.585370.13523409776264756238@git-01.infra.openwrt.org>
References: <175620204086.585370.13523409776264756238@git-01.infra.openwrt.org>
Message-ID: <mailman.130453.1756204978.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5bdb7a59906ee71d0178f78c4b3ce4c4ff4bb4e0

commit 5bdb7a59906ee71d0178f78c4b3ce4c4ff4bb4e0
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Aug 25 20:31:02 2025 +0200

    wifi-scripts: fix reload handling with random macaddr
    
    Allow initially generated MAC address to be preserved across reload
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc      | 2 ++
 .../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc   | 4 +++-
 .../config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh       | 3 +++
 package/network/services/hostapd/files/hostapd.uc                   | 6 +++++-
 4 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
index 16a2c67afe..bbd907c234 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/ap.uc
@@ -508,4 +508,6 @@ export function generate(interface, data, config, vlans, stas, phy_features) {
 
 	if (config.default_macaddr)
 		append_raw('#default_macaddr');
+	else if (config.random_macaddr)
+		append_raw('#random_macaddr');
 };
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc
index 46af3b8a61..dd3143f0cd 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc
@@ -243,8 +243,10 @@ export function prepare(data, phy, num_global_macaddr, macaddr_base) {
 
 		data.default_macaddr = true;
 		mac_idx++;
-	} else if (data.macaddr == 'random')
+	} else if (data.macaddr == 'random') {
 		data.macaddr = macaddr_random();
+		data.random_macaddr = true;
+	}
 
 	log(`Preparing interface: ${data.ifname} with MAC: ${data.macaddr}`);
 };
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
index 2e939852b6..30d08a3015 100755
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
@@ -563,6 +563,7 @@ mac80211_hostapd_setup_bss() {
 $hostapd_cfg
 bssid=$macaddr
 ${default_macaddr:+#default_macaddr}
+${random_macaddr:+#random_macaddr}
 ${dtim_period:+dtim_period=$dtim_period}
 ${max_listen_int:+max_listen_interval=$max_listen_int}
 EOF
@@ -691,12 +692,14 @@ mac80211_prepare_vif() {
 	json_add_string _ifname "$ifname"
 
 	default_macaddr=
+	random_macaddr=
 	if [ -z "$macaddr" ]; then
 		macaddr="$(mac80211_generate_mac $phy)"
 		macidx="$(($macidx + 1))"
 		default_macaddr=1
 	elif [ "$macaddr" = 'random' ]; then
 		macaddr="$(macaddr_random)"
+		random_macaddr=1
 	fi
 	json_add_string _macaddr "$macaddr"
 	json_add_string _default_macaddr "$default_macaddr"
diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc
index a28c282493..7b3862e0e2 100644
--- a/package/network/services/hostapd/files/hostapd.uc
+++ b/package/network/services/hostapd/files/hostapd.uc
@@ -574,7 +574,9 @@ function iface_reload_config(name, phydev, config, old_config)
 
 		// try to preserve MAC address of this BSS by reassigning another
 		// BSS if necessary
-		if (cur_config.default_macaddr &&
+		if ((cur_config.default_macaddr || cur_config.random_macaddr) &&
+		    cur_config.random_macaddr == prev_config.random_macaddr &&
+		    cur_config.default_macaddr == prev_config.default_macaddr &&
 		    !macaddr_list[prev_config.bssid]) {
 			macaddr_list[prev_config.bssid] = i;
 			cur_config.bssid = prev_config.bssid;
@@ -918,6 +920,8 @@ function iface_load_config(phy, radio, filename)
 	while ((line = rtrim(f.read("line"), "\n")) != null) {
 		if (line == "#default_macaddr")
 			bss.default_macaddr = true;
+		if (line == "#random_macaddr")
+			bss.random_macaddr = true;
 
 		let val = split(line, "=", 2);
 		if (!val[0])



From lede-commits at lists.infradead.org  Tue Aug 26 02:54:01 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 05:54:01 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: fix random mac address
In-Reply-To: <175620204086.585370.13523409776264756238@git-01.infra.openwrt.org>
References: <175620204086.585370.13523409776264756238@git-01.infra.openwrt.org>
Message-ID: <mailman.130454.1756204978.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5781922f337c1e1e1518ba53cf8c9acdb6e26d03

commit 5781922f337c1e1e1518ba53cf8c9acdb6e26d03
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Aug 25 20:20:49 2025 +0200

    wifi-scripts: ucode: fix random mac address
    
    Fix exception by using fs.open instead of open
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc
index 4a592bc99f..46af3b8a61 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/iface.uc
@@ -223,7 +223,7 @@ export function wpa_key_mgmt(config) {
 };
 
 function macaddr_random() {
-	let f = open("/dev/urandom", "r");
+	let f = fs.open("/dev/urandom", "r");
 	let addr = f.read(6);
 
 	addr = map(split(addr, ""), (v) => ord(v));



From lede-commits at lists.infradead.org  Tue Aug 26 02:54:00 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 05:54:00 -0400
Subject: [openwrt/openwrt]  hostapd: fix link address of secondary MLO
 interfaces
In-Reply-To: <175620204086.585370.13523409776264756238@git-01.infra.openwrt.org>
References: <175620204086.585370.13523409776264756238@git-01.infra.openwrt.org>
Message-ID: <mailman.130455.1756204978.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d5fa1301135ae0be88236f242b92648fbe045ab8

commit d5fa1301135ae0be88236f242b92648fbe045ab8
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Aug 25 17:31:30 2025 +0200

    hostapd: fix link address of secondary MLO interfaces
    
    Ensure that hapd->own_addr is set based on the configured bssid
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../hostapd/patches/601-ucode_support.patch        | 29 +++++++++++++---------
 .../hostapd/patches/701-reload_config_inline.patch |  2 +-
 2 files changed, 18 insertions(+), 13 deletions(-)

diff --git a/package/network/services/hostapd/patches/601-ucode_support.patch b/package/network/services/hostapd/patches/601-ucode_support.patch
index a5aa2e6a79..44705efa37 100644
--- a/package/network/services/hostapd/patches/601-ucode_support.patch
+++ b/package/network/services/hostapd/patches/601-ucode_support.patch
@@ -148,21 +148,26 @@ as adding/removing interfaces.
  {
  	struct hostapd_bss_config *conf = hapd->conf;
  	u8 ssid[SSID_MAX_LEN + 1];
-@@ -1434,7 +1438,13 @@ static int hostapd_setup_bss(struct host
+@@ -1434,12 +1438,17 @@ static int hostapd_setup_bss(struct host
  
  	if (!first || first == -1) {
  		u8 *addr = hapd->own_addr;
 +		bool use_existing = first == -1;
  
 +#ifdef CONFIG_IEEE80211BE
-+		if (hapd->conf->mld_ap) {
++		if (hapd->conf->mld_ap)
 +			addr = NULL;
-+		} else
 +#endif /* CONFIG_IEEE80211BE */
  		if (!is_zero_ether_addr(conf->bssid)) {
  			/* Allocate the configured BSSID. */
  			os_memcpy(hapd->own_addr, conf->bssid, ETH_ALEN);
-@@ -1469,6 +1479,7 @@ static int hostapd_setup_bss(struct host
+ 
+-			if (hostapd_mac_comp(hapd->own_addr,
++			if (0 && hostapd_mac_comp(hapd->own_addr,
+ 					     hapd->iface->bss[0]->own_addr) ==
+ 			    0) {
+ 				wpa_printf(MSG_ERROR, "BSS '%s' may not have "
+@@ -1469,6 +1478,7 @@ static int hostapd_setup_bss(struct host
  					   hapd->mld_link_id, hapd->conf->iface);
  				goto setup_mld;
  			}
@@ -170,7 +175,7 @@ as adding/removing interfaces.
  		}
  #endif /* CONFIG_IEEE80211BE */
  
-@@ -1477,7 +1488,7 @@ static int hostapd_setup_bss(struct host
+@@ -1477,7 +1487,7 @@ static int hostapd_setup_bss(struct host
  				   conf->iface, addr, hapd,
  				   &hapd->drv_priv, force_ifname, if_addr,
  				   conf->bridge[0] ? conf->bridge : NULL,
@@ -179,7 +184,7 @@ as adding/removing interfaces.
  			wpa_printf(MSG_ERROR, "Failed to add BSS (BSSID="
  				   MACSTR ")", MAC2STR(hapd->own_addr));
  			hapd->interface_added = 0;
-@@ -1500,7 +1511,7 @@ static int hostapd_setup_bss(struct host
+@@ -1500,7 +1510,7 @@ static int hostapd_setup_bss(struct host
  
  #ifdef CONFIG_IEEE80211BE
  setup_mld:
@@ -188,7 +193,7 @@ as adding/removing interfaces.
  		wpa_printf(MSG_DEBUG,
  			   "MLD: Set link_id=%u, mld_addr=" MACSTR
  			   ", own_addr=" MACSTR,
-@@ -1518,6 +1529,8 @@ setup_mld:
+@@ -1518,6 +1528,8 @@ setup_mld:
  	}
  #endif /* CONFIG_IEEE80211BE */
  
@@ -197,7 +202,7 @@ as adding/removing interfaces.
  	if (conf->wmm_enabled < 0)
  		conf->wmm_enabled = hapd->iconf->ieee80211n |
  			hapd->iconf->ieee80211ax;
-@@ -1843,7 +1856,7 @@ int hostapd_set_acl(struct hostapd_data
+@@ -1843,7 +1855,7 @@ int hostapd_set_acl(struct hostapd_data
  }
  
  
@@ -206,7 +211,7 @@ as adding/removing interfaces.
  {
  #ifdef CONFIG_IEEE80211BE
  	int ret;
-@@ -2516,7 +2529,7 @@ static int hostapd_owe_iface_iter2(struc
+@@ -2516,7 +2528,7 @@ static int hostapd_owe_iface_iter2(struc
  #endif /* CONFIG_OWE */
  
  
@@ -215,7 +220,7 @@ as adding/removing interfaces.
  {
  #ifdef CONFIG_OWE
  	/* Check whether the enabled BSS can complete OWE transition mode
-@@ -2986,7 +2999,7 @@ hostapd_alloc_bss_data(struct hostapd_if
+@@ -2986,7 +2998,7 @@ hostapd_alloc_bss_data(struct hostapd_if
  }
  
  
@@ -224,7 +229,7 @@ as adding/removing interfaces.
  {
  	if (!hapd)
  		return;
-@@ -3194,7 +3207,7 @@ fail:
+@@ -3194,7 +3206,7 @@ fail:
  }
  
  
@@ -233,7 +238,7 @@ as adding/removing interfaces.
  {
  #ifdef CONFIG_IEEE80211BE
  	struct hostapd_mld *mld, **all_mld;
-@@ -4074,7 +4087,8 @@ int hostapd_remove_iface(struct hapd_int
+@@ -4074,7 +4086,8 @@ int hostapd_remove_iface(struct hapd_int
  		hapd_iface = interfaces->iface[i];
  		if (hapd_iface == NULL)
  			return -1;
diff --git a/package/network/services/hostapd/patches/701-reload_config_inline.patch b/package/network/services/hostapd/patches/701-reload_config_inline.patch
index b91ff62e05..bb4160edd9 100644
--- a/package/network/services/hostapd/patches/701-reload_config_inline.patch
+++ b/package/network/services/hostapd/patches/701-reload_config_inline.patch
@@ -58,7 +58,7 @@ as adding/removing interfaces.
  		return NULL;
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -3400,8 +3400,13 @@ hostapd_interface_init_bss(struct hapd_i
+@@ -3399,8 +3399,13 @@ hostapd_interface_init_bss(struct hapd_i
  		}
  	}
  



From lede-commits at lists.infradead.org  Tue Aug 26 02:55:12 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 05:55:12 -0400
Subject: [openwrt/openwrt]  wifi-scripts: fix reload handling with random
 macaddr
In-Reply-To: <175620211272.590267.17527056263875199829@git-01.infra.openwrt.org>
References: <175620211272.590267.17527056263875199829@git-01.infra.openwrt.org>
Message-ID: <mailman.130472.1756206325.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/76eb96c875fce2f8b83f3e2a7a675aade308c5c9

commit 76eb96c875fce2f8b83f3e2a7a675aade308c5c9
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Aug 25 20:31:02 2025 +0200

    wifi-scripts: fix reload handling with random macaddr
    
    Allow initially generated MAC address to be preserved across reload
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit 5bdb7a59906ee71d0178f78c4b3ce4c4ff4bb4e0)
---
 .../config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh       | 3 +++
 package/network/services/hostapd/files/hostapd.uc                   | 6 +++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
index 6c3d3f38b4..eea18e830e 100755
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless/mac80211.sh
@@ -563,6 +563,7 @@ mac80211_hostapd_setup_bss() {
 $hostapd_cfg
 bssid=$macaddr
 ${default_macaddr:+#default_macaddr}
+${random_macaddr:+#random_macaddr}
 ${dtim_period:+dtim_period=$dtim_period}
 ${max_listen_int:+max_listen_interval=$max_listen_int}
 EOF
@@ -691,12 +692,14 @@ mac80211_prepare_vif() {
 	json_add_string _ifname "$ifname"
 
 	default_macaddr=
+	random_macaddr=
 	if [ -z "$macaddr" ]; then
 		macaddr="$(mac80211_generate_mac $phy)"
 		macidx="$(($macidx + 1))"
 		default_macaddr=1
 	elif [ "$macaddr" = 'random' ]; then
 		macaddr="$(macaddr_random)"
+		random_macaddr=1
 	fi
 	json_add_string _macaddr "$macaddr"
 	json_add_string _default_macaddr "$default_macaddr"
diff --git a/package/network/services/hostapd/files/hostapd.uc b/package/network/services/hostapd/files/hostapd.uc
index f4f479c0f6..5c172de5df 100644
--- a/package/network/services/hostapd/files/hostapd.uc
+++ b/package/network/services/hostapd/files/hostapd.uc
@@ -485,7 +485,9 @@ function iface_reload_config(name, phydev, config, old_config)
 
 		// try to preserve MAC address of this BSS by reassigning another
 		// BSS if necessary
-		if (cur_config.default_macaddr &&
+		if ((cur_config.default_macaddr || cur_config.random_macaddr) &&
+		    cur_config.random_macaddr == prev_config.random_macaddr &&
+		    cur_config.default_macaddr == prev_config.default_macaddr &&
 		    !macaddr_list[prev_config.bssid]) {
 			macaddr_list[prev_config.bssid] = i;
 			cur_config.bssid = prev_config.bssid;
@@ -761,6 +763,8 @@ function iface_load_config(phy, radio, filename)
 	while ((line = rtrim(f.read("line"), "\n")) != null) {
 		if (line == "#default_macaddr")
 			bss.default_macaddr = true;
+		if (line == "#random_macaddr")
+			bss.random_macaddr = true;
 
 		let val = split(line, "=", 2);
 		if (!val[0])



From lede-commits at lists.infradead.org  Tue Aug 26 12:35:43 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 15:35:43 -0400
Subject: [openwrt/openwrt]  generic/config-6.12: add new option
In-Reply-To: <175623694107.2921728.821026593586238710@git-01.infra.openwrt.org>
References: <175623694107.2921728.821026593586238710@git-01.infra.openwrt.org>
Message-ID: <mailman.130758.1756238050.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c6d8f2267c218938100271d2f2aba019a2dfbde9

commit c6d8f2267c218938100271d2f2aba019a2dfbde9
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Fri Aug 15 15:22:27 2025 -0400

    generic/config-6.12: add new option
    
    Add new option required to build with VHOST_MENU=y
    
    This option enables two IOCTLs: VHOST_SET_FORK_FROM_OWNER and
    VHOST_GET_FORK_FROM_OWNER. These allow userspace applications
    to modify the vhost worker mode for vhost devices.
    
    Also expose module parameter 'fork_from_owner_default' to allow users
    to configure the default mode for vhost workers.
    
    By default, `VHOST_ENABLE_FORK_OWNER_CONTROL` is set to `y`,
    users can change the worker thread mode as needed.
    If this config is disabled (n),the related IOCTLs and parameters will
    be unavailable.
    
    If unsure, say "Y".
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
    Link: https://github.com/openwrt/openwrt/pull/19618
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/generic/config-6.12 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/generic/config-6.12 b/target/linux/generic/config-6.12
index 70139999d2..261166c6c3 100644
--- a/target/linux/generic/config-6.12
+++ b/target/linux/generic/config-6.12
@@ -7349,6 +7349,7 @@ CONFIG_VDSO=y
 # CONFIG_VGA_CONSOLE is not set
 # CONFIG_VGA_SWITCHEROO is not set
 # CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set
+CONFIG_VHOST_ENABLE_FORK_OWNER_CONTROL=y
 CONFIG_VHOST_MENU=y
 # CONFIG_VHOST_NET is not set
 # CONFIG_VHOST_VSOCK is not set



From lede-commits at lists.infradead.org  Tue Aug 26 12:35:41 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 15:35:41 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.12 to 6.12.41
In-Reply-To: <175623694107.2921728.821026593586238710@git-01.infra.openwrt.org>
References: <175623694107.2921728.821026593586238710@git-01.infra.openwrt.org>
Message-ID: <mailman.130759.1756238050.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/23b8205fe228e2192916241d42eb1336b9279f74

commit 23b8205fe228e2192916241d42eb1336b9279f74
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Fri Aug 1 05:26:34 2025 -0400

    kernel: bump 6.12 to 6.12.41
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.41
    
    All patches automatically rebased.
    
    Build system: x86/64
    Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc
    Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
    Link: https://github.com/openwrt/openwrt/pull/19618
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 ...iq_arm-Register-vcsm-cma-as-a-platform-dr.patch |  4 +--
 ...iq_arm-Register-bcm2835-codec-as-a-platfo.patch |  4 +--
 ...iq_arm-Set-up-dma-ranges-on-child-devices.patch |  2 +-
 ...-vchiq-Load-bcm2835_isp-driver-from-vchiq.patch |  4 +--
 ...vmscan-Maintain-TLB-coherency-in-LRU-code.patch |  2 +-
 ...td-rawnand-qcom-cleanup-qcom_nandc-driver.patch | 35 +++++++++++++++-------
 ...awnand-qcom-Add-qcom-prefix-to-common-api.patch | 10 +++----
 ...3-v6.14-mtd-nand-Add-qpic_common-API-file.patch |  6 ++--
 ...d-rawnand-qcom-use-FIELD_PREP-and-GENMASK.patch |  2 +-
 ...-qcom-fix-broken-config-in-qcom_param_pag.patch |  2 +-
 .../generic/hack-6.12/259-regmap_dynamic.patch     |  2 +-
 target/linux/generic/kernel-6.12                   |  4 +--
 12 files changed, 45 insertions(+), 32 deletions(-)

diff --git a/target/linux/bcm27xx/patches-6.12/950-0154-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch b/target/linux/bcm27xx/patches-6.12/950-0154-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch
index b580ee5377..e9f351d518 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0154-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0154-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch
@@ -21,7 +21,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  static const struct vchiq_platform_info bcm2835_info = {
  	.cache_line_size = 32,
-@@ -1760,6 +1761,7 @@ static int vchiq_probe(struct platform_d
+@@ -1759,6 +1760,7 @@ static int vchiq_probe(struct platform_d
  
  	vchiq_debugfs_init(&mgmt->state);
  
@@ -29,7 +29,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	bcm2835_audio = vchiq_device_register(&pdev->dev, "bcm2835-audio");
  	bcm2835_camera = vchiq_device_register(&pdev->dev, "bcm2835-camera");
  
-@@ -1778,6 +1780,7 @@ static void vchiq_remove(struct platform
+@@ -1777,6 +1779,7 @@ static void vchiq_remove(struct platform
  
  	vchiq_device_unregister(bcm2835_audio);
  	vchiq_device_unregister(bcm2835_camera);
diff --git a/target/linux/bcm27xx/patches-6.12/950-0155-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch b/target/linux/bcm27xx/patches-6.12/950-0155-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch
index 874bf15d34..acc70e2977 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0155-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0155-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch
@@ -22,7 +22,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  static struct vchiq_device *vcsm_cma;
  
  static const struct vchiq_platform_info bcm2835_info = {
-@@ -1762,6 +1763,7 @@ static int vchiq_probe(struct platform_d
+@@ -1761,6 +1762,7 @@ static int vchiq_probe(struct platform_d
  	vchiq_debugfs_init(&mgmt->state);
  
  	vcsm_cma = vchiq_device_register(&pdev->dev, "vcsm-cma");
@@ -30,7 +30,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	bcm2835_audio = vchiq_device_register(&pdev->dev, "bcm2835-audio");
  	bcm2835_camera = vchiq_device_register(&pdev->dev, "bcm2835-camera");
  
-@@ -1780,6 +1782,7 @@ static void vchiq_remove(struct platform
+@@ -1779,6 +1781,7 @@ static void vchiq_remove(struct platform
  
  	vchiq_device_unregister(bcm2835_audio);
  	vchiq_device_unregister(bcm2835_camera);
diff --git a/target/linux/bcm27xx/patches-6.12/950-0161-staging-vchiq_arm-Set-up-dma-ranges-on-child-devices.patch b/target/linux/bcm27xx/patches-6.12/950-0161-staging-vchiq_arm-Set-up-dma-ranges-on-child-devices.patch
index 0c7fd01ec8..b2b470eaeb 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0161-staging-vchiq_arm-Set-up-dma-ranges-on-child-devices.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0161-staging-vchiq_arm-Set-up-dma-ranges-on-child-devices.patch
@@ -234,7 +234,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	dev_dbg(&pdev->dev, "arm: vchiq_init - done (slots %pK, phys %pad)\n",
  		vchiq_slot_zero, &slot_phys);
  
-@@ -1711,6 +1777,7 @@ void vchiq_platform_conn_state_changed(s
+@@ -1710,6 +1776,7 @@ void vchiq_platform_conn_state_changed(s
  static const struct of_device_id vchiq_of_match[] = {
  	{ .compatible = "brcm,bcm2835-vchiq", .data = &bcm2835_info },
  	{ .compatible = "brcm,bcm2836-vchiq", .data = &bcm2836_info },
diff --git a/target/linux/bcm27xx/patches-6.12/950-0163-staging-vchiq-Load-bcm2835_isp-driver-from-vchiq.patch b/target/linux/bcm27xx/patches-6.12/950-0163-staging-vchiq-Load-bcm2835_isp-driver-from-vchiq.patch
index 1ba21abf1d..c9394bc85b 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0163-staging-vchiq-Load-bcm2835_isp-driver-from-vchiq.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0163-staging-vchiq-Load-bcm2835_isp-driver-from-vchiq.patch
@@ -21,7 +21,7 @@ Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
  static struct vchiq_device *vcsm_cma;
  
  static const struct vchiq_platform_info bcm2835_info = {
-@@ -1858,6 +1859,7 @@ static int vchiq_probe(struct platform_d
+@@ -1857,6 +1858,7 @@ static int vchiq_probe(struct platform_d
  	bcm2835_codec = vchiq_device_register(&pdev->dev, "bcm2835-codec");
  	bcm2835_audio = vchiq_device_register(&pdev->dev, "bcm2835-audio");
  	bcm2835_camera = vchiq_device_register(&pdev->dev, "bcm2835-camera");
@@ -29,7 +29,7 @@ Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
  
  	return 0;
  
-@@ -1872,6 +1874,7 @@ static void vchiq_remove(struct platform
+@@ -1871,6 +1873,7 @@ static void vchiq_remove(struct platform
  	struct vchiq_drv_mgmt *mgmt = dev_get_drvdata(&pdev->dev);
  	struct vchiq_arm_state *arm_state;
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0521-mm-vmscan-Maintain-TLB-coherency-in-LRU-code.patch b/target/linux/bcm27xx/patches-6.12/950-0521-mm-vmscan-Maintain-TLB-coherency-in-LRU-code.patch
index 26f11df2a1..66472a96bf 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0521-mm-vmscan-Maintain-TLB-coherency-in-LRU-code.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0521-mm-vmscan-Maintain-TLB-coherency-in-LRU-code.patch
@@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/mm/vmscan.c
 +++ b/mm/vmscan.c
-@@ -4128,7 +4128,7 @@ bool lru_gen_look_around(struct page_vma
+@@ -4136,7 +4136,7 @@ bool lru_gen_look_around(struct page_vma
  		if (!folio)
  			continue;
  
diff --git a/target/linux/generic/backport-6.12/410-01-v6.14-mtd-rawnand-qcom-cleanup-qcom_nandc-driver.patch b/target/linux/generic/backport-6.12/410-01-v6.14-mtd-rawnand-qcom-cleanup-qcom_nandc-driver.patch
index 95b66071ad..1d1288e832 100644
--- a/target/linux/generic/backport-6.12/410-01-v6.14-mtd-rawnand-qcom-cleanup-qcom_nandc-driver.patch
+++ b/target/linux/generic/backport-6.12/410-01-v6.14-mtd-rawnand-qcom-cleanup-qcom_nandc-driver.patch
@@ -815,7 +815,15 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	read_reg_dma(nandc, NAND_FLASH_STATUS, 1, NAND_BAM_NEXT_SGL);
  
  	ret = submit_descs(nandc);
-@@ -2864,7 +2815,7 @@ static int qcom_param_page_type_exec(str
+@@ -2862,14 +2813,14 @@ static int qcom_param_page_type_exec(str
+ 
+ 	reg_base = NAND_READ_LOCATION_0;
+ 
+-	if (nandc->props->qpic_v2)
++	if (nandc->props->qpic_version2)
+ 		reg_base = NAND_READ_LOCATION_LAST_CW_0;
+ 
+ 	ret = qcom_parse_instructions(chip, subop, &q_op);
  	if (ret)
  		return ret;
  
@@ -824,7 +832,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  
  	nandc->buf_count = 0;
  	nandc->buf_start = 0;
-@@ -2872,38 +2823,38 @@ static int qcom_param_page_type_exec(str
+@@ -2877,52 +2828,52 @@ static int qcom_param_page_type_exec(str
  	clear_read_regs(nandc);
  	clear_bam_transaction(nandc);
  
@@ -890,9 +898,14 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	}
  
  	instr = q_op.data_instr;
-@@ -2912,9 +2863,9 @@ static int qcom_param_page_type_exec(str
+ 	op_id = q_op.data_instr_idx;
+ 	len = nand_subop_get_data_len(subop, op_id);
  
- 	nandc_set_read_loc(chip, 0, 0, 0, len, 1);
+-	if (nandc->props->qpic_v2)
++	if (nandc->props->qpic_version2)
+ 		nandc_set_read_loc_last(chip, reg_base, 0, len, 1);
+ 	else
+ 		nandc_set_read_loc_first(chip, reg_base, 0, len, 1);
  
 -	if (!nandc->props->qpic_v2) {
 -		write_reg_dma(nandc, NAND_DEV_CMD_VLD, 1, 0);
@@ -903,7 +916,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	}
  
  	nandc->buf_count = 512;
-@@ -2926,9 +2877,10 @@ static int qcom_param_page_type_exec(str
+@@ -2934,9 +2885,10 @@ static int qcom_param_page_type_exec(str
  		      nandc->buf_count, 0);
  
  	/* restore CMD1 and VLD regs */
@@ -917,7 +930,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	}
  
  	ret = submit_descs(nandc);
-@@ -3017,7 +2969,7 @@ static const struct nand_controller_ops
+@@ -3025,7 +2977,7 @@ static const struct nand_controller_ops
  
  static void qcom_nandc_unalloc(struct qcom_nand_controller *nandc)
  {
@@ -926,7 +939,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  		if (!dma_mapping_error(nandc->dev, nandc->reg_read_dma))
  			dma_unmap_single(nandc->dev, nandc->reg_read_dma,
  					 MAX_REG_RD *
-@@ -3070,7 +3022,7 @@ static int qcom_nandc_alloc(struct qcom_
+@@ -3078,7 +3030,7 @@ static int qcom_nandc_alloc(struct qcom_
  	if (!nandc->reg_read_buf)
  		return -ENOMEM;
  
@@ -935,7 +948,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  		nandc->reg_read_dma =
  			dma_map_single(nandc->dev, nandc->reg_read_buf,
  				       MAX_REG_RD *
-@@ -3151,15 +3103,15 @@ static int qcom_nandc_setup(struct qcom_
+@@ -3159,15 +3111,15 @@ static int qcom_nandc_setup(struct qcom_
  	u32 nand_ctrl;
  
  	/* kill onenand */
@@ -954,7 +967,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  		nand_ctrl = nandc_read(nandc, NAND_CTRL);
  
  		/*
-@@ -3176,7 +3128,7 @@ static int qcom_nandc_setup(struct qcom_
+@@ -3184,7 +3136,7 @@ static int qcom_nandc_setup(struct qcom_
  	}
  
  	/* save the original values of these registers */
@@ -963,7 +976,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  		nandc->cmd1 = nandc_read(nandc, dev_cmd_reg_addr(nandc, NAND_DEV_CMD1));
  		nandc->vld = NAND_DEV_CMD_VLD_VAL;
  	}
-@@ -3349,7 +3301,7 @@ static int qcom_nandc_parse_dt(struct pl
+@@ -3357,7 +3309,7 @@ static int qcom_nandc_parse_dt(struct pl
  	struct device_node *np = nandc->dev->of_node;
  	int ret;
  
@@ -972,7 +985,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  		ret = of_property_read_u32(np, "qcom,cmd-crci",
  					   &nandc->cmd_crci);
  		if (ret) {
-@@ -3474,30 +3426,30 @@ static void qcom_nandc_remove(struct pla
+@@ -3482,30 +3434,30 @@ static void qcom_nandc_remove(struct pla
  
  static const struct qcom_nandc_props ipq806x_nandc_props = {
  	.ecc_modes = (ECC_RS_4BIT | ECC_BCH_8BIT),
diff --git a/target/linux/generic/backport-6.12/410-02-v6.14-mtd-rawnand-qcom-Add-qcom-prefix-to-common-api.patch b/target/linux/generic/backport-6.12/410-02-v6.14-mtd-rawnand-qcom-Add-qcom-prefix-to-common-api.patch
index f634e0442a..23ef86f807 100644
--- a/target/linux/generic/backport-6.12/410-02-v6.14-mtd-rawnand-qcom-Add-qcom-prefix-to-common-api.patch
+++ b/target/linux/generic/backport-6.12/410-02-v6.14-mtd-rawnand-qcom-Add-qcom-prefix-to-common-api.patch
@@ -823,7 +823,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	if (ret) {
  		dev_err(nandc->dev, "failure in submitting misc descriptor\n");
  		goto err_out;
-@@ -2820,8 +2820,8 @@ static int qcom_param_page_type_exec(str
+@@ -2825,8 +2825,8 @@ static int qcom_param_page_type_exec(str
  	nandc->buf_count = 0;
  	nandc->buf_start = 0;
  	host->use_ecc = false;
@@ -834,8 +834,8 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  
  	nandc->regs->cmd = q_op.cmd_reg;
  	nandc->regs->addr0 = 0;
-@@ -2864,8 +2864,8 @@ static int qcom_param_page_type_exec(str
- 	nandc_set_read_loc(chip, 0, 0, 0, len, 1);
+@@ -2872,8 +2872,8 @@ static int qcom_param_page_type_exec(str
+ 		nandc_set_read_loc_first(chip, reg_base, 0, len, 1);
  
  	if (!nandc->props->qpic_version2) {
 -		write_reg_dma(nandc, &nandc->regs->vld, NAND_DEV_CMD_VLD, 1, 0);
@@ -845,7 +845,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	}
  
  	nandc->buf_count = 512;
-@@ -2873,17 +2873,17 @@ static int qcom_param_page_type_exec(str
+@@ -2881,17 +2881,17 @@ static int qcom_param_page_type_exec(str
  
  	config_nand_single_cw_page_read(chip, false, 0);
  
@@ -869,7 +869,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	if (ret) {
  		dev_err(nandc->dev, "failure in submitting param page descriptor\n");
  		goto err_out;
-@@ -3067,7 +3067,7 @@ static int qcom_nandc_alloc(struct qcom_
+@@ -3075,7 +3075,7 @@ static int qcom_nandc_alloc(struct qcom_
  		 * maximum codeword size
  		 */
  		nandc->max_cwperpage = 1;
diff --git a/target/linux/generic/backport-6.12/410-03-v6.14-mtd-nand-Add-qpic_common-API-file.patch b/target/linux/generic/backport-6.12/410-03-v6.14-mtd-nand-Add-qpic_common-API-file.patch
index 26211461c1..9272f98862 100644
--- a/target/linux/generic/backport-6.12/410-03-v6.14-mtd-nand-Add-qpic_common-API-file.patch
+++ b/target/linux/generic/backport-6.12/410-03-v6.14-mtd-nand-Add-qpic_common-API-file.patch
@@ -1786,7 +1786,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  /*
   * when using BCH ECC, the HW flags an error in NAND_FLASH_STATUS if it read
   * an erased CW, and reports an erased CW in NAND_ERASED_CW_DETECT_STATUS.
-@@ -2967,141 +2022,14 @@ static const struct nand_controller_ops
+@@ -2975,141 +2030,14 @@ static const struct nand_controller_ops
  	.exec_op = qcom_nand_exec_op,
  };
  
@@ -1931,7 +1931,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	/* kill onenand */
  	if (!nandc->props->nandc_part_of_qpic)
  		nandc_write(nandc, SFLASHC_BURST_CFG, 0);
-@@ -3240,7 +2168,7 @@ static int qcom_nand_host_init_and_regis
+@@ -3248,7 +2176,7 @@ static int qcom_nand_host_init_and_regis
  	chip->legacy.block_bad		= qcom_nandc_block_bad;
  	chip->legacy.block_markbad	= qcom_nandc_block_markbad;
  
@@ -1940,7 +1940,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	chip->options |= NAND_NO_SUBPAGE_WRITE | NAND_USES_DMA |
  			 NAND_SKIP_BBTSCAN;
  
-@@ -3323,17 +2251,21 @@ static int qcom_nandc_parse_dt(struct pl
+@@ -3331,17 +2259,21 @@ static int qcom_nandc_parse_dt(struct pl
  static int qcom_nandc_probe(struct platform_device *pdev)
  {
  	struct qcom_nand_controller *nandc;
diff --git a/target/linux/generic/backport-6.12/410-04-v6.14-mtd-rawnand-qcom-use-FIELD_PREP-and-GENMASK.patch b/target/linux/generic/backport-6.12/410-04-v6.14-mtd-rawnand-qcom-use-FIELD_PREP-and-GENMASK.patch
index b37507409a..c19f681e9d 100644
--- a/target/linux/generic/backport-6.12/410-04-v6.14-mtd-rawnand-qcom-use-FIELD_PREP-and-GENMASK.patch
+++ b/target/linux/generic/backport-6.12/410-04-v6.14-mtd-rawnand-qcom-use-FIELD_PREP-and-GENMASK.patch
@@ -104,7 +104,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  
  	if (!nandc->props->qpic_version2)
  		host->ecc_buf_cfg = 0x203 << NUM_STEPS;
-@@ -1882,21 +1881,21 @@ static int qcom_param_page_type_exec(str
+@@ -1887,21 +1886,21 @@ static int qcom_param_page_type_exec(str
  	nandc->regs->addr0 = 0;
  	nandc->regs->addr1 = 0;
  
diff --git a/target/linux/generic/backport-6.12/410-05-v6.14-mtd-rawnand-qcom-fix-broken-config-in-qcom_param_pag.patch b/target/linux/generic/backport-6.12/410-05-v6.14-mtd-rawnand-qcom-fix-broken-config-in-qcom_param_pag.patch
index a6a4db229f..238a1f9d93 100644
--- a/target/linux/generic/backport-6.12/410-05-v6.14-mtd-rawnand-qcom-fix-broken-config-in-qcom_param_pag.patch
+++ b/target/linux/generic/backport-6.12/410-05-v6.14-mtd-rawnand-qcom-fix-broken-config-in-qcom_param_pag.patch
@@ -32,7 +32,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/drivers/mtd/nand/raw/qcom_nandc.c
 +++ b/drivers/mtd/nand/raw/qcom_nandc.c
-@@ -1881,18 +1881,18 @@ static int qcom_param_page_type_exec(str
+@@ -1886,18 +1886,18 @@ static int qcom_param_page_type_exec(str
  	nandc->regs->addr0 = 0;
  	nandc->regs->addr1 = 0;
  
diff --git a/target/linux/generic/hack-6.12/259-regmap_dynamic.patch b/target/linux/generic/hack-6.12/259-regmap_dynamic.patch
index e7614d6822..cbd6c42234 100644
--- a/target/linux/generic/hack-6.12/259-regmap_dynamic.patch
+++ b/target/linux/generic/hack-6.12/259-regmap_dynamic.patch
@@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #include <linux/mutex.h>
  #include <linux/err.h>
  #include <linux/property.h>
-@@ -3519,3 +3520,5 @@ static int __init regmap_initcall(void)
+@@ -3521,3 +3522,5 @@ static int __init regmap_initcall(void)
  	return 0;
  }
  postcore_initcall(regmap_initcall);
diff --git a/target/linux/generic/kernel-6.12 b/target/linux/generic/kernel-6.12
index 9880cae37e..11f05faf1c 100644
--- a/target/linux/generic/kernel-6.12
+++ b/target/linux/generic/kernel-6.12
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.12 = .40
-LINUX_KERNEL_HASH-6.12.40 = 4811af1317f98d2cccea3c7695969a2c03a27cb02fd2d5327032dd5341842933
+LINUX_VERSION-6.12 = .41
+LINUX_KERNEL_HASH-6.12.41 = 6b19a3ae99423de2416964d67251d745910277af258b4c4c63e88fd87dbf0e27



From lede-commits at lists.infradead.org  Tue Aug 26 12:35:44 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 15:35:44 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.12 to 6.12.43
In-Reply-To: <175623694107.2921728.821026593586238710@git-01.infra.openwrt.org>
References: <175623694107.2921728.821026593586238710@git-01.infra.openwrt.org>
Message-ID: <mailman.130760.1756238050.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f39c7e103f9a9aaa1381c9057c88b0827ca4010c

commit f39c7e103f9a9aaa1381c9057c88b0827ca4010c
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Sat Aug 23 16:04:04 2025 -0400

    kernel: bump 6.12 to 6.12.43
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.43
    
    Removed upstreamed:
        generic/backport-6.12/612-07-v6.17-net-dsa-b53-prevent-SWITCH_CTRL-access-on-BCM5325.patch[1]
        generic-backport/612-08-v6.17-net-dsa-b53-fix-IP_MULTICAST_CTRL-on-BCM5325.patch[2]
        generic-backport/612-09-v6.17-net-dsa-b53-prevent-DIS_LEARNING-access-on-BCM5325.patch[3]
        generic-backport/612-11-v6.17-net-dsa-b53-prevent-GMII_PORT_OVERRIDE_CTRL-access-on-BCM5325.patch[4]
        generic-backport/612-14-v6.17-net-dsa-b53-ensure-BCM5325-PHYs-are-enabled.patch[5]
        generic-backport/830-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch[6]
        bcm27xx/patches-6.12/950-0100-media-tc358743-Increase-FIFO-level-to-374.patch[7]
        bcm27xx/patches-6.12/950-0102-media-tc358743-Check-I2C-succeeded-during-probe.patch[8]
        bcm27xx/patches-6.12/950-0107-media-tc358743-Return-an-appropriate-colorspace-from.patch[9]
        bcm27xx/patches-6.12/950-0341-Allow-RESET_BRCMSTB-on-ARCH_BCM2835.patch[10]
        lantiq/patches-6.12/102-11-v6.17-MIPS-lantiq-falcon-sysctrl-fix-request-memory-check-.patch[11]
        lantiq/patches-6.12/102-12-v6.17-MIPS-vpe-mt-add-missing-prototypes-for-vpe_-alloc-st.patch[12]
        qualcommax/patches-6.12/0170-clk-qcom-gcc-ipq8074-fix-broken-freq-table-for-nss_port6_tx_clk_src.patch[13]
        generic/backport-6.12/612-13-v6.17-net-dsa-b53-fix-b53_imp_vlan_setup-for-BCM5325.patch[14]
    
    All other patches automatically rebased.
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=f16f96ccfe56ef2d627c20ba47f6d9d7dea40f5b
    2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=394bd12d1f93ed2fa0fa1d8f31ffd3c344681e85
    3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=9f45e4858f8096bb27f9a2c75fc24a538dffad67
    4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=15cf46cc6ecc7a54b397294675d11c379ddf69ef
    5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=0d250ad617a035904744cef74a5d5dc43d0199b9
    6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=cb9bb872366e10fa42e1e0200a0c2e5d05a27bec
    7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=f25d566c5674decd0051a3e624805fc1524729bf
    8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=3e03ee3b65baeac4c253b30650492ffffad9b608
    9. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=b42b107293b52ac8d46238815b1071138a47a7e4
    10. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=e285cdb9d2e4ba2e4515ae898f92e9f38be64eb3
    11. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=1e9079ff83eac962bc3b1e2fbad73b2f7d5256f4
    12. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=8520c843d9a2770012f23da08e4e2ccf1bb05ba6
    13. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=f1c5c55fb6cda312f5ed15505588caaf05a69043
    14. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.43&id=757955c80663ac3df7053abaf6fcc75051ef7a7c
    
    Build system: x86/64 (Intel N150 based)
    Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc
    Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
    Link: https://github.com/openwrt/openwrt/pull/19618
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../patches-6.12/900-unaligned_access_hacks.patch  |   2 +-
 ...pport-for-all-the-downstream-rpi-sound-ca.patch |   2 +-
 ...media-tc358743-Increase-FIFO-level-to-374.patch |  31 -----
 ...58743-Add-support-for-972Mbit-s-link-freq.patch |   4 +-
 ...tc358743-Check-I2C-succeeded-during-probe.patch |  98 --------------
 ...743-Return-an-appropriate-colorspace-from.patch | 110 ----------------
 ...ent-xhci_fixup_endpoint-for-interval-adju.patch |   4 +-
 ...op-and-add-the-endpoint-context-in-xhci_f.patch |   2 +-
 ...m-split-out-the-BCM54213PE-from-the-BCM54.patch |   6 +-
 ...05-fixups-for-driver-submitted-to-mailing.patch |   8 +-
 ...-Populate-phy-driver-block-for-BCM54213PE.patch |   2 +-
 ...34-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch |   6 +-
 ...0-0335-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch |   6 +-
 ...-0341-Allow-RESET_BRCMSTB-on-ARCH_BCM2835.patch |  20 ---
 ...-client-to-request-a-particular-dev-fbN-n.patch |  10 +-
 ...nvme-pci-Disable-Host-Memory-Buffer-usage.patch |   6 +-
 ...fault-to-Intel-scheme-for-calculating-U1-.patch |   4 +-
 ...-02-v6.13-block-introduce-add_disk_fwnode.patch |   2 +-
 ...-v6.13-net-dsa-use-ethtool-string-helpers.patch |   2 +-
 ...b53-bcm_sf2-implement-.support_eee-method.patch |   6 +-
 ...net-dsa-b53-mdio-add-support-for-BCM53101.patch |   4 +-
 ...net-dsa-b53-implement-setting-ageing-time.patch |   8 +-
 ...-net-dsa-b53-do-not-enable-EEE-on-bcm63xx.patch |   4 +-
 ...-do-not-configure-bcm63xx-s-IMP-port-inte.patch |   4 +-
 ...v6.17-net-dsa-b53-support-legacy-FCS-tags.patch |   2 +-
 ...v6.17-net-dsa-b53-detect-BCM5325-variants.patch |   6 +-
 ...d-support-for-FDB-operations-on-5325-5365.patch |  16 +--
 ...sa-b53-prevent-FAST_AGE-access-on-BCM5325.patch |   6 +-
 ...b53-prevent-SWITCH_CTRL-access-on-BCM5325.patch |  39 ------
 ...-dsa-b53-fix-IP_MULTICAST_CTRL-on-BCM5325.patch |  57 --------
 ...53-prevent-DIS_LEARNING-access-on-BCM5325.patch |  46 -------
 ...-prevent-BRCM_HDR-access-on-older-devices.patch |   2 +-
 ...GMII_PORT_OVERRIDE_CTRL-access-on-BCM5325.patch |  77 -----------
 ...sa-b53-fix-b53_imp_vlan_setup-for-BCM5325.patch |  32 -----
 ...t-dsa-b53-ensure-BCM5325-PHYs-are-enabled.patch |  59 ---------
 ...14-net-phy-Constify-struct-mdio_device_id.patch |   6 +-
 ...-trigger-netdev-Configure-LED-blink-inter.patch |  81 ------------
 .../linux/generic/hack-6.12/204-module_strip.patch |   8 +-
 .../generic/hack-6.12/901-debloat_sock_diag.patch  |   2 +-
 .../linux/generic/hack-6.12/902-debloat_proc.patch |   2 +-
 target/linux/generic/kernel-6.12                   |   4 +-
 .../454-block-add-support-for-notifications.patch  |   2 +-
 ...NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch |   2 +-
 .../generic/pending-6.12/834-ledtrig-libata.patch  |   2 +-
 ...dhci-msm-use-sdhci_set_clock-instead-of-s.patch |   2 +-
 ...ci-msm-comment-unused-sdhci_msm_set_clock.patch |   2 +-
 ...-net-dsa-add-out-of-band-tagging-protocol.patch |   2 +-
 .../001-MIPS-lantiq-add-pcie-driver.patch          |   2 +-
 ...-falcon-sysctrl-fix-request-memory-check-.patch |  65 ----------
 ...-add-missing-prototypes-for-vpe_-alloc-st.patch |  44 -------
 ...-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch |   2 +-
 ...roken-freq-table-for-nss_port6_tx_clk_src.patch | 143 ---------------------
 .../810-uvc-add-iPassion-iP2970-support.patch      |   6 +-
 53 files changed, 84 insertions(+), 986 deletions(-)

diff --git a/target/linux/ath79/patches-6.12/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.12/900-unaligned_access_hacks.patch
index 12fbc59e98..cb3aa56dc0 100644
--- a/target/linux/ath79/patches-6.12/900-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-6.12/900-unaligned_access_hacks.patch
@@ -784,7 +784,7 @@ SVN-Revision: 35130
  
 --- a/include/net/neighbour.h
 +++ b/include/net/neighbour.h
-@@ -286,8 +286,10 @@ static inline bool neigh_key_eq128(const
+@@ -287,8 +287,10 @@ static inline bool neigh_key_eq128(const
  	const u32 *n32 = (const u32 *)n->primary_key;
  	const u32 *p32 = pkey;
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0073-ASoC-Add-support-for-all-the-downstream-rpi-sound-ca.patch b/target/linux/bcm27xx/patches-6.12/950-0073-ASoC-Add-support-for-all-the-downstream-rpi-sound-ca.patch
index 2da70b23d8..59105068c1 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0073-ASoC-Add-support-for-all-the-downstream-rpi-sound-ca.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0073-ASoC-Add-support-for-all-the-downstream-rpi-sound-ca.patch
@@ -18589,7 +18589,7 @@ Signed-off-by: j-schambacher <joerg at hifiberry.com>
  	u32 xfer_resolution;
 --- a/sound/soc/soc-core.c
 +++ b/sound/soc/soc-core.c
-@@ -1434,7 +1434,15 @@ int snd_soc_runtime_set_dai_fmt(struct s
+@@ -1437,7 +1437,15 @@ int snd_soc_runtime_set_dai_fmt(struct s
  		return 0;
  
  	for_each_rtd_codec_dais(rtd, i, codec_dai) {
diff --git a/target/linux/bcm27xx/patches-6.12/950-0100-media-tc358743-Increase-FIFO-level-to-374.patch b/target/linux/bcm27xx/patches-6.12/950-0100-media-tc358743-Increase-FIFO-level-to-374.patch
deleted file mode 100644
index 2981e5c663..0000000000
--- a/target/linux/bcm27xx/patches-6.12/950-0100-media-tc358743-Increase-FIFO-level-to-374.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 6fd71667a133560b84946a5008e3c9375b5115b7 Mon Sep 17 00:00:00 2001
-From: Dave Stevenson <dave.stevenson at raspberrypi.org>
-Date: Wed, 31 Oct 2018 14:56:59 +0000
-Subject: [PATCH] media: tc358743: Increase FIFO level to 374.
-
-The existing fixed value of 16 worked for UYVY 720P60 over
-2 lanes at 594MHz, or UYVY 1080P60 over 4 lanes. (RGB888
-1080P60 needs 6 lanes at 594MHz).
-It doesn't allow for lower resolutions to work as the FIFO
-underflows.
-
-374 is required for 1080P24-30 UYVY over 2 lanes @ 972Mbit/s, but
->374 means that the FIFO underflows on 1080P50 UYVY over 2 lanes
-@ 972Mbit/s.
-
-Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
----
- drivers/media/i2c/tc358743.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/media/i2c/tc358743.c
-+++ b/drivers/media/i2c/tc358743.c
-@@ -1942,7 +1942,7 @@ static int tc358743_probe_of(struct tc35
- 	state->pdata.ddc5v_delay = DDC5V_DELAY_100_MS;
- 	state->pdata.enable_hdcp = false;
- 	/* A FIFO level of 16 should be enough for 2-lane 720p60 at 594 MHz. */
--	state->pdata.fifo_level = 16;
-+	state->pdata.fifo_level = 374;
- 	/*
- 	 * The PLL input clock is obtained by dividing refclk by pll_prd.
- 	 * It must be between 6 MHz and 40 MHz, lower frequency is better.
diff --git a/target/linux/bcm27xx/patches-6.12/950-0101-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch b/target/linux/bcm27xx/patches-6.12/950-0101-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch
index 247b83d938..4dc5d19c94 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0101-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0101-media-tc358743-Add-support-for-972Mbit-s-link-freq.patch
@@ -24,7 +24,7 @@ Signed-off-by: Jacko Dirks <jdirks.linuxdev at gmail.com>
 
 --- a/drivers/media/i2c/tc358743.c
 +++ b/drivers/media/i2c/tc358743.c
-@@ -1962,6 +1962,7 @@ static int tc358743_probe_of(struct tc35
+@@ -1980,6 +1980,7 @@ static int tc358743_probe_of(struct tc35
  	/*
  	 * The CSI bps per lane must be between 62.5 Mbps and 1 Gbps.
  	 * The default is 594 Mbps for 4-lane 1080p60 or 2-lane 720p60.
@@ -32,7 +32,7 @@ Signed-off-by: Jacko Dirks <jdirks.linuxdev at gmail.com>
  	 */
  	bps_pr_lane = 2 * endpoint.link_frequencies[0];
  	if (bps_pr_lane < 62500000U || bps_pr_lane > 1000000000U) {
-@@ -1975,23 +1976,42 @@ static int tc358743_probe_of(struct tc35
+@@ -1993,23 +1994,42 @@ static int tc358743_probe_of(struct tc35
  			       state->pdata.refclk_hz * state->pdata.pll_prd;
  
  	/*
diff --git a/target/linux/bcm27xx/patches-6.12/950-0102-media-tc358743-Check-I2C-succeeded-during-probe.patch b/target/linux/bcm27xx/patches-6.12/950-0102-media-tc358743-Check-I2C-succeeded-during-probe.patch
deleted file mode 100644
index 77194eef03..0000000000
--- a/target/linux/bcm27xx/patches-6.12/950-0102-media-tc358743-Check-I2C-succeeded-during-probe.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 307615221ab3249fcfdd21b81a8aca138ed7a1ed Mon Sep 17 00:00:00 2001
-From: Dave Stevenson <dave.stevenson at raspberrypi.org>
-Date: Wed, 31 Oct 2018 14:57:34 +0000
-Subject: [PATCH] media: tc358743: Check I2C succeeded during probe.
-
-The probe for the TC358743 reads the CHIPID register from
-the device and compares it to the expected value of 0.
-If the I2C request fails then that also returns 0, so
-the driver loads thinking that the device is there.
-
-Generally I2C communications are reliable so there is
-limited need to check the return value on every transfer,
-therefore only amend the one read during probe to check
-for I2C errors.
-
-Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
----
- drivers/media/i2c/tc358743.c | 27 +++++++++++++++++++++++----
- 1 file changed, 23 insertions(+), 4 deletions(-)
-
---- a/drivers/media/i2c/tc358743.c
-+++ b/drivers/media/i2c/tc358743.c
-@@ -110,7 +110,7 @@ static inline struct tc358743_state *to_
- 
- /* --------------- I2C --------------- */
- 
--static void i2c_rd(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n)
-+static int i2c_rd(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n)
- {
- 	struct tc358743_state *state = to_state(sd);
- 	struct i2c_client *client = state->i2c_client;
-@@ -136,6 +136,7 @@ static void i2c_rd(struct v4l2_subdev *s
- 		v4l2_err(sd, "%s: reading register 0x%x from 0x%x failed: %d\n",
- 				__func__, reg, client->addr, err);
- 	}
-+	return err != ARRAY_SIZE(msgs);
- }
- 
- static void i2c_wr(struct v4l2_subdev *sd, u16 reg, u8 *values, u32 n)
-@@ -192,15 +193,24 @@ static void i2c_wr(struct v4l2_subdev *s
- 	}
- }
- 
--static noinline u32 i2c_rdreg(struct v4l2_subdev *sd, u16 reg, u32 n)
-+static noinline u32 i2c_rdreg_err(struct v4l2_subdev *sd, u16 reg, u32 n,
-+				  int *err)
- {
-+	int error;
- 	__le32 val = 0;
- 
--	i2c_rd(sd, reg, (u8 __force *)&val, n);
-+	error = i2c_rd(sd, reg, (u8 __force *)&val, n);
-+	if (err)
-+		*err = error;
- 
- 	return le32_to_cpu(val);
- }
- 
-+static inline u32 i2c_rdreg(struct v4l2_subdev *sd, u16 reg, u32 n)
-+{
-+	return i2c_rdreg_err(sd, reg, n, NULL);
-+}
-+
- static noinline void i2c_wrreg(struct v4l2_subdev *sd, u16 reg, u32 val, u32 n)
- {
- 	__le32 raw = cpu_to_le32(val);
-@@ -229,6 +239,13 @@ static u16 i2c_rd16(struct v4l2_subdev *
- 	return i2c_rdreg(sd, reg, 2);
- }
- 
-+static int i2c_rd16_err(struct v4l2_subdev *sd, u16 reg, u16 *value)
-+{
-+	int err;
-+	*value = i2c_rdreg_err(sd, reg, 2, &err);
-+	return err;
-+}
-+
- static void i2c_wr16(struct v4l2_subdev *sd, u16 reg, u16 val)
- {
- 	i2c_wrreg(sd, reg, val, 2);
-@@ -2050,6 +2067,7 @@ static int tc358743_probe(struct i2c_cli
- 	struct tc358743_platform_data *pdata = client->dev.platform_data;
- 	struct v4l2_subdev *sd;
- 	u16 irq_mask = MASK_HDMI_MSK | MASK_CSI_MSK;
-+	u16 chipid;
- 	int err;
- 
- 	if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA))
-@@ -2081,7 +2099,8 @@ static int tc358743_probe(struct i2c_cli
- 	sd->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE | V4L2_SUBDEV_FL_HAS_EVENTS;
- 
- 	/* i2c access */
--	if ((i2c_rd16(sd, CHIPID) & MASK_CHIPID) != 0) {
-+	if (i2c_rd16_err(sd, CHIPID, &chipid) ||
-+	    (chipid & MASK_CHIPID) != 0) {
- 		v4l2_info(sd, "not a TC358743 on address 0x%x\n",
- 			  client->addr << 1);
- 		return -ENODEV;
diff --git a/target/linux/bcm27xx/patches-6.12/950-0107-media-tc358743-Return-an-appropriate-colorspace-from.patch b/target/linux/bcm27xx/patches-6.12/950-0107-media-tc358743-Return-an-appropriate-colorspace-from.patch
deleted file mode 100644
index 0ac1a1a9f2..0000000000
--- a/target/linux/bcm27xx/patches-6.12/950-0107-media-tc358743-Return-an-appropriate-colorspace-from.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 1745cb8447123a894db6c0b579259ec5d976808f Mon Sep 17 00:00:00 2001
-From: Dave Stevenson <dave.stevenson at raspberrypi.org>
-Date: Thu, 22 Nov 2018 17:31:06 +0000
-Subject: [PATCH] media: tc358743: Return an appropriate colorspace from
- tc358743_set_fmt
-
-When calling tc358743_set_fmt, the code was calling tc358743_get_fmt
-to choose a valid format. However that sets the colorspace
-based on what was read back from the chip. When you set the format,
-then the driver would choose and program the colorspace based
-on the format code.
-
-The result was that if you called try or set format for UYVY
-when the current format was RGB3 then you would get told sRGB,
-and try RGB3 when current was UYVY and you would get told
-SMPTE170M.
-
-The value programmed into the chip is determined by this driver,
-therefore there is no need to read back the value. Return the
-colorspace based on the format set/tried instead.
-
-Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
-
-media: i2c: tc358743: Only allow supported pixel fmts in set_fmt
-
-Fix commit "media: tc358743: Return an appropriate colorspace from
-tc358743_set_fmt" to ensure that the format passed in to set_fmt
-is checked to be valid, and reset to the current format if not.
-
-Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
----
- drivers/media/i2c/tc358743.c | 44 ++++++++++++++----------------------
- 1 file changed, 17 insertions(+), 27 deletions(-)
-
---- a/drivers/media/i2c/tc358743.c
-+++ b/drivers/media/i2c/tc358743.c
-@@ -1677,12 +1677,23 @@ static int tc358743_enum_mbus_code(struc
- 	return 0;
- }
- 
-+static u32 tc358743_g_colorspace(u32 code)
-+{
-+	switch (code) {
-+	case MEDIA_BUS_FMT_RGB888_1X24:
-+		return V4L2_COLORSPACE_SRGB;
-+	case MEDIA_BUS_FMT_UYVY8_1X16:
-+		return V4L2_COLORSPACE_SMPTE170M;
-+	default:
-+		return 0;
-+	}
-+}
-+
- static int tc358743_get_fmt(struct v4l2_subdev *sd,
- 		struct v4l2_subdev_state *sd_state,
- 		struct v4l2_subdev_format *format)
- {
- 	struct tc358743_state *state = to_state(sd);
--	u8 vi_rep = i2c_rd8(sd, VI_REP);
- 
- 	if (format->pad != 0)
- 		return -EINVAL;
-@@ -1692,23 +1703,7 @@ static int tc358743_get_fmt(struct v4l2_
- 	format->format.height = state->timings.bt.height;
- 	format->format.field = V4L2_FIELD_NONE;
- 
--	switch (vi_rep & MASK_VOUT_COLOR_SEL) {
--	case MASK_VOUT_COLOR_RGB_FULL:
--	case MASK_VOUT_COLOR_RGB_LIMITED:
--		format->format.colorspace = V4L2_COLORSPACE_SRGB;
--		break;
--	case MASK_VOUT_COLOR_601_YCBCR_LIMITED:
--	case MASK_VOUT_COLOR_601_YCBCR_FULL:
--		format->format.colorspace = V4L2_COLORSPACE_SMPTE170M;
--		break;
--	case MASK_VOUT_COLOR_709_YCBCR_FULL:
--	case MASK_VOUT_COLOR_709_YCBCR_LIMITED:
--		format->format.colorspace = V4L2_COLORSPACE_REC709;
--		break;
--	default:
--		format->format.colorspace = 0;
--		break;
--	}
-+	format->format.colorspace = tc358743_g_colorspace(format->format.code);
- 
- 	return 0;
- }
-@@ -1722,19 +1717,14 @@ static int tc358743_set_fmt(struct v4l2_
- 	u32 code = format->format.code; /* is overwritten by get_fmt */
- 	int ret = tc358743_get_fmt(sd, sd_state, format);
- 
--	format->format.code = code;
-+	if (code == MEDIA_BUS_FMT_RGB888_1X24 ||
-+	    code == MEDIA_BUS_FMT_UYVY8_1X16)
-+		format->format.code = code;
-+	format->format.colorspace = tc358743_g_colorspace(format->format.code);
- 
- 	if (ret)
- 		return ret;
- 
--	switch (code) {
--	case MEDIA_BUS_FMT_RGB888_1X24:
--	case MEDIA_BUS_FMT_UYVY8_1X16:
--		break;
--	default:
--		return -EINVAL;
--	}
--
- 	if (format->which == V4L2_SUBDEV_FORMAT_TRY)
- 		return 0;
- 
diff --git a/target/linux/bcm27xx/patches-6.12/950-0125-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-6.12/950-0125-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
index 041d364b89..b3f1233293 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0125-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0125-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
@@ -14,7 +14,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
 
 --- a/drivers/usb/host/xhci.c
 +++ b/drivers/usb/host/xhci.c
-@@ -1517,6 +1517,109 @@ static int xhci_check_ep0_maxpacket(stru
+@@ -1519,6 +1519,109 @@ static int xhci_check_ep0_maxpacket(stru
  }
  
  /*
@@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
   * non-error returns are a promise to giveback() the urb later
   * we drop ownership so next owner (or urb unlink) can get it
   */
-@@ -5381,6 +5484,7 @@ static const struct hc_driver xhci_hc_dr
+@@ -5383,6 +5486,7 @@ static const struct hc_driver xhci_hc_dr
  	.endpoint_reset =	xhci_endpoint_reset,
  	.check_bandwidth =	xhci_check_bandwidth,
  	.reset_bandwidth =	xhci_reset_bandwidth,
diff --git a/target/linux/bcm27xx/patches-6.12/950-0127-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch b/target/linux/bcm27xx/patches-6.12/950-0127-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch
index c6f2196c32..1ac575a2ce 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0127-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0127-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch
@@ -19,7 +19,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
 
 --- a/drivers/usb/host/xhci.c
 +++ b/drivers/usb/host/xhci.c
-@@ -1606,7 +1606,7 @@ static void xhci_fixup_endpoint(struct u
+@@ -1608,7 +1608,7 @@ static void xhci_fixup_endpoint(struct u
  		return;
  	}
  	ctrl_ctx->add_flags = xhci_get_endpoint_flag_from_index(ep_index);
diff --git a/target/linux/bcm27xx/patches-6.12/950-0157-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch b/target/linux/bcm27xx/patches-6.12/950-0157-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch
index 950e93c5db..b62142dd9f 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0157-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0157-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch
@@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  		return;
  
  	val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_SCR3);
-@@ -1444,7 +1445,7 @@ static struct phy_driver broadcom_driver
+@@ -1461,7 +1462,7 @@ static struct phy_driver broadcom_driver
  	.link_change_notify	= bcm54xx_link_change_notify,
  }, {
  	.phy_id		= PHY_ID_BCM54210E,
@@ -35,7 +35,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  	.name		= "Broadcom BCM54210E",
  	/* PHY_GBIT_FEATURES */
  	.flags		= PHY_ALWAYS_CALL_SUSPEND,
-@@ -1462,6 +1463,13 @@ static struct phy_driver broadcom_driver
+@@ -1479,6 +1480,13 @@ static struct phy_driver broadcom_driver
  	.set_wol	= bcm54xx_phy_set_wol,
  	.led_brightness_set	= bcm_phy_led_brightness_set,
  }, {
@@ -49,7 +49,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  	.phy_id		= PHY_ID_BCM5461,
  	.phy_id_mask	= 0xfffffff0,
  	.name		= "Broadcom BCM5461",
-@@ -1728,7 +1736,8 @@ module_phy_driver(broadcom_drivers);
+@@ -1745,7 +1753,8 @@ module_phy_driver(broadcom_drivers);
  static const struct mdio_device_id __maybe_unused broadcom_tbl[] = {
  	{ PHY_ID_BCM5411, 0xfffffff0 },
  	{ PHY_ID_BCM5421, 0xfffffff0 },
diff --git a/target/linux/bcm27xx/patches-6.12/950-0284-hwmon-emc2305-fixups-for-driver-submitted-to-mailing.patch b/target/linux/bcm27xx/patches-6.12/950-0284-hwmon-emc2305-fixups-for-driver-submitted-to-mailing.patch
index 453b052824..ef86c0ee60 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0284-hwmon-emc2305-fixups-for-driver-submitted-to-mailing.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0284-hwmon-emc2305-fixups-for-driver-submitted-to-mailing.patch
@@ -165,7 +165,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  	if (IS_ERR(data->cdev_data[cdev_idx].cdev)) {
  		dev_err(dev, "Failed to register cooling device %s\n", emc2305_fan_name[idx]);
-@@ -347,9 +410,11 @@ static void emc2305_unset_tz(struct devi
+@@ -353,9 +416,11 @@ static void emc2305_unset_tz(struct devi
  	int i;
  
  	/* Unregister cooling device. */
@@ -180,7 +180,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  }
  
  static umode_t
-@@ -571,11 +636,18 @@ static int emc2305_probe(struct i2c_clie
+@@ -577,11 +642,18 @@ static int emc2305_probe(struct i2c_clie
  		data->pwm_separate = pdata->pwm_separate;
  		for (i = 0; i < EMC2305_PWM_MAX; i++)
  			data->pwm_min[i] = pdata->pwm_min[i];
@@ -199,7 +199,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	}
  
  	data->hwmon_dev = devm_hwmon_device_register_with_info(dev, "emc2305", data,
-@@ -596,6 +668,12 @@ static int emc2305_probe(struct i2c_clie
+@@ -602,6 +674,12 @@ static int emc2305_probe(struct i2c_clie
  			return ret;
  	}
  
@@ -212,7 +212,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	return 0;
  }
  
-@@ -610,6 +688,7 @@ static void emc2305_remove(struct i2c_cl
+@@ -616,6 +694,7 @@ static void emc2305_remove(struct i2c_cl
  static struct i2c_driver emc2305_driver = {
  	.driver = {
  		.name = "emc2305",
diff --git a/target/linux/bcm27xx/patches-6.12/950-0290-Populate-phy-driver-block-for-BCM54213PE.patch b/target/linux/bcm27xx/patches-6.12/950-0290-Populate-phy-driver-block-for-BCM54213PE.patch
index b41c40e2e4..4c8a087924 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0290-Populate-phy-driver-block-for-BCM54213PE.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0290-Populate-phy-driver-block-for-BCM54213PE.patch
@@ -16,7 +16,7 @@ Signed-off-by: Jonathan Lemon <jonathan.lemon at gmail.com>
 
 --- a/drivers/net/phy/broadcom.c
 +++ b/drivers/net/phy/broadcom.c
-@@ -1478,8 +1478,14 @@ static struct phy_driver broadcom_driver
+@@ -1495,8 +1495,14 @@ static struct phy_driver broadcom_driver
  	.phy_id_mask	= 0xffffffff,
  	.name		= "Broadcom BCM54213PE",
  	/* PHY_GBIT_FEATURES */
diff --git a/target/linux/bcm27xx/patches-6.12/950-0334-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch b/target/linux/bcm27xx/patches-6.12/950-0334-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch
index 8fec64dcc1..4e1c1bd76b 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0334-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0334-usb-xhci-add-VLI_SS_BULK_OUT_BUG-quirk.patch
@@ -34,7 +34,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
 
 --- a/drivers/usb/host/xhci-mem.c
 +++ b/drivers/usb/host/xhci-mem.c
-@@ -1395,6 +1395,7 @@ int xhci_endpoint_init(struct xhci_hcd *
+@@ -1397,6 +1397,7 @@ int xhci_endpoint_init(struct xhci_hcd *
  	unsigned int ep_index;
  	struct xhci_ep_ctx *ep_ctx;
  	struct xhci_ring *ep_ring;
@@ -42,7 +42,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	unsigned int max_packet;
  	enum xhci_ring_type ring_type;
  	u32 max_esit_payload;
-@@ -1404,6 +1405,8 @@ int xhci_endpoint_init(struct xhci_hcd *
+@@ -1406,6 +1407,8 @@ int xhci_endpoint_init(struct xhci_hcd *
  	unsigned int mult;
  	unsigned int avg_trb_len;
  	unsigned int err_count = 0;
@@ -51,7 +51,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  
  	ep_index = xhci_get_endpoint_index(&ep->desc);
  	ep_ctx = xhci_get_ep_ctx(xhci, virt_dev->in_ctx, ep_index);
-@@ -1439,9 +1442,35 @@ int xhci_endpoint_init(struct xhci_hcd *
+@@ -1441,9 +1444,35 @@ int xhci_endpoint_init(struct xhci_hcd *
  
  	mult = xhci_get_endpoint_mult(udev, ep);
  	max_packet = usb_endpoint_maxp(&ep->desc);
diff --git a/target/linux/bcm27xx/patches-6.12/950-0335-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch b/target/linux/bcm27xx/patches-6.12/950-0335-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch
index 37f9e20e3f..4bc4330daa 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0335-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0335-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch
@@ -75,7 +75,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -3656,6 +3656,48 @@ static int xhci_align_td(struct xhci_hcd
+@@ -3659,6 +3659,48 @@ static int xhci_align_td(struct xhci_hcd
  	return 1;
  }
  
@@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  /* This is very similar to what ehci-q.c qtd_fill() does */
  int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
  		struct urb *urb, int slot_id, unsigned int ep_index)
-@@ -3810,6 +3852,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3813,6 +3855,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
  	}
  
  	check_trb_math(urb, enqd_len);
@@ -133,7 +133,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id,
  			start_cycle, start_trb);
  	return 0;
-@@ -3958,6 +4002,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
+@@ -3961,6 +4005,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
  			/* Event on completion */
  			field | TRB_IOC | TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state);
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0341-Allow-RESET_BRCMSTB-on-ARCH_BCM2835.patch b/target/linux/bcm27xx/patches-6.12/950-0341-Allow-RESET_BRCMSTB-on-ARCH_BCM2835.patch
deleted file mode 100644
index b24622a9de..0000000000
--- a/target/linux/bcm27xx/patches-6.12/950-0341-Allow-RESET_BRCMSTB-on-ARCH_BCM2835.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From c921a4d6cfed23d22f583dd18a25f61fdde3735a Mon Sep 17 00:00:00 2001
-From: Phil Elwell <phil at raspberrypi.com>
-Date: Thu, 27 May 2021 11:46:30 +0100
-Subject: [PATCH] Allow RESET_BRCMSTB on ARCH_BCM2835
-
----
- drivers/reset/Kconfig | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/reset/Kconfig
-+++ b/drivers/reset/Kconfig
-@@ -51,7 +51,7 @@ config RESET_BERLIN
- 
- config RESET_BRCMSTB
- 	tristate "Broadcom STB reset controller"
--	depends on ARCH_BRCMSTB || COMPILE_TEST
-+	depends on ARCH_BRCMSTB || ARCH_BCM2835 || COMPILE_TEST
- 	default ARCH_BRCMSTB
- 	help
- 	  This enables the reset controller driver for Broadcom STB SoCs using
diff --git a/target/linux/bcm27xx/patches-6.12/950-0392-fbdev-Allow-client-to-request-a-particular-dev-fbN-n.patch b/target/linux/bcm27xx/patches-6.12/950-0392-fbdev-Allow-client-to-request-a-particular-dev-fbN-n.patch
index 9322cedab0..13e8d1bb3c 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0392-fbdev-Allow-client-to-request-a-particular-dev-fbN-n.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0392-fbdev-Allow-client-to-request-a-particular-dev-fbN-n.patch
@@ -36,9 +36,9 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
 +		fb_info->node = i;
 +	}
  
- 	if (!fb_info->modelist.prev || !fb_info->modelist.next)
- 		INIT_LIST_HEAD(&fb_info->modelist);
-@@ -411,7 +415,6 @@ static int do_register_framebuffer(struc
+ 	if (i >= FB_MAX)
+ 		return -ENXIO;
+@@ -414,7 +418,6 @@ static int do_register_framebuffer(struc
  	if (err < 0)
  		return err;
  
@@ -46,7 +46,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	refcount_set(&fb_info->count, 1);
  	mutex_init(&fb_info->lock);
  	mutex_init(&fb_info->mm_lock);
-@@ -442,7 +445,7 @@ static int do_register_framebuffer(struc
+@@ -445,7 +448,7 @@ static int do_register_framebuffer(struc
  		pm_vt_switch_required(fb_info->device, true);
  
  	num_registered_fb++;
@@ -55,7 +55,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  #ifdef CONFIG_GUMSTIX_AM200EPD
  	{
-@@ -503,6 +506,12 @@ static void do_unregister_framebuffer(st
+@@ -506,6 +509,12 @@ static void do_unregister_framebuffer(st
  	put_fb_info(fb_info);
  }
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0685-nvme-pci-Disable-Host-Memory-Buffer-usage.patch b/target/linux/bcm27xx/patches-6.12/950-0685-nvme-pci-Disable-Host-Memory-Buffer-usage.patch
index 874ddc47c1..5ae8f6c966 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0685-nvme-pci-Disable-Host-Memory-Buffer-usage.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0685-nvme-pci-Disable-Host-Memory-Buffer-usage.patch
@@ -18,7 +18,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/nvme/host/pci.c
 +++ b/drivers/nvme/host/pci.c
-@@ -2083,6 +2083,7 @@ static void nvme_free_host_mem(struct nv
+@@ -2103,6 +2103,7 @@ static void nvme_free_host_mem(struct nv
  	dev->nr_host_mem_descs = 0;
  }
  
@@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  static int __nvme_alloc_host_mem(struct nvme_dev *dev, u64 preferred,
  		u32 chunk_size)
  {
-@@ -2151,9 +2152,11 @@ out:
+@@ -2171,9 +2172,11 @@ out:
  	dev->host_mem_descs = NULL;
  	return -ENOMEM;
  }
@@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	u64 min_chunk = min_t(u64, preferred, PAGE_SIZE * MAX_ORDER_NR_PAGES);
  	u64 hmminds = max_t(u32, dev->ctrl.hmminds * 4096, PAGE_SIZE * 2);
  	u64 chunk_size;
-@@ -2166,6 +2169,7 @@ static int nvme_alloc_host_mem(struct nv
+@@ -2186,6 +2189,7 @@ static int nvme_alloc_host_mem(struct nv
  			nvme_free_host_mem(dev);
  		}
  	}
diff --git a/target/linux/bcm27xx/patches-6.12/950-0950-usb-xhci-default-to-Intel-scheme-for-calculating-U1-.patch b/target/linux/bcm27xx/patches-6.12/950-0950-usb-xhci-default-to-Intel-scheme-for-calculating-U1-.patch
index 8be659cdd0..3a52a38589 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0950-usb-xhci-default-to-Intel-scheme-for-calculating-U1-.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0950-usb-xhci-default-to-Intel-scheme-for-calculating-U1-.patch
@@ -40,7 +40,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  static bool td_on_ring(struct xhci_td *td, struct xhci_ring *ring)
  {
  	struct xhci_segment *seg = ring->first_seg;
-@@ -4786,7 +4790,7 @@ static u16 xhci_calculate_u1_timeout(str
+@@ -4788,7 +4792,7 @@ static u16 xhci_calculate_u1_timeout(str
  		}
  	}
  
@@ -49,7 +49,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  		timeout_ns = xhci_calculate_intel_u1_timeout(udev, desc);
  	else
  		timeout_ns = udev->u1_params.sel;
-@@ -4850,7 +4854,7 @@ static u16 xhci_calculate_u2_timeout(str
+@@ -4852,7 +4856,7 @@ static u16 xhci_calculate_u2_timeout(str
  		}
  	}
  
diff --git a/target/linux/generic/backport-6.12/500-02-v6.13-block-introduce-add_disk_fwnode.patch b/target/linux/generic/backport-6.12/500-02-v6.13-block-introduce-add_disk_fwnode.patch
index b9fabe6742..381838d8ea 100644
--- a/target/linux/generic/backport-6.12/500-02-v6.13-block-introduce-add_disk_fwnode.patch
+++ b/target/linux/generic/backport-6.12/500-02-v6.13-block-introduce-add_disk_fwnode.patch
@@ -82,7 +82,7 @@ Signed-off-by: Jens Axboe <axboe at kernel.dk>
  static void blk_report_disk_dead(struct gendisk *disk, bool surprise)
 --- a/include/linux/blkdev.h
 +++ b/include/linux/blkdev.h
-@@ -734,6 +734,9 @@ static inline unsigned int blk_queue_dep
+@@ -789,6 +789,9 @@ static inline unsigned int blk_queue_dep
  #define for_each_bio(_bio)		\
  	for (; _bio; _bio = _bio->bi_next)
  
diff --git a/target/linux/generic/backport-6.12/610-01-v6.13-net-dsa-use-ethtool-string-helpers.patch b/target/linux/generic/backport-6.12/610-01-v6.13-net-dsa-use-ethtool-string-helpers.patch
index 003a896f30..a435e29144 100644
--- a/target/linux/generic/backport-6.12/610-01-v6.13-net-dsa-use-ethtool-string-helpers.patch
+++ b/target/linux/generic/backport-6.12/610-01-v6.13-net-dsa-use-ethtool-string-helpers.patch
@@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1061,8 +1061,7 @@ void b53_get_strings(struct dsa_switch *
+@@ -1086,8 +1086,7 @@ void b53_get_strings(struct dsa_switch *
  
  	if (stringset == ETH_SS_STATS) {
  		for (i = 0; i < mib_size; i++)
diff --git a/target/linux/generic/backport-6.12/610-02-v6.14-net-dsa-b53-bcm_sf2-implement-.support_eee-method.patch b/target/linux/generic/backport-6.12/610-02-v6.14-net-dsa-b53-bcm_sf2-implement-.support_eee-method.patch
index 4e9512c548..2658c6861b 100644
--- a/target/linux/generic/backport-6.12/610-02-v6.14-net-dsa-b53-bcm_sf2-implement-.support_eee-method.patch
+++ b/target/linux/generic/backport-6.12/610-02-v6.14-net-dsa-b53-bcm_sf2-implement-.support_eee-method.patch
@@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -2343,13 +2343,16 @@ int b53_eee_init(struct dsa_switch *ds,
+@@ -2387,13 +2387,16 @@ int b53_eee_init(struct dsa_switch *ds,
  }
  EXPORT_SYMBOL(b53_eee_init);
  
@@ -39,7 +39,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	return 0;
  }
  EXPORT_SYMBOL(b53_get_mac_eee);
-@@ -2359,9 +2362,6 @@ int b53_set_mac_eee(struct dsa_switch *d
+@@ -2403,9 +2406,6 @@ int b53_set_mac_eee(struct dsa_switch *d
  	struct b53_device *dev = ds->priv;
  	struct ethtool_keee *p = &dev->ports[port].eee;
  
@@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	p->eee_enabled = e->eee_enabled;
  	b53_eee_enable_set(ds, port, e->eee_enabled);
  
-@@ -2418,6 +2418,7 @@ static const struct dsa_switch_ops b53_s
+@@ -2462,6 +2462,7 @@ static const struct dsa_switch_ops b53_s
  	.port_setup		= b53_setup_port,
  	.port_enable		= b53_enable_port,
  	.port_disable		= b53_disable_port,
diff --git a/target/linux/generic/backport-6.12/610-03-v6.15-net-dsa-b53-mdio-add-support-for-BCM53101.patch b/target/linux/generic/backport-6.12/610-03-v6.15-net-dsa-b53-mdio-add-support-for-BCM53101.patch
index deff0fe4d2..dd17c8f6aa 100644
--- a/target/linux/generic/backport-6.12/610-03-v6.15-net-dsa-b53-mdio-add-support-for-BCM53101.patch
+++ b/target/linux/generic/backport-6.12/610-03-v6.15-net-dsa-b53-mdio-add-support-for-BCM53101.patch
@@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -2537,6 +2537,19 @@ static const struct b53_chip_data b53_sw
+@@ -2581,6 +2581,19 @@ static const struct b53_chip_data b53_sw
  		.jumbo_size_reg = B53_JUMBO_MAX_SIZE,
  	},
  	{
@@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.chip_id = BCM53115_DEVICE_ID,
  		.dev_name = "BCM53115",
  		.vlans = 4096,
-@@ -2917,6 +2930,7 @@ int b53_switch_detect(struct b53_device
+@@ -2961,6 +2974,7 @@ int b53_switch_detect(struct b53_device
  			return ret;
  
  		switch (id32) {
diff --git a/target/linux/generic/backport-6.12/610-04-v6.16-net-dsa-b53-implement-setting-ageing-time.patch b/target/linux/generic/backport-6.12/610-04-v6.16-net-dsa-b53-implement-setting-ageing-time.patch
index a0b428e4d4..75ad5c5e3e 100644
--- a/target/linux/generic/backport-6.12/610-04-v6.16-net-dsa-b53-implement-setting-ageing-time.patch
+++ b/target/linux/generic/backport-6.12/610-04-v6.16-net-dsa-b53-implement-setting-ageing-time.patch
@@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  #include <linux/module.h>
  #include <linux/platform_data/b53.h>
  #include <linux/phy.h>
-@@ -1202,6 +1203,10 @@ static int b53_setup(struct dsa_switch *
+@@ -1227,6 +1228,10 @@ static int b53_setup(struct dsa_switch *
  	 */
  	ds->untag_vlan_aware_bridge_pvid = true;
  
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	ret = b53_reset_switch(dev);
  	if (ret) {
  		dev_err(ds->dev, "failed to reset switch\n");
-@@ -2397,6 +2402,28 @@ static int b53_get_max_mtu(struct dsa_sw
+@@ -2441,6 +2446,28 @@ static int b53_get_max_mtu(struct dsa_sw
  	return B53_MAX_MTU;
  }
  
@@ -69,7 +69,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static const struct phylink_mac_ops b53_phylink_mac_ops = {
  	.mac_select_pcs	= b53_phylink_mac_select_pcs,
  	.mac_config	= b53_phylink_mac_config,
-@@ -2421,6 +2448,7 @@ static const struct dsa_switch_ops b53_s
+@@ -2465,6 +2492,7 @@ static const struct dsa_switch_ops b53_s
  	.support_eee		= b53_support_eee,
  	.get_mac_eee		= b53_get_mac_eee,
  	.set_mac_eee		= b53_set_mac_eee,
@@ -89,7 +89,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  void b53_br_leave(struct dsa_switch *ds, int port, struct dsa_bridge bridge);
 --- a/drivers/net/dsa/b53/b53_regs.h
 +++ b/drivers/net/dsa/b53/b53_regs.h
-@@ -220,6 +220,13 @@
+@@ -225,6 +225,13 @@
  #define   BRCM_HDR_P5_EN		BIT(1) /* Enable tagging on port 5 */
  #define   BRCM_HDR_P7_EN		BIT(2) /* Enable tagging on port 7 */
  
diff --git a/target/linux/generic/backport-6.12/610-05-v6.16-net-dsa-b53-do-not-enable-EEE-on-bcm63xx.patch b/target/linux/generic/backport-6.12/610-05-v6.16-net-dsa-b53-do-not-enable-EEE-on-bcm63xx.patch
index d1735c4100..39fb229f33 100644
--- a/target/linux/generic/backport-6.12/610-05-v6.16-net-dsa-b53-do-not-enable-EEE-on-bcm63xx.patch
+++ b/target/linux/generic/backport-6.12/610-05-v6.16-net-dsa-b53-do-not-enable-EEE-on-bcm63xx.patch
@@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -2338,6 +2338,9 @@ int b53_eee_init(struct dsa_switch *ds,
+@@ -2382,6 +2382,9 @@ int b53_eee_init(struct dsa_switch *ds,
  {
  	int ret;
  
@@ -36,7 +36,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	ret = phy_init_eee(phy, false);
  	if (ret)
  		return 0;
-@@ -2352,7 +2355,7 @@ bool b53_support_eee(struct dsa_switch *
+@@ -2396,7 +2399,7 @@ bool b53_support_eee(struct dsa_switch *
  {
  	struct b53_device *dev = ds->priv;
  
diff --git a/target/linux/generic/backport-6.12/610-07-v6.16-net-dsa-b53-do-not-configure-bcm63xx-s-IMP-port-inte.patch b/target/linux/generic/backport-6.12/610-07-v6.16-net-dsa-b53-do-not-configure-bcm63xx-s-IMP-port-inte.patch
index 17489e9b9f..f2c4464b06 100644
--- a/target/linux/generic/backport-6.12/610-07-v6.16-net-dsa-b53-do-not-configure-bcm63xx-s-IMP-port-inte.patch
+++ b/target/linux/generic/backport-6.12/610-07-v6.16-net-dsa-b53-do-not-configure-bcm63xx-s-IMP-port-inte.patch
@@ -28,7 +28,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  #include <linux/module.h>
  #include <linux/platform_data/b53.h>
  #include <linux/phy.h>
-@@ -1322,24 +1323,17 @@ static void b53_adjust_63xx_rgmii(struct
+@@ -1360,24 +1361,17 @@ static void b53_adjust_63xx_rgmii(struct
  				  phy_interface_t interface)
  {
  	struct b53_device *dev = ds->priv;
@@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	dev_dbg(ds->dev, "Configured port %d for %s\n", port,
  		phy_modes(interface));
-@@ -1490,7 +1484,7 @@ static void b53_phylink_mac_config(struc
+@@ -1528,7 +1522,7 @@ static void b53_phylink_mac_config(struc
  	struct b53_device *dev = ds->priv;
  	int port = dp->index;
  
diff --git a/target/linux/generic/backport-6.12/612-03-v6.17-net-dsa-b53-support-legacy-FCS-tags.patch b/target/linux/generic/backport-6.12/612-03-v6.17-net-dsa-b53-support-legacy-FCS-tags.patch
index 55227b643c..3fbc697f01 100644
--- a/target/linux/generic/backport-6.12/612-03-v6.17-net-dsa-b53-support-legacy-FCS-tags.patch
+++ b/target/linux/generic/backport-6.12/612-03-v6.17-net-dsa-b53-support-legacy-FCS-tags.patch
@@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	  This driver adds support for Broadcom managed switch chips. It supports
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -2241,8 +2241,11 @@ enum dsa_tag_protocol b53_get_tag_protoc
+@@ -2285,8 +2285,11 @@ enum dsa_tag_protocol b53_get_tag_protoc
  		goto out;
  	}
  
diff --git a/target/linux/generic/backport-6.12/612-04-v6.17-net-dsa-b53-detect-BCM5325-variants.patch b/target/linux/generic/backport-6.12/612-04-v6.17-net-dsa-b53-detect-BCM5325-variants.patch
index 5ed003ad98..04ded31a8f 100644
--- a/target/linux/generic/backport-6.12/612-04-v6.17-net-dsa-b53-detect-BCM5325-variants.patch
+++ b/target/linux/generic/backport-6.12/612-04-v6.17-net-dsa-b53-detect-BCM5325-variants.patch
@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1778,7 +1778,8 @@ static int b53_arl_op(struct b53_device
+@@ -1816,7 +1816,8 @@ static int b53_arl_op(struct b53_device
  
  	/* Perform a read for the given MAC and VID */
  	b53_write48(dev, B53_ARLIO_PAGE, B53_MAC_ADDR_IDX, mac);
@@ -31,7 +31,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	/* Issue a read operation for this MAC */
  	ret = b53_arl_rw_op(dev, 1);
-@@ -2840,6 +2841,9 @@ static int b53_switch_init(struct b53_de
+@@ -2884,6 +2885,9 @@ static int b53_switch_init(struct b53_de
  		}
  	}
  
@@ -41,7 +41,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	dev->num_ports = fls(dev->enabled_ports);
  
  	dev->ds->num_ports = min_t(unsigned int, dev->num_ports, DSA_MAX_PORTS);
-@@ -2941,10 +2945,24 @@ int b53_switch_detect(struct b53_device
+@@ -2985,10 +2989,24 @@ int b53_switch_detect(struct b53_device
  		b53_write16(dev, B53_VLAN_PAGE, B53_VLAN_TABLE_ACCESS_25, 0xf);
  		b53_read16(dev, B53_VLAN_PAGE, B53_VLAN_TABLE_ACCESS_25, &tmp);
  
diff --git a/target/linux/generic/backport-6.12/612-05-v6.17-net-dsa-b53-add-support-for-FDB-operations-on-5325-5365.patch b/target/linux/generic/backport-6.12/612-05-v6.17-net-dsa-b53-add-support-for-FDB-operations-on-5325-5365.patch
index 099638131c..113528a6d5 100644
--- a/target/linux/generic/backport-6.12/612-05-v6.17-net-dsa-b53-add-support-for-FDB-operations-on-5325-5365.patch
+++ b/target/linux/generic/backport-6.12/612-05-v6.17-net-dsa-b53-add-support-for-FDB-operations-on-5325-5365.patch
@@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1764,6 +1764,45 @@ static int b53_arl_read(struct b53_devic
+@@ -1802,6 +1802,45 @@ static int b53_arl_read(struct b53_devic
  	return *idx >= dev->num_arl_bins ? -ENOSPC : -ENOENT;
  }
  
@@ -70,7 +70,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static int b53_arl_op(struct b53_device *dev, int op, int port,
  		      const unsigned char *addr, u16 vid, bool is_valid)
  {
-@@ -1786,7 +1825,10 @@ static int b53_arl_op(struct b53_device
+@@ -1824,7 +1863,10 @@ static int b53_arl_op(struct b53_device
  	if (ret)
  		return ret;
  
@@ -82,7 +82,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	/* If this is a read, just finish now */
  	if (op)
-@@ -1830,12 +1872,17 @@ static int b53_arl_op(struct b53_device
+@@ -1868,12 +1910,17 @@ static int b53_arl_op(struct b53_device
  	ent.is_static = true;
  	ent.is_age = false;
  	memcpy(ent.mac, addr, ETH_ALEN);
@@ -103,7 +103,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	return b53_arl_rw_op(dev, 0);
  }
-@@ -1847,12 +1894,6 @@ int b53_fdb_add(struct dsa_switch *ds, i
+@@ -1885,12 +1932,6 @@ int b53_fdb_add(struct dsa_switch *ds, i
  	struct b53_device *priv = ds->priv;
  	int ret;
  
@@ -116,7 +116,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	mutex_lock(&priv->arl_mutex);
  	ret = b53_arl_op(priv, 0, port, addr, vid, true);
  	mutex_unlock(&priv->arl_mutex);
-@@ -1879,10 +1920,15 @@ EXPORT_SYMBOL(b53_fdb_del);
+@@ -1917,10 +1958,15 @@ EXPORT_SYMBOL(b53_fdb_del);
  static int b53_arl_search_wait(struct b53_device *dev)
  {
  	unsigned int timeout = 1000;
@@ -134,7 +134,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (!(reg & ARL_SRCH_STDN))
  			return 0;
  
-@@ -1899,13 +1945,24 @@ static void b53_arl_search_rd(struct b53
+@@ -1937,13 +1983,24 @@ static void b53_arl_search_rd(struct b53
  			      struct b53_arl_entry *ent)
  {
  	u64 mac_vid;
@@ -165,7 +165,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
  
  static int b53_fdb_copy(int port, const struct b53_arl_entry *ent,
-@@ -1926,14 +1983,20 @@ int b53_fdb_dump(struct dsa_switch *ds,
+@@ -1964,14 +2021,20 @@ int b53_fdb_dump(struct dsa_switch *ds,
  	struct b53_device *priv = ds->priv;
  	struct b53_arl_entry results[2];
  	unsigned int count = 0;
@@ -234,7 +234,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  #include <linux/bcm47xx_nvram.h>
 --- a/drivers/net/dsa/b53/b53_regs.h
 +++ b/drivers/net/dsa/b53/b53_regs.h
-@@ -324,9 +324,10 @@
+@@ -329,9 +329,10 @@
  #define   ARLTBL_VID_MASK		0xfff
  #define   ARLTBL_DATA_PORT_ID_S_25	48
  #define   ARLTBL_DATA_PORT_ID_MASK_25	0xf
diff --git a/target/linux/generic/backport-6.12/612-06-v6.17-net-dsa-b53-prevent-FAST_AGE-access-on-BCM5325.patch b/target/linux/generic/backport-6.12/612-06-v6.17-net-dsa-b53-prevent-FAST_AGE-access-on-BCM5325.patch
index 492c701a2b..7397e3323c 100644
--- a/target/linux/generic/backport-6.12/612-06-v6.17-net-dsa-b53-prevent-FAST_AGE-access-on-BCM5325.patch
+++ b/target/linux/generic/backport-6.12/612-06-v6.17-net-dsa-b53-prevent-FAST_AGE-access-on-BCM5325.patch
@@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -487,6 +487,9 @@ static int b53_flush_arl(struct b53_devi
+@@ -492,6 +492,9 @@ static int b53_flush_arl(struct b53_devi
  {
  	unsigned int i;
  
@@ -29,7 +29,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	b53_write8(dev, B53_CTRL_PAGE, B53_FAST_AGE_CTRL,
  		   FAST_AGE_DONE | FAST_AGE_DYNAMIC | mask);
  
-@@ -511,6 +514,9 @@ out:
+@@ -516,6 +519,9 @@ out:
  
  static int b53_fast_age_port(struct b53_device *dev, int port)
  {
@@ -39,7 +39,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	b53_write8(dev, B53_CTRL_PAGE, B53_FAST_AGE_PORT_CTRL, port);
  
  	return b53_flush_arl(dev, FAST_AGE_PORT);
-@@ -518,6 +524,9 @@ static int b53_fast_age_port(struct b53_
+@@ -523,6 +529,9 @@ static int b53_fast_age_port(struct b53_
  
  static int b53_fast_age_vlan(struct b53_device *dev, u16 vid)
  {
diff --git a/target/linux/generic/backport-6.12/612-07-v6.17-net-dsa-b53-prevent-SWITCH_CTRL-access-on-BCM5325.patch b/target/linux/generic/backport-6.12/612-07-v6.17-net-dsa-b53-prevent-SWITCH_CTRL-access-on-BCM5325.patch
deleted file mode 100644
index 275c120fdc..0000000000
--- a/target/linux/generic/backport-6.12/612-07-v6.17-net-dsa-b53-prevent-SWITCH_CTRL-access-on-BCM5325.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 22ccaaca43440e90a3b68d2183045b42247dc4be Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari at gmail.com>
-Date: Sat, 14 Jun 2025 09:59:53 +0200
-Subject: [PATCH] net: dsa: b53: prevent SWITCH_CTRL access on BCM5325
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM5325 doesn't implement SWITCH_CTRL register so we should avoid reading
-or writing it.
-
-Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
-Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
-Link: https://patch.msgid.link/20250614080000.1884236-8-noltari at gmail.com
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/dsa/b53/b53_common.c | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
---- a/drivers/net/dsa/b53/b53_common.c
-+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -361,11 +361,12 @@ static void b53_set_forwarding(struct b5
- 
- 	b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_MODE, mgmt);
- 
--	/* Include IMP port in dumb forwarding mode
--	 */
--	b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, &mgmt);
--	mgmt |= B53_MII_DUMB_FWDG_EN;
--	b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, mgmt);
-+	if (!is5325(dev)) {
-+		/* Include IMP port in dumb forwarding mode */
-+		b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, &mgmt);
-+		mgmt |= B53_MII_DUMB_FWDG_EN;
-+		b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, mgmt);
-+	}
- 
- 	/* Look at B53_UC_FWD_EN and B53_MC_FWD_EN to decide whether
- 	 * frames should be flooded or not.
diff --git a/target/linux/generic/backport-6.12/612-08-v6.17-net-dsa-b53-fix-IP_MULTICAST_CTRL-on-BCM5325.patch b/target/linux/generic/backport-6.12/612-08-v6.17-net-dsa-b53-fix-IP_MULTICAST_CTRL-on-BCM5325.patch
deleted file mode 100644
index e5b13f60a5..0000000000
--- a/target/linux/generic/backport-6.12/612-08-v6.17-net-dsa-b53-fix-IP_MULTICAST_CTRL-on-BCM5325.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 044d5ce2788b165798bfd173548e61bf7b6baf4d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari at gmail.com>
-Date: Sat, 14 Jun 2025 09:59:54 +0200
-Subject: [PATCH] net: dsa: b53: fix IP_MULTICAST_CTRL on BCM5325
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM5325 doesn't implement B53_UC_FWD_EN, B53_MC_FWD_EN or B53_IPMC_FWD_EN.
-
-Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
-Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
-Link: https://patch.msgid.link/20250614080000.1884236-9-noltari at gmail.com
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/dsa/b53/b53_common.c | 18 +++++++++++-------
- drivers/net/dsa/b53/b53_regs.h   |  1 +
- 2 files changed, 12 insertions(+), 7 deletions(-)
-
---- a/drivers/net/dsa/b53/b53_common.c
-+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -366,14 +366,18 @@ static void b53_set_forwarding(struct b5
- 		b53_read8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, &mgmt);
- 		mgmt |= B53_MII_DUMB_FWDG_EN;
- 		b53_write8(dev, B53_CTRL_PAGE, B53_SWITCH_CTRL, mgmt);
--	}
- 
--	/* Look at B53_UC_FWD_EN and B53_MC_FWD_EN to decide whether
--	 * frames should be flooded or not.
--	 */
--	b53_read8(dev, B53_CTRL_PAGE, B53_IP_MULTICAST_CTRL, &mgmt);
--	mgmt |= B53_UC_FWD_EN | B53_MC_FWD_EN | B53_IPMC_FWD_EN;
--	b53_write8(dev, B53_CTRL_PAGE, B53_IP_MULTICAST_CTRL, mgmt);
-+		/* Look at B53_UC_FWD_EN and B53_MC_FWD_EN to decide whether
-+		 * frames should be flooded or not.
-+		 */
-+		b53_read8(dev, B53_CTRL_PAGE, B53_IP_MULTICAST_CTRL, &mgmt);
-+		mgmt |= B53_UC_FWD_EN | B53_MC_FWD_EN | B53_IPMC_FWD_EN;
-+		b53_write8(dev, B53_CTRL_PAGE, B53_IP_MULTICAST_CTRL, mgmt);
-+	} else {
-+		b53_read8(dev, B53_CTRL_PAGE, B53_IP_MULTICAST_CTRL, &mgmt);
-+		mgmt |= B53_IP_MCAST_25;
-+		b53_write8(dev, B53_CTRL_PAGE, B53_IP_MULTICAST_CTRL, mgmt);
-+	}
- }
- 
- static void b53_enable_vlan(struct b53_device *dev, int port, bool enable,
---- a/drivers/net/dsa/b53/b53_regs.h
-+++ b/drivers/net/dsa/b53/b53_regs.h
-@@ -106,6 +106,7 @@
- 
- /* IP Multicast control (8 bit) */
- #define B53_IP_MULTICAST_CTRL		0x21
-+#define  B53_IP_MCAST_25		BIT(0)
- #define  B53_IPMC_FWD_EN		BIT(1)
- #define  B53_UC_FWD_EN			BIT(6)
- #define  B53_MC_FWD_EN			BIT(7)
diff --git a/target/linux/generic/backport-6.12/612-09-v6.17-net-dsa-b53-prevent-DIS_LEARNING-access-on-BCM5325.patch b/target/linux/generic/backport-6.12/612-09-v6.17-net-dsa-b53-prevent-DIS_LEARNING-access-on-BCM5325.patch
deleted file mode 100644
index b9616f0dad..0000000000
--- a/target/linux/generic/backport-6.12/612-09-v6.17-net-dsa-b53-prevent-DIS_LEARNING-access-on-BCM5325.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 800728abd9f83bda4de62a30ce62a8b41c242020 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari at gmail.com>
-Date: Sat, 14 Jun 2025 09:59:55 +0200
-Subject: [PATCH] net: dsa: b53: prevent DIS_LEARNING access on BCM5325
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM5325 doesn't implement DIS_LEARNING register so we should avoid reading
-or writing it.
-
-Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
-Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
-Link: https://patch.msgid.link/20250614080000.1884236-10-noltari at gmail.com
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/dsa/b53/b53_common.c | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
---- a/drivers/net/dsa/b53/b53_common.c
-+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -593,6 +593,9 @@ static void b53_port_set_learning(struct
- {
- 	u16 reg;
- 
-+	if (is5325(dev))
-+		return;
-+
- 	b53_read16(dev, B53_CTRL_PAGE, B53_DIS_LEARNING, &reg);
- 	if (learning)
- 		reg &= ~BIT(port);
-@@ -2243,7 +2246,13 @@ int b53_br_flags_pre(struct dsa_switch *
- 		     struct switchdev_brport_flags flags,
- 		     struct netlink_ext_ack *extack)
- {
--	if (flags.mask & ~(BR_FLOOD | BR_MCAST_FLOOD | BR_LEARNING))
-+	struct b53_device *dev = ds->priv;
-+	unsigned long mask = (BR_FLOOD | BR_MCAST_FLOOD);
-+
-+	if (!is5325(dev))
-+		mask |= BR_LEARNING;
-+
-+	if (flags.mask & ~mask)
- 		return -EINVAL;
- 
- 	return 0;
diff --git a/target/linux/generic/backport-6.12/612-10-v6.17-net-dsa-b53-prevent-BRCM_HDR-access-on-older-devices.patch b/target/linux/generic/backport-6.12/612-10-v6.17-net-dsa-b53-prevent-BRCM_HDR-access-on-older-devices.patch
index 6d058f8561..6ea836734a 100644
--- a/target/linux/generic/backport-6.12/612-10-v6.17-net-dsa-b53-prevent-BRCM_HDR-access-on-older-devices.patch
+++ b/target/linux/generic/backport-6.12/612-10-v6.17-net-dsa-b53-prevent-BRCM_HDR-access-on-older-devices.patch
@@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -730,6 +730,11 @@ void b53_brcm_hdr_setup(struct dsa_switc
+@@ -747,6 +747,11 @@ void b53_brcm_hdr_setup(struct dsa_switc
  		hdr_ctl |= GC_FRM_MGMT_PORT_M;
  	b53_write8(dev, B53_MGMT_PAGE, B53_GLOBAL_CONFIG, hdr_ctl);
  
diff --git a/target/linux/generic/backport-6.12/612-11-v6.17-net-dsa-b53-prevent-GMII_PORT_OVERRIDE_CTRL-access-on-BCM5325.patch b/target/linux/generic/backport-6.12/612-11-v6.17-net-dsa-b53-prevent-GMII_PORT_OVERRIDE_CTRL-access-on-BCM5325.patch
deleted file mode 100644
index 7f412a2b0e..0000000000
--- a/target/linux/generic/backport-6.12/612-11-v6.17-net-dsa-b53-prevent-GMII_PORT_OVERRIDE_CTRL-access-on-BCM5325.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 37883bbc45a8555d6eca88d3a9730504d2dac86c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari at gmail.com>
-Date: Sat, 14 Jun 2025 09:59:57 +0200
-Subject: [PATCH] net: dsa: b53: prevent GMII_PORT_OVERRIDE_CTRL access on
- BCM5325
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM5325 doesn't implement GMII_PORT_OVERRIDE_CTRL register so we should
-avoid reading or writing it.
-PORT_OVERRIDE_RX_FLOW and PORT_OVERRIDE_TX_FLOW aren't defined on BCM5325
-and we should use PORT_OVERRIDE_LP_FLOW_25 instead.
-
-Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
-Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
-Link: https://patch.msgid.link/20250614080000.1884236-12-noltari at gmail.com
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/dsa/b53/b53_common.c | 21 +++++++++++++++++----
- drivers/net/dsa/b53/b53_regs.h   |  1 +
- 2 files changed, 18 insertions(+), 4 deletions(-)
-
---- a/drivers/net/dsa/b53/b53_common.c
-+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -1279,6 +1279,8 @@ static void b53_force_link(struct b53_de
- 	if (port == dev->imp_port) {
- 		off = B53_PORT_OVERRIDE_CTRL;
- 		val = PORT_OVERRIDE_EN;
-+	} else if (is5325(dev)) {
-+		return;
- 	} else {
- 		off = B53_GMII_PORT_OVERRIDE_CTRL(port);
- 		val = GMII_PO_EN;
-@@ -1303,6 +1305,8 @@ static void b53_force_port_config(struct
- 	if (port == dev->imp_port) {
- 		off = B53_PORT_OVERRIDE_CTRL;
- 		val = PORT_OVERRIDE_EN;
-+	} else if (is5325(dev)) {
-+		return;
- 	} else {
- 		off = B53_GMII_PORT_OVERRIDE_CTRL(port);
- 		val = GMII_PO_EN;
-@@ -1333,10 +1337,19 @@ static void b53_force_port_config(struct
- 		return;
- 	}
- 
--	if (rx_pause)
--		reg |= PORT_OVERRIDE_RX_FLOW;
--	if (tx_pause)
--		reg |= PORT_OVERRIDE_TX_FLOW;
-+	if (rx_pause) {
-+		if (is5325(dev))
-+			reg |= PORT_OVERRIDE_LP_FLOW_25;
-+		else
-+			reg |= PORT_OVERRIDE_RX_FLOW;
-+	}
-+
-+	if (tx_pause) {
-+		if (is5325(dev))
-+			reg |= PORT_OVERRIDE_LP_FLOW_25;
-+		else
-+			reg |= PORT_OVERRIDE_TX_FLOW;
-+	}
- 
- 	b53_write8(dev, B53_CTRL_PAGE, off, reg);
- }
---- a/drivers/net/dsa/b53/b53_regs.h
-+++ b/drivers/net/dsa/b53/b53_regs.h
-@@ -95,6 +95,7 @@
- #define   PORT_OVERRIDE_SPEED_10M	(0 << PORT_OVERRIDE_SPEED_S)
- #define   PORT_OVERRIDE_SPEED_100M	(1 << PORT_OVERRIDE_SPEED_S)
- #define   PORT_OVERRIDE_SPEED_1000M	(2 << PORT_OVERRIDE_SPEED_S)
-+#define   PORT_OVERRIDE_LP_FLOW_25	BIT(3) /* BCM5325 only */
- #define   PORT_OVERRIDE_RV_MII_25	BIT(4) /* BCM5325 only */
- #define   PORT_OVERRIDE_RX_FLOW		BIT(4)
- #define   PORT_OVERRIDE_TX_FLOW		BIT(5)
diff --git a/target/linux/generic/backport-6.12/612-13-v6.17-net-dsa-b53-fix-b53_imp_vlan_setup-for-BCM5325.patch b/target/linux/generic/backport-6.12/612-13-v6.17-net-dsa-b53-fix-b53_imp_vlan_setup-for-BCM5325.patch
deleted file mode 100644
index 9d7dcd8402..0000000000
--- a/target/linux/generic/backport-6.12/612-13-v6.17-net-dsa-b53-fix-b53_imp_vlan_setup-for-BCM5325.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From c00df1018791185ea398f78af415a2a0aaa0c79c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari at gmail.com>
-Date: Sat, 14 Jun 2025 09:59:59 +0200
-Subject: [PATCH] net: dsa: b53: fix b53_imp_vlan_setup for BCM5325
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-CPU port should be B53_CPU_PORT instead of B53_CPU_PORT_25 for
-B53_PVLAN_PORT_MASK register.
-
-Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
-Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
-Link: https://patch.msgid.link/20250614080000.1884236-14-noltari at gmail.com
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/dsa/b53/b53_common.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/drivers/net/dsa/b53/b53_common.c
-+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -543,6 +543,10 @@ void b53_imp_vlan_setup(struct dsa_switc
- 	unsigned int i;
- 	u16 pvlan;
- 
-+	/* BCM5325 CPU port is at 8 */
-+	if ((is5325(dev) || is5365(dev)) && cpu_port == B53_CPU_PORT_25)
-+		cpu_port = B53_CPU_PORT;
-+
- 	/* Enable the IMP port to be in the same VLAN as the other ports
- 	 * on a per-port basis such that we only have Port i and IMP in
- 	 * the same VLAN.
diff --git a/target/linux/generic/backport-6.12/612-14-v6.17-net-dsa-b53-ensure-BCM5325-PHYs-are-enabled.patch b/target/linux/generic/backport-6.12/612-14-v6.17-net-dsa-b53-ensure-BCM5325-PHYs-are-enabled.patch
deleted file mode 100644
index f9bea6133a..0000000000
--- a/target/linux/generic/backport-6.12/612-14-v6.17-net-dsa-b53-ensure-BCM5325-PHYs-are-enabled.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 966a83df36c6f27476ac3501771422e7852098bc Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari at gmail.com>
-Date: Sat, 14 Jun 2025 10:00:00 +0200
-Subject: [PATCH] net: dsa: b53: ensure BCM5325 PHYs are enabled
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-According to the datasheet, BCM5325 uses B53_PD_MODE_CTRL_25 register to
-disable clocking to individual PHYs.
-Only ports 1-4 can be enabled or disabled and the datasheet is explicit
-about not toggling BIT(0) since it disables the PLL power and the switch.
-
-Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
-Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
-Link: https://patch.msgid.link/20250614080000.1884236-15-noltari at gmail.com
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/dsa/b53/b53_common.c | 13 +++++++++++++
- drivers/net/dsa/b53/b53_regs.h   |  5 ++++-
- 2 files changed, 17 insertions(+), 1 deletion(-)
-
---- a/drivers/net/dsa/b53/b53_common.c
-+++ b/drivers/net/dsa/b53/b53_common.c
-@@ -660,6 +660,19 @@ int b53_setup_port(struct dsa_switch *ds
- 	if (dsa_is_user_port(ds, port))
- 		b53_set_eap_mode(dev, port, EAP_MODE_SIMPLIFIED);
- 
-+	if (is5325(dev) &&
-+	    in_range(port, 1, 4)) {
-+		u8 reg;
-+
-+		b53_read8(dev, B53_CTRL_PAGE, B53_PD_MODE_CTRL_25, &reg);
-+		reg &= ~PD_MODE_POWER_DOWN_PORT(0);
-+		if (dsa_is_unused_port(ds, port))
-+			reg |= PD_MODE_POWER_DOWN_PORT(port);
-+		else
-+			reg &= ~PD_MODE_POWER_DOWN_PORT(port);
-+		b53_write8(dev, B53_CTRL_PAGE, B53_PD_MODE_CTRL_25, reg);
-+	}
-+
- 	return 0;
- }
- EXPORT_SYMBOL(b53_setup_port);
---- a/drivers/net/dsa/b53/b53_regs.h
-+++ b/drivers/net/dsa/b53/b53_regs.h
-@@ -103,8 +103,11 @@
- #define   PORT_OVERRIDE_SPEED_2000M	BIT(6) /* BCM5301X only, requires setting 1000M */
- #define   PORT_OVERRIDE_EN		BIT(7) /* Use the register contents */
- 
--/* Power-down mode control */
-+/* Power-down mode control (8 bit) */
- #define B53_PD_MODE_CTRL_25		0x0f
-+#define  PD_MODE_PORT_MASK		0x1f
-+/* Bit 0 also powers down the switch. */
-+#define  PD_MODE_POWER_DOWN_PORT(i)	BIT(i)
- 
- /* IP Multicast control (8 bit) */
- #define B53_IP_MULTICAST_CTRL		0x21
diff --git a/target/linux/generic/backport-6.12/720-09-v6.14-net-phy-Constify-struct-mdio_device_id.patch b/target/linux/generic/backport-6.12/720-09-v6.14-net-phy-Constify-struct-mdio_device_id.patch
index a1be891a09..aa5fc662fa 100644
--- a/target/linux/generic/backport-6.12/720-09-v6.14-net-phy-Constify-struct-mdio_device_id.patch
+++ b/target/linux/generic/backport-6.12/720-09-v6.14-net-phy-Constify-struct-mdio_device_id.patch
@@ -205,7 +205,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  };
 --- a/drivers/net/phy/broadcom.c
 +++ b/drivers/net/phy/broadcom.c
-@@ -1717,7 +1717,7 @@ static struct phy_driver broadcom_driver
+@@ -1734,7 +1734,7 @@ static struct phy_driver broadcom_driver
  
  module_phy_driver(broadcom_drivers);
  
@@ -458,7 +458,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	{ }
 --- a/drivers/net/phy/micrel.c
 +++ b/drivers/net/phy/micrel.c
-@@ -5691,7 +5691,7 @@ MODULE_DESCRIPTION("Micrel PHY driver");
+@@ -5701,7 +5701,7 @@ MODULE_DESCRIPTION("Micrel PHY driver");
  MODULE_AUTHOR("David J. Choi");
  MODULE_LICENSE("GPL");
  
@@ -645,7 +645,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  };
 --- a/drivers/net/phy/smsc.c
 +++ b/drivers/net/phy/smsc.c
-@@ -884,7 +884,7 @@ MODULE_DESCRIPTION("SMSC PHY driver");
+@@ -885,7 +885,7 @@ MODULE_DESCRIPTION("SMSC PHY driver");
  MODULE_AUTHOR("Herbert Valerio Riedel");
  MODULE_LICENSE("GPL");
  
diff --git a/target/linux/generic/backport-6.12/830-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch b/target/linux/generic/backport-6.12/830-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch
deleted file mode 100644
index ba83b8e069..0000000000
--- a/target/linux/generic/backport-6.12/830-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 26f732791f2bcab18f59c61915bbe35225f30136 Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel at makrotopia.org>
-Date: Sat, 12 Jul 2025 16:39:21 +0100
-Subject: [PATCH] Revert "leds: trigger: netdev: Configure LED blink interval
- for HW offload"
-
-This reverts commit c629c972b310af41e9e072febb6dae9a299edde6.
-
-While .led_blink_set() would previously put an LED into an unconditional
-permanently blinking state, the offending commit now uses same operation
-to (also?) set the blink timing of the netdev trigger when offloading.
-
-This breaks many if not all of the existing PHY drivers which offer
-offloading LED operations, as those drivers would just put the LED into
-blinking state after .led_blink_set() has been called.
-
-Unfortunately the change even made it into stable kernels for unknown
-reasons, so it should be reverted there as well.
-
-Fixes: c629c972b310a ("leds: trigger: netdev: Configure LED blink interval for HW offload")
-Link: https://lore.kernel.org/linux-leds/c6134e26-2e45-4121-aa15-58aaef327201 at lunn.ch/T/#m9d6fe81bbcb273e59f12bbedbd633edd32118387
-Suggested-by: Andrew Lunn <andrew at lunn.ch>
-Cc: stable at vger.kernel.org
-Signed-off-by: Daniel Golle <daniel at makrotopia.org>
-Reviewed-by: Andrew Lunn <andrew at lunn.ch>
-Link: https://lore.kernel.org/r/6dcc77ee1c9676891d6250d8994850f521426a0f.1752334655.git.daniel at makrotopia.org
-Signed-off-by: Lee Jones <lee at kernel.org>
----
- drivers/leds/trigger/ledtrig-netdev.c | 16 +++-------------
- 1 file changed, 3 insertions(+), 13 deletions(-)
-
---- a/drivers/leds/trigger/ledtrig-netdev.c
-+++ b/drivers/leds/trigger/ledtrig-netdev.c
-@@ -68,7 +68,6 @@ struct led_netdev_data {
- 	unsigned int last_activity;
- 
- 	unsigned long mode;
--	unsigned long blink_delay;
- 	int link_speed;
- 	__ETHTOOL_DECLARE_LINK_MODE_MASK(supported_link_modes);
- 	u8 duplex;
-@@ -87,10 +86,6 @@ static void set_baseline_state(struct le
- 	/* Already validated, hw control is possible with the requested mode */
- 	if (trigger_data->hw_control) {
- 		led_cdev->hw_control_set(led_cdev, trigger_data->mode);
--		if (led_cdev->blink_set) {
--			led_cdev->blink_set(led_cdev, &trigger_data->blink_delay,
--					    &trigger_data->blink_delay);
--		}
- 
- 		return;
- 	}
-@@ -459,11 +454,10 @@ static ssize_t interval_store(struct dev
- 			      size_t size)
- {
- 	struct led_netdev_data *trigger_data = led_trigger_get_drvdata(dev);
--	struct led_classdev *led_cdev = trigger_data->led_cdev;
- 	unsigned long value;
- 	int ret;
- 
--	if (trigger_data->hw_control && !led_cdev->blink_set)
-+	if (trigger_data->hw_control)
- 		return -EINVAL;
- 
- 	ret = kstrtoul(buf, 0, &value);
-@@ -472,13 +466,9 @@ static ssize_t interval_store(struct dev
- 
- 	/* impose some basic bounds on the timer interval */
- 	if (value >= 5 && value <= 10000) {
--		if (trigger_data->hw_control) {
--			trigger_data->blink_delay = value;
--		} else {
--			cancel_delayed_work_sync(&trigger_data->work);
-+		cancel_delayed_work_sync(&trigger_data->work);
- 
--			atomic_set(&trigger_data->interval, msecs_to_jiffies(value));
--		}
-+		atomic_set(&trigger_data->interval, msecs_to_jiffies(value));
- 		set_baseline_state(trigger_data);	/* resets timer */
- 	}
- 
diff --git a/target/linux/generic/hack-6.12/204-module_strip.patch b/target/linux/generic/hack-6.12/204-module_strip.patch
index d999e0992c..1c67eb5de4 100644
--- a/target/linux/generic/hack-6.12/204-module_strip.patch
+++ b/target/linux/generic/hack-6.12/204-module_strip.patch
@@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  endif # MODULES
 --- a/kernel/module/main.c
 +++ b/kernel/module/main.c
-@@ -999,6 +999,7 @@ size_t modinfo_attrs_count = ARRAY_SIZE(
+@@ -1001,6 +1001,7 @@ size_t modinfo_attrs_count = ARRAY_SIZE(
  
  static const char vermagic[] = VERMAGIC_STRING;
  
@@ -110,7 +110,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  int try_to_force_load(struct module *mod, const char *reason)
  {
  #ifdef CONFIG_MODULE_FORCE_LOAD
-@@ -1010,6 +1011,7 @@ int try_to_force_load(struct module *mod
+@@ -1012,6 +1013,7 @@ int try_to_force_load(struct module *mod
  	return -ENOEXEC;
  #endif
  }
@@ -118,7 +118,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  /* Parse tag=value strings from .modinfo section */
  char *module_next_tag_pair(char *string, unsigned long *secsize)
-@@ -2093,9 +2095,11 @@ static void module_augment_kernel_taints
+@@ -2095,9 +2097,11 @@ static void module_augment_kernel_taints
  
  static int check_modinfo(struct module *mod, struct load_info *info, int flags)
  {
@@ -131,7 +131,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (flags & MODULE_INIT_IGNORE_VERMAGIC)
  		modmagic = NULL;
  
-@@ -2109,6 +2113,7 @@ static int check_modinfo(struct module *
+@@ -2111,6 +2115,7 @@ static int check_modinfo(struct module *
  		       info->name, modmagic, vermagic);
  		return -ENOEXEC;
  	}
diff --git a/target/linux/generic/hack-6.12/901-debloat_sock_diag.patch b/target/linux/generic/hack-6.12/901-debloat_sock_diag.patch
index d130b82dd6..17a22d0528 100644
--- a/target/linux/generic/hack-6.12/901-debloat_sock_diag.patch
+++ b/target/linux/generic/hack-6.12/901-debloat_sock_diag.patch
@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
  							  u32));
  INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
-@@ -2326,9 +2343,11 @@ static void __sk_free(struct sock *sk)
+@@ -2342,9 +2359,11 @@ static void __sk_free(struct sock *sk)
  	if (likely(sk->sk_net_refcnt))
  		sock_inuse_add(sock_net(sk), -1);
  
diff --git a/target/linux/generic/hack-6.12/902-debloat_proc.patch b/target/linux/generic/hack-6.12/902-debloat_proc.patch
index c52a7ac5f3..5b344a1982 100644
--- a/target/linux/generic/hack-6.12/902-debloat_proc.patch
+++ b/target/linux/generic/hack-6.12/902-debloat_proc.patch
@@ -331,7 +331,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -4256,6 +4256,8 @@ static __net_initdata struct pernet_oper
+@@ -4273,6 +4273,8 @@ static __net_initdata struct pernet_oper
  
  static int __init proto_init(void)
  {
diff --git a/target/linux/generic/kernel-6.12 b/target/linux/generic/kernel-6.12
index 51f0379fc1..78b4d39332 100644
--- a/target/linux/generic/kernel-6.12
+++ b/target/linux/generic/kernel-6.12
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.12 = .42
-LINUX_KERNEL_HASH-6.12.42 = 4804528a29cd20309a0b41c30e5aeffc35fa21ee3358f4a706d4586d003bc1fb
+LINUX_VERSION-6.12 = .43
+LINUX_KERNEL_HASH-6.12.43 = 0fcbbbbcd456e87bbbfc8bf37af541fda62ccfcce76903503424fd101ef7bdee
diff --git a/target/linux/generic/pending-6.12/454-block-add-support-for-notifications.patch b/target/linux/generic/pending-6.12/454-block-add-support-for-notifications.patch
index 300cbf7c7c..bb78fc368f 100644
--- a/target/linux/generic/pending-6.12/454-block-add-support-for-notifications.patch
+++ b/target/linux/generic/pending-6.12/454-block-add-support-for-notifications.patch
@@ -149,7 +149,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +device_initcall(blk_notifications_init);
 --- a/include/linux/blkdev.h
 +++ b/include/linux/blkdev.h
-@@ -1696,4 +1696,12 @@ static inline bool bdev_can_atomic_write
+@@ -1751,4 +1751,12 @@ static inline bool bdev_can_atomic_write
  
  #define DEFINE_IO_COMP_BATCH(name)	struct io_comp_batch name = { }
  
diff --git a/target/linux/generic/pending-6.12/681-net-remove-NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch b/target/linux/generic/pending-6.12/681-net-remove-NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch
index e89e0d25f5..4cc5717b1c 100644
--- a/target/linux/generic/pending-6.12/681-net-remove-NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch
+++ b/target/linux/generic/pending-6.12/681-net-remove-NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch
@@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -2533,7 +2533,7 @@ void sk_setup_caps(struct sock *sk, stru
+@@ -2550,7 +2550,7 @@ void sk_setup_caps(struct sock *sk, stru
  	if (sk_is_tcp(sk))
  		sk->sk_route_caps |= NETIF_F_GSO;
  	if (sk->sk_route_caps & NETIF_F_GSO)
diff --git a/target/linux/generic/pending-6.12/834-ledtrig-libata.patch b/target/linux/generic/pending-6.12/834-ledtrig-libata.patch
index 72e2a76b62..09c53ee875 100644
--- a/target/linux/generic/pending-6.12/834-ledtrig-libata.patch
+++ b/target/linux/generic/pending-6.12/834-ledtrig-libata.patch
@@ -132,7 +132,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  /*
   * Define if arch has non-standard setup.  This is a _PCI_ standard
-@@ -934,6 +937,10 @@ struct ata_port {
+@@ -935,6 +938,10 @@ struct ata_port {
  #ifdef CONFIG_ATA_ACPI
  	struct ata_acpi_gtm	__acpi_init_gtm; /* use ata_acpi_init_gtm() */
  #endif
diff --git a/target/linux/ipq40xx/patches-6.12/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch b/target/linux/ipq40xx/patches-6.12/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
index 76c36db38f..737da1e2fe 100644
--- a/target/linux/ipq40xx/patches-6.12/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
+++ b/target/linux/ipq40xx/patches-6.12/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
@@ -13,7 +13,7 @@ Signed-off-by: Robert Marko <robert.marko at sartura.hr>
 
 --- a/drivers/mmc/host/sdhci-msm.c
 +++ b/drivers/mmc/host/sdhci-msm.c
-@@ -2369,7 +2369,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat
+@@ -2383,7 +2383,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat
  
  static const struct sdhci_ops sdhci_msm_ops = {
  	.reset = sdhci_and_cqhci_reset,
diff --git a/target/linux/ipq40xx/patches-6.12/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch b/target/linux/ipq40xx/patches-6.12/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
index a90b0aaf9b..6e0f35b6fc 100644
--- a/target/linux/ipq40xx/patches-6.12/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
+++ b/target/linux/ipq40xx/patches-6.12/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
@@ -13,7 +13,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/drivers/mmc/host/sdhci-msm.c
 +++ b/drivers/mmc/host/sdhci-msm.c
-@@ -1804,49 +1804,49 @@ static unsigned int sdhci_msm_get_min_cl
+@@ -1818,49 +1818,49 @@ static unsigned int sdhci_msm_get_min_cl
  	return SDHCI_MSM_MIN_CLOCK;
  }
  
diff --git a/target/linux/ipq40xx/patches-6.12/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.12/701-net-dsa-add-out-of-band-tagging-protocol.patch
index b9be19232d..7d4f7a482f 100644
--- a/target/linux/ipq40xx/patches-6.12/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.12/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +#endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -4792,6 +4792,9 @@ enum skb_ext_id {
+@@ -4798,6 +4798,9 @@ enum skb_ext_id {
  #if IS_ENABLED(CONFIG_MCTP_FLOWS)
  	SKB_EXT_MCTP,
  #endif
diff --git a/target/linux/lantiq/patches-6.12/001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-6.12/001-MIPS-lantiq-add-pcie-driver.patch
index a125b6bfb3..f325607dbf 100644
--- a/target/linux/lantiq/patches-6.12/001-MIPS-lantiq-add-pcie-driver.patch
+++ b/target/linux/lantiq/patches-6.12/001-MIPS-lantiq-add-pcie-driver.patch
@@ -5518,7 +5518,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	  (transaction layer end-to-end CRC checking).
 --- a/include/linux/pci.h
 +++ b/include/linux/pci.h
-@@ -1629,6 +1629,8 @@ void pci_walk_bus_locked(struct pci_bus
+@@ -1643,6 +1643,8 @@ void pci_walk_bus_locked(struct pci_bus
  			 void *userdata);
  int pci_cfg_space_size(struct pci_dev *dev);
  unsigned char pci_bus_max_busnr(struct pci_bus *bus);
diff --git a/target/linux/lantiq/patches-6.12/102-11-v6.17-MIPS-lantiq-falcon-sysctrl-fix-request-memory-check-.patch b/target/linux/lantiq/patches-6.12/102-11-v6.17-MIPS-lantiq-falcon-sysctrl-fix-request-memory-check-.patch
deleted file mode 100644
index 13c72d826b..0000000000
--- a/target/linux/lantiq/patches-6.12/102-11-v6.17-MIPS-lantiq-falcon-sysctrl-fix-request-memory-check-.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 9c9a7ff9882fc6ba7d2f4050697e8bb80383e8dc Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Wed, 18 Jun 2025 22:53:23 +0800
-Subject: [PATCH 11/11] MIPS: lantiq: falcon: sysctrl: fix request memory check
- logic
-
-request_mem_region() will return NULL instead of error code
-when the memory request fails. Therefore, we should check if
-the return value is non-zero instead of less than zero. In
-this way, this patch also fixes the build warnings:
-
-arch/mips/lantiq/falcon/sysctrl.c:214:50: error: ordered comparison of pointer with integer zero [-Werror=extra]
-  214 |                                 res_status.name) < 0) ||
-      |                                                  ^
-arch/mips/lantiq/falcon/sysctrl.c:216:47: error: ordered comparison of pointer with integer zero [-Werror=extra]
-  216 |                                 res_ebu.name) < 0) ||
-      |                                               ^
-arch/mips/lantiq/falcon/sysctrl.c:219:50: error: ordered comparison of pointer with integer zero [-Werror=extra]
-  219 |                                 res_sys[0].name) < 0) ||
-      |                                                  ^
-arch/mips/lantiq/falcon/sysctrl.c:222:50: error: ordered comparison of pointer with integer zero [-Werror=extra]
-  222 |                                 res_sys[1].name) < 0) ||
-      |                                                  ^
-arch/mips/lantiq/falcon/sysctrl.c:225:50: error: ordered comparison of pointer with integer zero [-Werror=extra]
-  225 |                                 res_sys[2].name) < 0))
-      |
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/lantiq/falcon/sysctrl.c | 23 ++++++++++-------------
- 1 file changed, 10 insertions(+), 13 deletions(-)
-
---- a/arch/mips/lantiq/falcon/sysctrl.c
-+++ b/arch/mips/lantiq/falcon/sysctrl.c
-@@ -210,19 +210,16 @@ void __init ltq_soc_init(void)
- 	of_node_put(np_syseth);
- 	of_node_put(np_sysgpe);
- 
--	if ((request_mem_region(res_status.start, resource_size(&res_status),
--				res_status.name) < 0) ||
--		(request_mem_region(res_ebu.start, resource_size(&res_ebu),
--				res_ebu.name) < 0) ||
--		(request_mem_region(res_sys[0].start,
--				resource_size(&res_sys[0]),
--				res_sys[0].name) < 0) ||
--		(request_mem_region(res_sys[1].start,
--				resource_size(&res_sys[1]),
--				res_sys[1].name) < 0) ||
--		(request_mem_region(res_sys[2].start,
--				resource_size(&res_sys[2]),
--				res_sys[2].name) < 0))
-+	if ((!request_mem_region(res_status.start, resource_size(&res_status),
-+				 res_status.name)) ||
-+	    (!request_mem_region(res_ebu.start, resource_size(&res_ebu),
-+				 res_ebu.name)) ||
-+	    (!request_mem_region(res_sys[0].start, resource_size(&res_sys[0]),
-+				 res_sys[0].name)) ||
-+	    (!request_mem_region(res_sys[1].start, resource_size(&res_sys[1]),
-+				 res_sys[1].name)) ||
-+	    (!request_mem_region(res_sys[2].start, resource_size(&res_sys[2]),
-+				 res_sys[2].name)))
- 		pr_err("Failed to request core resources");
- 
- 	status_membase = ioremap(res_status.start,
diff --git a/target/linux/lantiq/patches-6.12/102-12-v6.17-MIPS-vpe-mt-add-missing-prototypes-for-vpe_-alloc-st.patch b/target/linux/lantiq/patches-6.12/102-12-v6.17-MIPS-vpe-mt-add-missing-prototypes-for-vpe_-alloc-st.patch
deleted file mode 100644
index d3ed482bad..0000000000
--- a/target/linux/lantiq/patches-6.12/102-12-v6.17-MIPS-vpe-mt-add-missing-prototypes-for-vpe_-alloc-st.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 844615dd0f2d95c018ec66b943e08af22b62aff3 Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Thu, 3 Jul 2025 21:06:32 +0800
-Subject: [PATCH] MIPS: vpe-mt: add missing prototypes for
- vpe_{alloc,start,stop,free}
-
-These functions are exported but their prototypes are not defined.
-This patch adds the missing function prototypes to fix the following
-compilation warnings:
-
-arch/mips/kernel/vpe-mt.c:180:7: error: no previous prototype for 'vpe_alloc' [-Werror=missing-prototypes]
-  180 | void *vpe_alloc(void)
-      |       ^~~~~~~~~
-arch/mips/kernel/vpe-mt.c:198:5: error: no previous prototype for 'vpe_start' [-Werror=missing-prototypes]
-  198 | int vpe_start(void *vpe, unsigned long start)
-      |     ^~~~~~~~~
-arch/mips/kernel/vpe-mt.c:208:5: error: no previous prototype for 'vpe_stop' [-Werror=missing-prototypes]
-  208 | int vpe_stop(void *vpe)
-      |     ^~~~~~~~
-arch/mips/kernel/vpe-mt.c:229:5: error: no previous prototype for 'vpe_free' [-Werror=missing-prototypes]
-  229 | int vpe_free(void *vpe)
-      |     ^~~~~~~~
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/include/asm/vpe.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/arch/mips/include/asm/vpe.h
-+++ b/arch/mips/include/asm/vpe.h
-@@ -119,4 +119,12 @@ void cleanup_tc(struct tc *tc);
- 
- int __init vpe_module_init(void);
- void __exit vpe_module_exit(void);
-+
-+#ifdef CONFIG_MIPS_VPE_LOADER_MT
-+void *vpe_alloc(void);
-+int vpe_start(void *vpe, unsigned long start);
-+int vpe_stop(void *vpe);
-+int vpe_free(void *vpe);
-+#endif /* CONFIG_MIPS_VPE_LOADER_MT */
-+
- #endif /* _ASM_VPE_H */
diff --git a/target/linux/layerscape/patches-6.12/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch b/target/linux/layerscape/patches-6.12/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
index 71dc41569a..f9ea6a6e4e 100644
--- a/target/linux/layerscape/patches-6.12/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
+++ b/target/linux/layerscape/patches-6.12/400-LF-20-3-mtd-spi-nor-Use-1-bit-mode-of-spansion-s25fs.patch
@@ -15,7 +15,7 @@ Signed-off-by: Kuldeep Singh <kuldeep.singh at nxp.com>
 
 --- a/drivers/mtd/spi-nor/spansion.c
 +++ b/drivers/mtd/spi-nor/spansion.c
-@@ -828,9 +828,9 @@ static const struct flash_info spansion_
+@@ -859,9 +859,9 @@ static const struct flash_info spansion_
  		.name = "s25fs512s",
  		.size = SZ_64M,
  		.sector_size = SZ_256K,
diff --git a/target/linux/qualcommax/patches-6.12/0170-clk-qcom-gcc-ipq8074-fix-broken-freq-table-for-nss_port6_tx_clk_src.patch b/target/linux/qualcommax/patches-6.12/0170-clk-qcom-gcc-ipq8074-fix-broken-freq-table-for-nss_port6_tx_clk_src.patch
deleted file mode 100644
index 1f4c0904e6..0000000000
--- a/target/linux/qualcommax/patches-6.12/0170-clk-qcom-gcc-ipq8074-fix-broken-freq-table-for-nss_port6_tx_clk_src.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From patchwork Thu May 22 20:25:55 2025
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-X-Patchwork-Submitter: Christian Marangi <ansuelsmth at gmail.com>
-X-Patchwork-Id: 14097271
-Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com
- [209.85.221.50])
-	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
-	(No client certificate requested)
-	by smtp.subspace.kernel.org (Postfix) with ESMTPS id BE1BF2B9A9;
-	Thu, 22 May 2025 20:26:28 +0000 (UTC)
-Authentication-Results: smtp.subspace.kernel.org;
- arc=none smtp.client-ip=209.85.221.50
-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
-	t=1747945590; cv=none;
- b=SJyQKJEIm31L7OgiCxpH5eSDCvy3pwWfc5Tm5ylnbA62aIfHLr9TAaJ3qgIEhatEmg1tASNg/kuDmfqVkvTcCgfN89i5AC/I6gvQRguLThtK4NHh5SuCKdUd49BWXk1X+Ma5cEIKEKY+Me0pO1q2XeLvwuWTFN3RHUkygO2Cias=
-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
-	s=arc-20240116; t=1747945590; c=relaxed/simple;
-	bh=RcOtjmSun1IwEL5Wb3PSql0fo4oAT/kf0BO04Ne0FWo=;
-	h=From:To:Cc:Subject:Date:Message-ID:MIME-Version;
- b=lOheyUFV/bVQ1HRRivMF7JOVhTelzBEnWB7rGJmANrNWl2gcgEf+xEHi3nWPULWal/ppIdrVL9LjC0v7KEKoHe6XJ/WmqmhJgrNKiUSUJQbnmUZgaser6iyO9XJUCjR3TlgdSnZ2A8dsLXVbiK2UPLe+GUdb0V5O5ZChOm6rVAM=
-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
- dmarc=pass (p=none dis=none) header.from=gmail.com;
- spf=pass smtp.mailfrom=gmail.com;
- dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
- header.b=U3Ibckvp; arc=none smtp.client-ip=209.85.221.50
-Authentication-Results: smtp.subspace.kernel.org;
- dmarc=pass (p=none dis=none) header.from=gmail.com
-Authentication-Results: smtp.subspace.kernel.org;
- spf=pass smtp.mailfrom=gmail.com
-Authentication-Results: smtp.subspace.kernel.org;
-	dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com
- header.b="U3Ibckvp"
-Received: by mail-wr1-f50.google.com with SMTP id
- ffacd0b85a97d-3a367ec7840so3966539f8f.2;
-        Thu, 22 May 2025 13:26:28 -0700 (PDT)
-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
-        d=gmail.com; s=20230601; t=1747945587; x=1748550387;
- darn=vger.kernel.org;
-        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
-         :to:from:from:to:cc:subject:date:message-id:reply-to;
-        bh=xgvKtt5DybnIrKc6mWPJ7EZTeS6I4nUMUzu2bm2zMtQ=;
-        b=U3IbckvpuScfyKSdVLd02B1axIbs/9630TXWceGPzDNFU/YHi8PIALyMXNVBZ5/DGb
-         fSlmQmam2bC0j5pk1bg2xqWs7I9sCteTah3Ygxo9X1vXhD9PnqbhJfgvQJp3KrNoLwC4
-         JdRzdVi/vjJIEEuMlveXpcanmLLn+BjOEYYMs8x3EZ3yLYQr7KkHtJ+V6HTWPsE47qA8
-         mOdp/ysLZ2jLPihravIjN6BlUSGMz5EkdYudIljy3wYNiga385aw4aQsa79gd/J7RxjD
-         o9GAIcFAtoRp4Co7G632DYC+zoYQw1G10ZfIzT7kOCPRZxoevlaGeRVxsgh9bCnsQ9LT
-         3aog==
-X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
-        d=1e100.net; s=20230601; t=1747945587; x=1748550387;
-        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
-         :to:from:x-gm-message-state:from:to:cc:subject:date:message-id
-         :reply-to;
-        bh=xgvKtt5DybnIrKc6mWPJ7EZTeS6I4nUMUzu2bm2zMtQ=;
-        b=Fdp0DTSGLe7u0fvh/rW+co2BBsFkL9sH5Y4cVO/uEyWrOuDZY4wEIY3k7tT9z/qusu
-         qsBqrFaiXgv99S3sOK6e4buTvnX+yvbk5hBq7kKb+WUSdLnvo7am0NzjlVz3/8ksSosU
-         g/6WFJbxG/UEf7eQS5ze9cOtfag1nj3qpj/wf1od2RAE8KLaGt1yT2RKXrxvWswjVtWc
-         TVKIc5mEANR4fTG4AwfOVG6QBU1JfLpTBS41O9THoy/vk3BI9id6by4w3zsD8BSc4Z6W
-         njvleK+s7I7draMy3YYcYM3etzGD2P5AiJj0NxoyEZ8hCSswjCDIcfQniPRhfblicRBT
-         Bi+Q==
-X-Forwarded-Encrypted: i=1;
- AJvYcCU//xD5uHyFhB4sHqPQHkUS/SeqLIOqpGrEMtx0zyh2/T2x39VopI/PnTpe2ESaMCDbmRl8MurqOBOJ at vger.kernel.org,
- AJvYcCWlko+5ICQgXGZZ6qZxD3WWDXE1EmkOd7Tw+6qOZDni1suR0Um5tG1VcHHtIJIp034hXQ7Tj5WK3veOVQgD at vger.kernel.org,
- AJvYcCXnJcB9/SJexBqJAU7vPtjnJ2eKMHLPx+eHgLCSNvPKpkH7r5TU+eAOzfjqSPvmxKNRZXM/L/CxkyxDzp+n at vger.kernel.org
-X-Gm-Message-State: AOJu0Ywgx5kKVjnck8zcNF5jiJmr1aap8FGVVIFxqqFyLqAdMsRpJ5RM
-	YGVflzDLCHubLU2D5IwFoaoiTDyGi/eHphmIPndSUeFP8moWY/T6O3Pd
-X-Gm-Gg: ASbGncunHQP8921RyvQsddVmY7ua8h+QTVvMvQHB4kaRgHeeD58OPdZJCqc3cNVNIP1
-	X/LZAzqXAmd7j1ls65igxC/kCtPSyDnS4zh1hu6AFlttxuOfgdWgiXbFyqdozanfhYDRhD11FD6
-	aAseq7i2gRb72LDgkGGmwREbBnHgtugTuSboaAJnCaoVVhU53SdpG0XfrAJBxVVHKFRv+WLtktr
-	o0itJiaG5BklL3SQ7I36EqdExH7yo3mPByvwYI5zarwBqgENcIqxoMbum72iweT8YSB7p6h0iMo
-	/dPKuoYps8Nt9k6kkL6oF2SkVLjTvYDQ4kna9JVBqwP0UdjBgTo+FMZBNy6UNnEnJC+4gKrLnE+
-	I1asottOJwbm+C7Ke4/O9
-X-Google-Smtp-Source: 
- AGHT+IE/fBAh0wuvEHRV8Pp3re+RzxCwE85Zo4u5IxHZMcKKHBmdPi+/PvNmPZSoI/27B1urc+XZXg==
-X-Received: by 2002:a05:6000:2281:b0:3a3:7be3:cba9 with SMTP id
- ffacd0b85a97d-3a37be3cebdmr9761395f8f.18.1747945586791;
-        Thu, 22 May 2025 13:26:26 -0700 (PDT)
-Received: from localhost.localdomain (93-34-88-225.ip49.fastwebnet.it.
- [93.34.88.225])
-        by smtp.googlemail.com with ESMTPSA id
- ffacd0b85a97d-3a35ca5a03fsm23883073f8f.22.2025.05.22.13.26.25
-        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
-        Thu, 22 May 2025 13:26:25 -0700 (PDT)
-From: Christian Marangi <ansuelsmth at gmail.com>
-To: Bjorn Andersson <andersson at kernel.org>,
-	Michael Turquette <mturquette at baylibre.com>,
-	Stephen Boyd <sboyd at kernel.org>,
-	Christian Marangi <ansuelsmth at gmail.com>,
-	linux-arm-msm at vger.kernel.org,
-	linux-clk at vger.kernel.org,
-	linux-kernel at vger.kernel.org
-Cc: stable at vger.kernel.org
-Subject: [PATCH] clk: qcom: gcc-ipq8074: fix broken freq table for
- nss_port6_tx_clk_src
-Date: Thu, 22 May 2025 22:25:55 +0200
-Message-ID: <20250522202600.4028-1-ansuelsmth at gmail.com>
-X-Mailer: git-send-email 2.48.1
-Precedence: bulk
-X-Mailing-List: linux-arm-msm at vger.kernel.org
-List-Id: <linux-arm-msm.vger.kernel.org>
-List-Subscribe: <mailto:linux-arm-msm+subscribe at vger.kernel.org>
-List-Unsubscribe: <mailto:linux-arm-msm+unsubscribe at vger.kernel.org>
-MIME-Version: 1.0
-
-With the conversion done by commit e88f03230dc0 ("clk: qcom: gcc-ipq8074:
-rework nss_port5/6 clock to multiple conf") a Copy-Paste error was made
-for the nss_port6_tx_clk_src frequency table.
-
-This was caused by the wrong setting of the parent in
-ftbl_nss_port6_tx_clk_src that was wrongly set to P_UNIPHY1_RX instead
-of P_UNIPHY2_TX.
-
-This cause the UNIPHY2 port to malfunction when it needs to be scaled to
-higher clock. The malfunction was observed with the example scenario
-with an Aquantia 10G PHY connected and a speed higher than 1G (example
-2.5G)
-
-Fix the broken frequency table to restore original functionality.
-
-Cc: stable at vger.kernel.org
-Fixes: e88f03230dc0 ("clk: qcom: gcc-ipq8074: rework nss_port5/6 clock to multiple conf")
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
----
- drivers/clk/qcom/gcc-ipq8074.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- a/drivers/clk/qcom/gcc-ipq8074.c
-+++ b/drivers/clk/qcom/gcc-ipq8074.c
-@@ -1895,10 +1895,10 @@ static const struct freq_conf ftbl_nss_p
- static const struct freq_multi_tbl ftbl_nss_port6_tx_clk_src[] = {
- 	FMS(19200000, P_XO, 1, 0, 0),
- 	FM(25000000, ftbl_nss_port6_tx_clk_src_25),
--	FMS(78125000, P_UNIPHY1_RX, 4, 0, 0),
-+	FMS(78125000, P_UNIPHY2_TX, 4, 0, 0),
- 	FM(125000000, ftbl_nss_port6_tx_clk_src_125),
--	FMS(156250000, P_UNIPHY1_RX, 2, 0, 0),
--	FMS(312500000, P_UNIPHY1_RX, 1, 0, 0),
-+	FMS(156250000, P_UNIPHY2_TX, 2, 0, 0),
-+	FMS(312500000, P_UNIPHY2_TX, 1, 0, 0),
- 	{ }
- };
- 
diff --git a/target/linux/ramips/patches-6.12/810-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-6.12/810-uvc-add-iPassion-iP2970-support.patch
index 0ab9517d88..489d223806 100644
--- a/target/linux/ramips/patches-6.12/810-uvc-add-iPassion-iP2970-support.patch
+++ b/target/linux/ramips/patches-6.12/810-uvc-add-iPassion-iP2970-support.patch
@@ -13,7 +13,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 
 --- a/drivers/media/usb/uvc/uvc_driver.c
 +++ b/drivers/media/usb/uvc/uvc_driver.c
-@@ -3185,6 +3185,18 @@ static const struct usb_device_id uvc_id
+@@ -3197,6 +3197,18 @@ static const struct usb_device_id uvc_id
  	  .bInterfaceSubClass	= 1,
  	  .bInterfaceProtocol	= 0,
  	  .driver_info		= UVC_INFO_META(V4L2_META_FMT_D4XX) },
@@ -64,7 +64,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  #include <media/jpeg.h>
  #include <media/v4l2-common.h>
-@@ -1344,9 +1349,149 @@ static void uvc_video_decode_data(struct
+@@ -1353,9 +1358,149 @@ static void uvc_video_decode_data(struct
  	uvc_urb->async_operations++;
  }
  
@@ -214,7 +214,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	/* Mark the buffer as done if the EOF marker is set. */
  	if (data[1] & UVC_STREAM_EOF && buf->bytesused != 0) {
  		uvc_dbg(stream->dev, FRAME, "Frame complete (EOF found)\n");
-@@ -1928,6 +2073,8 @@ static int uvc_init_video_isoc(struct uv
+@@ -1937,6 +2082,8 @@ static int uvc_init_video_isoc(struct uv
  	if (npackets == 0)
  		return -ENOMEM;
  



From lede-commits at lists.infradead.org  Tue Aug 26 12:35:42 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 15:35:42 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.12 to 6.12.42
In-Reply-To: <175623694107.2921728.821026593586238710@git-01.infra.openwrt.org>
References: <175623694107.2921728.821026593586238710@git-01.infra.openwrt.org>
Message-ID: <mailman.130763.1756238050.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ae49895cd2649b5056b0d8e7df671d0f793b4e68

commit ae49895cd2649b5056b0d8e7df671d0f793b4e68
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Fri Aug 15 15:04:26 2025 -0400

    kernel: bump 6.12 to 6.12.42
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.42
    
    Added backport to fix ipv6 breakage with the 6.12.42 release:
    generic/backport-6.12/621-proc-fix-missing-pde_set_flags.patch[1]
    
    All other patches automatically rebased.
    
    1. https://lore.kernel.org/all/20250821105806.1453833-1-wangzijie1 at honor.com
    
    Build system: x86/64
    Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc
    Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc (Intel N150)
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
    Link: https://github.com/openwrt/openwrt/pull/19618
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../patches-6.12/900-unaligned_access_hacks.patch  |   2 +-
 ...ng-fbtft-Add-support-for-display-variants.patch |   6 +-
 ...Compatibility-hack-should-be-X86-specific.patch |   4 +-
 ...fix-unicast-multicast-flooding-on-BCM5325.patch |   6 +-
 ...pp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch |   2 +-
 .../621-proc-fix-missing-pde_set_flags.patch       | 121 +++++++++++++++++++++
 .../hack-6.12/721-net-add-packet-mangeling.patch   |   4 +-
 target/linux/generic/kernel-6.12                   |   4 +-
 .../650-net-pppoe-implement-GRO-support.patch      |   4 +-
 .../pending-6.12/655-increase_skb_pad.patch        |   2 +-
 ...jecting-with-source-address-failed-policy.patch |  14 +--
 ...f_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |   2 +-
 ...-net-dsa-add-out-of-band-tagging-protocol.patch |   2 +-
 13 files changed, 147 insertions(+), 26 deletions(-)

diff --git a/target/linux/ath79/patches-6.12/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.12/900-unaligned_access_hacks.patch
index ea51478fd0..12fbc59e98 100644
--- a/target/linux/ath79/patches-6.12/900-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-6.12/900-unaligned_access_hacks.patch
@@ -578,7 +578,7 @@ SVN-Revision: 35130
  			goto next_ht;
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -269,7 +269,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
+@@ -271,7 +271,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
  			continue;
  
  		iph2 = (struct ipv6hdr *)(p->data + off);
diff --git a/target/linux/bcm27xx/patches-6.12/950-0196-staging-fbtft-Add-support-for-display-variants.patch b/target/linux/bcm27xx/patches-6.12/950-0196-staging-fbtft-Add-support-for-display-variants.patch
index bf6573548e..105941aa55 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0196-staging-fbtft-Add-support-for-display-variants.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0196-staging-fbtft-Add-support-for-display-variants.patch
@@ -95,7 +95,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  
  #include <video/mipi_display.h>
  
-@@ -1131,6 +1133,7 @@ static struct fbtft_platform_data *fbtft
+@@ -1132,6 +1134,7 @@ static struct fbtft_platform_data *fbtft
   * @display: Display properties
   * @sdev: SPI device
   * @pdev: Platform device
@@ -103,7 +103,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
   *
   * Allocates, initializes and registers a framebuffer
   *
-@@ -1140,12 +1143,15 @@ static struct fbtft_platform_data *fbtft
+@@ -1141,12 +1144,15 @@ static struct fbtft_platform_data *fbtft
   */
  int fbtft_probe_common(struct fbtft_display *display,
  		       struct spi_device *sdev,
@@ -120,7 +120,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	int ret;
  
  	if (sdev)
-@@ -1158,6 +1164,14 @@ int fbtft_probe_common(struct fbtft_disp
+@@ -1159,6 +1165,14 @@ int fbtft_probe_common(struct fbtft_disp
  		pdata = fbtft_properties_read(dev);
  		if (IS_ERR(pdata))
  			return PTR_ERR(pdata);
diff --git a/target/linux/bcm27xx/patches-6.12/950-0330-pps-Compatibility-hack-should-be-X86-specific.patch b/target/linux/bcm27xx/patches-6.12/950-0330-pps-Compatibility-hack-should-be-X86-specific.patch
index 2f8ab29fdd..3d05954a77 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0330-pps-Compatibility-hack-should-be-X86-specific.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0330-pps-Compatibility-hack-should-be-X86-specific.patch
@@ -22,7 +22,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/pps/pps.c
 +++ b/drivers/pps/pps.c
-@@ -249,12 +249,13 @@ static long pps_cdev_ioctl(struct file *
+@@ -254,12 +254,13 @@ static long pps_cdev_ioctl(struct file *
  static long pps_cdev_compat_ioctl(struct file *file,
  		unsigned int cmd, unsigned long arg)
  {
@@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  		struct pps_fdata_compat compat;
  		struct pps_fdata fdata;
  		int err;
-@@ -289,6 +290,7 @@ static long pps_cdev_compat_ioctl(struct
+@@ -296,6 +297,7 @@ static long pps_cdev_compat_ioctl(struct
  		return copy_to_user(uarg, &compat,
  				sizeof(struct pps_fdata_compat)) ? -EFAULT : 0;
  	}
diff --git a/target/linux/generic/backport-6.12/612-12-v6.17-net-dsa-b53-fix-unicast-multicast-flooding-on-BCM5325.patch b/target/linux/generic/backport-6.12/612-12-v6.17-net-dsa-b53-fix-unicast-multicast-flooding-on-BCM5325.patch
index 9044909bc6..063622398a 100644
--- a/target/linux/generic/backport-6.12/612-12-v6.17-net-dsa-b53-fix-unicast-multicast-flooding-on-BCM5325.patch
+++ b/target/linux/generic/backport-6.12/612-12-v6.17-net-dsa-b53-fix-unicast-multicast-flooding-on-BCM5325.patch
@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/b53/b53_common.c
 +++ b/drivers/net/dsa/b53/b53_common.c
-@@ -560,12 +560,24 @@ static void b53_port_set_ucast_flood(str
+@@ -564,12 +564,24 @@ static void b53_port_set_ucast_flood(str
  {
  	u16 uc;
  
@@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
  
  static void b53_port_set_mcast_flood(struct b53_device *dev, int port,
-@@ -573,19 +585,31 @@ static void b53_port_set_mcast_flood(str
+@@ -577,19 +589,31 @@ static void b53_port_set_mcast_flood(str
  {
  	u16 mc;
  
@@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  /* PHY Registers */
  #define B53_PORT_MII_PAGE(i)		(0x10 + (i)) /* Port i MII Registers */
-@@ -369,6 +370,18 @@
+@@ -372,6 +373,18 @@
  #define B53_ARL_SRCH_RSTL(x)		(B53_ARL_SRCH_RSTL_0 + ((x) * 0x10))
  
  /*************************************************************************
diff --git a/target/linux/generic/backport-6.12/620-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch b/target/linux/generic/backport-6.12/620-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
index 64effc5ec8..6d9ac56cf0 100644
--- a/target/linux/generic/backport-6.12/620-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
+++ b/target/linux/generic/backport-6.12/620-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
@@ -47,7 +47,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (error) {
 --- a/drivers/net/ppp/pptp.c
 +++ b/drivers/net/ppp/pptp.c
-@@ -465,6 +465,7 @@ static int pptp_connect(struct socket *s
+@@ -469,6 +469,7 @@ static int pptp_connect(struct socket *s
  	po->chan.mtu -= PPTP_HEADER_OVERHEAD;
  
  	po->chan.hdrlen = 2 + sizeof(struct pptp_gre_header);
diff --git a/target/linux/generic/backport-6.12/621-proc-fix-missing-pde_set_flags.patch b/target/linux/generic/backport-6.12/621-proc-fix-missing-pde_set_flags.patch
new file mode 100644
index 0000000000..ba026b9c3a
--- /dev/null
+++ b/target/linux/generic/backport-6.12/621-proc-fix-missing-pde_set_flags.patch
@@ -0,0 +1,121 @@
+From: wangzijie <wangzijie1 at honor.com>
+To: <akpm at linux-foundation.org>, <brauner at kernel.org>,
+	<viro at zeniv.linux.org.uk>, <adobriyan at gmail.com>,
+	<rick.p.edgecombe at intel.com>, <ast at kernel.org>,
+	<k.shutemov at gmail.com>, <jirislaby at kernel.org>,
+	<linux-fsdevel at vger.kernel.org>
+Cc: <polynomial-c at gmx.de>, <gregkh at linuxfoundation.org>,
+	<stable at vger.kernel.org>, <regressions at lists.linux.dev>,
+	wangzijie <wangzijie1 at honor.com>
+Subject: [PATCH v3] proc: fix missing pde_set_flags() for net proc files
+Date: Thu, 21 Aug 2025 18:58:06 +0800	[thread overview]
+Message-ID: <20250821105806.1453833-1-wangzijie1 at honor.com> (raw)
+
+To avoid potential UAF issues during module removal races, we use pde_set_flags()
+to save proc_ops flags in PDE itself before proc_register(), and then use
+pde_has_proc_*() helpers instead of directly dereferencing pde->proc_ops->*.
+
+However, the pde_set_flags() call was missing when creating net related proc files.
+This omission caused incorrect behavior which FMODE_LSEEK was being cleared
+inappropriately in proc_reg_open() for net proc files. Lars reported it in this link[1].
+
+Fix this by ensuring pde_set_flags() is called when register proc entry, and add
+NULL check for proc_ops in pde_set_flags().
+
+[1]: https://lore.kernel.org/all/20250815195616.64497967 at chagall.paradoxon.rec/
+
+Fixes: ff7ec8dc1b64 ("proc: use the same treatment to check proc_lseek as ones for proc_read_iter et.al")
+Cc: stable at vger.kernel.org
+Reported-by: Lars Wendler <polynomial-c at gmx.de>
+Signed-off-by: wangzijie <wangzijie1 at honor.com>
+---
+v3:
+- followed by Christian's suggestion to stash pde->proc_ops in a local const variable
+v2:
+- followed by Jiri's suggestion to refractor code and reformat commit message
+---
+ fs/proc/generic.c | 38 +++++++++++++++++++++-----------------
+ 1 file changed, 21 insertions(+), 17 deletions(-)
+
+--- a/fs/proc/generic.c
++++ b/fs/proc/generic.c
+@@ -362,6 +362,25 @@ static const struct inode_operations pro
+ 	.setattr	= proc_notify_change,
+ };
+ 
++static void pde_set_flags(struct proc_dir_entry *pde)
++{
++	const struct proc_ops *proc_ops = pde->proc_ops;
++
++	if (!proc_ops)
++		return;
++
++	if (proc_ops->proc_flags & PROC_ENTRY_PERMANENT)
++		pde->flags |= PROC_ENTRY_PERMANENT;
++	if (proc_ops->proc_read_iter)
++		pde->flags |= PROC_ENTRY_proc_read_iter;
++#ifdef CONFIG_COMPAT
++	if (proc_ops->proc_compat_ioctl)
++		pde->flags |= PROC_ENTRY_proc_compat_ioctl;
++#endif
++	if (proc_ops->proc_lseek)
++		pde->flags |= PROC_ENTRY_proc_lseek;
++}
++
+ /* returns the registered entry, or frees dp and returns NULL on failure */
+ struct proc_dir_entry *proc_register(struct proc_dir_entry *dir,
+ 		struct proc_dir_entry *dp)
+@@ -369,6 +388,8 @@ struct proc_dir_entry *proc_register(str
+ 	if (proc_alloc_inum(&dp->low_ino))
+ 		goto out_free_entry;
+ 
++	pde_set_flags(dp);
++
+ 	write_lock(&proc_subdir_lock);
+ 	dp->parent = dir;
+ 	if (pde_subdir_insert(dir, dp) == false) {
+@@ -557,20 +578,6 @@ struct proc_dir_entry *proc_create_reg(c
+ 	return p;
+ }
+ 
+-static void pde_set_flags(struct proc_dir_entry *pde)
+-{
+-	if (pde->proc_ops->proc_flags & PROC_ENTRY_PERMANENT)
+-		pde->flags |= PROC_ENTRY_PERMANENT;
+-	if (pde->proc_ops->proc_read_iter)
+-		pde->flags |= PROC_ENTRY_proc_read_iter;
+-#ifdef CONFIG_COMPAT
+-	if (pde->proc_ops->proc_compat_ioctl)
+-		pde->flags |= PROC_ENTRY_proc_compat_ioctl;
+-#endif
+-	if (pde->proc_ops->proc_lseek)
+-		pde->flags |= PROC_ENTRY_proc_lseek;
+-}
+-
+ struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,
+ 		struct proc_dir_entry *parent,
+ 		const struct proc_ops *proc_ops, void *data)
+@@ -581,7 +588,6 @@ struct proc_dir_entry *proc_create_data(
+ 	if (!p)
+ 		return NULL;
+ 	p->proc_ops = proc_ops;
+-	pde_set_flags(p);
+ 	return proc_register(parent, p);
+ }
+ EXPORT_SYMBOL(proc_create_data);
+@@ -632,7 +638,6 @@ struct proc_dir_entry *proc_create_seq_p
+ 	p->proc_ops = &proc_seq_ops;
+ 	p->seq_ops = ops;
+ 	p->state_size = state_size;
+-	pde_set_flags(p);
+ 	return proc_register(parent, p);
+ }
+ EXPORT_SYMBOL(proc_create_seq_private);
+@@ -663,7 +668,6 @@ struct proc_dir_entry *proc_create_singl
+ 		return NULL;
+ 	p->proc_ops = &proc_single_ops;
+ 	p->single_show = show;
+-	pde_set_flags(p);
+ 	return proc_register(parent, p);
+ }
+ EXPORT_SYMBOL(proc_create_single_data);
diff --git a/target/linux/generic/hack-6.12/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.12/721-net-add-packet-mangeling.patch
index 5ad34a4517..9430070457 100644
--- a/target/linux/generic/hack-6.12/721-net-add-packet-mangeling.patch
+++ b/target/linux/generic/hack-6.12/721-net-add-packet-mangeling.patch
@@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   */
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3213,6 +3213,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -3236,6 +3236,10 @@ static inline int pskb_trim(struct sk_bu
  	return (len < skb->len) ? __pskb_trim(skb, len) : 0;
  }
  
@@ -63,7 +63,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  /**
   *	pskb_trim_unique - remove end from a paged unique (not cloned) buffer
   *	@skb: buffer to alter
-@@ -3378,16 +3382,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -3401,16 +3405,6 @@ static inline struct sk_buff *dev_alloc_
  }
  
  
diff --git a/target/linux/generic/kernel-6.12 b/target/linux/generic/kernel-6.12
index 11f05faf1c..51f0379fc1 100644
--- a/target/linux/generic/kernel-6.12
+++ b/target/linux/generic/kernel-6.12
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.12 = .41
-LINUX_KERNEL_HASH-6.12.41 = 6b19a3ae99423de2416964d67251d745910277af258b4c4c63e88fd87dbf0e27
+LINUX_VERSION-6.12 = .42
+LINUX_KERNEL_HASH-6.12.42 = 4804528a29cd20309a0b41c30e5aeffc35fa21ee3358f4a706d4586d003bc1fb
diff --git a/target/linux/generic/pending-6.12/650-net-pppoe-implement-GRO-support.patch b/target/linux/generic/pending-6.12/650-net-pppoe-implement-GRO-support.patch
index d7260296bd..11d0f03fba 100644
--- a/target/linux/generic/pending-6.12/650-net-pppoe-implement-GRO-support.patch
+++ b/target/linux/generic/pending-6.12/650-net-pppoe-implement-GRO-support.patch
@@ -230,7 +230,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  {
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -304,6 +304,7 @@ out:
+@@ -306,6 +306,7 @@ out:
  
  	return pp;
  }
@@ -238,7 +238,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  static struct sk_buff *sit_ip6ip6_gro_receive(struct list_head *head,
  					      struct sk_buff *skb)
-@@ -386,6 +387,7 @@ INDIRECT_CALLABLE_SCOPE int ipv6_gro_com
+@@ -388,6 +389,7 @@ INDIRECT_CALLABLE_SCOPE int ipv6_gro_com
  out:
  	return err;
  }
diff --git a/target/linux/generic/pending-6.12/655-increase_skb_pad.patch b/target/linux/generic/pending-6.12/655-increase_skb_pad.patch
index 6fa3358218..57857272f0 100644
--- a/target/linux/generic/pending-6.12/655-increase_skb_pad.patch
+++ b/target/linux/generic/pending-6.12/655-increase_skb_pad.patch
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3180,7 +3180,7 @@ static inline int pskb_network_may_pull(
+@@ -3203,7 +3203,7 @@ static inline int pskb_network_may_pull(
   * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
   */
  #ifndef NET_SKB_PAD
diff --git a/target/linux/generic/pending-6.12/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-6.12/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
index d10f39cf22..f0cdd65766 100644
--- a/target/linux/generic/pending-6.12/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
+++ b/target/linux/generic/pending-6.12/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
@@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  		cfg->fc_flags |= RTF_REJECT;
  
  	if (rtm->rtm_type == RTN_LOCAL)
-@@ -6349,6 +6380,8 @@ static int ip6_route_dev_notify(struct n
+@@ -6357,6 +6388,8 @@ static int ip6_route_dev_notify(struct n
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  		net->ipv6.ip6_prohibit_entry->dst.dev = dev;
  		net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  		net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
  		net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
  #endif
-@@ -6360,6 +6393,7 @@ static int ip6_route_dev_notify(struct n
+@@ -6368,6 +6401,7 @@ static int ip6_route_dev_notify(struct n
  		in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  		in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
@@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  		in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
  #endif
  	}
-@@ -6555,6 +6589,8 @@ static int __net_init ip6_route_net_init
+@@ -6563,6 +6597,8 @@ static int __net_init ip6_route_net_init
  
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  	net->ipv6.fib6_has_custom_rules = false;
@@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  	net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
  					       sizeof(*net->ipv6.ip6_prohibit_entry),
  					       GFP_KERNEL);
-@@ -6565,11 +6601,21 @@ static int __net_init ip6_route_net_init
+@@ -6573,11 +6609,21 @@ static int __net_init ip6_route_net_init
  			 ip6_template_metrics, true);
  	INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->dst.rt_uncached);
  
@@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  	net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
  	dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
  			 ip6_template_metrics, true);
-@@ -6596,6 +6642,8 @@ out:
+@@ -6604,6 +6650,8 @@ out:
  	return ret;
  
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
@@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  out_ip6_prohibit_entry:
  	kfree(net->ipv6.ip6_prohibit_entry);
  out_ip6_null_entry:
-@@ -6615,6 +6663,7 @@ static void __net_exit ip6_route_net_exi
+@@ -6623,6 +6671,7 @@ static void __net_exit ip6_route_net_exi
  	kfree(net->ipv6.ip6_null_entry);
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  	kfree(net->ipv6.ip6_prohibit_entry);
@@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  	kfree(net->ipv6.ip6_blk_hole_entry);
  #endif
  	dst_entries_destroy(&net->ipv6.ip6_dst_ops);
-@@ -6698,6 +6747,9 @@ void __init ip6_route_init_special_entri
+@@ -6706,6 +6755,9 @@ void __init ip6_route_init_special_entri
  	init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
  	init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
  	init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
diff --git a/target/linux/generic/pending-6.12/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.12/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index ceb191e5c5..2ab483d6c4 100644
--- a/target/linux/generic/pending-6.12/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-6.12/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -8658,7 +8658,7 @@ static int nft_register_flowtable_net_ho
+@@ -8638,7 +8638,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);
diff --git a/target/linux/ipq40xx/patches-6.12/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.12/701-net-dsa-add-out-of-band-tagging-protocol.patch
index 79a4f74fcf..b9be19232d 100644
--- a/target/linux/ipq40xx/patches-6.12/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.12/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +#endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -4769,6 +4769,9 @@ enum skb_ext_id {
+@@ -4792,6 +4792,9 @@ enum skb_ext_id {
  #if IS_ENABLED(CONFIG_MCTP_FLOWS)
  	SKB_EXT_MCTP,
  #endif



From lede-commits at lists.infradead.org  Tue Aug 26 14:45:20 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 17:45:20 -0400
Subject: [openwrt/openwrt]  realtek: rtl931x: Register support for trapping
 management frames
In-Reply-To: <175624471813.3368972.2404461991298776891@git-01.infra.openwrt.org>
References: <175624471813.3368972.2404461991298776891@git-01.infra.openwrt.org>
Message-ID: <mailman.130783.1756244722.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/43dbc6d4d65cdc0ae80eb074aff5b311608dcb24

commit 43dbc6d4d65cdc0ae80eb074aff5b311608dcb24
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Fri Aug 8 17:31:03 2025 +0200

    realtek: rtl931x: Register support for trapping management frames
    
    Driver needs to configure management frame actions
    To support LLDP, EAPOL or MSTP, which needs to be trapped to the CPU
    instead of being forwarded.
    
    The function to implement the various management frame actions was already
    present but not yet registered correctly.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19571
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h | 2 +-
 target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
index 6d7f154129..88aee748c6 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
@@ -211,7 +211,7 @@ void rtl930x_pie_rule_dump_raw(u32 r[]);
 void rtl931x_print_matrix(void);
 
 void rtldsa_930x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action);
-void rtl931x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action);
+void rtldsa_931x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action);
 
 void rtl931x_sw_init(struct rtl838x_switch_priv *priv);
 
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
index 226b7ce5d3..cac09081ef 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl931x.c
@@ -328,7 +328,7 @@ void rtl931x_print_matrix(void)
 	rtl_table_release(r);
 }
 
-void rtl931x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action)
+void rtldsa_931x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action)
 {
 	u32 value = 0;
 
@@ -1587,4 +1587,5 @@ const struct rtl838x_reg rtl931x_reg = {
 	.led_init = rtldsa_931x_led_init,
 	.enable_learning = rtldsa_931x_enable_learning,
 	.enable_flood = rtldsa_931x_enable_flood,
+	.set_receive_management_action = rtldsa_931x_set_receive_management_action,
 };



From lede-commits at lists.infradead.org  Tue Aug 26 14:45:21 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 17:45:21 -0400
Subject: [openwrt/openwrt]  realtek: rtl93xx: Trap LLDP management frames
In-Reply-To: <175624471813.3368972.2404461991298776891@git-01.infra.openwrt.org>
References: <175624471813.3368972.2404461991298776891@git-01.infra.openwrt.org>
Message-ID: <mailman.130784.1756244722.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/18077d22e9754cdff64825ef81eb66bdd5fa58fb

commit 18077d22e9754cdff64825ef81eb66bdd5fa58fb
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Fri Aug 8 17:31:03 2025 +0200

    realtek: rtl93xx: Trap LLDP management frames
    
    LLDP packets must be transmitted on a single port and trapped on a port of
    a device which understands LLDP. It must not forward it to other ports to
    avoid confusing neighbor information on connected devices.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19571
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
index 4dbf3d29ff..a30c681c9a 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
@@ -529,6 +529,8 @@ static int rtl93xx_setup(struct dsa_switch *ds)
 
 	rtl83xx_vlan_setup(priv);
 
+	rtldsa_setup_lldp_traps(priv);
+
 	ds->configure_vlan_while_not_filtering = true;
 
 	priv->r->l2_learning_setup();



From lede-commits at lists.infradead.org  Tue Aug 26 14:45:18 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 17:45:18 -0400
Subject: [openwrt/openwrt]  realtek: dsa: Fix prefix for trapping functions
In-Reply-To: <175624471813.3368972.2404461991298776891@git-01.infra.openwrt.org>
References: <175624471813.3368972.2404461991298776891@git-01.infra.openwrt.org>
Message-ID: <mailman.130787.1756244725.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1b436585a2ac420d19eee3a376d221d298b0c90b

commit 1b436585a2ac420d19eee3a376d221d298b0c90b
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Fri Aug 8 17:31:03 2025 +0200

    realtek: dsa: Fix prefix for trapping functions
    
    The functions to enable trapping of management frames are not RTL83xx
    specific. It is more appropriate to use the more generic "rtldsa" prefix
    for them.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19571
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
index fbb1a4ba2f..4dbf3d29ff 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
@@ -397,13 +397,13 @@ static void rtl83xx_vlan_setup(struct rtl838x_switch_priv *priv)
 		priv->r->vlan_fwd_on_inner(i, true);
 }
 
-static void rtl83xx_setup_bpdu_traps(struct rtl838x_switch_priv *priv)
+static void rtldsa_setup_bpdu_traps(struct rtl838x_switch_priv *priv)
 {
 	for (int i = 0; i < priv->cpu_port; i++)
 		priv->r->set_receive_management_action(i, BPDU, TRAP2CPU);
 }
 
-static void rtl83xx_setup_lldp_traps(struct rtl838x_switch_priv *priv)
+static void rtldsa_setup_lldp_traps(struct rtl838x_switch_priv *priv)
 {
 	for (int i = 0; i < priv->cpu_port; i++)
 		priv->r->set_receive_management_action(i, LLDP, TRAP2CPU);
@@ -461,8 +461,8 @@ static int rtl83xx_setup(struct dsa_switch *ds)
 
 	rtl83xx_vlan_setup(priv);
 
-	rtl83xx_setup_bpdu_traps(priv);
-	rtl83xx_setup_lldp_traps(priv);
+	rtldsa_setup_bpdu_traps(priv);
+	rtldsa_setup_lldp_traps(priv);
 
 	ds->configure_vlan_while_not_filtering = true;
 



From lede-commits at lists.infradead.org  Tue Aug 26 14:45:19 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 17:45:19 -0400
Subject: [openwrt/openwrt]  realtek: rtl930x: Add support for trapping
 management frames
In-Reply-To: <175624471813.3368972.2404461991298776891@git-01.infra.openwrt.org>
References: <175624471813.3368972.2404461991298776891@git-01.infra.openwrt.org>
Message-ID: <mailman.130788.1756244725.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/75fe6b2d0b919be29c5f7d6dca373c617747b8d1

commit 75fe6b2d0b919be29c5f7d6dca373c617747b8d1
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Fri Aug 8 17:31:03 2025 +0200

    realtek: rtl930x: Add support for trapping management frames
    
    Driver needs to configure management frame actions
    To support LLDP, EAPOL or MSTP, which needs to be trapped to the CPU
    instead of being forwarded
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19571
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h   |  1 +
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h   |  3 +
 .../files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c   | 80 ++++++++++++++++++++++
 3 files changed, 84 insertions(+)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
index 544f693883..5ec3905a80 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl838x.h
@@ -471,6 +471,7 @@ typedef enum {
 #define RTL931X_RMA_LLDP_CTRL			(0x8918)
 
 #define RTL930X_RMA_EAPOL_CTRL			(0x9F08)
+#define RTL930X_SPCL_TRAP_PORT_CTRL		(0xA1A0)
 #define RTL931X_RMA_EAPOL_CTRL			(0x8930)
 #define RTL931X_TRAP_ARP_GRAT_PORT_ACT		(0x8C04)
 
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
index ef5230d92e..6d7f154129 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl83xx.h
@@ -209,7 +209,10 @@ void rtl9300_dump_debug(void);
 void rtl930x_pie_rule_dump_raw(u32 r[]);
 
 void rtl931x_print_matrix(void);
+
+void rtldsa_930x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action);
 void rtl931x_set_receive_management_action(int port, rma_ctrl_t type, action_type_t action);
+
 void rtl931x_sw_init(struct rtl838x_switch_priv *priv);
 
 #endif /* _NET_DSA_RTL83XX_H */
diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
index c84ed6cca0..a421db4d0d 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/rtl930x.c
@@ -657,6 +657,85 @@ static void rtl930x_write_mcast_pmask(int idx, u64 portmask)
 	rtl_table_release(q);
 }
 
+void rtldsa_930x_set_receive_management_action(int port, rma_ctrl_t type,
+					       action_type_t action)
+{
+	u32 shift;
+	u32 value;
+	u32 reg;
+
+	/* hack for value mapping */
+	if (type == GRATARP && action == COPY2CPU)
+		action = TRAP2MASTERCPU;
+
+	/* PTP doesn't allow to flood to all ports */
+	if (action == FLOODALL &&
+	    (type == PTP || type == PTP_UDP || type == PTP_ETH2)) {
+		pr_warn("%s: Port flooding not supported for PTP\n", __func__);
+		return;
+	}
+
+	switch(action) {
+	case FORWARD:
+		value = 0;
+		break;
+	case DROP:
+		value = 1;
+		break;
+	case TRAP2CPU:
+		value = 2;
+		break;
+	case TRAP2MASTERCPU:
+		value = 3;
+		break;
+	case FLOODALL:
+		value = 4;
+		break;
+	default:
+		return;
+	}
+
+	switch(type) {
+	case BPDU:
+		reg = RTL930X_RMA_BPDU_CTRL + (port / 10) * 4;
+		shift = (port % 10) * 3;
+		sw_w32_mask(GENMASK(shift + 2, shift), value << shift, reg);
+		break;
+	case PTP:
+		reg = RTL930X_RMA_PTP_CTRL + port * 4;
+
+		/* udp */
+		sw_w32_mask(GENMASK(3, 2), value << 2, reg);
+
+		/* eth2 */
+		sw_w32_mask(GENMASK(1, 0), value, reg);
+		break;
+	case PTP_UDP:
+		reg = RTL930X_RMA_PTP_CTRL + port * 4;
+		sw_w32_mask(GENMASK(3, 2), value << 2, reg);
+		break;
+	case PTP_ETH2:
+		reg = RTL930X_RMA_PTP_CTRL + port * 4;
+		sw_w32_mask(GENMASK(1, 0), value, reg);
+		break;
+	case LLDP:
+		reg = RTL930X_RMA_LLDP_CTRL + (port / 10) * 4;
+		shift = (port % 10) * 3;
+		sw_w32_mask(GENMASK(shift + 2, shift), value << shift, reg);
+		break;
+	case EAPOL:
+		reg = RTL930X_RMA_EAPOL_CTRL + (port / 10) * 4;
+		shift = (port % 10) * 3;
+		sw_w32_mask(GENMASK(shift + 2, shift), value << shift, reg);
+		break;
+	case GRATARP:
+		reg = RTL930X_SPCL_TRAP_PORT_CTRL + (port / 16) * 4;
+		shift = (port % 16) * 2;
+		sw_w32_mask(GENMASK(shift + 1, shift), value << shift, reg);
+		break;
+	}
+}
+
 static u64 rtl930x_traffic_get(int source)
 {
 	u32 v;
@@ -2419,4 +2498,5 @@ const struct rtl838x_reg rtl930x_reg = {
 	.led_init = rtl930x_led_init,
 	.enable_learning = rtldsa_930x_enable_learning,
 	.enable_flood = rtldsa_930x_enable_flood,
+	.set_receive_management_action = rtldsa_930x_set_receive_management_action,
 };



From lede-commits at lists.infradead.org  Tue Aug 26 18:28:54 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 26 Aug 2025 21:28:54 -0400
Subject: [openwrt/openwrt]  include: make APK .list files even more
 reproducible
In-Reply-To: <175625813492.226389.6690632944383924237@git-01.infra.openwrt.org>
References: <175625813492.226389.6690632944383924237@git-01.infra.openwrt.org>
Message-ID: <mailman.130828.1756258139.1866309.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/44f76177d564c9c5d24f5bdf3329d19eba26740d

commit 44f76177d564c9c5d24f5bdf3329d19eba26740d
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Tue Aug 26 13:36:54 2025 +0200

    include: make APK .list files even more reproducible
    
    This commit fixes "aff2f096235 include: make APK .list files reproducible"
    since it would create the .list file while `find` still runs. This causes the
    .list file to be part of itself. As an alternative, write the file to a
    temporary folder first and then move it.
    
    Fix: aff2f096235 include: make APK .list files reproducible
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 include/package-pack.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/package-pack.mk b/include/package-pack.mk
index 318d8ee5f6..38655a4492 100644
--- a/include/package-pack.mk
+++ b/include/package-pack.mk
@@ -353,7 +353,7 @@ else
 
 	if [ -n "$(USERID)" ]; then echo $(USERID) > $$(IDIR_$(1))/lib/apk/packages/$(1).rusers; fi;
 	if [ -n "$(ALTERNATIVES)" ]; then echo $(ALTERNATIVES) > $$(IDIR_$(1))/lib/apk/packages/$(1).alternatives; fi;
-	(cd $$(IDIR_$(1)) && find . -type f,l -printf "/%P\n" | sort > $$(IDIR_$(1))/lib/apk/packages/$(1).list)
+	(cd $$(IDIR_$(1)) && find . -type f,l -printf "/%P\n" | sort > $(TMP_DIR)/$(1).list && mv $(TMP_DIR)/$(1).list $$(IDIR_$(1))/lib/apk/packages/$(1).list)
 	# Move conffiles to IDIR and build conffiles_static with csums
 	if [ -f $$(ADIR_$(1))/conffiles ]; then \
 		mv -f $$(ADIR_$(1))/conffiles $$(IDIR_$(1))/lib/apk/packages/$(1).conffiles; \



From lede-commits at lists.infradead.org  Wed Aug 27 00:50:05 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 27 Aug 2025 03:50:05 -0400
Subject: [openwrt/openwrt]  qualcommax: migrate wifi configuration (ath10k)
 device paths for 6.12 kernel
In-Reply-To: <175628100590.1716826.6052559543207256702@git-01.infra.openwrt.org>
References: <175628100590.1716826.6052559543207256702@git-01.infra.openwrt.org>
Message-ID: <mailman.131125.1756281010.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/21059cb83b202104bdc19a37c5de02cd2cc555e3

commit 21059cb83b202104bdc19a37c5de02cd2cc555e3
Author: Agustin Lorenzo <agustin.lorenzo at thinco.es>
AuthorDate: Sun Jul 20 23:51:50 2025 +0200

    qualcommax: migrate wifi configuration (ath10k) device paths for 6.12 kernel
    
    The device tree PCIe host node name has been changed in the new
    6.12 kernel[1]. Hence we have to update the wifi device path to
    make sure it can work properly.
    
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.12.y&id=07299ba2e7d98045e6b522f7c5b97f402b15bc82
    
    Signed-off-by: Agustin Lorenzo <agustin.lorenzo at thinco.es>
    Signed-off-by: Sean Khan <datapronix at protonmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19479
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../ipq807x/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate       | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate
index 9e8879905a..c08e10bf07 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/05-wifi-migrate
@@ -29,11 +29,14 @@ check_path()
 	config_get path "$config" path
 
 	to=${path/soc\//soc at 0\/}
+	to=${to/pci\//pcie\/}
 
 	# Checks if kernel version is less than 6.6.0, if it is and the path is using the new format,
 	# then path should be migrated to the old format. This would allow users on platforms with two partitions,
 	# to test 6.1 and 6.6.
-	[ "$(get_linux_version)" -lt "606000" ] && to=${path/soc at 0\//soc\/}
+	[ "$(get_linux_version)" -lt "606000" ] && to=${to/soc at 0\//soc\/}
+
+	[ "$(get_linux_version)" -lt "612000" ] && to=${to/pcie\//pci\/}
 
 	[ "$path" = "$to" ] || do_migrate_radio "$config" "$path" "$to"
 }



From lede-commits at lists.infradead.org  Wed Aug 27 01:29:39 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 27 Aug 2025 04:29:39 -0400
Subject: [openwrt/openwrt]  hostapd: fix wds ap on single-wiphy devices
In-Reply-To: <175628337822.1867647.12594495031666097595@git-01.infra.openwrt.org>
References: <175628337822.1867647.12594495031666097595@git-01.infra.openwrt.org>
Message-ID: <mailman.131178.1756283588.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9c895bacfb11374b13bf38d614552893d1c95b2f

commit 9c895bacfb11374b13bf38d614552893d1c95b2f
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Aug 26 22:14:21 2025 +0200

    hostapd: fix wds ap on single-wiphy devices
    
    Ensure events are passed to the right interface
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...80211-fix-reporting-spurious-frame-events.patch | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/package/network/services/hostapd/patches/060-nl80211-fix-reporting-spurious-frame-events.patch b/package/network/services/hostapd/patches/060-nl80211-fix-reporting-spurious-frame-events.patch
new file mode 100644
index 0000000000..902fd4726e
--- /dev/null
+++ b/package/network/services/hostapd/patches/060-nl80211-fix-reporting-spurious-frame-events.patch
@@ -0,0 +1,22 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 26 Aug 2025 22:04:57 +0200
+Subject: [PATCH] nl80211: fix reporting spurious frame events
+
+When the nl80211 driver is shared across multiple interfaces (on the same
+wiphy), nl80211_spurious_frame can send the event to the wrong interface by
+using drv->ctx. Fix this by using bss->ctx instead.
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/src/drivers/driver_nl80211_event.c
++++ b/src/drivers/driver_nl80211_event.c
+@@ -2789,7 +2789,7 @@ static void nl80211_spurious_frame(struc
+ 	event.rx_from_unknown.addr = nla_data(tb[NL80211_ATTR_MAC]);
+ 	event.rx_from_unknown.wds = wds;
+ 
+-	wpa_supplicant_event(drv->ctx, EVENT_RX_FROM_UNKNOWN, &event);
++	wpa_supplicant_event(bss->ctx, EVENT_RX_FROM_UNKNOWN, &event);
+ }
+ 
+ 



From lede-commits at lists.infradead.org  Wed Aug 27 01:29:38 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 27 Aug 2025 04:29:38 -0400
Subject: [openwrt/openwrt]  hostapd: update to Git HEAD (2025-08-26)
In-Reply-To: <175628337822.1867647.12594495031666097595@git-01.infra.openwrt.org>
References: <175628337822.1867647.12594495031666097595@git-01.infra.openwrt.org>
Message-ID: <mailman.131179.1756283588.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/95c8b385e58f8c73ef3f01b3757cb066f6ec8b95

commit 95c8b385e58f8c73ef3f01b3757cb066f6ec8b95
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Aug 26 22:06:25 2025 +0200

    hostapd: update to Git HEAD (2025-08-26)
    
    33fb6c738bc4 P2P2: Enable some testing parameters without CONFIG_TESTING_OPTIONS
    56616c4183a6 P2P2: Update device name with USD device found
    1d791939dcdf Cancel pending connect radio work when network is removed
    8235e21d7fe3 P2P: Fix preferred frequency list size handling in p2p_check_pref_chan()
    4bc754d9c727 Add QCA vendor interface to enable/disable TX power limit
    d65f5705df98 Add QCA vendor attribute to disable A-MSDU address check validation
    74881765b7fb nl80211: Use i802_bss in qca_set_allowed_ap_freqs() to use correct ifindex
    ca8303135cbb P2P2: Set P2P mode to the driver on P2P GO device
    063ae7af68dc ACS: Fix incorrect index calculation for primary channel
    4aa3a58377c1 ACS: Validate all channels in a segment before selection
    02c9d3376224 ACS: Extend support to exclude 6 GHz non-PSC in non-offloaded ACS
    307365eb57bb tests: Add test for ACS exclude 6 GHz non-PSC
    0721e4886316 Add QCA vendor attribute to configure EHT RTWT support
    76b39db44c77 QCA vendor attribute to configure BTM MLD Recommendation For Multiple APs support
    2faeffdeca22 AP MLD: Properly deinit sm of non-ML STA connected to ML AP
    e4f4e5a872a5 AP MLD: Fix STA's flag wrongly updated in SME-in-driver cases
    ec6cade42c0f Increase buffer size to handle long freq_list entries in config
    0522585da7b0 Write freq_list as per-network item in wpa_supplicant.conf
    5e527704b912 Use SCS reconfiguration logic under CONFIG_NO_ROBUST_AV
    5d6214a724c1 PASN: Clear driver/firwmare ranging context if PASN Auth 1 fails
    14dc782d50db DPP: Avoid generating DPP shared secret(z) for non-association links
    40326b60b17a RSNO: Allow OWE to be configured in RSN overrides in AP processing
    acadef1b04d5 hostapd_cli: Open a new hostapd connection on ping failure when using -a
    ac0d9bd80ec5 Add QCA vendor attributes to configure global TX chain mask
    f5b8ef6c966a Add QCA vendor attributes for MSDU TX statistics
    6c11fcefe4fc hostapd: Prevent blocking sends on control interface monitor socket
    0bbb8a66f64c AP MLD: Remove redundant outer loop in hostapd_notif_disassoc_mld()
    52fb5ccd91f3 AP MLD: Avoid using mld_id to identify partners
    7bb930d50b5f wpa_supplicant: Add option to disable 80+80 MHz opclass advertisement
    9001059bd6ad tests: Make dbus_connect_oom more robust
    663fb1940231 AP MLD: Fix hostapd_is_mld_ap() check
    590f3bdb4c61 AP MLD: Rename hostapd_is_mld_ap() to hostapd_is_multiple_link_mld()
    b13b69a235f7 Add VLANID in the AP-STA-CONNECTED events
    c1e8b1c6462b SAE: Assign VLAN when using PMKSA caching
    9bc29dcdfdee SAE: Default password binding through control interface
    9de127c31c40 tests: More testing coverage for SAE with multiple passwords
    5ce1d4180386 nl80211: Fix crash by cancelling scan timeout before a BSS is removed
    ca266cc24d87 nl80211: Fix crash by setting the drv->ctx properly
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/hostapd/Makefile          |  6 +--
 ...DFS-channels-to-be-selected-if-dfs-is-ena.patch | 24 +++++-----
 ...e-deterministic-channel-on-channel-switch.patch |  2 +-
 ...021-fix-sta-add-after-previous-connection.patch |  4 +-
 ...211-Accept-a-global-nl80211-event-to-a-br.patch |  6 +--
 ...1-add-extra-ies-only-if-allowed-by-driver.patch |  2 +-
 ...s-Makefile-make-run-tests-with-CONFIG_TLS.patch |  2 +-
 .../services/hostapd/patches/200-multicall.patch   | 18 ++++----
 ...e-WNM_AP-functions-dependant-on-CONFIG_AP.patch |  4 +-
 .../patches/252-disable_ctrl_iface_mib.patch       | 18 ++++----
 .../services/hostapd/patches/301-mesh-noscan.patch | 10 ++--
 .../hostapd/patches/310-rescan_immediately.patch   |  2 +-
 .../341-mesh-ctrl-iface-channel-switch.patch       |  2 +-
 .../hostapd/patches/370-preserve_radio_mask.patch  |  8 ++--
 ...ant-add-new-config-params-to-be-used-with.patch |  2 +-
 .../patches/463-add-mcast_rate-to-11s.patch        |  6 +--
 .../hostapd/patches/464-fix-mesh-obss-check.patch  |  2 +-
 .../hostapd/patches/600-ubus_support.patch         | 54 +++++++++++-----------
 .../hostapd/patches/601-ucode_support.patch        | 44 +++++++++---------
 .../services/hostapd/patches/730-ft_iface.patch    |  2 +-
 .../services/hostapd/patches/740-snoop_iface.patch |  6 +--
 .../hostapd/patches/760-dynamic_own_ip.patch       |  2 +-
 .../hostapd/patches/763-radius-wispr.patch         |  4 +-
 ...Implement-APuP-Access-Point-Micro-Peering.patch | 10 ++--
 .../patches/803-hostapd-fix-80211be-build.patch    |  2 +-
 25 files changed, 122 insertions(+), 120 deletions(-)

diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index 4522eec8d4..8968f08029 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -9,9 +9,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2025-06-27
-PKG_SOURCE_VERSION:=ea08700a762f13c415e319993720bed83ad9aa2c
-PKG_MIRROR_HASH:=8bfd23188058611a7efb3b0064a7601f8073ceedbf1538a99f93abc743608d46
+PKG_SOURCE_DATE:=2025-08-26
+PKG_SOURCE_VERSION:=ca266cc24d8705eb1a2a0857ad326e48b1408b20
+PKG_MIRROR_HASH:=59ac677093f524ff98588abd9f33805a336a6e929d6814222f0d784c854f2343
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_LICENSE:=BSD-3-Clause
diff --git a/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch b/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
index aba2ff08bc..1b43b1df2b 100644
--- a/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
+++ b/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
@@ -14,7 +14,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
 
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2974,7 +2974,7 @@ static int drv_supports_vht(struct wpa_s
+@@ -2976,7 +2976,7 @@ static int drv_supports_vht(struct wpa_s
  }
  
  
@@ -23,7 +23,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  {
  	int i;
  
-@@ -2983,7 +2983,10 @@ static bool ibss_mesh_is_80mhz_avail(int
+@@ -2985,7 +2985,10 @@ static bool ibss_mesh_is_80mhz_avail(int
  
  		chan = hw_get_channel_chan(mode, i, NULL);
  		if (!chan ||
@@ -35,7 +35,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  			return false;
  	}
  
-@@ -3110,7 +3113,7 @@ static void ibss_mesh_select_40mhz(struc
+@@ -3112,7 +3115,7 @@ static void ibss_mesh_select_40mhz(struc
  				   const struct wpa_ssid *ssid,
  				   struct hostapd_hw_modes *mode,
  				   struct hostapd_freq_params *freq,
@@ -44,7 +44,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  {
  	int chan_idx;
  	struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
-@@ -3141,8 +3144,11 @@ static void ibss_mesh_select_40mhz(struc
+@@ -3143,8 +3146,11 @@ static void ibss_mesh_select_40mhz(struc
  		return;
  
  	/* Check primary channel flags */
@@ -58,7 +58,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  
  #ifdef CONFIG_HT_OVERRIDES
  	if (ssid->disable_ht40)
-@@ -3177,8 +3183,11 @@ static void ibss_mesh_select_40mhz(struc
+@@ -3179,8 +3185,11 @@ static void ibss_mesh_select_40mhz(struc
  		return;
  
  	/* Check secondary channel flags */
@@ -72,7 +72,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  
  	if (freq->ht_enabled) {
  		if (ht40 == -1) {
-@@ -3256,7 +3265,7 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -3258,7 +3267,7 @@ static bool ibss_mesh_select_80_160mhz(s
  				       const struct wpa_ssid *ssid,
  				       struct hostapd_hw_modes *mode,
  				       struct hostapd_freq_params *freq,
@@ -81,7 +81,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  	static const int bw80[] = {
  		5180, 5260, 5500, 5580, 5660, 5745, 5825,
  		5955, 6035, 6115, 6195, 6275, 6355, 6435,
-@@ -3309,7 +3318,7 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -3311,7 +3320,7 @@ static bool ibss_mesh_select_80_160mhz(s
  		goto skip_80mhz;
  
  	/* Use 40 MHz if channel not usable */
@@ -90,7 +90,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  		goto skip_80mhz;
  
  	chwidth = CONF_OPER_CHWIDTH_80MHZ;
-@@ -3351,7 +3360,7 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -3353,7 +3362,7 @@ static bool ibss_mesh_select_80_160mhz(s
  	     HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) &&
  	    (ssid->max_oper_chwidth == CONF_OPER_CHWIDTH_160MHZ ||
  	     ssid->max_oper_chwidth == CONF_OPER_CHWIDTH_320MHZ) &&
@@ -99,7 +99,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  		for (j = 0; j < ARRAY_SIZE(bw160); j++) {
  			u8 start_chan;
  
-@@ -3374,11 +3383,11 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -3376,11 +3385,11 @@ static bool ibss_mesh_select_80_160mhz(s
  	     EHT_PHYCAP_320MHZ_IN_6GHZ_SUPPORT_MASK) && is_6ghz &&
  	    ssid->max_oper_chwidth == CONF_OPER_CHWIDTH_320MHZ &&
  	    ibss_mesh_is_80mhz_avail(channel + 16 -
@@ -114,7 +114,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  		for (j = 0; j < ARRAY_SIZE(bw320); j += 2) {
  			if (freq->freq >= bw320[j] &&
  			    freq->freq <= bw320[j + 1]) {
-@@ -3407,10 +3416,12 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -3409,10 +3418,12 @@ static bool ibss_mesh_select_80_160mhz(s
  				if (!chan)
  					continue;
  
@@ -131,7 +131,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  
  				/* Found a suitable second segment for 80+80 */
  				chwidth = CONF_OPER_CHWIDTH_80P80MHZ;
-@@ -3465,6 +3476,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3467,6 +3478,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
  	int obss_scan = 1;
  	u8 channel;
  	bool is_6ghz, is_24ghz;
@@ -139,7 +139,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  
  	freq->freq = ssid->frequency;
  
-@@ -3508,9 +3520,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3510,9 +3522,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
  	/* Setup higher BW only for 5 and 6 GHz */
  	if (mode->mode == HOSTAPD_MODE_IEEE80211A) {
  		ibss_mesh_select_40mhz(wpa_s, ssid, mode, freq, obss_scan,
diff --git a/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch b/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch
index 6a8bf0773b..f1cf715b69 100644
--- a/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch
+++ b/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch
@@ -68,7 +68,7 @@ Signed-off-by: Markus Theil <markus.theil at tu-ilmenau.de>
  		   chan_idx, num_available_chandefs);
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -11658,6 +11658,10 @@ static int nl80211_switch_channel(void *
+@@ -11668,6 +11668,10 @@ static int nl80211_switch_channel(void *
  	if (ret)
  		goto error;
  
diff --git a/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch b/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch
index a7cf9a7c5c..b23e6a4ca2 100644
--- a/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch
+++ b/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch
@@ -4,7 +4,7 @@ Subject: [PATCH] fix adding back stations after a missed deauth/disassoc
 
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -5076,6 +5076,13 @@ static int add_associated_sta(struct hos
+@@ -5136,6 +5136,13 @@ static int add_associated_sta(struct hos
  	 * drivers to accept the STA parameter configuration. Since this is
  	 * after a new FT-over-DS exchange, a new TK has been derived, so key
  	 * reinstallation is not a concern for this case.
@@ -18,7 +18,7 @@ Subject: [PATCH] fix adding back stations after a missed deauth/disassoc
  	 */
  	wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR
  		   " (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)",
-@@ -5089,7 +5096,8 @@ static int add_associated_sta(struct hos
+@@ -5149,7 +5156,8 @@ static int add_associated_sta(struct hos
  	    (!(sta->flags & WLAN_STA_AUTHORIZED) ||
  	     (reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
  	     (!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&
diff --git a/package/network/services/hostapd/patches/030-Revert-nl80211-Accept-a-global-nl80211-event-to-a-br.patch b/package/network/services/hostapd/patches/030-Revert-nl80211-Accept-a-global-nl80211-event-to-a-br.patch
index 4d9574b9e9..24647a5c46 100644
--- a/package/network/services/hostapd/patches/030-Revert-nl80211-Accept-a-global-nl80211-event-to-a-br.patch
+++ b/package/network/services/hostapd/patches/030-Revert-nl80211-Accept-a-global-nl80211-event-to-a-br.patch
@@ -37,7 +37,7 @@ This reverts commit 1c994da117ad795766270cf04bc923971e27412f.
  			return drv;
  	}
  	return NULL;
-@@ -8583,7 +8585,7 @@ static void add_ifidx(struct wpa_driver_
+@@ -8586,7 +8588,7 @@ static void add_ifidx(struct wpa_driver_
  	wpa_printf(MSG_DEBUG,
  		   "nl80211: Add own interface ifindex %d (ifidx_reason %d)",
  		   ifidx, ifidx_reason);
@@ -46,7 +46,7 @@ This reverts commit 1c994da117ad795766270cf04bc923971e27412f.
  		wpa_printf(MSG_DEBUG, "nl80211: ifindex %d already in the list",
  			   ifidx);
  		return;
-@@ -8643,7 +8645,7 @@ static void del_ifidx(struct wpa_driver_
+@@ -8646,7 +8648,7 @@ static void del_ifidx(struct wpa_driver_
  }
  
  
@@ -55,7 +55,7 @@ This reverts commit 1c994da117ad795766270cf04bc923971e27412f.
  		      int ifidx_reason)
  {
  	int i;
-@@ -8750,7 +8752,7 @@ static void handle_eapol(int sock, void
+@@ -8753,7 +8755,7 @@ static void handle_eapol(int sock, void
  		return;
  	}
  
diff --git a/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch b/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
index 45ce573f2c..1b6c71c720 100644
--- a/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
+++ b/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
@@ -26,7 +26,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -2442,6 +2442,9 @@ struct wpa_driver_capa {
+@@ -2447,6 +2447,9 @@ struct wpa_driver_capa {
  	/** Maximum number of iterations in a single scan plan */
  	u32 max_sched_scan_plan_iterations;
  
diff --git a/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch b/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
index a6c495cb55..733b2a74db 100644
--- a/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
+++ b/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
@@ -1124,7 +1124,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      heavy_groups = [14, 15, 16]
      suitable_groups = [15, 16, 17, 18, 19, 20, 21]
      groups = [str(g) for g in sae_groups]
-@@ -2285,6 +2290,8 @@ def run_sae_pwe_group(dev, apdev, group)
+@@ -2387,6 +2392,8 @@ def run_sae_pwe_group(dev, apdev, group)
              logger.info("Add Brainpool EC groups since OpenSSL is new enough")
          elif tls.startswith("wolfSSL"):
              logger.info("Make sure Brainpool EC groups were enabled when compiling wolfSSL")
diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch
index ffa9117288..53d89ef89b 100644
--- a/package/network/services/hostapd/patches/200-multicall.patch
+++ b/package/network/services/hostapd/patches/200-multicall.patch
@@ -94,7 +94,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
  		if (c < 0)
 --- a/src/ap/drv_callbacks.c
 +++ b/src/ap/drv_callbacks.c
-@@ -2566,8 +2566,8 @@ static void hostapd_mld_iface_disable(st
+@@ -2561,8 +2561,8 @@ static void hostapd_mld_iface_disable(st
  #endif /* CONFIG_IEEE80211BE */
  
  
@@ -105,7 +105,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
  {
  	struct hostapd_data *hapd = ctx;
  	struct sta_info *sta;
-@@ -2925,7 +2925,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -2920,7 +2920,7 @@ void wpa_supplicant_event(void *ctx, enu
  }
  
  
@@ -116,7 +116,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
  	struct hapd_interfaces *interfaces = ctx;
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -7161,8 +7161,8 @@ union wpa_event_data {
+@@ -7166,8 +7166,8 @@ union wpa_event_data {
   * Driver wrapper code should call this function whenever an event is received
   * from the driver.
   */
@@ -127,7 +127,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
  
  /**
   * wpa_supplicant_event_global - Report a driver event for wpa_supplicant
-@@ -7174,7 +7174,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -7179,7 +7179,7 @@ void wpa_supplicant_event(void *ctx, enu
   * Same as wpa_supplicant_event(), but we search for the interface in
   * wpa_global.
   */
@@ -278,7 +278,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
  	os_memset(&eapol_test, 0, sizeof(eapol_test));
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -6255,8 +6255,8 @@ static int wpas_pasn_auth(struct wpa_sup
+@@ -6257,8 +6257,8 @@ static int wpas_pasn_auth(struct wpa_sup
  #endif /* CONFIG_PASN */
  
  
@@ -289,7 +289,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
  {
  	struct wpa_supplicant *wpa_s = ctx;
  	int resched;
-@@ -7228,7 +7228,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -7232,7 +7232,7 @@ void wpa_supplicant_event(void *ctx, enu
  }
  
  
@@ -331,7 +331,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
  	os_memset(&global, 0, sizeof(global));
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -8128,7 +8128,6 @@ struct wpa_interface * wpa_supplicant_ma
+@@ -8156,7 +8156,6 @@ struct wpa_interface * wpa_supplicant_ma
  	return NULL;
  }
  
@@ -339,7 +339,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
  /**
   * wpa_supplicant_match_existing - Match existing interfaces
   * @global: Pointer to global data from wpa_supplicant_init()
-@@ -8163,6 +8162,11 @@ static int wpa_supplicant_match_existing
+@@ -8191,6 +8190,11 @@ static int wpa_supplicant_match_existing
  
  #endif /* CONFIG_MATCH_IFACE */
  
@@ -351,7 +351,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
  
  /**
   * wpa_supplicant_add_iface - Add a new network interface
-@@ -8419,6 +8423,8 @@ struct wpa_global * wpa_supplicant_init(
+@@ -8447,6 +8451,8 @@ struct wpa_global * wpa_supplicant_init(
  #ifndef CONFIG_NO_WPA_MSG
  	wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
  #endif /* CONFIG_NO_WPA_MSG */
diff --git a/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch b/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
index 7b77e26c14..b3ac512e4c 100644
--- a/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
+++ b/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
@@ -13,7 +13,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/wpa_supplicant/ctrl_iface.c
 +++ b/wpa_supplicant/ctrl_iface.c
-@@ -13678,7 +13678,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -13676,7 +13676,7 @@ char * wpa_supplicant_ctrl_iface_process
  		if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18))
  			reply_len = -1;
  #endif /* CONFIG_WNM */
@@ -22,7 +22,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  	} else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) {
  		if (ap_ctrl_iface_disassoc_imminent(wpa_s, buf + 18))
  			reply_len = -1;
-@@ -13688,7 +13688,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -13686,7 +13686,7 @@ char * wpa_supplicant_ctrl_iface_process
  	} else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) {
  		if (ap_ctrl_iface_bss_tm_req(wpa_s, buf + 11))
  			reply_len = -1;
diff --git a/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch
index 187211731e..387a19b2bf 100644
--- a/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch
+++ b/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch
@@ -16,7 +16,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality
  else
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -4096,6 +4096,7 @@ static int hostapd_ctrl_iface_receive_pr
+@@ -4115,6 +4115,7 @@ static int hostapd_ctrl_iface_receive_pr
  						      reply_size);
  	} else if (os_strcmp(buf, "STATUS-DRIVER") == 0) {
  		reply_len = hostapd_drv_status(hapd, reply, reply_size);
@@ -24,7 +24,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality
  	} else if (os_strcmp(buf, "MIB") == 0) {
  		reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
  		if (reply_len >= 0) {
-@@ -4137,6 +4138,7 @@ static int hostapd_ctrl_iface_receive_pr
+@@ -4156,6 +4157,7 @@ static int hostapd_ctrl_iface_receive_pr
  	} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
  		reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
  							reply_size);
@@ -113,7 +113,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality
  		if (os_snprintf_error(buflen - len, ret))
 --- a/src/ap/ieee802_1x.c
 +++ b/src/ap/ieee802_1x.c
-@@ -2831,6 +2831,7 @@ static const char * bool_txt(bool val)
+@@ -2836,6 +2836,7 @@ static const char * bool_txt(bool val)
  	return val ? "TRUE" : "FALSE";
  }
  
@@ -121,7 +121,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality
  
  int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
  {
-@@ -3017,6 +3018,7 @@ int ieee802_1x_get_mib_sta(struct hostap
+@@ -3022,6 +3023,7 @@ int ieee802_1x_get_mib_sta(struct hostap
  	return len;
  }
  
@@ -181,7 +181,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality
  
 --- a/wpa_supplicant/ap.c
 +++ b/wpa_supplicant/ap.c
-@@ -1523,7 +1523,7 @@ int wpas_ap_wps_nfc_report_handover(stru
+@@ -1525,7 +1525,7 @@ int wpas_ap_wps_nfc_report_handover(stru
  #endif /* CONFIG_WPS */
  
  
@@ -201,7 +201,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality
  		if (wpa_s->ap_iface) {
  			pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos,
  							    end - pos,
-@@ -13007,6 +13007,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -13005,6 +13005,7 @@ char * wpa_supplicant_ctrl_iface_process
  			reply_len = -1;
  	} else if (os_strncmp(buf, "NOTE ", 5) == 0) {
  		wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
@@ -209,7 +209,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality
  	} else if (os_strcmp(buf, "MIB") == 0) {
  		reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
  		if (reply_len >= 0) {
-@@ -13019,6 +13020,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -13017,6 +13018,7 @@ char * wpa_supplicant_ctrl_iface_process
  				reply_size - reply_len);
  #endif /* CONFIG_MACSEC */
  		}
@@ -217,7 +217,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality
  	} else if (os_strncmp(buf, "STATUS", 6) == 0) {
  		reply_len = wpa_supplicant_ctrl_iface_status(
  			wpa_s, buf + 6, reply, reply_size);
-@@ -13506,6 +13508,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -13504,6 +13506,7 @@ char * wpa_supplicant_ctrl_iface_process
  		reply_len = wpa_supplicant_ctrl_iface_bss(
  			wpa_s, buf + 4, reply, reply_size);
  #ifdef CONFIG_AP
@@ -225,7 +225,7 @@ Subject: [PATCH] Remove some unnecessary control interface functionality
  	} else if (os_strcmp(buf, "STA-FIRST") == 0) {
  		reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
  	} else if (os_strncmp(buf, "STA ", 4) == 0) {
-@@ -13514,12 +13517,15 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -13512,12 +13515,15 @@ char * wpa_supplicant_ctrl_iface_process
  	} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
  		reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
  						   reply_size);
diff --git a/package/network/services/hostapd/patches/301-mesh-noscan.patch b/package/network/services/hostapd/patches/301-mesh-noscan.patch
index f7a4628bd2..7e4aed800d 100644
--- a/package/network/services/hostapd/patches/301-mesh-noscan.patch
+++ b/package/network/services/hostapd/patches/301-mesh-noscan.patch
@@ -15,7 +15,7 @@ Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also
  	{ STR(id_str) },
 --- a/wpa_supplicant/config_file.c
 +++ b/wpa_supplicant/config_file.c
-@@ -868,6 +868,7 @@ static void wpa_config_write_network(FIL
+@@ -869,6 +869,7 @@ static void wpa_config_write_network(FIL
  	INT(mode);
  #ifdef CONFIG_MESH
  	INT(no_auto_peer);
@@ -47,7 +47,7 @@ Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also
  		/*
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -3046,7 +3046,7 @@ static bool ibss_mesh_can_use_vht(struct
+@@ -3048,7 +3048,7 @@ static bool ibss_mesh_can_use_vht(struct
  				  const struct wpa_ssid *ssid,
  				  struct hostapd_hw_modes *mode)
  {
@@ -56,7 +56,7 @@ Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also
  		return false;
  
  	if (!drv_supports_vht(wpa_s, ssid))
-@@ -3120,7 +3120,7 @@ static void ibss_mesh_select_40mhz(struc
+@@ -3122,7 +3122,7 @@ static void ibss_mesh_select_40mhz(struc
  	int i, res;
  	unsigned int j;
  	static const int ht40plus_5ghz[] = {
@@ -65,7 +65,7 @@ Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also
  		149, 157, 165, 173, 184, 192
  	};
  	static const int ht40plus_6ghz[] = {
-@@ -3473,7 +3473,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3475,7 +3475,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
  	int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
  	enum hostapd_hw_mode hw_mode;
  	struct hostapd_hw_modes *mode = NULL;
@@ -74,7 +74,7 @@ Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also
  	u8 channel;
  	bool is_6ghz, is_24ghz;
  	bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
-@@ -3517,6 +3517,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3519,6 +3519,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
  		freq->he_enabled = ibss_mesh_can_use_he(wpa_s, ssid, mode,
  							ieee80211_mode);
  	freq->channel = channel;
diff --git a/package/network/services/hostapd/patches/310-rescan_immediately.patch b/package/network/services/hostapd/patches/310-rescan_immediately.patch
index a3083c4f67..c64b2afd32 100644
--- a/package/network/services/hostapd/patches/310-rescan_immediately.patch
+++ b/package/network/services/hostapd/patches/310-rescan_immediately.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] rescan_immediately.patch
 
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -6401,7 +6401,7 @@ wpa_supplicant_alloc(struct wpa_supplica
+@@ -6404,7 +6404,7 @@ wpa_supplicant_alloc(struct wpa_supplica
  	if (wpa_s == NULL)
  		return NULL;
  	wpa_s->scan_req = INITIAL_SCAN_REQ;
diff --git a/package/network/services/hostapd/patches/341-mesh-ctrl-iface-channel-switch.patch b/package/network/services/hostapd/patches/341-mesh-ctrl-iface-channel-switch.patch
index 8e2d7fc8a4..cd96dcac74 100644
--- a/package/network/services/hostapd/patches/341-mesh-ctrl-iface-channel-switch.patch
+++ b/package/network/services/hostapd/patches/341-mesh-ctrl-iface-channel-switch.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] wpa_supplicant: fix calling channel switch via wpa_cli on
 
 --- a/wpa_supplicant/ap.c
 +++ b/wpa_supplicant/ap.c
-@@ -1849,17 +1849,37 @@ int ap_switch_channel(struct wpa_supplic
+@@ -1851,17 +1851,37 @@ int ap_switch_channel(struct wpa_supplic
  
  
  #ifdef CONFIG_CTRL_IFACE
diff --git a/package/network/services/hostapd/patches/370-preserve_radio_mask.patch b/package/network/services/hostapd/patches/370-preserve_radio_mask.patch
index a60e9c4aa9..a4347c4750 100644
--- a/package/network/services/hostapd/patches/370-preserve_radio_mask.patch
+++ b/package/network/services/hostapd/patches/370-preserve_radio_mask.patch
@@ -105,7 +105,7 @@
  	}
  
  	if (ret >= 0 && is_p2p_net_interface(iftype)) {
-@@ -8685,8 +8707,8 @@ static int i802_set_wds_sta(void *priv,
+@@ -8688,8 +8710,8 @@ static int i802_set_wds_sta(void *priv,
  		if (!if_nametoindex(name)) {
  			if (nl80211_create_iface(drv, name,
  						 NL80211_IFTYPE_AP_VLAN,
@@ -116,7 +116,7 @@
  				return -1;
  
  			if (bridge_ifname)
-@@ -9057,7 +9079,8 @@ static int wpa_driver_nl80211_if_add(voi
+@@ -9060,7 +9082,8 @@ static int wpa_driver_nl80211_if_add(voi
  
  		os_memset(&p2pdev_info, 0, sizeof(p2pdev_info));
  		ifidx = nl80211_create_iface(drv, ifname, nlmode, addr,
@@ -126,7 +126,7 @@
  					     &p2pdev_info, use_existing);
  		if (!p2pdev_info.wdev_id_set || ifidx != 0) {
  			wpa_printf(MSG_ERROR, "nl80211: Failed to create a P2P Device interface %s",
-@@ -9074,7 +9097,8 @@ static int wpa_driver_nl80211_if_add(voi
+@@ -9077,7 +9100,8 @@ static int wpa_driver_nl80211_if_add(voi
  			   (long long unsigned int) p2pdev_info.wdev_id);
  	} else {
  		ifidx = nl80211_create_iface(drv, ifname, nlmode, addr,
@@ -136,7 +136,7 @@
  		if (use_existing && ifidx == -ENFILE) {
  			added = 0;
  			ifidx = if_nametoindex(ifname);
-@@ -9144,6 +9168,8 @@ static int wpa_driver_nl80211_if_add(voi
+@@ -9147,6 +9171,8 @@ static int wpa_driver_nl80211_if_add(voi
  		new_bss->ctx = bss_ctx;
  		new_bss->added_if = added;
  
diff --git a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
index 8e65244f60..11941e3b4e 100644
--- a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
+++ b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
@@ -155,7 +155,7 @@ Signed-hostap: Antonio Quartulli <ordex at autistici.org>
  	 * macsec_policy - Determines the policy for MACsec secure session
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -4685,6 +4685,12 @@ static void wpas_start_assoc_cb(struct w
+@@ -4687,6 +4687,12 @@ static void wpas_start_assoc_cb(struct w
  			params.beacon_int = ssid->beacon_int;
  		else
  			params.beacon_int = wpa_s->conf->beacon_int;
diff --git a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch
index 0bcb75187a..1f77818a94 100644
--- a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch
+++ b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch
@@ -19,7 +19,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich at openmesh.com>
 
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -1960,6 +1960,7 @@ struct wpa_driver_mesh_join_params {
+@@ -1965,6 +1965,7 @@ struct wpa_driver_mesh_join_params {
  #define WPA_DRIVER_MESH_FLAG_AMPE	0x00000008
  	unsigned int flags;
  	bool handle_dfs;
@@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich at openmesh.com>
  struct wpa_driver_set_key_params {
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -12363,6 +12363,18 @@ static int nl80211_put_mesh_id(struct nl
+@@ -12373,6 +12373,18 @@ static int nl80211_put_mesh_id(struct nl
  }
  
  
@@ -48,7 +48,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich at openmesh.com>
  static int nl80211_put_mesh_config(struct nl_msg *msg,
  				   struct wpa_driver_mesh_bss_params *params)
  {
-@@ -12424,6 +12436,7 @@ static int nl80211_join_mesh(struct i802
+@@ -12434,6 +12446,7 @@ static int nl80211_join_mesh(struct i802
  	    nl80211_put_basic_rates(msg, params->basic_rates) ||
  	    nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
  	    nl80211_put_beacon_int(msg, params->beacon_int) ||
diff --git a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch
index f0841258b3..225b6ab296 100644
--- a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch
+++ b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix issues with disabling obss scan when using fixed_freq on
 
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -3480,6 +3480,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3482,6 +3482,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
  
  	freq->freq = ssid->frequency;
  
diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch
index b66d61bad5..66cc75f37d 100644
--- a/package/network/services/hostapd/patches/600-ubus_support.patch
+++ b/package/network/services/hostapd/patches/600-ubus_support.patch
@@ -116,7 +116,7 @@ probe/assoc/auth requests via object subscribe.
  #ifdef CONFIG_P2P
  	if (elems.p2p) {
  		wpabuf_free(sta->p2p_ie);
-@@ -1414,6 +1424,7 @@ void hostapd_event_ch_switch(struct host
+@@ -1409,6 +1419,7 @@ void hostapd_event_ch_switch(struct host
  
  		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_CSA_FINISHED
  			"freq=%d dfs=%d", freq, is_dfs);
@@ -195,7 +195,7 @@ probe/assoc/auth requests via object subscribe.
  struct hostapd_iface * hostapd_alloc_iface(void);
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -3091,7 +3091,7 @@ static void handle_auth(struct hostapd_d
+@@ -3134,7 +3134,7 @@ static void handle_auth(struct hostapd_d
  	u16 auth_alg, auth_transaction, status_code;
  	u16 resp = WLAN_STATUS_SUCCESS;
  	struct sta_info *sta = NULL;
@@ -204,7 +204,7 @@ probe/assoc/auth requests via object subscribe.
  	u16 fc;
  	const u8 *challenge = NULL;
  	u8 resp_ies[2 + WLAN_AUTH_CHALLENGE_LEN];
-@@ -3102,6 +3102,11 @@ static void handle_auth(struct hostapd_d
+@@ -3145,6 +3145,11 @@ static void handle_auth(struct hostapd_d
  #ifdef CONFIG_IEEE80211BE
  	bool mld_sta = false;
  #endif /* CONFIG_IEEE80211BE */
@@ -216,7 +216,7 @@ probe/assoc/auth requests via object subscribe.
  
  	if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
  		wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)",
-@@ -3298,6 +3303,13 @@ static void handle_auth(struct hostapd_d
+@@ -3341,6 +3346,13 @@ static void handle_auth(struct hostapd_d
  		resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
  		goto fail;
  	}
@@ -230,7 +230,7 @@ probe/assoc/auth requests via object subscribe.
  	if (res == HOSTAPD_ACL_PENDING)
  		return;
  
-@@ -5659,7 +5671,7 @@ static void handle_assoc(struct hostapd_
+@@ -5723,7 +5735,7 @@ static void handle_assoc(struct hostapd_
  	int resp = WLAN_STATUS_SUCCESS;
  	u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE;
  	const u8 *pos;
@@ -239,7 +239,7 @@ probe/assoc/auth requests via object subscribe.
  	struct sta_info *sta;
  	u8 *tmp = NULL;
  #ifdef CONFIG_FILS
-@@ -5901,6 +5913,11 @@ static void handle_assoc(struct hostapd_
+@@ -5965,6 +5977,11 @@ static void handle_assoc(struct hostapd_
  		left = res;
  	}
  #endif /* CONFIG_FILS */
@@ -251,7 +251,7 @@ probe/assoc/auth requests via object subscribe.
  
  	/* followed by SSID and Supported rates; and HT capabilities if 802.11n
  	 * is used */
-@@ -6009,6 +6026,13 @@ static void handle_assoc(struct hostapd_
+@@ -6073,6 +6090,13 @@ static void handle_assoc(struct hostapd_
  	if (set_beacon)
  		ieee802_11_update_beacons(hapd->iface);
  
@@ -265,7 +265,7 @@ probe/assoc/auth requests via object subscribe.
   fail:
  
  	/*
-@@ -6238,6 +6262,7 @@ static void handle_disassoc(struct hosta
+@@ -6302,6 +6326,7 @@ static void handle_disassoc(struct hosta
  			   (unsigned long) len);
  		return;
  	}
@@ -273,7 +273,7 @@ probe/assoc/auth requests via object subscribe.
  
  	sta = ap_get_sta(hapd, mgmt->sa);
  	if (!sta) {
-@@ -6269,6 +6294,8 @@ static void handle_deauth(struct hostapd
+@@ -6333,6 +6358,8 @@ static void handle_deauth(struct hostapd
  	/* Clear the PTKSA cache entries for PASN */
  	ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE);
  
@@ -321,7 +321,7 @@ probe/assoc/auth requests via object subscribe.
  		ap_free_sta(hapd, sta);
  		break;
  	}
-@@ -1590,15 +1592,28 @@ void ap_sta_set_authorized_event(struct
+@@ -1590,17 +1592,30 @@ void ap_sta_set_authorized_event(struct
  		os_snprintf(buf, sizeof(buf), MACSTR, MAC2STR(sta->addr));
  
  	if (authorized) {
@@ -341,16 +341,18 @@ probe/assoc/auth requests via object subscribe.
  		char dpp_pkhash_buf[100];
  		char keyid_buf[100];
  		char ip_addr[100];
+ 		char vlanid_buf[20];
 +		char alg_buf[100];
  
  		dpp_pkhash_buf[0] = '\0';
  		keyid_buf[0] = '\0';
  		ip_addr[0] = '\0';
+ 		vlanid_buf[0] = '\0';
 +		alg_buf[0] = '\0';
+ 
  #ifdef CONFIG_P2P
  		if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) {
- 			os_snprintf(ip_addr, sizeof(ip_addr),
-@@ -1609,6 +1624,13 @@ void ap_sta_set_authorized_event(struct
+@@ -1612,6 +1627,13 @@ void ap_sta_set_authorized_event(struct
  		}
  #endif /* CONFIG_P2P */
  
@@ -364,24 +366,24 @@ probe/assoc/auth requests via object subscribe.
  		keyid = ap_sta_wpa_get_keyid(hapd, sta);
  		if (keyid) {
  			os_snprintf(keyid_buf, sizeof(keyid_buf),
-@@ -1627,17 +1649,19 @@ void ap_sta_set_authorized_event(struct
- 					 dpp_pkhash, SHA256_MAC_LEN);
- 		}
+@@ -1636,17 +1658,19 @@ void ap_sta_set_authorized_event(struct
+ 				    " vlanid=%u", sta->vlan_id);
+ #endif /* CONFIG_NO_VLAN */
  
--		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_CONNECTED "%s%s%s%s",
--			buf, ip_addr, keyid_buf, dpp_pkhash_buf);
+-		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_CONNECTED "%s%s%s%s%s",
+-			buf, ip_addr, keyid_buf, dpp_pkhash_buf, vlanid_buf);
 +		hostapd_ubus_notify_authorized(hapd, sta, auth_alg);
-+		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_CONNECTED "%s%s%s%s%s",
-+			buf, ip_addr, keyid_buf, dpp_pkhash_buf, alg_buf);
++		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_CONNECTED "%s%s%s%s%s%s",
++			buf, ip_addr, keyid_buf, dpp_pkhash_buf, vlanid_buf, alg_buf);
  
  		if (hapd->msg_ctx_parent &&
  		    hapd->msg_ctx_parent != hapd->msg_ctx)
  			wpa_msg_no_global(hapd->msg_ctx_parent, MSG_INFO,
--					  AP_STA_CONNECTED "%s%s%s%s",
-+					  AP_STA_CONNECTED "%s%s%s%s%s",
+-					  AP_STA_CONNECTED "%s%s%s%s%s",
++					  AP_STA_CONNECTED "%s%s%s%s%s%s",
  					  buf, ip_addr, keyid_buf,
--					  dpp_pkhash_buf);
-+					  dpp_pkhash_buf, alg_buf);
+-					  dpp_pkhash_buf, vlanid_buf);
++					  dpp_pkhash_buf, vlanid_buf, alg_buf);
  	} else {
  		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED "%s", buf);
 +		hostapd_ubus_notify(hapd, "disassoc", sta->addr);
@@ -683,7 +685,7 @@ probe/assoc/auth requests via object subscribe.
  			break;
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -8261,6 +8261,8 @@ struct wpa_supplicant * wpa_supplicant_a
+@@ -8289,6 +8289,8 @@ struct wpa_supplicant * wpa_supplicant_a
  	}
  #endif /* CONFIG_P2P */
  
@@ -692,7 +694,7 @@ probe/assoc/auth requests via object subscribe.
  	return wpa_s;
  }
  
-@@ -8287,6 +8289,8 @@ int wpa_supplicant_remove_iface(struct w
+@@ -8315,6 +8317,8 @@ int wpa_supplicant_remove_iface(struct w
  	struct wpa_supplicant *parent = wpa_s->parent;
  #endif /* CONFIG_MESH */
  
@@ -701,7 +703,7 @@ probe/assoc/auth requests via object subscribe.
  	/* Remove interface from the global list of interfaces */
  	prev = global->ifaces;
  	if (prev == wpa_s) {
-@@ -8633,8 +8637,12 @@ int wpa_supplicant_run(struct wpa_global
+@@ -8661,8 +8665,12 @@ int wpa_supplicant_run(struct wpa_global
  	eloop_register_signal_terminate(wpa_supplicant_terminate, global);
  	eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
  
diff --git a/package/network/services/hostapd/patches/601-ucode_support.patch b/package/network/services/hostapd/patches/601-ucode_support.patch
index 44705efa37..30780ca76e 100644
--- a/package/network/services/hostapd/patches/601-ucode_support.patch
+++ b/package/network/services/hostapd/patches/601-ucode_support.patch
@@ -34,7 +34,7 @@ as adding/removing interfaces.
  ifdef CONFIG_CODE_COVERAGE
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -6037,6 +6037,7 @@ try_again:
+@@ -6061,6 +6061,7 @@ try_again:
  		return -1;
  	}
  
@@ -42,7 +42,7 @@ as adding/removing interfaces.
  	wpa_msg_register_cb(hostapd_ctrl_iface_msg_cb);
  
  	return 0;
-@@ -6138,6 +6139,7 @@ fail:
+@@ -6162,6 +6163,7 @@ fail:
  	os_free(fname);
  
  	interface->global_ctrl_sock = s;
@@ -312,7 +312,7 @@ as adding/removing interfaces.
  void hostapd_switch_color(struct hostapd_data *hapd, u64 bitmap);
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -4067,6 +4067,25 @@ struct wpa_driver_ops {
+@@ -4072,6 +4072,25 @@ struct wpa_driver_ops {
  			 const char *ifname);
  
  	/**
@@ -338,7 +338,7 @@ as adding/removing interfaces.
  	 * set_sta_vlan - Bind a station into a specific interface (AP only)
  	 * @priv: Private driver interface data
  	 * @ifname: Interface (main or virtual BSS or VLAN)
-@@ -6896,6 +6915,7 @@ union wpa_event_data {
+@@ -6901,6 +6920,7 @@ union wpa_event_data {
  
  	/**
  	 * struct ch_switch
@@ -346,7 +346,7 @@ as adding/removing interfaces.
  	 * @freq: Frequency of new channel in MHz
  	 * @ht_enabled: Whether this is an HT channel
  	 * @ch_offset: Secondary channel offset
-@@ -6906,6 +6926,7 @@ union wpa_event_data {
+@@ -6911,6 +6931,7 @@ union wpa_event_data {
  	 * @punct_bitmap: Puncturing bitmap
  	 */
  	struct ch_switch {
@@ -444,7 +444,7 @@ as adding/removing interfaces.
  	nl_cb_set(bss->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM,
  		  no_seq_check, NULL);
  	nl_cb_set(bss->nl_cb, NL_CB_VALID, NL_CB_CUSTOM,
-@@ -8851,6 +8872,7 @@ static void *i802_init(struct hostapd_da
+@@ -8854,6 +8875,7 @@ static void *i802_init(struct hostapd_da
  	char master_ifname[IFNAMSIZ];
  	int ifindex, br_ifindex = 0;
  	int br_added = 0;
@@ -452,7 +452,7 @@ as adding/removing interfaces.
  
  	bss = wpa_driver_nl80211_drv_init(hapd, params->ifname,
  					  params->global_priv, 1,
-@@ -8911,21 +8933,17 @@ static void *i802_init(struct hostapd_da
+@@ -8914,21 +8936,17 @@ static void *i802_init(struct hostapd_da
  	    (params->num_bridge == 0 || !params->bridge[0]))
  		add_ifidx(drv, br_ifindex, drv->ifindex);
  
@@ -484,7 +484,7 @@ as adding/removing interfaces.
  	}
  
  	if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
-@@ -9304,6 +9322,50 @@ static int wpa_driver_nl80211_if_remove(
+@@ -9307,6 +9325,50 @@ static int wpa_driver_nl80211_if_remove(
  	return 0;
  }
  
@@ -535,7 +535,7 @@ as adding/removing interfaces.
  
  static int cookie_handler(struct nl_msg *msg, void *arg)
  {
-@@ -11182,6 +11244,37 @@ static bool nl80211_is_drv_shared(void *
+@@ -11192,6 +11254,37 @@ static bool nl80211_is_drv_shared(void *
  #endif /* CONFIG_IEEE80211BE */
  
  
@@ -573,7 +573,7 @@ as adding/removing interfaces.
  static int driver_nl80211_send_mlme(void *priv, const u8 *data,
  				    size_t data_len, int noack,
  				    unsigned int freq,
-@@ -15001,6 +15094,8 @@ const struct wpa_driver_ops wpa_driver_n
+@@ -15011,6 +15104,8 @@ const struct wpa_driver_ops wpa_driver_n
  	.set_acl = wpa_driver_nl80211_set_acl,
  	.if_add = wpa_driver_nl80211_if_add,
  	.if_remove = driver_nl80211_if_remove,
@@ -702,7 +702,7 @@ as adding/removing interfaces.
  CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -6291,6 +6291,7 @@ void supplicant_event(void *ctx, enum wp
+@@ -6293,6 +6293,7 @@ void supplicant_event(void *ctx, enum wp
  		event_to_string(event), event);
  #endif /* CONFIG_NO_STDOUT_DEBUG */
  
@@ -712,7 +712,7 @@ as adding/removing interfaces.
  #ifdef CONFIG_FST
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -1276,6 +1276,7 @@ void wpa_supplicant_set_state(struct wpa
+@@ -1278,6 +1278,7 @@ void wpa_supplicant_set_state(struct wpa
  		sme_sched_obss_scan(wpa_s, 0);
  	}
  	wpa_s->wpa_state = state;
@@ -720,7 +720,7 @@ as adding/removing interfaces.
  
  #ifndef CONFIG_NO_ROBUST_AV
  	if (state == WPA_COMPLETED && dl_list_len(&wpa_s->active_scs_ids) &&
-@@ -8262,6 +8263,7 @@ struct wpa_supplicant * wpa_supplicant_a
+@@ -8290,6 +8291,7 @@ struct wpa_supplicant * wpa_supplicant_a
  #endif /* CONFIG_P2P */
  
  	wpas_ubus_add_bss(wpa_s);
@@ -728,7 +728,7 @@ as adding/removing interfaces.
  
  	return wpa_s;
  }
-@@ -8289,6 +8291,7 @@ int wpa_supplicant_remove_iface(struct w
+@@ -8317,6 +8319,7 @@ int wpa_supplicant_remove_iface(struct w
  	struct wpa_supplicant *parent = wpa_s->parent;
  #endif /* CONFIG_MESH */
  
@@ -736,7 +736,7 @@ as adding/removing interfaces.
  	wpas_ubus_free_bss(wpa_s);
  
  	/* Remove interface from the global list of interfaces */
-@@ -8599,6 +8602,7 @@ struct wpa_global * wpa_supplicant_init(
+@@ -8627,6 +8630,7 @@ struct wpa_global * wpa_supplicant_init(
  
  	eloop_register_timeout(WPA_SUPPLICANT_CLEANUP_INTERVAL, 0,
  			       wpas_periodic, global, NULL);
@@ -744,7 +744,7 @@ as adding/removing interfaces.
  
  	return global;
  }
-@@ -8637,12 +8641,8 @@ int wpa_supplicant_run(struct wpa_global
+@@ -8665,12 +8669,8 @@ int wpa_supplicant_run(struct wpa_global
  	eloop_register_signal_terminate(wpa_supplicant_terminate, global);
  	eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
  
@@ -757,7 +757,7 @@ as adding/removing interfaces.
  	return 0;
  }
  
-@@ -8675,6 +8675,8 @@ void wpa_supplicant_deinit(struct wpa_gl
+@@ -8703,6 +8703,8 @@ void wpa_supplicant_deinit(struct wpa_gl
  
  	wpas_notify_supplicant_deinitialized(global);
  
@@ -786,7 +786,7 @@ as adding/removing interfaces.
  #endif /* CONFIG_MATCH_IFACE */
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -631,12 +631,17 @@ const char * sae_get_password(struct hos
+@@ -659,12 +659,17 @@ const char * sae_get_password(struct hos
  			      struct sae_pt **s_pt,
  			      const struct sae_pk **s_pk)
  {
@@ -805,7 +805,7 @@ as adding/removing interfaces.
  	/* With sae_track_password functionality enabled, try to first find the
  	 * next viable wildcard-address password if a password identifier was
  	 * not used. Select an wildcard-addr entry if the STA is known to have
-@@ -697,12 +702,30 @@ const char * sae_get_password(struct hos
+@@ -725,12 +730,30 @@ const char * sae_get_password(struct hos
  		pt = hapd->conf->ssid.pt;
  	}
  
@@ -838,7 +838,7 @@ as adding/removing interfaces.
  		}
  	}
  
-@@ -3446,6 +3469,12 @@ static void handle_auth(struct hostapd_d
+@@ -3489,6 +3512,12 @@ static void handle_auth(struct hostapd_d
  		goto fail;
  	}
  
@@ -896,7 +896,7 @@ as adding/removing interfaces.
  	if (vlan_id)
  		*vlan_id = 0;
  	if (psk_len)
-@@ -438,13 +439,18 @@ static const u8 * hostapd_wpa_auth_get_p
+@@ -442,13 +443,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)
  	 */
@@ -916,7 +916,7 @@ as adding/removing interfaces.
  			if (pos->is_passphrase) {
  				if (pbkdf2_sha1(pos->passphrase,
  						hapd->conf->ssid.ssid,
-@@ -458,9 +464,13 @@ static const u8 * hostapd_wpa_auth_get_p
+@@ -462,9 +468,13 @@ static const u8 * hostapd_wpa_auth_get_p
  			}
  			if (pos->psk == prev_psk) {
  				psk = pos->next ? pos->next->psk : NULL;
diff --git a/package/network/services/hostapd/patches/730-ft_iface.patch b/package/network/services/hostapd/patches/730-ft_iface.patch
index e1573bd1fa..4f97b923ab 100644
--- a/package/network/services/hostapd/patches/730-ft_iface.patch
+++ b/package/network/services/hostapd/patches/730-ft_iface.patch
@@ -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
-@@ -1844,8 +1844,12 @@ int hostapd_setup_wpa(struct hostapd_dat
+@@ -1848,8 +1848,12 @@ int hostapd_setup_wpa(struct hostapd_dat
  	    wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) {
  		const char *ft_iface;
  
diff --git a/package/network/services/hostapd/patches/740-snoop_iface.patch b/package/network/services/hostapd/patches/740-snoop_iface.patch
index 105f99e311..f40356ad23 100644
--- a/package/network/services/hostapd/patches/740-snoop_iface.patch
+++ b/package/network/services/hostapd/patches/740-snoop_iface.patch
@@ -112,7 +112,7 @@ untagged DHCP packets
  	hapd->x_snoop_initialized = false;
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -4493,7 +4493,7 @@ struct wpa_driver_ops {
+@@ -4498,7 +4498,7 @@ struct wpa_driver_ops {
  	 * Returns: 0 on success, negative (<0) on failure
  	 */
  	int (*br_set_net_param)(void *priv, enum drv_br_net_param param,
@@ -123,7 +123,7 @@ untagged DHCP packets
  	 * get_wowlan - Get wake-on-wireless status
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -12883,7 +12883,7 @@ static const char * drv_br_net_param_str
+@@ -12893,7 +12893,7 @@ static const char * drv_br_net_param_str
  
  
  static int wpa_driver_br_set_net_param(void *priv, enum drv_br_net_param param,
@@ -132,7 +132,7 @@ untagged DHCP packets
  {
  	struct i802_bss *bss = priv;
  	char path[128];
-@@ -12909,8 +12909,11 @@ static int wpa_driver_br_set_net_param(v
+@@ -12919,8 +12919,11 @@ static int wpa_driver_br_set_net_param(v
  			return -EINVAL;
  	}
  
diff --git a/package/network/services/hostapd/patches/760-dynamic_own_ip.patch b/package/network/services/hostapd/patches/760-dynamic_own_ip.patch
index f46ba6b2e7..bcdf443dbe 100644
--- a/package/network/services/hostapd/patches/760-dynamic_own_ip.patch
+++ b/package/network/services/hostapd/patches/760-dynamic_own_ip.patch
@@ -28,7 +28,7 @@ Some servers use the NAS-IP-Address attribute as a destination address
  	int radius_require_message_authenticator;
 --- a/src/ap/ieee802_1x.c
 +++ b/src/ap/ieee802_1x.c
-@@ -597,6 +597,10 @@ int add_common_radius_attr(struct hostap
+@@ -602,6 +602,10 @@ int add_common_radius_attr(struct hostap
  	struct hostapd_radius_attr *attr;
  	int len;
  
diff --git a/package/network/services/hostapd/patches/763-radius-wispr.patch b/package/network/services/hostapd/patches/763-radius-wispr.patch
index 1b1797318c..c96ef11919 100644
--- a/package/network/services/hostapd/patches/763-radius-wispr.patch
+++ b/package/network/services/hostapd/patches/763-radius-wispr.patch
@@ -1,6 +1,6 @@
 --- a/src/ap/ieee802_1x.c
 +++ b/src/ap/ieee802_1x.c
-@@ -2000,6 +2000,25 @@ static int ieee802_1x_update_vlan(struct
+@@ -2005,6 +2005,25 @@ static int ieee802_1x_update_vlan(struct
  }
  #endif /* CONFIG_NO_VLAN */
  
@@ -26,7 +26,7 @@
  
  /**
   * ieee802_1x_receive_auth - Process RADIUS frames from Authentication Server
-@@ -2116,6 +2135,7 @@ ieee802_1x_receive_auth(struct radius_ms
+@@ -2121,6 +2140,7 @@ ieee802_1x_receive_auth(struct radius_ms
  		ieee802_1x_check_hs20(hapd, sta, msg,
  				      session_timeout_set ?
  				      (int) session_timeout : -1);
diff --git a/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch b/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch
index 271b88c7c0..514ffaf509 100644
--- a/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch
+++ b/package/network/services/hostapd/patches/780-Implement-APuP-Access-Point-Micro-Peering.patch
@@ -373,7 +373,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6
  
  #ifdef CONFIG_FILS
  static struct wpabuf *
-@@ -3837,8 +3840,8 @@ static u16 check_multi_ap(struct hostapd
+@@ -3880,8 +3883,8 @@ static u16 check_multi_ap(struct hostapd
  }
  
  
@@ -384,7 +384,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6
  {
  	/* Supported rates not used in IEEE 802.11ad/DMG */
  	if (hapd->iface->current_mode &&
-@@ -4283,7 +4286,7 @@ static int __check_assoc_ies(struct host
+@@ -4326,7 +4329,7 @@ static int __check_assoc_ies(struct host
  			       elems->ext_capab_len);
  	if (resp != WLAN_STATUS_SUCCESS)
  		return resp;
@@ -393,7 +393,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6
  	if (resp != WLAN_STATUS_SUCCESS)
  		return resp;
  
-@@ -6358,6 +6361,11 @@ static void handle_beacon(struct hostapd
+@@ -6422,6 +6425,11 @@ static void handle_beacon(struct hostapd
  				      0);
  
  	ap_list_process_beacon(hapd->iface, mgmt, &elems, fi);
@@ -418,7 +418,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6
  u16 copy_sta_vendor_vht(struct hostapd_data *hapd, struct sta_info *sta,
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -4187,7 +4187,7 @@ struct wpa_driver_ops {
+@@ -4192,7 +4192,7 @@ struct wpa_driver_ops {
  	 * Returns: 0 on success, -1 on failure
  	 */
  	int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val,
@@ -429,7 +429,7 @@ Hotfix-by: Sebastian Gottschall https://github.com/mirror/dd-wrt/commit/0c3001a6
  	 * send_action - Transmit an Action frame
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -8703,25 +8703,15 @@ static int have_ifidx(struct wpa_driver_
+@@ -8706,25 +8706,15 @@ static int have_ifidx(struct wpa_driver_
  
  
  static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val,
diff --git a/package/network/services/hostapd/patches/803-hostapd-fix-80211be-build.patch b/package/network/services/hostapd/patches/803-hostapd-fix-80211be-build.patch
index 180fe742a6..78034fbb80 100644
--- a/package/network/services/hostapd/patches/803-hostapd-fix-80211be-build.patch
+++ b/package/network/services/hostapd/patches/803-hostapd-fix-80211be-build.patch
@@ -1,6 +1,6 @@
 --- a/src/ap/sta_info.c
 +++ b/src/ap/sta_info.c
-@@ -1972,3 +1972,22 @@ void ap_sta_free_sta_profile(struct mld_
+@@ -1981,3 +1981,22 @@ void ap_sta_free_sta_profile(struct mld_
  	}
  }
  #endif /* CONFIG_IEEE80211BE */



From lede-commits at lists.infradead.org  Wed Aug 27 01:38:06 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 27 Aug 2025 04:38:06 -0400
Subject: [openwrt/openwrt]  udebug: update to Git HEAD (2025-08-17)
In-Reply-To: <175628388528.1909400.661639263294379938@git-01.infra.openwrt.org>
References: <175628388528.1909400.661639263294379938@git-01.infra.openwrt.org>
Message-ID: <mailman.131187.1756283888.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/3e0bcf3af7658d7bfee2aa2636c68be76ca6d010

commit 3e0bcf3af7658d7bfee2aa2636c68be76ca6d010
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 17 11:11:42 2025 +0200

    udebug: update to Git HEAD (2025-08-17)
    
    892647b81d30 ucode: add ferror() call to check for closed write file descriptor
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit 899deae535ac7d0f659dfa3a7b7e769ea74999a4)
---
 package/libs/udebug/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/udebug/Makefile b/package/libs/udebug/Makefile
index b99e74b76b..1acbb16988 100644
--- a/package/libs/udebug/Makefile
+++ b/package/libs/udebug/Makefile
@@ -11,9 +11,9 @@ PKG_NAME:=udebug
 CMAKE_INSTALL:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/udebug.git
-PKG_MIRROR_HASH:=88dffbff7c91ce7f314eb0debbdfd46258633b11106a1e8609a52345a5d65593
-PKG_SOURCE_DATE:=2025-08-15
-PKG_SOURCE_VERSION:=93f6df0240e53115f488357ae83bcf0ae25422d2
+PKG_MIRROR_HASH:=d787e64420b6b8410ee4a432cbaaeba0d116ef0d6bb6d670289229f049d10bf7
+PKG_SOURCE_DATE:=2025-08-17
+PKG_SOURCE_VERSION:=892647b81d30fcec8d275a2c5da05b94192c095d
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Wed Aug 27 01:38:07 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 27 Aug 2025 04:38:07 -0400
Subject: [openwrt/openwrt]  udebug: update to Git HEAD (2025-08-24)
In-Reply-To: <175628388528.1909400.661639263294379938@git-01.infra.openwrt.org>
References: <175628388528.1909400.661639263294379938@git-01.infra.openwrt.org>
Message-ID: <mailman.131188.1756283890.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/5c37d1b9a71c6d107ae588964e872b3f43e53895

commit 5c37d1b9a71c6d107ae588964e872b3f43e53895
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 24 07:18:43 2025 +0200

    udebug: update to Git HEAD (2025-08-24)
    
    6e4ffe2c6657 ucode: add function for getting the number of entries in a snapshot
    a62edd89255b ucode: add support for fetching kernel tracepoint events
    edeb4d6dc690 udebug-cli: add support for streaming tracing data
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit 78188ee2bc3aabc4311539cead5c3a58c184945d)
---
 package/libs/udebug/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/udebug/Makefile b/package/libs/udebug/Makefile
index 1acbb16988..fe9ac87219 100644
--- a/package/libs/udebug/Makefile
+++ b/package/libs/udebug/Makefile
@@ -11,9 +11,9 @@ PKG_NAME:=udebug
 CMAKE_INSTALL:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/udebug.git
-PKG_MIRROR_HASH:=d787e64420b6b8410ee4a432cbaaeba0d116ef0d6bb6d670289229f049d10bf7
-PKG_SOURCE_DATE:=2025-08-17
-PKG_SOURCE_VERSION:=892647b81d30fcec8d275a2c5da05b94192c095d
+PKG_MIRROR_HASH:=5e7b713aa1bff3b6480d4bd94d607b9cafed787b3d1cb27513883c83e56b0273
+PKG_SOURCE_DATE:=2025-08-24
+PKG_SOURCE_VERSION:=edeb4d6dc690acb476a47e6b11633b5632b08437
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Wed Aug 27 01:38:05 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 27 Aug 2025 04:38:05 -0400
Subject: [openwrt/openwrt]  udebug: update to Git HEAD (2025-08-15)
In-Reply-To: <175628388528.1909400.661639263294379938@git-01.infra.openwrt.org>
References: <175628388528.1909400.661639263294379938@git-01.infra.openwrt.org>
Message-ID: <mailman.131189.1756283890.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/c1a8e48f3b287ead810e892529a5f812a689ac5c

commit c1a8e48f3b287ead810e892529a5f812a689ac5c
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Aug 15 17:32:56 2025 +0200

    udebug: update to Git HEAD (2025-08-15)
    
    3d953628bf17 udebugd: add support for setting an override config
    93f6df0240e5 udebug-cli: add support for overriding config on the command line
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit c4e7b9b9b75f4cdd3fe4ec544412fba731afecd3)
---
 package/libs/udebug/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/udebug/Makefile b/package/libs/udebug/Makefile
index 30eac8793e..b99e74b76b 100644
--- a/package/libs/udebug/Makefile
+++ b/package/libs/udebug/Makefile
@@ -11,9 +11,9 @@ PKG_NAME:=udebug
 CMAKE_INSTALL:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/udebug.git
-PKG_MIRROR_HASH:=578f795ef6ed0400efae8754891539e5b2922d8b164425e535b96da1b0a089c5
-PKG_SOURCE_DATE:=2025-07-23
-PKG_SOURCE_VERSION:=6ed8536142bbd4360b55a423723456a6a862c99b
+PKG_MIRROR_HASH:=88dffbff7c91ce7f314eb0debbdfd46258633b11106a1e8609a52345a5d65593
+PKG_SOURCE_DATE:=2025-08-15
+PKG_SOURCE_VERSION:=93f6df0240e53115f488357ae83bcf0ae25422d2
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Wed Aug 27 03:48:49 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 27 Aug 2025 06:48:49 -0400
Subject: [openwrt/openwrt]  ath79: qcn5502: use led-sources for WMAC
In-Reply-To: <175629172931.2434091.13824267299820207431@git-01.infra.openwrt.org>
References: <175629172931.2434091.13824267299820207431@git-01.infra.openwrt.org>
Message-ID: <mailman.131338.1756294339.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c1a6c85c98a0301e72cc7ec3b4959f2fa7d9f78d

commit c1a6c85c98a0301e72cc7ec3b4959f2fa7d9f78d
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sat May 24 18:10:42 2025 -0700

    ath79: qcn5502: use led-sources for WMAC
    
    The ath9k driver creates an ath9k LED by default. Instead of having a
    non functional LED, configure it properly and remove the extra as it's
    not needed.
    
    It's also a bit funny matching against phy0 and phy1 when both differ
    between ath9k and ath10k.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19862
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dtsi      | 13 +++++++------
 target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts | 11 +++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dtsi b/target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dtsi
index 3d3df1adcc..dfa68895f8 100644
--- a/target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dtsi
+++ b/target/linux/ath79/dts/qcn5502_asus_rt-ac59u.dtsi
@@ -49,12 +49,6 @@
 			linux,default-trigger = "usbport";
 		};
 
-		wlan2g {
-			label = "blue:wlan2g";
-			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy1tpt";
-		};
-
 		wlan5g {
 			label = "blue:wlan5g";
 			gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
@@ -70,3 +64,10 @@
 &usb0 {
 	status = "okay";
 };
+
+&wmac {
+	led {
+		led-sources = <15>;
+		led-active-low;
+	};
+};
diff --git a/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts b/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts
index b674863705..c905dc79f0 100644
--- a/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts
+++ b/target/linux/ath79/dts/qcn5502_tplink_archer-a9-v6.dts
@@ -66,12 +66,6 @@
 			gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
 		};
 
-		wlan2g {
-			label = "green:wlan2g";
-			gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy1tpt";
-		};
-
 		wlan5g {
 			label = "green:wlan5g";
 			gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
@@ -246,4 +240,9 @@
 
 	nvmem-cells = <&cal_art_1000>, <&macaddr_info_8 0>;
 	nvmem-cell-names = "calibration", "mac-address";
+
+	led {
+		led-sources = <15>;
+		led-active-low;
+	};
 };



From lede-commits at lists.infradead.org  Wed Aug 27 04:30:08 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 27 Aug 2025 07:30:08 -0400
Subject: [openwrt/openwrt]  mt76: update to Git HEAD (2025-08-27)
In-Reply-To: <175629420837.2608759.13137286975643725534@git-01.infra.openwrt.org>
References: <175629420837.2608759.13137286975643725534@git-01.infra.openwrt.org>
Message-ID: <mailman.131385.1756297733.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2760a08b407c6ecd7f56718e07b9c48b32d05844

commit 2760a08b407c6ecd7f56718e07b9c48b32d05844
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Aug 27 13:29:27 2025 +0200

    mt76: update to Git HEAD (2025-08-27)
    
    d729307b5e8b mt76: mt7996: add missing null pointer check
    fb22489fd738 wifi: mt76: do not add non-sta wcid entries to the poll list
    fb7e0501b8f9 wifi: mt76: mt7996: add missing check for rx wcid entries
    4cd64ad1283b wifi: mt76: mt7915: fix list corruption after hardware restart
    ee538efba542 wifi: mt76: free pending offchannel tx frames on wcid cleanup
    415b5a68878b wifi: mt76: fix list corruption
    3ed2c4030d42 wifi: mt76: mt7925u: use connac3 tx aggr check in tx complete
    a35af277873f wifi: mt76: mt7925: skip EHT MLD TLV on non-MLD and pass conn_state for sta_cmd
    384d3a9bff2d wifi: mt76: mt7996: Use deflink for AMPDU rx reordering
    9bae5f956e65 wifi: mt76: Remove dead code in mt76_scan_work
    de1df8b888bd wifi: mt76: mt7996: Export MLO AP capabilities to mac80211
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/kernel/mt76/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 4e7d5a2657..f28e9125bc 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2025-08-14
-PKG_SOURCE_VERSION:=5f61f34087c56b1cb0ad56770fe9430065a41a11
-PKG_MIRROR_HASH:=af3f37682dbc7655aecd894e8fe20259170cbcee021361bd460cfab09169fd82
+PKG_SOURCE_DATE:=2025-08-27
+PKG_SOURCE_VERSION:=de1df8b888bd1c99ee191f451af47b4fa9658e8c
+PKG_MIRROR_HASH:=4ead68e97fc6472a682dae2f96f9dbb377f23c316511f625b85af15de46e9397
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0



From lede-commits at lists.infradead.org  Wed Aug 27 04:39:29 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 27 Aug 2025 07:39:29 -0400
Subject: [openwrt/openwrt]  mt76: update to Git HEAD (2025-08-27)
In-Reply-To: <175629476900.2654732.7561870426222269991@git-01.infra.openwrt.org>
References: <175629476900.2654732.7561870426222269991@git-01.infra.openwrt.org>
Message-ID: <mailman.131390.1756298065.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/64bbe71219d65a5c3c17409e8b2a1b78c2d9f9c0

commit 64bbe71219d65a5c3c17409e8b2a1b78c2d9f9c0
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Aug 14 18:43:48 2025 +0200

    mt76: update to Git HEAD (2025-08-27)
    
    5f61f34087c5 wifi: mt76: mt7996: fix crash on some tx status reports
    d729307b5e8b mt76: mt7996: add missing null pointer check
    fb22489fd738 wifi: mt76: do not add non-sta wcid entries to the poll list
    fb7e0501b8f9 wifi: mt76: mt7996: add missing check for rx wcid entries
    4cd64ad1283b wifi: mt76: mt7915: fix list corruption after hardware restart
    ee538efba542 wifi: mt76: free pending offchannel tx frames on wcid cleanup
    415b5a68878b wifi: mt76: fix list corruption
    3ed2c4030d42 wifi: mt76: mt7925u: use connac3 tx aggr check in tx complete
    a35af277873f wifi: mt76: mt7925: skip EHT MLD TLV on non-MLD and pass conn_state for sta_cmd
    384d3a9bff2d wifi: mt76: mt7996: Use deflink for AMPDU rx reordering
    9bae5f956e65 wifi: mt76: Remove dead code in mt76_scan_work
    de1df8b888bd wifi: mt76: mt7996: Export MLO AP capabilities to mac80211
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit 2760a08b407c6ecd7f56718e07b9c48b32d05844)
---
 package/kernel/mt76/Makefile                     | 6 +++---
 package/kernel/mt76/patches/100-api_compat.patch | 8 ++++----
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 026218e478..b5b9b22873 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -8,9 +8,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2025-08-13
-PKG_SOURCE_VERSION:=903a7e0ace79dc9802b381fa05ecd2028122dd1b
-PKG_MIRROR_HASH:=fcff7a90c8745091b8113e7833dc1f25e2767ff76da1f7adad27bde225c834df
+PKG_SOURCE_DATE:=2025-08-27
+PKG_SOURCE_VERSION:=de1df8b888bd1c99ee191f451af47b4fa9658e8c
+PKG_MIRROR_HASH:=4ead68e97fc6472a682dae2f96f9dbb377f23c316511f625b85af15de46e9397
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0
diff --git a/package/kernel/mt76/patches/100-api_compat.patch b/package/kernel/mt76/patches/100-api_compat.patch
index 3dd4e1f799..989967164b 100644
--- a/package/kernel/mt76/patches/100-api_compat.patch
+++ b/package/kernel/mt76/patches/100-api_compat.patch
@@ -33,7 +33,7 @@
  {
  	struct mt7996_vif *mvif = (struct mt7996_vif *)vif->drv_priv;
  	struct mt7996_phy *phy = mt7996_vif_link_phy(&mvif->deflink);
-@@ -1714,13 +1713,12 @@ out:
+@@ -1687,13 +1686,12 @@ out:
  	rcu_read_unlock();
  }
  
@@ -51,7 +51,7 @@
  
  	mt7996_link_rate_ctrl_update(&changed, sta);
  	ieee80211_queue_work(hw, &dev->rc_work);
-@@ -2213,7 +2211,7 @@ const struct ieee80211_ops mt7996_ops =
+@@ -2186,7 +2184,7 @@ const struct ieee80211_ops mt7996_ops =
  	.link_info_changed = mt7996_link_info_changed,
  	.sta_state = mt7996_sta_state,
  	.sta_pre_rcu_remove = mt76_sta_pre_rcu_remove,
@@ -62,7 +62,7 @@
  	.set_rts_threshold = mt7996_set_rts_threshold,
 --- a/mac80211.c
 +++ b/mac80211.c
-@@ -1704,7 +1704,7 @@ s8 mt76_get_power_bound(struct mt76_phy
+@@ -1745,7 +1745,7 @@ s8 mt76_get_power_bound(struct mt76_phy
  EXPORT_SYMBOL_GPL(mt76_get_power_bound);
  
  int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
@@ -73,7 +73,7 @@
  	int n_chains, delta;
 --- a/mt76.h
 +++ b/mt76.h
-@@ -1520,7 +1520,7 @@ int mt76_get_min_avg_rssi(struct mt76_de
+@@ -1521,7 +1521,7 @@ int mt76_get_min_avg_rssi(struct mt76_de
  s8 mt76_get_power_bound(struct mt76_phy *phy, s8 txpower);
  
  int mt76_get_txpower(struct ieee80211_hw *hw, struct ieee80211_vif *vif,



From lede-commits at lists.infradead.org  Wed Aug 27 06:42:49 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 27 Aug 2025 09:42:49 -0400
Subject: [openwrt/openwrt]  mac80211: extend connection monitoring for MLO
In-Reply-To: <175630216909.3184707.214735058527919034@git-01.infra.openwrt.org>
References: <175630216909.3184707.214735058527919034@git-01.infra.openwrt.org>
Message-ID: <mailman.131583.1756309778.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6fbf6d0cfd080230ce4ca72605580b0c188db8a1

commit 6fbf6d0cfd080230ce4ca72605580b0c188db8a1
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Aug 27 15:24:29 2025 +0200

    mac80211: extend connection monitoring for MLO
    
    Required for latest mt76
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...11-Add-link-iteration-macro-for-link-data.patch |  44 +++++++
 ...mac80211-extend-beacon-monitoring-for-MLO.patch |  85 +++++++++++++
 ...0211-extend-connection-monitoring-for-MLO.patch | 136 +++++++++++++++++++++
 ...11-Make-CONNECTION_MONITOR-optional-for-M.patch |  25 ++++
 ...211-allow-scanning-while-on-radar-channel.patch |   8 +-
 ...ctor-out-part-of-ieee80211_calc_expected_.patch |   2 +-
 6 files changed, 295 insertions(+), 5 deletions(-)

diff --git a/package/kernel/mac80211/patches/subsys/340-wifi-mac80211-Add-link-iteration-macro-for-link-data.patch b/package/kernel/mac80211/patches/subsys/340-wifi-mac80211-Add-link-iteration-macro-for-link-data.patch
new file mode 100644
index 0000000000..1c3bb784dd
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/340-wifi-mac80211-Add-link-iteration-macro-for-link-data.patch
@@ -0,0 +1,44 @@
+From: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
+Date: Fri, 18 Jul 2025 11:38:35 +0530
+Subject: [PATCH] wifi: mac80211: Add link iteration macro for link data
+ with rcu_dereference
+
+Currently, the existing macro for_each_link_data() uses sdata_dereference()
+which requires the wiphy lock. This lock cannot be used in atomic or RCU
+read-side contexts, such as in the RX path.
+
+Introduce a new macro, for_each_link_data_rcu(), that iterates over link of
+sdata using rcu_dereference(), making it safe to use in RCU contexts. This
+allows callers to access link data without requiring the wiphy lock.
+
+The macro takes into account the vif.valid_links bitmap and ensures only
+valid links are accessed safely. Callers are responsible for ensuring that
+rcu_read_lock() is held when using this macro.
+
+Signed-off-by: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
+Link: https://patch.msgid.link/20250718060837.59371-3-maharaja.kennadyrajan at oss.qualcomm.com
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -1237,6 +1237,19 @@ struct ieee80211_sub_if_data *vif_to_sda
+ 		    ((__link) = sdata_dereference((__sdata)->link[__link_id],	\
+ 						  (__sdata))))
+ 
++/*
++ * for_each_link_data_rcu should be used under RCU read lock.
++ */
++#define for_each_link_data_rcu(sdata, __link)					\
++	/* outer loop just to define the variable ... */			\
++	for (struct ieee80211_sub_if_data *__sdata = (sdata); __sdata;		\
++		__sdata = NULL /* always stop */)				\
++	for (int __link_id = 0;							\
++	     __link_id < ARRAY_SIZE((__sdata)->link); __link_id++)		\
++		if ((!(__sdata)->vif.valid_links ||				\
++		     (__sdata)->vif.valid_links & BIT(__link_id)) &&		\
++		    ((__link) = rcu_dereference((__sdata)->link[__link_id])))	\
++
+ static inline int
+ ieee80211_get_mbssid_beacon_len(struct cfg80211_mbssid_elems *elems,
+ 				struct cfg80211_rnr_elems *rnr_elems,
diff --git a/package/kernel/mac80211/patches/subsys/341-wifi-mac80211-extend-beacon-monitoring-for-MLO.patch b/package/kernel/mac80211/patches/subsys/341-wifi-mac80211-extend-beacon-monitoring-for-MLO.patch
new file mode 100644
index 0000000000..f0226fdff1
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/341-wifi-mac80211-extend-beacon-monitoring-for-MLO.patch
@@ -0,0 +1,85 @@
+From: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
+Date: Fri, 18 Jul 2025 11:38:36 +0530
+Subject: [PATCH] wifi: mac80211: extend beacon monitoring for MLO
+
+Currently, reset beacon monitor (ieee80211_sta_reset_beacon_monitor())
+timer is handled only for non-AP non-MLD STA and do not support non-AP MLD
+STA. When the beacon loss occurs in non-AP MLD STA with the current
+implementation, it is treated as a single link and the timer will reset
+based on the timeout of the deflink, without checking all the links.
+
+Check the CSA flags for all the links in the MLO and decide whether to
+schedule the work queue for beacon loss. If any of the links has CSA
+active, then beacon loss work is not scheduled.
+
+Also, call the functions ieee80211_sta_reset_beacon_monitor() and
+ieee80211_sta_reset_conn_monitor() from ieee80211_csa_switch_work() only
+when all the links are CSA active.
+
+Signed-off-by: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
+Link: https://patch.msgid.link/20250718060837.59371-4-maharaja.kennadyrajan at oss.qualcomm.com
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -2439,6 +2439,21 @@ static void ieee80211_csa_switch_work(st
+ 		}
+ 	}
+ 
++	/*
++	 * It is not necessary to reset these timers if any link does not
++	 * have an active CSA and that link still receives the beacons
++	 * when other links have active CSA.
++	 */
++	for_each_link_data(sdata, link) {
++		if (!link->conf->csa_active)
++			return;
++	}
++
++	/*
++	 * Reset the beacon monitor and connection monitor timers when CSA
++	 * is active for all links in MLO when channel switch occurs in all
++	 * the links.
++	 */
+ 	ieee80211_sta_reset_beacon_monitor(sdata);
+ 	ieee80211_sta_reset_conn_monitor(sdata);
+ }
+@@ -8389,16 +8404,32 @@ void ieee80211_sta_work(struct ieee80211
+ 	}
+ }
+ 
++static bool
++ieee80211_is_csa_in_progress(struct ieee80211_sub_if_data *sdata)
++{
++	/*
++	 * In MLO, check the CSA flags 'active' and 'waiting_bcn' for all
++	 * the links.
++	 */
++	struct ieee80211_link_data *link;
++
++	guard(rcu)();
++
++	for_each_link_data_rcu(sdata, link) {
++		if (!(link->conf->csa_active &&
++		      !link->u.mgd.csa.waiting_bcn))
++			return false;
++	}
++
++	return true;
++}
++
+ static void ieee80211_sta_bcn_mon_timer(struct timer_list *t)
+ {
+ 	struct ieee80211_sub_if_data *sdata =
+ 		timer_container_of(sdata, t, u.mgd.bcn_mon_timer);
+ 
+-	if (WARN_ON(ieee80211_vif_is_mld(&sdata->vif)))
+-		return;
+-
+-	if (sdata->vif.bss_conf.csa_active &&
+-	    !sdata->deflink.u.mgd.csa.waiting_bcn)
++	if (ieee80211_is_csa_in_progress(sdata))
+ 		return;
+ 
+ 	if (sdata->vif.driver_flags & IEEE80211_VIF_BEACON_FILTER)
diff --git a/package/kernel/mac80211/patches/subsys/342-wifi-mac80211-extend-connection-monitoring-for-MLO.patch b/package/kernel/mac80211/patches/subsys/342-wifi-mac80211-extend-connection-monitoring-for-MLO.patch
new file mode 100644
index 0000000000..3da06793de
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/342-wifi-mac80211-extend-connection-monitoring-for-MLO.patch
@@ -0,0 +1,136 @@
+From: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
+Date: Fri, 18 Jul 2025 11:38:37 +0530
+Subject: [PATCH] wifi: mac80211: extend connection monitoring for MLO
+
+Currently, reset connection monitor (ieee80211_sta_reset_conn_monitor())
+timer is handled only for non-AP non-MLD STA and do not support non-AP MLD
+STA. The current implementation checks for the CSA active and update the
+monitor timer with the timeout value of deflink and reset the timer based
+on the deflink's timeout value else schedule the connection loss work when
+the deflink is timed out and it won't work for the non-AP MLD STA.
+
+Handle the reset connection monitor timer for non-AP MLD STA by updating
+the monitor timer with the timeout value which is determined based on the
+link that will expire last among all the links in MLO. If at least one link
+has not timed out, the timer is updated accordingly with the latest timeout
+value else schedule the connection loss work when all links have timed out.
+
+Remove the MLO-related WARN_ON() checks in the beacon and connection
+monitoring logic code paths as they support MLO now.
+
+Signed-off-by: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
+Link: https://patch.msgid.link/20250718060837.59371-5-maharaja.kennadyrajan at oss.qualcomm.com
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -4300,9 +4300,6 @@ static void ieee80211_mgd_probe_ap_send(
+ 
+ 	lockdep_assert_wiphy(sdata->local->hw.wiphy);
+ 
+-	if (WARN_ON(ieee80211_vif_is_mld(&sdata->vif)))
+-		return;
+-
+ 	/*
+ 	 * Try sending broadcast probe requests for the last three
+ 	 * probe requests after the first ones failed since some
+@@ -4348,9 +4345,6 @@ static void ieee80211_mgd_probe_ap(struc
+ 
+ 	lockdep_assert_wiphy(sdata->local->hw.wiphy);
+ 
+-	if (WARN_ON_ONCE(ieee80211_vif_is_mld(&sdata->vif)))
+-		return;
+-
+ 	if (!ieee80211_sdata_running(sdata))
+ 		return;
+ 
+@@ -8440,36 +8434,70 @@ static void ieee80211_sta_bcn_mon_timer(
+ 			 &sdata->u.mgd.beacon_connection_loss_work);
+ }
+ 
++static unsigned long
++ieee80211_latest_active_link_conn_timeout(struct ieee80211_sub_if_data *sdata)
++{
++	unsigned long latest_timeout;
++	unsigned int link_id;
++	struct sta_info *sta;
++
++	guard(rcu)();
++
++	sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
++	if (!sta)
++		return 0;
++
++	for (link_id = 0; link_id < ARRAY_SIZE(sta->link);
++	     link_id++) {
++		struct link_sta_info *link_sta;
++		unsigned long timeout;
++
++		link_sta = rcu_dereference(sta->link[link_id]);
++		if (!link_sta)
++			continue;
++
++		timeout = link_sta->status_stats.last_ack;
++		if (time_before(timeout, link_sta->rx_stats.last_rx))
++			timeout = link_sta->rx_stats.last_rx;
++
++		timeout += IEEE80211_CONNECTION_IDLE_TIME;
++
++		/*
++		 * latest_timeout holds the timeout of the link
++		 * that will expire last among all links in an
++		 * non-AP MLD STA. This ensures that the connection
++		 * monitor timer is only reset if at least one link
++		 * is still active, and it is scheduled to fire at
++		 * the latest possible timeout.
++		 */
++		if (time_is_after_jiffies(timeout) &&
++		    time_after(timeout, latest_timeout))
++			latest_timeout = timeout;
++	}
++
++	return latest_timeout;
++}
++
+ static void ieee80211_sta_conn_mon_timer(struct timer_list *t)
+ {
+ 	struct ieee80211_sub_if_data *sdata =
+ 		timer_container_of(sdata, t, u.mgd.conn_mon_timer);
+ 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ 	struct ieee80211_local *local = sdata->local;
+-	struct sta_info *sta;
+-	unsigned long timeout;
++	unsigned long latest_timeout;
+ 
+-	if (WARN_ON(ieee80211_vif_is_mld(&sdata->vif)))
+-		return;
+-
+-	if (sdata->vif.bss_conf.csa_active &&
+-	    !sdata->deflink.u.mgd.csa.waiting_bcn)
+-		return;
+-
+-	sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
+-	if (!sta)
++	if (ieee80211_is_csa_in_progress(sdata))
+ 		return;
+ 
+-	timeout = sta->deflink.status_stats.last_ack;
+-	if (time_before(sta->deflink.status_stats.last_ack, sta->deflink.rx_stats.last_rx))
+-		timeout = sta->deflink.rx_stats.last_rx;
+-	timeout += IEEE80211_CONNECTION_IDLE_TIME;
++	latest_timeout = ieee80211_latest_active_link_conn_timeout(sdata);
+ 
+-	/* If timeout is after now, then update timer to fire at
++	/*
++	 * If latest timeout is after now, then update timer to fire at
+ 	 * the later date, but do not actually probe at this time.
+ 	 */
+-	if (time_is_after_jiffies(timeout)) {
+-		mod_timer(&ifmgd->conn_mon_timer, round_jiffies_up(timeout));
++	if (latest_timeout) {
++		mod_timer(&ifmgd->conn_mon_timer,
++			  round_jiffies_up(latest_timeout));
+ 		return;
+ 	}
+ 
diff --git a/package/kernel/mac80211/patches/subsys/343-wifi-mac80211-Make-CONNECTION_MONITOR-optional-for-M.patch b/package/kernel/mac80211/patches/subsys/343-wifi-mac80211-Make-CONNECTION_MONITOR-optional-for-M.patch
new file mode 100644
index 0000000000..457a8894f2
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/343-wifi-mac80211-Make-CONNECTION_MONITOR-optional-for-M.patch
@@ -0,0 +1,25 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Tue, 26 Aug 2025 13:54:31 +0200
+Subject: [PATCH] wifi: mac80211: Make CONNECTION_MONITOR optional for MLO sta
+
+Since commit '1bc892d76a6f ("wifi: mac80211: extend connection
+monitoring for MLO")' mac80211 supports connection monitor for MLO
+client interfaces. Remove the CONNECTION_MONITOR requirement in
+ieee80211_register_hw routine.
+
+Fixes: 1bc892d76a6f ("wifi: mac80211: extend connection monitoring for MLO")
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+---
+
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -1179,9 +1179,6 @@ int ieee80211_register_hw(struct ieee802
+ 		if (WARN_ON(!ieee80211_hw_check(hw, MFP_CAPABLE)))
+ 			return -EINVAL;
+ 
+-		if (WARN_ON(!ieee80211_hw_check(hw, CONNECTION_MONITOR)))
+-			return -EINVAL;
+-
+ 		if (WARN_ON(ieee80211_hw_check(hw, NEED_DTIM_BEFORE_ASSOC)))
+ 			return -EINVAL;
+ 
diff --git a/package/kernel/mac80211/patches/subsys/350-mac80211-allow-scanning-while-on-radar-channel.patch b/package/kernel/mac80211/patches/subsys/350-mac80211-allow-scanning-while-on-radar-channel.patch
index 33ca9fe335..fe9db05cb1 100644
--- a/package/kernel/mac80211/patches/subsys/350-mac80211-allow-scanning-while-on-radar-channel.patch
+++ b/package/kernel/mac80211/patches/subsys/350-mac80211-allow-scanning-while-on-radar-channel.patch
@@ -77,7 +77,7 @@
  
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -1975,6 +1975,12 @@ int ieee80211_mesh_finish_csa(struct iee
+@@ -1988,6 +1988,12 @@ int ieee80211_mesh_finish_csa(struct iee
  			      u64 *changed);
  
  /* scan/BSS handling */
@@ -90,7 +90,7 @@
  void ieee80211_scan_work(struct wiphy *wiphy, struct wiphy_work *work);
  int ieee80211_request_ibss_scan(struct ieee80211_sub_if_data *sdata,
  				const u8 *ssid, u8 ssid_len,
-@@ -2013,6 +2019,7 @@ void ieee80211_sched_scan_stopped_work(s
+@@ -2026,6 +2032,7 @@ void ieee80211_sched_scan_stopped_work(s
  /* off-channel/mgmt-tx */
  void ieee80211_offchannel_stop_vifs(struct ieee80211_local *local);
  void ieee80211_offchannel_return(struct ieee80211_local *local);
@@ -98,7 +98,7 @@
  void ieee80211_roc_setup(struct ieee80211_local *local);
  void ieee80211_start_next_roc(struct ieee80211_local *local);
  void ieee80211_reconfig_roc(struct ieee80211_local *local);
-@@ -2660,6 +2667,8 @@ bool ieee80211_chandef_s1g_oper(const st
+@@ -2673,6 +2680,8 @@ bool ieee80211_chandef_s1g_oper(const st
  				struct cfg80211_chan_def *chandef);
  void ieee80211_chandef_downgrade(struct cfg80211_chan_def *chandef,
  				 struct ieee80211_conn_settings *conn);
@@ -107,7 +107,7 @@
  static inline void
  ieee80211_chanreq_downgrade(struct ieee80211_chan_req *chanreq,
  			    struct ieee80211_conn_settings *conn)
-@@ -2716,7 +2725,7 @@ void ieee80211_recalc_chanctx_min_def(st
+@@ -2729,7 +2738,7 @@ void ieee80211_recalc_chanctx_min_def(st
  				      struct ieee80211_chanctx *ctx,
  				      struct ieee80211_link_data *rsvd_for,
  				      bool check_reserved);
diff --git a/package/kernel/mac80211/patches/subsys/360-mac80211-factor-out-part-of-ieee80211_calc_expected_.patch b/package/kernel/mac80211/patches/subsys/360-mac80211-factor-out-part-of-ieee80211_calc_expected_.patch
index bffb66dfe7..b34465f3af 100644
--- a/package/kernel/mac80211/patches/subsys/360-mac80211-factor-out-part-of-ieee80211_calc_expected_.patch
+++ b/package/kernel/mac80211/patches/subsys/360-mac80211-factor-out-part-of-ieee80211_calc_expected_.patch
@@ -126,7 +126,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	}
 --- a/net/mac80211/ieee80211_i.h
 +++ b/net/mac80211/ieee80211_i.h
-@@ -2776,6 +2776,11 @@ u8 *ieee80211_get_bssid(struct ieee80211
+@@ -2789,6 +2789,11 @@ u8 *ieee80211_get_bssid(struct ieee80211
  
  extern const struct ethtool_ops ieee80211_ethtool_ops;
  



From lede-commits at lists.infradead.org  Wed Aug 27 06:45:21 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 27 Aug 2025 09:45:21 -0400
Subject: [openwrt/openwrt]  mac80211: extend connection monitoring for MLO
In-Reply-To: <175630232184.3191944.4218679543872026560@git-01.infra.openwrt.org>
References: <175630232184.3191944.4218679543872026560@git-01.infra.openwrt.org>
Message-ID: <mailman.131584.1756309778.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/03fe5966997363a08d686bca219b647f58ef4fc3

commit 03fe5966997363a08d686bca219b647f58ef4fc3
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Aug 27 15:24:29 2025 +0200

    mac80211: extend connection monitoring for MLO
    
    Required for latest mt76
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit 6fbf6d0cfd080230ce4ca72605580b0c188db8a1)
---
 ...11-Add-link-iteration-macro-for-link-data.patch |  55 ++++++++
 ...mac80211-extend-beacon-monitoring-for-MLO.patch |  77 +++++++++++
 ...0211-extend-connection-monitoring-for-MLO.patch | 141 +++++++++++++++++++++
 ...11-Make-CONNECTION_MONITOR-optional-for-M.patch |  25 ++++
 4 files changed, 298 insertions(+)

diff --git a/package/kernel/mac80211/patches/subsys/350-wifi-mac80211-Add-link-iteration-macro-for-link-data.patch b/package/kernel/mac80211/patches/subsys/350-wifi-mac80211-Add-link-iteration-macro-for-link-data.patch
new file mode 100644
index 0000000000..d78a72d246
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/350-wifi-mac80211-Add-link-iteration-macro-for-link-data.patch
@@ -0,0 +1,55 @@
+From: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
+Date: Fri, 18 Jul 2025 11:38:35 +0530
+Subject: [PATCH] wifi: mac80211: Add link iteration macro for link data
+ with rcu_dereference
+
+Currently, the existing macro for_each_link_data() uses sdata_dereference()
+which requires the wiphy lock. This lock cannot be used in atomic or RCU
+read-side contexts, such as in the RX path.
+
+Introduce a new macro, for_each_link_data_rcu(), that iterates over link of
+sdata using rcu_dereference(), making it safe to use in RCU contexts. This
+allows callers to access link data without requiring the wiphy lock.
+
+The macro takes into account the vif.valid_links bitmap and ensures only
+valid links are accessed safely. Callers are responsible for ensuring that
+rcu_read_lock() is held when using this macro.
+
+Signed-off-by: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
+Link: https://patch.msgid.link/20250718060837.59371-3-maharaja.kennadyrajan at oss.qualcomm.com
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -1211,6 +1211,30 @@ struct ieee80211_sub_if_data *vif_to_sda
+ 	if ((_link = wiphy_dereference((local)->hw.wiphy,		\
+ 				       ___sdata->link[___link_id])))
+ 
++#define for_each_link_data(sdata, __link)					\
++	/* outer loop just to define the variable ... */			\
++	for (struct ieee80211_sub_if_data *__sdata = (sdata); __sdata;		\
++		__sdata = NULL /* always stop */)				\
++	for (int __link_id = 0;							\
++	     __link_id < ARRAY_SIZE((__sdata)->link); __link_id++)		\
++		if ((!(__sdata)->vif.valid_links ||				\
++		     (__sdata)->vif.valid_links & BIT(__link_id)) &&		\
++		    ((__link) = sdata_dereference((__sdata)->link[__link_id],	\
++						  (__sdata))))
++
++/*
++ * for_each_link_data_rcu should be used under RCU read lock.
++ */
++#define for_each_link_data_rcu(sdata, __link)					\
++	/* outer loop just to define the variable ... */			\
++	for (struct ieee80211_sub_if_data *__sdata = (sdata); __sdata;		\
++		__sdata = NULL /* always stop */)				\
++	for (int __link_id = 0;							\
++	     __link_id < ARRAY_SIZE((__sdata)->link); __link_id++)		\
++		if ((!(__sdata)->vif.valid_links ||				\
++		     (__sdata)->vif.valid_links & BIT(__link_id)) &&		\
++		    ((__link) = rcu_dereference((__sdata)->link[__link_id])))	\
++
+ static inline int
+ ieee80211_get_mbssid_beacon_len(struct cfg80211_mbssid_elems *elems,
+ 				struct cfg80211_rnr_elems *rnr_elems,
diff --git a/package/kernel/mac80211/patches/subsys/351-wifi-mac80211-extend-beacon-monitoring-for-MLO.patch b/package/kernel/mac80211/patches/subsys/351-wifi-mac80211-extend-beacon-monitoring-for-MLO.patch
new file mode 100644
index 0000000000..b1986dc8aa
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/351-wifi-mac80211-extend-beacon-monitoring-for-MLO.patch
@@ -0,0 +1,77 @@
+From: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
+Date: Fri, 18 Jul 2025 11:38:36 +0530
+Subject: [PATCH] wifi: mac80211: extend beacon monitoring for MLO
+
+Currently, reset beacon monitor (ieee80211_sta_reset_beacon_monitor())
+timer is handled only for non-AP non-MLD STA and do not support non-AP MLD
+STA. When the beacon loss occurs in non-AP MLD STA with the current
+implementation, it is treated as a single link and the timer will reset
+based on the timeout of the deflink, without checking all the links.
+
+Check the CSA flags for all the links in the MLO and decide whether to
+schedule the work queue for beacon loss. If any of the links has CSA
+active, then beacon loss work is not scheduled.
+
+Also, call the functions ieee80211_sta_reset_beacon_monitor() and
+ieee80211_sta_reset_conn_monitor() from ieee80211_csa_switch_work() only
+when all the links are CSA active.
+
+Signed-off-by: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
+Link: https://patch.msgid.link/20250718060837.59371-4-maharaja.kennadyrajan at oss.qualcomm.com
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -2159,6 +2159,21 @@ static void ieee80211_csa_switch_work(st
+ 		}
+ 	}
+ 
++	/*
++	 * It is not necessary to reset these timers if any link does not
++	 * have an active CSA and that link still receives the beacons
++	 * when other links have active CSA.
++	 */
++	for_each_link_data(sdata, link) {
++		if (!link->conf->csa_active)
++			return;
++	}
++
++	/*
++	 * Reset the beacon monitor and connection monitor timers when CSA
++	 * is active for all links in MLO when channel switch occurs in all
++	 * the links.
++	 */
+ 	ieee80211_sta_reset_beacon_monitor(sdata);
+ 	ieee80211_sta_reset_conn_monitor(sdata);
+ }
+@@ -7863,6 +7878,29 @@ void ieee80211_sta_work(struct ieee80211
+ 	}
+ }
+ 
++static bool
++ieee80211_is_csa_in_progress(struct ieee80211_sub_if_data *sdata)
++{
++	/*
++	 * In MLO, check the CSA flags 'active' and 'waiting_bcn' for all
++	 * the links.
++	 */
++	struct ieee80211_link_data *link;
++	bool ret = true;
++
++	rcu_read_lock();
++	for_each_link_data_rcu(sdata, link) {
++		if (!(link->conf->csa_active &&
++		      !link->u.mgd.csa.waiting_bcn)) {
++			ret = false;
++			break;
++		}
++	}
++	rcu_read_unlock();
++
++	return ret;
++}
++
+ static void ieee80211_sta_bcn_mon_timer(struct timer_list *t)
+ {
+ 	struct ieee80211_sub_if_data *sdata =
diff --git a/package/kernel/mac80211/patches/subsys/352-wifi-mac80211-extend-connection-monitoring-for-MLO.patch b/package/kernel/mac80211/patches/subsys/352-wifi-mac80211-extend-connection-monitoring-for-MLO.patch
new file mode 100644
index 0000000000..e6227b97ea
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/352-wifi-mac80211-extend-connection-monitoring-for-MLO.patch
@@ -0,0 +1,141 @@
+From: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
+Date: Fri, 18 Jul 2025 11:38:37 +0530
+Subject: [PATCH] wifi: mac80211: extend connection monitoring for MLO
+
+Currently, reset connection monitor (ieee80211_sta_reset_conn_monitor())
+timer is handled only for non-AP non-MLD STA and do not support non-AP MLD
+STA. The current implementation checks for the CSA active and update the
+monitor timer with the timeout value of deflink and reset the timer based
+on the deflink's timeout value else schedule the connection loss work when
+the deflink is timed out and it won't work for the non-AP MLD STA.
+
+Handle the reset connection monitor timer for non-AP MLD STA by updating
+the monitor timer with the timeout value which is determined based on the
+link that will expire last among all the links in MLO. If at least one link
+has not timed out, the timer is updated accordingly with the latest timeout
+value else schedule the connection loss work when all links have timed out.
+
+Remove the MLO-related WARN_ON() checks in the beacon and connection
+monitoring logic code paths as they support MLO now.
+
+Signed-off-by: Maharaja Kennadyrajan <maharaja.kennadyrajan at oss.qualcomm.com>
+Link: https://patch.msgid.link/20250718060837.59371-5-maharaja.kennadyrajan at oss.qualcomm.com
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -3831,9 +3831,6 @@ static void ieee80211_mgd_probe_ap_send(
+ 
+ 	lockdep_assert_wiphy(sdata->local->hw.wiphy);
+ 
+-	if (WARN_ON(ieee80211_vif_is_mld(&sdata->vif)))
+-		return;
+-
+ 	/*
+ 	 * Try sending broadcast probe requests for the last three
+ 	 * probe requests after the first ones failed since some
+@@ -3879,9 +3876,6 @@ static void ieee80211_mgd_probe_ap(struc
+ 
+ 	lockdep_assert_wiphy(sdata->local->hw.wiphy);
+ 
+-	if (WARN_ON_ONCE(ieee80211_vif_is_mld(&sdata->vif)))
+-		return;
+-
+ 	if (!ieee80211_sdata_running(sdata))
+ 		return;
+ 
+@@ -7921,36 +7915,73 @@ static void ieee80211_sta_bcn_mon_timer(
+ 			 &sdata->u.mgd.beacon_connection_loss_work);
+ }
+ 
++static unsigned long
++ieee80211_latest_active_link_conn_timeout(struct ieee80211_sub_if_data *sdata)
++{
++	unsigned long latest_timeout = 0;
++	unsigned int link_id;
++	struct sta_info *sta;
++
++	rcu_read_lock();
++
++	sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
++	if (!sta)
++		goto out;
++
++	for (link_id = 0; link_id < ARRAY_SIZE(sta->link);
++	     link_id++) {
++		struct link_sta_info *link_sta;
++		unsigned long timeout;
++
++		link_sta = rcu_dereference(sta->link[link_id]);
++		if (!link_sta)
++			continue;
++
++		timeout = link_sta->status_stats.last_ack;
++		if (time_before(timeout, link_sta->rx_stats.last_rx))
++			timeout = link_sta->rx_stats.last_rx;
++
++		timeout += IEEE80211_CONNECTION_IDLE_TIME;
++
++		/*
++		 * latest_timeout holds the timeout of the link
++		 * that will expire last among all links in an
++		 * non-AP MLD STA. This ensures that the connection
++		 * monitor timer is only reset if at least one link
++		 * is still active, and it is scheduled to fire at
++		 * the latest possible timeout.
++		 */
++		if (time_is_after_jiffies(timeout) &&
++		    time_after(timeout, latest_timeout))
++			latest_timeout = timeout;
++	}
++
++out:
++	rcu_read_unlock();
++
++	return latest_timeout;
++}
++
+ static void ieee80211_sta_conn_mon_timer(struct timer_list *t)
+ {
+ 	struct ieee80211_sub_if_data *sdata =
+ 		from_timer(sdata, t, u.mgd.conn_mon_timer);
+ 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ 	struct ieee80211_local *local = sdata->local;
+-	struct sta_info *sta;
+-	unsigned long timeout;
++	unsigned long latest_timeout;
+ 
+-	if (WARN_ON(ieee80211_vif_is_mld(&sdata->vif)))
++	if (ieee80211_is_csa_in_progress(sdata))
+ 		return;
+ 
+-	if (sdata->vif.bss_conf.csa_active &&
+-	    !sdata->deflink.u.mgd.csa.waiting_bcn)
+-		return;
+-
+-	sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
+-	if (!sta)
+-		return;
+-
+-	timeout = sta->deflink.status_stats.last_ack;
+-	if (time_before(sta->deflink.status_stats.last_ack, sta->deflink.rx_stats.last_rx))
+-		timeout = sta->deflink.rx_stats.last_rx;
+-	timeout += IEEE80211_CONNECTION_IDLE_TIME;
++	latest_timeout = ieee80211_latest_active_link_conn_timeout(sdata);
+ 
+-	/* If timeout is after now, then update timer to fire at
+-	 * the later date, but do not actually probe at this time.
+-	 */
+-	if (time_is_after_jiffies(timeout)) {
+-		mod_timer(&ifmgd->conn_mon_timer, round_jiffies_up(timeout));
++	/*
++	 * If latest timeout is after now, then update timer to fire at
++ 	 * the later date, but do not actually probe at this time.
++ 	 */
++	if (latest_timeout) {
++		mod_timer(&ifmgd->conn_mon_timer,
++			  round_jiffies_up(latest_timeout));
+ 		return;
+ 	}
+ 
diff --git a/package/kernel/mac80211/patches/subsys/353-wifi-mac80211-Make-CONNECTION_MONITOR-optional-for-M.patch b/package/kernel/mac80211/patches/subsys/353-wifi-mac80211-Make-CONNECTION_MONITOR-optional-for-M.patch
new file mode 100644
index 0000000000..bbc02cc21d
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/353-wifi-mac80211-Make-CONNECTION_MONITOR-optional-for-M.patch
@@ -0,0 +1,25 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Tue, 26 Aug 2025 13:54:31 +0200
+Subject: [PATCH] wifi: mac80211: Make CONNECTION_MONITOR optional for MLO sta
+
+Since commit '1bc892d76a6f ("wifi: mac80211: extend connection
+monitoring for MLO")' mac80211 supports connection monitor for MLO
+client interfaces. Remove the CONNECTION_MONITOR requirement in
+ieee80211_register_hw routine.
+
+Fixes: 1bc892d76a6f ("wifi: mac80211: extend connection monitoring for MLO")
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+---
+
+--- a/net/mac80211/main.c
++++ b/net/mac80211/main.c
+@@ -1174,9 +1174,6 @@ int ieee80211_register_hw(struct ieee802
+ 		if (WARN_ON(!ieee80211_hw_check(hw, MFP_CAPABLE)))
+ 			return -EINVAL;
+ 
+-		if (WARN_ON(!ieee80211_hw_check(hw, CONNECTION_MONITOR)))
+-			return -EINVAL;
+-
+ 		if (WARN_ON(ieee80211_hw_check(hw, NEED_DTIM_BEFORE_ASSOC)))
+ 			return -EINVAL;
+ 



From lede-commits at lists.infradead.org  Thu Aug 28 01:44:55 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 04:44:55 -0400
Subject: [openwrt/openwrt]  wifi-scripts: allow configuring per-radio macaddr
 in shared/mlo wifi-iface
In-Reply-To: <175637069554.2969149.11709848666572948047@git-01.infra.openwrt.org>
References: <175637069554.2969149.11709848666572948047@git-01.infra.openwrt.org>
Message-ID: <mailman.132185.1756373932.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f43bf55b412dbc89c30eea27fdf127b2ca4eb110

commit f43bf55b412dbc89c30eea27fdf127b2ca4eb110
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Aug 28 10:42:43 2025 +0200

    wifi-scripts: allow configuring per-radio macaddr in shared/mlo wifi-iface
    
    When a wifi-iface section is used either for multiple vifs or MLD links,
    make it possible to configure the per-radio/link macaddr.
    When MLO is enabled, the main macaddr is used for the MLD interface.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../network/config/wifi-scripts/files/lib/netifd/wireless.uc | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
index 2103c9c369..1180b72347 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
+++ b/package/network/config/wifi-scripts/files/lib/netifd/wireless.uc
@@ -128,6 +128,17 @@ function config_init(uci)
 					config.mode = "link";
 			config.radios = radios;
 
+			if (dev_name != dev_names[0])
+				delete config.macaddr;
+			if (dev_name != wdev.mlo_name && config.radio_macaddr) {
+				let idx = index(dev_names, dev_name);
+				if (mlo_vif)
+					idx--;
+				let macaddr = idx >= 0 ? config.radio_macaddr[idx] : null;
+				if (macaddr)
+					config.macaddr = macaddr;
+			}
+
 			let vif = {
 				name, config,
 				device: dev_name,
@@ -310,6 +321,7 @@ const default_config_attr = {
 		...network_config_attr,
 		device: TYPE_STRING,
 		mode: TYPE_STRING,
+		radio_macaddr: TYPE_ARRAY,
 	},
 	station: {
 		iface: TYPE_STRING,



From lede-commits at lists.infradead.org  Thu Aug 28 04:35:11 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 07:35:11 -0400
Subject: [openwrt/openwrt]  ath79: add calibtation variant for Xiaomi AIoT
 AC2350
In-Reply-To: <175638091091.3576019.8134335469234107235@git-01.infra.openwrt.org>
References: <175638091091.3576019.8134335469234107235@git-01.infra.openwrt.org>
Message-ID: <mailman.132379.1756387734.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/664424aaeb4a7b74123cc94c536e42fa925cf8c3

commit 664424aaeb4a7b74123cc94c536e42fa925cf8c3
Author: Igor Dyatlov <dyatlov.igor at gmail.com>
AuthorDate: Sun Aug 3 17:20:00 2025 +0300

    ath79: add calibtation variant for Xiaomi AIoT AC2350
    
    Add calibration variant and ipq-wifi package for Xiaomi AIoT AC2350
    
    Signed-off-by: Igor Dyatlov <dyatlov.igor at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19707
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts | 1 +
 target/linux/ath79/image/generic.mk                   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts b/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
index cff567e497..69d75e9b55 100644
--- a/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
+++ b/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
@@ -201,5 +201,6 @@
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&precal_art_5000>;
 		nvmem-cell-names = "pre-calibration";
+		qcom,ath10k-calibration-variant = "Xiaomi-AIoT-AC2350";
 	};
 };
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index b4000de232..aa068f5a1e 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -3298,7 +3298,7 @@ define Device/xiaomi_aiot-ac2350
   SOC := qca9563
   DEVICE_VENDOR := Xiaomi
   DEVICE_MODEL := AIoT AC2350
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9984-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9984-ct ipq-wifi-xiaomi_aiot-ac2350
   IMAGE_SIZE := 14336k
 endef
 TARGET_DEVICES += xiaomi_aiot-ac2350



From lede-commits at lists.infradead.org  Thu Aug 28 04:35:10 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 07:35:10 -0400
Subject: [openwrt/openwrt]  ipq-wifi: add entry for Xiaomi AIoT AC2350
In-Reply-To: <175638091091.3576019.8134335469234107235@git-01.infra.openwrt.org>
References: <175638091091.3576019.8134335469234107235@git-01.infra.openwrt.org>
Message-ID: <mailman.132380.1756387734.1866309.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c42f05bf36c5708696cbd5d7abe59cb1d5765c1a

commit c42f05bf36c5708696cbd5d7abe59cb1d5765c1a
Author: Igor Dyatlov <dyatlov.igor at gmail.com>
AuthorDate: Sun Aug 3 17:02:33 2025 +0300

    ipq-wifi: add entry for Xiaomi AIoT AC2350
    
    Add IPQ WiFi support for Xiaomi AIoT AC2350
    
    Add board file suffixes .QCA9988/.qca9988.
    These suffixes are mapped to QCA9984/hw1.0 path
    
    Reference:
    https://openwrt.org/toh/xiaomi/aiot_router_ac2350
    
    Signed-off-by: Igor Dyatlov <dyatlov.igor at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19707
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/firmware/ipq-wifi/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 520cf3a375..1134acb697 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -80,6 +80,7 @@ ALLWIFIBOARDS:= \
 	tplink_eap660hd-v1 \
 	tplink_archer-c6-v2 \
 	wallys_dr40x9 \
+	xiaomi_aiot-ac2350 \
 	xiaomi_ax3600 \
 	xiaomi_ax6000 \
 	xiaomi_ax9000 \
@@ -129,6 +130,8 @@ define ipq-wifi-install-one
     $(call ipq-wifi-install-one-to,$(1),$(2),QCA9887/hw1.0),\
   $(if $(filter $(suffix $(1)),.QCA9984 .qca9984),\
     $(call ipq-wifi-install-one-to,$(1),$(2),QCA9984/hw1.0),\
+  $(if $(filter $(suffix $(1)),.QCA9988 .qca9988),\
+    $(call ipq-wifi-install-one-to,$(1),$(2),QCA9984/hw1.0),\
   $(if $(filter $(suffix $(1)),.QCA99X0 .qca99x0),\
     $(call ipq-wifi-install-one-to,$(1),$(2),QCA99X0/hw2.0),\
   $(if $(filter $(suffix $(1)),.IPQ5018 .ipq5018),\
@@ -144,7 +147,7 @@ define ipq-wifi-install-one
   $(if $(filter $(suffix $(1)),.QCN9274 .qcn9274),\
     $(call ipq-wifi-install-ath12-one-to,$(1),$(2),QCN9274/hw2.0),\
     $(error Unrecognized board-file suffix '$(suffix $(1))' for '$(1)')\
-  )))))))))))
+  ))))))))))))
 
 endef
 # Blank line required at end of above define due to foreach context
@@ -247,6 +250,7 @@ $(eval $(call generate-ipq-wifi-package,tplink_eap625-outdoor-hd-v1,TP-Link EAP6
 $(eval $(call generate-ipq-wifi-package,tplink_eap660hd-v1,TP-Link EAP660 HD v1))
 $(eval $(call generate-ipq-wifi-package,tplink_archer-c6-v2,TP-Link Archer C6 V2))
 $(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9))
+$(eval $(call generate-ipq-wifi-package,xiaomi_aiot-ac2350,Xiaomi AIoT AC2350))
 $(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600))
 $(eval $(call generate-ipq-wifi-package,xiaomi_ax6000,Xiaomi AX6000))
 $(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000))



From lede-commits at lists.infradead.org  Thu Aug 28 12:09:17 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 15:09:17 -0400
Subject: [openwrt/openwrt]  realtek: rtl930x: Enable parsing of u-boot nvmem
 layouts
In-Reply-To: <175640815689.949689.5825463594968574930@git-01.infra.openwrt.org>
References: <175640815689.949689.5825463594968574930@git-01.infra.openwrt.org>
Message-ID: <mailman.133110.1756416231.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ebb342af444426aa743ba9c0c0427d8b8c1924e2

commit ebb342af444426aa743ba9c0c0427d8b8c1924e2
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Mon Apr 14 13:16:47 2025 +0000

    realtek: rtl930x: Enable parsing of u-boot nvmem layouts
    
    To be able to read out the ethaddr from the u-boot environment for MAC
    address configuration, it is required to also enable the NVMEM layout
    parsing code for the U-Boot env layout.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19362
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/rtl930x/config-6.12 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/realtek/rtl930x/config-6.12 b/target/linux/realtek/rtl930x/config-6.12
index 47779f151d..bbfd2fd7bd 100644
--- a/target/linux/realtek/rtl930x/config-6.12
+++ b/target/linux/realtek/rtl930x/config-6.12
@@ -167,6 +167,7 @@ CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NR_CPUS=2
 CONFIG_NVMEM=y
 CONFIG_NVMEM_LAYOUTS=y
+CONFIG_NVMEM_LAYOUT_U_BOOT_ENV=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y



From lede-commits at lists.infradead.org  Thu Aug 28 12:09:20 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 15:09:20 -0400
Subject: [openwrt/openwrt]  realtek: rtl930x: Add support for Plasma Cloud
 PSX10 Switch
In-Reply-To: <175640815689.949689.5825463594968574930@git-01.infra.openwrt.org>
References: <175640815689.949689.5825463594968574930@git-01.infra.openwrt.org>
Message-ID: <mailman.133111.1756416231.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cb4603688bf1eabbc78cc295117446ec0256f09d

commit cb4603688bf1eabbc78cc295117446ec0256f09d
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Fri Jul 11 15:58:32 2025 +0000

    realtek: rtl930x: Add support for Plasma Cloud PSX10 Switch
    
    The Plasma Cloud PSX10 Switch is a 8 + 2 port multi-GBit switch with
    8x 10/100/1000/2500BaseT Ethernet ports and 2x SFP+ module slot.
    
    Hardware:
    
    - RTL9302C SoC
    - Macronix MX25L25645G (32MB flash)
    - Winbond W632GU6NB-12 (256MB DDR3 SDRAM - only 128 MB configured*)
    - 2x RTL8224 4x 10m/100m/1/2.5 Gigabit PHY
    - SFP+ 2x 10GBit slot
    - IC+ IP8008 POE+ PSE controller
    
    The switch is powered by 54 Volts 2.77A barrel connector. The internal TTL
    serial connector can be used to access the terminal. Pins from 1: TX RX
    (unused) GND.  Serial connection is via 115200 baud, 8N1.
    
    A reset button is accessible through a hole in the front panel.
    
    *) Only 128 MB of RAM are currently configured because there were
    infrequent random memory corruptions detected when using memtester with a
    256 MB DT configuration. This could also be reproduced with RTLSDK.
    
    Installation
    ------------
    
    * The device can be flashed by using sysupgrade command. Either from the
      original vendor firmware or using an initramfs (see "Debug")
    * Connect serial as per the layout above. Connection parameters: 115200 8N1
    * The image must be copied using scp to /tmp of the device
    
          scp openwrt-realtek-rtl930x-plasmacloud_psx10-squashfs-sysupgrade.bin root@[IP address of the device]:/tmp/
    
    * start sysupgrade without saving the original vendor configuration
    
          sysupgrade -n /tmp/openwrt-realtek-rtl930x-plasmacloud_psx10-squashfs-sysupgrade.bin
    
    Installation via u-boot
    -----------------------
    
    If you have an TFTP server connected to the switch, it is possible to
    directly install the device using the factory image from u-boot
    
        # setup networking and IP of TFP server
        rtk network on
        setenv ipaddr 10.100.100.99
        setenv serverip 10.100.100.20
    
        # get factory image
        tftp 0x84000000 factory.bin
    
        # erase firmware partitions
        sf probe 0
        sf erase 0x100000 0x01f00000
    
        # write firmware to both partitions
        sf write ${fileaddr} 0x100000 ${filesize}
        sf write ${fileaddr} 0x1080000 ${filesize}
    
        # adjust the boot commands
        setenv bootargs "mtdparts=spi0.0:896k(u-boot),64k(u-boot-env),64k(u-boot-env2),15872k(inactive),15872k(firmware2)"
        setenv bootcmd "rtk init; bootm 0xb5080000"
    
        # restart
        reset
    
    Debug
    -----
    
    * Connect serial as per the layout above. Connection parameters: 115200 8N1.
    * A tftp server is required, tftpd-hpa works well.
    * Power the device, at U-Boot start rapidly hit Esc key to stop autoboot
    * Enable network:
    
          rtk network on
    
    * Change ip address of device:
    
          setenv ipaddr 192.168.1.6
    
    * Download initramfs from TFTP server:
    
          tftpboot 0x84000000 192.168.1.111:openwrt-realtek-rtl930x-plasmacloud_psx10-initramfs-kernel.bin
    
    * Boot loaded file:
    
          bootm 0x84000000
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Co-developed-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19362
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../realtek/base-files/etc/board.d/02_network      |  1 +
 .../realtek/base-files/lib/upgrade/platform.sh     |  3 +-
 .../lib/upgrade/upgrade_dualboot_plasmacloud.sh    |  6 +-
 .../realtek/dts/rtl9302_plasmacloud_psx10.dts      | 71 ++++++++++++++++++++++
 target/linux/realtek/image/rtl930x.mk              |  6 ++
 5 files changed, 84 insertions(+), 3 deletions(-)

diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network
index 1768d90ee0..dd2456d9dc 100644
--- a/target/linux/realtek/base-files/etc/board.d/02_network
+++ b/target/linux/realtek/base-files/etc/board.d/02_network
@@ -48,6 +48,7 @@ hpe,1920-48g-poe)
 	lan_mac_end=$(macaddr_add $lan_mac $((mac_count2-mac_count1)))
 	;;
 plasmacloud,psx8|\
+plasmacloud,psx10|\
 tplink,sg2008p-v1|\
 tplink,sg2210p-v3|\
 tplink,sg2452p-v4|\
diff --git a/target/linux/realtek/base-files/lib/upgrade/platform.sh b/target/linux/realtek/base-files/lib/upgrade/platform.sh
index 4d6da9a7b1..b4236cdf42 100644
--- a/target/linux/realtek/base-files/lib/upgrade/platform.sh
+++ b/target/linux/realtek/base-files/lib/upgrade/platform.sh
@@ -27,7 +27,8 @@ platform_do_upgrade() {
 	local board=$(board_name)
 
 	case "$board" in
-	plasmacloud,psx8)
+	plasmacloud,psx8|\
+	plasmacloud,psx10)
 		PART_NAME="inactive"
 		platform_do_upgrade_dualboot_plasmacloud "$1"
 		;;
diff --git a/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh b/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh
index 91ffaa03ab..4b390869e5 100644
--- a/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh
+++ b/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh
@@ -4,7 +4,8 @@ set_boot_part() {
 	local board=$(board_name)
 
 	case "$board" in
-	plasmacloud,psx8)
+	plasmacloud,psx8|\
+	plasmacloud,psx10)
 		if [ "$part_num" = "1" ]; then
 			echo "bootargs mtdparts=spi0.0:896k(u-boot),64k(u-boot-env),64k(u-boot-env2),15872k(firmware1),15872k(inactive)" > $setenv_script
 			echo "bootcmd rtk init; bootm 0xb4100000" >> $setenv_script
@@ -56,7 +57,8 @@ platform_do_upgrade_dualboot_plasmacloud() {
 	# identify "inactive" slot id based on the expected partition id
 	# of the primary ("firmware1") slot
 	case "$(board_name)" in
-	plasmacloud,psx8)
+	plasmacloud,psx8|\
+	plasmacloud,psx10)
 		primary_firmware_mtd=3
 		;;
 	*)
diff --git a/target/linux/realtek/dts/rtl9302_plasmacloud_psx10.dts b/target/linux/realtek/dts/rtl9302_plasmacloud_psx10.dts
new file mode 100644
index 0000000000..b451bc24e3
--- /dev/null
+++ b/target/linux/realtek/dts/rtl9302_plasmacloud_psx10.dts
@@ -0,0 +1,71 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/dts-v1/;
+
+#include "rtl9302_plasmacloud_common.dtsi"
+
+/ {
+	compatible = "plasmacloud,psx10", "realtek,rtl838x-soc";
+	model = "Plasma Cloud PSX10";
+
+	i2c1: i2c-gpio1 {
+		compatible = "i2c-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		sda-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
+		scl-gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>;
+
+		i2c-gpio,delay-us = <5>;	/* ~100 kHz */
+	};
+
+	sfp0: sfp-lan9 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c0>;
+		los-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio0 12 GPIO_ACTIVE_LOW>;
+		tx-disable-gpio = <&gpio0 22 GPIO_ACTIVE_HIGH>;
+	};
+
+	sfp1: sfp-lan10 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c1>;
+		los-gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio0 20 GPIO_ACTIVE_LOW>;
+		tx-disable-gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
+	};
+};
+
+&mdio {
+	INTERNAL_PHY_SDS(26, 8)
+	INTERNAL_PHY_SDS(27, 9)
+};
+
+&switch0 {
+	ports {
+		port at 26 {
+			reg = <26>;
+			label = "lan9";
+			phy-mode = "1000base-x";
+			phy-handle = <&phy26>;
+			sfp = <&sfp0>;
+			led-set = <0>;
+			managed = "in-band-status";
+
+			nvmem-cells = <&macaddr_ubootenv_ethaddr 9>;
+			nvmem-cell-names = "mac-address";
+		};
+
+		port at 27 {
+			reg = <27>;
+			label = "lan10";
+			phy-mode = "1000base-x";
+			phy-handle = <&phy27>;
+			sfp = <&sfp1>;
+			led-set = <0>;
+			managed = "in-band-status";
+
+			nvmem-cells = <&macaddr_ubootenv_ethaddr 10>;
+			nvmem-cell-names = "mac-address";
+		};
+	};
+};
diff --git a/target/linux/realtek/image/rtl930x.mk b/target/linux/realtek/image/rtl930x.mk
index eb90b4678f..8f53855b5b 100644
--- a/target/linux/realtek/image/rtl930x.mk
+++ b/target/linux/realtek/image/rtl930x.mk
@@ -34,6 +34,12 @@ define Device/plasmacloud_psx8
 endef
 TARGET_DEVICES += plasmacloud_psx8
 
+define Device/plasmacloud_psx10
+  $(Device/plasmacloud-common)
+  DEVICE_MODEL := PSX10
+endef
+TARGET_DEVICES += plasmacloud_psx10
+
 define Device/tplink_tl-st1008f_v2
   SOC := rtl9303
   UIMAGE_MAGIC := 0x93030000



From lede-commits at lists.infradead.org  Thu Aug 28 12:09:18 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 15:09:18 -0400
Subject: [openwrt/openwrt]  realtek: Introduce Plasma Cloud sysupgrade helper
In-Reply-To: <175640815689.949689.5825463594968574930@git-01.infra.openwrt.org>
References: <175640815689.949689.5825463594968574930@git-01.infra.openwrt.org>
Message-ID: <mailman.133112.1756416231.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7812d867b467735e2d938e4e51214829fd8882cc

commit 7812d867b467735e2d938e4e51214829fd8882cc
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Fri Jul 11 15:58:32 2025 +0000

    realtek: Introduce Plasma Cloud sysupgrade helper
    
    Plasma Cloud devices use a dual-firmware regions/slots boot mechanism. On
    APs, the u-boot is "intelligent" and checks the NOR/NAND partitions (kernel
    + rootfs) for corruption via "datachk". If validation fails, the bootloader
    automatically switches to the fallback partition.
    
    On Realtek-based switches, this "datachk" helper is not available.
    However, the bootloader still supports two firmware regions/slots.
    
    When flashing a new image, the "inactive" partition is written instead of
    overwriting the active one. If no "inactive" partition exists but
    "firmware1" is present, the bootloader always treats "firmware1" as
    fallback. Only after a successful flash is the `u-boot-env` updated to
    select the newly written partition.
    
    On reboot, the bootloader loads the kernel from the new partition and
    passes `mtdparts` information as the kernel cmdline. The Plasma Cloud
    switch device tree does not override this with a `bootargs` property, so
    the active partition layout is honored from cmdline.
    
    Since offsets, sizes, and names of partitions match between the device tree
    and cmdline (except the inactive slot), properties and nodes such as
    `nvmem-cells` or `compatible` remain fully usable.
    
    This mechanism also allows switching back to the old firmware slot.  For
    example, if `firmware1` is currently active (`/proc/mtd` shows it), it can
    be switched to slot 2 using:
    
        . /lib/upgrade/upgrade_dualboot.sh
        set_boot_part 2
        reboot
    
    Firmware upgrades use standard `sysupgrade` tarballs, chosen for
    compatibility with vendor images. In theory, one can switch between vendor
    and OpenWrt with:
    
        sysupgrade -n /tmp/*-squashfs-sysupgrade.bin
    
    Note: configuration files must not be preserved, as they are not compatible
    with vanilla OpenWrt.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19362
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../lib/upgrade/upgrade_dualboot_plasmacloud.sh    | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh b/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh
new file mode 100644
index 0000000000..0f379952b3
--- /dev/null
+++ b/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh
@@ -0,0 +1,68 @@
+set_boot_part() {
+	local part_num="$1"
+	local setenv_script="/tmp/fw_env_upgrade"
+	local board=$(board_name)
+
+	case "$board" in
+	*)
+		echo "${board} is not supported for dual boot" 1>&2
+		return 1
+		;;
+	esac
+
+	# store u-boot env changes
+	mkdir -p /var/lock
+	cat $setenv_script
+	fw_setenv -s $setenv_script || {
+		echo "failed to update U-Boot environment"
+		return 1
+	}
+}
+
+platform_do_upgrade_dualboot_plasmacloud() {
+	local primary_firmware_mtd
+	local restore_backup
+	local next_boot_part
+	local tar_file="$1"
+	local inactive_mtd
+	local board_dir
+
+	inactive_mtd="$(find_mtd_index $PART_NAME)"
+	if [ -z "$inactive_mtd" ]; then
+		# Handle case when u-boot-env is not correctly written and we
+		# are running from initramfs. Only install it in the "firmware1"
+		# partition
+		PART_NAME=firmware1
+		inactive_mtd="$(find_mtd_index $PART_NAME)"
+	fi
+
+	if [ -z "$inactive_mtd" ]; then
+		echo "Cannot find \"firmware1\" nor \"${$PART_NAME}\" partition to work with. Abort!" 2>&1
+		return 1
+	fi
+
+	# identify "inactive" slot id based on the expected partition id
+	# of the primary ("firmware1") slot
+	case "$(board_name)" in
+	*)
+		echo "failed to detect primary firmware mtd partition for board" 2>&1
+		return 1
+		;;
+	esac
+
+	if [ "$inactive_mtd" = "$primary_firmware_mtd" ]; then
+		next_boot_part="1"
+	else
+		next_boot_part="2"
+	fi
+
+	[ -n "$UPGRADE_BACKUP" ] && restore_backup="${MTD_CONFIG_ARGS} -j ${UPGRADE_BACKUP}"
+
+	# write selected firmware slot
+	board_dir=$(tar tf $tar_file | grep -m 1 '^sysupgrade-.*/$')
+	board_dir=${board_dir%/}
+	tar -xf $tar_file ${board_dir}/kernel ${board_dir}/root -O | mtd $restore_backup write - $PART_NAME
+
+	# update u-boot-env to select new firmware slot
+	set_boot_part "$next_boot_part"
+}



From lede-commits at lists.infradead.org  Thu Aug 28 12:09:16 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 15:09:16 -0400
Subject: [openwrt/openwrt]  realtek: Fix nvmem support for ethernet device
In-Reply-To: <175640815689.949689.5825463594968574930@git-01.infra.openwrt.org>
References: <175640815689.949689.5825463594968574930@git-01.infra.openwrt.org>
Message-ID: <mailman.133113.1756416231.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5880f345ba6bf8387a0219aafbce661c1dbca357

commit 5880f345ba6bf8387a0219aafbce661c1dbca357
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Mon Apr 14 13:16:47 2025 +0000

    realtek: Fix nvmem support for ethernet device
    
    The function of_get_mac_address is not taking care of evaluation the nvmem
    address before trying to read out the mac-address properties. The driver
    must check whether the return code is -EPROBE_DEFER and stop the probing
    process in that case. If the nvmem-cell related driver code finished, the
    probe can be redone ad the correct mac-address will appear for the device.
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19362
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
index 6b856a1b1e..6f90833749 100644
--- a/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-6.12/drivers/net/ethernet/rtl838x_eth.c
@@ -3500,7 +3500,10 @@ static int __init rtl838x_eth_probe(struct platform_device *pdev)
 	 * 1) from device tree data
 	 * 2) from internal registers set by bootloader
 	 */
-	of_get_mac_address(pdev->dev.of_node, mac_addr);
+	err = of_get_mac_address(pdev->dev.of_node, mac_addr);
+	if (err == -EPROBE_DEFER)
+		return err;
+
 	if (is_valid_ether_addr(mac_addr)) {
 		rtl838x_set_mac_hw(dev, mac_addr);
 	} else {



From lede-commits at lists.infradead.org  Thu Aug 28 12:09:19 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 15:09:19 -0400
Subject: [openwrt/openwrt]  realtek: rtl930x: Add support for Plasma Cloud
 PSX8 Switch
In-Reply-To: <175640815689.949689.5825463594968574930@git-01.infra.openwrt.org>
References: <175640815689.949689.5825463594968574930@git-01.infra.openwrt.org>
Message-ID: <mailman.133116.1756416231.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e677da90d1c81bc61338896c27bce3477413ad37

commit e677da90d1c81bc61338896c27bce3477413ad37
Author: Harshal Gohel <hg at simonwunderlich.de>
AuthorDate: Fri Jul 11 15:58:32 2025 +0000

    realtek: rtl930x: Add support for Plasma Cloud PSX8 Switch
    
    The Plasma Cloud PSX8 Switch is a 8 port multi-GBit switch with
    8x 10/100/1000/2500BaseT Ethernet ports.
    
    Hardware:
    
    - RTL9302C SoC
    - Macronix MX25L25645G (32MB flash)
    - Winbond W632GU6NB-12 (256MB DDR3 SDRAM - only 128 MB configured*)
    - 2x RTL8224 4x 10m/100m/1/2.5 Gigabit PHY
    - IC+ IP8008 POE+ PSE controller
    
    The switch is powered by 54 Volts 2.77A barrel connector. The internal TTL
    serial connector can be used to access the terminal. Pins from 1: TX RX
    (unused) GND.  Serial connection is via 115200 baud, 8N1.
    
    A reset button is accessible through a hole in the front panel.
    
    *) Only 128 MB of RAM are currently configured because there were
    infrequent random memory corruptions detected when using memtester with a
    256 MB DT configuration. This could also be reproduced with RTLSDK.
    
    Installation
    ------------
    
    * The device can be flashed by using sysupgrade command. Either from the
      original vendor firmware or using an initramfs (see "Debug")
    * Connect serial as per the layout above. Connection parameters: 115200 8N1
    * The image must be copied using scp to /tmp of the device
    
          scp openwrt-realtek-rtl930x-plasmacloud_psx8-squashfs-sysupgrade.bin root@[IP address of the device]:/tmp/
    
    * start sysupgrade without saving the original vendor configuration
    
          sysupgrade -n /tmp/openwrt-realtek-rtl930x-plasmacloud_psx8-squashfs-sysupgrade.bin
    
    Installation via u-boot
    -----------------------
    
    If you have an TFTP server connected to the switch, it is possible to
    directly install the device using the factory image from u-boot
    
        # setup networking and IP of TFP server
        rtk network on
        setenv ipaddr 10.100.100.99
        setenv serverip 10.100.100.20
    
        # get factory image
        tftp 0x84000000 factory.bin
    
        # erase firmware partitions
        sf probe 0
        sf erase 0x100000 0x01f00000
    
        # write firmware to both partitions
        sf write ${fileaddr} 0x100000 ${filesize}
        sf write ${fileaddr} 0x1080000 ${filesize}
    
        # adjust the boot commands
        setenv bootargs "mtdparts=spi0.0:896k(u-boot),64k(u-boot-env),64k(u-boot-env2),15872k(inactive),15872k(firmware2)"
        setenv bootcmd "rtk init; bootm 0xb5080000"
    
        # restart
        reset
    
    Debug
    -----
    
    * Connect serial as per the layout above. Connection parameters: 115200 8N1.
    * A tftp server is required, tftpd-hpa works well.
    * Power the device, at U-Boot start rapidly hit Esc key to stop autoboot
    * Enable network:
    
          rtk network on
    
    * Change ip address of device:
    
          setenv ipaddr 192.168.1.6
    
    * Download initramfs from TFTP server:
    
          tftpboot 0x84000000 192.168.1.111:openwrt-realtek-rtl930x-plasmacloud_psx8-initramfs-kernel.bin
    
    * Boot loaded file:
    
          bootm 0x84000000
    
    Signed-off-by: Harshal Gohel <hg at simonwunderlich.de>
    Co-developed-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Signed-off-by: Sharadanand Karanjkar <sk at simonwunderlich.de>
    Link: https://github.com/openwrt/openwrt/pull/19362
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../realtek/base-files/etc/board.d/02_network      |   1 +
 .../realtek/base-files/lib/upgrade/platform.sh     |   4 +
 .../lib/upgrade/upgrade_dualboot_plasmacloud.sh    |  15 ++
 .../realtek/dts/rtl9302_plasmacloud_common.dtsi    | 265 +++++++++++++++++++++
 .../linux/realtek/dts/rtl9302_plasmacloud_psx8.dts |  13 +
 target/linux/realtek/image/rtl930x.mk              |  20 ++
 6 files changed, 318 insertions(+)

diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network
index fcca2ce6ea..1768d90ee0 100644
--- a/target/linux/realtek/base-files/etc/board.d/02_network
+++ b/target/linux/realtek/base-files/etc/board.d/02_network
@@ -47,6 +47,7 @@ hpe,1920-48g-poe)
 	lan_mac_start=$(macaddr_add $lan_mac 2)
 	lan_mac_end=$(macaddr_add $lan_mac $((mac_count2-mac_count1)))
 	;;
+plasmacloud,psx8|\
 tplink,sg2008p-v1|\
 tplink,sg2210p-v3|\
 tplink,sg2452p-v4|\
diff --git a/target/linux/realtek/base-files/lib/upgrade/platform.sh b/target/linux/realtek/base-files/lib/upgrade/platform.sh
index 6faded74b5..4d6da9a7b1 100644
--- a/target/linux/realtek/base-files/lib/upgrade/platform.sh
+++ b/target/linux/realtek/base-files/lib/upgrade/platform.sh
@@ -27,6 +27,10 @@ platform_do_upgrade() {
 	local board=$(board_name)
 
 	case "$board" in
+	plasmacloud,psx8)
+		PART_NAME="inactive"
+		platform_do_upgrade_dualboot_plasmacloud "$1"
+		;;
 	tplink,sg2008p-v1|\
 	tplink,sg2210p-v3)
 		tplink_sg2xxx_fix_mtdparts
diff --git a/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh b/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh
index 0f379952b3..91ffaa03ab 100644
--- a/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh
+++ b/target/linux/realtek/base-files/lib/upgrade/upgrade_dualboot_plasmacloud.sh
@@ -4,6 +4,18 @@ set_boot_part() {
 	local board=$(board_name)
 
 	case "$board" in
+	plasmacloud,psx8)
+		if [ "$part_num" = "1" ]; then
+			echo "bootargs mtdparts=spi0.0:896k(u-boot),64k(u-boot-env),64k(u-boot-env2),15872k(firmware1),15872k(inactive)" > $setenv_script
+			echo "bootcmd rtk init; bootm 0xb4100000" >> $setenv_script
+		elif [ "$part_num" = "2" ]; then
+			echo "bootargs mtdparts=spi0.0:896k(u-boot),64k(u-boot-env),64k(u-boot-env2),15872k(inactive),15872k(firmware2)" > $setenv_script
+			echo "bootcmd rtk init; bootm 0xb5080000" >> $setenv_script
+		else
+			echo "Partition number $part_num is not supported for ${board}" 2>&1
+			return 1
+		fi
+		;;
 	*)
 		echo "${board} is not supported for dual boot" 1>&2
 		return 1
@@ -44,6 +56,9 @@ platform_do_upgrade_dualboot_plasmacloud() {
 	# identify "inactive" slot id based on the expected partition id
 	# of the primary ("firmware1") slot
 	case "$(board_name)" in
+	plasmacloud,psx8)
+		primary_firmware_mtd=3
+		;;
 	*)
 		echo "failed to detect primary firmware mtd partition for board" 2>&1
 		return 1
diff --git a/target/linux/realtek/dts/rtl9302_plasmacloud_common.dtsi b/target/linux/realtek/dts/rtl9302_plasmacloud_common.dtsi
new file mode 100644
index 0000000000..b20823f842
--- /dev/null
+++ b/target/linux/realtek/dts/rtl9302_plasmacloud_common.dtsi
@@ -0,0 +1,265 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "rtl930x.dtsi"
+
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	chosen {
+		/* get active mtdparts from u-boot */
+		/delete-property/ bootargs;
+	};
+
+	aliases {
+		led-boot = &led_power;
+		led-running = &led_power;
+		led-failsafe = &led_power;
+		led-upgrade = &led_power;
+		label-mac-device = &ethernet0;
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		mode {
+			label = "reset";
+			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	i2c0: i2c-gpio0 {
+		compatible = "i2c-gpio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		sda-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
+		scl-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
+
+		i2c-gpio,delay-us = <5>;	/* ~100 kHz */
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinmux_disable_sys_led>;
+
+		led_power: led-0 {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_POWER;
+			gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+		};
+
+		led-1 {
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+			default-state = "on";
+			linux,default-trigger = "heartbeat";
+		};
+	};
+
+	led_set: led_set at 0 {
+		compatible = "realtek,rtl9300-leds";
+		active-low;
+
+		led_set0 = <(RTL93XX_LED_SET_10G | RTL93XX_LED_SET_5G |
+			     RTL93XX_LED_SET_2P5G | RTL93XX_LED_SET_1G |
+			     RTL93XX_LED_SET_100M | RTL93XX_LED_SET_10M |
+			     RTL93XX_LED_SET_LINK | RTL93XX_LED_SET_ACT)>;
+	};
+};
+
+&spi0 {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <10000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x0 0xe0000>;
+				read-only;
+			};
+
+			partition at e0000 {
+				label = "u-boot-env";
+				reg = <0xe0000 0x10000>;
+
+				nvmem-layout {
+					compatible = "u-boot,env";
+
+					macaddr_ubootenv_ethaddr: ethaddr {
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+
+			partition at f0000 {
+				label = "u-boot-env2";
+				reg = <0xf0000 0x10000>;
+			};
+
+			partition at 100000 {
+				label = "firmware1";
+				reg = <0x100000 0xf80000>;
+				compatible = "openwrt,uimage", "denx,uimage";
+				openwrt,ih-magic = <0x93000000>;
+			};
+
+			partition at 1080000 {
+				label = "firmware2";
+				reg = <0x1080000 0xf80000>;
+				compatible = "openwrt,uimage", "denx,uimage";
+				openwrt,ih-magic = <0x93000000>;
+			};
+		};
+	};
+};
+
+&ethernet0 {
+	nvmem-cells = <&macaddr_ubootenv_ethaddr 0>;
+	nvmem-cell-names = "mac-address";
+
+	mdio: mdio-bus {
+		compatible = "realtek,rtl838x-mdio";
+		regmap = <&ethernet0>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		/* External RTL8224 PHY */
+		phy0: ethernet-phy at 0 {
+			reg = <0>;
+			compatible = "ethernet-phy-ieee802.3-c45";
+			rtl9300,smi-address = <0 0>;
+			sds = < 2 >;
+		};
+
+		phy1: ethernet-phy at 1 {
+			reg = <1>;
+			compatible = "ethernet-phy-ieee802.3-c45";
+			rtl9300,smi-address = <0 1>;
+			sds = < 2 >;
+		};
+
+		phy2: ethernet-phy at 2 {
+			reg = <2>;
+			compatible = "ethernet-phy-ieee802.3-c45";
+			rtl9300,smi-address = <0 2>;
+			sds = < 2 >;
+		};
+
+		phy3: ethernet-phy at 3 {
+			reg = <3>;
+			compatible = "ethernet-phy-ieee802.3-c45";
+			rtl9300,smi-address = <0 3>;
+			sds = < 2 >;
+		};
+
+		phy8: ethernet-phy at 8 {
+			reg = <8>;
+			compatible = "ethernet-phy-ieee802.3-c45";
+			rtl9300,smi-address = <0 4>;
+			sds = < 3 >;
+		};
+
+		phy9: ethernet-phy at 9 {
+			reg = <9>;
+			compatible = "ethernet-phy-ieee802.3-c45";
+			rtl9300,smi-address = <0 5>;
+			sds = < 3 >;
+		};
+
+		phy10: ethernet-phy at 10 {
+			reg = <10>;
+			compatible = "ethernet-phy-ieee802.3-c45";
+			rtl9300,smi-address = <0 6>;
+			sds = < 3 >;
+		};
+
+		phy11: ethernet-phy at 11 {
+			reg = <11>;
+			compatible = "ethernet-phy-ieee802.3-c45";
+			rtl9300,smi-address = <0 7>;
+			sds = < 3 >;
+		};
+	};
+};
+
+&switch0 {
+	ports {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		SWITCH_PORT(0, 1, usxgmii)
+		SWITCH_PORT(1, 2, usxgmii)
+		SWITCH_PORT(2, 3, usxgmii)
+		SWITCH_PORT(3, 4, usxgmii)
+		SWITCH_PORT(8, 5, usxgmii)
+		SWITCH_PORT(9, 6, usxgmii)
+		SWITCH_PORT(10, 7, usxgmii)
+		SWITCH_PORT(11, 8, usxgmii)
+
+		/* CPU-port */
+		port at 28 {
+			ethernet = <&ethernet0>;
+			reg = <28>;
+			phy-mode = "internal";
+			fixed-link {
+				speed = <1000>;
+				full-duplex;
+			};
+		};
+	};
+};
+
+&port0 {
+	nvmem-cells = <&macaddr_ubootenv_ethaddr 1>;
+	nvmem-cell-names = "mac-address";
+};
+
+&port1 {
+	nvmem-cells = <&macaddr_ubootenv_ethaddr 2>;
+	nvmem-cell-names = "mac-address";
+};
+
+&port2 {
+	nvmem-cells = <&macaddr_ubootenv_ethaddr 3>;
+	nvmem-cell-names = "mac-address";
+};
+
+&port3 {
+	nvmem-cells = <&macaddr_ubootenv_ethaddr 4>;
+	nvmem-cell-names = "mac-address";
+};
+
+&port8 {
+	nvmem-cells = <&macaddr_ubootenv_ethaddr 5>;
+	nvmem-cell-names = "mac-address";
+};
+
+&port9 {
+	nvmem-cells = <&macaddr_ubootenv_ethaddr 6>;
+	nvmem-cell-names = "mac-address";
+};
+
+&port10 {
+	nvmem-cells = <&macaddr_ubootenv_ethaddr 7>;
+	nvmem-cell-names = "mac-address";
+};
+
+&port11 {
+	nvmem-cells = <&macaddr_ubootenv_ethaddr 8>;
+	nvmem-cell-names = "mac-address";
+};
diff --git a/target/linux/realtek/dts/rtl9302_plasmacloud_psx8.dts b/target/linux/realtek/dts/rtl9302_plasmacloud_psx8.dts
new file mode 100644
index 0000000000..227a5dc816
--- /dev/null
+++ b/target/linux/realtek/dts/rtl9302_plasmacloud_psx8.dts
@@ -0,0 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/dts-v1/;
+
+#include "rtl9302_plasmacloud_common.dtsi"
+
+/ {
+	compatible = "plasmacloud,psx8", "realtek,rtl838x-soc";
+	model = "Plasma Cloud PSX8";
+};
+
+&led_set {
+	realtek,led-set0-force-port-mask = <0x0c000000>;
+};
diff --git a/target/linux/realtek/image/rtl930x.mk b/target/linux/realtek/image/rtl930x.mk
index 27ad175b6e..eb90b4678f 100644
--- a/target/linux/realtek/image/rtl930x.mk
+++ b/target/linux/realtek/image/rtl930x.mk
@@ -14,6 +14,26 @@ define Device/hasivo_s1100w-8xgt-se
 endef
 TARGET_DEVICES += hasivo_s1100w-8xgt-se
 
+define Device/plasmacloud-common
+  SOC := rtl9302
+  UIMAGE_MAGIC := 0x93000000
+  DEVICE_VENDOR := Plasma Cloud
+  DEVICE_PACKAGES := poemgr
+  IMAGE_SIZE := 15872k
+  BLOCKSIZE := 64k
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma
+  KERNEL := kernel-bin | append-dtb | lzma | uImage lzma | pad-to $$(BLOCKSIZE)
+  IMAGES += factory.bin
+  IMAGE/factory.bin := append-kernel | append-rootfs | pad-rootfs | check-size
+  IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | sysupgrade-tar rootfs=$$$$@ | append-metadata
+endef
+
+define Device/plasmacloud_psx8
+  $(Device/plasmacloud-common)
+  DEVICE_MODEL := PSX8
+endef
+TARGET_DEVICES += plasmacloud_psx8
+
 define Device/tplink_tl-st1008f_v2
   SOC := rtl9303
   UIMAGE_MAGIC := 0x93030000



From lede-commits at lists.infradead.org  Thu Aug 28 12:15:02 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 15:15:02 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.101
In-Reply-To: <175640850204.962771.14764916236328801085@git-01.infra.openwrt.org>
References: <175640850204.962771.14764916236328801085@git-01.infra.openwrt.org>
Message-ID: <mailman.133120.1756416252.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9fbbcd16f7bd3d6f6ec8a5be23f1cb12f49113a1

commit 9fbbcd16f7bd3d6f6ec8a5be23f1cb12f49113a1
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Aug 24 13:35:19 2025 +0000

    kernel: bump 6.6 to 6.6.101
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.101
    All patches auto-refreshed.
    
    Manually modified:
       backport-6.6/413-01-v6.14-mtd-rawnand-qcom-cleanup-qcom_nandc-driver.patch
    
    Link: https://github.com/openwrt/openwrt/pull/19876
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...td-rawnand-qcom-cleanup-qcom_nandc-driver.patch | 35 +++++++++++++++-------
 ...awnand-qcom-Add-qcom-prefix-to-common-api.patch | 10 +++----
 ...3-v6.14-mtd-nand-Add-qpic_common-API-file.patch |  6 ++--
 ...d-rawnand-qcom-use-FIELD_PREP-and-GENMASK.patch |  2 +-
 ...-qcom-fix-broken-config-in-qcom_param_pag.patch |  2 +-
 .../generic/hack-6.6/259-regmap_dynamic.patch      |  2 +-
 target/linux/generic/kernel-6.6                    |  4 +--
 7 files changed, 37 insertions(+), 24 deletions(-)

diff --git a/target/linux/generic/backport-6.6/413-01-v6.14-mtd-rawnand-qcom-cleanup-qcom_nandc-driver.patch b/target/linux/generic/backport-6.6/413-01-v6.14-mtd-rawnand-qcom-cleanup-qcom_nandc-driver.patch
index 95b66071ad..1d1288e832 100644
--- a/target/linux/generic/backport-6.6/413-01-v6.14-mtd-rawnand-qcom-cleanup-qcom_nandc-driver.patch
+++ b/target/linux/generic/backport-6.6/413-01-v6.14-mtd-rawnand-qcom-cleanup-qcom_nandc-driver.patch
@@ -815,7 +815,15 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	read_reg_dma(nandc, NAND_FLASH_STATUS, 1, NAND_BAM_NEXT_SGL);
  
  	ret = submit_descs(nandc);
-@@ -2864,7 +2815,7 @@ static int qcom_param_page_type_exec(str
+@@ -2862,14 +2813,14 @@ static int qcom_param_page_type_exec(str
+ 
+ 	reg_base = NAND_READ_LOCATION_0;
+ 
+-	if (nandc->props->qpic_v2)
++	if (nandc->props->qpic_version2)
+ 		reg_base = NAND_READ_LOCATION_LAST_CW_0;
+ 
+ 	ret = qcom_parse_instructions(chip, subop, &q_op);
  	if (ret)
  		return ret;
  
@@ -824,7 +832,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  
  	nandc->buf_count = 0;
  	nandc->buf_start = 0;
-@@ -2872,38 +2823,38 @@ static int qcom_param_page_type_exec(str
+@@ -2877,52 +2828,52 @@ static int qcom_param_page_type_exec(str
  	clear_read_regs(nandc);
  	clear_bam_transaction(nandc);
  
@@ -890,9 +898,14 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	}
  
  	instr = q_op.data_instr;
-@@ -2912,9 +2863,9 @@ static int qcom_param_page_type_exec(str
+ 	op_id = q_op.data_instr_idx;
+ 	len = nand_subop_get_data_len(subop, op_id);
  
- 	nandc_set_read_loc(chip, 0, 0, 0, len, 1);
+-	if (nandc->props->qpic_v2)
++	if (nandc->props->qpic_version2)
+ 		nandc_set_read_loc_last(chip, reg_base, 0, len, 1);
+ 	else
+ 		nandc_set_read_loc_first(chip, reg_base, 0, len, 1);
  
 -	if (!nandc->props->qpic_v2) {
 -		write_reg_dma(nandc, NAND_DEV_CMD_VLD, 1, 0);
@@ -903,7 +916,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	}
  
  	nandc->buf_count = 512;
-@@ -2926,9 +2877,10 @@ static int qcom_param_page_type_exec(str
+@@ -2934,9 +2885,10 @@ static int qcom_param_page_type_exec(str
  		      nandc->buf_count, 0);
  
  	/* restore CMD1 and VLD regs */
@@ -917,7 +930,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	}
  
  	ret = submit_descs(nandc);
-@@ -3017,7 +2969,7 @@ static const struct nand_controller_ops
+@@ -3025,7 +2977,7 @@ static const struct nand_controller_ops
  
  static void qcom_nandc_unalloc(struct qcom_nand_controller *nandc)
  {
@@ -926,7 +939,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  		if (!dma_mapping_error(nandc->dev, nandc->reg_read_dma))
  			dma_unmap_single(nandc->dev, nandc->reg_read_dma,
  					 MAX_REG_RD *
-@@ -3070,7 +3022,7 @@ static int qcom_nandc_alloc(struct qcom_
+@@ -3078,7 +3030,7 @@ static int qcom_nandc_alloc(struct qcom_
  	if (!nandc->reg_read_buf)
  		return -ENOMEM;
  
@@ -935,7 +948,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  		nandc->reg_read_dma =
  			dma_map_single(nandc->dev, nandc->reg_read_buf,
  				       MAX_REG_RD *
-@@ -3151,15 +3103,15 @@ static int qcom_nandc_setup(struct qcom_
+@@ -3159,15 +3111,15 @@ static int qcom_nandc_setup(struct qcom_
  	u32 nand_ctrl;
  
  	/* kill onenand */
@@ -954,7 +967,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  		nand_ctrl = nandc_read(nandc, NAND_CTRL);
  
  		/*
-@@ -3176,7 +3128,7 @@ static int qcom_nandc_setup(struct qcom_
+@@ -3184,7 +3136,7 @@ static int qcom_nandc_setup(struct qcom_
  	}
  
  	/* save the original values of these registers */
@@ -963,7 +976,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  		nandc->cmd1 = nandc_read(nandc, dev_cmd_reg_addr(nandc, NAND_DEV_CMD1));
  		nandc->vld = NAND_DEV_CMD_VLD_VAL;
  	}
-@@ -3349,7 +3301,7 @@ static int qcom_nandc_parse_dt(struct pl
+@@ -3357,7 +3309,7 @@ static int qcom_nandc_parse_dt(struct pl
  	struct device_node *np = nandc->dev->of_node;
  	int ret;
  
@@ -972,7 +985,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  		ret = of_property_read_u32(np, "qcom,cmd-crci",
  					   &nandc->cmd_crci);
  		if (ret) {
-@@ -3474,30 +3426,30 @@ static void qcom_nandc_remove(struct pla
+@@ -3482,30 +3434,30 @@ static void qcom_nandc_remove(struct pla
  
  static const struct qcom_nandc_props ipq806x_nandc_props = {
  	.ecc_modes = (ECC_RS_4BIT | ECC_BCH_8BIT),
diff --git a/target/linux/generic/backport-6.6/413-02-v6.14-mtd-rawnand-qcom-Add-qcom-prefix-to-common-api.patch b/target/linux/generic/backport-6.6/413-02-v6.14-mtd-rawnand-qcom-Add-qcom-prefix-to-common-api.patch
index f634e0442a..23ef86f807 100644
--- a/target/linux/generic/backport-6.6/413-02-v6.14-mtd-rawnand-qcom-Add-qcom-prefix-to-common-api.patch
+++ b/target/linux/generic/backport-6.6/413-02-v6.14-mtd-rawnand-qcom-Add-qcom-prefix-to-common-api.patch
@@ -823,7 +823,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	if (ret) {
  		dev_err(nandc->dev, "failure in submitting misc descriptor\n");
  		goto err_out;
-@@ -2820,8 +2820,8 @@ static int qcom_param_page_type_exec(str
+@@ -2825,8 +2825,8 @@ static int qcom_param_page_type_exec(str
  	nandc->buf_count = 0;
  	nandc->buf_start = 0;
  	host->use_ecc = false;
@@ -834,8 +834,8 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  
  	nandc->regs->cmd = q_op.cmd_reg;
  	nandc->regs->addr0 = 0;
-@@ -2864,8 +2864,8 @@ static int qcom_param_page_type_exec(str
- 	nandc_set_read_loc(chip, 0, 0, 0, len, 1);
+@@ -2872,8 +2872,8 @@ static int qcom_param_page_type_exec(str
+ 		nandc_set_read_loc_first(chip, reg_base, 0, len, 1);
  
  	if (!nandc->props->qpic_version2) {
 -		write_reg_dma(nandc, &nandc->regs->vld, NAND_DEV_CMD_VLD, 1, 0);
@@ -845,7 +845,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	}
  
  	nandc->buf_count = 512;
-@@ -2873,17 +2873,17 @@ static int qcom_param_page_type_exec(str
+@@ -2881,17 +2881,17 @@ static int qcom_param_page_type_exec(str
  
  	config_nand_single_cw_page_read(chip, false, 0);
  
@@ -869,7 +869,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	if (ret) {
  		dev_err(nandc->dev, "failure in submitting param page descriptor\n");
  		goto err_out;
-@@ -3067,7 +3067,7 @@ static int qcom_nandc_alloc(struct qcom_
+@@ -3075,7 +3075,7 @@ static int qcom_nandc_alloc(struct qcom_
  		 * maximum codeword size
  		 */
  		nandc->max_cwperpage = 1;
diff --git a/target/linux/generic/backport-6.6/413-03-v6.14-mtd-nand-Add-qpic_common-API-file.patch b/target/linux/generic/backport-6.6/413-03-v6.14-mtd-nand-Add-qpic_common-API-file.patch
index 26211461c1..9272f98862 100644
--- a/target/linux/generic/backport-6.6/413-03-v6.14-mtd-nand-Add-qpic_common-API-file.patch
+++ b/target/linux/generic/backport-6.6/413-03-v6.14-mtd-nand-Add-qpic_common-API-file.patch
@@ -1786,7 +1786,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  /*
   * when using BCH ECC, the HW flags an error in NAND_FLASH_STATUS if it read
   * an erased CW, and reports an erased CW in NAND_ERASED_CW_DETECT_STATUS.
-@@ -2967,141 +2022,14 @@ static const struct nand_controller_ops
+@@ -2975,141 +2030,14 @@ static const struct nand_controller_ops
  	.exec_op = qcom_nand_exec_op,
  };
  
@@ -1931,7 +1931,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	/* kill onenand */
  	if (!nandc->props->nandc_part_of_qpic)
  		nandc_write(nandc, SFLASHC_BURST_CFG, 0);
-@@ -3240,7 +2168,7 @@ static int qcom_nand_host_init_and_regis
+@@ -3248,7 +2176,7 @@ static int qcom_nand_host_init_and_regis
  	chip->legacy.block_bad		= qcom_nandc_block_bad;
  	chip->legacy.block_markbad	= qcom_nandc_block_markbad;
  
@@ -1940,7 +1940,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  	chip->options |= NAND_NO_SUBPAGE_WRITE | NAND_USES_DMA |
  			 NAND_SKIP_BBTSCAN;
  
-@@ -3323,17 +2251,21 @@ static int qcom_nandc_parse_dt(struct pl
+@@ -3331,17 +2259,21 @@ static int qcom_nandc_parse_dt(struct pl
  static int qcom_nandc_probe(struct platform_device *pdev)
  {
  	struct qcom_nand_controller *nandc;
diff --git a/target/linux/generic/backport-6.6/413-04-v6.14-mtd-rawnand-qcom-use-FIELD_PREP-and-GENMASK.patch b/target/linux/generic/backport-6.6/413-04-v6.14-mtd-rawnand-qcom-use-FIELD_PREP-and-GENMASK.patch
index b37507409a..c19f681e9d 100644
--- a/target/linux/generic/backport-6.6/413-04-v6.14-mtd-rawnand-qcom-use-FIELD_PREP-and-GENMASK.patch
+++ b/target/linux/generic/backport-6.6/413-04-v6.14-mtd-rawnand-qcom-use-FIELD_PREP-and-GENMASK.patch
@@ -104,7 +104,7 @@ Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
  
  	if (!nandc->props->qpic_version2)
  		host->ecc_buf_cfg = 0x203 << NUM_STEPS;
-@@ -1882,21 +1881,21 @@ static int qcom_param_page_type_exec(str
+@@ -1887,21 +1886,21 @@ static int qcom_param_page_type_exec(str
  	nandc->regs->addr0 = 0;
  	nandc->regs->addr1 = 0;
  
diff --git a/target/linux/generic/backport-6.6/414-v6.14-mtd-rawnand-qcom-fix-broken-config-in-qcom_param_pag.patch b/target/linux/generic/backport-6.6/414-v6.14-mtd-rawnand-qcom-fix-broken-config-in-qcom_param_pag.patch
index a6a4db229f..238a1f9d93 100644
--- a/target/linux/generic/backport-6.6/414-v6.14-mtd-rawnand-qcom-fix-broken-config-in-qcom_param_pag.patch
+++ b/target/linux/generic/backport-6.6/414-v6.14-mtd-rawnand-qcom-fix-broken-config-in-qcom_param_pag.patch
@@ -32,7 +32,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/drivers/mtd/nand/raw/qcom_nandc.c
 +++ b/drivers/mtd/nand/raw/qcom_nandc.c
-@@ -1881,18 +1881,18 @@ static int qcom_param_page_type_exec(str
+@@ -1886,18 +1886,18 @@ static int qcom_param_page_type_exec(str
  	nandc->regs->addr0 = 0;
  	nandc->regs->addr1 = 0;
  
diff --git a/target/linux/generic/hack-6.6/259-regmap_dynamic.patch b/target/linux/generic/hack-6.6/259-regmap_dynamic.patch
index 4f6dca7127..c7b7a28ce3 100644
--- a/target/linux/generic/hack-6.6/259-regmap_dynamic.patch
+++ b/target/linux/generic/hack-6.6/259-regmap_dynamic.patch
@@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #include <linux/mutex.h>
  #include <linux/err.h>
  #include <linux/property.h>
-@@ -3483,3 +3484,5 @@ static int __init regmap_initcall(void)
+@@ -3485,3 +3486,5 @@ static int __init regmap_initcall(void)
  	return 0;
  }
  postcore_initcall(regmap_initcall);
diff --git a/target/linux/generic/kernel-6.6 b/target/linux/generic/kernel-6.6
index 4a55a573ae..71181a3fc5 100644
--- a/target/linux/generic/kernel-6.6
+++ b/target/linux/generic/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .100
-LINUX_KERNEL_HASH-6.6.100 = d6c0ec4d55b14814f55b62a0b23a2d95faf66877e48fbfb4b83523e4afdf97ba
+LINUX_VERSION-6.6 = .101
+LINUX_KERNEL_HASH-6.6.101 = 8c4ff2869736538b9b0d88ea8dbf0332b79c6ecc40a32066768a754df1fae1c0



From lede-commits at lists.infradead.org  Thu Aug 28 12:15:03 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 15:15:03 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.102
In-Reply-To: <175640850204.962771.14764916236328801085@git-01.infra.openwrt.org>
References: <175640850204.962771.14764916236328801085@git-01.infra.openwrt.org>
Message-ID: <mailman.133123.1756416252.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/34e1092e88f6df4de3115ea471e632ef21407d38

commit 34e1092e88f6df4de3115ea471e632ef21407d38
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Tue Aug 26 22:58:12 2025 +0000

    kernel: bump 6.6 to 6.6.102
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.102
    
    Added backport to fix ipv6 breakage with the 6.12.42 release:
    generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch[1]
    
    All patches auto-refreshed.
    
    1. https://lore.kernel.org/all/20250821105806.1453833-1-wangzijie1 at honor.com
    
    Link: https://github.com/openwrt/openwrt/pull/19876
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../621-proc-fix-missing-pde_set_flags.patch       | 121 +++++++++++++++++++++
 ...pp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch |   2 +-
 ....7-net-introduce-napi_is_scheduled-helper.patch |   2 +-
 .../hack-6.6/721-net-add-packet-mangeling.patch    |   4 +-
 .../generic/hack-6.6/904-debloat_dma_buf.patch     |   2 +-
 target/linux/generic/kernel-6.6                    |   4 +-
 .../650-net-pppoe-implement-GRO-support.patch      |   4 +-
 .../generic/pending-6.6/655-increase_skb_pad.patch |   2 +-
 ...jecting-with-source-address-failed-policy.patch |  14 +--
 ...f_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |   2 +-
 10 files changed, 139 insertions(+), 18 deletions(-)

diff --git a/target/linux/generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch b/target/linux/generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch
new file mode 100644
index 0000000000..ba026b9c3a
--- /dev/null
+++ b/target/linux/generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch
@@ -0,0 +1,121 @@
+From: wangzijie <wangzijie1 at honor.com>
+To: <akpm at linux-foundation.org>, <brauner at kernel.org>,
+	<viro at zeniv.linux.org.uk>, <adobriyan at gmail.com>,
+	<rick.p.edgecombe at intel.com>, <ast at kernel.org>,
+	<k.shutemov at gmail.com>, <jirislaby at kernel.org>,
+	<linux-fsdevel at vger.kernel.org>
+Cc: <polynomial-c at gmx.de>, <gregkh at linuxfoundation.org>,
+	<stable at vger.kernel.org>, <regressions at lists.linux.dev>,
+	wangzijie <wangzijie1 at honor.com>
+Subject: [PATCH v3] proc: fix missing pde_set_flags() for net proc files
+Date: Thu, 21 Aug 2025 18:58:06 +0800	[thread overview]
+Message-ID: <20250821105806.1453833-1-wangzijie1 at honor.com> (raw)
+
+To avoid potential UAF issues during module removal races, we use pde_set_flags()
+to save proc_ops flags in PDE itself before proc_register(), and then use
+pde_has_proc_*() helpers instead of directly dereferencing pde->proc_ops->*.
+
+However, the pde_set_flags() call was missing when creating net related proc files.
+This omission caused incorrect behavior which FMODE_LSEEK was being cleared
+inappropriately in proc_reg_open() for net proc files. Lars reported it in this link[1].
+
+Fix this by ensuring pde_set_flags() is called when register proc entry, and add
+NULL check for proc_ops in pde_set_flags().
+
+[1]: https://lore.kernel.org/all/20250815195616.64497967 at chagall.paradoxon.rec/
+
+Fixes: ff7ec8dc1b64 ("proc: use the same treatment to check proc_lseek as ones for proc_read_iter et.al")
+Cc: stable at vger.kernel.org
+Reported-by: Lars Wendler <polynomial-c at gmx.de>
+Signed-off-by: wangzijie <wangzijie1 at honor.com>
+---
+v3:
+- followed by Christian's suggestion to stash pde->proc_ops in a local const variable
+v2:
+- followed by Jiri's suggestion to refractor code and reformat commit message
+---
+ fs/proc/generic.c | 38 +++++++++++++++++++++-----------------
+ 1 file changed, 21 insertions(+), 17 deletions(-)
+
+--- a/fs/proc/generic.c
++++ b/fs/proc/generic.c
+@@ -362,6 +362,25 @@ static const struct inode_operations pro
+ 	.setattr	= proc_notify_change,
+ };
+ 
++static void pde_set_flags(struct proc_dir_entry *pde)
++{
++	const struct proc_ops *proc_ops = pde->proc_ops;
++
++	if (!proc_ops)
++		return;
++
++	if (proc_ops->proc_flags & PROC_ENTRY_PERMANENT)
++		pde->flags |= PROC_ENTRY_PERMANENT;
++	if (proc_ops->proc_read_iter)
++		pde->flags |= PROC_ENTRY_proc_read_iter;
++#ifdef CONFIG_COMPAT
++	if (proc_ops->proc_compat_ioctl)
++		pde->flags |= PROC_ENTRY_proc_compat_ioctl;
++#endif
++	if (proc_ops->proc_lseek)
++		pde->flags |= PROC_ENTRY_proc_lseek;
++}
++
+ /* returns the registered entry, or frees dp and returns NULL on failure */
+ struct proc_dir_entry *proc_register(struct proc_dir_entry *dir,
+ 		struct proc_dir_entry *dp)
+@@ -369,6 +388,8 @@ struct proc_dir_entry *proc_register(str
+ 	if (proc_alloc_inum(&dp->low_ino))
+ 		goto out_free_entry;
+ 
++	pde_set_flags(dp);
++
+ 	write_lock(&proc_subdir_lock);
+ 	dp->parent = dir;
+ 	if (pde_subdir_insert(dir, dp) == false) {
+@@ -557,20 +578,6 @@ struct proc_dir_entry *proc_create_reg(c
+ 	return p;
+ }
+ 
+-static void pde_set_flags(struct proc_dir_entry *pde)
+-{
+-	if (pde->proc_ops->proc_flags & PROC_ENTRY_PERMANENT)
+-		pde->flags |= PROC_ENTRY_PERMANENT;
+-	if (pde->proc_ops->proc_read_iter)
+-		pde->flags |= PROC_ENTRY_proc_read_iter;
+-#ifdef CONFIG_COMPAT
+-	if (pde->proc_ops->proc_compat_ioctl)
+-		pde->flags |= PROC_ENTRY_proc_compat_ioctl;
+-#endif
+-	if (pde->proc_ops->proc_lseek)
+-		pde->flags |= PROC_ENTRY_proc_lseek;
+-}
+-
+ struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,
+ 		struct proc_dir_entry *parent,
+ 		const struct proc_ops *proc_ops, void *data)
+@@ -581,7 +588,6 @@ struct proc_dir_entry *proc_create_data(
+ 	if (!p)
+ 		return NULL;
+ 	p->proc_ops = proc_ops;
+-	pde_set_flags(p);
+ 	return proc_register(parent, p);
+ }
+ EXPORT_SYMBOL(proc_create_data);
+@@ -632,7 +638,6 @@ struct proc_dir_entry *proc_create_seq_p
+ 	p->proc_ops = &proc_seq_ops;
+ 	p->seq_ops = ops;
+ 	p->state_size = state_size;
+-	pde_set_flags(p);
+ 	return proc_register(parent, p);
+ }
+ EXPORT_SYMBOL(proc_create_seq_private);
+@@ -663,7 +668,6 @@ struct proc_dir_entry *proc_create_singl
+ 		return NULL;
+ 	p->proc_ops = &proc_single_ops;
+ 	p->single_show = show;
+-	pde_set_flags(p);
+ 	return proc_register(parent, p);
+ }
+ EXPORT_SYMBOL(proc_create_single_data);
diff --git a/target/linux/generic/backport-6.6/624-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch b/target/linux/generic/backport-6.6/624-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
index ad98807a6f..7d18fff096 100644
--- a/target/linux/generic/backport-6.6/624-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
+++ b/target/linux/generic/backport-6.6/624-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
@@ -47,7 +47,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (error) {
 --- a/drivers/net/ppp/pptp.c
 +++ b/drivers/net/ppp/pptp.c
-@@ -465,6 +465,7 @@ static int pptp_connect(struct socket *s
+@@ -469,6 +469,7 @@ static int pptp_connect(struct socket *s
  	po->chan.mtu -= PPTP_HEADER_OVERHEAD;
  
  	po->chan.hdrlen = 2 + sizeof(struct pptp_gre_header);
diff --git a/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch b/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch
index 319bc3e47b..4aa93c20d1 100644
--- a/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch
+++ b/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch
@@ -42,7 +42,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
   *	@adap: the adapter
 --- a/drivers/net/wireless/realtek/rtw89/core.c
 +++ b/drivers/net/wireless/realtek/rtw89/core.c
-@@ -1744,7 +1744,7 @@ static void rtw89_core_rx_to_mac80211(st
+@@ -1749,7 +1749,7 @@ static void rtw89_core_rx_to_mac80211(st
  	struct napi_struct *napi = &rtwdev->napi;
  
  	/* In low power mode, napi isn't scheduled. Receive it to netif. */
diff --git a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
index 8b784836a0..30a0b86b00 100644
--- a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
+++ b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
@@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   */
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3098,6 +3098,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -3121,6 +3121,10 @@ static inline int pskb_trim(struct sk_bu
  	return (len < skb->len) ? __pskb_trim(skb, len) : 0;
  }
  
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  /**
   *	pskb_trim_unique - remove end from a paged unique (not cloned) buffer
   *	@skb: buffer to alter
-@@ -3263,16 +3267,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -3286,16 +3290,6 @@ static inline struct sk_buff *dev_alloc_
  }
  
  
diff --git a/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch b/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch
index 4d2ea46212..3ca98788ab 100644
--- a/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch
+++ b/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch
@@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +MODULE_LICENSE("GPL");
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -4486,6 +4486,7 @@ int wake_up_state(struct task_struct *p,
+@@ -4485,6 +4485,7 @@ int wake_up_state(struct task_struct *p,
  {
  	return try_to_wake_up(p, state, 0);
  }
diff --git a/target/linux/generic/kernel-6.6 b/target/linux/generic/kernel-6.6
index 71181a3fc5..048ae0b42a 100644
--- a/target/linux/generic/kernel-6.6
+++ b/target/linux/generic/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .101
-LINUX_KERNEL_HASH-6.6.101 = 8c4ff2869736538b9b0d88ea8dbf0332b79c6ecc40a32066768a754df1fae1c0
+LINUX_VERSION-6.6 = .102
+LINUX_KERNEL_HASH-6.6.102 = 80d2feb7334c30bacbe1e7dafa9ea415efb2c0ea4f4740ecbd1467cf5d94de5c
diff --git a/target/linux/generic/pending-6.6/650-net-pppoe-implement-GRO-support.patch b/target/linux/generic/pending-6.6/650-net-pppoe-implement-GRO-support.patch
index 1c6849bf22..c1d77d8cc7 100644
--- a/target/linux/generic/pending-6.6/650-net-pppoe-implement-GRO-support.patch
+++ b/target/linux/generic/pending-6.6/650-net-pppoe-implement-GRO-support.patch
@@ -230,7 +230,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  {
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -319,6 +319,7 @@ out:
+@@ -321,6 +321,7 @@ out:
  
  	return pp;
  }
@@ -238,7 +238,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  static struct sk_buff *sit_ip6ip6_gro_receive(struct list_head *head,
  					      struct sk_buff *skb)
-@@ -401,6 +402,7 @@ INDIRECT_CALLABLE_SCOPE int ipv6_gro_com
+@@ -403,6 +404,7 @@ INDIRECT_CALLABLE_SCOPE int ipv6_gro_com
  out:
  	return err;
  }
diff --git a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
index 4f3bb06051..8fbc915881 100644
--- a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
+++ b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3065,7 +3065,7 @@ static inline int pskb_network_may_pull(
+@@ -3088,7 +3088,7 @@ static inline int pskb_network_may_pull(
   * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
   */
  #ifndef NET_SKB_PAD
diff --git a/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
index 0ad36b3430..ef7ca8cf74 100644
--- a/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
+++ b/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
@@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  		cfg->fc_flags |= RTF_REJECT;
  
  	if (rtm->rtm_type == RTN_LOCAL)
-@@ -6341,6 +6372,8 @@ static int ip6_route_dev_notify(struct n
+@@ -6349,6 +6380,8 @@ static int ip6_route_dev_notify(struct n
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  		net->ipv6.ip6_prohibit_entry->dst.dev = dev;
  		net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  		net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
  		net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
  #endif
-@@ -6352,6 +6385,7 @@ static int ip6_route_dev_notify(struct n
+@@ -6360,6 +6393,7 @@ static int ip6_route_dev_notify(struct n
  		in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  		in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
@@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  		in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
  #endif
  	}
-@@ -6552,6 +6586,8 @@ static int __net_init ip6_route_net_init
+@@ -6560,6 +6594,8 @@ static int __net_init ip6_route_net_init
  
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  	net->ipv6.fib6_has_custom_rules = false;
@@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  	net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
  					       sizeof(*net->ipv6.ip6_prohibit_entry),
  					       GFP_KERNEL);
-@@ -6562,11 +6598,21 @@ static int __net_init ip6_route_net_init
+@@ -6570,11 +6606,21 @@ static int __net_init ip6_route_net_init
  			 ip6_template_metrics, true);
  	INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->dst.rt_uncached);
  
@@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  	net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
  	dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
  			 ip6_template_metrics, true);
-@@ -6593,6 +6639,8 @@ out:
+@@ -6601,6 +6647,8 @@ out:
  	return ret;
  
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
@@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  out_ip6_prohibit_entry:
  	kfree(net->ipv6.ip6_prohibit_entry);
  out_ip6_null_entry:
-@@ -6612,6 +6660,7 @@ static void __net_exit ip6_route_net_exi
+@@ -6620,6 +6668,7 @@ static void __net_exit ip6_route_net_exi
  	kfree(net->ipv6.ip6_null_entry);
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  	kfree(net->ipv6.ip6_prohibit_entry);
@@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  	kfree(net->ipv6.ip6_blk_hole_entry);
  #endif
  	dst_entries_destroy(&net->ipv6.ip6_dst_ops);
-@@ -6695,6 +6744,9 @@ void __init ip6_route_init_special_entri
+@@ -6703,6 +6752,9 @@ void __init ip6_route_init_special_entri
  	init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
  	init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
  	init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
diff --git a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index 1ae6f89399..7a5413700a 100644
--- a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -8469,7 +8469,7 @@ static int nft_register_flowtable_net_ho
+@@ -8449,7 +8449,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);



From lede-commits at lists.infradead.org  Thu Aug 28 12:19:52 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 15:19:52 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.101
In-Reply-To: <175640879278.975925.7831359189227190418@git-01.infra.openwrt.org>
References: <175640879278.975925.7831359189227190418@git-01.infra.openwrt.org>
Message-ID: <mailman.133126.1756416253.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/406489fd83d9015f1827122d912253744c0efe5a

commit 406489fd83d9015f1827122d912253744c0efe5a
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Aug 24 14:48:46 2025 +0000

    kernel: bump 6.6 to 6.6.101
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.101
    All patches auto-refreshed.
    
    Link: https://github.com/openwrt/openwrt/pull/19876
    (cherry picked from commit 9fbbcd16f7bd3d6f6ec8a5be23f1cb12f49113a1)
    Link: https://github.com/openwrt/openwrt/pull/19877
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-6.6                                                    | 4 ++--
 ...50-0184-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch | 4 ++--
 ...50-0185-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch | 4 ++--
 ...50-0190-staging-vchiq_arm-Set-up-dma-ranges-on-child-devices.patch | 2 +-
 ...50-0191-staging-vchiq-Use-the-old-dma-controller-for-OF-conf.patch | 4 ++--
 .../950-0194-staging-vchiq_arm-Give-vchiq-children-DT-nodes.patch     | 2 +-
 .../950-0209-staging-vchiq-Load-bcm2835_isp-driver-from-vchiq.patch   | 4 ++--
 .../950-1411-staging-vchiq_arm-Add-36-bit-address-support.patch       | 4 ++--
 .../950-1412-staging-vchiq_arm-children-inherit-DMA-config.patch      | 2 +-
 target/linux/generic/hack-6.6/259-regmap_dynamic.patch                | 2 +-
 10 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/include/kernel-6.6 b/include/kernel-6.6
index 4a55a573ae..71181a3fc5 100644
--- a/include/kernel-6.6
+++ b/include/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .100
-LINUX_KERNEL_HASH-6.6.100 = d6c0ec4d55b14814f55b62a0b23a2d95faf66877e48fbfb4b83523e4afdf97ba
+LINUX_VERSION-6.6 = .101
+LINUX_KERNEL_HASH-6.6.101 = 8c4ff2869736538b9b0d88ea8dbf0332b79c6ecc40a32066768a754df1fae1c0
diff --git a/target/linux/bcm27xx/patches-6.6/950-0184-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch b/target/linux/bcm27xx/patches-6.6/950-0184-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch
index 741d377fc8..6daa690dff 100644
--- a/target/linux/bcm27xx/patches-6.6/950-0184-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch
+++ b/target/linux/bcm27xx/patches-6.6/950-0184-staging-vchiq_arm-Register-vcsm-cma-as-a-platform-dr.patch
@@ -22,7 +22,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  struct vchiq_drvdata {
  	const unsigned int cache_line_size;
-@@ -1825,6 +1826,7 @@ static int vchiq_probe(struct platform_d
+@@ -1824,6 +1825,7 @@ static int vchiq_probe(struct platform_d
  		goto error_exit;
  	}
  
@@ -30,7 +30,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
  	bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio");
  
-@@ -1840,6 +1842,7 @@ static void vchiq_remove(struct platform
+@@ -1839,6 +1841,7 @@ static void vchiq_remove(struct platform
  {
  	platform_device_unregister(bcm2835_audio);
  	platform_device_unregister(bcm2835_camera);
diff --git a/target/linux/bcm27xx/patches-6.6/950-0185-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch b/target/linux/bcm27xx/patches-6.6/950-0185-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch
index 5a3c91b780..5adc8c75af 100644
--- a/target/linux/bcm27xx/patches-6.6/950-0185-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch
+++ b/target/linux/bcm27xx/patches-6.6/950-0185-staging-vchiq_arm-Register-bcm2835-codec-as-a-platfo.patch
@@ -22,7 +22,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  static struct platform_device *vcsm_cma;
  
  struct vchiq_drvdata {
-@@ -1827,6 +1828,7 @@ static int vchiq_probe(struct platform_d
+@@ -1826,6 +1827,7 @@ static int vchiq_probe(struct platform_d
  	}
  
  	vcsm_cma = vchiq_register_child(pdev, "vcsm-cma");
@@ -30,7 +30,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
  	bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio");
  
-@@ -1842,6 +1844,7 @@ static void vchiq_remove(struct platform
+@@ -1841,6 +1843,7 @@ static void vchiq_remove(struct platform
  {
  	platform_device_unregister(bcm2835_audio);
  	platform_device_unregister(bcm2835_camera);
diff --git a/target/linux/bcm27xx/patches-6.6/950-0190-staging-vchiq_arm-Set-up-dma-ranges-on-child-devices.patch b/target/linux/bcm27xx/patches-6.6/950-0190-staging-vchiq_arm-Set-up-dma-ranges-on-child-devices.patch
index 3abc4f19bf..525cb835e6 100644
--- a/target/linux/bcm27xx/patches-6.6/950-0190-staging-vchiq_arm-Set-up-dma-ranges-on-child-devices.patch
+++ b/target/linux/bcm27xx/patches-6.6/950-0190-staging-vchiq_arm-Set-up-dma-ranges-on-child-devices.patch
@@ -18,7 +18,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
 
 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
 +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
-@@ -1777,6 +1777,12 @@ vchiq_register_child(struct platform_dev
+@@ -1776,6 +1776,12 @@ vchiq_register_child(struct platform_dev
  		child = NULL;
  	}
  
diff --git a/target/linux/bcm27xx/patches-6.6/950-0191-staging-vchiq-Use-the-old-dma-controller-for-OF-conf.patch b/target/linux/bcm27xx/patches-6.6/950-0191-staging-vchiq-Use-the-old-dma-controller-for-OF-conf.patch
index e5c5fdbc0b..5613a4100a 100644
--- a/target/linux/bcm27xx/patches-6.6/950-0191-staging-vchiq-Use-the-old-dma-controller-for-OF-conf.patch
+++ b/target/linux/bcm27xx/patches-6.6/950-0191-staging-vchiq-Use-the-old-dma-controller-for-OF-conf.patch
@@ -17,7 +17,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
 
 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
 +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
-@@ -1763,6 +1763,7 @@ vchiq_register_child(struct platform_dev
+@@ -1762,6 +1762,7 @@ vchiq_register_child(struct platform_dev
  {
  	struct platform_device_info pdevinfo;
  	struct platform_device *child;
@@ -25,7 +25,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  
  	memset(&pdevinfo, 0, sizeof(pdevinfo));
  
-@@ -1778,10 +1779,20 @@ vchiq_register_child(struct platform_dev
+@@ -1777,10 +1778,20 @@ vchiq_register_child(struct platform_dev
  	}
  
  	/*
diff --git a/target/linux/bcm27xx/patches-6.6/950-0194-staging-vchiq_arm-Give-vchiq-children-DT-nodes.patch b/target/linux/bcm27xx/patches-6.6/950-0194-staging-vchiq_arm-Give-vchiq-children-DT-nodes.patch
index 9dba2dffca..a75bd3da56 100644
--- a/target/linux/bcm27xx/patches-6.6/950-0194-staging-vchiq_arm-Give-vchiq-children-DT-nodes.patch
+++ b/target/linux/bcm27xx/patches-6.6/950-0194-staging-vchiq_arm-Give-vchiq-children-DT-nodes.patch
@@ -16,7 +16,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
 +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
-@@ -1772,12 +1772,20 @@ vchiq_register_child(struct platform_dev
+@@ -1771,12 +1771,20 @@ vchiq_register_child(struct platform_dev
  	pdevinfo.id = PLATFORM_DEVID_NONE;
  	pdevinfo.dma_mask = DMA_BIT_MASK(32);
  
diff --git a/target/linux/bcm27xx/patches-6.6/950-0209-staging-vchiq-Load-bcm2835_isp-driver-from-vchiq.patch b/target/linux/bcm27xx/patches-6.6/950-0209-staging-vchiq-Load-bcm2835_isp-driver-from-vchiq.patch
index b5f912c85b..5c1b37bfd9 100644
--- a/target/linux/bcm27xx/patches-6.6/950-0209-staging-vchiq-Load-bcm2835_isp-driver-from-vchiq.patch
+++ b/target/linux/bcm27xx/patches-6.6/950-0209-staging-vchiq-Load-bcm2835_isp-driver-from-vchiq.patch
@@ -21,7 +21,7 @@ Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
  
  struct vchiq_drvdata {
  	const unsigned int cache_line_size;
-@@ -1856,6 +1857,7 @@ static int vchiq_probe(struct platform_d
+@@ -1855,6 +1856,7 @@ static int vchiq_probe(struct platform_d
  	bcm2835_codec = vchiq_register_child(pdev, "bcm2835-codec");
  	bcm2835_camera = vchiq_register_child(pdev, "bcm2835-camera");
  	bcm2835_audio = vchiq_register_child(pdev, "bcm2835_audio");
@@ -29,7 +29,7 @@ Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
  
  	return 0;
  
-@@ -1867,6 +1869,7 @@ error_exit:
+@@ -1866,6 +1868,7 @@ error_exit:
  
  static void vchiq_remove(struct platform_device *pdev)
  {
diff --git a/target/linux/bcm27xx/patches-6.6/950-1411-staging-vchiq_arm-Add-36-bit-address-support.patch b/target/linux/bcm27xx/patches-6.6/950-1411-staging-vchiq_arm-Add-36-bit-address-support.patch
index 871b2769b1..db65da6997 100644
--- a/target/linux/bcm27xx/patches-6.6/950-1411-staging-vchiq_arm-Add-36-bit-address-support.patch
+++ b/target/linux/bcm27xx/patches-6.6/950-1411-staging-vchiq_arm-Add-36-bit-address-support.patch
@@ -223,7 +223,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	vchiq_log_info(vchiq_arm_log_level, "vchiq_init - done (slots %pK, phys %pad)",
  		       vchiq_slot_zero, &slot_phys);
  
-@@ -1755,6 +1823,7 @@ void vchiq_platform_conn_state_changed(s
+@@ -1754,6 +1822,7 @@ void vchiq_platform_conn_state_changed(s
  static const struct of_device_id vchiq_of_match[] = {
  	{ .compatible = "brcm,bcm2835-vchiq", .data = &bcm2835_drvdata },
  	{ .compatible = "brcm,bcm2836-vchiq", .data = &bcm2836_drvdata },
@@ -231,7 +231,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	{},
  };
  MODULE_DEVICE_TABLE(of, vchiq_of_match);
-@@ -1787,22 +1856,8 @@ vchiq_register_child(struct platform_dev
+@@ -1786,22 +1855,8 @@ vchiq_register_child(struct platform_dev
  
  	child->dev.of_node = np;
  
diff --git a/target/linux/bcm27xx/patches-6.6/950-1412-staging-vchiq_arm-children-inherit-DMA-config.patch b/target/linux/bcm27xx/patches-6.6/950-1412-staging-vchiq_arm-children-inherit-DMA-config.patch
index df93f3a0c4..bcacf57c5c 100644
--- a/target/linux/bcm27xx/patches-6.6/950-1412-staging-vchiq_arm-children-inherit-DMA-config.patch
+++ b/target/linux/bcm27xx/patches-6.6/950-1412-staging-vchiq_arm-children-inherit-DMA-config.patch
@@ -15,7 +15,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
 +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_arm.c
-@@ -1856,8 +1856,18 @@ vchiq_register_child(struct platform_dev
+@@ -1855,8 +1855,18 @@ vchiq_register_child(struct platform_dev
  
  	child->dev.of_node = np;
  
diff --git a/target/linux/generic/hack-6.6/259-regmap_dynamic.patch b/target/linux/generic/hack-6.6/259-regmap_dynamic.patch
index 4f6dca7127..c7b7a28ce3 100644
--- a/target/linux/generic/hack-6.6/259-regmap_dynamic.patch
+++ b/target/linux/generic/hack-6.6/259-regmap_dynamic.patch
@@ -137,7 +137,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #include <linux/mutex.h>
  #include <linux/err.h>
  #include <linux/property.h>
-@@ -3483,3 +3484,5 @@ static int __init regmap_initcall(void)
+@@ -3485,3 +3486,5 @@ static int __init regmap_initcall(void)
  	return 0;
  }
  postcore_initcall(regmap_initcall);



From lede-commits at lists.infradead.org  Thu Aug 28 12:19:53 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 15:19:53 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.102
In-Reply-To: <175640879278.975925.7831359189227190418@git-01.infra.openwrt.org>
References: <175640879278.975925.7831359189227190418@git-01.infra.openwrt.org>
Message-ID: <mailman.133129.1756416253.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/a65ca44cb7a3e6fbb43b230c7c5a0684d88bae8b

commit a65ca44cb7a3e6fbb43b230c7c5a0684d88bae8b
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Aug 24 17:21:54 2025 +0000

    kernel: bump 6.6 to 6.6.102
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.102
    
    Added backport to fix ipv6 breakage with the 6.12.42 release:
    generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch[1]
    
    All patches auto-refreshed.
    
    1. https://lore.kernel.org/all/20250821105806.1453833-1-wangzijie1 at honor.com
    
    Link: https://github.com/openwrt/openwrt/pull/19876
    (cherry picked from commit 34e1092e88f6df4de3115ea471e632ef21407d38)
    Link: https://github.com/openwrt/openwrt/pull/19877
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-6.6                                 |   4 +-
 .../patches-6.6/900-unaligned_access_hacks.patch   |   2 +-
 ...ng-fbtft-Add-support-for-display-variants.patch |   6 +-
 ...Compatibility-hack-should-be-X86-specific.patch |   4 +-
 .../621-proc-fix-missing-pde_set_flags.patch       | 121 +++++++++++++++++++++
 ....7-net-introduce-napi_is_scheduled-helper.patch |   2 +-
 .../hack-6.6/721-net-add-packet-mangeling.patch    |   4 +-
 .../generic/hack-6.6/904-debloat_dma_buf.patch     |   2 +-
 .../generic/pending-6.6/655-increase_skb_pad.patch |   2 +-
 ...jecting-with-source-address-failed-policy.patch |  14 +--
 ...f_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |   2 +-
 ...-net-dsa-add-out-of-band-tagging-protocol.patch |   2 +-
 12 files changed, 143 insertions(+), 22 deletions(-)

diff --git a/include/kernel-6.6 b/include/kernel-6.6
index 71181a3fc5..048ae0b42a 100644
--- a/include/kernel-6.6
+++ b/include/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .101
-LINUX_KERNEL_HASH-6.6.101 = 8c4ff2869736538b9b0d88ea8dbf0332b79c6ecc40a32066768a754df1fae1c0
+LINUX_VERSION-6.6 = .102
+LINUX_KERNEL_HASH-6.6.102 = 80d2feb7334c30bacbe1e7dafa9ea415efb2c0ea4f4740ecbd1467cf5d94de5c
diff --git a/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch
index 9168d5e973..02b64bb7f8 100644
--- a/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-6.6/900-unaligned_access_hacks.patch
@@ -579,7 +579,7 @@ SVN-Revision: 35130
  			goto next_ht;
 --- a/net/ipv6/ip6_offload.c
 +++ b/net/ipv6/ip6_offload.c
-@@ -273,7 +273,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
+@@ -275,7 +275,7 @@ INDIRECT_CALLABLE_SCOPE struct sk_buff *
  			continue;
  
  		iph2 = (struct ipv6hdr *)(p->data + off);
diff --git a/target/linux/bcm27xx/patches-6.6/950-0243-staging-fbtft-Add-support-for-display-variants.patch b/target/linux/bcm27xx/patches-6.6/950-0243-staging-fbtft-Add-support-for-display-variants.patch
index f49c9a2b56..fad8eb5a11 100644
--- a/target/linux/bcm27xx/patches-6.6/950-0243-staging-fbtft-Add-support-for-display-variants.patch
+++ b/target/linux/bcm27xx/patches-6.6/950-0243-staging-fbtft-Add-support-for-display-variants.patch
@@ -95,7 +95,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  
  #include <video/mipi_display.h>
  
-@@ -1183,6 +1185,7 @@ static struct fbtft_platform_data *fbtft
+@@ -1184,6 +1186,7 @@ static struct fbtft_platform_data *fbtft
   * @display: Display properties
   * @sdev: SPI device
   * @pdev: Platform device
@@ -103,7 +103,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
   *
   * Allocates, initializes and registers a framebuffer
   *
-@@ -1192,12 +1195,15 @@ static struct fbtft_platform_data *fbtft
+@@ -1193,12 +1196,15 @@ static struct fbtft_platform_data *fbtft
   */
  int fbtft_probe_common(struct fbtft_display *display,
  		       struct spi_device *sdev,
@@ -120,7 +120,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	int ret;
  
  	if (sdev)
-@@ -1213,6 +1219,14 @@ int fbtft_probe_common(struct fbtft_disp
+@@ -1214,6 +1220,14 @@ int fbtft_probe_common(struct fbtft_disp
  		pdata = fbtft_properties_read(dev);
  		if (IS_ERR(pdata))
  			return PTR_ERR(pdata);
diff --git a/target/linux/bcm27xx/patches-6.6/950-0472-pps-Compatibility-hack-should-be-X86-specific.patch b/target/linux/bcm27xx/patches-6.6/950-0472-pps-Compatibility-hack-should-be-X86-specific.patch
index 4cc2e594ba..04a2da5b41 100644
--- a/target/linux/bcm27xx/patches-6.6/950-0472-pps-Compatibility-hack-should-be-X86-specific.patch
+++ b/target/linux/bcm27xx/patches-6.6/950-0472-pps-Compatibility-hack-should-be-X86-specific.patch
@@ -22,7 +22,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/pps/pps.c
 +++ b/drivers/pps/pps.c
-@@ -249,12 +249,13 @@ static long pps_cdev_ioctl(struct file *
+@@ -254,12 +254,13 @@ static long pps_cdev_ioctl(struct file *
  static long pps_cdev_compat_ioctl(struct file *file,
  		unsigned int cmd, unsigned long arg)
  {
@@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  		struct pps_fdata_compat compat;
  		struct pps_fdata fdata;
  		int err;
-@@ -289,6 +290,7 @@ static long pps_cdev_compat_ioctl(struct
+@@ -296,6 +297,7 @@ static long pps_cdev_compat_ioctl(struct
  		return copy_to_user(uarg, &compat,
  				sizeof(struct pps_fdata_compat)) ? -EFAULT : 0;
  	}
diff --git a/target/linux/generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch b/target/linux/generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch
new file mode 100644
index 0000000000..ba026b9c3a
--- /dev/null
+++ b/target/linux/generic/backport-6.6/621-proc-fix-missing-pde_set_flags.patch
@@ -0,0 +1,121 @@
+From: wangzijie <wangzijie1 at honor.com>
+To: <akpm at linux-foundation.org>, <brauner at kernel.org>,
+	<viro at zeniv.linux.org.uk>, <adobriyan at gmail.com>,
+	<rick.p.edgecombe at intel.com>, <ast at kernel.org>,
+	<k.shutemov at gmail.com>, <jirislaby at kernel.org>,
+	<linux-fsdevel at vger.kernel.org>
+Cc: <polynomial-c at gmx.de>, <gregkh at linuxfoundation.org>,
+	<stable at vger.kernel.org>, <regressions at lists.linux.dev>,
+	wangzijie <wangzijie1 at honor.com>
+Subject: [PATCH v3] proc: fix missing pde_set_flags() for net proc files
+Date: Thu, 21 Aug 2025 18:58:06 +0800	[thread overview]
+Message-ID: <20250821105806.1453833-1-wangzijie1 at honor.com> (raw)
+
+To avoid potential UAF issues during module removal races, we use pde_set_flags()
+to save proc_ops flags in PDE itself before proc_register(), and then use
+pde_has_proc_*() helpers instead of directly dereferencing pde->proc_ops->*.
+
+However, the pde_set_flags() call was missing when creating net related proc files.
+This omission caused incorrect behavior which FMODE_LSEEK was being cleared
+inappropriately in proc_reg_open() for net proc files. Lars reported it in this link[1].
+
+Fix this by ensuring pde_set_flags() is called when register proc entry, and add
+NULL check for proc_ops in pde_set_flags().
+
+[1]: https://lore.kernel.org/all/20250815195616.64497967 at chagall.paradoxon.rec/
+
+Fixes: ff7ec8dc1b64 ("proc: use the same treatment to check proc_lseek as ones for proc_read_iter et.al")
+Cc: stable at vger.kernel.org
+Reported-by: Lars Wendler <polynomial-c at gmx.de>
+Signed-off-by: wangzijie <wangzijie1 at honor.com>
+---
+v3:
+- followed by Christian's suggestion to stash pde->proc_ops in a local const variable
+v2:
+- followed by Jiri's suggestion to refractor code and reformat commit message
+---
+ fs/proc/generic.c | 38 +++++++++++++++++++++-----------------
+ 1 file changed, 21 insertions(+), 17 deletions(-)
+
+--- a/fs/proc/generic.c
++++ b/fs/proc/generic.c
+@@ -362,6 +362,25 @@ static const struct inode_operations pro
+ 	.setattr	= proc_notify_change,
+ };
+ 
++static void pde_set_flags(struct proc_dir_entry *pde)
++{
++	const struct proc_ops *proc_ops = pde->proc_ops;
++
++	if (!proc_ops)
++		return;
++
++	if (proc_ops->proc_flags & PROC_ENTRY_PERMANENT)
++		pde->flags |= PROC_ENTRY_PERMANENT;
++	if (proc_ops->proc_read_iter)
++		pde->flags |= PROC_ENTRY_proc_read_iter;
++#ifdef CONFIG_COMPAT
++	if (proc_ops->proc_compat_ioctl)
++		pde->flags |= PROC_ENTRY_proc_compat_ioctl;
++#endif
++	if (proc_ops->proc_lseek)
++		pde->flags |= PROC_ENTRY_proc_lseek;
++}
++
+ /* returns the registered entry, or frees dp and returns NULL on failure */
+ struct proc_dir_entry *proc_register(struct proc_dir_entry *dir,
+ 		struct proc_dir_entry *dp)
+@@ -369,6 +388,8 @@ struct proc_dir_entry *proc_register(str
+ 	if (proc_alloc_inum(&dp->low_ino))
+ 		goto out_free_entry;
+ 
++	pde_set_flags(dp);
++
+ 	write_lock(&proc_subdir_lock);
+ 	dp->parent = dir;
+ 	if (pde_subdir_insert(dir, dp) == false) {
+@@ -557,20 +578,6 @@ struct proc_dir_entry *proc_create_reg(c
+ 	return p;
+ }
+ 
+-static void pde_set_flags(struct proc_dir_entry *pde)
+-{
+-	if (pde->proc_ops->proc_flags & PROC_ENTRY_PERMANENT)
+-		pde->flags |= PROC_ENTRY_PERMANENT;
+-	if (pde->proc_ops->proc_read_iter)
+-		pde->flags |= PROC_ENTRY_proc_read_iter;
+-#ifdef CONFIG_COMPAT
+-	if (pde->proc_ops->proc_compat_ioctl)
+-		pde->flags |= PROC_ENTRY_proc_compat_ioctl;
+-#endif
+-	if (pde->proc_ops->proc_lseek)
+-		pde->flags |= PROC_ENTRY_proc_lseek;
+-}
+-
+ struct proc_dir_entry *proc_create_data(const char *name, umode_t mode,
+ 		struct proc_dir_entry *parent,
+ 		const struct proc_ops *proc_ops, void *data)
+@@ -581,7 +588,6 @@ struct proc_dir_entry *proc_create_data(
+ 	if (!p)
+ 		return NULL;
+ 	p->proc_ops = proc_ops;
+-	pde_set_flags(p);
+ 	return proc_register(parent, p);
+ }
+ EXPORT_SYMBOL(proc_create_data);
+@@ -632,7 +638,6 @@ struct proc_dir_entry *proc_create_seq_p
+ 	p->proc_ops = &proc_seq_ops;
+ 	p->seq_ops = ops;
+ 	p->state_size = state_size;
+-	pde_set_flags(p);
+ 	return proc_register(parent, p);
+ }
+ EXPORT_SYMBOL(proc_create_seq_private);
+@@ -663,7 +668,6 @@ struct proc_dir_entry *proc_create_singl
+ 		return NULL;
+ 	p->proc_ops = &proc_single_ops;
+ 	p->single_show = show;
+-	pde_set_flags(p);
+ 	return proc_register(parent, p);
+ }
+ EXPORT_SYMBOL(proc_create_single_data);
diff --git a/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch b/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch
index 319bc3e47b..4aa93c20d1 100644
--- a/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch
+++ b/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch
@@ -42,7 +42,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
   *	@adap: the adapter
 --- a/drivers/net/wireless/realtek/rtw89/core.c
 +++ b/drivers/net/wireless/realtek/rtw89/core.c
-@@ -1744,7 +1744,7 @@ static void rtw89_core_rx_to_mac80211(st
+@@ -1749,7 +1749,7 @@ static void rtw89_core_rx_to_mac80211(st
  	struct napi_struct *napi = &rtwdev->napi;
  
  	/* In low power mode, napi isn't scheduled. Receive it to netif. */
diff --git a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
index 8b784836a0..30a0b86b00 100644
--- a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
+++ b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
@@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   */
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3098,6 +3098,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -3121,6 +3121,10 @@ static inline int pskb_trim(struct sk_bu
  	return (len < skb->len) ? __pskb_trim(skb, len) : 0;
  }
  
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  /**
   *	pskb_trim_unique - remove end from a paged unique (not cloned) buffer
   *	@skb: buffer to alter
-@@ -3263,16 +3267,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -3286,16 +3290,6 @@ static inline struct sk_buff *dev_alloc_
  }
  
  
diff --git a/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch b/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch
index 4d2ea46212..3ca98788ab 100644
--- a/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch
+++ b/target/linux/generic/hack-6.6/904-debloat_dma_buf.patch
@@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +MODULE_LICENSE("GPL");
 --- a/kernel/sched/core.c
 +++ b/kernel/sched/core.c
-@@ -4486,6 +4486,7 @@ int wake_up_state(struct task_struct *p,
+@@ -4485,6 +4485,7 @@ int wake_up_state(struct task_struct *p,
  {
  	return try_to_wake_up(p, state, 0);
  }
diff --git a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
index 4f3bb06051..8fbc915881 100644
--- a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
+++ b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3065,7 +3065,7 @@ static inline int pskb_network_may_pull(
+@@ -3088,7 +3088,7 @@ static inline int pskb_network_may_pull(
   * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
   */
  #ifndef NET_SKB_PAD
diff --git a/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch b/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
index 0ad36b3430..ef7ca8cf74 100644
--- a/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
+++ b/target/linux/generic/pending-6.6/670-ipv6-allow-rejecting-with-source-address-failed-policy.patch
@@ -185,7 +185,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  		cfg->fc_flags |= RTF_REJECT;
  
  	if (rtm->rtm_type == RTN_LOCAL)
-@@ -6341,6 +6372,8 @@ static int ip6_route_dev_notify(struct n
+@@ -6349,6 +6380,8 @@ static int ip6_route_dev_notify(struct n
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  		net->ipv6.ip6_prohibit_entry->dst.dev = dev;
  		net->ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(dev);
@@ -194,7 +194,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  		net->ipv6.ip6_blk_hole_entry->dst.dev = dev;
  		net->ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(dev);
  #endif
-@@ -6352,6 +6385,7 @@ static int ip6_route_dev_notify(struct n
+@@ -6360,6 +6393,7 @@ static int ip6_route_dev_notify(struct n
  		in6_dev_put_clear(&net->ipv6.ip6_null_entry->rt6i_idev);
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  		in6_dev_put_clear(&net->ipv6.ip6_prohibit_entry->rt6i_idev);
@@ -202,7 +202,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  		in6_dev_put_clear(&net->ipv6.ip6_blk_hole_entry->rt6i_idev);
  #endif
  	}
-@@ -6552,6 +6586,8 @@ static int __net_init ip6_route_net_init
+@@ -6560,6 +6594,8 @@ static int __net_init ip6_route_net_init
  
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  	net->ipv6.fib6_has_custom_rules = false;
@@ -211,7 +211,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  	net->ipv6.ip6_prohibit_entry = kmemdup(&ip6_prohibit_entry_template,
  					       sizeof(*net->ipv6.ip6_prohibit_entry),
  					       GFP_KERNEL);
-@@ -6562,11 +6598,21 @@ static int __net_init ip6_route_net_init
+@@ -6570,11 +6606,21 @@ static int __net_init ip6_route_net_init
  			 ip6_template_metrics, true);
  	INIT_LIST_HEAD(&net->ipv6.ip6_prohibit_entry->dst.rt_uncached);
  
@@ -234,7 +234,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  	net->ipv6.ip6_blk_hole_entry->dst.ops = &net->ipv6.ip6_dst_ops;
  	dst_init_metrics(&net->ipv6.ip6_blk_hole_entry->dst,
  			 ip6_template_metrics, true);
-@@ -6593,6 +6639,8 @@ out:
+@@ -6601,6 +6647,8 @@ out:
  	return ret;
  
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
@@ -243,7 +243,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  out_ip6_prohibit_entry:
  	kfree(net->ipv6.ip6_prohibit_entry);
  out_ip6_null_entry:
-@@ -6612,6 +6660,7 @@ static void __net_exit ip6_route_net_exi
+@@ -6620,6 +6668,7 @@ static void __net_exit ip6_route_net_exi
  	kfree(net->ipv6.ip6_null_entry);
  #ifdef CONFIG_IPV6_MULTIPLE_TABLES
  	kfree(net->ipv6.ip6_prohibit_entry);
@@ -251,7 +251,7 @@ Signed-off-by: Jonas Gorski <jogo at openwrt.org>
  	kfree(net->ipv6.ip6_blk_hole_entry);
  #endif
  	dst_entries_destroy(&net->ipv6.ip6_dst_ops);
-@@ -6695,6 +6744,9 @@ void __init ip6_route_init_special_entri
+@@ -6703,6 +6752,9 @@ void __init ip6_route_init_special_entri
  	init_net.ipv6.ip6_prohibit_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
  	init_net.ipv6.ip6_blk_hole_entry->dst.dev = init_net.loopback_dev;
  	init_net.ipv6.ip6_blk_hole_entry->rt6i_idev = in6_dev_get(init_net.loopback_dev);
diff --git a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index 1ae6f89399..7a5413700a 100644
--- a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -8469,7 +8469,7 @@ static int nft_register_flowtable_net_ho
+@@ -8449,7 +8449,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);
diff --git a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
index d49b18242a..15b8e6dadc 100644
--- a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +#endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -4683,6 +4683,9 @@ enum skb_ext_id {
+@@ -4706,6 +4706,9 @@ enum skb_ext_id {
  #if IS_ENABLED(CONFIG_MCTP_FLOWS)
  	SKB_EXT_MCTP,
  #endif



From lede-commits at lists.infradead.org  Thu Aug 28 13:09:44 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 28 Aug 2025 16:09:44 -0400
Subject: [openwrt/openwrt]  mac80211: add support for MLD AP client probing
In-Reply-To: <175641178478.1097939.14421194976628986453@git-01.infra.openwrt.org>
References: <175641178478.1097939.14421194976628986453@git-01.infra.openwrt.org>
Message-ID: <mailman.133187.1756419166.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a04b5fdcb6e553282911bf4d43fff5dc72bc423c

commit a04b5fdcb6e553282911bf4d43fff5dc72bc423c
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Aug 28 14:48:42 2025 +0200

    mac80211: add support for MLD AP client probing
    
    Select a link for outgoing probe packets
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...11-add-MLO-support-to-ieee80211_probe_cli.patch | 64 ++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/package/kernel/mac80211/patches/subsys/370-wifi-mac80211-add-MLO-support-to-ieee80211_probe_cli.patch b/package/kernel/mac80211/patches/subsys/370-wifi-mac80211-add-MLO-support-to-ieee80211_probe_cli.patch
new file mode 100644
index 0000000000..1f9d6a104b
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/370-wifi-mac80211-add-MLO-support-to-ieee80211_probe_cli.patch
@@ -0,0 +1,64 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Thu, 28 Aug 2025 14:41:57 +0200
+Subject: [PATCH] wifi: mac80211: add MLO support to ieee80211_probe_client
+
+Use the first available link to probe the client.
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -4320,7 +4320,9 @@ static int ieee80211_probe_client(struct
+ 	struct ieee80211_tx_info *info;
+ 	struct sta_info *sta;
+ 	struct ieee80211_chanctx_conf *chanctx_conf;
++	struct ieee80211_bss_conf *link_conf;
+ 	enum nl80211_band band;
++	u8 link_id;
+ 	int ret;
+ 
+ 	/* the lock is needed to assign the cookie later */
+@@ -4335,7 +4337,23 @@ static int ieee80211_probe_client(struct
+ 
+ 	qos = sta->sta.wme;
+ 
+-	chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
++	if (ieee80211_vif_is_mld(&sdata->vif)) {
++		if (sta->sta.valid_links)
++			link_id = ffs(sta->sta.valid_links) - 1;
++		else
++			link_id = sta->deflink.link_id;
++
++		link_conf = rcu_dereference(sdata->vif.link_conf[link_id]);
++		if (unlikely(!link_conf)) {
++			ret = -ENOLINK;
++			goto unlock;
++		}
++	} else {
++		link_id = IEEE80211_LINK_UNSPECIFIED;
++		link_conf = &sdata->vif.bss_conf;
++	}
++
++	chanctx_conf = rcu_dereference(link_conf->chanctx_conf);
+ 	if (WARN_ON(!chanctx_conf)) {
+ 		ret = -EINVAL;
+ 		goto unlock;
+@@ -4367,14 +4385,15 @@ static int ieee80211_probe_client(struct
+ 	nullfunc->frame_control = fc;
+ 	nullfunc->duration_id = 0;
+ 	memcpy(nullfunc->addr1, sta->sta.addr, ETH_ALEN);
+-	memcpy(nullfunc->addr2, sdata->vif.addr, ETH_ALEN);
+-	memcpy(nullfunc->addr3, sdata->vif.addr, ETH_ALEN);
++	memcpy(nullfunc->addr2, link_conf->addr, ETH_ALEN);
++	memcpy(nullfunc->addr3, link_conf->addr, ETH_ALEN);
+ 	nullfunc->seq_ctrl = 0;
+ 
+ 	info = IEEE80211_SKB_CB(skb);
+ 
+ 	info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS |
+ 		       IEEE80211_TX_INTFL_NL80211_FRAME_TX;
++	info->control.flags |= u32_encode_bits(link_id, IEEE80211_TX_CTRL_MLO_LINK);
+ 	info->band = band;
+ 
+ 	skb_set_queue_mapping(skb, IEEE80211_AC_VO);



From lede-commits at lists.infradead.org  Fri Aug 29 07:55:00 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 10:55:00 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: unconditionally call
 hostapd/supplicant setup
In-Reply-To: <175647929903.662818.14002960696611450296@git-01.infra.openwrt.org>
References: <175647929903.662818.14002960696611450296@git-01.infra.openwrt.org>
Message-ID: <mailman.134073.1756492795.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/79f8a83eb9330630c02e1c1ab1bf76ddcbda4ae2

commit 79f8a83eb9330630c02e1c1ab1bf76ddcbda4ae2
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Aug 29 16:54:36 2025 +0200

    wifi-scripts: ucode: unconditionally call hostapd/supplicant setup
    
    Ensure that interfaces can be deleted properly
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh       | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh b/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh
index 8ef2dd9b2b..e5d756d988 100755
--- a/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh
+++ b/package/network/config/wifi-scripts/files-ucode/lib/netifd/wireless/mac80211.sh
@@ -290,11 +290,8 @@ function setup() {
 		wdev_data[v.config.ifname] = config;
 	}
 
-	if (length(supplicant_data) > 0)
-		supplicant.setup(supplicant_data, data);
-
-	if (has_ap)
-		hostapd.setup(data);
+	supplicant.setup(supplicant_data, data);
+	hostapd.setup(data);
 
 	system(`ucode /usr/share/hostap/wdev.uc ${data.phy}${data.phy_suffix} set_config '${printf("%J", wdev_data)}' ${join(' ', active_ifnames)}`);
 



From lede-commits at lists.infradead.org  Fri Aug 29 07:54:59 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 10:54:59 -0400
Subject: [openwrt/openwrt]  wifi-scripts: default to sae_pwe=2 in client mode
In-Reply-To: <175647929903.662818.14002960696611450296@git-01.infra.openwrt.org>
References: <175647929903.662818.14002960696611450296@git-01.infra.openwrt.org>
Message-ID: <mailman.134076.1756492795.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e116b423b8437b903a4b7d4bd559f2a314c2be5a

commit e116b423b8437b903a4b7d4bd559f2a314c2be5a
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Aug 29 15:03:28 2025 +0200

    wifi-scripts: default to sae_pwe=2 in client mode
    
    Improves compatibility
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc | 3 ++-
 package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh        | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
index 8e5697b4f3..50677cdc99 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
@@ -66,6 +66,7 @@ function setup_sta(data, config) {
 		config.rsn_overriding = 0;
 
 	set_default(config, 'ieee80211r', 0);
+	set_default(config, 'sae_pwe', 2);
 	set_default(config, 'multi_ap', 0);
 	set_default(config, 'default_disabled', 0);
 
@@ -167,7 +168,7 @@ function setup_sta(data, config) {
 	network_append_string_vars(config, [ 'ssid' ]);
 	network_append_vars(config, [
 		'rsn_overriding', 'scan_ssid', 'noscan', 'disabled', 'multi_ap_backhaul_sta',
-		'ocv', 'key_mgmt', 'psk', 'sae_password', 'pairwise', 'group', 'bssid',
+		'ocv', 'key_mgmt', 'sae_pwe', 'psk', 'sae_password', 'pairwise', 'group', 'bssid',
 		'proto', 'mesh_fwding', 'mesh_rssi_threshold', 'frequency', 'fixed_freq',
 		'disable_ht', 'disable_ht40', 'disable_vht', 'vht', 'max_oper_chwidth',
 		'ht40', 'beacon_int', 'ieee80211w', 'basic_rate', 'mcast_rate',
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh
index dabb534cf4..32987edfe5 100644
--- a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh
+++ b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh
@@ -1337,6 +1337,7 @@ wpa_supplicant_add_network() {
 
 	set_default ieee80211r 0
 	set_default multi_ap 0
+	set_default sae_pwe 2
 	set_default default_disabled 0
 
 	local key_mgmt='NONE'
@@ -1623,6 +1624,7 @@ network={
 	$scan_ssid
 	ssid="$ssid"
 	key_mgmt=$key_mgmt
+	sae_pwe=$sae_pwe
 	$network_data
 }
 EOF



From lede-commits at lists.infradead.org  Fri Aug 29 10:26:45 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 13:26:45 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: add missing fields to spec
In-Reply-To: <175648840514.1169520.14591804625793605718@git-01.infra.openwrt.org>
References: <175648840514.1169520.14591804625793605718@git-01.infra.openwrt.org>
Message-ID: <mailman.134144.1756496835.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dcf6e9b0edc0085759639c612c79fc16abe33c6c

commit dcf6e9b0edc0085759639c612c79fc16abe33c6c
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Aug 29 19:26:01 2025 +0200

    wifi-scripts: ucode: add missing fields to spec
    
    Silence warnings
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../files-ucode/usr/share/schema/wireless.wifi-device.json  |  4 ++++
 .../files-ucode/usr/share/schema/wireless.wifi-iface.json   | 13 +++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json
index 08e4c792c8..8eae28c0c6 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-device.json
@@ -703,6 +703,10 @@
 			"description": "Specifies the maximum desired transmission power in dBm. The actual txpower used depends on regulatory requirements",
 			"type": "number"
 		},
+		"type": {
+			"description": "Device type (only mac80211 supported)",
+			"type": "string"
+		},
 		"vht160": {
 			"description": "Supported channel widths. 0 == 160MHz and 80+80 MHz not supported, 1 == 160 MHz supported, 2 == 160MHz and 80+80 MHz supported",
 			"type": "number",
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json
index e90f6de02f..de1962c14e 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/schema/wireless.wifi-iface.json
@@ -223,6 +223,13 @@
 			"type": "alias",
 			"default": "disabled"
 		},
+		"device": {
+			"description": "Devices to enable this interface on (wifi-device section names)",
+			"type": "array",
+			"items": {
+				"type": "string"
+			}
+		},
 		"device_name": {
 			"description": "Primary Device Name used by WPS",
 			"type": "string",
@@ -842,6 +849,12 @@
 				"type": "string"
 			}
 		},
+		"radios": {
+			"type": "array",
+			"items": {
+				"type": "string"
+			}
+		},
 		"radius_acct_interim_interval": {
 			"description": "Interim accounting update interval",
 			"type": "number"



From lede-commits at lists.infradead.org  Fri Aug 29 15:20:45 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 18:20:45 -0400
Subject: [openwrt/openwrt]  realtek: simplify RTL8214FC handling
In-Reply-To: <175650604453.2139772.15930951781130756563@git-01.infra.openwrt.org>
References: <175650604453.2139772.15930951781130756563@git-01.infra.openwrt.org>
Message-ID: <mailman.134321.1756510572.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fa1b362ae9d1a832a6e1acb6b67d72fcb79fe4b5

commit fa1b362ae9d1a832a6e1acb6b67d72fcb79fe4b5
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Tue Aug 19 06:46:41 2025 -0400

    realtek: simplify RTL8214FC handling
    
    Now that we have a get_base_phy() function a lot code of the RTL8214FC
    handling can be cleaned up. To name a few:
    
    - use phy_read/phy_write instead of mdiobus functions or the even worse
      phy_package_..._paged() helpers
    - replace messages with phydev_info()
    - remove if/else statements around copper/fibre handling
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19810
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.12/drivers/net/phy/rtl83xx-phy.c       | 76 +++++++---------------
 1 file changed, 25 insertions(+), 51 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index 01f24080b8..edac8f2c4d 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -844,24 +844,18 @@ static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
 
 static bool __rtl8214fc_media_is_fibre(struct phy_device *phydev)
 {
-	struct mii_bus *bus = phydev->mdio.bus;
+	struct phy_device *basephy = get_base_phy(phydev);
 	static int regs[] = {16, 19, 20, 21};
-	int addr = phydev->mdio.addr & ~3;
 	int reg = regs[phydev->mdio.addr & 3];
 	int oldpage, val;
 
-	/*
-	 * The fiber status cannot be read directly from the phy. It is a package "global"
-	 * attribute and therefore located in the first phy. To avoid state handling assume
-	 * an aligment to addresses divisible by 4.
-	 */
-
-	oldpage = __mdiobus_read(bus, addr, RTL8XXX_PAGE_SELECT);
-	__mdiobus_write(bus, addr, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
-	__mdiobus_write(bus, addr, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PORT);
-	val = __mdiobus_read(bus, addr, reg);
-	__mdiobus_write(bus, addr, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
-	__mdiobus_write(bus, addr, RTL8XXX_PAGE_SELECT, oldpage);
+	/* The fiber status is a package "global" in the first phy. */
+	oldpage = __phy_read(basephy, RTL8XXX_PAGE_SELECT);
+	__phy_write(basephy, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
+	__phy_write(basephy, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PORT);
+	val = __phy_read(basephy, reg);
+	__phy_write(basephy, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
+	__phy_write(basephy, RTL8XXX_PAGE_SELECT, oldpage);
 
 	return !(val & BMCR_PDOWN);
 }
@@ -883,10 +877,8 @@ static void rtl8214fc_power_set(struct phy_device *phydev, int port, bool on)
 	int page = port == PORT_FIBRE ? RTL821X_MEDIA_PAGE_FIBRE : RTL821X_MEDIA_PAGE_COPPER;
 	int pdown = on ? 0 : BMCR_PDOWN;
 
-	pr_info("%s: Powering %s %s (port %d)\n", __func__,
-		on ? "on" : "off",
-		port == PORT_FIBRE ? "FIBRE" : "COPPER",
-		phydev->mdio.addr);
+	phydev_info(phydev, "power %s %s\n", on ? "on" : "off",
+		    port == PORT_FIBRE ? "fibre" : "copper");
 
 	phy_write(phydev, RTL821XINT_MEDIA_PAGE_SELECT, page);
 	phy_modify_paged(phydev, RTL821X_PAGE_POWER, 0x10, BMCR_PDOWN, pdown);
@@ -903,47 +895,29 @@ static int rtl8214fc_suspend(struct phy_device *phydev)
 
 static int rtl8214fc_resume(struct phy_device *phydev)
 {
-	if (rtl8214fc_media_is_fibre(phydev)) {
-		rtl8214fc_power_set(phydev, PORT_MII, false);
-		rtl8214fc_power_set(phydev, PORT_FIBRE, true);
-	} else {
-		rtl8214fc_power_set(phydev, PORT_FIBRE, false);
-		rtl8214fc_power_set(phydev, PORT_MII, true);
-	}
+	bool set_fibre = rtl8214fc_media_is_fibre(phydev);
+
+	rtl8214fc_power_set(phydev, PORT_MII, !set_fibre);
+	rtl8214fc_power_set(phydev, PORT_FIBRE, set_fibre);
 
 	return 0;
 }
 
 static void rtl8214fc_media_set(struct phy_device *phydev, bool set_fibre)
 {
-	int mac = phydev->mdio.addr;
-
-	static int reg[] = {16, 19, 20, 21};
-	int val;
-
-	pr_info("%s: port %d, set_fibre: %d\n", __func__, mac, set_fibre);
-	phy_package_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
-	val = phy_package_read_paged(phydev, RTL821X_PAGE_PORT, reg[mac % 4]);
-
-	val |= BIT(10);
-	if (set_fibre) {
-		val &= ~BMCR_PDOWN;
-	} else {
-		val |= BMCR_PDOWN;
-	}
+	struct phy_device *basephy = get_base_phy(phydev);
+	int pdown = set_fibre ? 0 : BMCR_PDOWN;
+	static int regs[] = {16, 19, 20, 21};
+	int reg = regs[phydev->mdio.addr & 3];
 
-	phy_package_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
-	phy_package_write_paged(phydev, RTL821X_PAGE_PORT, reg[mac % 4], val);
-	phy_package_write_paged(phydev, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
+	phydev_info(phydev, "switch to %s\n", set_fibre ? "fibre" : "copper");
+	phy_write_paged(basephy, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_INTERNAL);
+	phy_modify_paged(basephy, RTL821X_PAGE_PORT, reg, BMCR_PDOWN, pdown);
+	phy_write_paged(basephy, RTL838X_PAGE_RAW, RTL821XINT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_AUTO);
 
 	if (!phydev->suspended) {
-		if (set_fibre) {
-			rtl8214fc_power_set(phydev, PORT_MII, false);
-			rtl8214fc_power_set(phydev, PORT_FIBRE, true);
-		} else {
-			rtl8214fc_power_set(phydev, PORT_FIBRE, false);
-			rtl8214fc_power_set(phydev, PORT_MII, true);
-		}
+		rtl8214fc_power_set(phydev, PORT_MII, !set_fibre);
+		rtl8214fc_power_set(phydev, PORT_FIBRE, set_fibre);
 	}
 }
 
@@ -3558,7 +3532,7 @@ static int rtl8214fc_sfp_insert(void *upstream, const struct sfp_eeprom_id *id)
 	sfp_parse_support(phydev->sfp_bus, id, support, interfaces);
 	iface = sfp_select_interface(phydev->sfp_bus, support);
 
-	dev_info(&phydev->mdio.dev, "%s SFP module inserted\n", phy_modes(iface));
+	phydev_info(phydev, "%s SFP module inserted\n", phy_modes(iface));
 
 	rtl8214fc_media_set(phydev, true);
 



From lede-commits at lists.infradead.org  Fri Aug 29 15:20:46 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 18:20:46 -0400
Subject: [openwrt/openwrt]  realtek: phy: drop use of mdio package functions
In-Reply-To: <175650604453.2139772.15930951781130756563@git-01.infra.openwrt.org>
References: <175650604453.2139772.15930951781130756563@git-01.infra.openwrt.org>
Message-ID: <mailman.134322.1756510572.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6e416149d7e977fbb2729e8920a298e3b6dc376b

commit 6e416149d7e977fbb2729e8920a298e3b6dc376b
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Tue Aug 19 07:38:57 2025 -0400

    realtek: phy: drop use of mdio package functions
    
    Our phy driver can handle some multiport phys (e.g. RTL8218B
    or RTL8214FC). To access arbitrary ports some package access
    functions have been defined. These were implemented in the
    mdio bus with poor knowledge about the phy/mdio dependencies.
    So they add unneeded complexity to the bus and the phy driver
    must access these external functions directly.
    
    Provide a new helper get_package_phy() that can derive any
    phy device in a package from a given phy of that package.
    Make use of this local helper and cut the mdio dependency.
    
    While we refactor several firmware patching functions rename
    the loop variables to "port" to better indicate what we are
    working on.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19810
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.12/drivers/net/phy/rtl83xx-phy.c       | 126 ++++++++++++---------
 1 file changed, 70 insertions(+), 56 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index edac8f2c4d..490352dfc6 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -20,11 +20,6 @@
 
 extern struct rtl83xx_soc_info soc_info;
 
-extern int phy_package_port_write_paged(struct phy_device *phydev, int port, int page, u32 regnum, u16 val);
-extern int phy_package_write_paged(struct phy_device *phydev, int page, u32 regnum, u16 val);
-extern int phy_package_port_read_paged(struct phy_device *phydev, int port, int page, u32 regnum);
-extern int phy_package_read_paged(struct phy_device *phydev, int page, u32 regnum);
-
 extern int rtmdio_930x_read_sds_phy(int sds, int page, int regnum);
 extern int rtmdio_930x_write_sds_phy(int sds, int page, int regnum, u16 val);
 
@@ -106,9 +101,14 @@ static const struct firmware rtl838x_8380_fw;
 static const struct firmware rtl838x_8214fc_fw;
 static const struct firmware rtl838x_8218b_fw;
 
+static inline struct phy_device *get_package_phy(struct phy_device *phydev, int port)
+{
+	return mdiobus_get_phy(phydev->mdio.bus, phydev->shared->base_addr + port);
+}
+
 static inline struct phy_device *get_base_phy(struct phy_device *phydev)
 {
-	return mdiobus_get_phy(phydev->mdio.bus, phydev->shared->base_addr);
+	return get_package_phy(phydev, 0);
 }
 
 static u64 disable_polling(int port)
@@ -642,6 +642,7 @@ static int rtl8380_configure_int_rtl8218b(struct phy_device *phydev)
 	struct fw_header *h;
 	u32 *rtl838x_6275B_intPhy_perport;
 	u32 *rtl8218b_6276B_hwEsd_perport;
+	struct phy_device *patchphy;
 
 	val = phy_read(phydev, 2);
 	phy_id = val << 16;
@@ -685,41 +686,43 @@ static int rtl8380_configure_int_rtl8218b(struct phy_device *phydev)
 	msleep(100);
 
 	/* Ready PHY for patch */
-	for (int p = 0; p < 8; p++) {
-		phy_package_port_write_paged(phydev, p, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
-		phy_package_port_write_paged(phydev, p, RTL838X_PAGE_RAW, 0x10, 0x0010);
+	for (int port = 0; port < 8; port++) {
+		patchphy = get_package_phy(phydev, port);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW, 0x10, 0x0010);
 	}
 	msleep(500);
-	for (int p = 0; p < 8; p++) {
+	for (int port = 0; port < 8; port++) {
 		int i;
 
+		patchphy = get_package_phy(phydev, port);
 		for (i = 0; i < 100 ; i++) {
-			val = phy_package_port_read_paged(phydev, p, RTL821X_PAGE_STATE, 0x10);
+			val = phy_read_paged(patchphy, RTL821X_PAGE_STATE, 0x10);
 			if (val & 0x40)
 				break;
 		}
 		if (i >= 100) {
-			phydev_err(phydev,
-			           "ERROR: Port %d not ready for patch.\n",
-			           mac + p);
+			phydev_err(patchphy, "not ready for patch.\n");
 			return -1;
 		}
 	}
-	for (int p = 0; p < 8; p++) {
+	for (int port = 0; port < 8; port++) {
 		int i;
 
+		patchphy = get_package_phy(phydev, port);
+
 		i = 0;
 		while (rtl838x_6275B_intPhy_perport[i * 2]) {
-			phy_package_port_write_paged(phydev, p, RTL838X_PAGE_RAW,
-			                             rtl838x_6275B_intPhy_perport[i * 2],
-			                             rtl838x_6275B_intPhy_perport[i * 2 + 1]);
+			phy_write_paged(patchphy, RTL838X_PAGE_RAW,
+					rtl838x_6275B_intPhy_perport[i * 2],
+					rtl838x_6275B_intPhy_perport[i * 2 + 1]);
 			i++;
 		}
 		i = 0;
 		while (rtl8218b_6276B_hwEsd_perport[i * 2]) {
-			phy_package_port_write_paged(phydev, p, RTL838X_PAGE_RAW,
-			                             rtl8218b_6276B_hwEsd_perport[i * 2],
-			                             rtl8218b_6276B_hwEsd_perport[i * 2 + 1]);
+			phy_write_paged(patchphy, RTL838X_PAGE_RAW,
+					rtl8218b_6276B_hwEsd_perport[i * 2],
+					rtl8218b_6276B_hwEsd_perport[i * 2 + 1]);
 			i++;
 		}
 	}
@@ -735,6 +738,7 @@ static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
 	u32 *rtl8380_rtl8218b_perchip;
 	u32 *rtl8218B_6276B_rtl8380_perport;
 	u32 *rtl8380_rtl8218b_perport;
+	struct phy_device *patchphy;
 
 	if (soc_info.family == RTL8380_FAMILY_ID && mac != 0 && mac != 16) {
 		phydev_err(phydev, "External RTL8218B must have PHY-IDs 0 or 16!\n");
@@ -785,37 +789,41 @@ static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
 
 	for (int i = 0; rtl8380_rtl8218b_perchip[i * 3] &&
 	                rtl8380_rtl8218b_perchip[i * 3 + 1]; i++) {
-		phy_package_port_write_paged(phydev, rtl8380_rtl8218b_perchip[i * 3],
-					     RTL838X_PAGE_RAW, rtl8380_rtl8218b_perchip[i * 3 + 1],
-					     rtl8380_rtl8218b_perchip[i * 3 + 2]);
+		patchphy = get_package_phy(phydev, rtl8380_rtl8218b_perchip[i * 3]);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW,
+				rtl8380_rtl8218b_perchip[i * 3 + 1],
+				rtl8380_rtl8218b_perchip[i * 3 + 2]);
 	}
 
 	/* Enable PHY */
-	for (int i = 0; i < 8; i++) {
-		phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
-		phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, 0x00, 0x1140);
+	for (int port = 0; port < 8; port++) {
+		patchphy = get_package_phy(phydev, port);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW, 0x00, 0x1140);
 	}
 	mdelay(100);
 
 	/* Request patch */
-	for (int i = 0; i < 8; i++) {
-		phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
-		phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, 0x10, 0x0010);
+	for (int port = 0; port < 8; port++) {
+		patchphy = get_package_phy(phydev, port);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW, 0x10, 0x0010);
 	}
 
 	mdelay(300);
 
 	/* Verify patch readiness */
-	for (int i = 0; i < 8; i++) {
-		int l;
+	for (int port = 0; port < 8; port++) {
+		int i;
 
-		for (l = 0; l < 100; l++) {
-			val = phy_package_port_read_paged(phydev, i, RTL821X_PAGE_STATE, 0x10);
+		patchphy = get_package_phy(phydev, port);
+		for (i = 0; i < 100; i++) {
+			val = phy_read_paged(patchphy, RTL821X_PAGE_STATE, 0x10);
 			if (val & 0x40)
 				break;
 		}
-		if (l >= 100) {
-			phydev_err(phydev, "Could not patch PHY\n");
+		if (i >= 100) {
+			phydev_err(patchphy, "not ready for patch.\n");
 			return -1;
 		}
 	}
@@ -1077,6 +1085,7 @@ static int rtl8380_configure_rtl8214fc(struct phy_device *phydev)
 	struct fw_header *h;
 	u32 *rtl8380_rtl8214fc_perchip;
 	u32 *rtl8380_rtl8214fc_perport;
+	struct phy_device *patchphy;
 	u32 phy_id;
 	u32 val;
 
@@ -1142,51 +1151,56 @@ static int rtl8380_configure_rtl8214fc(struct phy_device *phydev)
 	}
 
 	/* Force copper medium */
-	for (int i = 0; i < 4; i++) {
-		phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
-		phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, RTL821XEXT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_COPPER);
+	for (int port = 0; port < 4; port++) {
+		patchphy = get_package_phy(phydev, port);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW, RTL821XEXT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_COPPER);
 	}
 
 	/* Enable PHY */
-	for (int i = 0; i < 4; i++) {
-		phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
-		phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, 0x00, 0x1140);
+	for (int port = 0; port < 4; port++) {
+		patchphy = get_package_phy(phydev, port);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL8XXX_PAGE_MAIN);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW, 0x00, 0x1140);
 	}
 	mdelay(100);
 
 	/* Disable Autosensing */
-	for (int i = 0; i < 4; i++) {
-		int l;
+	for (int port = 0; port < 4; port++) {
+		int i;
 
-		for (l = 0; l < 100; l++) {
-			val = phy_package_port_read_paged(phydev, i, RTL821X_PAGE_GPHY, 0x10);
+		patchphy = get_package_phy(phydev, port);
+		for (i = 0; i < 100; i++) {
+			val = phy_read_paged(patchphy, RTL821X_PAGE_GPHY, 0x10);
 			if ((val & 0x7) >= 3)
 				break;
 		}
-		if (l >= 100) {
+		if (i >= 100) {
 			phydev_err(phydev, "Could not disable autosensing\n");
 			return -1;
 		}
 	}
 
 	/* Request patch */
-	for (int i = 0; i < 4; i++) {
-		phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
-		phy_package_port_write_paged(phydev, i, RTL838X_PAGE_RAW, 0x10, 0x0010);
+	for (int port = 0; port < 4; port++) {
+		patchphy = get_package_phy(phydev, port);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
+		phy_write_paged(patchphy, RTL838X_PAGE_RAW, 0x10, 0x0010);
 	}
 	mdelay(300);
 
 	/* Verify patch readiness */
-	for (int i = 0; i < 4; i++) {
-		int l;
+	for (int port = 0; port < 4; port++) {
+		int i;
 
-		for (l = 0; l < 100; l++) {
-			val = phy_package_port_read_paged(phydev, i, RTL821X_PAGE_STATE, 0x10);
+		patchphy = get_package_phy(phydev, port);
+		for (i = 0; i < 100; i++) {
+			val = phy_read_paged(patchphy, RTL821X_PAGE_STATE, 0x10);
 			if (val & 0x40)
 				break;
 		}
-		if (l >= 100) {
-			phydev_err(phydev, "Could not patch PHY\n");
+		if (i >= 100) {
+			phydev_err(patchphy, "Could not patch PHY\n");
 			return -1;
 		}
 	}



From lede-commits at lists.infradead.org  Fri Aug 29 15:20:47 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 18:20:47 -0400
Subject: [openwrt/openwrt]  realtek: phy: add RTL8214x/RTL8218x patch helper
In-Reply-To: <175650604453.2139772.15930951781130756563@git-01.infra.openwrt.org>
References: <175650604453.2139772.15930951781130756563@git-01.infra.openwrt.org>
Message-ID: <mailman.134323.1756510572.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d5ad59ffb13e4bca44e9cc2ec137d2d54f40bc7f

commit d5ad59ffb13e4bca44e9cc2ec137d2d54f40bc7f
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Wed Aug 20 02:25:44 2025 -0400

    realtek: phy: add RTL8214x/RTL8218x patch helper
    
    The patching sequence of the RTL8214x/8218x is very similar.
    Especially the preparation for readiness is always the same.
    Provide a common helper to improve readability.
    
    While we are here clean up the changed functions
    
    - Sort variable definitions according to upstream
    - simplify some messages
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19810
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.12/drivers/net/phy/rtl83xx-phy.c       | 155 ++++++---------------
 1 file changed, 46 insertions(+), 109 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index 490352dfc6..b93c0fc522 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -635,20 +635,38 @@ static int rtl8390_configure_generic(struct phy_device *phydev)
 	return 0;
 }
 
+static int rtl821x_prepare_patch(struct phy_device *phydev, int ports)
+{
+	struct phy_device *patchphy;
+	int tries = 50;
+
+	for (int port = 0; port < ports; port++) {
+		patchphy = get_package_phy(phydev, port);
+		phy_write_paged(patchphy, RTL821X_PAGE_PATCH, 0x10, 0x10);
+	}
+
+	for (int port = 0; port < ports; port++) {
+		patchphy = get_package_phy(phydev, port);
+		while (tries && !(phy_read_paged(patchphy, RTL821X_PAGE_STATE, 0x10) & 0x40)) {
+			tries--;
+			usleep_range(10000, 25000);
+		};
+	}
+
+	if (!tries)
+		phydev_err(get_package_phy(phydev, 0), "package not ready for patch.\n");
+
+	return tries ? 0 : -EIO;
+}
+
 static int rtl8380_configure_int_rtl8218b(struct phy_device *phydev)
 {
-	u32 val, phy_id;
-	int mac = phydev->mdio.addr;
-	struct fw_header *h;
 	u32 *rtl838x_6275B_intPhy_perport;
 	u32 *rtl8218b_6276B_hwEsd_perport;
 	struct phy_device *patchphy;
-
-	val = phy_read(phydev, 2);
-	phy_id = val << 16;
-	val = phy_read(phydev, 3);
-	phy_id |= val;
-	pr_debug("Phy on MAC %d: %x\n", mac, phy_id);
+	struct fw_header *h;
+	int ret;
+	u32 val;
 
 	/* Read internal PHY ID */
 	phy_write_paged(phydev, 31, 27, 0x0002);
@@ -658,9 +676,6 @@ static int rtl8380_configure_int_rtl8218b(struct phy_device *phydev)
 		return -1;
 	}
 
-	/* Internal RTL8218B, version 2 */
-	phydev_info(phydev, "Detected internal RTL8218B\n");
-
 	h = rtl838x_request_fw(phydev, &rtl838x_8380_fw, FIRMWARE_838X_8380_1);
 	if (!h)
 		return -1;
@@ -673,10 +688,7 @@ static int rtl8380_configure_int_rtl8218b(struct phy_device *phydev)
 	rtl838x_6275B_intPhy_perport = (void *)h + sizeof(struct fw_header) + h->parts[8].start;
 	rtl8218b_6276B_hwEsd_perport = (void *)h + sizeof(struct fw_header) + h->parts[9].start;
 
-	// Currently not used
-	// if (sw_r32(RTL838X_DMY_REG31) == 0x1) {
-	// 	int ipd_flag = 1;
-	// }
+	phydev_info(phydev, "patch\n");
 
 	val = phy_read(phydev, MII_BMCR);
 	if (val & BMCR_PDOWN)
@@ -685,27 +697,10 @@ static int rtl8380_configure_int_rtl8218b(struct phy_device *phydev)
 		rtl8380_phy_reset(phydev);
 	msleep(100);
 
-	/* Ready PHY for patch */
-	for (int port = 0; port < 8; port++) {
-		patchphy = get_package_phy(phydev, port);
-		phy_write_paged(patchphy, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
-		phy_write_paged(patchphy, RTL838X_PAGE_RAW, 0x10, 0x0010);
-	}
-	msleep(500);
-	for (int port = 0; port < 8; port++) {
-		int i;
+	ret = rtl821x_prepare_patch(phydev, 8);
+	if (ret)
+		return ret;
 
-		patchphy = get_package_phy(phydev, port);
-		for (i = 0; i < 100 ; i++) {
-			val = phy_read_paged(patchphy, RTL821X_PAGE_STATE, 0x10);
-			if (val & 0x40)
-				break;
-		}
-		if (i >= 100) {
-			phydev_err(patchphy, "not ready for patch.\n");
-			return -1;
-		}
-	}
 	for (int port = 0; port < 8; port++) {
 		int i;
 
@@ -732,23 +727,13 @@ static int rtl8380_configure_int_rtl8218b(struct phy_device *phydev)
 
 static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
 {
-	u32 val, ipd, phy_id;
-	int mac = phydev->mdio.addr;
-	struct fw_header *h;
-	u32 *rtl8380_rtl8218b_perchip;
 	u32 *rtl8218B_6276B_rtl8380_perport;
+	u32 *rtl8380_rtl8218b_perchip;
 	u32 *rtl8380_rtl8218b_perport;
 	struct phy_device *patchphy;
-
-	if (soc_info.family == RTL8380_FAMILY_ID && mac != 0 && mac != 16) {
-		phydev_err(phydev, "External RTL8218B must have PHY-IDs 0 or 16!\n");
-		return -1;
-	}
-	val = phy_read(phydev, 2);
-	phy_id = val << 16;
-	val = phy_read(phydev, 3);
-	phy_id |= val;
-	pr_info("Phy on MAC %d: %x\n", mac, phy_id);
+	struct fw_header *h;
+	u32 val, ipd;
+	int ret;
 
 	/* Read internal PHY ID */
 	phy_write_paged(phydev, 31, 27, 0x0002);
@@ -757,7 +742,6 @@ static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
 		phydev_err(phydev, "Expected external RTL8218B, found PHY-ID %x\n", val);
 		return -1;
 	}
-	phydev_info(phydev, "Detected external RTL8218B\n");
 
 	h = rtl838x_request_fw(phydev, &rtl838x_8218b_fw, FIRMWARE_838X_8218b_1);
 	if (!h)
@@ -785,7 +769,7 @@ static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
 	phy_write_paged(phydev, RTL838X_PAGE_RAW, 0x1b, 0x4);
 	val = phy_read_paged(phydev, RTL838X_PAGE_RAW, 0x1c);
 
-	phydev_info(phydev, "Detected chip revision %04x\n", val);
+	phydev_info(phydev, "patch chip revision %d\n", val);
 
 	for (int i = 0; rtl8380_rtl8218b_perchip[i * 3] &&
 	                rtl8380_rtl8218b_perchip[i * 3 + 1]; i++) {
@@ -803,30 +787,9 @@ static int rtl8380_configure_ext_rtl8218b(struct phy_device *phydev)
 	}
 	mdelay(100);
 
-	/* Request patch */
-	for (int port = 0; port < 8; port++) {
-		patchphy = get_package_phy(phydev, port);
-		phy_write_paged(patchphy, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
-		phy_write_paged(patchphy, RTL838X_PAGE_RAW, 0x10, 0x0010);
-	}
-
-	mdelay(300);
-
-	/* Verify patch readiness */
-	for (int port = 0; port < 8; port++) {
-		int i;
-
-		patchphy = get_package_phy(phydev, port);
-		for (i = 0; i < 100; i++) {
-			val = phy_read_paged(patchphy, RTL821X_PAGE_STATE, 0x10);
-			if (val & 0x40)
-				break;
-		}
-		if (i >= 100) {
-			phydev_err(patchphy, "not ready for patch.\n");
-			return -1;
-		}
-	}
+	ret = rtl821x_prepare_patch(phydev, 8);
+	if (ret)
+		return ret;
 
 	/* Use Broadcast ID method for patching */
 	rtl821x_phy_setup_package_broadcast(phydev, true);
@@ -1081,19 +1044,12 @@ static int rtl8380_configure_rtl8214c(struct phy_device *phydev)
 
 static int rtl8380_configure_rtl8214fc(struct phy_device *phydev)
 {
-	int mac = phydev->mdio.addr;
-	struct fw_header *h;
 	u32 *rtl8380_rtl8214fc_perchip;
 	u32 *rtl8380_rtl8214fc_perport;
 	struct phy_device *patchphy;
-	u32 phy_id;
+	struct fw_header *h;
 	u32 val;
-
-	val = phy_read(phydev, 2);
-	phy_id = val << 16;
-	val = phy_read(phydev, 3);
-	phy_id |= val;
-	pr_debug("Phy on MAC %d: %x\n", mac, phy_id);
+	int ret;
 
 	/* Read internal PHY id */
 	phy_write_paged(phydev, 0, RTL821XEXT_MEDIA_PAGE_SELECT, RTL821X_MEDIA_PAGE_COPPER);
@@ -1103,7 +1059,6 @@ static int rtl8380_configure_rtl8214fc(struct phy_device *phydev)
 		phydev_err(phydev, "Expected external RTL8214FC, found PHY-ID %x\n", val);
 		return -1;
 	}
-	phydev_info(phydev, "Detected external RTL8214FC\n");
 
 	h = rtl838x_request_fw(phydev, &rtl838x_8214fc_fw, FIRMWARE_838X_8214FC_1);
 	if (!h)
@@ -1114,8 +1069,9 @@ static int rtl8380_configure_rtl8214fc(struct phy_device *phydev)
 		return -1;
 	}
 
-	rtl8380_rtl8214fc_perchip = (void *)h + sizeof(struct fw_header) + h->parts[0].start;
+	phydev_info(phydev, "patch\n");
 
+	rtl8380_rtl8214fc_perchip = (void *)h + sizeof(struct fw_header) + h->parts[0].start;
 	rtl8380_rtl8214fc_perport = (void *)h + sizeof(struct fw_header) + h->parts[1].start;
 
 	/* detect phy version */
@@ -1181,29 +1137,10 @@ static int rtl8380_configure_rtl8214fc(struct phy_device *phydev)
 		}
 	}
 
-	/* Request patch */
-	for (int port = 0; port < 4; port++) {
-		patchphy = get_package_phy(phydev, port);
-		phy_write_paged(patchphy, RTL838X_PAGE_RAW, RTL8XXX_PAGE_SELECT, RTL821X_PAGE_PATCH);
-		phy_write_paged(patchphy, RTL838X_PAGE_RAW, 0x10, 0x0010);
-	}
-	mdelay(300);
-
-	/* Verify patch readiness */
-	for (int port = 0; port < 4; port++) {
-		int i;
+	ret = rtl821x_prepare_patch(phydev, 4);
+	if (ret)
+		return ret;
 
-		patchphy = get_package_phy(phydev, port);
-		for (i = 0; i < 100; i++) {
-			val = phy_read_paged(patchphy, RTL821X_PAGE_STATE, 0x10);
-			if (val & 0x40)
-				break;
-		}
-		if (i >= 100) {
-			phydev_err(patchphy, "Could not patch PHY\n");
-			return -1;
-		}
-	}
 	/* Use Broadcast ID method for patching */
 	rtl821x_phy_setup_package_broadcast(phydev, true);
 



From lede-commits at lists.infradead.org  Fri Aug 29 15:20:44 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 18:20:44 -0400
Subject: [openwrt/openwrt]  realtek: phy: late phy package patching
In-Reply-To: <175650604453.2139772.15930951781130756563@git-01.infra.openwrt.org>
References: <175650604453.2139772.15930951781130756563@git-01.infra.openwrt.org>
Message-ID: <mailman.134326.1756510572.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a1043fda8b77e096d225e43a3c6671d385d46176

commit a1043fda8b77e096d225e43a3c6671d385d46176
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Tue Aug 19 05:06:37 2025 -0400

    realtek: phy: late phy package patching
    
    Currently phy packages (like RTL8214x/RTL8218x) are patched and
    initialized as soon as the first phy of the package is found.
    In this situation the shared structure is not finalized because
    devm_phy_package_join() has only been called for the first phy.
    This is no issue as the patching directly hammers the bus addresses
    for the follow-up phys.
    
    In the future we want to simplify the package handling and allow
    to access all phy_device structures from only one phy_device of
    the package. With this we can use normal phy_read/phy_write.
    
    Switch the probing logic to "late patching". With this we will
    initialize the firmware of the package when the last phy of the
    package has been found and thus the shared structure is complete.
    
    Provide get_base_phy() as the first package helper that allows
    to determine the first phy of the package from any other phy.
    
    While we are here drop the shared structure that only repeats the
    phy name and has no other use.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19810
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.12/drivers/net/phy/rtl83xx-phy.c       | 89 ++++++----------------
 .../files-6.12/drivers/net/phy/rtl83xx-phy.h       |  4 -
 2 files changed, 25 insertions(+), 68 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index 1cf18b5ca3..01f24080b8 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -106,6 +106,11 @@ static const struct firmware rtl838x_8380_fw;
 static const struct firmware rtl838x_8214fc_fw;
 static const struct firmware rtl838x_8218b_fw;
 
+static inline struct phy_device *get_base_phy(struct phy_device *phydev)
+{
+	return mdiobus_get_phy(phydev->mdio.bus, phydev->shared->base_addr);
+}
+
 static u64 disable_polling(int port)
 {
 	u64 saved_state;
@@ -3576,20 +3581,13 @@ static const struct sfp_upstream_ops rtl8214fc_sfp_ops = {
 
 static int rtl8214fc_phy_probe(struct phy_device *phydev)
 {
-	struct device *dev = &phydev->mdio.dev;
-	int addr = phydev->mdio.addr;
+	int base_addr = phydev->mdio.addr & ~3;
 	int ret = 0;
 
-	/* All base addresses of the PHYs start at multiples of 8 */
-	devm_phy_package_join(dev, phydev, addr & (~7),
-				sizeof(struct rtl83xx_shared_private));
-
-	if (!(addr % 8)) {
-		struct rtl83xx_shared_private *shared = phydev->shared->priv;
-		shared->name = "RTL8214FC";
-		/* Configuration must be done while patching still possible */
+	devm_phy_package_join(&phydev->mdio.dev, phydev, base_addr, 0);
+	if (phydev->mdio.addr == base_addr + 3) {
 		if (soc_info.family == RTL8380_FAMILY_ID)
-			ret = rtl8380_configure_rtl8214fc(phydev);
+			ret = rtl8380_configure_rtl8214fc(get_base_phy(phydev));
 		if (ret)
 			return ret;
 	}
@@ -3599,39 +3597,23 @@ static int rtl8214fc_phy_probe(struct phy_device *phydev)
 
 static int rtl8214c_phy_probe(struct phy_device *phydev)
 {
-	struct device *dev = &phydev->mdio.dev;
-	int addr = phydev->mdio.addr;
-
-	/* All base addresses of the PHYs start at multiples of 8 */
-	devm_phy_package_join(dev, phydev, addr & (~7),
-				sizeof(struct rtl83xx_shared_private));
+	int base_addr = phydev->mdio.addr & ~3;
 
-	if (!(addr % 8)) {
-		struct rtl83xx_shared_private *shared = phydev->shared->priv;
-		shared->name = "RTL8214C";
-		/* Configuration must be done whil patching still possible */
-		return rtl8380_configure_rtl8214c(phydev);
-	}
+	devm_phy_package_join(&phydev->mdio.dev, phydev, base_addr, 0);
+	if (phydev->mdio.addr == base_addr + 3)
+		return rtl8380_configure_rtl8214c(get_base_phy(phydev));
 
 	return 0;
 }
 
 static int rtl8218b_ext_phy_probe(struct phy_device *phydev)
 {
-	struct device *dev = &phydev->mdio.dev;
-	int addr = phydev->mdio.addr;
+	int base_addr = phydev->mdio.addr & ~7;
 
-	/* All base addresses of the PHYs start at multiples of 8 */
-	devm_phy_package_join(dev, phydev, addr & (~7),
-				sizeof(struct rtl83xx_shared_private));
-
-	if (!(addr % 8)) {
-		struct rtl83xx_shared_private *shared = phydev->shared->priv;
-		shared->name = "RTL8218B (external)";
-		if (soc_info.family == RTL8380_FAMILY_ID) {
-			/* Configuration must be done while patching still possible */
-			return rtl8380_configure_ext_rtl8218b(phydev);
-		}
+	devm_phy_package_join(&phydev->mdio.dev, phydev, base_addr, 0);
+	if (phydev->mdio.addr == base_addr + 7) {
+		if (soc_info.family == RTL8380_FAMILY_ID)
+			return rtl8380_configure_ext_rtl8218b(get_base_phy(phydev));
 	}
 
 	return 0;
@@ -3639,46 +3621,25 @@ static int rtl8218b_ext_phy_probe(struct phy_device *phydev)
 
 static int rtl8218b_int_phy_probe(struct phy_device *phydev)
 {
-	struct device *dev = &phydev->mdio.dev;
-	int addr = phydev->mdio.addr;
+	int base_addr = phydev->mdio.addr & ~7;
 
 	if (soc_info.family != RTL8380_FAMILY_ID)
 		return -ENODEV;
-	if (addr >= 24)
+	if (base_addr >= 24)
 		return -ENODEV;
 
-	pr_debug("%s: id: %d\n", __func__, addr);
-	/* All base addresses of the PHYs start at multiples of 8 */
-	devm_phy_package_join(dev, phydev, addr & (~7),
-			      sizeof(struct rtl83xx_shared_private));
-
-	if (!(addr % 8)) {
-		struct rtl83xx_shared_private *shared = phydev->shared->priv;
-		shared->name = "RTL8218B (internal)";
-		/* Configuration must be done while patching still possible */
-		return rtl8380_configure_int_rtl8218b(phydev);
-	}
+	devm_phy_package_join(&phydev->mdio.dev, phydev, base_addr, 0);
+	if (phydev->mdio.addr == base_addr + 7)
+		return rtl8380_configure_int_rtl8218b(get_base_phy(phydev));
 
 	return 0;
 }
 
 static int rtl8218d_phy_probe(struct phy_device *phydev)
 {
-	struct device *dev = &phydev->mdio.dev;
-	int addr = phydev->mdio.addr;
+	int base_addr = phydev->mdio.addr & ~7;
 
-	pr_debug("%s: id: %d\n", __func__, addr);
-	/* All base addresses of the PHYs start at multiples of 8 */
-	devm_phy_package_join(dev, phydev, addr & (~7),
-			      sizeof(struct rtl83xx_shared_private));
-
-	/* All base addresses of the PHYs start at multiples of 8 */
-	if (!(addr % 8)) {
-		struct rtl83xx_shared_private *shared = phydev->shared->priv;
-		shared->name = "RTL8218D";
-		/* Configuration must be done while patching still possible */
-/* TODO:		return configure_rtl8218d(phydev); */
-	}
+	devm_phy_package_join(&phydev->mdio.dev, phydev, base_addr, 0);
 
 	return 0;
 }
diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
index 652e27a5c5..2f55fb0d90 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.h
@@ -1,9 +1,5 @@
 // SPDX-License-Identifier: GPL-2.0-only
 
-struct rtl83xx_shared_private {
-	char *name;
-};
-
 struct __attribute__ ((__packed__)) part {
 	uint16_t start;
 	uint8_t wordsize;



From lede-commits at lists.infradead.org  Fri Aug 29 15:51:55 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 18:51:55 -0400
Subject: [openwrt/openwrt]  realtek: XGS1210-12: convert RTL8226 PHYs to
 2500base-x
In-Reply-To: <175650791379.2264565.340496547547781738@git-01.infra.openwrt.org>
References: <175650791379.2264565.340496547547781738@git-01.infra.openwrt.org>
Message-ID: <mailman.134336.1756511133.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a3d681d7f5dcb6cf9142a50e6ea55f79f25d276e

commit a3d681d7f5dcb6cf9142a50e6ea55f79f25d276e
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Sun Aug 24 14:10:30 2025 -0400

    realtek: XGS1210-12: convert RTL8226 PHYs to 2500base-x
    
    We reached the point of no return. Upstream has gained the final
    bits for the RTL8226 PHYs. That means.
    
    - RTL8226 MAC side behaves like RTL8221(B)
    - It's serdes no longer uses proprietary HSGMII (2.5G SGMII)
    - Instead it dynamically switches between SGMII and 2500base-x
    
    This (partly) solves one of the central henn/egg problems of the
    Realtek target. To change the MAC/PHY interface mode both sides
    need to have all bits in place to do so. But where to start if
    so much needs to be done?
    
    Now the PHY side has created facts and it mitigates a lot of
    problems. All downstream HSGMII patches and coding can be dropped
    in the future.
    
    For now only adapt the only DTS that still maps PHYs to HSGMII.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19843
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts b/target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts
index e1f4753f23..9ff919573a 100644
--- a/target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts
+++ b/target/linux/realtek/dts/rtl9302_zyxel_xgs1210-12.dts
@@ -290,14 +290,14 @@
 		port at 24 {
 			reg = <24>;
 			label = "lan9";
-			phy-mode = "hsgmii";
+			phy-mode = "2500base-x";
 			phy-handle = <&phy24>;
 			led-set = <1>;
 		};
 		port at 25 {
 			reg = <25>;
 			label = "lan10";
-			phy-mode = "hsgmii";
+			phy-mode = "2500base-x";
 			phy-handle = <&phy25>;
 			led-set = <1>;
 		};



From lede-commits at lists.infradead.org  Fri Aug 29 15:51:56 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 18:51:56 -0400
Subject: [openwrt/openwrt]  generic: fix c45 soft reset for RTL8221B
In-Reply-To: <175650791379.2264565.340496547547781738@git-01.infra.openwrt.org>
References: <175650791379.2264565.340496547547781738@git-01.infra.openwrt.org>
Message-ID: <mailman.134337.1756511133.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a43330799b73522045335bb44c6808e931936022

commit a43330799b73522045335bb44c6808e931936022
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Wed Aug 27 13:51:55 2025 -0400

    generic: fix c45 soft reset for RTL8221B
    
    The addition of the soft_reset() function to the RTL8221B PHYs
    missed to take care of C22/C45 standalone PHY versions. Especially
    on RTL930x switch devices with these PHY the reset fails for the
    C45 operation mode. This comes from the fact that the mdio bus
    disables C22 read/writes when being set to C45.
    
    Upstream has gained a proper C45 reset function. Use it for the
    C45 PHY models.
    
    Fixes: 7e3284eef7f ("generic: use genphy_soft_reset for RealTek 2.5G PHYs")
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19843
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch  | 4 ++--
 .../720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch        | 4 ++--
 .../720-08-net-phy-realtek-work-around-broken-serdes.patch            | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch b/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch
index abe7478a65..9bb5737b39 100644
--- a/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch
+++ b/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch
@@ -51,7 +51,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	}, {
  		.match_phy_device = rtl8221b_vb_cg_c45_match_phy_device,
  		.name           = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
-+		.soft_reset     = genphy_soft_reset,
++		.soft_reset     = rtl822x_c45_soft_reset,
  		.probe		= rtl822x_probe,
  		.config_init    = rtl822xb_config_init,
  		.get_rate_matching = rtl822xb_get_rate_matching,
@@ -67,7 +67,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	}, {
  		.match_phy_device = rtl8221b_vn_cg_c45_match_phy_device,
  		.name           = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
-+		.soft_reset     = genphy_soft_reset,
++		.soft_reset     = rtl822x_c45_soft_reset,
  		.probe		= rtl822x_probe,
  		.config_init    = rtl822xb_config_init,
  		.get_rate_matching = rtl822xb_get_rate_matching,
diff --git a/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch b/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
index bac46cbeef..855ea41c8c 100644
--- a/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
+++ b/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
@@ -79,7 +79,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  		.name           = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
 +		.config_intr	= rtl8221b_config_intr,
 +		.handle_interrupt = rtl8221b_handle_interrupt,
- 		.soft_reset     = genphy_soft_reset,
+ 		.soft_reset     = rtl822x_c45_soft_reset,
  		.probe		= rtl822x_probe,
  		.config_init    = rtl822xb_config_init,
 @@ -1800,6 +1849,8 @@ static struct phy_driver realtek_drvs[]
@@ -97,6 +97,6 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  		.name           = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
 +		.config_intr	= rtl8221b_config_intr,
 +		.handle_interrupt = rtl8221b_handle_interrupt,
- 		.soft_reset     = genphy_soft_reset,
+ 		.soft_reset     = rtl822x_c45_soft_reset,
  		.probe		= rtl822x_probe,
  		.config_init    = rtl822xb_config_init,
diff --git a/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch b/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch
index ceb67c2379..e451d13bd8 100644
--- a/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch
+++ b/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch
@@ -40,7 +40,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  {
 @@ -1842,7 +1858,7 @@ static struct phy_driver realtek_drvs[]
  		.handle_interrupt = rtl8221b_handle_interrupt,
- 		.soft_reset     = genphy_soft_reset,
+ 		.soft_reset     = rtl822x_c45_soft_reset,
  		.probe		= rtl822x_probe,
 -		.config_init    = rtl822xb_config_init,
 +		.config_init    = rtl822xb_config_init_war,
@@ -49,7 +49,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.config_aneg    = rtl822x_c45_config_aneg,
 @@ -1872,7 +1888,7 @@ static struct phy_driver realtek_drvs[]
  		.handle_interrupt = rtl8221b_handle_interrupt,
- 		.soft_reset     = genphy_soft_reset,
+ 		.soft_reset     = rtl822x_c45_soft_reset,
  		.probe		= rtl822x_probe,
 -		.config_init    = rtl822xb_config_init,
 +		.config_init    = rtl822xb_config_init_war,



From lede-commits at lists.infradead.org  Fri Aug 29 15:51:54 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 18:51:54 -0400
Subject: [openwrt/openwrt]  generic: backport upstream v6.18 Realtek PHY patch
In-Reply-To: <175650791379.2264565.340496547547781738@git-01.infra.openwrt.org>
References: <175650791379.2264565.340496547547781738@git-01.infra.openwrt.org>
Message-ID: <mailman.134338.1756511133.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1673390905620e85c954ca87ea07de74d89cf920

commit 1673390905620e85c954ca87ea07de74d89cf920
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Sun Aug 24 05:23:13 2025 -0400

    generic: backport upstream v6.18 Realtek PHY patch
    
    3a752e678 net: phy: realtek: enable serdes option mode for RTL8226-CG
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19843
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...-enable-serdes-option-mode-for-RTL8226-CG.patch | 92 ++++++++++++++++++++++
 ...altek-use-genphy_soft_reset-for-2.5G-PHYs.patch | 14 ++--
 ...ek-disable-SGMII-in-band-AN-for-2-5G-PHYs.patch | 48 +++++++----
 ...ltek-make-sure-paged-read-is-protected-by.patch |  2 +-
 .../720-04-net-phy-realtek-setup-aldps.patch       |  6 +-
 ...-realtek-detect-early-version-of-RTL8221B.patch |  2 +-
 ...phy-realtek-support-interrupt-of-RTL8221B.patch | 10 +--
 ...phy-realtek-mark-existing-MMDs-as-present.patch |  2 +-
 ...net-phy-realtek-work-around-broken-serdes.patch |  8 +-
 ...09-net-phy-realtek-disable-MDIO-broadcast.patch |  2 +-
 10 files changed, 147 insertions(+), 39 deletions(-)

diff --git a/target/linux/generic/backport-6.12/781-29-v6.18-net-phy-realtek-enable-serdes-option-mode-for-RTL8226-CG.patch b/target/linux/generic/backport-6.12/781-29-v6.18-net-phy-realtek-enable-serdes-option-mode-for-RTL8226-CG.patch
new file mode 100644
index 0000000000..9ffb260df1
--- /dev/null
+++ b/target/linux/generic/backport-6.12/781-29-v6.18-net-phy-realtek-enable-serdes-option-mode-for-RTL8226-CG.patch
@@ -0,0 +1,92 @@
+From 3a752e67800106a5c42d802d67e06c60aa71d07b Mon Sep 17 00:00:00 2001
+From: Markus Stockhausen <markus.stockhausen at gmx.de>
+Date: Fri, 15 Aug 2025 04:20:09 -0400
+Subject: net: phy: realtek: enable serdes option mode for RTL8226-CG
+
+The RTL8226-CG can make use of the serdes option mode feature to
+dynamically switch between SGMII and 2500base-X. From what is
+known the setup sequence is much simpler with no magic values.
+
+Convert the exiting config_init() into a helper that configures
+the PHY depending on generation 1 or 2. Call the helper from two
+separated new config_init() functions.
+
+Finally convert the phy_driver specs of the RTL8226-CG to make
+use of the new configuration and switch over to the extended
+read_status() function to dynamically change the interface
+according to the serdes mode.
+
+Remark! The logic could be simpler if the serdes mode could be
+set before all other generation 2 magic values. Due to missing
+RTL8221B test hardware the mmd command order was kept.
+
+Tested on Zyxel XGS1210-12.
+
+Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
+Link: https://patch.msgid.link/20250815082009.3678865-1-markus.stockhausen at gmx.de
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/phy/realtek/realtek_main.c | 26 ++++++++++++++++++++------
+ 1 file changed, 20 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/phy/realtek/realtek_main.c
++++ b/drivers/net/phy/realtek/realtek_main.c
+@@ -1032,7 +1032,7 @@ static int rtl822x_probe(struct phy_devi
+ 	return 0;
+ }
+ 
+-static int rtl822xb_config_init(struct phy_device *phydev)
++static int rtl822x_set_serdes_option_mode(struct phy_device *phydev, bool gen1)
+ {
+ 	bool has_2500, has_sgmii;
+ 	u16 mode;
+@@ -1067,15 +1067,18 @@ static int rtl822xb_config_init(struct p
+ 	/* the following sequence with magic numbers sets up the SerDes
+ 	 * option mode
+ 	 */
+-	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x75f3, 0);
+-	if (ret < 0)
+-		return ret;
++
++	if (!gen1) {
++		ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x75f3, 0);
++		if (ret < 0)
++			return ret;
++	}
+ 
+ 	ret = phy_modify_mmd_changed(phydev, MDIO_MMD_VEND1,
+ 				     RTL822X_VND1_SERDES_OPTION,
+ 				     RTL822X_VND1_SERDES_OPTION_MODE_MASK,
+ 				     mode);
+-	if (ret < 0)
++	if (gen1 || ret < 0)
+ 		return ret;
+ 
+ 	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x6a04, 0x0503);
+@@ -1089,6 +1092,16 @@ static int rtl822xb_config_init(struct p
+ 	return phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x6f11, 0x8020);
+ }
+ 
++static int rtl822x_config_init(struct phy_device *phydev)
++{
++	return rtl822x_set_serdes_option_mode(phydev, true);
++}
++
++static int rtl822xb_config_init(struct phy_device *phydev)
++{
++	return rtl822x_set_serdes_option_mode(phydev, false);
++}
++
+ static int rtl822xb_get_rate_matching(struct phy_device *phydev,
+ 				      phy_interface_t iface)
+ {
+@@ -1678,7 +1691,8 @@ static struct phy_driver realtek_drvs[]
+ 		.soft_reset     = rtl822x_c45_soft_reset,
+ 		.get_features   = rtl822x_c45_get_features,
+ 		.config_aneg    = rtl822x_c45_config_aneg,
+-		.read_status    = rtl822x_c45_read_status,
++		.config_init    = rtl822x_config_init,
++		.read_status    = rtl822xb_c45_read_status,
+ 		.suspend        = genphy_c45_pma_suspend,
+ 		.resume         = rtlgen_c45_resume,
+ 	}, {
diff --git a/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch b/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch
index 5b335ba888..abe7478a65 100644
--- a/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch
+++ b/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch
@@ -15,7 +15,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/phy/realtek/realtek_main.c
 +++ b/drivers/net/phy/realtek/realtek_main.c
-@@ -1653,6 +1653,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1666,6 +1666,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.name		= "RTL8226 2.5Gbps PHY",
  		.match_phy_device = rtl8226_match_phy_device,
@@ -23,7 +23,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.get_features	= rtl822x_get_features,
  		.config_aneg	= rtl822x_config_aneg,
  		.read_status	= rtl822x_read_status,
-@@ -1663,6 +1664,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1676,6 +1677,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_match_phy_device,
  		.name		= "RTL8226B_RTL8221B 2.5Gbps PHY",
@@ -31,7 +31,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.get_features	= rtl822x_get_features,
  		.config_aneg	= rtl822x_config_aneg,
  		.config_init    = rtl822xb_config_init,
-@@ -1684,6 +1686,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1698,6 +1700,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		PHY_ID_MATCH_EXACT(0x001cc848),
  		.name           = "RTL8226B-CG_RTL8221B-CG 2.5Gbps PHY",
@@ -39,7 +39,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.get_features   = rtl822x_get_features,
  		.config_aneg    = rtl822x_config_aneg,
  		.config_init    = rtl822xb_config_init,
-@@ -1696,6 +1699,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1710,6 +1713,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vb_cg_c22_match_phy_device,
  		.name           = "RTL8221B-VB-CG 2.5Gbps PHY (C22)",
@@ -47,7 +47,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.probe		= rtl822x_probe,
  		.get_features   = rtl822x_get_features,
  		.config_aneg    = rtl822x_config_aneg,
-@@ -1709,6 +1713,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1723,6 +1727,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vb_cg_c45_match_phy_device,
  		.name           = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
@@ -55,7 +55,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.probe		= rtl822x_probe,
  		.config_init    = rtl822xb_config_init,
  		.get_rate_matching = rtl822xb_get_rate_matching,
-@@ -1720,6 +1725,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1734,6 +1739,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vn_cg_c22_match_phy_device,
  		.name           = "RTL8221B-VM-CG 2.5Gbps PHY (C22)",
@@ -63,7 +63,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.probe		= rtl822x_probe,
  		.get_features   = rtl822x_get_features,
  		.config_aneg    = rtl822x_config_aneg,
-@@ -1733,6 +1739,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1747,6 +1753,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vn_cg_c45_match_phy_device,
  		.name           = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
diff --git a/target/linux/generic/pending-6.12/720-02-net-phy-realtek-disable-SGMII-in-band-AN-for-2-5G-PHYs.patch b/target/linux/generic/pending-6.12/720-02-net-phy-realtek-disable-SGMII-in-band-AN-for-2-5G-PHYs.patch
index e11a7984d4..e1d9808747 100644
--- a/target/linux/generic/pending-6.12/720-02-net-phy-realtek-disable-SGMII-in-band-AN-for-2-5G-PHYs.patch
+++ b/target/linux/generic/pending-6.12/720-02-net-phy-realtek-disable-SGMII-in-band-AN-for-2-5G-PHYs.patch
@@ -21,7 +21,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 --- a/drivers/net/phy/realtek/realtek_main.c
 +++ b/drivers/net/phy/realtek/realtek_main.c
 @@ -1035,8 +1035,8 @@ static int rtl822x_probe(struct phy_devi
- static int rtl822xb_config_init(struct phy_device *phydev)
+ static int rtl822x_set_serdes_option_mode(struct phy_device *phydev, bool gen1)
  {
  	bool has_2500, has_sgmii;
 +	int ret, val;
@@ -30,15 +30,28 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  	has_2500 = test_bit(PHY_INTERFACE_MODE_2500BASEX,
  			    phydev->host_interfaces) ||
-@@ -1086,7 +1086,29 @@ static int rtl822xb_config_init(struct p
- 	if (ret < 0)
- 		return ret;
- 
--	return phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x6f11, 0x8020);
-+	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x6f11, 0x8020);
+@@ -1078,18 +1078,42 @@ static int rtl822x_set_serdes_option_mod
+ 				     RTL822X_VND1_SERDES_OPTION,
+ 				     RTL822X_VND1_SERDES_OPTION_MODE_MASK,
+ 				     mode);
+-	if (gen1 || ret < 0)
 +	if (ret < 0)
 +		return ret;
 +
++	if (!gen1) {
++		ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x6a04, 0x0503);
++		if (ret < 0)
++			return ret;
++
++		ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x6f10, 0xd455);
++		if (ret < 0)
++			return ret;
++
++		ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x6f11, 0x8020);
++		if (ret < 0)
++			return ret;
++	}
++
 +	/* Disable SGMII AN */
 +	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x7588, 0x2);
 +	if (ret < 0)
@@ -46,18 +59,21 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 +
 +	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x7589, 0x71d0);
 +	if (ret < 0)
-+		return ret;
-+
+ 		return ret;
+ 
+-	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x6a04, 0x0503);
 +	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x7587, 0x3);
-+	if (ret < 0)
-+		return ret;
-+
+ 	if (ret < 0)
+ 		return ret;
+ 
+-	ret = phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x6f10, 0xd455);
 +	ret = phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND1, 0x7587,
 +					val, !(val & BIT(0)), 500, 100000, false);
-+	if (ret < 0)
-+		return ret;
-+
+ 	if (ret < 0)
+ 		return ret;
+ 
+-	return phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x6f11, 0x8020);
 +	return 0;
  }
  
- static int rtl822xb_get_rate_matching(struct phy_device *phydev,
+ static int rtl822x_config_init(struct phy_device *phydev)
diff --git a/target/linux/generic/pending-6.12/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch b/target/linux/generic/pending-6.12/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch
index 085fad99cc..74bf74e012 100644
--- a/target/linux/generic/pending-6.12/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch
+++ b/target/linux/generic/pending-6.12/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch
@@ -18,7 +18,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/phy/realtek/realtek_main.c
 +++ b/drivers/net/phy/realtek/realtek_main.c
-@@ -1328,9 +1328,11 @@ static bool rtlgen_supports_2_5gbps(stru
+@@ -1343,9 +1343,11 @@ static bool rtlgen_supports_2_5gbps(stru
  {
  	int val;
  
diff --git a/target/linux/generic/pending-6.12/720-04-net-phy-realtek-setup-aldps.patch b/target/linux/generic/pending-6.12/720-04-net-phy-realtek-setup-aldps.patch
index b36e54717d..6d1bf08600 100644
--- a/target/linux/generic/pending-6.12/720-04-net-phy-realtek-setup-aldps.patch
+++ b/target/linux/generic/pending-6.12/720-04-net-phy-realtek-setup-aldps.patch
@@ -24,9 +24,9 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  #define RTL8366RB_POWER_SAVE			0x15
  #define RTL8366RB_POWER_SAVE_ON			BIT(12)
  
-@@ -1090,6 +1094,15 @@ static int rtl822xb_config_init(struct p
- 	if (ret < 0)
- 		return ret;
+@@ -1095,6 +1099,15 @@ static int rtl822x_set_serdes_option_mod
+ 			return ret;
+ 	}
  
 +	if (of_property_read_bool(phydev->mdio.dev.of_node, "realtek,aldps-enable"))
 +		ret = phy_set_bits_mmd(phydev, MDIO_MMD_VEND1, RTL8221B_PHYCR1,
diff --git a/target/linux/generic/pending-6.12/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch b/target/linux/generic/pending-6.12/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch
index 29706fa630..4e07882b1e 100644
--- a/target/linux/generic/pending-6.12/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch
+++ b/target/linux/generic/pending-6.12/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch
@@ -14,7 +14,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
 --- a/drivers/net/phy/realtek/realtek_main.c
 +++ b/drivers/net/phy/realtek/realtek_main.c
-@@ -1383,10 +1383,32 @@ static int rtl8226_match_phy_device(stru
+@@ -1398,10 +1398,32 @@ static int rtl8226_match_phy_device(stru
  static int rtlgen_is_c45_match(struct phy_device *phydev, unsigned int id,
  			       bool is_c45)
  {
diff --git a/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch b/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
index 41d6efafb3..bac46cbeef 100644
--- a/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
+++ b/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
@@ -12,7 +12,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
 
 --- a/drivers/net/phy/realtek/realtek_main.c
 +++ b/drivers/net/phy/realtek/realtek_main.c
-@@ -1595,6 +1595,51 @@ static irqreturn_t rtl9000a_handle_inter
+@@ -1610,6 +1610,51 @@ static irqreturn_t rtl9000a_handle_inter
  	return IRQ_HANDLED;
  }
  
@@ -64,7 +64,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  static struct phy_driver realtek_drvs[] = {
  	{
  		PHY_ID_MATCH_EXACT(0x00008201),
-@@ -1758,6 +1803,8 @@ static struct phy_driver realtek_drvs[]
+@@ -1774,6 +1819,8 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vb_cg_c22_match_phy_device,
  		.name           = "RTL8221B-VB-CG 2.5Gbps PHY (C22)",
@@ -73,7 +73,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  		.soft_reset     = genphy_soft_reset,
  		.probe		= rtl822x_probe,
  		.get_features   = rtl822x_get_features,
-@@ -1772,6 +1819,8 @@ static struct phy_driver realtek_drvs[]
+@@ -1788,6 +1835,8 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vb_cg_c45_match_phy_device,
  		.name           = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
@@ -82,7 +82,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  		.soft_reset     = genphy_soft_reset,
  		.probe		= rtl822x_probe,
  		.config_init    = rtl822xb_config_init,
-@@ -1784,6 +1833,8 @@ static struct phy_driver realtek_drvs[]
+@@ -1800,6 +1849,8 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vn_cg_c22_match_phy_device,
  		.name           = "RTL8221B-VM-CG 2.5Gbps PHY (C22)",
@@ -91,7 +91,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  		.soft_reset     = genphy_soft_reset,
  		.probe		= rtl822x_probe,
  		.get_features   = rtl822x_get_features,
-@@ -1798,6 +1849,8 @@ static struct phy_driver realtek_drvs[]
+@@ -1814,6 +1865,8 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vn_cg_c45_match_phy_device,
  		.name           = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
diff --git a/target/linux/generic/pending-6.12/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch b/target/linux/generic/pending-6.12/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch
index 20bd666fd2..4441a5039e 100644
--- a/target/linux/generic/pending-6.12/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch
+++ b/target/linux/generic/pending-6.12/720-07-net-phy-realtek-mark-existing-MMDs-as-present.patch
@@ -15,7 +15,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/phy/realtek/realtek_main.c
 +++ b/drivers/net/phy/realtek/realtek_main.c
-@@ -1244,6 +1244,9 @@ static int rtl822x_c45_get_features(stru
+@@ -1259,6 +1259,9 @@ static int rtl822x_c45_get_features(stru
  	linkmode_set_bit(ETHTOOL_LINK_MODE_TP_BIT,
  			 phydev->supported);
  
diff --git a/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch b/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch
index 3eada2d5ad..ceb67c2379 100644
--- a/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch
+++ b/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch
@@ -15,8 +15,8 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 ---
 --- a/drivers/net/phy/realtek/realtek_main.c
 +++ b/drivers/net/phy/realtek/realtek_main.c
-@@ -1124,6 +1124,22 @@ static int rtl822xb_config_init(struct p
- 	return 0;
+@@ -1139,6 +1139,22 @@ static int rtl822xb_config_init(struct p
+ 	return rtl822x_set_serdes_option_mode(phydev, false);
  }
  
 +static int rtl822xb_config_init_war(struct phy_device *phydev)
@@ -38,7 +38,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static int rtl822xb_get_rate_matching(struct phy_device *phydev,
  				      phy_interface_t iface)
  {
-@@ -1826,7 +1842,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1842,7 +1858,7 @@ static struct phy_driver realtek_drvs[]
  		.handle_interrupt = rtl8221b_handle_interrupt,
  		.soft_reset     = genphy_soft_reset,
  		.probe		= rtl822x_probe,
@@ -47,7 +47,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.get_rate_matching = rtl822xb_get_rate_matching,
  		.get_features   = rtl822x_c45_get_features,
  		.config_aneg    = rtl822x_c45_config_aneg,
-@@ -1856,7 +1872,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1872,7 +1888,7 @@ static struct phy_driver realtek_drvs[]
  		.handle_interrupt = rtl8221b_handle_interrupt,
  		.soft_reset     = genphy_soft_reset,
  		.probe		= rtl822x_probe,
diff --git a/target/linux/generic/pending-6.12/720-09-net-phy-realtek-disable-MDIO-broadcast.patch b/target/linux/generic/pending-6.12/720-09-net-phy-realtek-disable-MDIO-broadcast.patch
index bb20750033..24db18c2a7 100644
--- a/target/linux/generic/pending-6.12/720-09-net-phy-realtek-disable-MDIO-broadcast.patch
+++ b/target/linux/generic/pending-6.12/720-09-net-phy-realtek-disable-MDIO-broadcast.patch
@@ -13,7 +13,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 ---
 --- a/drivers/net/phy/realtek/realtek_main.c
 +++ b/drivers/net/phy/realtek/realtek_main.c
-@@ -1050,6 +1050,11 @@ static int rtl822xb_config_init(struct p
+@@ -1050,6 +1050,11 @@ static int rtl822x_set_serdes_option_mod
  			     phydev->host_interfaces) ||
  		    phydev->interface == PHY_INTERFACE_MODE_SGMII;
  



From lede-commits at lists.infradead.org  Fri Aug 29 15:51:53 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 18:51:53 -0400
Subject: [openwrt/openwrt]  generic: backport upstream v6.18 Realtek PHY patch
In-Reply-To: <175650791379.2264565.340496547547781738@git-01.infra.openwrt.org>
References: <175650791379.2264565.340496547547781738@git-01.infra.openwrt.org>
Message-ID: <mailman.134341.1756511133.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/92a3dd9a9674b2e12610e0792feea366f9f754d6

commit 92a3dd9a9674b2e12610e0792feea366f9f754d6
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Sun Aug 24 03:51:59 2025 -0400

    generic: backport upstream v6.18 Realtek PHY patch
    
    34167f1a0 net: phy: realtek: convert RTL8226-CG to c45 only
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19843
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...hy-realtek-convert-RTL8226-CG-to-c45-only.patch | 169 +++++++++++++++++++++
 ...altek-use-genphy_soft_reset-for-2.5G-PHYs.patch |  22 +--
 ...ltek-make-sure-paged-read-is-protected-by.patch |   2 +-
 ...-realtek-detect-early-version-of-RTL8221B.patch |   2 +-
 ...phy-realtek-support-interrupt-of-RTL8221B.patch |  10 +-
 ...net-phy-realtek-work-around-broken-serdes.patch |   4 +-
 6 files changed, 185 insertions(+), 24 deletions(-)

diff --git a/target/linux/generic/backport-6.12/781-28-v6.18-net-phy-realtek-convert-RTL8226-CG-to-c45-only.patch b/target/linux/generic/backport-6.12/781-28-v6.18-net-phy-realtek-convert-RTL8226-CG-to-c45-only.patch
new file mode 100644
index 0000000000..43f2c7b82c
--- /dev/null
+++ b/target/linux/generic/backport-6.12/781-28-v6.18-net-phy-realtek-convert-RTL8226-CG-to-c45-only.patch
@@ -0,0 +1,169 @@
+From 34167f1a024d2c5abae0b0325a6d0b8257160f86 Mon Sep 17 00:00:00 2001
+From: Markus Stockhausen <markus.stockhausen at gmx.de>
+Date: Wed, 13 Aug 2025 01:44:07 -0400
+Subject: net: phy: realtek: convert RTL8226-CG to c45 only
+
+Short: Convert the RTL8226-CG to c45 so it can be used in its
+Realtek based ecosystems.
+
+Long: The RTL8226-CG can be mainly found on devices of the
+Realtek Otto switch platform. Devices like the Zyxel XGS1210-12
+are based on it. These implement a hardware based phy polling
+in the background to update SoC status registers.
+
+The hardware provides 4 smi busses where phys are attached to.
+For each bus one can decide if it is polled in c45 or c22 mode.
+See https://svanheule.net/realtek/longan/register/smi_glb_ctrl
+With this setting the register access will be limited by the
+hardware. This is very complex (including caching and special
+c45-over-c22 handling). But basically it boils down to "enable
+protocol x and SoC will disable register access via protocol y".
+
+Mainline already gained support for the rtl9300 mdio driver
+in commit 24e31e474769 ("net: mdio: Add RTL9300 MDIO driver").
+
+It covers the basic features, but a lot effort is still needed
+to understand hardware properly. So it runs a simple setup by
+selecting the proper bus mode during startup.
+
+	/* Put the interfaces into C45 mode if required */
+	glb_ctrl_mask = GENMASK(19, 16);
+	for (i = 0; i < MAX_SMI_BUSSES; i++)
+		if (priv->smi_bus_is_c45[i])
+			glb_ctrl_val |= GLB_CTRL_INTF_SEL(i);
+	...
+	err = regmap_update_bits(regmap, SMI_GLB_CTRL,
+				 glb_ctrl_mask, glb_ctrl_val);
+
+To avoid complex coding later on, it limits access by only
+providing either c22 or c45:
+
+	bus->name = "Realtek Switch MDIO Bus";
+	if (priv->smi_bus_is_c45[mdio_bus]) {
+		bus->read_c45 = rtl9300_mdio_read_c45;
+		bus->write_c45 =  rtl9300_mdio_write_c45;
+	} else {
+		bus->read = rtl9300_mdio_read_c22;
+		bus->write = rtl9300_mdio_write_c22;
+	}
+
+Because of these limitations the existing RTL8226 phy driver
+is not working at all on Realtek switches. Convert the driver
+to c45-only.
+
+Luckily the RTL8226 seems to support proper MDIO_PMA_EXTABLE
+flags. So standard function genphy_c45_pma_read_abilities() can
+call genphy_c45_pma_read_ext_abilities() and 10/100/1000 is
+populated right. Thus conversion is straight forward.
+
+Outputs before - REMARK: For this a "hacked" bus was used that
+toggles the mode for each c22/c45 access. But that is slow and
+produces unstable data in the SoC status registers).
+
+Settings for lan9:
+        Supported ports: [ TP MII ]
+        Supported link modes:   10baseT/Half 10baseT/Full
+                                100baseT/Half 100baseT/Full
+                                1000baseT/Full
+                                2500baseT/Full
+        Supported pause frame use: Symmetric Receive-only
+        Supports auto-negotiation: Yes
+        Supported FEC modes: Not reported
+        Advertised link modes:  10baseT/Half 10baseT/Full
+                                100baseT/Half 100baseT/Full
+                                1000baseT/Full
+                                2500baseT/Full
+        Advertised pause frame use: Symmetric Receive-only
+        Advertised auto-negotiation: Yes
+        Advertised FEC modes: Not reported
+        Speed: Unknown!
+        Duplex: Unknown! (255)
+        Port: Twisted Pair
+        PHYAD: 24
+        Transceiver: external
+        Auto-negotiation: on
+        MDI-X: Unknown
+        Supports Wake-on: d
+        Wake-on: d
+        Link detected: no
+
+Outputs with this commit:
+
+Settings for lan9:
+        Supported ports: [ TP ]
+        Supported link modes:   10baseT/Half 10baseT/Full
+                                100baseT/Half 100baseT/Full
+                                1000baseT/Full
+                                2500baseT/Full
+        Supported pause frame use: Symmetric Receive-only
+        Supports auto-negotiation: Yes
+        Supported FEC modes: Not reported
+        Advertised link modes:  10baseT/Half 10baseT/Full
+                                100baseT/Half 100baseT/Full
+                                1000baseT/Full
+                                2500baseT/Full
+        Advertised pause frame use: Symmetric Receive-only
+        Advertised auto-negotiation: Yes
+        Advertised FEC modes: Not reported
+        Speed: Unknown!
+        Duplex: Unknown! (255)
+        Port: Twisted Pair
+        PHYAD: 24
+        Transceiver: external
+        Auto-negotiation: on
+        MDI-X: Unknown
+        Supports Wake-on: d
+        Wake-on: d
+        Link detected: no
+
+Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
+Link: https://patch.msgid.link/20250813054407.1108285-1-markus.stockhausen at gmx.de
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/phy/realtek/realtek_main.c | 28 +++++++++++++++++++++-------
+ 1 file changed, 21 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/phy/realtek/realtek_main.c
++++ b/drivers/net/phy/realtek/realtek_main.c
+@@ -1274,6 +1274,21 @@ static int rtl822x_c45_read_status(struc
+ 	return 0;
+ }
+ 
++static int rtl822x_c45_soft_reset(struct phy_device *phydev)
++{
++	int ret, val;
++
++	ret = phy_modify_mmd(phydev, MDIO_MMD_PMAPMD, MDIO_CTRL1,
++			     MDIO_CTRL1_RESET, MDIO_CTRL1_RESET);
++	if (ret < 0)
++		return ret;
++
++	return phy_read_mmd_poll_timeout(phydev, MDIO_MMD_PMAPMD,
++					 MDIO_CTRL1, val,
++					 !(val & MDIO_CTRL1_RESET),
++					 5000, 100000, true);
++}
++
+ static int rtl822xb_c45_read_status(struct phy_device *phydev)
+ {
+ 	int ret;
+@@ -1660,13 +1675,12 @@ static struct phy_driver realtek_drvs[]
+ 	}, {
+ 		PHY_ID_MATCH_EXACT(0x001cc838),
+ 		.name           = "RTL8226-CG 2.5Gbps PHY",
+-		.get_features   = rtl822x_get_features,
+-		.config_aneg    = rtl822x_config_aneg,
+-		.read_status    = rtl822x_read_status,
+-		.suspend        = genphy_suspend,
+-		.resume         = rtlgen_resume,
+-		.read_page      = rtl821x_read_page,
+-		.write_page     = rtl821x_write_page,
++		.soft_reset     = rtl822x_c45_soft_reset,
++		.get_features   = rtl822x_c45_get_features,
++		.config_aneg    = rtl822x_c45_config_aneg,
++		.read_status    = rtl822x_c45_read_status,
++		.suspend        = genphy_c45_pma_suspend,
++		.resume         = rtlgen_c45_resume,
+ 	}, {
+ 		PHY_ID_MATCH_EXACT(0x001cc848),
+ 		.name           = "RTL8226B-CG_RTL8221B-CG 2.5Gbps PHY",
diff --git a/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch b/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch
index 1becba6da6..5b335ba888 100644
--- a/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch
+++ b/target/linux/generic/pending-6.12/720-01-net-phy-realtek-use-genphy_soft_reset-for-2.5G-PHYs.patch
@@ -15,7 +15,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/phy/realtek/realtek_main.c
 +++ b/drivers/net/phy/realtek/realtek_main.c
-@@ -1638,6 +1638,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1653,6 +1653,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.name		= "RTL8226 2.5Gbps PHY",
  		.match_phy_device = rtl8226_match_phy_device,
@@ -23,7 +23,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.get_features	= rtl822x_get_features,
  		.config_aneg	= rtl822x_config_aneg,
  		.read_status	= rtl822x_read_status,
-@@ -1648,6 +1649,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1663,6 +1664,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_match_phy_device,
  		.name		= "RTL8226B_RTL8221B 2.5Gbps PHY",
@@ -31,15 +31,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.get_features	= rtl822x_get_features,
  		.config_aneg	= rtl822x_config_aneg,
  		.config_init    = rtl822xb_config_init,
-@@ -1660,6 +1662,7 @@ static struct phy_driver realtek_drvs[]
- 	}, {
- 		PHY_ID_MATCH_EXACT(0x001cc838),
- 		.name           = "RTL8226-CG 2.5Gbps PHY",
-+		.soft_reset     = genphy_soft_reset,
- 		.get_features   = rtl822x_get_features,
- 		.config_aneg    = rtl822x_config_aneg,
- 		.read_status    = rtl822x_read_status,
-@@ -1670,6 +1673,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1684,6 +1686,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		PHY_ID_MATCH_EXACT(0x001cc848),
  		.name           = "RTL8226B-CG_RTL8221B-CG 2.5Gbps PHY",
@@ -47,7 +39,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.get_features   = rtl822x_get_features,
  		.config_aneg    = rtl822x_config_aneg,
  		.config_init    = rtl822xb_config_init,
-@@ -1682,6 +1686,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1696,6 +1699,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vb_cg_c22_match_phy_device,
  		.name           = "RTL8221B-VB-CG 2.5Gbps PHY (C22)",
@@ -55,7 +47,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.probe		= rtl822x_probe,
  		.get_features   = rtl822x_get_features,
  		.config_aneg    = rtl822x_config_aneg,
-@@ -1695,6 +1700,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1709,6 +1713,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vb_cg_c45_match_phy_device,
  		.name           = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
@@ -63,7 +55,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.probe		= rtl822x_probe,
  		.config_init    = rtl822xb_config_init,
  		.get_rate_matching = rtl822xb_get_rate_matching,
-@@ -1706,6 +1712,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1720,6 +1725,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vn_cg_c22_match_phy_device,
  		.name           = "RTL8221B-VM-CG 2.5Gbps PHY (C22)",
@@ -71,7 +63,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.probe		= rtl822x_probe,
  		.get_features   = rtl822x_get_features,
  		.config_aneg    = rtl822x_config_aneg,
-@@ -1719,6 +1726,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1733,6 +1739,7 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vn_cg_c45_match_phy_device,
  		.name           = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
diff --git a/target/linux/generic/pending-6.12/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch b/target/linux/generic/pending-6.12/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch
index e6656445db..085fad99cc 100644
--- a/target/linux/generic/pending-6.12/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch
+++ b/target/linux/generic/pending-6.12/720-03-net-phy-realtek-make-sure-paged-read-is-protected-by.patch
@@ -18,7 +18,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/phy/realtek/realtek_main.c
 +++ b/drivers/net/phy/realtek/realtek_main.c
-@@ -1313,9 +1313,11 @@ static bool rtlgen_supports_2_5gbps(stru
+@@ -1328,9 +1328,11 @@ static bool rtlgen_supports_2_5gbps(stru
  {
  	int val;
  
diff --git a/target/linux/generic/pending-6.12/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch b/target/linux/generic/pending-6.12/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch
index 0918794d87..29706fa630 100644
--- a/target/linux/generic/pending-6.12/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch
+++ b/target/linux/generic/pending-6.12/720-05-net-phy-realtek-detect-early-version-of-RTL8221B.patch
@@ -14,7 +14,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
 --- a/drivers/net/phy/realtek/realtek_main.c
 +++ b/drivers/net/phy/realtek/realtek_main.c
-@@ -1368,10 +1368,32 @@ static int rtl8226_match_phy_device(stru
+@@ -1383,10 +1383,32 @@ static int rtl8226_match_phy_device(stru
  static int rtlgen_is_c45_match(struct phy_device *phydev, unsigned int id,
  			       bool is_c45)
  {
diff --git a/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch b/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
index 9afe8baca6..41d6efafb3 100644
--- a/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
+++ b/target/linux/generic/pending-6.12/720-06-net-phy-realtek-support-interrupt-of-RTL8221B.patch
@@ -12,7 +12,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
 
 --- a/drivers/net/phy/realtek/realtek_main.c
 +++ b/drivers/net/phy/realtek/realtek_main.c
-@@ -1580,6 +1580,51 @@ static irqreturn_t rtl9000a_handle_inter
+@@ -1595,6 +1595,51 @@ static irqreturn_t rtl9000a_handle_inter
  	return IRQ_HANDLED;
  }
  
@@ -64,7 +64,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  static struct phy_driver realtek_drvs[] = {
  	{
  		PHY_ID_MATCH_EXACT(0x00008201),
-@@ -1745,6 +1790,8 @@ static struct phy_driver realtek_drvs[]
+@@ -1758,6 +1803,8 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vb_cg_c22_match_phy_device,
  		.name           = "RTL8221B-VB-CG 2.5Gbps PHY (C22)",
@@ -73,7 +73,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  		.soft_reset     = genphy_soft_reset,
  		.probe		= rtl822x_probe,
  		.get_features   = rtl822x_get_features,
-@@ -1759,6 +1806,8 @@ static struct phy_driver realtek_drvs[]
+@@ -1772,6 +1819,8 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vb_cg_c45_match_phy_device,
  		.name           = "RTL8221B-VB-CG 2.5Gbps PHY (C45)",
@@ -82,7 +82,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  		.soft_reset     = genphy_soft_reset,
  		.probe		= rtl822x_probe,
  		.config_init    = rtl822xb_config_init,
-@@ -1771,6 +1820,8 @@ static struct phy_driver realtek_drvs[]
+@@ -1784,6 +1833,8 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vn_cg_c22_match_phy_device,
  		.name           = "RTL8221B-VM-CG 2.5Gbps PHY (C22)",
@@ -91,7 +91,7 @@ Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
  		.soft_reset     = genphy_soft_reset,
  		.probe		= rtl822x_probe,
  		.get_features   = rtl822x_get_features,
-@@ -1785,6 +1836,8 @@ static struct phy_driver realtek_drvs[]
+@@ -1798,6 +1849,8 @@ static struct phy_driver realtek_drvs[]
  	}, {
  		.match_phy_device = rtl8221b_vn_cg_c45_match_phy_device,
  		.name           = "RTL8221B-VN-CG 2.5Gbps PHY (C45)",
diff --git a/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch b/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch
index 1749a74e36..3eada2d5ad 100644
--- a/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch
+++ b/target/linux/generic/pending-6.12/720-08-net-phy-realtek-work-around-broken-serdes.patch
@@ -38,7 +38,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static int rtl822xb_get_rate_matching(struct phy_device *phydev,
  				      phy_interface_t iface)
  {
-@@ -1813,7 +1829,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1826,7 +1842,7 @@ static struct phy_driver realtek_drvs[]
  		.handle_interrupt = rtl8221b_handle_interrupt,
  		.soft_reset     = genphy_soft_reset,
  		.probe		= rtl822x_probe,
@@ -47,7 +47,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		.get_rate_matching = rtl822xb_get_rate_matching,
  		.get_features   = rtl822x_c45_get_features,
  		.config_aneg    = rtl822x_c45_config_aneg,
-@@ -1843,7 +1859,7 @@ static struct phy_driver realtek_drvs[]
+@@ -1856,7 +1872,7 @@ static struct phy_driver realtek_drvs[]
  		.handle_interrupt = rtl8221b_handle_interrupt,
  		.soft_reset     = genphy_soft_reset,
  		.probe		= rtl822x_probe,



From lede-commits at lists.infradead.org  Fri Aug 29 16:12:54 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 19:12:54 -0400
Subject: [openwrt/openwrt]  realtek: add 2500base-x patch sequence.
In-Reply-To: <175650917307.2309494.15047422249428061080@git-01.infra.openwrt.org>
References: <175650917307.2309494.15047422249428061080@git-01.infra.openwrt.org>
Message-ID: <mailman.134363.1756512655.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/886382ba256cc795c1bf2bf5d990ced9f23071e8

commit 886382ba256cc795c1bf2bf5d990ced9f23071e8
Author: Damien Dejean <dam.dejean at gmail.com>
AuthorDate: Wed Aug 20 18:07:37 2025 +0200

    realtek: add 2500base-x patch sequence.
    
    Adds the SerDes patch sequence for 2500base-x to improve the support of
    devices with minimal bootloaders (like BootBase). The sequences were
    imported from [1] for even lanes and [2] for odd lanes.
    
    [1] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L641
    [2] https://github.com/ddejean/dms-1250-oss-release/blob/main/sdk/sdk_rtk_switch/rtk-sdk/src/dal/longan/dal_longan_construct.c#L664
    
    Signed-off-by: Damien Dejean <dam.dejean at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19834
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.12/drivers/net/phy/rtl83xx-phy.c       | 56 ++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index 4366ff7867..c8c5f3963c 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -2788,6 +2788,52 @@ static const sds_config rtsds_930x_cfg_10gr_odd[] =
 	{0x2B, 0x14, 0x3108}, {0x2D, 0x13, 0x3C87}, {0x2D, 0x14, 0x1808},
 };
 
+static const sds_config rtsds_930x_cfg_10g_2500bx_even[] =
+{
+	{0x00, 0x0E, 0x3053}, {0x01, 0x14, 0x0100},
+	{0x21, 0x03, 0x8206}, {0x21, 0x05, 0x40B0}, {0x21, 0x06, 0x0010}, {0x21, 0x07, 0xF09F},
+	{0x21, 0x0C, 0x0007}, {0x21, 0x0D, 0x6009}, {0x21, 0x0E, 0x0000}, {0x21, 0x0F, 0x0008},
+	{0x24, 0x00, 0x0668}, {0x24, 0x02, 0xD020}, {0x24, 0x06, 0xC000}, {0x24, 0x0B, 0x1892},
+	{0x24, 0x0F, 0xFFDF}, {0x24, 0x12, 0x03C4}, {0x24, 0x13, 0x027F}, {0x24, 0x14, 0x1311},
+	{0x24, 0x16, 0x00C9}, {0x24, 0x17, 0xA100}, {0x24, 0x1A, 0x0001}, {0x24, 0x1C, 0x0400},
+	{0x25, 0x01, 0x0300}, {0x25, 0x02, 0x1017}, {0x25, 0x03, 0xFFDF}, {0x25, 0x05, 0x7F7C},
+	{0x25, 0x07, 0x8100}, {0x25, 0x08, 0x0001}, {0x25, 0x09, 0xFFD4}, {0x25, 0x0A, 0x7C2F},
+	{0x25, 0x0E, 0x003F}, {0x25, 0x0F, 0x0121}, {0x25, 0x10, 0x0020}, {0x25, 0x11, 0x8840},
+	{0x28, 0x00, 0x0668}, {0x28, 0x02, 0xD020}, {0x28, 0x06, 0xC000}, {0x28, 0x0B, 0x1892},
+	{0x28, 0x0F, 0xFFDF}, {0x28, 0x12, 0x01C4}, {0x28, 0x13, 0x027F}, {0x28, 0x14, 0x1311},
+	{0x28, 0x16, 0x00C9}, {0x28, 0x17, 0xA100}, {0x28, 0x1A, 0x0001}, {0x28, 0x1C, 0x0400},
+	{0x29, 0x01, 0x0300}, {0x29, 0x02, 0x1017}, {0x29, 0x03, 0xFFDF}, {0x29, 0x05, 0x7F7C},
+	{0x29, 0x07, 0x8100}, {0x29, 0x08, 0x0001}, {0x29, 0x09, 0xFFD4}, {0x29, 0x0A, 0x7C2F},
+	{0x29, 0x0E, 0x003F}, {0x29, 0x0F, 0x0121}, {0x29, 0x10, 0x0020}, {0x29, 0x11, 0x8840},
+	{0x2B, 0x13, 0x0050}, {0x2B, 0x18, 0x8E88}, {0x2B, 0x19, 0x4902}, {0x2B, 0x1D, 0x2501},
+	{0x2D, 0x13, 0x0050}, {0x2D, 0x18, 0x8E88}, {0x2D, 0x17, 0x4109}, {0x2D, 0x19, 0x4902},
+	{0x2D, 0x1C, 0x1109}, {0x2D, 0x1D, 0x2641},
+	{0x2F, 0x13, 0x0050}, {0x2F, 0x18, 0x8E88}, {0x2F, 0x19, 0x4902}, {0x2F, 0x1D, 0x66E1},
+};
+
+static const sds_config rtsds_930x_cfg_10g_2500bx_odd[] =
+{
+	{0x00, 0x0E, 0x3053}, {0x01, 0x14, 0x0100},
+	{0x21, 0x03, 0x8206}, {0x21, 0x06, 0x0010}, {0x21, 0x07, 0xF09F}, {0x21, 0x0A, 0x0003},
+	{0x21, 0x0B, 0x0005}, {0x21, 0x0C, 0x0007}, {0x21, 0x0D, 0x6009}, {0x21, 0x0E, 0x0000},
+	{0x21, 0x0F, 0x0008},
+	{0x24, 0x00, 0x0668}, {0x24, 0x02, 0xD020}, {0x24, 0x06, 0xC000}, {0x24, 0x0B, 0x1892},
+	{0x24, 0x0F, 0xFFDF}, {0x24, 0x12, 0x03C4}, {0x24, 0x13, 0x027F}, {0x24, 0x14, 0x1311},
+	{0x24, 0x16, 0x00C9}, {0x24, 0x17, 0xA100}, {0x24, 0x1A, 0x0001}, {0x24, 0x1C, 0x0400},
+	{0x25, 0x00, 0x820F}, {0x25, 0x01, 0x0300}, {0x25, 0x02, 0x1017}, {0x25, 0x03, 0xFFDF},
+	{0x25, 0x05, 0x7F7C}, {0x25, 0x07, 0x8100}, {0x25, 0x08, 0x0001}, {0x25, 0x09, 0xFFD4},
+	{0x25, 0x0A, 0x7C2F}, {0x25, 0x0E, 0x003F}, {0x25, 0x0F, 0x0121}, {0x25, 0x10, 0x0020},
+	{0x25, 0x11, 0x8840},
+	{0x28, 0x00, 0x0668}, {0x28, 0x02, 0xD020}, {0x28, 0x06, 0xC000}, {0x28, 0x0B, 0x1892},
+	{0x28, 0x0F, 0xFFDF}, {0x28, 0x12, 0x01C4}, {0x28, 0x13, 0x027F}, {0x28, 0x14, 0x1311},
+	{0x28, 0x16, 0x00C9}, {0x28, 0x17, 0xA100}, {0x28, 0x1A, 0x0001}, {0x28, 0x1C, 0x0400},
+	{0x29, 0x00, 0x820F}, {0x29, 0x01, 0x0300}, {0x29, 0x02, 0x1017}, {0x29, 0x03, 0xFFDF},
+	{0x29, 0x05, 0x7F7C}, {0x29, 0x07, 0x8100}, {0x29, 0x08, 0x0001}, {0x29, 0x0A, 0x7C2F},
+	{0x29, 0x0E, 0x003F}, {0x29, 0x0F, 0x0121}, {0x29, 0x10, 0x0020}, {0x29, 0x11, 0x8840},
+	{0x2B, 0x13, 0x3D87}, {0x2B, 0x14, 0x3108},
+	{0x2D, 0x13, 0x3C87}, {0x2D, 0x14, 0x1808},
+};
+
 static void rtsds_930x_patch_serdes(int sds, phy_interface_t mode)
 {
 	const bool even_sds = ((sds & 1) == 0);
@@ -2807,6 +2853,16 @@ static void rtsds_930x_patch_serdes(int sds, phy_interface_t mode)
 		}
 		break;
 
+	case PHY_INTERFACE_MODE_2500BASEX:
+		if (even_sds) {
+			config = rtsds_930x_cfg_10g_2500bx_even;
+			count = ARRAY_SIZE(rtsds_930x_cfg_10g_2500bx_even);
+		} else {
+			config = rtsds_930x_cfg_10g_2500bx_odd;
+			count = ARRAY_SIZE(rtsds_930x_cfg_10g_2500bx_odd);
+		}
+		break;
+
 	default:
 		pr_warn("%s: unsupported mode %s on serdes %d\n", __func__, phy_modes(mode), sds);
 		return;



From lede-commits at lists.infradead.org  Fri Aug 29 16:12:53 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 29 Aug 2025 19:12:53 -0400
Subject: [openwrt/openwrt]  realtek: allow different serdes patch sequences
In-Reply-To: <175650917307.2309494.15047422249428061080@git-01.infra.openwrt.org>
References: <175650917307.2309494.15047422249428061080@git-01.infra.openwrt.org>
Message-ID: <mailman.134364.1756512655.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6bb1b7cbbf220b765d74f0ceb2a106f5ca18a75a

commit 6bb1b7cbbf220b765d74f0ceb2a106f5ca18a75a
Author: Damien Dejean <dam.dejean at gmail.com>
AuthorDate: Wed Aug 20 18:07:37 2025 +0200

    realtek: allow different serdes patch sequences
    
    Prepare the SerDes patch function to allow different patch sequences
    depending on the phy mode. Patches are required to allow devices with a
    lightweight bootloader (one that doesn't have a "rtk network init"
    command) to use the serdes. Some modes required a different patch
    sequence than the one currently used.
    
    Signed-off-by: Damien Dejean <dam.dejean at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19834
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.12/drivers/net/phy/rtl83xx-phy.c       | 46 ++++++++++++++--------
 1 file changed, 30 insertions(+), 16 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
index b93c0fc522..4366ff7867 100644
--- a/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
+++ b/target/linux/realtek/files-6.12/drivers/net/phy/rtl83xx-phy.c
@@ -2615,7 +2615,7 @@ static void rtl9300_phy_enable_10g_1g(int sds_num)
 }
 
 static int rtl9300_sds_10g_idle(int sds_num);
-static void rtl9300_serdes_patch(int sds_num);
+static void rtsds_930x_patch_serdes(int sds, phy_interface_t mode);
 
 #define RTL930X_MAC_FORCE_MODE_CTRL		(0xCA1C)
 int rtl9300_serdes_setup(int port, int sds_num, phy_interface_t phy_mode)
@@ -2626,7 +2626,7 @@ int rtl9300_serdes_setup(int port, int sds_num, phy_interface_t phy_mode)
 	rtl9300_sds_rst(sds_num, RTL930X_SDS_OFF);
 
 	/* Apply serdes patches */
-	rtl9300_serdes_patch(sds_num);
+	rtsds_930x_patch_serdes(sds_num, phy_mode);
 
 	/* Maybe use dal_longan_sds_init */
 
@@ -2697,7 +2697,7 @@ typedef struct {
 	u16 data;
 } sds_config;
 
-sds_config rtl9300_a_sds_10gr_lane0[] =
+static const sds_config rtsds_930x_cfg_10gr_even[] =
 {
 	/* 1G */
 	{0x00, 0x0E, 0x3053}, {0x01, 0x14, 0x0100}, {0x21, 0x03, 0x8206},
@@ -2745,7 +2745,7 @@ sds_config rtl9300_a_sds_10gr_lane0[] =
 	{0x2F, 0x19, 0x4902}, {0x2F, 0x1D, 0x76E1},
 };
 
-sds_config rtl9300_a_sds_10gr_lane1[] =
+static const sds_config rtsds_930x_cfg_10gr_odd[] =
 {
 	/* 1G */
 	{0x00, 0x0E, 0x3053}, {0x01, 0x14, 0x0100}, {0x21, 0x03, 0x8206},
@@ -2788,20 +2788,34 @@ sds_config rtl9300_a_sds_10gr_lane1[] =
 	{0x2B, 0x14, 0x3108}, {0x2D, 0x13, 0x3C87}, {0x2D, 0x14, 0x1808},
 };
 
-static void rtl9300_serdes_patch(int sds_num)
+static void rtsds_930x_patch_serdes(int sds, phy_interface_t mode)
 {
-	if (sds_num % 2) {
-		for (int i = 0; i < sizeof(rtl9300_a_sds_10gr_lane1) / sizeof(sds_config); ++i) {
-			rtmdio_930x_write_sds_phy(sds_num, rtl9300_a_sds_10gr_lane1[i].page,
-						  rtl9300_a_sds_10gr_lane1[i].reg,
-						  rtl9300_a_sds_10gr_lane1[i].data);
-		}
-	} else {
-		for (int i = 0; i < sizeof(rtl9300_a_sds_10gr_lane0) / sizeof(sds_config); ++i) {
-			rtmdio_930x_write_sds_phy(sds_num, rtl9300_a_sds_10gr_lane0[i].page,
-						  rtl9300_a_sds_10gr_lane0[i].reg,
-						   rtl9300_a_sds_10gr_lane0[i].data);
+	const bool even_sds = ((sds & 1) == 0);
+	const sds_config *config;
+	size_t count;
+
+	switch (mode) {
+	case PHY_INTERFACE_MODE_1000BASEX:
+	case PHY_INTERFACE_MODE_SGMII:
+	case PHY_INTERFACE_MODE_10GBASER:
+		if (even_sds) {
+			config = rtsds_930x_cfg_10gr_even;
+			count = ARRAY_SIZE(rtsds_930x_cfg_10gr_even);
+		} else {
+			config = rtsds_930x_cfg_10gr_odd;
+			count = ARRAY_SIZE(rtsds_930x_cfg_10gr_odd);
 		}
+		break;
+
+	default:
+		pr_warn("%s: unsupported mode %s on serdes %d\n", __func__, phy_modes(mode), sds);
+		return;
+	}
+
+	for (size_t i = 0; i < count; ++i) {
+		rtmdio_930x_write_sds_phy(sds, config[i].page,
+					  config[i].reg,
+					  config[i].data);
 	}
 }
 



From lede-commits at lists.infradead.org  Sat Aug 30 09:45:05 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 30 Aug 2025 12:45:05 -0400
Subject: [openwrt/openwrt]  wifi-scripts: ucode: fix starting without
 wpa_supplicant or hostapd
In-Reply-To: <175657230564.1772774.5275290658440725973@git-01.infra.openwrt.org>
References: <175657230564.1772774.5275290658440725973@git-01.infra.openwrt.org>
Message-ID: <mailman.134641.1756572500.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/16ba3fc37920c2da10d086d228a86c76324c0620

commit 16ba3fc37920c2da10d086d228a86c76324c0620
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Aug 30 18:22:10 2025 +0200

    wifi-scripts: ucode: fix starting without wpa_supplicant or hostapd
    
    Fixes: 79f8a83eb933 ("wifi-scripts: ucode: unconditionally call hostapd/supplicant setup")
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc     | 2 +-
 .../config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
index b8f67b6107..eea93ca3ef 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/hostapd.uc
@@ -579,6 +579,6 @@ export function setup(data) {
 
 	if (ret)
 		netifd.add_process('/usr/sbin/hostapd', ret.pid, true, true);
-	else
+	else if (fs.access('/usr/sbin/hostapd', 'x'))
 		netifd.setup_failed('HOSTAPD_START_FAILED');
 };
diff --git a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
index 50677cdc99..2739a09e4c 100644
--- a/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
+++ b/package/network/config/wifi-scripts/files-ucode/usr/share/ucode/wifi/supplicant.uc
@@ -235,7 +235,7 @@ export function setup(config, data) {
 
 	if (ret)
 		netifd.add_process('/usr/sbin/wpa_supplicant', ret.pid, true, true);
-	else
+	else if (fs.access('/usr/sbin/wpa_supplicant', 'x'))
 		netifd.setup_failed('SUPPLICANT_START_FAILED');
 };
 



From lede-commits at lists.infradead.org  Sun Aug 31 03:23:35 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 06:23:35 -0400
Subject: [openwrt/openwrt]  pcre2: bump to 10.46
In-Reply-To: <175663581510.1116128.1006834465746157096@git-01.infra.openwrt.org>
References: <175663581510.1116128.1006834465746157096@git-01.infra.openwrt.org>
Message-ID: <mailman.134828.1756635820.1866309.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/be88c224fa45093ff733de6cad76d2b58f68ec6f

commit be88c224fa45093ff733de6cad76d2b58f68ec6f
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Sat Aug 30 07:26:03 2025 -0400

    pcre2: bump to 10.46
    
    Update to latest version.
    
    Changelog: https://github.com/PCRE2Project/pcre2/blob/pcre2-10.46/ChangeLog
    
    Tested with snort3, no regressions.
    
    Build system: x86/64
    Build-tested: x86/64-glibc
    Run-tested: x86/64-glibc (Intel N150 based box)
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
    Link: https://github.com/openwrt/openwrt/pull/19904
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 package/libs/pcre2/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/pcre2/Makefile b/package/libs/pcre2/Makefile
index 084a63c061..81310d1bac 100644
--- a/package/libs/pcre2/Makefile
+++ b/package/libs/pcre2/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=pcre2
-PKG_VERSION:=10.42
+PKG_VERSION:=10.46
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://github.com/PCRE2Project/pcre2/releases/download/$(PKG_NAME)-$(PKG_VERSION)
-PKG_HASH:=8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840
+PKG_HASH:=15fbc5aba6beee0b17aecb04602ae39432393aba1ebd8e39b7cabf7db883299f
 
 PKG_MAINTAINER:=Shane Peelar <lookatyouhacker at gmail.com>
 PKG_LICENSE:=BSD-3-Clause



From lede-commits at lists.infradead.org  Sun Aug 31 04:08:49 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 07:08:49 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.12 to 6.12.44
In-Reply-To: <175663852922.1259639.2699719703345448838@git-01.infra.openwrt.org>
References: <175663852922.1259639.2699719703345448838@git-01.infra.openwrt.org>
Message-ID: <mailman.134865.1756639665.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b92bab633fe8cf3c3a72345c08d1ab6a8dd0abd2

commit b92bab633fe8cf3c3a72345c08d1ab6a8dd0abd2
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Thu Aug 28 14:53:27 2025 -0400

    kernel: bump 6.12 to 6.12.44
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.12.44
    
    Removed upstreamed:
      generic-backport/220-v6.16-powerpc-boot-fix-build-with-gcc-15.patch[1]
      imx/patches-6.12/506-pending-PCI-imx6-Remove-apps_reset-toggle-in-_core_reset-function.patch[2]
    
    All other patches automatically rebased.
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.44&id=e42ac65e257b875614dd8f435b026a3e379e92e6
    2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.12.44&id=90fa5884bc8f52cbf493492e32978c723c85e6ab
    
    Build system: x86/64 (Intel N150 based)
    Build-tested: flogic/gl.inet-gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc
    Run-tested: flogic/gl.inet-gl-mt6000, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64-glibc
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
    Link: https://github.com/openwrt/openwrt/pull/19892
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 ...mbing-for-updating-interrupt-endpoint-int.patch |  2 +-
 ...ent-xhci_fixup_endpoint-for-interval-adju.patch |  2 +-
 ...0-0335-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch |  6 +--
 .../950-0364-drm-Add-RP1-DSI-driver.patch          |  4 +-
 ...isp_be-Re-introduce-multi-context-support.patch |  4 +-
 ...fault-to-Intel-scheme-for-calculating-U1-.patch |  4 +-
 ...-v6.16-powerpc-boot-fix-build-with-gcc-15.patch | 29 ------------
 ...pp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch |  2 +-
 ...14-net-phy-Constify-struct-mdio_device_id.patch |  2 +-
 .../hack-6.12/721-net-add-packet-mangeling.patch   |  2 +-
 target/linux/generic/kernel-6.12                   |  4 +-
 ...only-include-asm-rwonce.h-for-kernel-code.patch |  2 +-
 ...spinand-Add-support-for-Etron-EM73D044VCx.patch |  2 +-
 ...t-mediatek-fix-ppe-flow-accounting-for-L2.patch |  2 +-
 .../790-bus-mhi-core-add-SBL-state-callback.patch  |  2 +-
 ...ip-link-up-workaround-for-newer-platforms.patch | 12 ++---
 ...apps_reset-toggle-in-_core_reset-function.patch | 52 ----------------------
 .../999-atm-mpoa-intel-dsl-phy-support.patch       |  4 +-
 .../patches-6.12/121-hack-spi-nand-1b-bbm.patch    |  4 +-
 .../patches-6.12/330-snand-mtk-bmt-support.patch   |  6 +--
 ...nand-Add-support-for-the-Fidelix-FM35X1GA.patch |  2 +-
 .../patches-6.12/410-bt-mtk-serial-fix.patch       |  2 +-
 ...-spinand-Add-calibration-support-for-spin.patch |  4 +-
 ...-spi-nor-Add-calibration-support-for-spi-.patch |  2 +-
 .../960-asus-hack-u-boot-ignore-mtdparts.patch     |  4 +-
 .../0812-soc-qcom-mdt_loader-support-MPD.patch     | 16 +++----
 ...9-uart-8250-Add-dw-auto-flow-ctrl-support.patch |  2 +-
 27 files changed, 49 insertions(+), 130 deletions(-)

diff --git a/target/linux/bcm27xx/patches-6.12/950-0124-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch b/target/linux/bcm27xx/patches-6.12/950-0124-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch
index bbe32f254c..77c0f826ed 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0124-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0124-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch
@@ -27,7 +27,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
 
 --- a/drivers/usb/core/hcd.c
 +++ b/drivers/usb/core/hcd.c
-@@ -1953,6 +1953,16 @@ reset:
+@@ -1951,6 +1951,16 @@ reset:
  	return ret;
  }
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0125-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-6.12/950-0125-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
index b3f1233293..1860bf1737 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0125-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0125-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
@@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
   * non-error returns are a promise to giveback() the urb later
   * we drop ownership so next owner (or urb unlink) can get it
   */
-@@ -5383,6 +5486,7 @@ static const struct hc_driver xhci_hc_dr
+@@ -5390,6 +5493,7 @@ static const struct hc_driver xhci_hc_dr
  	.endpoint_reset =	xhci_endpoint_reset,
  	.check_bandwidth =	xhci_check_bandwidth,
  	.reset_bandwidth =	xhci_reset_bandwidth,
diff --git a/target/linux/bcm27xx/patches-6.12/950-0335-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch b/target/linux/bcm27xx/patches-6.12/950-0335-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch
index 4bc4330daa..c1731fb1df 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0335-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0335-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch
@@ -75,7 +75,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -3659,6 +3659,48 @@ static int xhci_align_td(struct xhci_hcd
+@@ -3664,6 +3664,48 @@ static int xhci_align_td(struct xhci_hcd
  	return 1;
  }
  
@@ -124,7 +124,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  /* This is very similar to what ehci-q.c qtd_fill() does */
  int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
  		struct urb *urb, int slot_id, unsigned int ep_index)
-@@ -3813,6 +3855,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3818,6 +3860,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
  	}
  
  	check_trb_math(urb, enqd_len);
@@ -133,7 +133,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id,
  			start_cycle, start_trb);
  	return 0;
-@@ -3961,6 +4005,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
+@@ -3966,6 +4010,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
  			/* Event on completion */
  			field | TRB_IOC | TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state);
  
diff --git a/target/linux/bcm27xx/patches-6.12/950-0364-drm-Add-RP1-DSI-driver.patch b/target/linux/bcm27xx/patches-6.12/950-0364-drm-Add-RP1-DSI-driver.patch
index 89593fd4c9..8c37408fee 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0364-drm-Add-RP1-DSI-driver.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0364-drm-Add-RP1-DSI-driver.patch
@@ -102,7 +102,7 @@ Signed-off-by: Nick Hollinghurst <nick.hollinghurst at raspberrypi.com>
 
 --- a/drivers/gpu/drm/Kconfig
 +++ b/drivers/gpu/drm/Kconfig
-@@ -436,6 +436,8 @@ source "drivers/gpu/drm/v3d/Kconfig"
+@@ -441,6 +441,8 @@ source "drivers/gpu/drm/v3d/Kconfig"
  
  source "drivers/gpu/drm/vc4/Kconfig"
  
@@ -113,7 +113,7 @@ Signed-off-by: Nick Hollinghurst <nick.hollinghurst at raspberrypi.com>
  source "drivers/gpu/drm/etnaviv/Kconfig"
 --- a/drivers/gpu/drm/Makefile
 +++ b/drivers/gpu/drm/Makefile
-@@ -224,3 +224,4 @@ obj-y			+= solomon/
+@@ -225,3 +225,4 @@ obj-y			+= solomon/
  obj-$(CONFIG_DRM_SPRD) += sprd/
  obj-$(CONFIG_DRM_LOONGSON) += loongson/
  obj-$(CONFIG_DRM_POWERVR) += imagination/
diff --git a/target/linux/bcm27xx/patches-6.12/950-0480-media-pisp_be-Re-introduce-multi-context-support.patch b/target/linux/bcm27xx/patches-6.12/950-0480-media-pisp_be-Re-introduce-multi-context-support.patch
index 6f7c4d2f6d..404414583e 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0480-media-pisp_be-Re-introduce-multi-context-support.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0480-media-pisp_be-Re-introduce-multi-context-support.patch
@@ -872,7 +872,7 @@ Signed-off-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
 +	while (num_groups-- > 0)
 +		pispbe_destroy_node_group(&pispbe->node_group[num_groups]);
  pm_runtime_suspend_err:
- 	pispbe_runtime_suspend(pispbe->dev);
+ 	pm_runtime_put(pispbe->dev);
  pm_runtime_disable_err:
 @@ -1760,7 +1820,8 @@ static void pispbe_remove(struct platfor
  {
@@ -882,5 +882,5 @@ Signed-off-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
 +	for (int i = PISPBE_NUM_NODE_GROUPS - 1; i >= 0; i--)
 +		pispbe_destroy_node_group(&pispbe->node_group[i]);
  
- 	pispbe_runtime_suspend(pispbe->dev);
  	pm_runtime_dont_use_autosuspend(pispbe->dev);
+ 	pm_runtime_disable(pispbe->dev);
diff --git a/target/linux/bcm27xx/patches-6.12/950-0950-usb-xhci-default-to-Intel-scheme-for-calculating-U1-.patch b/target/linux/bcm27xx/patches-6.12/950-0950-usb-xhci-default-to-Intel-scheme-for-calculating-U1-.patch
index 3a52a38589..06b91a6ce6 100644
--- a/target/linux/bcm27xx/patches-6.12/950-0950-usb-xhci-default-to-Intel-scheme-for-calculating-U1-.patch
+++ b/target/linux/bcm27xx/patches-6.12/950-0950-usb-xhci-default-to-Intel-scheme-for-calculating-U1-.patch
@@ -40,7 +40,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  static bool td_on_ring(struct xhci_td *td, struct xhci_ring *ring)
  {
  	struct xhci_segment *seg = ring->first_seg;
-@@ -4788,7 +4792,7 @@ static u16 xhci_calculate_u1_timeout(str
+@@ -4795,7 +4799,7 @@ static u16 xhci_calculate_u1_timeout(str
  		}
  	}
  
@@ -49,7 +49,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  		timeout_ns = xhci_calculate_intel_u1_timeout(udev, desc);
  	else
  		timeout_ns = udev->u1_params.sel;
-@@ -4852,7 +4856,7 @@ static u16 xhci_calculate_u2_timeout(str
+@@ -4859,7 +4863,7 @@ static u16 xhci_calculate_u2_timeout(str
  		}
  	}
  
diff --git a/target/linux/generic/backport-6.12/220-v6.16-powerpc-boot-fix-build-with-gcc-15.patch b/target/linux/generic/backport-6.12/220-v6.16-powerpc-boot-fix-build-with-gcc-15.patch
deleted file mode 100644
index c5a563fd16..0000000000
--- a/target/linux/generic/backport-6.12/220-v6.16-powerpc-boot-fix-build-with-gcc-15.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 5a821e2d69e26b51b7f3740b6b0c3462b8cacaff Mon Sep 17 00:00:00 2001
-From: Michal Suchanek <msuchanek at suse.de>
-Date: Mon, 31 Mar 2025 12:57:19 +0200
-Subject: [PATCH] powerpc/boot: Fix build with gcc 15
-
-Similar to x86 the ppc boot code does not build with GCC 15.
-
-Copy the fix from
-commit ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15")
-
-Signed-off-by: Michal Suchanek <msuchanek at suse.de>
-Tested-by: Amit Machhiwal <amachhiw at linux.ibm.com>
-Tested-by: Venkat Rao Bagalkote <venkat88 at linux.ibm.com>
-Signed-off-by: Madhavan Srinivasan <maddy at linux.ibm.com>
-Link: https://patch.msgid.link/20250331105722.19709-1-msuchanek at suse.de
----
- arch/powerpc/boot/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/arch/powerpc/boot/Makefile
-+++ b/arch/powerpc/boot/Makefile
-@@ -70,6 +70,7 @@ BOOTCPPFLAGS	:= -nostdinc $(LINUXINCLUDE
- BOOTCPPFLAGS	+= -isystem $(shell $(BOOTCC) -print-file-name=include)
- 
- BOOTCFLAGS	:= $(BOOTTARGETFLAGS) \
-+		   -std=gnu11 \
- 		   -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
- 		   -fno-strict-aliasing -O2 \
- 		   -msoft-float -mno-altivec -mno-vsx \
diff --git a/target/linux/generic/backport-6.12/620-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch b/target/linux/generic/backport-6.12/620-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
index 6d9ac56cf0..d8c09daf9c 100644
--- a/target/linux/generic/backport-6.12/620-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
+++ b/target/linux/generic/backport-6.12/620-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
@@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ppp/ppp_generic.c
 +++ b/drivers/net/ppp/ppp_generic.c
-@@ -3500,6 +3500,10 @@ ppp_connect_channel(struct channel *pch,
+@@ -3504,6 +3504,10 @@ ppp_connect_channel(struct channel *pch,
  		ret = -ENOTCONN;
  		goto outl;
  	}
diff --git a/target/linux/generic/backport-6.12/720-09-v6.14-net-phy-Constify-struct-mdio_device_id.patch b/target/linux/generic/backport-6.12/720-09-v6.14-net-phy-Constify-struct-mdio_device_id.patch
index aa5fc662fa..c010e87a7b 100644
--- a/target/linux/generic/backport-6.12/720-09-v6.14-net-phy-Constify-struct-mdio_device_id.patch
+++ b/target/linux/generic/backport-6.12/720-09-v6.14-net-phy-Constify-struct-mdio_device_id.patch
@@ -502,7 +502,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	{ }
 --- a/drivers/net/phy/mscc/mscc_main.c
 +++ b/drivers/net/phy/mscc/mscc_main.c
-@@ -2700,7 +2700,7 @@ static struct phy_driver vsc85xx_driver[
+@@ -2712,7 +2712,7 @@ static struct phy_driver vsc85xx_driver[
  
  module_phy_driver(vsc85xx_driver);
  
diff --git a/target/linux/generic/hack-6.12/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.12/721-net-add-packet-mangeling.patch
index 9430070457..fee5641cbd 100644
--- a/target/linux/generic/hack-6.12/721-net-add-packet-mangeling.patch
+++ b/target/linux/generic/hack-6.12/721-net-add-packet-mangeling.patch
@@ -97,7 +97,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	help
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -3646,6 +3646,11 @@ static int xmit_one(struct sk_buff *skb,
+@@ -3658,6 +3658,11 @@ static int xmit_one(struct sk_buff *skb,
  	if (dev_nit_active(dev))
  		dev_queue_xmit_nit(skb, dev);
  
diff --git a/target/linux/generic/kernel-6.12 b/target/linux/generic/kernel-6.12
index 78b4d39332..e28a8c4870 100644
--- a/target/linux/generic/kernel-6.12
+++ b/target/linux/generic/kernel-6.12
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.12 = .43
-LINUX_KERNEL_HASH-6.12.43 = 0fcbbbbcd456e87bbbfc8bf37af541fda62ccfcce76903503424fd101ef7bdee
+LINUX_VERSION-6.12 = .44
+LINUX_KERNEL_HASH-6.12.44 = b650210ed3027b224969d148aa377452a9aad3ae7f2851abedd31adfef16bdae
diff --git a/target/linux/generic/pending-6.12/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch b/target/linux/generic/pending-6.12/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
index 1a552bdc33..725e223495 100644
--- a/target/linux/generic/pending-6.12/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
+++ b/target/linux/generic/pending-6.12/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #endif /* __KERNEL__ */
  
  /**
-@@ -306,6 +308,4 @@ static inline void *offset_to_ptr(const
+@@ -298,6 +300,4 @@ static inline void *offset_to_ptr(const
   */
  #define prevent_tail_call_optimization()	mb()
  
diff --git a/target/linux/generic/pending-6.12/487-mtd-spinand-Add-support-for-Etron-EM73D044VCx.patch b/target/linux/generic/pending-6.12/487-mtd-spinand-Add-support-for-Etron-EM73D044VCx.patch
index 0eb45822e2..cc23125b3d 100644
--- a/target/linux/generic/pending-6.12/487-mtd-spinand-Add-support-for-Etron-EM73D044VCx.patch
+++ b/target/linux/generic/pending-6.12/487-mtd-spinand-Add-support-for-Etron-EM73D044VCx.patch
@@ -49,7 +49,7 @@ Submitted-by: Daniel Danzberger <daniel at dd-wrt.com>
  obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
 --- a/drivers/mtd/nand/spi/core.c
 +++ b/drivers/mtd/nand/spi/core.c
-@@ -1112,6 +1112,7 @@ static const struct spinand_manufacturer
+@@ -1115,6 +1115,7 @@ static const struct spinand_manufacturer
  	&alliancememory_spinand_manufacturer,
  	&ato_spinand_manufacturer,
  	&esmt_c8_spinand_manufacturer,
diff --git a/target/linux/generic/pending-6.12/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch b/target/linux/generic/pending-6.12/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
index 1916613e54..9141fa69b0 100644
--- a/target/linux/generic/pending-6.12/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
+++ b/target/linux/generic/pending-6.12/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
@@ -309,7 +309,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		seq_printf(m, "%05x %s %7s", i,
 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -520,24 +520,21 @@ static int
+@@ -522,24 +522,21 @@ static int
  mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f)
  {
  	struct mtk_flow_entry *entry;
diff --git a/target/linux/generic/pending-6.12/790-bus-mhi-core-add-SBL-state-callback.patch b/target/linux/generic/pending-6.12/790-bus-mhi-core-add-SBL-state-callback.patch
index fe0f260ae3..80d1306115 100644
--- a/target/linux/generic/pending-6.12/790-bus-mhi-core-add-SBL-state-callback.patch
+++ b/target/linux/generic/pending-6.12/790-bus-mhi-core-add-SBL-state-callback.patch
@@ -20,7 +20,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
 
 --- a/drivers/bus/mhi/host/main.c
 +++ b/drivers/bus/mhi/host/main.c
-@@ -906,6 +906,7 @@ int mhi_process_ctrl_ev_ring(struct mhi_
+@@ -916,6 +916,7 @@ int mhi_process_ctrl_ev_ring(struct mhi_
  			switch (event) {
  			case MHI_EE_SBL:
  				st = DEV_ST_TRANSITION_SBL;
diff --git a/target/linux/imx/patches-6.12/506-6.16-PCI-imx6-Skip-link-up-workaround-for-newer-platforms.patch b/target/linux/imx/patches-6.12/506-6.16-PCI-imx6-Skip-link-up-workaround-for-newer-platforms.patch
index 11275a2ffd..cc92d0a665 100644
--- a/target/linux/imx/patches-6.12/506-6.16-PCI-imx6-Skip-link-up-workaround-for-newer-platforms.patch
+++ b/target/linux/imx/patches-6.12/506-6.16-PCI-imx6-Skip-link-up-workaround-for-newer-platforms.patch
@@ -23,7 +23,7 @@ Link: https://patch.msgid.link/20250416081314.3929794-2-hongxing.zhu at nxp.com
 
 --- a/drivers/pci/controller/dwc/pci-imx6.c
 +++ b/drivers/pci/controller/dwc/pci-imx6.c
-@@ -76,7 +76,7 @@ enum imx_pcie_variants {
+@@ -77,7 +77,7 @@ enum imx_pcie_variants {
  };
  
  #define IMX_PCIE_FLAG_IMX_PHY			BIT(0)
@@ -32,7 +32,7 @@ Link: https://patch.msgid.link/20250416081314.3929794-2-hongxing.zhu at nxp.com
  #define IMX_PCIE_FLAG_SUPPORTS_SUSPEND		BIT(2)
  #define IMX_PCIE_FLAG_HAS_PHYDRV		BIT(3)
  #define IMX_PCIE_FLAG_HAS_APP_RESET		BIT(4)
-@@ -862,6 +862,12 @@ static int imx_pcie_start_link(struct dw
+@@ -861,6 +861,12 @@ static int imx_pcie_start_link(struct dw
  	u32 tmp;
  	int ret;
  
@@ -45,7 +45,7 @@ Link: https://patch.msgid.link/20250416081314.3929794-2-hongxing.zhu at nxp.com
  	/*
  	 * Force Gen1 operation when starting the link.  In case the link is
  	 * started in Gen2 mode, there is a possibility the devices on the
-@@ -898,22 +904,10 @@ static int imx_pcie_start_link(struct dw
+@@ -897,22 +903,10 @@ static int imx_pcie_start_link(struct dw
  		dw_pcie_writel_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL, tmp);
  		dw_pcie_dbi_ro_wr_dis(pci);
  
@@ -72,7 +72,7 @@ Link: https://patch.msgid.link/20250416081314.3929794-2-hongxing.zhu at nxp.com
  		}
  
  		/* Make sure link training is finished as well! */
-@@ -1535,7 +1529,7 @@ static const struct imx_pcie_drvdata drv
+@@ -1546,7 +1540,7 @@ static const struct imx_pcie_drvdata drv
  	[IMX6Q] = {
  		.variant = IMX6Q,
  		.flags = IMX_PCIE_FLAG_IMX_PHY |
@@ -81,7 +81,7 @@ Link: https://patch.msgid.link/20250416081314.3929794-2-hongxing.zhu at nxp.com
  			 IMX_PCIE_FLAG_BROKEN_SUSPEND |
  			 IMX_PCIE_FLAG_SUPPORTS_SUSPEND,
  		.dbi_length = 0x200,
-@@ -1553,7 +1547,7 @@ static const struct imx_pcie_drvdata drv
+@@ -1564,7 +1558,7 @@ static const struct imx_pcie_drvdata drv
  	[IMX6SX] = {
  		.variant = IMX6SX,
  		.flags = IMX_PCIE_FLAG_IMX_PHY |
@@ -90,7 +90,7 @@ Link: https://patch.msgid.link/20250416081314.3929794-2-hongxing.zhu at nxp.com
  			 IMX_PCIE_FLAG_SUPPORTS_SUSPEND,
  		.gpr = "fsl,imx6q-iomuxc-gpr",
  		.clk_names = imx6sx_clks,
-@@ -1569,7 +1563,7 @@ static const struct imx_pcie_drvdata drv
+@@ -1580,7 +1574,7 @@ static const struct imx_pcie_drvdata drv
  	[IMX6QP] = {
  		.variant = IMX6QP,
  		.flags = IMX_PCIE_FLAG_IMX_PHY |
diff --git a/target/linux/imx/patches-6.12/506-pending-PCI-imx6-Remove-apps_reset-toggle-in-_core_reset-function.patch b/target/linux/imx/patches-6.12/506-pending-PCI-imx6-Remove-apps_reset-toggle-in-_core_reset-function.patch
deleted file mode 100644
index 234a028c4f..0000000000
--- a/target/linux/imx/patches-6.12/506-pending-PCI-imx6-Remove-apps_reset-toggle-in-_core_reset-function.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From d8588b5b9fddffd51962c13db7d00ae6f2ac945b Mon Sep 17 00:00:00 2001
-From: Tim Harvey <tharvey at gateworks.com>
-Date: Thu, 19 Jun 2025 16:04:53 -0700
-Subject: [PATCH] PCI: imx6: Remove apps_reset toggle in _core_reset functions
-
-apps_reset is LTSSM_EN on i.MX7, i.MX8MQ, i.MX8MM and i.MX8MP platforms.
-Since the assertion/de-assertion of apps_reset(LTSSM_EN bit) had been
-wrappered in imx_pcie_ltssm_enable() and imx_pcie_ltssm_disable();
-
-Remove apps_reset toggle in imx_pcie_assert_core_reset() and
-imx_pcie_deassert_core_reset() functions. Use imx_pcie_ltssm_enable()
-and imx_pcie_ltssm_disable() to configure apps_reset directly.
-
-Fix fail to enumerate reliably PI7C9X2G608GP (hotplug) at i.MX8MM, which
-reported By Tim.
-
-Reported-by: Tim Harvey <tharvey at gateworks.com>
-Closes: https://lore.kernel.org/all/CAJ+vNU3ohR2YKTwC4xoYrc1z-neDoH2TTZcMHDy+poj9=jSy+w at mail.gmail.com/
-Fixes: ef61c7d8d032 ("PCI: imx6: Deassert apps_reset in imx_pcie_deassert_core_reset()")
-Signed-off-by: Richard Zhu <hongxing.zhu at nxp.com>
----
- drivers/pci/controller/dwc/pci-imx6.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/drivers/pci/controller/dwc/pci-imx6.c
-+++ b/drivers/pci/controller/dwc/pci-imx6.c
-@@ -778,7 +778,6 @@ static int imx7d_pcie_core_reset(struct
- static void imx_pcie_assert_core_reset(struct imx_pcie *imx_pcie)
- {
- 	reset_control_assert(imx_pcie->pciephy_reset);
--	reset_control_assert(imx_pcie->apps_reset);
- 
- 	if (imx_pcie->drvdata->core_reset)
- 		imx_pcie->drvdata->core_reset(imx_pcie, true);
-@@ -790,7 +789,6 @@ static void imx_pcie_assert_core_reset(s
- static int imx_pcie_deassert_core_reset(struct imx_pcie *imx_pcie)
- {
- 	reset_control_deassert(imx_pcie->pciephy_reset);
--	reset_control_deassert(imx_pcie->apps_reset);
- 
- 	if (imx_pcie->drvdata->core_reset)
- 		imx_pcie->drvdata->core_reset(imx_pcie, false);
-@@ -991,6 +989,9 @@ static int imx_pcie_host_init(struct dw_
- 		}
- 	}
- 
-+	/* Make sure that PCIe LTSSM is cleared */
-+	imx_pcie_ltssm_disable(dev);
-+
- 	ret = imx_pcie_deassert_core_reset(imx_pcie);
- 	if (ret < 0) {
- 		dev_err(dev, "pcie deassert core reset failed: %d\n", ret);
diff --git a/target/linux/ipq40xx/patches-6.12/999-atm-mpoa-intel-dsl-phy-support.patch b/target/linux/ipq40xx/patches-6.12/999-atm-mpoa-intel-dsl-phy-support.patch
index 38e8cc1e0e..d38070b13e 100644
--- a/target/linux/ipq40xx/patches-6.12/999-atm-mpoa-intel-dsl-phy-support.patch
+++ b/target/linux/ipq40xx/patches-6.12/999-atm-mpoa-intel-dsl-phy-support.patch
@@ -4,7 +4,7 @@ Subject: [PATCH] UGW_SW-29163: ATM oam support
 
 --- a/drivers/net/ppp/ppp_generic.c
 +++ b/drivers/net/ppp/ppp_generic.c
-@@ -2978,6 +2978,22 @@ char *ppp_dev_name(struct ppp_channel *c
+@@ -2982,6 +2982,22 @@ char *ppp_dev_name(struct ppp_channel *c
  	return name;
  }
  
@@ -27,7 +27,7 @@ Subject: [PATCH] UGW_SW-29163: ATM oam support
  
  /*
   * Disconnect a channel from the generic layer.
-@@ -3628,6 +3644,7 @@ EXPORT_SYMBOL(ppp_unregister_channel);
+@@ -3633,6 +3649,7 @@ EXPORT_SYMBOL(ppp_unregister_channel);
  EXPORT_SYMBOL(ppp_channel_index);
  EXPORT_SYMBOL(ppp_unit_number);
  EXPORT_SYMBOL(ppp_dev_name);
diff --git a/target/linux/mediatek/patches-6.12/121-hack-spi-nand-1b-bbm.patch b/target/linux/mediatek/patches-6.12/121-hack-spi-nand-1b-bbm.patch
index bb5e1a296e..df29ec91d1 100644
--- a/target/linux/mediatek/patches-6.12/121-hack-spi-nand-1b-bbm.patch
+++ b/target/linux/mediatek/patches-6.12/121-hack-spi-nand-1b-bbm.patch
@@ -1,6 +1,6 @@
 --- a/drivers/mtd/nand/spi/core.c
 +++ b/drivers/mtd/nand/spi/core.c
-@@ -893,7 +893,7 @@ static int spinand_mtd_write(struct mtd_
+@@ -896,7 +896,7 @@ static int spinand_mtd_write(struct mtd_
  static bool spinand_isbad(struct nand_device *nand, const struct nand_pos *pos)
  {
  	struct spinand_device *spinand = nand_to_spinand(nand);
@@ -9,7 +9,7 @@
  	struct nand_page_io_req req = {
  		.pos = *pos,
  		.ooblen = sizeof(marker),
-@@ -904,7 +904,7 @@ static bool spinand_isbad(struct nand_de
+@@ -907,7 +907,7 @@ static bool spinand_isbad(struct nand_de
  
  	spinand_select_target(spinand, pos->target);
  	spinand_read_page(spinand, &req);
diff --git a/target/linux/mediatek/patches-6.12/330-snand-mtk-bmt-support.patch b/target/linux/mediatek/patches-6.12/330-snand-mtk-bmt-support.patch
index 1578b72bf1..0a8f80c1e0 100644
--- a/target/linux/mediatek/patches-6.12/330-snand-mtk-bmt-support.patch
+++ b/target/linux/mediatek/patches-6.12/330-snand-mtk-bmt-support.patch
@@ -8,7 +8,7 @@
  
  static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val)
  {
-@@ -1526,6 +1527,7 @@ static int spinand_probe(struct spi_mem
+@@ -1529,6 +1530,7 @@ static int spinand_probe(struct spi_mem
  	if (ret)
  		return ret;
  
@@ -16,7 +16,7 @@
  	ret = mtd_device_register(mtd, NULL, 0);
  	if (ret)
  		goto err_spinand_cleanup;
-@@ -1533,6 +1535,7 @@ static int spinand_probe(struct spi_mem
+@@ -1536,6 +1538,7 @@ static int spinand_probe(struct spi_mem
  	return 0;
  
  err_spinand_cleanup:
@@ -24,7 +24,7 @@
  	spinand_cleanup(spinand);
  
  	return ret;
-@@ -1551,6 +1554,7 @@ static int spinand_remove(struct spi_mem
+@@ -1554,6 +1557,7 @@ static int spinand_remove(struct spi_mem
  	if (ret)
  		return ret;
  
diff --git a/target/linux/mediatek/patches-6.12/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch b/target/linux/mediatek/patches-6.12/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch
index ee71d49fe1..cb3e425c46 100644
--- a/target/linux/mediatek/patches-6.12/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch
+++ b/target/linux/mediatek/patches-6.12/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch
@@ -24,7 +24,7 @@ Signed-off-by: Davide Fioravanti <pantanastyle at gmail.com>
  obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
 --- a/drivers/mtd/nand/spi/core.c
 +++ b/drivers/mtd/nand/spi/core.c
-@@ -1114,6 +1114,7 @@ static const struct spinand_manufacturer
+@@ -1117,6 +1117,7 @@ static const struct spinand_manufacturer
  	&ato_spinand_manufacturer,
  	&esmt_c8_spinand_manufacturer,
  	&etron_spinand_manufacturer,
diff --git a/target/linux/mediatek/patches-6.12/410-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-6.12/410-bt-mtk-serial-fix.patch
index 3b5f21f9c8..325b3ad795 100644
--- a/target/linux/mediatek/patches-6.12/410-bt-mtk-serial-fix.patch
+++ b/target/linux/mediatek/patches-6.12/410-bt-mtk-serial-fix.patch
@@ -19,7 +19,7 @@
  	},
  	[PORT_NPCM] = {
  		.name		= "Nuvoton 16550",
-@@ -2730,6 +2730,11 @@ serial8250_do_set_termios(struct uart_po
+@@ -2729,6 +2729,11 @@ serial8250_do_set_termios(struct uart_po
  	unsigned long flags;
  	unsigned int baud, quot, frac = 0;
  
diff --git a/target/linux/mediatek/patches-6.12/435-drivers-mtd-spinand-Add-calibration-support-for-spin.patch b/target/linux/mediatek/patches-6.12/435-drivers-mtd-spinand-Add-calibration-support-for-spin.patch
index eda2d8366a..6f58346bfa 100644
--- a/target/linux/mediatek/patches-6.12/435-drivers-mtd-spinand-Add-calibration-support-for-spin.patch
+++ b/target/linux/mediatek/patches-6.12/435-drivers-mtd-spinand-Add-calibration-support-for-spin.patch
@@ -11,7 +11,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang at mediatek.com>
 
 --- a/drivers/mtd/nand/spi/core.c
 +++ b/drivers/mtd/nand/spi/core.c
-@@ -1152,6 +1152,56 @@ static int spinand_manufacturer_match(st
+@@ -1155,6 +1155,56 @@ static int spinand_manufacturer_match(st
  	return -EOPNOTSUPP;
  }
  
@@ -68,7 +68,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang at mediatek.com>
  static int spinand_id_detect(struct spinand_device *spinand)
  {
  	u8 *id = spinand->id.data;
-@@ -1403,6 +1453,10 @@ static int spinand_init(struct spinand_d
+@@ -1406,6 +1456,10 @@ static int spinand_init(struct spinand_d
  	if (!spinand->scratchbuf)
  		return -ENOMEM;
  
diff --git a/target/linux/mediatek/patches-6.12/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch b/target/linux/mediatek/patches-6.12/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch
index 4cc43333cd..39a4d3759d 100644
--- a/target/linux/mediatek/patches-6.12/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch
+++ b/target/linux/mediatek/patches-6.12/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch
@@ -12,7 +12,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang at mediatek.com>
 
 --- a/drivers/mtd/nand/spi/core.c
 +++ b/drivers/mtd/nand/spi/core.c
-@@ -1193,7 +1193,10 @@ static int spinand_cal_read(void *priv,
+@@ -1196,7 +1196,10 @@ static int spinand_cal_read(void *priv,
  	if (ret)
  		return ret;
  
diff --git a/target/linux/mediatek/patches-6.12/960-asus-hack-u-boot-ignore-mtdparts.patch b/target/linux/mediatek/patches-6.12/960-asus-hack-u-boot-ignore-mtdparts.patch
index c788cccdce..08803e707d 100644
--- a/target/linux/mediatek/patches-6.12/960-asus-hack-u-boot-ignore-mtdparts.patch
+++ b/target/linux/mediatek/patches-6.12/960-asus-hack-u-boot-ignore-mtdparts.patch
@@ -29,7 +29,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mtd/nand/spi/core.c
 +++ b/drivers/mtd/nand/spi/core.c
-@@ -1620,6 +1620,7 @@ static int spinand_remove(struct spi_mem
+@@ -1623,6 +1623,7 @@ static int spinand_remove(struct spi_mem
  
  static const struct spi_device_id spinand_ids[] = {
  	{ .name = "spi-nand" },
@@ -37,7 +37,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	{ /* sentinel */ },
  };
  MODULE_DEVICE_TABLE(spi, spinand_ids);
-@@ -1627,6 +1628,7 @@ MODULE_DEVICE_TABLE(spi, spinand_ids);
+@@ -1630,6 +1631,7 @@ MODULE_DEVICE_TABLE(spi, spinand_ids);
  #ifdef CONFIG_OF
  static const struct of_device_id spinand_of_ids[] = {
  	{ .compatible = "spi-nand" },
diff --git a/target/linux/qualcommax/patches-6.12/0812-soc-qcom-mdt_loader-support-MPD.patch b/target/linux/qualcommax/patches-6.12/0812-soc-qcom-mdt_loader-support-MPD.patch
index 7d670f5ff9..e2fa205410 100644
--- a/target/linux/qualcommax/patches-6.12/0812-soc-qcom-mdt_loader-support-MPD.patch
+++ b/target/linux/qualcommax/patches-6.12/0812-soc-qcom-mdt_loader-support-MPD.patch
@@ -30,9 +30,9 @@ Signed-off-by: George Moussalem <george.moussalem at outlook.com>
 +	__le64 blk_size;
 +};
  
- static bool mdt_phdr_valid(const struct elf32_phdr *phdr)
+ static bool mdt_header_valid(const struct firmware *fw)
  {
-@@ -67,6 +77,56 @@ static ssize_t mdt_load_split_segment(vo
+@@ -98,6 +108,56 @@ static ssize_t mdt_load_split_segment(vo
  	return ret;
  }
  
@@ -89,7 +89,7 @@ Signed-off-by: George Moussalem <george.moussalem at outlook.com>
  /**
   * qcom_mdt_get_size() - acquire size of the memory region needed to load mdt
   * @fw:		firmware object for the mdt file
-@@ -293,7 +353,8 @@ static bool qcom_mdt_bins_are_split(cons
+@@ -333,7 +393,8 @@ static bool qcom_mdt_bins_are_split(cons
  static int __qcom_mdt_load(struct device *dev, const struct firmware *fw,
  			   const char *fw_name, int pas_id, void *mem_region,
  			   phys_addr_t mem_phys, size_t mem_size,
@@ -99,7 +99,7 @@ Signed-off-by: George Moussalem <george.moussalem at outlook.com>
  {
  	const struct elf32_phdr *phdrs;
  	const struct elf32_phdr *phdr;
-@@ -347,6 +408,14 @@ static int __qcom_mdt_load(struct device
+@@ -390,6 +451,14 @@ static int __qcom_mdt_load(struct device
  		if (!mdt_phdr_valid(phdr))
  			continue;
  
@@ -114,7 +114,7 @@ Signed-off-by: George Moussalem <george.moussalem at outlook.com>
  		offset = phdr->p_paddr - mem_reloc;
  		if (offset < 0 || offset + phdr->p_memsz > mem_size) {
  			dev_err(dev, "segment outside memory range\n");
-@@ -364,7 +433,11 @@ static int __qcom_mdt_load(struct device
+@@ -407,7 +476,11 @@ static int __qcom_mdt_load(struct device
  
  		ptr = mem_region + offset;
  
@@ -127,7 +127,7 @@ Signed-off-by: George Moussalem <george.moussalem at outlook.com>
  			/* Firmware is large enough to be non-split */
  			if (phdr->p_offset + phdr->p_filesz > fw->size) {
  				dev_err(dev, "file %s segment %d would be truncated\n",
-@@ -381,7 +454,7 @@ static int __qcom_mdt_load(struct device
+@@ -424,7 +497,7 @@ static int __qcom_mdt_load(struct device
  				break;
  		}
  
@@ -136,7 +136,7 @@ Signed-off-by: George Moussalem <george.moussalem at outlook.com>
  			memset(ptr + phdr->p_filesz, 0, phdr->p_memsz - phdr->p_filesz);
  	}
  
-@@ -416,7 +489,7 @@ int qcom_mdt_load(struct device *dev, co
+@@ -459,7 +532,7 @@ int qcom_mdt_load(struct device *dev, co
  		return ret;
  
  	return __qcom_mdt_load(dev, fw, firmware, pas_id, mem_region, mem_phys,
@@ -145,7 +145,7 @@ Signed-off-by: George Moussalem <george.moussalem at outlook.com>
  }
  EXPORT_SYMBOL_GPL(qcom_mdt_load);
  
-@@ -439,9 +512,36 @@ int qcom_mdt_load_no_init(struct device
+@@ -482,9 +555,36 @@ int qcom_mdt_load_no_init(struct device
  			  size_t mem_size, phys_addr_t *reloc_base)
  {
  	return __qcom_mdt_load(dev, fw, firmware, pas_id, mem_region, mem_phys,
diff --git a/target/linux/starfive/patches-6.12/0009-uart-8250-Add-dw-auto-flow-ctrl-support.patch b/target/linux/starfive/patches-6.12/0009-uart-8250-Add-dw-auto-flow-ctrl-support.patch
index 0f18f1c3c0..5b7d42c716 100644
--- a/target/linux/starfive/patches-6.12/0009-uart-8250-Add-dw-auto-flow-ctrl-support.patch
+++ b/target/linux/starfive/patches-6.12/0009-uart-8250-Add-dw-auto-flow-ctrl-support.patch
@@ -67,7 +67,7 @@ Signed-off-by: Minda Chen <minda.chen at starfivetech.com>
  }
  
  /*
-@@ -2769,7 +2782,6 @@ serial8250_do_set_termios(struct uart_po
+@@ -2768,7 +2781,6 @@ serial8250_do_set_termios(struct uart_po
  		if (termios->c_cflag & CRTSCTS)
  			up->mcr |= UART_MCR_AFE;
  	}



From lede-commits at lists.infradead.org  Sun Aug 31 04:21:08 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 07:21:08 -0400
Subject: [openwrt/openwrt]  realtek: correct whitespace in hp dts files
In-Reply-To: <175663926804.1306021.4141752967190615195@git-01.infra.openwrt.org>
References: <175663926804.1306021.4141752967190615195@git-01.infra.openwrt.org>
Message-ID: <mailman.134868.1756639665.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cee13fc0a56dd745da4ae527f9c867eca0fd7750

commit cee13fc0a56dd745da4ae527f9c867eca0fd7750
Author: Felix Baumann <felix.bau at gmx.de>
AuthorDate: Wed Aug 27 19:12:43 2025 +0200

    realtek: correct whitespace in hp dts files
    
    Make whitespace consistent, replace 8 spaces by tab
    
    Fixes: 502b2f4ee5a4 ("realtek: switch HP-1920-48G to new shared gpio driver")
    Signed-off-by: Felix Baumann <felix.bau at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19887
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../linux/realtek/dts/rtl8393_hpe_1920-48g-poe.dts | 144 ++++++++++----------
 target/linux/realtek/dts/rtl8393_hpe_1920-48g.dts  | 146 ++++++++++-----------
 2 files changed, 145 insertions(+), 145 deletions(-)

diff --git a/target/linux/realtek/dts/rtl8393_hpe_1920-48g-poe.dts b/target/linux/realtek/dts/rtl8393_hpe_1920-48g-poe.dts
index e35ba85c35..7257e9e49b 100644
--- a/target/linux/realtek/dts/rtl8393_hpe_1920-48g-poe.dts
+++ b/target/linux/realtek/dts/rtl8393_hpe_1920-48g-poe.dts
@@ -17,81 +17,81 @@
 		#cooling-cells = <2>;
 	};
 
-        i2c0: i2c-gpio-0 {
-                compatible = "i2c-gpio";
-                sda-gpios = <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                scl-gpios = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                i2c-gpio,delay-us = <2>;
-                #address-cells = <1>;
-                #size-cells = <0>;
-        };
-
-        sfp0: sfp-p49 {
-                compatible = "sff,sfp";
-                i2c-bus = <&i2c0>;
-                los-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
-                mod-def0-gpio = <&gpio1 21 GPIO_ACTIVE_LOW>;
-                // tx-fault unconnected (TODO?)
-                // tx-disable connected to RTL8214FC (TODO?)
-        };
-
-        i2c1: i2c-gpio-1 {
-                compatible = "i2c-gpio";
-                sda-gpios = <&gpio1 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                scl-gpios = <&gpio1 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                i2c-gpio,delay-us = <2>;
-                #address-cells = <1>;
-                #size-cells = <0>;
-        };
-
-        sfp1: sfp-p50 {
-                compatible = "sff,sfp";
-                i2c-bus = <&i2c1>;
-                los-gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
-                mod-def0-gpio = <&gpio1 25 GPIO_ACTIVE_LOW>;
-                // tx-fault unconnected (TODO?)
-                // tx-disable connected to RTL8214FC (TODO?)
-        };
-
-        i2c2: i2c-gpio-2 {
-                compatible = "i2c-gpio";
-                sda-gpios = <&gpio1 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                scl-gpios = <&gpio1 28 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                i2c-gpio,delay-us = <2>;
-                #address-cells = <1>;
-                #size-cells = <0>;
-        };
-
-        sfp2: sfp-p51 {
-                compatible = "sff,sfp";
-                i2c-bus = <&i2c2>;
-                los-gpio = <&gpio1 30 GPIO_ACTIVE_HIGH>;
-                mod-def0-gpio = <&gpio1 29 GPIO_ACTIVE_LOW>;
-                // tx-fault unconnected (TODO?)
-                // tx-disable connected to RTL8214FC (TODO?)
-        };
-
-        i2c3: i2c-gpio-3 {
-                compatible = "i2c-gpio";
-                sda-gpios = <&gpio1 31 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                scl-gpios = <&gpio1 32 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                i2c-gpio,delay-us = <2>;
-                #address-cells = <1>;
-                #size-cells = <0>;
-        };
-
-        sfp3: sfp-p52 {
-                compatible = "sff,sfp";
-                i2c-bus = <&i2c3>;
-                los-gpio = <&gpio1 34 GPIO_ACTIVE_HIGH>;
-                mod-def0-gpio = <&gpio1 33 GPIO_ACTIVE_LOW>;
-                // tx-fault unconnected (TODO?)
-                // tx-disable connected to RTL8214FC (TODO?)
-        };
+	i2c0: i2c-gpio-0 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpio1 13 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpio1 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+
+	sfp0: sfp-p49 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c0>;
+		los-gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio1 21 GPIO_ACTIVE_LOW>;
+		// tx-fault unconnected (TODO?)
+		// tx-disable connected to RTL8214FC (TODO?)
+	};
+
+	i2c1: i2c-gpio-1 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpio1 23 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpio1 24 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+
+	sfp1: sfp-p50 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c1>;
+		los-gpio = <&gpio1 26 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio1 25 GPIO_ACTIVE_LOW>;
+		// tx-fault unconnected (TODO?)
+		// tx-disable connected to RTL8214FC (TODO?)
+	};
+
+	i2c2: i2c-gpio-2 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpio1 27 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpio1 28 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+
+	sfp2: sfp-p51 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c2>;
+		los-gpio = <&gpio1 30 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio1 29 GPIO_ACTIVE_LOW>;
+		// tx-fault unconnected (TODO?)
+		// tx-disable connected to RTL8214FC (TODO?)
+	};
+
+	i2c3: i2c-gpio-3 {
+		compatible = "i2c-gpio";
+		sda-gpios = <&gpio1 31 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		scl-gpios = <&gpio1 32 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		i2c-gpio,delay-us = <2>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+	};
+
+	sfp3: sfp-p52 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c3>;
+		los-gpio = <&gpio1 34 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio1 33 GPIO_ACTIVE_LOW>;
+		// tx-fault unconnected (TODO?)
+		// tx-disable connected to RTL8214FC (TODO?)
+	};
 };
 
 &ethernet0 {
-        mdio: mdio-bus {
+	mdio: mdio-bus {
 		EXTERNAL_SFP_PHY_FULL(48, 0)
 		EXTERNAL_SFP_PHY_FULL(49, 1)
 		EXTERNAL_SFP_PHY_FULL(50, 2)
diff --git a/target/linux/realtek/dts/rtl8393_hpe_1920-48g.dts b/target/linux/realtek/dts/rtl8393_hpe_1920-48g.dts
index 2f6f75e148..42bd4da2ad 100644
--- a/target/linux/realtek/dts/rtl8393_hpe_1920-48g.dts
+++ b/target/linux/realtek/dts/rtl8393_hpe_1920-48g.dts
@@ -6,82 +6,82 @@
 	compatible = "hpe,1920-48g", "realtek,rtl8393-soc";
 	model = "HPE 1920-48G (JG927A)";
 
-        i2c-gpio-shared0 {
-                compatible = "i2c-gpio-shared";
-                scl-gpios = <&gpio0 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                #address-cells = <1>;
-                #size-cells = <0>;
-
-                i2c0: i2c at 0 {
-                        sda-gpios = <&gpio0 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                        i2c-gpio,delay-us = <2>;
-                };
-
-                i2c2: i2c at 2 {
-                        sda-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                        i2c-gpio,delay-us = <2>;
-
-                };
-        };
-
-        i2c-gpio-shared1 {
-                compatible = "i2c-gpio-shared";
-                scl-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                #address-cells = <1>;
-                #size-cells = <0>;
-
-                i2c1: i2c at 1 {
-                        sda-gpios = <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                        i2c-gpio,delay-us = <2>;
-                };
-
-                i2c3: i2c at 3 {
-                        sda-gpios = <&gpio0 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
-                        i2c-gpio,delay-us = <2>;
-
-                };
-        };
-
-        sfp0: sfp-p49 {
-                compatible = "sff,sfp";
-                i2c-bus = <&i2c0>;
-                los-gpio = <&gpio0 20 GPIO_ACTIVE_HIGH>;
-                mod-def0-gpio = <&gpio0 19 GPIO_ACTIVE_LOW>;
-                // tx-fault unconnected (TODO?)
-                // tx-disable connected to RTL8214FC (TODO?)
-        };
-
-        sfp1: sfp-p50 {
-                compatible = "sff,sfp";
-                i2c-bus = <&i2c1>;
-                los-gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
-                mod-def0-gpio = <&gpio0 12 GPIO_ACTIVE_LOW>;
-                // tx-fault unconnected (TODO?)
-                // tx-disable connected to RTL8214FC (TODO?)
-        };
-
-        sfp2: sfp-p51 {
-                compatible = "sff,sfp";
-                i2c-bus = <&i2c2>;
-                los-gpio = <&gpio0 23 GPIO_ACTIVE_HIGH>;
-                mod-def0-gpio = <&gpio0 22 GPIO_ACTIVE_LOW>;
-                // tx-fault unconnected (TODO?)
-                // tx-disable connected to RTL8214FC (TODO?)
-        };
-
-        sfp3: sfp-p52 {
-                compatible = "sff,sfp";
-                i2c-bus = <&i2c3>;
-                los-gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
-                mod-def0-gpio = <&gpio0 15 GPIO_ACTIVE_LOW>;
-                // tx-fault unconnected (TODO?)
-                // tx-disable connected to RTL8214FC (TODO?)
-        };
+	i2c-gpio-shared0 {
+		compatible = "i2c-gpio-shared";
+		scl-gpios = <&gpio0 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		i2c0: i2c at 0 {
+			sda-gpios = <&gpio0 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+			i2c-gpio,delay-us = <2>;
+		};
+
+		i2c2: i2c at 2 {
+			sda-gpios = <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+			i2c-gpio,delay-us = <2>;
+
+		};
+	};
+
+	i2c-gpio-shared1 {
+		compatible = "i2c-gpio-shared";
+		scl-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		i2c1: i2c at 1 {
+			sda-gpios = <&gpio0 2 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+			i2c-gpio,delay-us = <2>;
+		};
+
+		i2c3: i2c at 3 {
+			sda-gpios = <&gpio0 14 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
+			i2c-gpio,delay-us = <2>;
+
+		};
+	};
+
+	sfp0: sfp-p49 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c0>;
+		los-gpio = <&gpio0 20 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio0 19 GPIO_ACTIVE_LOW>;
+		// tx-fault unconnected (TODO?)
+		// tx-disable connected to RTL8214FC (TODO?)
+	};
+
+	sfp1: sfp-p50 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c1>;
+		los-gpio = <&gpio0 13 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio0 12 GPIO_ACTIVE_LOW>;
+		// tx-fault unconnected (TODO?)
+		// tx-disable connected to RTL8214FC (TODO?)
+	};
+
+	sfp2: sfp-p51 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c2>;
+		los-gpio = <&gpio0 23 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio0 22 GPIO_ACTIVE_LOW>;
+		// tx-fault unconnected (TODO?)
+		// tx-disable connected to RTL8214FC (TODO?)
+	};
+
+	sfp3: sfp-p52 {
+		compatible = "sff,sfp";
+		i2c-bus = <&i2c3>;
+		los-gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
+		mod-def0-gpio = <&gpio0 15 GPIO_ACTIVE_LOW>;
+		// tx-fault unconnected (TODO?)
+		// tx-disable connected to RTL8214FC (TODO?)
+	};
 
 };
 
 &ethernet0 {
-        mdio: mdio-bus {
+	mdio: mdio-bus {
 		EXTERNAL_SFP_PHY_FULL(48, 1)
 		EXTERNAL_SFP_PHY_FULL(49, 3)
 		EXTERNAL_SFP_PHY_FULL(50, 0)
@@ -91,7 +91,7 @@
 
 
 &switch0 {
-        ports {
+	ports {
 		SWITCH_PORT(48, 50, qsgmii)
 		SWITCH_PORT(49, 52, qsgmii)
 		SWITCH_PORT(50, 49, qsgmii)



From lede-commits at lists.infradead.org  Sun Aug 31 05:23:51 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 08:23:51 -0400
Subject: [openwrt/openwrt]  mediatek: backport patches fixing thermal on
 MT7988
In-Reply-To: <175664303119.1575154.9083549844933811656@git-01.infra.openwrt.org>
References: <175664303119.1575154.9083549844933811656@git-01.infra.openwrt.org>
Message-ID: <mailman.134893.1756643551.1866309.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e181fee6a5e73414cf2233aa1a142890bbfef617

commit e181fee6a5e73414cf2233aa1a142890bbfef617
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sun Aug 31 02:24:04 2025 +0100

    mediatek: backport patches fixing thermal on MT7988
    
    Import upstream patches fixing issues with unreliable temperature
    reading on some batches of the MediaTek MT7988 SoCs.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...vers-mediatek-lvts_thermal-Change-lvts-co.patch |  77 +++++++++
 ...vers-mediatek-lvts_thermal-Add-lvts-comma.patch | 186 +++++++++++++++++++++
 ...vers-mediatek-lvts_thermal-Add-mt7988-lvt.patch |  57 +++++++
 3 files changed, 320 insertions(+)

diff --git a/target/linux/mediatek/patches-6.12/051-v6.17-thermal-drivers-mediatek-lvts_thermal-Change-lvts-co.patch b/target/linux/mediatek/patches-6.12/051-v6.17-thermal-drivers-mediatek-lvts_thermal-Change-lvts-co.patch
new file mode 100644
index 0000000000..b0748acd40
--- /dev/null
+++ b/target/linux/mediatek/patches-6.12/051-v6.17-thermal-drivers-mediatek-lvts_thermal-Change-lvts-co.patch
@@ -0,0 +1,77 @@
+From 4bbb3598b81eaa329df9c03d9a0cd4d1c70e73a4 Mon Sep 17 00:00:00 2001
+From: Mason Chang <mason-cw.chang at mediatek.com>
+Date: Mon, 26 May 2025 18:26:57 +0800
+Subject: [PATCH 1/3] thermal/drivers/mediatek/lvts_thermal: Change lvts
+ commands array to static const
+
+Change the LVTS commands array to static const in preparation for
+adding different commands.
+
+Signed-off-by: Mason Chang <mason-cw.chang at mediatek.com>
+Link: https://lore.kernel.org/r/20250526102659.30225-2-mason-cw.chang at mediatek.com
+Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
+(cherry picked from commit c5d5a72c01f7faabe7cc0fd63942c18372101daf)
+---
+ drivers/thermal/mediatek/lvts_thermal.c | 29 +++++++++++++------------
+ 1 file changed, 15 insertions(+), 14 deletions(-)
+
+--- a/drivers/thermal/mediatek/lvts_thermal.c
++++ b/drivers/thermal/mediatek/lvts_thermal.c
+@@ -92,6 +92,17 @@
+ 
+ #define LVTS_MINIMUM_THRESHOLD		20000
+ 
++static const u32 default_conn_cmds[] = { 0xC103FFFF, 0xC502FF55 };
++/*
++ * Write device mask: 0xC1030000
++ */
++static const u32 default_init_cmds[] = {
++	0xC1030E01, 0xC1030CFC, 0xC1030A8C, 0xC103098D, 0xC10308F1,
++	0xC10307A6, 0xC10306B8, 0xC1030500, 0xC1030420, 0xC1030300,
++	0xC1030030, 0xC10300F6, 0xC1030050, 0xC1030060, 0xC10300AC,
++	0xC10300FC, 0xC103009D, 0xC10300F1, 0xC10300E1
++};
++
+ static int golden_temp = LVTS_GOLDEN_TEMP_DEFAULT;
+ static int golden_temp_offset;
+ 
+@@ -880,7 +891,7 @@ static void lvts_ctrl_monitor_enable(str
+  * each write in the configuration register must be separated by a
+  * delay of 2 us.
+  */
+-static void lvts_write_config(struct lvts_ctrl *lvts_ctrl, u32 *cmds, int nr_cmds)
++static void lvts_write_config(struct lvts_ctrl *lvts_ctrl, const u32 *cmds, int nr_cmds)
+ {
+ 	int i;
+ 
+@@ -963,9 +974,9 @@ static int lvts_ctrl_set_enable(struct l
+ 
+ static int lvts_ctrl_connect(struct device *dev, struct lvts_ctrl *lvts_ctrl)
+ {
+-	u32 id, cmds[] = { 0xC103FFFF, 0xC502FF55 };
++	u32 id;
+ 
+-	lvts_write_config(lvts_ctrl, cmds, ARRAY_SIZE(cmds));
++	lvts_write_config(lvts_ctrl, default_conn_cmds, ARRAY_SIZE(default_conn_cmds));
+ 
+ 	/*
+ 	 * LVTS_ID : Get ID and status of the thermal controller
+@@ -984,17 +995,7 @@ static int lvts_ctrl_connect(struct devi
+ 
+ static int lvts_ctrl_initialize(struct device *dev, struct lvts_ctrl *lvts_ctrl)
+ {
+-	/*
+-	 * Write device mask: 0xC1030000
+-	 */
+-	u32 cmds[] = {
+-		0xC1030E01, 0xC1030CFC, 0xC1030A8C, 0xC103098D, 0xC10308F1,
+-		0xC10307A6, 0xC10306B8, 0xC1030500, 0xC1030420, 0xC1030300,
+-		0xC1030030, 0xC10300F6, 0xC1030050, 0xC1030060, 0xC10300AC,
+-		0xC10300FC, 0xC103009D, 0xC10300F1, 0xC10300E1
+-	};
+-
+-	lvts_write_config(lvts_ctrl, cmds, ARRAY_SIZE(cmds));
++	lvts_write_config(lvts_ctrl, default_init_cmds, ARRAY_SIZE(default_init_cmds));
+ 
+ 	return 0;
+ }
diff --git a/target/linux/mediatek/patches-6.12/052-v6.17-thermal-drivers-mediatek-lvts_thermal-Add-lvts-comma.patch b/target/linux/mediatek/patches-6.12/052-v6.17-thermal-drivers-mediatek-lvts_thermal-Add-lvts-comma.patch
new file mode 100644
index 0000000000..8a3ee0b17a
--- /dev/null
+++ b/target/linux/mediatek/patches-6.12/052-v6.17-thermal-drivers-mediatek-lvts_thermal-Add-lvts-comma.patch
@@ -0,0 +1,186 @@
+From 75d0dd334963fb3e3a85b8ceadd48071daa8165f Mon Sep 17 00:00:00 2001
+From: Mason Chang <mason-cw.chang at mediatek.com>
+Date: Mon, 26 May 2025 18:26:58 +0800
+Subject: [PATCH 2/3] thermal/drivers/mediatek/lvts_thermal: Add lvts commands
+ and their sizes to driver data
+
+Add LVTS commands and their sizes to driver data in preparation for
+adding different commands.
+
+Signed-off-by: Mason Chang <mason-cw.chang at mediatek.com>
+Link: https://lore.kernel.org/r/20250526102659.30225-3-mason-cw.chang at mediatek.com
+Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
+(cherry picked from commit 6203a5e6fd090ed05f6d9b92e33bc7e7679a3dd6)
+---
+ drivers/thermal/mediatek/lvts_thermal.c | 65 ++++++++++++++++++++-----
+ 1 file changed, 52 insertions(+), 13 deletions(-)
+
+--- a/drivers/thermal/mediatek/lvts_thermal.c
++++ b/drivers/thermal/mediatek/lvts_thermal.c
+@@ -92,17 +92,6 @@
+ 
+ #define LVTS_MINIMUM_THRESHOLD		20000
+ 
+-static const u32 default_conn_cmds[] = { 0xC103FFFF, 0xC502FF55 };
+-/*
+- * Write device mask: 0xC1030000
+- */
+-static const u32 default_init_cmds[] = {
+-	0xC1030E01, 0xC1030CFC, 0xC1030A8C, 0xC103098D, 0xC10308F1,
+-	0xC10307A6, 0xC10306B8, 0xC1030500, 0xC1030420, 0xC1030300,
+-	0xC1030030, 0xC10300F6, 0xC1030050, 0xC1030060, 0xC10300AC,
+-	0xC10300FC, 0xC103009D, 0xC10300F1, 0xC10300E1
+-};
+-
+ static int golden_temp = LVTS_GOLDEN_TEMP_DEFAULT;
+ static int golden_temp_offset;
+ 
+@@ -132,7 +121,11 @@ struct lvts_ctrl_data {
+ 
+ struct lvts_data {
+ 	const struct lvts_ctrl_data *lvts_ctrl;
++	const u32 *conn_cmd;
++	const u32 *init_cmd;
+ 	int num_lvts_ctrl;
++	int num_conn_cmd;
++	int num_init_cmd;
+ 	int temp_factor;
+ 	int temp_offset;
+ 	int gt_calib_bit_offset;
+@@ -974,9 +967,10 @@ static int lvts_ctrl_set_enable(struct l
+ 
+ static int lvts_ctrl_connect(struct device *dev, struct lvts_ctrl *lvts_ctrl)
+ {
++	const struct lvts_data *lvts_data = lvts_ctrl->lvts_data;
+ 	u32 id;
+ 
+-	lvts_write_config(lvts_ctrl, default_conn_cmds, ARRAY_SIZE(default_conn_cmds));
++	lvts_write_config(lvts_ctrl, lvts_data->conn_cmd, lvts_data->num_conn_cmd);
+ 
+ 	/*
+ 	 * LVTS_ID : Get ID and status of the thermal controller
+@@ -995,7 +989,9 @@ static int lvts_ctrl_connect(struct devi
+ 
+ static int lvts_ctrl_initialize(struct device *dev, struct lvts_ctrl *lvts_ctrl)
+ {
+-	lvts_write_config(lvts_ctrl, default_init_cmds, ARRAY_SIZE(default_init_cmds));
++	const struct lvts_data *lvts_data = lvts_ctrl->lvts_data;
++
++	lvts_write_config(lvts_ctrl, lvts_data->init_cmd, lvts_data->num_init_cmd);
+ 
+ 	return 0;
+ }
+@@ -1424,6 +1420,17 @@ static int lvts_resume(struct device *de
+ 	return 0;
+ }
+ 
++static const u32 default_conn_cmds[] = { 0xC103FFFF, 0xC502FF55 };
++/*
++ * Write device mask: 0xC1030000
++ */
++static const u32 default_init_cmds[] = {
++	0xC1030E01, 0xC1030CFC, 0xC1030A8C, 0xC103098D, 0xC10308F1,
++	0xC10307A6, 0xC10306B8, 0xC1030500, 0xC1030420, 0xC1030300,
++	0xC1030030, 0xC10300F6, 0xC1030050, 0xC1030060, 0xC10300AC,
++	0xC10300FC, 0xC103009D, 0xC10300F1, 0xC10300E1
++};
++
+ /*
+  * The MT8186 calibration data is stored as packed 3-byte little-endian
+  * values using a weird layout that makes sense only when viewed as a 32-bit
+@@ -1718,7 +1725,11 @@ static const struct lvts_ctrl_data mt819
+ 
+ static const struct lvts_data mt7988_lvts_ap_data = {
+ 	.lvts_ctrl	= mt7988_lvts_ap_data_ctrl,
++	.conn_cmd	= default_conn_cmds,
++	.init_cmd	= default_init_cmds,
+ 	.num_lvts_ctrl	= ARRAY_SIZE(mt7988_lvts_ap_data_ctrl),
++	.num_conn_cmd	= ARRAY_SIZE(default_conn_cmds),
++	.num_init_cmd	= ARRAY_SIZE(default_init_cmds),
+ 	.temp_factor	= LVTS_COEFF_A_MT7988,
+ 	.temp_offset	= LVTS_COEFF_B_MT7988,
+ 	.gt_calib_bit_offset = 24,
+@@ -1726,7 +1737,11 @@ static const struct lvts_data mt7988_lvt
+ 
+ static const struct lvts_data mt8186_lvts_data = {
+ 	.lvts_ctrl	= mt8186_lvts_data_ctrl,
++	.conn_cmd	= default_conn_cmds,
++	.init_cmd	= default_init_cmds,
+ 	.num_lvts_ctrl	= ARRAY_SIZE(mt8186_lvts_data_ctrl),
++	.num_conn_cmd	= ARRAY_SIZE(default_conn_cmds),
++	.num_init_cmd	= ARRAY_SIZE(default_init_cmds),
+ 	.temp_factor	= LVTS_COEFF_A_MT7988,
+ 	.temp_offset	= LVTS_COEFF_B_MT7988,
+ 	.gt_calib_bit_offset = 24,
+@@ -1735,7 +1750,11 @@ static const struct lvts_data mt8186_lvt
+ 
+ static const struct lvts_data mt8188_lvts_mcu_data = {
+ 	.lvts_ctrl	= mt8188_lvts_mcu_data_ctrl,
++	.conn_cmd	= default_conn_cmds,
++	.init_cmd	= default_init_cmds,
+ 	.num_lvts_ctrl	= ARRAY_SIZE(mt8188_lvts_mcu_data_ctrl),
++	.num_conn_cmd	= ARRAY_SIZE(default_conn_cmds),
++	.num_init_cmd	= ARRAY_SIZE(default_init_cmds),
+ 	.temp_factor	= LVTS_COEFF_A_MT8195,
+ 	.temp_offset	= LVTS_COEFF_B_MT8195,
+ 	.gt_calib_bit_offset = 20,
+@@ -1744,7 +1763,11 @@ static const struct lvts_data mt8188_lvt
+ 
+ static const struct lvts_data mt8188_lvts_ap_data = {
+ 	.lvts_ctrl	= mt8188_lvts_ap_data_ctrl,
++	.conn_cmd	= default_conn_cmds,
++	.init_cmd	= default_init_cmds,
+ 	.num_lvts_ctrl	= ARRAY_SIZE(mt8188_lvts_ap_data_ctrl),
++	.num_conn_cmd	= ARRAY_SIZE(default_conn_cmds),
++	.num_init_cmd	= ARRAY_SIZE(default_init_cmds),
+ 	.temp_factor	= LVTS_COEFF_A_MT8195,
+ 	.temp_offset	= LVTS_COEFF_B_MT8195,
+ 	.gt_calib_bit_offset = 20,
+@@ -1753,7 +1776,11 @@ static const struct lvts_data mt8188_lvt
+ 
+ static const struct lvts_data mt8192_lvts_mcu_data = {
+ 	.lvts_ctrl	= mt8192_lvts_mcu_data_ctrl,
++	.conn_cmd	= default_conn_cmds,
++	.init_cmd	= default_init_cmds,
+ 	.num_lvts_ctrl	= ARRAY_SIZE(mt8192_lvts_mcu_data_ctrl),
++	.num_conn_cmd	= ARRAY_SIZE(default_conn_cmds),
++	.num_init_cmd	= ARRAY_SIZE(default_init_cmds),
+ 	.temp_factor	= LVTS_COEFF_A_MT8195,
+ 	.temp_offset	= LVTS_COEFF_B_MT8195,
+ 	.gt_calib_bit_offset = 24,
+@@ -1762,7 +1789,11 @@ static const struct lvts_data mt8192_lvt
+ 
+ static const struct lvts_data mt8192_lvts_ap_data = {
+ 	.lvts_ctrl	= mt8192_lvts_ap_data_ctrl,
++	.conn_cmd	= default_conn_cmds,
++	.init_cmd	= default_init_cmds,
+ 	.num_lvts_ctrl	= ARRAY_SIZE(mt8192_lvts_ap_data_ctrl),
++	.num_conn_cmd	= ARRAY_SIZE(default_conn_cmds),
++	.num_init_cmd	= ARRAY_SIZE(default_init_cmds),
+ 	.temp_factor	= LVTS_COEFF_A_MT8195,
+ 	.temp_offset	= LVTS_COEFF_B_MT8195,
+ 	.gt_calib_bit_offset = 24,
+@@ -1771,7 +1802,11 @@ static const struct lvts_data mt8192_lvt
+ 
+ static const struct lvts_data mt8195_lvts_mcu_data = {
+ 	.lvts_ctrl	= mt8195_lvts_mcu_data_ctrl,
++	.conn_cmd	= default_conn_cmds,
++	.init_cmd	= default_init_cmds,
+ 	.num_lvts_ctrl	= ARRAY_SIZE(mt8195_lvts_mcu_data_ctrl),
++	.num_conn_cmd	= ARRAY_SIZE(default_conn_cmds),
++	.num_init_cmd	= ARRAY_SIZE(default_init_cmds),
+ 	.temp_factor	= LVTS_COEFF_A_MT8195,
+ 	.temp_offset	= LVTS_COEFF_B_MT8195,
+ 	.gt_calib_bit_offset = 24,
+@@ -1780,7 +1815,11 @@ static const struct lvts_data mt8195_lvt
+ 
+ static const struct lvts_data mt8195_lvts_ap_data = {
+ 	.lvts_ctrl	= mt8195_lvts_ap_data_ctrl,
++	.conn_cmd	= default_conn_cmds,
++	.init_cmd	= default_init_cmds,
+ 	.num_lvts_ctrl	= ARRAY_SIZE(mt8195_lvts_ap_data_ctrl),
++	.num_conn_cmd	= ARRAY_SIZE(default_conn_cmds),
++	.num_init_cmd	= ARRAY_SIZE(default_init_cmds),
+ 	.temp_factor	= LVTS_COEFF_A_MT8195,
+ 	.temp_offset	= LVTS_COEFF_B_MT8195,
+ 	.gt_calib_bit_offset = 24,
diff --git a/target/linux/mediatek/patches-6.12/053-v6.17-thermal-drivers-mediatek-lvts_thermal-Add-mt7988-lvt.patch b/target/linux/mediatek/patches-6.12/053-v6.17-thermal-drivers-mediatek-lvts_thermal-Add-mt7988-lvt.patch
new file mode 100644
index 0000000000..0767933253
--- /dev/null
+++ b/target/linux/mediatek/patches-6.12/053-v6.17-thermal-drivers-mediatek-lvts_thermal-Add-mt7988-lvt.patch
@@ -0,0 +1,57 @@
+From 744e2e82b28cb28f8cd2cc4ee788a5c950b12aa2 Mon Sep 17 00:00:00 2001
+From: Mason Chang <mason-cw.chang at mediatek.com>
+Date: Mon, 26 May 2025 18:26:59 +0800
+Subject: [PATCH 3/3] thermal/drivers/mediatek/lvts_thermal: Add mt7988 lvts
+ commands
+
+These commands are necessary to avoid severely abnormal and inaccurate
+temperature readings that are caused by using the default commands.
+
+Signed-off-by: Mason Chang <mason-cw.chang at mediatek.com>
+Link: https://lore.kernel.org/r/20250526102659.30225-4-mason-cw.chang at mediatek.com
+Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
+(cherry picked from commit 685a755089f95b7e205c0202567d9a647f9de096)
+---
+ drivers/thermal/mediatek/lvts_thermal.c | 16 ++++++++++++----
+ 1 file changed, 12 insertions(+), 4 deletions(-)
+
+--- a/drivers/thermal/mediatek/lvts_thermal.c
++++ b/drivers/thermal/mediatek/lvts_thermal.c
+@@ -1421,6 +1421,8 @@ static int lvts_resume(struct device *de
+ }
+ 
+ static const u32 default_conn_cmds[] = { 0xC103FFFF, 0xC502FF55 };
++static const u32 mt7988_conn_cmds[] = { 0xC103FFFF, 0xC502FC55 };
++
+ /*
+  * Write device mask: 0xC1030000
+  */
+@@ -1431,6 +1433,12 @@ static const u32 default_init_cmds[] = {
+ 	0xC10300FC, 0xC103009D, 0xC10300F1, 0xC10300E1
+ };
+ 
++static const u32 mt7988_init_cmds[] = {
++	0xC1030300, 0xC1030420, 0xC1030500, 0xC10307A6, 0xC1030CFC,
++	0xC1030A8C, 0xC103098D, 0xC10308F1, 0xC1030B04, 0xC1030E01,
++	0xC10306B8
++};
++
+ /*
+  * The MT8186 calibration data is stored as packed 3-byte little-endian
+  * values using a weird layout that makes sense only when viewed as a 32-bit
+@@ -1725,11 +1733,11 @@ static const struct lvts_ctrl_data mt819
+ 
+ static const struct lvts_data mt7988_lvts_ap_data = {
+ 	.lvts_ctrl	= mt7988_lvts_ap_data_ctrl,
+-	.conn_cmd	= default_conn_cmds,
+-	.init_cmd	= default_init_cmds,
++	.conn_cmd	= mt7988_conn_cmds,
++	.init_cmd	= mt7988_init_cmds,
+ 	.num_lvts_ctrl	= ARRAY_SIZE(mt7988_lvts_ap_data_ctrl),
+-	.num_conn_cmd	= ARRAY_SIZE(default_conn_cmds),
+-	.num_init_cmd	= ARRAY_SIZE(default_init_cmds),
++	.num_conn_cmd	= ARRAY_SIZE(mt7988_conn_cmds),
++	.num_init_cmd	= ARRAY_SIZE(mt7988_init_cmds),
+ 	.temp_factor	= LVTS_COEFF_A_MT7988,
+ 	.temp_offset	= LVTS_COEFF_B_MT7988,
+ 	.gt_calib_bit_offset = 24,



From lede-commits at lists.infradead.org  Sun Aug 31 09:31:51 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 12:31:51 -0400
Subject: [openwrt/openwrt]  armsr: add patch (hack) to enable all "default"
 consoles
In-Reply-To: <175665791146.2344108.16363597300571466721@git-01.infra.openwrt.org>
References: <175665791146.2344108.16363597300571466721@git-01.infra.openwrt.org>
Message-ID: <mailman.134953.1756658788.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/20271bf505cf3b37527ec90d0c3dc173d6b6efac

commit 20271bf505cf3b37527ec90d0c3dc173d6b6efac
Author: Mathew McBride <matt at traverse.com.au>
AuthorDate: Thu Jan 16 12:20:56 2025 +1100

    armsr: add patch (hack) to enable all "default" consoles
    
    A previous change added 'console=tty1' to the default kernel command
    line on armsr, in order to ensure the framebuffer console is enabled
    on systems capable of graphics output.
    
    Unfortunately, this change broke boards that used device tree
    (DT) firmware with serial consoles, as the serial console
    specified by the system firmware (stdout-path) was no longer
    setup by the kernel.
    
    A bit of probing determined that the SPCR (serial port console
    direction table) on ACPI systems was preventing Linux from setting
    up a default framebuffer console on these systems (which is why
    console=tty1 was added).
    
    (The affected ACPI systems are usually VMs using QEMU's
    'virt' machine and EDK2 firmware. The firmware on these systems
    does not remove the SPCR when a screen is present)
    
    So to ensure all possible systems are setup correctly, we modify
    the kernel so all "default" console types (serial and screen)
    are setup when no console= arguments are specified on the kernel
    command line.
    
    Signed-off-by: Mathew McBride <matt at traverse.com.au>
    Fixes: c099523d66a3 ("use console=tty1 to make console more
    readily available")
    Link: https://github.com/openwrt/openwrt/pull/17012
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit 3697022ce34cb6be196d62f1dbdf677bf6cabc22)
    Link: https://github.com/openwrt/openwrt/pull/19894
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../300-printk-always-setup-default-consoles.patch | 47 ++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/target/linux/armsr/patches-6.6/300-printk-always-setup-default-consoles.patch b/target/linux/armsr/patches-6.6/300-printk-always-setup-default-consoles.patch
new file mode 100644
index 0000000000..076bfd21da
--- /dev/null
+++ b/target/linux/armsr/patches-6.6/300-printk-always-setup-default-consoles.patch
@@ -0,0 +1,47 @@
+From 0059efbd0f9c291795078fb4e50722641d525f38 Mon Sep 17 00:00:00 2001
+From: Mathew McBride <matt at traverse.com.au>
+Date: Thu, 16 Jan 2025 11:48:44 +1100
+Subject: [PATCH] printk: always setup default (tty0 + stdout / SPCR) consoles
+ when no console= present
+
+(This is a hack specific to OpenWrt's armsr target)
+
+This change resolves a difference in behaviour between arm64 ACPI
+and DT systems.
+Our usecase is to ensure the system console is always present
+regardless of display mode (serial port or screen).
+
+Both ACPI and DT have mechanisms to setup a serial console from
+information passed by firmware (SPCR and stdout-path respectively).
+
+On ACPI systems, the SPCR table is parsed very early on in the kernel
+boot which prevents the screen console (tty0) from appearing if it is
+not explicitly set.
+
+We would like to avoid specifying console= arguments as there are many
+possible configurations on the serial side (like ttyS0, ttyAMA0, ttymxc0
+etc.).
+
+If the kernel does not consume the serial port in SPCR/stdout-path,
+then the 'default' settings from the firmware (baud rate etc.) are lost.
+
+If the system administrator explicitly specifies a console= argument,
+then the old behaviour is returned.
+
+Signed-off-by: Mathew McBride <matt at traverse.com.au>
+Link: https://github.com/openwrt/openwrt/pull/17012#issuecomment-2591751115
+---
+ kernel/printk/printk.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/kernel/printk/printk.c
++++ b/kernel/printk/printk.c
+@@ -3515,7 +3515,7 @@ void register_console(struct console *ne
+ 	 * Note that a console with tty binding will have CON_CONSDEV
+ 	 * flag set and will be first in the list.
+ 	 */
+-	if (preferred_console < 0) {
++	if (!console_set_on_cmdline) {
+ 		if (hlist_empty(&console_list) || !console_first()->device ||
+ 		    console_first()->flags & CON_BOOT) {
+ 			try_enable_default_console(newcon);



From lede-commits at lists.infradead.org  Sun Aug 31 09:31:52 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 12:31:52 -0400
Subject: [openwrt/openwrt]  armsr: remove 'console=tty1' from kernel command
 line
In-Reply-To: <175665791146.2344108.16363597300571466721@git-01.infra.openwrt.org>
References: <175665791146.2344108.16363597300571466721@git-01.infra.openwrt.org>
Message-ID: <mailman.134954.1756658788.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/6ae235bcd0433183edcd25b333000c35b92970f8

commit 6ae235bcd0433183edcd25b333000c35b92970f8
Author: Mathew McBride <matt at traverse.com.au>
AuthorDate: Thu Jan 16 12:27:58 2025 +1100

    armsr: remove 'console=tty1' from kernel command line
    
    We have modified the kernel to setup all "default" consoles,
    including serial ports and framebuffers/screens, providing
    no console= argument is supplied on the kernel command line.
    
    Adding 'console=tty1' caused the 'default' serial port on
    device tree systems to break, as the kernel would not carry
    over the settings (like baud rate) from the bootloader.
    
    The system administrator can still force the use of a
    specific console by adding their own console= arguments.
    
    Signed-off-by: Mathew McBride <matt at traverse.com.au>
    Fixes: c099523d66a3 ("armsr: use console=tty1 to make
    console more readily available")
    Link: https://github.com/openwrt/openwrt/pull/17012
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit bff179de73e36b0c27b5eefa1a967e956bb620cd)
    Link: https://github.com/openwrt/openwrt/pull/19894
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/armsr/image/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/target/linux/armsr/image/Makefile b/target/linux/armsr/image/Makefile
index b34c1f16e7..79173e67da 100644
--- a/target/linux/armsr/image/Makefile
+++ b/target/linux/armsr/image/Makefile
@@ -12,7 +12,6 @@ GRUB_TERMINAL_CONFIG =
 GRUB_CONSOLE_CMDLINE = earlycon
 
 ifneq ($(CONFIG_GRUB_CONSOLE),)
-  GRUB_CONSOLE_CMDLINE += console=tty1
   GRUB_TERMINALS += console
 endif
 



From lede-commits at lists.infradead.org  Sun Aug 31 10:06:55 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:06:55 -0400
Subject: [openwrt/openwrt]  ipq-wifi: update to Git HEAD (2025-08-25)
In-Reply-To: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
References: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
Message-ID: <mailman.134957.1756660016.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/e6bb072af52e8bf31b6e57e5f1e792a3bd5732f4

commit e6bb072af52e8bf31b6e57e5f1e792a3bd5732f4
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Aug 25 10:51:03 2025 +0200

    ipq-wifi: update to Git HEAD (2025-08-25)
    
    a510502e7922 qca9988: add BDFs for Xiaomi AIoT Router AC2350
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit 30e20d8cb2de37b076c4f3bb0bf3bdfa172a53c5)
    Link: https://github.com/openwrt/openwrt/pull/19902
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/ipq-wifi/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 709c695110..ecc52c7aa2 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -6,9 +6,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
-PKG_SOURCE_DATE:=2025-08-12
-PKG_SOURCE_VERSION:=30b99fc9cc138e2775a0595cfd4dba43dff50ea8
-PKG_MIRROR_HASH:=de3fd5791077c1e91bbf9cf570925bcd2a7c0cf8168b754bf05649bff939ea7b
+PKG_SOURCE_DATE:=2025-08-25
+PKG_SOURCE_VERSION:=a510502e7922b0a61e455e43479a62e7d27cf3ba
+PKG_MIRROR_HASH:=0b8120ce09fdd9176e77b65f2c0866e14aa580ba7e6dd9440f37011418346be7
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Sun Aug 31 10:06:51 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:06:51 -0400
Subject: [openwrt/openwrt]  ipq-wifi: update to Git HEAD (2025-06-13)
In-Reply-To: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
References: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
Message-ID: <mailman.134958.1756660016.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/777d90a935c96bb83cfb681de30d43aa3c749d8e

commit 777d90a935c96bb83cfb681de30d43aa3c749d8e
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Fri Jun 13 10:57:04 2025 +0200

    ipq-wifi: update to Git HEAD (2025-06-13)
    
    5be4c60a9084 ipq5018: add BDF for Xiaomi AX6000
    22588512b844 qcn9074: add BDF for Xiaomi AX6000
    4810aacf3b1c qca9889: add BDF for Xiaomi AX6000
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit 17d7e0bf9057921d1aa931a413449b4ce867fbc7)
    Link: https://github.com/openwrt/openwrt/pull/19902
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/ipq-wifi/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 818069927d..cb914fcf23 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -6,9 +6,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
-PKG_SOURCE_DATE:=2025-06-11
-PKG_SOURCE_VERSION:=1d8452d844b9d0b579957761743e3d1c98e6df6e
-PKG_MIRROR_HASH:=56185371ba9db6509011cb31fab9ffcac5c2acd06624aa56d9d08e8278d56660
+PKG_SOURCE_DATE:=2025-06-13
+PKG_SOURCE_VERSION:=4810aacf3b1c5de99923b9a424a1f0e6341c6bca
+PKG_MIRROR_HASH:=78d1102702a9d5894c6e70620c144fcf40d27cac8682dc340b31786e4bd190b8
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Sun Aug 31 10:06:52 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:06:52 -0400
Subject: [openwrt/openwrt]  ipq-wifi: add BDF for IgniteNet SS-W2-AC2600
In-Reply-To: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
References: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
Message-ID: <mailman.134959.1756660018.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/c4ea5c073254f7069881a5dbeaf477a471529c5d

commit c4ea5c073254f7069881a5dbeaf477a471529c5d
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Jun 10 18:51:14 2025 +0200

    ipq-wifi: add BDF for IgniteNet SS-W2-AC2600
    
    The IgniteNet SunSpot AC Wave2 comes with 2x QCA9994 ath10k chips
    connected to the IPQ8068 SoC via PCIe.
    Add board-2.bin for both radios on this board.
    
     3ac4a64 qca9984: add BDFs for IgniteNet SS-W2-AC2600
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
    (cherry picked from commit d8303b47218811432b8a2e5db58c02dcb74045ff)
    Link: https://github.com/openwrt/openwrt/pull/19902
    [Do not add ignitenet_ss-w2-ac2600]
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/ipq-wifi/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index cb914fcf23..7bf0ee19a8 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -6,9 +6,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
-PKG_SOURCE_DATE:=2025-06-13
-PKG_SOURCE_VERSION:=4810aacf3b1c5de99923b9a424a1f0e6341c6bca
-PKG_MIRROR_HASH:=78d1102702a9d5894c6e70620c144fcf40d27cac8682dc340b31786e4bd190b8
+PKG_SOURCE_DATE:=2025-06-14
+PKG_SOURCE_VERSION:=3ac4a6421880443de2f4562ff0f33aefaaf75585
+PKG_MIRROR_HASH:=5e55fcc00585c16c0da0f9b1c2e24d444b36f326867be4f8640fae01901686c5
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Sun Aug 31 10:06:54 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:06:54 -0400
Subject: [openwrt/openwrt]  ipq-wifi: update to Git HEAD (2025-08-12)
In-Reply-To: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
References: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
Message-ID: <mailman.134960.1756660018.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/d24790448255e2590b7afb4fbf60166cdf67c7b6

commit d24790448255e2590b7afb4fbf60166cdf67c7b6
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue Aug 12 11:11:47 2025 +0200

    ipq-wifi: update to Git HEAD (2025-08-12)
    
    967cfe977926 qca9988: add BDFs for Xiaomi AIoT Router AC2350
    6db497116709 qcn9274: update board file for 8devices Kiwi-DVK
    7a161011d89d Add IPQ5018 and QCN9074 BDF for Yuncore AX850.
    30b99fc9cc13 ipq6018: add jdcloud_re-ss-01 BDF
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit f9a8a3636c0079d01bcd2ea2458929c2f33a6458)
    Link: https://github.com/openwrt/openwrt/pull/19902
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/ipq-wifi/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 120fa18684..709c695110 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -6,9 +6,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
-PKG_SOURCE_DATE:=2025-06-23
-PKG_SOURCE_VERSION:=63bd0faafd4a261deae27bb233e10ae2f216c755
-PKG_MIRROR_HASH:=dcdc847e0f6a5655df9018ead35396f4414447b140cbfd3b24dd03514e27cf0e
+PKG_SOURCE_DATE:=2025-08-12
+PKG_SOURCE_VERSION:=30b99fc9cc138e2775a0595cfd4dba43dff50ea8
+PKG_MIRROR_HASH:=de3fd5791077c1e91bbf9cf570925bcd2a7c0cf8168b754bf05649bff939ea7b
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Sun Aug 31 10:06:50 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:06:50 -0400
Subject: [openwrt/openwrt]  ipq-wifi: update to Git HEAD (2025-06-11)
In-Reply-To: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
References: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
Message-ID: <mailman.134963.1756660018.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/bd7ab1e9ce6421c22ed00bf8c1a4edd3e5855112

commit bd7ab1e9ce6421c22ed00bf8c1a4edd3e5855112
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Thu Jun 12 10:53:36 2025 +0200

    ipq-wifi: update to Git HEAD (2025-06-11)
    
    79ba11f2da5e qca9888: add TP-Link WA1201 v2 BDF
    abf47841e7e4 qca9988: add BDFs for Xiaomi AIoT Router AC2350
    07af197b77fa qca9988: add BDFs for Xiaomi AIoT Router AC2350
    61dbb1c3d694 ipq5018: add BDF for I-O DATA WN-DAX3000GR
    1d8452d844b9 qcn6122: add BDF for I-O DATA WN-DAX3000GR
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit 12fd5e8f843fefc24a35536d7dab5fd719f03033)
    Link: https://github.com/openwrt/openwrt/pull/19902
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/ipq-wifi/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index b7a492be32..818069927d 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -6,9 +6,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
-PKG_SOURCE_DATE:=2025-05-30
-PKG_SOURCE_VERSION:=fde3d2a7ce59be389224304049a4a5b9ca49a45e
-PKG_MIRROR_HASH:=2e149366118192d4976baf42ac23d22ef32e477feb111d2756a2411278b6cf46
+PKG_SOURCE_DATE:=2025-06-11
+PKG_SOURCE_VERSION:=1d8452d844b9d0b579957761743e3d1c98e6df6e
+PKG_MIRROR_HASH:=56185371ba9db6509011cb31fab9ffcac5c2acd06624aa56d9d08e8278d56660
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Sun Aug 31 10:06:57 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:06:57 -0400
Subject: [openwrt/openwrt]  ath79: add calibtation variant for Xiaomi AIoT
 AC2350
In-Reply-To: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
References: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
Message-ID: <mailman.134964.1756660018.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/3db4d8f23ade6bd46a62723533add42d10b66f0a

commit 3db4d8f23ade6bd46a62723533add42d10b66f0a
Author: Igor Dyatlov <dyatlov.igor at gmail.com>
AuthorDate: Sun Aug 3 17:20:00 2025 +0300

    ath79: add calibtation variant for Xiaomi AIoT AC2350
    
    Add calibration variant and ipq-wifi package for Xiaomi AIoT AC2350
    
    Signed-off-by: Igor Dyatlov <dyatlov.igor at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19707
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit 664424aaeb4a7b74123cc94c536e42fa925cf8c3)
    Link: https://github.com/openwrt/openwrt/pull/19902
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts | 1 +
 target/linux/ath79/image/generic.mk                   | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts b/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
index cff567e497..69d75e9b55 100644
--- a/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
+++ b/target/linux/ath79/dts/qca9563_xiaomi_aiot-ac2350.dts
@@ -201,5 +201,6 @@
 		reg = <0x0000 0 0 0 0>;
 		nvmem-cells = <&precal_art_5000>;
 		nvmem-cell-names = "pre-calibration";
+		qcom,ath10k-calibration-variant = "Xiaomi-AIoT-AC2350";
 	};
 };
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 846a9acd20..e7aed14bd3 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -3263,7 +3263,7 @@ define Device/xiaomi_aiot-ac2350
   SOC := qca9563
   DEVICE_VENDOR := Xiaomi
   DEVICE_MODEL := AIoT AC2350
-  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9984-ct
+  DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9984-ct ipq-wifi-xiaomi_aiot-ac2350
   IMAGE_SIZE := 14336k
 endef
 TARGET_DEVICES += xiaomi_aiot-ac2350



From lede-commits at lists.infradead.org  Sun Aug 31 10:06:56 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:06:56 -0400
Subject: [openwrt/openwrt]  ipq-wifi: add entry for Xiaomi AIoT AC2350
In-Reply-To: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
References: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
Message-ID: <mailman.134965.1756660018.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/31802948974c5cb67206923f7373f7542fefa0ab

commit 31802948974c5cb67206923f7373f7542fefa0ab
Author: Igor Dyatlov <dyatlov.igor at gmail.com>
AuthorDate: Sun Aug 3 17:02:33 2025 +0300

    ipq-wifi: add entry for Xiaomi AIoT AC2350
    
    Add IPQ WiFi support for Xiaomi AIoT AC2350
    
    Add board file suffixes .QCA9988/.qca9988.
    These suffixes are mapped to QCA9984/hw1.0 path
    
    Reference:
    https://openwrt.org/toh/xiaomi/aiot_router_ac2350
    
    Signed-off-by: Igor Dyatlov <dyatlov.igor at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19707
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit c42f05bf36c5708696cbd5d7abe59cb1d5765c1a)
    Link: https://github.com/openwrt/openwrt/pull/19902
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/ipq-wifi/Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index ecc52c7aa2..41a2a009cb 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -56,6 +56,7 @@ ALLWIFIBOARDS:= \
 	tplink_eap660hd-v1 \
 	tplink_archer-c6-v2 \
 	wallys_dr40x9 \
+	xiaomi_aiot-ac2350 \
 	xiaomi_ax3600 \
 	xiaomi_ax9000 \
 	yyets_le1 \
@@ -96,6 +97,8 @@ define ipq-wifi-install-one
     $(call ipq-wifi-install-one-to,$(1),$(2),QCA9887/hw1.0),\
   $(if $(filter $(suffix $(1)),.QCA9984 .qca9984),\
     $(call ipq-wifi-install-one-to,$(1),$(2),QCA9984/hw1.0),\
+  $(if $(filter $(suffix $(1)),.QCA9988 .qca9988),\
+    $(call ipq-wifi-install-one-to,$(1),$(2),QCA9984/hw1.0),\
   $(if $(filter $(suffix $(1)),.QCA99X0 .qca99x0),\
     $(call ipq-wifi-install-one-to,$(1),$(2),QCA99X0/hw2.0),\
   $(if $(filter $(suffix $(1)),.IPQ6018 .ipq6018),\
@@ -105,7 +108,7 @@ define ipq-wifi-install-one
   $(if $(filter $(suffix $(1)),.QCN9074 .qcn9074),\
     $(call ipq-wifi-install-ath11-one-to,$(1),$(2),QCN9074/hw1.0),\
     $(error Unrecognized board-file suffix '$(suffix $(1))' for '$(1)')\
-  ))))))))
+  )))))))))
 
 endef
 # Blank line required at end of above define due to foreach context
@@ -184,6 +187,7 @@ $(eval $(call generate-ipq-wifi-package,spectrum_sax1v1k,Spectrum SAX1V1K))
 $(eval $(call generate-ipq-wifi-package,tplink_eap660hd-v1,TP-Link EAP660 HD v1))
 $(eval $(call generate-ipq-wifi-package,tplink_archer-c6-v2,TP-Link Archer C6 V2))
 $(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9))
+$(eval $(call generate-ipq-wifi-package,xiaomi_aiot-ac2350,Xiaomi AIoT AC2350))
 $(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600))
 $(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000))
 $(eval $(call generate-ipq-wifi-package,yyets_le1,YYeTs LE1))



From lede-commits at lists.infradead.org  Sun Aug 31 10:06:53 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:06:53 -0400
Subject: [openwrt/openwrt]  ipq-wifi: update to Git HEAD (2025-06-23)
In-Reply-To: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
References: <175666001088.2432338.14135625014920522399@git-01.infra.openwrt.org>
Message-ID: <mailman.134966.1756660022.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/8e5c83ca853f502100cb0cf78a5e349195791cb8

commit 8e5c83ca853f502100cb0cf78a5e349195791cb8
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sun Jun 29 18:03:53 2025 +0200

    ipq-wifi: update to Git HEAD (2025-06-23)
    
    63bd0faafd4a Add IPQ5018 BDF for Yuncore AX830.
    
    Link: https://github.com/openwrt/openwrt/pull/18968
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit 6716fbb12229d3e125c13223e365a71847b24628)
    Link: https://github.com/openwrt/openwrt/pull/19902
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/firmware/ipq-wifi/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 7bf0ee19a8..120fa18684 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -6,9 +6,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
-PKG_SOURCE_DATE:=2025-06-14
-PKG_SOURCE_VERSION:=3ac4a6421880443de2f4562ff0f33aefaaf75585
-PKG_MIRROR_HASH:=5e55fcc00585c16c0da0f9b1c2e24d444b36f326867be4f8640fae01901686c5
+PKG_SOURCE_DATE:=2025-06-23
+PKG_SOURCE_VERSION:=63bd0faafd4a261deae27bb233e10ae2f216c755
+PKG_MIRROR_HASH:=dcdc847e0f6a5655df9018ead35396f4414447b140cbfd3b24dd03514e27cf0e
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Sun Aug 31 10:09:38 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:09:38 -0400
Subject: [openwrt/openwrt]  realtek: avoid interrupt storm on mass packet
 receive
In-Reply-To: <175666017879.2437113.10583290633792368416@git-01.infra.openwrt.org>
References: <175666017879.2437113.10583290633792368416@git-01.infra.openwrt.org>
Message-ID: <mailman.134967.1756660182.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/203c9f063bcfd76b97109ed57eb5097fcbc7281a

commit 203c9f063bcfd76b97109ed57eb5097fcbc7281a
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Thu Jul 10 16:00:46 2025 -0400

    realtek: avoid interrupt storm on mass packet receive
    
    RTL83xx devices have two types of receive interrupts for each of its
    8 rings. One for packet received and another for ring overflow. When
    the switch is flooded with incoming packets the receive handler will
    disable the packet receive notification but still keeps the overflow
    notification enabled. While the receive path "slowly" processes the
    received packets each new packet triggers the overflow IRQ again. The
    device becomes unresponsive and eventually produces messages like:
    
    [18441.709764] rcu: Stack dump where RCU GP kthread last ran:
    [18441.727892] Sending NMI from CPU 1 to CPUs 0:
    [18441.742300] NMI backtrace for cpu 0 skipped: idling at 0x8080e994
    [18415.251700] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
    [18415.271350] rcu:     0-...!: (0 ticks this GP) idle=d740/0/0x0 ...
    [18415.303046] rcu:     (detected by 1, t=6004 jiffies, g=230925, ...
    [18415.326095] Sending NMI from CPU 1 to CPUs 0:
    [18415.340540] NMI backtrace for cpu 0
    
    Fix this issue by always disabling receive and overflow interrupts at
    the same time.
    
    Test with hping3 --udp -p 5021 -d 1400 --flood 192.168.2.72
    
    Before (3sec run):
    [183260.324846] rtl838x-eth 1b00a300.ethernet eth0: RX buffer overrun: status 0x101, mask: 0x7ffeff
    [183260.340524] rtl838x-eth 1b00a300.ethernet eth0: RX buffer overrun: status 0x1, mask: 0x7ffeff
    [183260.345799] net_ratelimit: 489997 callbacks suppressed
    
    After (3 sec run):
    [  373.981479] rtl838x-eth 1b00a300.ethernet eth0: rx ring overrun: status 0x101, mask: 0x7fffff
    [  374.031118] rtl838x-eth 1b00a300.ethernet eth0: rx ring overrun: status 0x101, mask: 0x7fffff
    [  377.919996] net_ratelimit: 34 callbacks suppressed
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19365
    (cherry picked from commit 963ee6ac3fc287328ce5a1e49d7f5910b060ec96)
    Signed-off-by: Felix Baumann <felix.bau at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19891
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../files-6.6/drivers/net/ethernet/rtl838x_eth.c   | 40 +++++++++-------------
 .../files-6.6/drivers/net/ethernet/rtl838x_eth.h   |  7 ++--
 2 files changed, 21 insertions(+), 26 deletions(-)

diff --git a/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.c b/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.c
index 83b5462ec5..d1d81e7845 100644
--- a/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.c
+++ b/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.c
@@ -436,28 +436,25 @@ static irqreturn_t rtl83xx_net_irq(int irq, void *dev_id)
 	struct net_device *ndev = dev_id;
 	struct rtl838x_eth_priv *priv = netdev_priv(ndev);
 	u32 status = sw_r32(priv->r->dma_if_intr_sts);
+	unsigned long ring, rings;
 
-	netdev_dbg(ndev, "RX IRQ received: %08x\n", status);
+	netdev_dbg(ndev, "rx interrupt received, status %08x\n", status);
 
-	if ((status & RTL83XX_DMA_IF_INTR_STS_RX_RUN_OUT_MASK) && net_ratelimit())
-		netdev_warn(ndev, "RX buffer overrun: status 0x%x, mask: 0x%x\n",
-			   status, sw_r32(priv->r->dma_if_intr_msk));
+	if (status & RTL83XX_DMA_IF_INTR_RX_RUN_OUT_MASK)
+		if (net_ratelimit())
+			netdev_warn(ndev, "rx ring overrun, status 0x%08x, mask 0x%08x\n",
+				    status, sw_r32(priv->r->dma_if_intr_msk));
 
-	if (status & RTL83XX_DMA_IF_INTR_STS_RX_DONE_MASK) {
-		/* Disable rx interrupts */
-		sw_w32_mask(0xff00 & status, 0, priv->r->dma_if_intr_msk);
-		for (int i = 0; i < priv->rxrings; i++) {
-			if (status & BIT(i + 8)) {
-				pr_debug("Scheduling queue: %d\n", i);
-				napi_schedule(&priv->rx_qs[i].napi);
-			}
-		}
+	rings = FIELD_GET(RTL83XX_DMA_IF_INTR_RX_DONE_MASK, status);
+	for_each_set_bit(ring, &rings, priv->rxrings) {
+		netdev_dbg(ndev, "schedule rx ring %lu\n", ring);
+		sw_w32_mask(RTL83XX_DMA_IF_INTR_RX_MASK(ring), 0, priv->r->dma_if_intr_msk);
+		napi_schedule(&priv->rx_qs[ring].napi);
 	}
 
-	if ((status & RTL83XX_DMA_IF_INTR_STS_NOTIFY_MASK) && priv->family_id == RTL8390_FAMILY_ID)
+	if (status & RTL839X_DMA_IF_INTR_NOTIFY_MASK)
 		rtl839x_l2_notification_handler(priv);
 
-	/* Acknowledge all interrupts */
 	sw_w32(status, priv->r->dma_if_intr_sts);
 
 	return IRQ_HANDLED;
@@ -1337,25 +1334,22 @@ static int rtl838x_poll_rx(struct napi_struct *napi, int budget)
 {
 	struct rtl838x_rx_q *rx_q = container_of(napi, struct rtl838x_rx_q, napi);
 	struct rtl838x_eth_priv *priv = rx_q->priv;
+	int ring = rx_q->id;
 	int work_done = 0;
-	int r = rx_q->id;
-	int work;
 
 	while (work_done < budget) {
-		work = rtl838x_hw_receive(priv->netdev, r, budget - work_done);
+		int work = rtl838x_hw_receive(priv->netdev, ring, budget - work_done);
 		if (!work)
 			break;
 		work_done += work;
 	}
 
-	if (work_done < budget) {
-		napi_complete_done(napi, work_done);
-
-		/* Enable RX interrupt */
+	if (work_done < budget && napi_complete_done(napi, work_done)) {
+		/* Re-enable rx interrupts */
 		if (priv->family_id == RTL9300_FAMILY_ID || priv->family_id == RTL9310_FAMILY_ID)
 			sw_w32(0xffffffff, priv->r->dma_if_intr_rx_done_msk);
 		else
-			sw_w32_mask(0, 0xf00ff | BIT(r + 8), priv->r->dma_if_intr_msk);
+			sw_w32_mask(0, RTL83XX_DMA_IF_INTR_RX_MASK(ring), priv->r->dma_if_intr_msk);
 	}
 
 	return work_done;
diff --git a/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.h b/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.h
index a87a8a5988..65684017c4 100644
--- a/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.h
+++ b/target/linux/realtek/files-6.6/drivers/net/ethernet/rtl838x_eth.h
@@ -48,9 +48,10 @@
 #define RTL930X_MAC_FORCE_MODE_CTRL		(0xCA1C)
 #define RTL931X_MAC_FORCE_MODE_CTRL		(0x0ddc)
 
-#define RTL83XX_DMA_IF_INTR_STS_NOTIFY_MASK	GENMASK(22, 20)
-#define RTL83XX_DMA_IF_INTR_STS_RX_DONE_MASK	GENMASK(15, 8)
-#define RTL83XX_DMA_IF_INTR_STS_RX_RUN_OUT_MASK	GENMASK(7, 0)
+#define RTL839X_DMA_IF_INTR_NOTIFY_MASK		GENMASK(22, 20)
+#define RTL83XX_DMA_IF_INTR_RX_DONE_MASK	GENMASK(15, 8)
+#define RTL83XX_DMA_IF_INTR_RX_RUN_OUT_MASK	GENMASK(7, 0)
+#define RTL83XX_DMA_IF_INTR_RX_MASK(ring)	(BIT(ring) | BIT(ring + 8))
 
 /* MAC address settings */
 #define RTL838X_MAC				(0xa9ec)



From lede-commits at lists.infradead.org  Sun Aug 31 10:09:39 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:09:39 -0400
Subject: [openwrt/openwrt]  realtek: fix stall after restart of otto timer
In-Reply-To: <175666017879.2437113.10583290633792368416@git-01.infra.openwrt.org>
References: <175666017879.2437113.10583290633792368416@git-01.infra.openwrt.org>
Message-ID: <mailman.134970.1756660182.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/4576d311f8cd21a457b94d99d31e92d442e708f4

commit 4576d311f8cd21a457b94d99d31e92d442e708f4
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Sat Jul 19 16:14:28 2025 -0400

    realtek: fix stall after restart of otto timer
    
    Once tested this will go upstream.
    
    Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19468
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    (cherry picked from commit f21475839f10eec2ad48a2a7b24db1867793efbc)
    Signed-off-by: Felix Baumann <felix.bau at gmx.de>
    Link: https://github.com/openwrt/openwrt/pull/19891
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../304-timer-otto-fix-stall-after-restart.patch   | 146 +++++++++++++++++++++
 1 file changed, 146 insertions(+)

diff --git a/target/linux/realtek/patches-6.6/304-timer-otto-fix-stall-after-restart.patch b/target/linux/realtek/patches-6.6/304-timer-otto-fix-stall-after-restart.patch
new file mode 100644
index 0000000000..0218f4efe9
--- /dev/null
+++ b/target/linux/realtek/patches-6.6/304-timer-otto-fix-stall-after-restart.patch
@@ -0,0 +1,146 @@
+From: Markus Stockhausen <markus.stockhausen at gmx.de>
+Date: Sat, 19 Jul 2025 18:22:21 +0200
+Subject: [PATCH] realtek: fix stall after restart of otto timer
+
+With kernel 6.9 the kernel scheduler has been redesigned. This uncovered
+a bug in the realtek timer hardware and a misconception in the driver. 
+
+Regarding the driver: Software cannot set the current counter value to
+zero directly. This is automatically done when writing a new target value. 
+Drop function rttm_set_counter(). Additionally do not use stop timer
+during normal operation because it acknowledges interrupts. This should
+only be done from the interrupt handler. Replace this with disable_timer().
+
+Regarding the hardware: There is a minimal chance that a timer dies if it
+is reprogrammed within the 5us before its expiration time. Let's call this
+the "critical time window". Work around this issue by introducing a
+bounce() function. It restarts the timer directly before the normal
+restart functions as follows:
+
+- Stop timer
+- Restart timer with a slow frequency.
+- Target time will be >5us 
+- The subsequent normal restart will be outside the critical window
+
+While we are here clarify documentation and double the timer frequency to 
+6.25 Mhz. This allows for more detailed timestamps.
+
+Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
+---
+
+--- a/drivers/clocksource/timer-rtl-otto.c
++++ b/drivers/clocksource/timer-rtl-otto.c
+@@ -20,12 +20,11 @@
+ 
+ /*
+  * The Otto platform provides multiple 28 bit timers/counters with the following
+- * operating logic. If enabled the timer counts up. Per timer one can set a
+- * maximum counter value as an end marker. If end marker is reached the timer
+- * fires an interrupt. If the timer "overflows" by reaching the end marker or
+- * by adding 1 to 0x0fffffff the counter is reset to 0. When this happens and
+- * the timer is in operating mode COUNTER it stops. In mode TIMER it will
+- * continue to count up.
++ * operating logic. If enabled the timer counts up. Per timer a counter target
++ * value can be set with the minimum being 0x2 and the maximumu being 0xfffffff.
++ * If the the target value is reached the timer is reset to 0. Depending on its
++ * configuration the timer will then fire an interrupt. In case the timer is in
++ * operating mode COUNTER it stops. In mode TIMER it will continue to count up.
+  */
+ #define RTTM_CTRL_COUNTER	0
+ #define RTTM_CTRL_TIMER		BIT(24)
+@@ -33,16 +32,15 @@
+ #define RTTM_BIT_COUNT		28
+ #define RTTM_MIN_DELTA		8
+ #define RTTM_MAX_DELTA		CLOCKSOURCE_MASK(28)
++#define RTTM_MAX_DIVISOR	GENMASK(15, 0)
+ 
+ /*
+- * Timers are derived from the LXB clock frequency. Usually this is a fixed
+- * multiple of the 25 MHz oscillator. The 930X SOC is an exception from that.
+- * Its LXB clock has only dividers and uses the switch PLL of 2.45 GHz as its
+- * base. The only meaningful frequencies we can achieve from that are 175.000
+- * MHz and 153.125 MHz. The greatest common divisor of all explained possible
+- * speeds is 3125000. Pin the timers to this 3.125 MHz reference frequency.
++ * Timers are derived from the lexra bus (LXB) clock frequency. This is 175 MHz
++ * on RTL930x and 200 MHz on the other platforms. With 6.25 MHz choose a common
++ * divisor to have enough range and detail. This even allows to compare the
++ * different platforms more easily.
+  */
+-#define RTTM_TICKS_PER_SEC	3125000
++#define RTTM_TICKS_PER_SEC	6250000
+ 
+ struct rttm_cs {
+ 	struct timer_of		to;
+@@ -50,11 +48,6 @@ struct rttm_cs {
+ };
+ 
+ /* Simple internal register functions */
+-static inline void rttm_set_counter(void __iomem *base, unsigned int counter)
+-{
+-	iowrite32(counter, base + RTTM_CNT);
+-}
+-
+ static inline unsigned int rttm_get_counter(void __iomem *base)
+ {
+ 	return ioread32(base + RTTM_CNT);
+@@ -107,6 +100,22 @@ static irqreturn_t rttm_timer_interrupt(
+ 	return IRQ_HANDLED;
+ }
+ 
++static void rttm_bounce_timer(void __iomem *base, u32 mode)
++{
++	/*
++	 * When a running timer has less than ~5us left, a stop/start sequence
++	 * might fail. While the details are unknown the most evident effect is 
++	 * that the subsequent interrupt will not be fired.
++	 *
++	 * As a workaround issue an intermediate restart with a very slow
++	 * frequency of ~3kHz keeping the target value. So the actual follow
++	 * up restart will always be issued outside the critical window.
++	 */
++
++	rttm_disable_timer(base);
++	rttm_enable_timer(base, mode, RTTM_MAX_DIVISOR);
++}
++
+ static void rttm_stop_timer(void __iomem *base)
+ {
+ 	rttm_disable_timer(base);
+@@ -115,7 +124,6 @@ static void rttm_stop_timer(void __iomem
+ 
+ static void rttm_start_timer(struct timer_of *to, u32 mode)
+ {
+-	rttm_set_counter(to->of_base.base, 0);
+ 	rttm_enable_timer(to->of_base.base, mode, to->of_clk.rate / RTTM_TICKS_PER_SEC);
+ }
+ 
+@@ -124,7 +132,8 @@ static int rttm_next_event(unsigned long
+ 	struct timer_of *to = to_timer_of(clkevt);
+ 
+ 	RTTM_DEBUG(to->of_base.base);
+-	rttm_stop_timer(to->of_base.base);
++	rttm_bounce_timer(to->of_base.base, RTTM_CTRL_COUNTER);
++	rttm_disable_timer(to->of_base.base);
+ 	rttm_set_period(to->of_base.base, delta);
+ 	rttm_start_timer(to, RTTM_CTRL_COUNTER);
+ 
+@@ -136,7 +145,8 @@ static int rttm_state_oneshot(struct clo
+ 	struct timer_of *to = to_timer_of(clkevt);
+ 
+ 	RTTM_DEBUG(to->of_base.base);
+-	rttm_stop_timer(to->of_base.base);
++	rttm_bounce_timer(to->of_base.base, RTTM_CTRL_COUNTER);
++	rttm_disable_timer(to->of_base.base);
+ 	rttm_set_period(to->of_base.base, RTTM_TICKS_PER_SEC / HZ);
+ 	rttm_start_timer(to, RTTM_CTRL_COUNTER);
+ 
+@@ -148,7 +158,8 @@ static int rttm_state_periodic(struct cl
+ 	struct timer_of *to = to_timer_of(clkevt);
+ 
+ 	RTTM_DEBUG(to->of_base.base);
+-	rttm_stop_timer(to->of_base.base);
++	rttm_bounce_timer(to->of_base.base, RTTM_CTRL_TIMER);
++	rttm_disable_timer(to->of_base.base);
+ 	rttm_set_period(to->of_base.base, RTTM_TICKS_PER_SEC / HZ);
+ 	rttm_start_timer(to, RTTM_CTRL_TIMER);
+ 



From lede-commits at lists.infradead.org  Sun Aug 31 10:13:21 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:13:21 -0400
Subject: [openwrt/openwrt]  tools: firmware-utils: update to Git HEAD
 (2025-08-03)
In-Reply-To: <175666040005.2444269.12278729294806971924@git-01.infra.openwrt.org>
References: <175666040005.2444269.12278729294806971924@git-01.infra.openwrt.org>
Message-ID: <mailman.134971.1756660403.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/af3a18db950783592f6dc79ba543bf5cf71bdfcd

commit af3a18db950783592f6dc79ba543bf5cf71bdfcd
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Aug 3 01:07:33 2025 +0200

    tools: firmware-utils: update to Git HEAD (2025-08-03)
    
    3346d77 build: add mkqdimg
    950f834 iptime-crc32: add support for ipTIME AX7800M-6E
    
    (cherry picked from commit f0746741f832403aa2fb31e3468af3f8e5418ec0)
    Signed-off-by: Donghyun Ko <nyankosoftware at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19915
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 tools/firmware-utils/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
index 691505c36d..96146637b3 100644
--- a/tools/firmware-utils/Makefile
+++ b/tools/firmware-utils/Makefile
@@ -11,9 +11,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
-PKG_SOURCE_DATE:=2025-07-24
-PKG_SOURCE_VERSION:=f29de74ecd7d952ee1f9a20577fec9f37c0d6f4a
-PKG_MIRROR_HASH:=6abf06a2243acb1a9820a8c4d7c9a1f03f5b920fecf86ac2353d257e7963f7bb
+PKG_SOURCE_DATE:=2025-08-03
+PKG_SOURCE_VERSION:=950f83405a935395492d61c9972b5e5ca826eeee
+PKG_MIRROR_HASH:=19f5b7547dc6f9460e25183c83d55aca9d1f18148466c09b64504a64379a34ae
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk



From lede-commits at lists.infradead.org  Sun Aug 31 10:13:20 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:13:20 -0400
Subject: [openwrt/openwrt]  tools: firmware-utils: update to Git HEAD
 (2025-07-24)
In-Reply-To: <175666040005.2444269.12278729294806971924@git-01.infra.openwrt.org>
References: <175666040005.2444269.12278729294806971924@git-01.infra.openwrt.org>
Message-ID: <mailman.134972.1756660406.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/d9179345ea32ef28ed84415ee729c234d7baad69

commit d9179345ea32ef28ed84415ee729c234d7baad69
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Thu Jul 24 23:41:49 2025 +0200

    tools: firmware-utils: update to Git HEAD (2025-07-24)
    
    075cdc0 iptime-crc32: add support for ipTIME AX3000Q
    48ababa iptime-crc32: add support for ipTIME AX3000SM
    f29de74 iptime-crc32: Add device support for ipTIME AX6000M
    
    Link: https://github.com/openwrt/openwrt/pull/19520
    (cherry picked from commit b087961ccb0bc7d69fc61bb5789dc01edc395318)
    Signed-off-by: Donghyun Ko <nyankosoftware at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19915
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 tools/firmware-utils/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
index 3caaa8e437..691505c36d 100644
--- a/tools/firmware-utils/Makefile
+++ b/tools/firmware-utils/Makefile
@@ -11,9 +11,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
-PKG_SOURCE_DATE:=2025-02-16
-PKG_SOURCE_VERSION:=5d1446bf57d6490573dc71f10c05e83b36d44374
-PKG_MIRROR_HASH:=e054ea416f5a596f681bba593f71dfbe8149361432d7c17f2374c60dfe227749
+PKG_SOURCE_DATE:=2025-07-24
+PKG_SOURCE_VERSION:=f29de74ecd7d952ee1f9a20577fec9f37c0d6f4a
+PKG_MIRROR_HASH:=6abf06a2243acb1a9820a8c4d7c9a1f03f5b920fecf86ac2353d257e7963f7bb
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk



From lede-commits at lists.infradead.org  Sun Aug 31 10:22:10 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 13:22:10 -0400
Subject: [openwrt/openwrt]  treewide: add const to struct of_device_id
In-Reply-To: <175666093019.2476573.17028873053008103061@git-01.infra.openwrt.org>
References: <175666093019.2476573.17028873053008103061@git-01.infra.openwrt.org>
Message-ID: <mailman.134973.1756660933.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e1564c4fab103bb322cf8f73310e518bd81cf3fe

commit e1564c4fab103bb322cf8f73310e518bd81cf3fe
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Wed Aug 27 17:34:01 2025 -0700

    treewide: add const to struct of_device_id
    
    Most drivers have this as const. Especially upstream in the kernel.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19911
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c          | 4 ++--
 target/linux/generic/hack-6.12/800-GPIO-add-named-gpio-exports.patch  | 2 +-
 target/linux/generic/hack-6.6/800-GPIO-add-named-gpio-exports.patch   | 2 +-
 .../035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch           | 2 +-
 .../linux/qualcommax/patches-6.12/0900-power-Add-Qualcomm-APM.patch   | 2 +-
 .../patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch     | 4 ++--
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
index ad2e0ca863..75f358a208 100644
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
@@ -416,13 +416,13 @@ gpio_keys_get_devtree_pdata(struct device *dev)
 	return pdata;
 }
 
-static struct of_device_id gpio_keys_of_match[] = {
+static const struct of_device_id gpio_keys_of_match[] = {
 	{ .compatible = "gpio-keys", },
 	{ },
 };
 MODULE_DEVICE_TABLE(of, gpio_keys_of_match);
 
-static struct of_device_id gpio_keys_polled_of_match[] = {
+static const struct of_device_id gpio_keys_polled_of_match[] = {
 	{ .compatible = "gpio-keys-polled", },
 	{ },
 };
diff --git a/target/linux/generic/hack-6.12/800-GPIO-add-named-gpio-exports.patch b/target/linux/generic/hack-6.12/800-GPIO-add-named-gpio-exports.patch
index bf75cedafd..f9b540f0d6 100644
--- a/target/linux/generic/hack-6.12/800-GPIO-add-named-gpio-exports.patch
+++ b/target/linux/generic/hack-6.12/800-GPIO-add-named-gpio-exports.patch
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +
 +#ifdef CONFIG_GPIO_SYSFS
 +
-+static struct of_device_id gpio_export_ids[] = {
++static const struct of_device_id gpio_export_ids[] = {
 +	{ .compatible = "gpio-export" },
 +	{ /* sentinel */ }
 +};
diff --git a/target/linux/generic/hack-6.6/800-GPIO-add-named-gpio-exports.patch b/target/linux/generic/hack-6.6/800-GPIO-add-named-gpio-exports.patch
index 9c3696e76a..25fee9e060 100644
--- a/target/linux/generic/hack-6.6/800-GPIO-add-named-gpio-exports.patch
+++ b/target/linux/generic/hack-6.6/800-GPIO-add-named-gpio-exports.patch
@@ -22,7 +22,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +
 +#ifdef CONFIG_GPIO_SYSFS
 +
-+static struct of_device_id gpio_export_ids[] = {
++static const struct of_device_id gpio_export_ids[] = {
 +	{ .compatible = "gpio-export" },
 +	{ /* sentinel */ }
 +};
diff --git a/target/linux/lantiq/patches-6.12/035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch b/target/linux/lantiq/patches-6.12/035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
index 1044b6da28..5edb1d01dd 100644
--- a/target/linux/lantiq/patches-6.12/035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
+++ b/target/linux/lantiq/patches-6.12/035-owrt-lantiq-wifi-and-ethernet-eeprom-handling.patch
@@ -141,7 +141,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	return 0;
 +}
 +
-+static struct of_device_id ath5k_eeprom_ids[] = {
++static const struct of_device_id ath5k_eeprom_ids[] = {
 +	{ .compatible = "ath5k,eeprom" },
 +	{ }
 +};
diff --git a/target/linux/qualcommax/patches-6.12/0900-power-Add-Qualcomm-APM.patch b/target/linux/qualcommax/patches-6.12/0900-power-Add-Qualcomm-APM.patch
index a83408ba43..31443c566e 100644
--- a/target/linux/qualcommax/patches-6.12/0900-power-Add-Qualcomm-APM.patch
+++ b/target/linux/qualcommax/patches-6.12/0900-power-Add-Qualcomm-APM.patch
@@ -873,7 +873,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
 +
 +#endif
 +
-+static struct of_device_id msm_apm_match_table[] = {
++static const struct of_device_id msm_apm_match_table[] = {
 +	{
 +		.compatible = "qcom,msm-apm",
 +		.data = (void *)(uintptr_t)MSM8996_ID,
diff --git a/target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch b/target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch
index 8da64d2a89..64a4e9df0e 100644
--- a/target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch
+++ b/target/linux/qualcommax/patches-6.12/0901-regulator-add-Qualcomm-CPR-regulators.patch
@@ -631,7 +631,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
 +	.cpr_clk_rate = IPQ9574_NPU_CPR_CLOCK_RATE,
 +};
 +
-+static struct of_device_id cpr3_regulator_match_table[] = {
++static const struct of_device_id cpr3_regulator_match_table[] = {
 +	{
 +		.compatible = "qcom,cpr3-ipq807x-npu-regulator",
 +		.data = &ipq807x_cpr_npu
@@ -11538,7 +11538,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
 +	.mem_acc_funcs = NULL,
 +};
 +
-+static struct of_device_id cpr4_regulator_match_table[] = {
++static const struct of_device_id cpr4_regulator_match_table[] = {
 +	{
 +		.compatible = "qcom,cpr4-ipq807x-apss-regulator",
 +		.data = &ipq807x_cpr_apss



From lede-commits at lists.infradead.org  Sun Aug 31 11:29:57 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 14:29:57 -0400
Subject: [openwrt/openwrt]  kernel: mtk_eth_soc: fix tx vlan tag for llc
 packets
In-Reply-To: <175666499706.2644477.17301722622798651241@git-01.infra.openwrt.org>
References: <175666499706.2644477.17301722622798651241@git-01.infra.openwrt.org>
Message-ID: <mailman.134978.1756665147.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f7d40365558f3426b85be35f1f2ba7d01df96dd0

commit f7d40365558f3426b85be35f1f2ba7d01df96dd0
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 31 20:28:52 2025 +0200

    kernel: mtk_eth_soc: fix tx vlan tag for llc packets
    
    When sending llc packets with vlan tx offload, the hardware fails to
    actually add the tag. Deal with this by fixing it up in software.
    
    Fixes: https://github.com/openwrt/openwrt/issues/19916
    Reported-by: Thibaut VARENE <hacks at slashdirt.org>
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...t-mtk_eth_soc-add-hw-dump-for-forced-rese.patch |  4 +--
 ...t-mtk_eth_soc-add-hw-dump-for-forced-rese.patch |  4 +--
 ...t-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch | 39 ++++++++++++++++++++++
 ...t-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch | 39 ++++++++++++++++++++++
 4 files changed, 82 insertions(+), 4 deletions(-)

diff --git a/target/linux/generic/hack-6.12/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch b/target/linux/generic/hack-6.12/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch
index c4bf08b594..ffc21ee2ff 100644
--- a/target/linux/generic/hack-6.12/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch
+++ b/target/linux/generic/hack-6.12/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch
@@ -37,7 +37,7 @@ Signed-off-by: Bo-Cun Chen <bc-bocun.chen at mediatek.com>
  		.glo_cfg	= 0x4604,
  		.rst_idx	= 0x4608,
  		.delay_irq	= 0x460c,
-@@ -3901,6 +3904,56 @@ static void mtk_set_mcr_max_rx(struct mt
+@@ -3909,6 +3912,56 @@ static void mtk_set_mcr_max_rx(struct mt
  		mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id));
  }
  
@@ -94,7 +94,7 @@ Signed-off-by: Bo-Cun Chen <bc-bocun.chen at mediatek.com>
  static void mtk_hw_reset(struct mtk_eth *eth)
  {
  	u32 val;
-@@ -4380,6 +4433,8 @@ static void mtk_pending_work(struct work
+@@ -4388,6 +4441,8 @@ static void mtk_pending_work(struct work
  	rtnl_lock();
  	set_bit(MTK_RESETTING, &eth->state);
  
diff --git a/target/linux/generic/hack-6.6/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch b/target/linux/generic/hack-6.6/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch
index 95a6aa8cb8..25d824bce6 100644
--- a/target/linux/generic/hack-6.6/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch
+++ b/target/linux/generic/hack-6.6/730-net-ethernet-mtk_eth_soc-add-hw-dump-for-forced-rese.patch
@@ -37,7 +37,7 @@ Signed-off-by: Bo-Cun Chen <bc-bocun.chen at mediatek.com>
  		.glo_cfg	= 0x4604,
  		.rst_idx	= 0x4608,
  		.delay_irq	= 0x460c,
-@@ -3899,6 +3902,56 @@ static void mtk_set_mcr_max_rx(struct mt
+@@ -3907,6 +3910,56 @@ static void mtk_set_mcr_max_rx(struct mt
  		mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id));
  }
  
@@ -94,7 +94,7 @@ Signed-off-by: Bo-Cun Chen <bc-bocun.chen at mediatek.com>
  static void mtk_hw_reset(struct mtk_eth *eth)
  {
  	u32 val;
-@@ -4374,6 +4427,8 @@ static void mtk_pending_work(struct work
+@@ -4382,6 +4435,8 @@ static void mtk_pending_work(struct work
  	rtnl_lock();
  	set_bit(MTK_RESETTING, &eth->state);
  
diff --git a/target/linux/generic/pending-6.12/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch b/target/linux/generic/pending-6.12/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch
new file mode 100644
index 0000000000..20a6a29449
--- /dev/null
+++ b/target/linux/generic/pending-6.12/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch
@@ -0,0 +1,39 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sun, 31 Aug 2025 20:05:13 +0200
+Subject: [PATCH] net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets
+
+When sending llc packets with vlan tx offload, the hardware fails to
+actually add the tag. Deal with this by fixing it up in software.
+
+Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet")
+Reported-by: Thibaut VARENE <hacks at slashdirt.org>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -1778,6 +1778,13 @@ static netdev_tx_t mtk_start_xmit(struct
+ 	bool gso = false;
+ 	int tx_num;
+ 
++	if (skb_vlan_tag_present(skb) &&
++	    !eth_proto_is_802_3(eth_hdr(skb)->h_proto)) {
++		skb = __vlan_hwaccel_push_inside(skb);
++		if (!skb)
++			goto dropped;
++	}
++
+ 	/* normally we can rely on the stack not calling this more than once,
+ 	 * however we have 2 queues running on the same ring so we need to lock
+ 	 * the ring access
+@@ -1841,8 +1848,9 @@ static netdev_tx_t mtk_start_xmit(struct
+ 
+ drop:
+ 	spin_unlock(&eth->page_lock);
+-	stats->tx_dropped++;
+ 	dev_kfree_skb_any(skb);
++dropped:
++	stats->tx_dropped++;
+ 	return NETDEV_TX_OK;
+ }
+ 
diff --git a/target/linux/generic/pending-6.6/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch b/target/linux/generic/pending-6.6/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch
new file mode 100644
index 0000000000..7e90a79e5b
--- /dev/null
+++ b/target/linux/generic/pending-6.6/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch
@@ -0,0 +1,39 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sun, 31 Aug 2025 20:05:13 +0200
+Subject: [PATCH] net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets
+
+When sending llc packets with vlan tx offload, the hardware fails to
+actually add the tag. Deal with this by fixing it up in software.
+
+Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet")
+Reported-by: Thibaut VARENE <hacks at slashdirt.org>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -1773,6 +1773,13 @@ static netdev_tx_t mtk_start_xmit(struct
+ 	bool gso = false;
+ 	int tx_num;
+ 
++	if (skb_vlan_tag_present(skb) &&
++	    !eth_proto_is_802_3(eth_hdr(skb)->h_proto)) {
++		skb = __vlan_hwaccel_push_inside(skb);
++		if (!skb)
++			goto dropped;
++	}
++
+ 	/* normally we can rely on the stack not calling this more than once,
+ 	 * however we have 2 queues running on the same ring so we need to lock
+ 	 * the ring access
+@@ -1836,8 +1843,9 @@ static netdev_tx_t mtk_start_xmit(struct
+ 
+ drop:
+ 	spin_unlock(&eth->page_lock);
+-	stats->tx_dropped++;
+ 	dev_kfree_skb_any(skb);
++dropped:
++	stats->tx_dropped++;
+ 	return NETDEV_TX_OK;
+ }
+ 



From lede-commits at lists.infradead.org  Sun Aug 31 11:40:04 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 14:40:04 -0400
Subject: [openwrt/openwrt]  kernel: mtk_eth_soc: fix tx vlan tag for llc
 packets
In-Reply-To: <175666560490.2664246.9043736174687991359@git-01.infra.openwrt.org>
References: <175666560490.2664246.9043736174687991359@git-01.infra.openwrt.org>
Message-ID: <mailman.134982.1756665609.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch openwrt-24.10:
https://git.openwrt.org/9de2da13bf5ee895e8acf5a83f910bbdef46f0d1

commit 9de2da13bf5ee895e8acf5a83f910bbdef46f0d1
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 31 20:28:52 2025 +0200

    kernel: mtk_eth_soc: fix tx vlan tag for llc packets
    
    When sending llc packets with vlan tx offload, the hardware fails to
    actually add the tag. Deal with this by fixing it up in software.
    
    Fixes: https://github.com/openwrt/openwrt/issues/19916
    Reported-by: Thibaut VARENE <hacks at slashdirt.org>
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit f7d40365558f3426b85be35f1f2ba7d01df96dd0)
---
 ...t-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/target/linux/generic/pending-6.6/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch b/target/linux/generic/pending-6.6/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch
new file mode 100644
index 0000000000..4876d858fd
--- /dev/null
+++ b/target/linux/generic/pending-6.6/742-net-ethernet-mtk_eth_soc-fix-tx-vlan-tag-for-llc-pac.patch
@@ -0,0 +1,39 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sun, 31 Aug 2025 20:05:13 +0200
+Subject: [PATCH] net: ethernet: mtk_eth_soc: fix tx vlan tag for llc packets
+
+When sending llc packets with vlan tx offload, the hardware fails to
+actually add the tag. Deal with this by fixing it up in software.
+
+Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet")
+Reported-by: Thibaut VARENE <hacks at slashdirt.org>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -1763,6 +1763,13 @@ static netdev_tx_t mtk_start_xmit(struct
+ 	bool gso = false;
+ 	int tx_num;
+ 
++	if (skb_vlan_tag_present(skb) &&
++	    !eth_proto_is_802_3(eth_hdr(skb)->h_proto)) {
++		skb = __vlan_hwaccel_push_inside(skb);
++		if (!skb)
++			goto dropped;
++	}
++
+ 	/* normally we can rely on the stack not calling this more than once,
+ 	 * however we have 2 queues running on the same ring so we need to lock
+ 	 * the ring access
+@@ -1826,8 +1833,9 @@ static netdev_tx_t mtk_start_xmit(struct
+ 
+ drop:
+ 	spin_unlock(&eth->page_lock);
+-	stats->tx_dropped++;
+ 	dev_kfree_skb_any(skb);
++dropped:
++	stats->tx_dropped++;
+ 	return NETDEV_TX_OK;
+ }
+ 



From lede-commits at lists.infradead.org  Sun Aug 31 14:49:20 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 17:49:20 -0400
Subject: [openwrt/openwrt]  perf: set NO_JEVENTS=1 to fix build
In-Reply-To: <175667696003.3081545.4707500178233216298@git-01.infra.openwrt.org>
References: <175667696003.3081545.4707500178233216298@git-01.infra.openwrt.org>
Message-ID: <mailman.134985.1756676963.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/58a29752b1a3103300476137c24a7250defc9bfe

commit 58a29752b1a3103300476137c24a7250defc9bfe
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 31 23:47:32 2025 +0200

    perf: set NO_JEVENTS=1 to fix build
    
    Needed for disabling the python requirement
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/devel/perf/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile
index e05ea446ac..c9b186cb86 100644
--- a/package/devel/perf/Makefile
+++ b/package/devel/perf/Makefile
@@ -57,6 +57,7 @@ MAKE_FLAGS = \
 	NO_LIBUNWIND=1 \
 	NO_LIBZSTD=1 \
 	NO_LIBCAP=1 \
+	NO_JEVENTS=1 \
 	NO_SHELLCHECK=1 \
 	BUILD_BPF_SKEL=0 \
 	CROSS_COMPILE="$(TARGET_CROSS)" \



From lede-commits at lists.infradead.org  Sun Aug 31 14:49:21 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 17:49:21 -0400
Subject: [openwrt/openwrt]  perf: fix disabling BUILD_BPF_SKEL
In-Reply-To: <175667696003.3081545.4707500178233216298@git-01.infra.openwrt.org>
References: <175667696003.3081545.4707500178233216298@git-01.infra.openwrt.org>
Message-ID: <mailman.134986.1756676964.1866309.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cbfbac761a7ef94f6769eff5cf969cef67aa167c

commit cbfbac761a7ef94f6769eff5cf969cef67aa167c
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Aug 31 23:48:10 2025 +0200

    perf: fix disabling BUILD_BPF_SKEL
    
    The makefile uses ifdef to check, so the variable needs to be empty
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/devel/perf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/devel/perf/Makefile b/package/devel/perf/Makefile
index c9b186cb86..c89eb08958 100644
--- a/package/devel/perf/Makefile
+++ b/package/devel/perf/Makefile
@@ -59,7 +59,7 @@ MAKE_FLAGS = \
 	NO_LIBCAP=1 \
 	NO_JEVENTS=1 \
 	NO_SHELLCHECK=1 \
-	BUILD_BPF_SKEL=0 \
+	BUILD_BPF_SKEL= \
 	CROSS_COMPILE="$(TARGET_CROSS)" \
 	CC="$(TARGET_CC)" \
 	LD="$(TARGET_CROSS)ld" \



From lede-commits at lists.infradead.org  Sun Aug 31 17:06:35 2025
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 31 Aug 2025 20:06:35 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.103
In-Reply-To: <175668519550.3451560.5693737489449791124@git-01.infra.openwrt.org>
References: <175668519550.3451560.5693737489449791124@git-01.infra.openwrt.org>
Message-ID: <mailman.135034.1756685200.1866309.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1c92e468d544db98018c55d5d18e41fc1a3af20b

commit 1c92e468d544db98018c55d5d18e41fc1a3af20b
Author: Goetz Goerisch <ggoerisch at gmail.com>
AuthorDate: Fri Aug 29 11:03:10 2025 +0200

    kernel: bump 6.6 to 6.6.103
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.103
    
    removed upstream patches:
    generic-backport/220-v6.16-powerpc-boot-fix-build-with-gcc-15.patch [1]
    generic-backport/847-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch [2]
    
    update patch to upstream function change
    bcm53x/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
    changed function xhci_disable_and_free_slot() upstream [3]
    
    All other patches auto-refreshed.
    
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.103&id=93879b3ba967a33834727abf34ea08764339fe0b
    [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.103&id=c66caf21b1d0a0847adc34d368e3f6753a2cbd53
    [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/usb/host?h=v6.6.103&id=e600de541c37f97482fea2a7a26f186141e7ddea
    
    Suggested-by: Leo Barsky <leobrsky at proton.me>
    Signed-off-by: Goetz Goerisch <ggoerisch at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/19898
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../patches-6.6/105-uart-add-en7523-support.patch  |  2 +-
 .../patches-6.6/901-snand-mtk-bmt-support.patch    |  6 +-
 ...-add-support-for-performing-fake-doorbell.patch |  6 +-
 ...-v6.16-powerpc-boot-fix-build-with-gcc-15.patch | 29 --------
 ...pinand-add-support-for-FORESEE-F35SQA002G.patch |  2 +-
 ...-set-bitflip_threshold-to-75-of-ECC-stren.patch |  2 +-
 ...conditional-threaded-NAPI-wakeup-based-on.patch |  6 +-
 ...Allow-to-use-SMP-threads-for-backlog-NAPI.patch | 22 +++---
 ...e-backlog-NAPI-to-clean-up-the-defer_list.patch |  2 +-
 ...v6.10-net-Rename-rps_lock-to-backlog_lock.patch | 18 ++---
 ...v6.11-net-Make-USO-depend-on-CSUM-offload.patch |  6 +-
 ...stats64-if-device-if-driver-is-configured.patch |  2 +-
 ...pp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch |  2 +-
 ...0-net-create-a-dummy-net_device-allocator.patch |  6 +-
 ...end-PHY-package-API-to-support-multiple-g.patch |  2 +-
 ...t-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch |  2 +-
 ...t-mtk_wed-introduce-versioning-utility-ro.patch |  2 +-
 ...et-mtk_wed-add-mtk_wed_soc_data-structure.patch |  4 +-
 ...t-mtk_wed-introduce-WED-support-for-MT798.patch |  4 +-
 ...t-mtk_wed-introduce-partial-AMSDU-offload.patch |  4 +-
 ...t-mtk_eth_soc-ppe-add-support-for-multipl.patch |  6 +-
 ...t-mtk_eth_soc-ppe-prevent-ppe-update-for-.patch |  2 +-
 ....7-net-introduce-napi_is_scheduled-helper.patch |  2 +-
 ...ost-add-missing-MODULE_DESCRIPTION-macros.patch |  2 +-
 ...-xhci-pci-renesas-a-proper-modular-driver.patch | 10 +--
 ...ds-trigger-netdev-Extend-speeds-up-to-10G.patch | 14 ++--
 ...-trigger-netdev-Configure-LED-blink-inter.patch | 81 ----------------------
 ....11-net-free_netdev-exit-earlier-if-dummy.patch |  2 +-
 ...ter-add-RCTAPT-support-for-different-OSRs.patch |  4 +-
 ...-Allow-configuration-of-oversampling-rate.patch |  4 +-
 ...-jitter-reuse-allocated-entropy-collector.patch |  2 +-
 .../linux/generic/hack-6.6/204-module_strip.patch  |  8 +--
 .../hack-6.6/721-net-add-packet-mangeling.patch    |  2 +-
 .../generic/hack-6.6/901-debloat_sock_diag.patch   |  2 +-
 .../linux/generic/hack-6.6/902-debloat_proc.patch  |  2 +-
 target/linux/generic/kernel-6.6                    |  4 +-
 ...only-include-asm-rwonce.h-for-kernel-code.patch |  2 +-
 ...spinand-Add-support-for-Etron-EM73D044VCx.patch |  2 +-
 ...NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch |  2 +-
 ...t-mediatek-fix-ppe-flow-accounting-for-L2.patch |  2 +-
 .../790-bus-mhi-core-add-SBL-state-callback.patch  |  2 +-
 ...nk-at-max-gen-first-for-IMX8MM-and-IMX8MP.patch |  2 +-
 42 files changed, 89 insertions(+), 199 deletions(-)

diff --git a/target/linux/airoha/patches-6.6/105-uart-add-en7523-support.patch b/target/linux/airoha/patches-6.6/105-uart-add-en7523-support.patch
index 80723bd5af..9ea355370b 100644
--- a/target/linux/airoha/patches-6.6/105-uart-add-en7523-support.patch
+++ b/target/linux/airoha/patches-6.6/105-uart-add-en7523-support.patch
@@ -122,7 +122,7 @@
  };
  
  /* Uart divisor latch read */
-@@ -2889,6 +2897,12 @@ serial8250_do_set_termios(struct uart_po
+@@ -2888,6 +2896,12 @@ serial8250_do_set_termios(struct uart_po
  
  	serial8250_set_divisor(port, baud, quot, frac);
  
diff --git a/target/linux/airoha/patches-6.6/901-snand-mtk-bmt-support.patch b/target/linux/airoha/patches-6.6/901-snand-mtk-bmt-support.patch
index 06026f375e..87d898d4a4 100644
--- a/target/linux/airoha/patches-6.6/901-snand-mtk-bmt-support.patch
+++ b/target/linux/airoha/patches-6.6/901-snand-mtk-bmt-support.patch
@@ -8,7 +8,7 @@
  
  static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val)
  {
-@@ -1348,6 +1349,7 @@ static int spinand_probe(struct spi_mem
+@@ -1351,6 +1352,7 @@ static int spinand_probe(struct spi_mem
  	if (ret)
  		return ret;
  
@@ -16,7 +16,7 @@
  	ret = mtd_device_register(mtd, NULL, 0);
  	if (ret)
  		goto err_spinand_cleanup;
-@@ -1355,6 +1357,7 @@ static int spinand_probe(struct spi_mem
+@@ -1358,6 +1360,7 @@ static int spinand_probe(struct spi_mem
  	return 0;
  
  err_spinand_cleanup:
@@ -24,7 +24,7 @@
  	spinand_cleanup(spinand);
  
  	return ret;
-@@ -1373,6 +1376,7 @@ static int spinand_remove(struct spi_mem
+@@ -1376,6 +1379,7 @@ static int spinand_remove(struct spi_mem
  	if (ret)
  		return ret;
  
diff --git a/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
index f8d8f0069b..378d1467ed 100644
--- a/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
+++ b/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
@@ -35,7 +35,7 @@ it on BCM4708 family.
  /* called during probe() after chip reset completes */
 --- a/drivers/usb/host/xhci.c
 +++ b/drivers/usb/host/xhci.c
-@@ -162,6 +162,49 @@ int xhci_start(struct xhci_hcd *xhci)
+@@ -163,6 +163,49 @@ int xhci_start(struct xhci_hcd *xhci)
  	return ret;
  }
  
@@ -73,7 +73,7 @@ it on BCM4708 family.
 +	}
 +
 +	/* Free virt device */
-+	xhci_free_virt_device(xhci, slot_id);
++	xhci_disable_and_free_slot(xhci, slot_id);
 +
 +	/* We're done if controller is already running */
 +	if (readl(&xhci->op_regs->command) & CMD_RUN)
@@ -85,7 +85,7 @@ it on BCM4708 family.
  /*
   * Reset a halted HC.
   *
-@@ -498,6 +541,15 @@ static int xhci_run_finished(struct xhci
+@@ -500,6 +543,15 @@ static int xhci_run_finished(struct xhci
  		return -ENODEV;
  	}
  
diff --git a/target/linux/generic/backport-6.6/220-v6.16-powerpc-boot-fix-build-with-gcc-15.patch b/target/linux/generic/backport-6.6/220-v6.16-powerpc-boot-fix-build-with-gcc-15.patch
deleted file mode 100644
index 330db46584..0000000000
--- a/target/linux/generic/backport-6.6/220-v6.16-powerpc-boot-fix-build-with-gcc-15.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 5a821e2d69e26b51b7f3740b6b0c3462b8cacaff Mon Sep 17 00:00:00 2001
-From: Michal Suchanek <msuchanek at suse.de>
-Date: Mon, 31 Mar 2025 12:57:19 +0200
-Subject: [PATCH] powerpc/boot: Fix build with gcc 15
-
-Similar to x86 the ppc boot code does not build with GCC 15.
-
-Copy the fix from
-commit ee2ab467bddf ("x86/boot: Use '-std=gnu11' to fix build with GCC 15")
-
-Signed-off-by: Michal Suchanek <msuchanek at suse.de>
-Tested-by: Amit Machhiwal <amachhiw at linux.ibm.com>
-Tested-by: Venkat Rao Bagalkote <venkat88 at linux.ibm.com>
-Signed-off-by: Madhavan Srinivasan <maddy at linux.ibm.com>
-Link: https://patch.msgid.link/20250331105722.19709-1-msuchanek at suse.de
----
- arch/powerpc/boot/Makefile | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/arch/powerpc/boot/Makefile
-+++ b/arch/powerpc/boot/Makefile
-@@ -72,6 +72,7 @@ BOOTCPPFLAGS	:= -nostdinc $(LINUXINCLUDE
- BOOTCPPFLAGS	+= -isystem $(shell $(BOOTCC) -print-file-name=include)
- 
- BOOTCFLAGS	:= $(BOOTTARGETFLAGS) \
-+		   -std=gnu11 \
- 		   -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
- 		   -fno-strict-aliasing -O2 \
- 		   -msoft-float -mno-altivec -mno-vsx \
diff --git a/target/linux/generic/backport-6.6/411-v6.7-mtd-spinand-add-support-for-FORESEE-F35SQA002G.patch b/target/linux/generic/backport-6.6/411-v6.7-mtd-spinand-add-support-for-FORESEE-F35SQA002G.patch
index 90672b9979..459dd4481e 100644
--- a/target/linux/generic/backport-6.6/411-v6.7-mtd-spinand-add-support-for-FORESEE-F35SQA002G.patch
+++ b/target/linux/generic/backport-6.6/411-v6.7-mtd-spinand-add-support-for-FORESEE-F35SQA002G.patch
@@ -28,7 +28,7 @@ Link: https://lore.kernel.org/linux-mtd/20231002140458.147605-1-mmkurbanov at salut
  obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
 --- a/drivers/mtd/nand/spi/core.c
 +++ b/drivers/mtd/nand/spi/core.c
-@@ -940,6 +940,7 @@ static const struct spinand_manufacturer
+@@ -943,6 +943,7 @@ static const struct spinand_manufacturer
  	&alliancememory_spinand_manufacturer,
  	&ato_spinand_manufacturer,
  	&esmt_c8_spinand_manufacturer,
diff --git a/target/linux/generic/backport-6.6/417-v6.12-mtd-spinand-set-bitflip_threshold-to-75-of-ECC-stren.patch b/target/linux/generic/backport-6.6/417-v6.12-mtd-spinand-set-bitflip_threshold-to-75-of-ECC-stren.patch
index 4b576fee35..dfecdf1c1d 100644
--- a/target/linux/generic/backport-6.6/417-v6.12-mtd-spinand-set-bitflip_threshold-to-75-of-ECC-stren.patch
+++ b/target/linux/generic/backport-6.6/417-v6.12-mtd-spinand-set-bitflip_threshold-to-75-of-ECC-stren.patch
@@ -21,7 +21,7 @@ Link: https://lore.kernel.org/linux-mtd/2117e387260b0a96f95b8e1652ff79e0e2d71d53
 
 --- a/drivers/mtd/nand/spi/core.c
 +++ b/drivers/mtd/nand/spi/core.c
-@@ -1287,6 +1287,7 @@ static int spinand_init(struct spinand_d
+@@ -1290,6 +1290,7 @@ static int spinand_init(struct spinand_d
  	/* Propagate ECC information to mtd_info */
  	mtd->ecc_strength = nanddev_get_ecc_conf(nand)->strength;
  	mtd->ecc_step_size = nanddev_get_ecc_conf(nand)->step_size;
diff --git a/target/linux/generic/backport-6.6/600-v6.10-net-Remove-conditional-threaded-NAPI-wakeup-based-on.patch b/target/linux/generic/backport-6.6/600-v6.10-net-Remove-conditional-threaded-NAPI-wakeup-based-on.patch
index afaa5328ca..9d95631fac 100644
--- a/target/linux/generic/backport-6.6/600-v6.10-net-Remove-conditional-threaded-NAPI-wakeup-based-on.patch
+++ b/target/linux/generic/backport-6.6/600-v6.10-net-Remove-conditional-threaded-NAPI-wakeup-based-on.patch
@@ -32,7 +32,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -4514,13 +4514,7 @@ static inline void ____napi_schedule(str
+@@ -4526,13 +4526,7 @@ static inline void ____napi_schedule(str
  		 */
  		thread = READ_ONCE(napi->thread);
  		if (thread) {
@@ -47,7 +47,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  			wake_up_process(thread);
  			return;
  		}
-@@ -6676,8 +6670,6 @@ static int napi_poll(struct napi_struct
+@@ -6688,8 +6682,6 @@ static int napi_poll(struct napi_struct
  
  static int napi_thread_wait(struct napi_struct *napi)
  {
@@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	set_current_state(TASK_INTERRUPTIBLE);
  
  	while (!kthread_should_stop()) {
-@@ -6686,15 +6678,13 @@ static int napi_thread_wait(struct napi_
+@@ -6698,15 +6690,13 @@ static int napi_thread_wait(struct napi_
  		 * Testing SCHED bit is not enough because SCHED bit might be
  		 * set by some other busy poll thread or by napi_disable().
  		 */
diff --git a/target/linux/generic/backport-6.6/601-v6.10-net-Allow-to-use-SMP-threads-for-backlog-NAPI.patch b/target/linux/generic/backport-6.6/601-v6.10-net-Allow-to-use-SMP-threads-for-backlog-NAPI.patch
index 98cd35ed84..0c2de04484 100644
--- a/target/linux/generic/backport-6.6/601-v6.10-net-Allow-to-use-SMP-threads-for-backlog-NAPI.patch
+++ b/target/linux/generic/backport-6.6/601-v6.10-net-Allow-to-use-SMP-threads-for-backlog-NAPI.patch
@@ -108,7 +108,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static inline void rps_lock_irqsave(struct softnet_data *sd,
  				    unsigned long *flags)
  {
-@@ -4482,6 +4508,7 @@ EXPORT_SYMBOL(__dev_direct_xmit);
+@@ -4494,6 +4520,7 @@ EXPORT_SYMBOL(__dev_direct_xmit);
  /*************************************************************************
   *			Receiver routines
   *************************************************************************/
@@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  int netdev_max_backlog __read_mostly = 1000;
  EXPORT_SYMBOL(netdev_max_backlog);
-@@ -4514,12 +4541,16 @@ static inline void ____napi_schedule(str
+@@ -4526,12 +4553,16 @@ static inline void ____napi_schedule(str
  		 */
  		thread = READ_ONCE(napi->thread);
  		if (thread) {
@@ -133,7 +133,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	list_add_tail(&napi->poll_list, &sd->poll_list);
  	WRITE_ONCE(napi->list_owner, smp_processor_id());
  	/* If not called from net_rx_action()
-@@ -4765,6 +4796,11 @@ static void napi_schedule_rps(struct sof
+@@ -4777,6 +4808,11 @@ static void napi_schedule_rps(struct sof
  
  #ifdef CONFIG_RPS
  	if (sd != mysd) {
@@ -145,7 +145,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		sd->rps_ipi_next = mysd->rps_ipi_list;
  		mysd->rps_ipi_list = sd;
  
-@@ -5988,7 +6024,7 @@ static void net_rps_action_and_irq_enabl
+@@ -6000,7 +6036,7 @@ static void net_rps_action_and_irq_enabl
  #ifdef CONFIG_RPS
  	struct softnet_data *remsd = sd->rps_ipi_list;
  
@@ -154,7 +154,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		sd->rps_ipi_list = NULL;
  
  		local_irq_enable();
-@@ -6003,7 +6039,7 @@ static void net_rps_action_and_irq_enabl
+@@ -6015,7 +6051,7 @@ static void net_rps_action_and_irq_enabl
  static bool sd_has_rps_ipi_waiting(struct softnet_data *sd)
  {
  #ifdef CONFIG_RPS
@@ -163,7 +163,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  #else
  	return false;
  #endif
-@@ -6047,7 +6083,7 @@ static int process_backlog(struct napi_s
+@@ -6059,7 +6095,7 @@ static int process_backlog(struct napi_s
  			 * We can use a plain write instead of clear_bit(),
  			 * and we dont need an smp_mb() memory barrier.
  			 */
@@ -172,7 +172,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  			again = false;
  		} else {
  			skb_queue_splice_tail_init(&sd->input_pkt_queue,
-@@ -6713,43 +6749,48 @@ static void skb_defer_free_flush(struct
+@@ -6725,43 +6761,48 @@ static void skb_defer_free_flush(struct
  	}
  }
  
@@ -250,7 +250,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	return 0;
  }
  
-@@ -11334,7 +11375,7 @@ static int dev_cpu_dead(unsigned int old
+@@ -11346,7 +11387,7 @@ static int dev_cpu_dead(unsigned int old
  
  		list_del_init(&napi->poll_list);
  		if (napi->poll == process_backlog)
@@ -259,7 +259,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		else
  			____napi_schedule(sd, napi);
  	}
-@@ -11342,12 +11383,14 @@ static int dev_cpu_dead(unsigned int old
+@@ -11354,12 +11395,14 @@ static int dev_cpu_dead(unsigned int old
  	raise_softirq_irqoff(NET_TX_SOFTIRQ);
  	local_irq_enable();
  
@@ -278,7 +278,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	/* Process offline CPU's input_pkt_queue */
  	while ((skb = __skb_dequeue(&oldsd->process_queue))) {
-@@ -11610,6 +11653,38 @@ static struct pernet_operations __net_in
+@@ -11622,6 +11665,38 @@ static struct pernet_operations __net_in
   *
   */
  
@@ -317,7 +317,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  /*
   *       This is called single threaded during boot, so no need
   *       to take the rtnl semaphore.
-@@ -11660,7 +11735,10 @@ static int __init net_dev_init(void)
+@@ -11672,7 +11747,10 @@ static int __init net_dev_init(void)
  		init_gro_hash(&sd->backlog);
  		sd->backlog.poll = process_backlog;
  		sd->backlog.weight = weight_p;
diff --git a/target/linux/generic/backport-6.6/602-v6.10-net-Use-backlog-NAPI-to-clean-up-the-defer_list.patch b/target/linux/generic/backport-6.6/602-v6.10-net-Use-backlog-NAPI-to-clean-up-the-defer_list.patch
index b721a16f18..d6ef75db69 100644
--- a/target/linux/generic/backport-6.6/602-v6.10-net-Use-backlog-NAPI-to-clean-up-the-defer_list.patch
+++ b/target/linux/generic/backport-6.6/602-v6.10-net-Use-backlog-NAPI-to-clean-up-the-defer_list.patch
@@ -82,7 +82,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		spin_unlock_irq(&sd->input_pkt_queue.lock);
  	else if (!IS_ENABLED(CONFIG_PREEMPT_RT))
  		local_irq_enable();
-@@ -4815,6 +4815,23 @@ static void napi_schedule_rps(struct sof
+@@ -4827,6 +4827,23 @@ static void napi_schedule_rps(struct sof
  	__napi_schedule_irqoff(&mysd->backlog);
  }
  
diff --git a/target/linux/generic/backport-6.6/603-v6.10-net-Rename-rps_lock-to-backlog_lock.patch b/target/linux/generic/backport-6.6/603-v6.10-net-Rename-rps_lock-to-backlog_lock.patch
index 33ebe5d2a6..ccb761cf5c 100644
--- a/target/linux/generic/backport-6.6/603-v6.10-net-Rename-rps_lock-to-backlog_lock.patch
+++ b/target/linux/generic/backport-6.6/603-v6.10-net-Rename-rps_lock-to-backlog_lock.patch
@@ -67,7 +67,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  {
  	if (IS_ENABLED(CONFIG_RPS) || use_backlog_threads())
  		spin_unlock_irq(&sd->input_pkt_queue.lock);
-@@ -4820,12 +4820,12 @@ void kick_defer_list_purge(struct softne
+@@ -4832,12 +4832,12 @@ void kick_defer_list_purge(struct softne
  	unsigned long flags;
  
  	if (use_backlog_threads()) {
@@ -82,7 +82,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	} else if (!cmpxchg(&sd->defer_ipi_scheduled, 0, 1)) {
  		smp_call_function_single_async(cpu, &sd->defer_csd);
-@@ -4887,7 +4887,7 @@ static int enqueue_to_backlog(struct sk_
+@@ -4899,7 +4899,7 @@ static int enqueue_to_backlog(struct sk_
  	reason = SKB_DROP_REASON_NOT_SPECIFIED;
  	sd = &per_cpu(softnet_data, cpu);
  
@@ -91,7 +91,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	if (!netif_running(skb->dev))
  		goto drop;
  	qlen = skb_queue_len(&sd->input_pkt_queue);
-@@ -4896,7 +4896,7 @@ static int enqueue_to_backlog(struct sk_
+@@ -4908,7 +4908,7 @@ static int enqueue_to_backlog(struct sk_
  enqueue:
  			__skb_queue_tail(&sd->input_pkt_queue, skb);
  			input_queue_tail_incr_save(sd, qtail);
@@ -100,7 +100,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  			return NET_RX_SUCCESS;
  		}
  
-@@ -4911,7 +4911,7 @@ enqueue:
+@@ -4923,7 +4923,7 @@ enqueue:
  
  drop:
  	sd->dropped++;
@@ -109,7 +109,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	dev_core_stats_rx_dropped_inc(skb->dev);
  	kfree_skb_reason(skb, reason);
-@@ -5942,7 +5942,7 @@ static void flush_backlog(struct work_st
+@@ -5954,7 +5954,7 @@ static void flush_backlog(struct work_st
  	local_bh_disable();
  	sd = this_cpu_ptr(&softnet_data);
  
@@ -118,7 +118,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) {
  		if (skb->dev->reg_state == NETREG_UNREGISTERING) {
  			__skb_unlink(skb, &sd->input_pkt_queue);
-@@ -5950,7 +5950,7 @@ static void flush_backlog(struct work_st
+@@ -5962,7 +5962,7 @@ static void flush_backlog(struct work_st
  			input_queue_head_incr(sd);
  		}
  	}
@@ -127,7 +127,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	skb_queue_walk_safe(&sd->process_queue, skb, tmp) {
  		if (skb->dev->reg_state == NETREG_UNREGISTERING) {
-@@ -5968,14 +5968,14 @@ static bool flush_required(int cpu)
+@@ -5980,14 +5980,14 @@ static bool flush_required(int cpu)
  	struct softnet_data *sd = &per_cpu(softnet_data, cpu);
  	bool do_flush;
  
@@ -144,7 +144,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	return do_flush;
  #endif
-@@ -6090,7 +6090,7 @@ static int process_backlog(struct napi_s
+@@ -6102,7 +6102,7 @@ static int process_backlog(struct napi_s
  
  		}
  
@@ -153,7 +153,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		if (skb_queue_empty(&sd->input_pkt_queue)) {
  			/*
  			 * Inline a custom version of __napi_complete().
-@@ -6106,7 +6106,7 @@ static int process_backlog(struct napi_s
+@@ -6118,7 +6118,7 @@ static int process_backlog(struct napi_s
  			skb_queue_splice_tail_init(&sd->input_pkt_queue,
  						   &sd->process_queue);
  		}
diff --git a/target/linux/generic/backport-6.6/611-02-v6.11-net-Make-USO-depend-on-CSUM-offload.patch b/target/linux/generic/backport-6.6/611-02-v6.11-net-Make-USO-depend-on-CSUM-offload.patch
index 0ccf0e30d6..ae1a9a0639 100644
--- a/target/linux/generic/backport-6.6/611-02-v6.11-net-Make-USO-depend-on-CSUM-offload.patch
+++ b/target/linux/generic/backport-6.6/611-02-v6.11-net-Make-USO-depend-on-CSUM-offload.patch
@@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -9796,6 +9796,15 @@ static void netdev_sync_lower_features(s
+@@ -9808,6 +9808,15 @@ static void netdev_sync_lower_features(s
  	}
  }
  
@@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static netdev_features_t netdev_fix_features(struct net_device *dev,
  	netdev_features_t features)
  {
-@@ -9877,15 +9886,9 @@ static netdev_features_t netdev_fix_feat
+@@ -9889,15 +9898,9 @@ static netdev_features_t netdev_fix_feat
  		features &= ~NETIF_F_LRO;
  	}
  
@@ -55,7 +55,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	if ((features & NETIF_F_HW_TLS_RX) && !(features & NETIF_F_RXCSUM)) {
-@@ -9893,6 +9896,11 @@ static netdev_features_t netdev_fix_feat
+@@ -9905,6 +9908,11 @@ static netdev_features_t netdev_fix_feat
  		features &= ~NETIF_F_HW_TLS_RX;
  	}
  
diff --git a/target/linux/generic/backport-6.6/612-v6.9-net-get-stats64-if-device-if-driver-is-configured.patch b/target/linux/generic/backport-6.6/612-v6.9-net-get-stats64-if-device-if-driver-is-configured.patch
index c27ccc1942..bf2c428eb4 100644
--- a/target/linux/generic/backport-6.6/612-v6.9-net-get-stats64-if-device-if-driver-is-configured.patch
+++ b/target/linux/generic/backport-6.6/612-v6.9-net-get-stats64-if-device-if-driver-is-configured.patch
@@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -10703,6 +10703,8 @@ struct rtnl_link_stats64 *dev_get_stats(
+@@ -10715,6 +10715,8 @@ struct rtnl_link_stats64 *dev_get_stats(
  		ops->ndo_get_stats64(dev, storage);
  	} else if (ops->ndo_get_stats) {
  		netdev_stats_to_stats64(storage, ops->ndo_get_stats(dev));
diff --git a/target/linux/generic/backport-6.6/624-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch b/target/linux/generic/backport-6.6/624-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
index 7d18fff096..7d9859ec2e 100644
--- a/target/linux/generic/backport-6.6/624-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
+++ b/target/linux/generic/backport-6.6/624-v6.15-ppp-use-IFF_NO_QUEUE-in-virtual-interfaces.patch
@@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ppp/ppp_generic.c
 +++ b/drivers/net/ppp/ppp_generic.c
-@@ -3500,6 +3500,10 @@ ppp_connect_channel(struct channel *pch,
+@@ -3504,6 +3504,10 @@ ppp_connect_channel(struct channel *pch,
  		ret = -ENOTCONN;
  		goto outl;
  	}
diff --git a/target/linux/generic/backport-6.6/700-v6.10-net-create-a-dummy-net_device-allocator.patch b/target/linux/generic/backport-6.6/700-v6.10-net-create-a-dummy-net_device-allocator.patch
index efc6412177..c91d0428b8 100644
--- a/target/linux/generic/backport-6.6/700-v6.10-net-create-a-dummy-net_device-allocator.patch
+++ b/target/linux/generic/backport-6.6/700-v6.10-net-create-a-dummy-net_device-allocator.patch
@@ -49,7 +49,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  				    unsigned char name_assign_type,
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -10390,25 +10390,12 @@ err_free_name:
+@@ -10402,25 +10402,12 @@ err_free_name:
  }
  EXPORT_SYMBOL(register_netdevice);
  
@@ -79,7 +79,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	/* make sure we BUG if trying to hit standard
  	 * register/unregister code path
  	 */
-@@ -10428,12 +10415,32 @@ int init_dummy_netdev(struct net_device
+@@ -10440,12 +10427,32 @@ int init_dummy_netdev(struct net_device
  	 * because users of this 'device' dont need to change
  	 * its refcount.
  	 */
@@ -113,7 +113,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  /**
   *	register_netdev	- register a network device
   *	@dev: device to register
-@@ -11027,6 +11034,19 @@ void free_netdev(struct net_device *dev)
+@@ -11039,6 +11046,19 @@ void free_netdev(struct net_device *dev)
  EXPORT_SYMBOL(free_netdev);
  
  /**
diff --git a/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch b/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch
index e7e3c8c75f..514a80b298 100644
--- a/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch
+++ b/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch
@@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	phy_unlock_mdio_bus(phydev);
 --- a/drivers/net/phy/mscc/mscc.h
 +++ b/drivers/net/phy/mscc/mscc.h
-@@ -416,6 +416,11 @@ struct vsc8531_private {
+@@ -428,6 +428,11 @@ struct vsc8531_private {
   * gpio_lock: used for PHC operations. Common for all PHYs as the load/save GPIO
   * is shared.
   */
diff --git a/target/linux/generic/backport-6.6/752-03-v6.7-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch b/target/linux/generic/backport-6.6/752-03-v6.7-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch
index b982011791..e8b9bba1d8 100644
--- a/target/linux/generic/backport-6.6/752-03-v6.7-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch
+++ b/target/linux/generic/backport-6.6/752-03-v6.7-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch
@@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -198,10 +198,10 @@ mtk_flow_set_output_device(struct mtk_et
+@@ -200,10 +200,10 @@ mtk_flow_set_output_device(struct mtk_et
  		if (mtk_is_netsys_v2_or_greater(eth)) {
  			switch (info.wdma_idx) {
  			case 0:
diff --git a/target/linux/generic/backport-6.6/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch b/target/linux/generic/backport-6.6/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch
index 323bc14c3e..dc692b4968 100644
--- a/target/linux/generic/backport-6.6/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch
+++ b/target/linux/generic/backport-6.6/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch
@@ -177,7 +177,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		return -EOPNOTSUPP;
  
  	switch (type) {
-@@ -1916,9 +1916,9 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1915,9 +1915,9 @@ void mtk_wed_add_hw(struct device_node *
  	hw->wdma = wdma;
  	hw->index = index;
  	hw->irq = irq;
diff --git a/target/linux/generic/backport-6.6/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch b/target/linux/generic/backport-6.6/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch
index 6e2f8b1920..8ca733f3ed 100644
--- a/target/linux/generic/backport-6.6/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch
+++ b/target/linux/generic/backport-6.6/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch
@@ -142,7 +142,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		return -ENOMEM;
  
  	wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_BASE,
-@@ -1930,7 +1937,12 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1929,7 +1936,12 @@ void mtk_wed_add_hw(struct device_node *
  	hw->irq = irq;
  	hw->version = eth->soc->version;
  
@@ -156,7 +156,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		hw->mirror = syscon_regmap_lookup_by_phandle(eth_np,
  				"mediatek,pcie-mirror");
  		hw->hifsys = syscon_regmap_lookup_by_phandle(eth_np,
-@@ -1944,6 +1956,8 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1943,6 +1955,8 @@ void mtk_wed_add_hw(struct device_node *
  			regmap_write(hw->mirror, 0, 0);
  			regmap_write(hw->mirror, 4, 0);
  		}
diff --git a/target/linux/generic/backport-6.6/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch b/target/linux/generic/backport-6.6/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch
index 2e846f5495..aa6542a7d8 100644
--- a/target/linux/generic/backport-6.6/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch
+++ b/target/linux/generic/backport-6.6/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch
@@ -34,7 +34,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  };
 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -203,6 +203,9 @@ mtk_flow_set_output_device(struct mtk_et
+@@ -205,6 +205,9 @@ mtk_flow_set_output_device(struct mtk_et
  			case 1:
  				pse_port = PSE_WDMA1_PORT;
  				break;
@@ -759,7 +759,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	val = wed_r32(dev, MTK_WED_EXT_INT_STATUS);
  	wed_w32(dev, MTK_WED_EXT_INT_STATUS, val);
-@@ -1941,6 +2132,9 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1940,6 +2131,9 @@ void mtk_wed_add_hw(struct device_node *
  	case 2:
  		hw->soc = &mt7986_data;
  		break;
diff --git a/target/linux/generic/backport-6.6/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch b/target/linux/generic/backport-6.6/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch
index 2376b050b8..d879dc0de8 100644
--- a/target/linux/generic/backport-6.6/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch
+++ b/target/linux/generic/backport-6.6/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch
@@ -77,7 +77,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  int mtk_foe_entry_commit(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -113,6 +113,7 @@ mtk_flow_get_wdma_info(struct net_device
+@@ -115,6 +115,7 @@ mtk_flow_get_wdma_info(struct net_device
  	info->queue = path->mtk_wdma.queue;
  	info->bss = path->mtk_wdma.bss;
  	info->wcid = path->mtk_wdma.wcid;
@@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	return 0;
  }
-@@ -194,7 +195,7 @@ mtk_flow_set_output_device(struct mtk_et
+@@ -196,7 +197,7 @@ mtk_flow_set_output_device(struct mtk_et
  
  	if (mtk_flow_get_wdma_info(dev, dest_mac, &info) == 0) {
  		mtk_foe_entry_set_wdma(eth, foe, info.wdma_idx, info.queue,
diff --git a/target/linux/generic/backport-6.6/752-26-v6.10-net-ethernet-mtk_eth_soc-ppe-add-support-for-multipl.patch b/target/linux/generic/backport-6.6/752-26-v6.10-net-ethernet-mtk_eth_soc-ppe-add-support-for-multipl.patch
index 9fdb94cb44..82dae16ee3 100644
--- a/target/linux/generic/backport-6.6/752-26-v6.10-net-ethernet-mtk_eth_soc-ppe-add-support-for-multipl.patch
+++ b/target/linux/generic/backport-6.6/752-26-v6.10-net-ethernet-mtk_eth_soc-ppe-add-support-for-multipl.patch
@@ -328,7 +328,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  int mtk_flow_offload_cmd(struct mtk_eth *eth, struct flow_cls_offload *cls,
 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -247,10 +247,10 @@ mtk_flow_offload_replace(struct mtk_eth
+@@ -249,10 +249,10 @@ mtk_flow_offload_replace(struct mtk_eth
  			 int ppe_index)
  {
  	struct flow_rule *rule = flow_cls_offload_flow_rule(f);
@@ -340,7 +340,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mtk_flow_entry *entry;
  	int offload_type = 0;
  	int wed_index = -1;
-@@ -266,6 +266,17 @@ mtk_flow_offload_replace(struct mtk_eth
+@@ -268,6 +268,17 @@ mtk_flow_offload_replace(struct mtk_eth
  		struct flow_match_meta match;
  
  		flow_rule_match_meta(rule, &match);
@@ -358,7 +358,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	} else {
  		return -EOPNOTSUPP;
  	}
-@@ -633,7 +644,9 @@ int mtk_eth_setup_tc(struct net_device *
+@@ -635,7 +646,9 @@ int mtk_eth_setup_tc(struct net_device *
  	}
  }
  
diff --git a/target/linux/generic/backport-6.6/752-27-v6.10-net-ethernet-mtk_eth_soc-ppe-prevent-ppe-update-for-.patch b/target/linux/generic/backport-6.6/752-27-v6.10-net-ethernet-mtk_eth_soc-ppe-prevent-ppe-update-for-.patch
index d70c89f7c4..0ef6cd88b1 100644
--- a/target/linux/generic/backport-6.6/752-27-v6.10-net-ethernet-mtk_eth_soc-ppe-prevent-ppe-update-for-.patch
+++ b/target/linux/generic/backport-6.6/752-27-v6.10-net-ethernet-mtk_eth_soc-ppe-prevent-ppe-update-for-.patch
@@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -268,7 +268,7 @@ mtk_flow_offload_replace(struct mtk_eth
+@@ -270,7 +270,7 @@ mtk_flow_offload_replace(struct mtk_eth
  		flow_rule_match_meta(rule, &match);
  		if (mtk_is_netsys_v2_or_greater(eth)) {
  			idev = __dev_get_by_index(&init_net, match.key->ingress_ifindex);
diff --git a/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch b/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch
index 4aa93c20d1..b9bf885d9d 100644
--- a/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch
+++ b/target/linux/generic/backport-6.6/770-v6.7-net-introduce-napi_is_scheduled-helper.patch
@@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  /**
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -6643,7 +6643,7 @@ static int __napi_poll(struct napi_struc
+@@ -6655,7 +6655,7 @@ static int __napi_poll(struct napi_struc
  	 * accidentally calling ->poll() when NAPI is not scheduled.
  	 */
  	work = 0;
diff --git a/target/linux/generic/backport-6.6/806-02-v6.11-usb-host-add-missing-MODULE_DESCRIPTION-macros.patch b/target/linux/generic/backport-6.6/806-02-v6.11-usb-host-add-missing-MODULE_DESCRIPTION-macros.patch
index f27b56a93b..2d37bb8dec 100644
--- a/target/linux/generic/backport-6.6/806-02-v6.11-usb-host-add-missing-MODULE_DESCRIPTION-macros.patch
+++ b/target/linux/generic/backport-6.6/806-02-v6.11-usb-host-add-missing-MODULE_DESCRIPTION-macros.patch
@@ -27,7 +27,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  MODULE_LICENSE("GPL v2");
 --- a/drivers/usb/host/xhci-pci-renesas.c
 +++ b/drivers/usb/host/xhci-pci-renesas.c
-@@ -627,4 +627,5 @@ exit:
+@@ -628,4 +628,5 @@ exit:
  }
  EXPORT_SYMBOL_GPL(renesas_xhci_check_request_fw);
  
diff --git a/target/linux/generic/backport-6.6/806-03-v6.12-xhci-pci-Make-xhci-pci-renesas-a-proper-modular-driver.patch b/target/linux/generic/backport-6.6/806-03-v6.12-xhci-pci-Make-xhci-pci-renesas-a-proper-modular-driver.patch
index dfab7200e1..41e310d89c 100644
--- a/target/linux/generic/backport-6.6/806-03-v6.12-xhci-pci-Make-xhci-pci-renesas-a-proper-modular-driver.patch
+++ b/target/linux/generic/backport-6.6/806-03-v6.12-xhci-pci-Make-xhci-pci-renesas-a-proper-modular-driver.patch
@@ -63,16 +63,16 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	  firmware. Make sure you have the firmware for the device and
 --- a/drivers/usb/host/xhci-pci-renesas.c
 +++ b/drivers/usb/host/xhci-pci-renesas.c
-@@ -50,6 +50,8 @@
- #define RENESAS_RETRY	10000
- #define RENESAS_DELAY	10
+@@ -51,6 +51,8 @@
+ #define RENESAS_CHIP_ERASE_RETRY	500000	/* 500000 * RENESAS_DELAY ~= 5s */
+ #define RENESAS_DELAY			10
  
 +#define RENESAS_FW_NAME	"renesas_usb_fw.mem"
 +
  static int renesas_fw_download_image(struct pci_dev *dev,
  				     const u32 *fw, size_t step, bool rom)
  {
-@@ -573,12 +575,10 @@ exit:
+@@ -574,12 +576,10 @@ exit:
  	return err;
  }
  
@@ -88,7 +88,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	const struct firmware *fw;
  	bool has_rom;
  	int err;
-@@ -625,7 +625,41 @@ exit:
+@@ -626,7 +626,41 @@ exit:
  	release_firmware(fw);
  	return err;
  }
diff --git a/target/linux/generic/backport-6.6/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch b/target/linux/generic/backport-6.6/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch
index 3a64e6822d..4571d7d2bf 100644
--- a/target/linux/generic/backport-6.6/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch
+++ b/target/linux/generic/backport-6.6/834-v6.8-leds-trigger-netdev-Extend-speeds-up-to-10G.patch
@@ -16,7 +16,7 @@ Signed-off-by: Lee Jones <lee at kernel.org>
 
 --- a/drivers/leds/trigger/ledtrig-netdev.c
 +++ b/drivers/leds/trigger/ledtrig-netdev.c
-@@ -104,6 +104,18 @@ static void set_baseline_state(struct le
+@@ -99,6 +99,18 @@ static void set_baseline_state(struct le
  		    trigger_data->link_speed == SPEED_1000)
  			blink_on = true;
  
@@ -35,7 +35,7 @@ Signed-off-by: Lee Jones <lee at kernel.org>
  		if (test_bit(TRIGGER_NETDEV_HALF_DUPLEX, &trigger_data->mode) &&
  		    trigger_data->duplex == DUPLEX_HALF)
  			blink_on = true;
-@@ -294,6 +306,9 @@ static ssize_t netdev_led_attr_show(stru
+@@ -289,6 +301,9 @@ static ssize_t netdev_led_attr_show(stru
  	case TRIGGER_NETDEV_LINK_10:
  	case TRIGGER_NETDEV_LINK_100:
  	case TRIGGER_NETDEV_LINK_1000:
@@ -45,7 +45,7 @@ Signed-off-by: Lee Jones <lee at kernel.org>
  	case TRIGGER_NETDEV_HALF_DUPLEX:
  	case TRIGGER_NETDEV_FULL_DUPLEX:
  	case TRIGGER_NETDEV_TX:
-@@ -324,6 +339,9 @@ static ssize_t netdev_led_attr_store(str
+@@ -319,6 +334,9 @@ static ssize_t netdev_led_attr_store(str
  	case TRIGGER_NETDEV_LINK_10:
  	case TRIGGER_NETDEV_LINK_100:
  	case TRIGGER_NETDEV_LINK_1000:
@@ -55,7 +55,7 @@ Signed-off-by: Lee Jones <lee at kernel.org>
  	case TRIGGER_NETDEV_HALF_DUPLEX:
  	case TRIGGER_NETDEV_FULL_DUPLEX:
  	case TRIGGER_NETDEV_TX:
-@@ -342,7 +360,10 @@ static ssize_t netdev_led_attr_store(str
+@@ -337,7 +355,10 @@ static ssize_t netdev_led_attr_store(str
  	if (test_bit(TRIGGER_NETDEV_LINK, &mode) &&
  	    (test_bit(TRIGGER_NETDEV_LINK_10, &mode) ||
  	     test_bit(TRIGGER_NETDEV_LINK_100, &mode) ||
@@ -67,7 +67,7 @@ Signed-off-by: Lee Jones <lee at kernel.org>
  		return -EINVAL;
  
  	cancel_delayed_work_sync(&trigger_data->work);
-@@ -372,6 +393,9 @@ DEFINE_NETDEV_TRIGGER(link, TRIGGER_NETD
+@@ -367,6 +388,9 @@ DEFINE_NETDEV_TRIGGER(link, TRIGGER_NETD
  DEFINE_NETDEV_TRIGGER(link_10, TRIGGER_NETDEV_LINK_10);
  DEFINE_NETDEV_TRIGGER(link_100, TRIGGER_NETDEV_LINK_100);
  DEFINE_NETDEV_TRIGGER(link_1000, TRIGGER_NETDEV_LINK_1000);
@@ -77,7 +77,7 @@ Signed-off-by: Lee Jones <lee at kernel.org>
  DEFINE_NETDEV_TRIGGER(half_duplex, TRIGGER_NETDEV_HALF_DUPLEX);
  DEFINE_NETDEV_TRIGGER(full_duplex, TRIGGER_NETDEV_FULL_DUPLEX);
  DEFINE_NETDEV_TRIGGER(tx, TRIGGER_NETDEV_TX);
-@@ -435,6 +459,9 @@ static struct attribute *netdev_trig_att
+@@ -425,6 +449,9 @@ static struct attribute *netdev_trig_att
  	&dev_attr_link_10.attr,
  	&dev_attr_link_100.attr,
  	&dev_attr_link_1000.attr,
@@ -87,7 +87,7 @@ Signed-off-by: Lee Jones <lee at kernel.org>
  	&dev_attr_full_duplex.attr,
  	&dev_attr_half_duplex.attr,
  	&dev_attr_rx.attr,
-@@ -532,6 +559,9 @@ static void netdev_trig_work(struct work
+@@ -522,6 +549,9 @@ static void netdev_trig_work(struct work
  			 test_bit(TRIGGER_NETDEV_LINK_10, &trigger_data->mode) ||
  			 test_bit(TRIGGER_NETDEV_LINK_100, &trigger_data->mode) ||
  			 test_bit(TRIGGER_NETDEV_LINK_1000, &trigger_data->mode) ||
diff --git a/target/linux/generic/backport-6.6/847-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch b/target/linux/generic/backport-6.6/847-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch
deleted file mode 100644
index 192f12d5c8..0000000000
--- a/target/linux/generic/backport-6.6/847-v6.17-Revert-leds-trigger-netdev-Configure-LED-blink-inter.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 26f732791f2bcab18f59c61915bbe35225f30136 Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel at makrotopia.org>
-Date: Sat, 12 Jul 2025 16:39:21 +0100
-Subject: [PATCH] Revert "leds: trigger: netdev: Configure LED blink interval
- for HW offload"
-
-This reverts commit c629c972b310af41e9e072febb6dae9a299edde6.
-
-While .led_blink_set() would previously put an LED into an unconditional
-permanently blinking state, the offending commit now uses same operation
-to (also?) set the blink timing of the netdev trigger when offloading.
-
-This breaks many if not all of the existing PHY drivers which offer
-offloading LED operations, as those drivers would just put the LED into
-blinking state after .led_blink_set() has been called.
-
-Unfortunately the change even made it into stable kernels for unknown
-reasons, so it should be reverted there as well.
-
-Fixes: c629c972b310a ("leds: trigger: netdev: Configure LED blink interval for HW offload")
-Link: https://lore.kernel.org/linux-leds/c6134e26-2e45-4121-aa15-58aaef327201 at lunn.ch/T/#m9d6fe81bbcb273e59f12bbedbd633edd32118387
-Suggested-by: Andrew Lunn <andrew at lunn.ch>
-Cc: stable at vger.kernel.org
-Signed-off-by: Daniel Golle <daniel at makrotopia.org>
-Reviewed-by: Andrew Lunn <andrew at lunn.ch>
-Link: https://lore.kernel.org/r/6dcc77ee1c9676891d6250d8994850f521426a0f.1752334655.git.daniel at makrotopia.org
-Signed-off-by: Lee Jones <lee at kernel.org>
----
- drivers/leds/trigger/ledtrig-netdev.c | 16 +++-------------
- 1 file changed, 3 insertions(+), 13 deletions(-)
-
---- a/drivers/leds/trigger/ledtrig-netdev.c
-+++ b/drivers/leds/trigger/ledtrig-netdev.c
-@@ -54,7 +54,6 @@ struct led_netdev_data {
- 	unsigned int last_activity;
- 
- 	unsigned long mode;
--	unsigned long blink_delay;
- 	int link_speed;
- 	u8 duplex;
- 
-@@ -70,10 +69,6 @@ static void set_baseline_state(struct le
- 	/* Already validated, hw control is possible with the requested mode */
- 	if (trigger_data->hw_control) {
- 		led_cdev->hw_control_set(led_cdev, trigger_data->mode);
--		if (led_cdev->blink_set) {
--			led_cdev->blink_set(led_cdev, &trigger_data->blink_delay,
--					    &trigger_data->blink_delay);
--		}
- 
- 		return;
- 	}
-@@ -415,11 +410,10 @@ static ssize_t interval_store(struct dev
- 			      size_t size)
- {
- 	struct led_netdev_data *trigger_data = led_trigger_get_drvdata(dev);
--	struct led_classdev *led_cdev = trigger_data->led_cdev;
- 	unsigned long value;
- 	int ret;
- 
--	if (trigger_data->hw_control && !led_cdev->blink_set)
-+	if (trigger_data->hw_control)
- 		return -EINVAL;
- 
- 	ret = kstrtoul(buf, 0, &value);
-@@ -428,13 +422,9 @@ static ssize_t interval_store(struct dev
- 
- 	/* impose some basic bounds on the timer interval */
- 	if (value >= 5 && value <= 10000) {
--		if (trigger_data->hw_control) {
--			trigger_data->blink_delay = value;
--		} else {
--			cancel_delayed_work_sync(&trigger_data->work);
-+		cancel_delayed_work_sync(&trigger_data->work);
- 
--			atomic_set(&trigger_data->interval, msecs_to_jiffies(value));
--		}
-+		atomic_set(&trigger_data->interval, msecs_to_jiffies(value));
- 		set_baseline_state(trigger_data);	/* resets timer */
- 	}
- 
diff --git a/target/linux/generic/backport-6.6/900-v6.11-net-free_netdev-exit-earlier-if-dummy.patch b/target/linux/generic/backport-6.6/900-v6.11-net-free_netdev-exit-earlier-if-dummy.patch
index 8f63a7a0df..da054ef8ec 100644
--- a/target/linux/generic/backport-6.6/900-v6.11-net-free_netdev-exit-earlier-if-dummy.patch
+++ b/target/linux/generic/backport-6.6/900-v6.11-net-free_netdev-exit-earlier-if-dummy.patch
@@ -23,7 +23,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -11020,7 +11020,8 @@ void free_netdev(struct net_device *dev)
+@@ -11032,7 +11032,8 @@ void free_netdev(struct net_device *dev)
  	dev->xdp_bulkq = NULL;
  
  	/*  Compatibility with error handling in drivers */
diff --git a/target/linux/generic/backport-6.6/906-01-v6.7-crypto-jitter-add-RCTAPT-support-for-different-OSRs.patch b/target/linux/generic/backport-6.6/906-01-v6.7-crypto-jitter-add-RCTAPT-support-for-different-OSRs.patch
index d0ae1258f8..a8e729cb28 100644
--- a/target/linux/generic/backport-6.6/906-01-v6.7-crypto-jitter-add-RCTAPT-support-for-different-OSRs.patch
+++ b/target/linux/generic/backport-6.6/906-01-v6.7-crypto-jitter-add-RCTAPT-support-for-different-OSRs.patch
@@ -43,7 +43,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/crypto/jitterentropy-kcapi.c
 +++ b/crypto/jitterentropy-kcapi.c
-@@ -245,7 +245,7 @@ static int jent_kcapi_init(struct crypto
+@@ -246,7 +246,7 @@ static int jent_kcapi_init(struct crypto
  	crypto_shash_init(sdesc);
  	rng->sdesc = sdesc;
  
@@ -52,7 +52,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  	if (!rng->entropy_collector) {
  		ret = -ENOMEM;
  		goto err;
-@@ -334,7 +334,7 @@ static int __init jent_mod_init(void)
+@@ -335,7 +335,7 @@ static int __init jent_mod_init(void)
  
  	desc->tfm = tfm;
  	crypto_shash_init(desc);
diff --git a/target/linux/generic/backport-6.6/906-03-v6.7-crypto-jitter-Allow-configuration-of-oversampling-rate.patch b/target/linux/generic/backport-6.6/906-03-v6.7-crypto-jitter-Allow-configuration-of-oversampling-rate.patch
index 856400fce9..a629b7b770 100644
--- a/target/linux/generic/backport-6.6/906-03-v6.7-crypto-jitter-Allow-configuration-of-oversampling-rate.patch
+++ b/target/linux/generic/backport-6.6/906-03-v6.7-crypto-jitter-Allow-configuration-of-oversampling-rate.patch
@@ -53,7 +53,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  	depends on CRYPTO_JITTERENTROPY
 --- a/crypto/jitterentropy-kcapi.c
 +++ b/crypto/jitterentropy-kcapi.c
-@@ -256,7 +256,9 @@ static int jent_kcapi_init(struct crypto
+@@ -257,7 +257,9 @@ static int jent_kcapi_init(struct crypto
  	crypto_shash_init(sdesc);
  	rng->sdesc = sdesc;
  
@@ -64,7 +64,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
  	if (!rng->entropy_collector) {
  		ret = -ENOMEM;
  		goto err;
-@@ -345,7 +347,7 @@ static int __init jent_mod_init(void)
+@@ -346,7 +348,7 @@ static int __init jent_mod_init(void)
  
  	desc->tfm = tfm;
  	crypto_shash_init(desc);
diff --git a/target/linux/generic/backport-6.6/906-04-v6.7-crypto-jitter-reuse-allocated-entropy-collector.patch b/target/linux/generic/backport-6.6/906-04-v6.7-crypto-jitter-reuse-allocated-entropy-collector.patch
index d56f1f2449..81f7f2fab5 100644
--- a/target/linux/generic/backport-6.6/906-04-v6.7-crypto-jitter-reuse-allocated-entropy-collector.patch
+++ b/target/linux/generic/backport-6.6/906-04-v6.7-crypto-jitter-reuse-allocated-entropy-collector.patch
@@ -36,7 +36,7 @@ Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au>
 
 --- a/crypto/jitterentropy-kcapi.c
 +++ b/crypto/jitterentropy-kcapi.c
-@@ -347,7 +347,7 @@ static int __init jent_mod_init(void)
+@@ -348,7 +348,7 @@ static int __init jent_mod_init(void)
  
  	desc->tfm = tfm;
  	crypto_shash_init(desc);
diff --git a/target/linux/generic/hack-6.6/204-module_strip.patch b/target/linux/generic/hack-6.6/204-module_strip.patch
index ccadee1e5a..9402ecb147 100644
--- a/target/linux/generic/hack-6.6/204-module_strip.patch
+++ b/target/linux/generic/hack-6.6/204-module_strip.patch
@@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  endif # MODULES
 --- a/kernel/module/main.c
 +++ b/kernel/module/main.c
-@@ -997,6 +997,7 @@ size_t modinfo_attrs_count = ARRAY_SIZE(
+@@ -999,6 +999,7 @@ size_t modinfo_attrs_count = ARRAY_SIZE(
  
  static const char vermagic[] = VERMAGIC_STRING;
  
@@ -110,7 +110,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  int try_to_force_load(struct module *mod, const char *reason)
  {
  #ifdef CONFIG_MODULE_FORCE_LOAD
-@@ -1008,6 +1009,7 @@ int try_to_force_load(struct module *mod
+@@ -1010,6 +1011,7 @@ int try_to_force_load(struct module *mod
  	return -ENOEXEC;
  #endif
  }
@@ -118,7 +118,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  /* Parse tag=value strings from .modinfo section */
  char *module_next_tag_pair(char *string, unsigned long *secsize)
-@@ -2075,9 +2077,11 @@ static void module_augment_kernel_taints
+@@ -2077,9 +2079,11 @@ static void module_augment_kernel_taints
  
  static int check_modinfo(struct module *mod, struct load_info *info, int flags)
  {
@@ -131,7 +131,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (flags & MODULE_INIT_IGNORE_VERMAGIC)
  		modmagic = NULL;
  
-@@ -2091,6 +2095,7 @@ static int check_modinfo(struct module *
+@@ -2093,6 +2097,7 @@ static int check_modinfo(struct module *
  		       info->name, modmagic, vermagic);
  		return -ENOEXEC;
  	}
diff --git a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
index 30a0b86b00..1b210ee3cc 100644
--- a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
+++ b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
@@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	help
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -3628,6 +3628,11 @@ static int xmit_one(struct sk_buff *skb,
+@@ -3640,6 +3640,11 @@ static int xmit_one(struct sk_buff *skb,
  	if (dev_nit_active(dev))
  		dev_queue_xmit_nit(skb, dev);
  
diff --git a/target/linux/generic/hack-6.6/901-debloat_sock_diag.patch b/target/linux/generic/hack-6.6/901-debloat_sock_diag.patch
index d0a21cd7f9..157f8f76e3 100644
--- a/target/linux/generic/hack-6.6/901-debloat_sock_diag.patch
+++ b/target/linux/generic/hack-6.6/901-debloat_sock_diag.patch
@@ -83,7 +83,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  INDIRECT_CALLABLE_DECLARE(struct dst_entry *ip6_dst_check(struct dst_entry *,
  							  u32));
  INDIRECT_CALLABLE_DECLARE(struct dst_entry *ipv4_dst_check(struct dst_entry *,
-@@ -2242,9 +2259,11 @@ static void __sk_free(struct sock *sk)
+@@ -2258,9 +2275,11 @@ static void __sk_free(struct sock *sk)
  	if (likely(sk->sk_net_refcnt))
  		sock_inuse_add(sock_net(sk), -1);
  
diff --git a/target/linux/generic/hack-6.6/902-debloat_proc.patch b/target/linux/generic/hack-6.6/902-debloat_proc.patch
index 886111a66c..6c41d39d40 100644
--- a/target/linux/generic/hack-6.6/902-debloat_proc.patch
+++ b/target/linux/generic/hack-6.6/902-debloat_proc.patch
@@ -330,7 +330,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -4143,6 +4143,8 @@ static __net_initdata struct pernet_oper
+@@ -4160,6 +4160,8 @@ static __net_initdata struct pernet_oper
  
  static int __init proto_init(void)
  {
diff --git a/target/linux/generic/kernel-6.6 b/target/linux/generic/kernel-6.6
index 048ae0b42a..8a2014fcc6 100644
--- a/target/linux/generic/kernel-6.6
+++ b/target/linux/generic/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .102
-LINUX_KERNEL_HASH-6.6.102 = 80d2feb7334c30bacbe1e7dafa9ea415efb2c0ea4f4740ecbd1467cf5d94de5c
+LINUX_VERSION-6.6 = .103
+LINUX_KERNEL_HASH-6.6.103 = d288dd38c3e62ba576ba6b3ad2a84cfba65cd43b702f6c50d1f701aee942b18e
diff --git a/target/linux/generic/pending-6.6/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch b/target/linux/generic/pending-6.6/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
index 50fcdbaed8..09442a9bfc 100644
--- a/target/linux/generic/pending-6.6/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
+++ b/target/linux/generic/pending-6.6/100-compiler.h-only-include-asm-rwonce.h-for-kernel-code.patch
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #endif /* __KERNEL__ */
  
  /**
-@@ -258,6 +260,4 @@ static inline void *offset_to_ptr(const
+@@ -250,6 +252,4 @@ static inline void *offset_to_ptr(const
   */
  #define prevent_tail_call_optimization()	mb()
  
diff --git a/target/linux/generic/pending-6.6/487-mtd-spinand-Add-support-for-Etron-EM73D044VCx.patch b/target/linux/generic/pending-6.6/487-mtd-spinand-Add-support-for-Etron-EM73D044VCx.patch
index 7a3a0f33ad..233122d7d4 100644
--- a/target/linux/generic/pending-6.6/487-mtd-spinand-Add-support-for-Etron-EM73D044VCx.patch
+++ b/target/linux/generic/pending-6.6/487-mtd-spinand-Add-support-for-Etron-EM73D044VCx.patch
@@ -49,7 +49,7 @@ Submitted-by: Daniel Danzberger <daniel at dd-wrt.com>
  obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
 --- a/drivers/mtd/nand/spi/core.c
 +++ b/drivers/mtd/nand/spi/core.c
-@@ -940,6 +940,7 @@ static const struct spinand_manufacturer
+@@ -943,6 +943,7 @@ static const struct spinand_manufacturer
  	&alliancememory_spinand_manufacturer,
  	&ato_spinand_manufacturer,
  	&esmt_c8_spinand_manufacturer,
diff --git a/target/linux/generic/pending-6.6/681-net-remove-NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch b/target/linux/generic/pending-6.6/681-net-remove-NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch
index 1d69f9f775..126ee5e520 100644
--- a/target/linux/generic/pending-6.6/681-net-remove-NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch
+++ b/target/linux/generic/pending-6.6/681-net-remove-NETIF_F_GSO_FRAGLIST-from-NETIF_F_GSO_SOF.patch
@@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	return features;
 --- a/net/core/sock.c
 +++ b/net/core/sock.c
-@@ -2444,7 +2444,7 @@ void sk_setup_caps(struct sock *sk, stru
+@@ -2461,7 +2461,7 @@ void sk_setup_caps(struct sock *sk, stru
  	if (sk_is_tcp(sk))
  		sk->sk_route_caps |= NETIF_F_GSO;
  	if (sk->sk_route_caps & NETIF_F_GSO)
diff --git a/target/linux/generic/pending-6.6/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch b/target/linux/generic/pending-6.6/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
index f80a8a4d28..e6f4d069f0 100644
--- a/target/linux/generic/pending-6.6/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
+++ b/target/linux/generic/pending-6.6/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
@@ -309,7 +309,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		seq_printf(m, "%05x %s %7s", i,
 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -516,24 +516,21 @@ static int
+@@ -518,24 +518,21 @@ static int
  mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f)
  {
  	struct mtk_flow_entry *entry;
diff --git a/target/linux/generic/pending-6.6/790-bus-mhi-core-add-SBL-state-callback.patch b/target/linux/generic/pending-6.6/790-bus-mhi-core-add-SBL-state-callback.patch
index fe0f260ae3..80d1306115 100644
--- a/target/linux/generic/pending-6.6/790-bus-mhi-core-add-SBL-state-callback.patch
+++ b/target/linux/generic/pending-6.6/790-bus-mhi-core-add-SBL-state-callback.patch
@@ -20,7 +20,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
 
 --- a/drivers/bus/mhi/host/main.c
 +++ b/drivers/bus/mhi/host/main.c
-@@ -906,6 +906,7 @@ int mhi_process_ctrl_ev_ring(struct mhi_
+@@ -916,6 +916,7 @@ int mhi_process_ctrl_ev_ring(struct mhi_
  			switch (event) {
  			case MHI_EE_SBL:
  				st = DEV_ST_TRANSITION_SBL;
diff --git a/target/linux/imx/patches-6.6/600-PCI-imx6-Start-link-at-max-gen-first-for-IMX8MM-and-IMX8MP.patch b/target/linux/imx/patches-6.6/600-PCI-imx6-Start-link-at-max-gen-first-for-IMX8MM-and-IMX8MP.patch
index d8818369bc..c9878e55ad 100644
--- a/target/linux/imx/patches-6.6/600-PCI-imx6-Start-link-at-max-gen-first-for-IMX8MM-and-IMX8MP.patch
+++ b/target/linux/imx/patches-6.6/600-PCI-imx6-Start-link-at-max-gen-first-for-IMX8MM-and-IMX8MP.patch
@@ -100,7 +100,7 @@ Signed-off-by: Tim Harvey <tharvey at gateworks.com>
  	return 0;
  
  err_reset_phy:
-@@ -1457,14 +1456,16 @@ static const struct imx6_pcie_drvdata dr
+@@ -1458,14 +1457,16 @@ static const struct imx6_pcie_drvdata dr
  	},
  	[IMX8MM] = {
  		.variant = IMX8MM,



