Update On Fri Sep 12 20:36:09 CEST 2025

This commit is contained in:
github-action[bot]
2025-09-12 20:36:09 +02:00
parent 3d4eb548d6
commit f93a1b54e8
99 changed files with 2766 additions and 4094 deletions

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8125
PKG_VERSION:=9.016.00
PKG_VERSION:=9.016.01
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8125/releases/download/$(PKG_VERSION)
PKG_HASH:=cd1955dd07d2f5a6faaa210ffc4e8af992421295a32ab6ddcfa759bed9eba922
PKG_HASH:=5434b26500538a62541c55cd09eea099177f59bd9cc48d16969089a9bcdbbd41
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2

View File

@@ -37,7 +37,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
@@ -5045,6 +5046,38 @@ rtl8125_link_down_patch(struct net_devic
@@ -5051,6 +5052,38 @@ rtl8125_link_down_patch(struct net_devic
#endif
}
@@ -76,7 +76,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
static void
_rtl8125_check_link_status(struct net_device *dev, unsigned int link_state)
{
@@ -5057,11 +5090,18 @@ _rtl8125_check_link_status(struct net_de
@@ -5063,11 +5096,18 @@ _rtl8125_check_link_status(struct net_de
if (link_state == R8125_LINK_STATE_ON) {
rtl8125_link_on_patch(dev);

View File

@@ -8,7 +8,7 @@
#include <linux/if_vlan.h>
#include <linux/crc32.h>
#include <linux/interrupt.h>
@@ -14808,6 +14809,22 @@ rtl8125_restore_phy_fuse_dout(struct rtl
@@ -14801,6 +14802,22 @@ rtl8125_restore_phy_fuse_dout(struct rtl
}
static void
@@ -31,7 +31,7 @@
rtl8125_init_software_variable(struct net_device *dev)
{
struct rtl8125_private *tp = netdev_priv(dev);
@@ -15309,6 +15326,7 @@ rtl8125_init_software_variable(struct ne
@@ -15316,6 +15333,7 @@ rtl8125_init_software_variable(struct ne
else if (tp->InitRxDescType == RX_DESC_RING_TYPE_4)
tp->rtl8125_rx_config &= ~EnableRxDescV4_1;

View File

@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8126
PKG_VERSION:=10.015.00
PKG_VERSION:=10.016.00
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8126/releases/download/$(PKG_VERSION)
PKG_HASH:=fac513aa925264a95b053e7532fcda56022d29db288f6625fafee2759a8a6124
PKG_HASH:=50c8d3d49592d2e8f372bd7ece8e7df9b50a71b055c077d42eacc42302914440
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2

View File

@@ -1,116 +0,0 @@
--- a/src/r8126_n.c
+++ b/src/r8126_n.c
@@ -6929,7 +6929,11 @@ rtl8126_device_lpi_t_to_ethtool_lpi_t(st
}
static int
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+rtl_ethtool_get_eee(struct net_device *net, struct ethtool_keee *edata)
+#else
rtl_ethtool_get_eee(struct net_device *net, struct ethtool_eee *edata)
+#endif
{
struct rtl8126_private *tp = netdev_priv(net);
struct ethtool_eee *eee = &tp->eee;
@@ -6962,9 +6966,15 @@ rtl_ethtool_get_eee(struct net_device *n
edata->eee_enabled = !!val;
edata->eee_active = !!(supported & adv & lp);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+ ethtool_convert_legacy_u32_to_link_mode(edata->supported, supported);
+ ethtool_convert_legacy_u32_to_link_mode(edata->advertised, adv);
+ ethtool_convert_legacy_u32_to_link_mode(edata->lp_advertised, lp);
+#else
edata->supported = supported;
edata->advertised = adv;
edata->lp_advertised = lp;
+#endif
edata->tx_lpi_enabled = edata->eee_enabled;
edata->tx_lpi_timer = tx_lpi_timer;
@@ -6972,11 +6982,19 @@ rtl_ethtool_get_eee(struct net_device *n
}
static int
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+rtl_ethtool_set_eee(struct net_device *net, struct ethtool_keee *edata)
+#else
rtl_ethtool_set_eee(struct net_device *net, struct ethtool_eee *edata)
+#endif
{
struct rtl8126_private *tp = netdev_priv(net);
struct ethtool_eee *eee = &tp->eee;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+ u32 advertising, adv;
+#else
u32 advertising;
+#endif
int rc = 0;
if (!HW_HAS_WRITE_PHY_MCU_RAM_CODE(tp) ||
@@ -7008,6 +7026,18 @@ rtl_ethtool_set_eee(struct net_device *n
*/
advertising = tp->advertising;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+ ethtool_convert_link_mode_to_legacy_u32(&adv, edata->advertised);
+ if (linkmode_empty(edata->advertised)) {
+ adv = advertising & eee->supported;
+ ethtool_convert_legacy_u32_to_link_mode(edata->advertised, adv);
+ } else if (!linkmode_empty(edata->advertised) & ~advertising) {
+ dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE advertised %x must be a subset of autoneg advertised speeds %x\n",
+ adv, advertising);
+ rc = -EINVAL;
+ goto out;
+ }
+#else
if (!edata->advertised) {
edata->advertised = advertising & eee->supported;
} else if (edata->advertised & ~advertising) {
@@ -7016,13 +7046,23 @@ rtl_ethtool_set_eee(struct net_device *n
rc = -EINVAL;
goto out;
}
+#endif
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+ if (!linkmode_empty(edata->advertised) & ~eee->supported) {
+ dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE advertised %x must be a subset of support %x\n",
+ adv, eee->supported);
+ rc = -EINVAL;
+ goto out;
+ }
+#else
if (edata->advertised & ~eee->supported) {
dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE advertised %x must be a subset of support %x\n",
edata->advertised, eee->supported);
rc = -EINVAL;
goto out;
}
+#endif
//tp->eee.eee_enabled = edata->eee_enabled;
//tp->eee_adv_t = ethtool_adv_to_mmd_eee_adv_t(edata->advertised);
@@ -7030,7 +7070,11 @@ rtl_ethtool_set_eee(struct net_device *n
dev_printk(KERN_WARNING, tp_to_dev(tp), "EEE tx_lpi_timer %x must be a subset of support %x\n",
edata->tx_lpi_timer, eee->tx_lpi_timer);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+ ethtool_convert_link_mode_to_legacy_u32(&eee->advertised, edata->advertised);
+#else
eee->advertised = edata->advertised;
+#endif
//eee->tx_lpi_enabled = edata->tx_lpi_enabled;
//eee->tx_lpi_timer = edata->tx_lpi_timer;
eee->eee_enabled = edata->eee_enabled;
@@ -7106,8 +7150,10 @@ static const struct ethtool_ops rtl8126_
.set_rxnfc = rtl8126_set_rxnfc,
.get_rxfh_indir_size = rtl8126_rss_indir_size,
.get_rxfh_key_size = rtl8126_get_rxfh_key_size,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,9,0)
.get_rxfh = rtl8126_get_rxfh,
.set_rxfh = rtl8126_set_rxfh,
+#endif
#endif //ENABLE_RSS_SUPPORT
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
#ifdef ENABLE_PTP_SUPPORT

View File

@@ -17,7 +17,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/src/r8126.h
+++ b/src/r8126.h
@@ -1756,6 +1756,10 @@ enum RTL8126_register_content {
@@ -1752,6 +1752,10 @@ enum RTL8126_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
@@ -38,8 +38,8 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
@@ -4661,6 +4662,40 @@ rtl8126_link_down_patch(struct net_devic
#endif
@@ -4410,6 +4411,40 @@ rtl8126_link_down_patch(struct net_devic
//rtl8126_set_speed(dev, tp->autoneg, tp->speed, tp->duplex, tp->advertising);
}
+static unsigned int rtl8126_phy_duplex(u32 status)
@@ -79,7 +79,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
static void
_rtl8126_check_link_status(struct net_device *dev, unsigned int link_state)
{
@@ -4673,11 +4708,18 @@ _rtl8126_check_link_status(struct net_de
@@ -4422,11 +4457,18 @@ _rtl8126_check_link_status(struct net_de
if (link_state == R8126_LINK_STATE_ON) {
rtl8126_link_on_patch(dev);