mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-13 15:56:55 +00:00
kernel: r8125: update to v9.015.00
Changelog: https://github.com/openwrt/rtl8125/compare/9.014.01...9.015.00 Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
This commit is contained in:
parent
23fdbd4e71
commit
a8dea562aa
@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=r8125
|
||||
PKG_VERSION:=9.014.01
|
||||
PKG_VERSION:=9.015.00
|
||||
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:=f006aa95501738ca55c522812c9d1b473ac781675f3ad88ce341a09316b8aa13
|
||||
PKG_HASH:=7d6906336c3ad960c3e7c0299ad655659d7110bdc933c5b568b7f2536cb8ffc3
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_LICENSE:=GPLv2
|
||||
|
@ -18,11 +18,12 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
|
||||
--- a/src/r8125.h
|
||||
+++ b/src/r8125.h
|
||||
@@ -1672,6 +1672,8 @@ enum RTL8125_register_content {
|
||||
@@ -1687,6 +1687,9 @@ enum RTL8125_register_content {
|
||||
LinkStatus = 0x02,
|
||||
FullDup = 0x01,
|
||||
|
||||
+#define RTL8125_FULL_DUPLEX_MASK (_2500bpsF | _1000bpsF | FullDup)
|
||||
+#define RTL8125_SPEED_1000_MASK (_1000bpsF | _1000bpsL | _2500bpsL)
|
||||
+
|
||||
/* DBG_reg */
|
||||
Fix_Nak_1 = (1 << 4),
|
||||
@ -37,11 +38,11 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/delay.h>
|
||||
@@ -5116,6 +5117,38 @@ rtl8125_link_down_patch(struct net_devic
|
||||
@@ -5023,6 +5024,38 @@ rtl8125_link_down_patch(struct net_devic
|
||||
#endif
|
||||
}
|
||||
|
||||
+static unsigned int rtl8125_phy_duplex(u16 status)
|
||||
+static unsigned int rtl8125_phy_duplex(u32 status)
|
||||
+{
|
||||
+ unsigned int duplex = DUPLEX_UNKNOWN;
|
||||
+
|
||||
@ -55,14 +56,14 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
+ return duplex;
|
||||
+}
|
||||
+
|
||||
+static int rtl8125_phy_speed(u16 status)
|
||||
+static int rtl8125_phy_speed(u32 status)
|
||||
+{
|
||||
+ int speed = SPEED_UNKNOWN;
|
||||
+
|
||||
+ if (status & LinkStatus) {
|
||||
+ if (status & _2500bpsF)
|
||||
+ speed = SPEED_2500;
|
||||
+ else if (status & _1000bpsF)
|
||||
+ else if (status & RTL8125_SPEED_1000_MASK)
|
||||
+ speed = SPEED_1000;
|
||||
+ else if (status & _100bps)
|
||||
+ speed = SPEED_100;
|
||||
@ -76,14 +77,14 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
|
||||
static void
|
||||
_rtl8125_check_link_status(struct net_device *dev, unsigned int link_state)
|
||||
{
|
||||
@@ -5128,11 +5161,18 @@ _rtl8125_check_link_status(struct net_de
|
||||
@@ -5035,11 +5068,18 @@ _rtl8125_check_link_status(struct net_de
|
||||
if (link_state == R8125_LINK_STATE_ON) {
|
||||
rtl8125_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 = rtl8125_phy_duplex(phy_status);
|
||||
+ const int phy_speed = rtl8125_phy_speed(phy_status);
|
||||
+ printk(KERN_INFO PFX "%s: Link is Up - %s/%s\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user