[openwrt/openwrt] kernel: r8126: update to v10.015.00
LEDE Commits
lede-commits at lists.infradead.org
Thu Feb 27 02:57:07 PST 2025
noltari pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3d3328bf5f019507896bfa9ffeb53777fc5bfeaa
commit 3d3328bf5f019507896bfa9ffeb53777fc5bfeaa
Author: Álvaro Fernández Rojas <noltari at gmail.com>
AuthorDate: Thu Feb 27 08:06:27 2025 +0100
kernel: r8126: update to v10.015.00
Changelog: https://github.com/openwrt/rtl8126/compare/10.014.01...10.015.00
Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
---
package/kernel/r8126/Makefile | 4 ++--
.../200-r8126-print-link-speed-and-duplex-mode.patch | 18 ++++++++++--------
2 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/package/kernel/r8126/Makefile b/package/kernel/r8126/Makefile
index a8f60f9dbb..da43697bfb 100644
--- a/package/kernel/r8126/Makefile
+++ b/package/kernel/r8126/Makefile
@@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8126
-PKG_VERSION:=10.014.01
+PKG_VERSION:=10.015.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:=dbb10a7abd0972e4abd1b89ea4eb22fc55d6c1dc2f711b5acf4a3bc376275e21
+PKG_HASH:=fac513aa925264a95b053e7532fcda56022d29db288f6625fafee2759a8a6124
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2
diff --git a/package/kernel/r8126/patches/200-r8126-print-link-speed-and-duplex-mode.patch b/package/kernel/r8126/patches/200-r8126-print-link-speed-and-duplex-mode.patch
index 27b3d626c1..236f80c7fd 100644
--- a/package/kernel/r8126/patches/200-r8126-print-link-speed-and-duplex-mode.patch
+++ b/package/kernel/r8126/patches/200-r8126-print-link-speed-and-duplex-mode.patch
@@ -18,11 +18,13 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
--- a/src/r8126.h
+++ b/src/r8126.h
-@@ -1740,6 +1740,8 @@ enum RTL8126_register_content {
+@@ -1756,6 +1756,10 @@ enum RTL8126_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
+#define RTL8126_FULL_DUPLEX_MASK (_5000bpsF | _2500bpsF | _1000bpsF | FullDup)
++#define RTL8126_SPEED_1000_MASK (_1000bpsF | _1000bpsL | _2500bpsL)
++#define RTL8126_SPEED_2500_MASK (_2500bpsF | _5000bpsL)
+
/* DBG_reg */
Fix_Nak_1 = (1 << 4),
@@ -37,11 +39,11 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
-@@ -4744,6 +4745,40 @@ rtl8126_link_down_patch(struct net_devic
+@@ -4661,6 +4662,40 @@ rtl8126_link_down_patch(struct net_devic
#endif
}
-+static unsigned int rtl8126_phy_duplex(u16 status)
++static unsigned int rtl8126_phy_duplex(u32 status)
+{
+ unsigned int duplex = DUPLEX_UNKNOWN;
+
@@ -55,16 +57,16 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
+ return duplex;
+}
+
-+static int rtl8126_phy_speed(u16 status)
++static int rtl8126_phy_speed(u32 status)
+{
+ int speed = SPEED_UNKNOWN;
+
+ if (status & LinkStatus) {
+ if (status & _5000bpsF)
+ speed = SPEED_5000;
-+ else if (status & _2500bpsF)
++ else if (status & RTL8126_SPEED_2500_MASK)
+ speed = SPEED_2500;
-+ else if (status & _1000bpsF)
++ else if (status & RTL8126_SPEED_1000_MASK)
+ speed = SPEED_1000;
+ else if (status & _100bps)
+ speed = SPEED_100;
@@ -78,14 +80,14 @@ Signed-off-by: Álvaro Fernández Rojas <noltari at gmail.com>
static void
_rtl8126_check_link_status(struct net_device *dev, unsigned int link_state)
{
-@@ -4756,11 +4791,18 @@ _rtl8126_check_link_status(struct net_de
+@@ -4673,11 +4708,18 @@ _rtl8126_check_link_status(struct net_de
if (link_state == R8126_LINK_STATE_ON) {
rtl8126_link_on_patch(dev);
- if (netif_msg_ifup(tp))
- printk(KERN_INFO PFX "%s: link up\n", dev->name);
+ if (netif_msg_ifup(tp)) {
-+ const u16 phy_status = RTL_R16(tp, PHYstatus);
++ const u32 phy_status = RTL_R32(tp, PHYstatus);
+ const unsigned int phy_duplex = rtl8126_phy_duplex(phy_status);
+ const int phy_speed = rtl8126_phy_speed(phy_status);
+ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n",
More information about the lede-commits
mailing list