r8152: bump to 2.19.2
Signed-off-by: sbwml <admin@cooluc.com>
This commit is contained in:
parent
6abfb3bb6e
commit
70ccdc2d98
4
Makefile
4
Makefile
@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=r8152
|
PKG_NAME:=r8152
|
||||||
PKG_VERSION:=2.18.1
|
PKG_VERSION:=2.19.2
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
@ -28,7 +28,7 @@ define KernelPackage/usb-net-rtl8152-vendor/description
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Compile
|
define Build/Compile
|
||||||
$(KERNEL_MAKE) M=$(PKG_BUILD_DIR) modules
|
+$(KERNEL_MAKE) M=$(PKG_BUILD_DIR) modules
|
||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call KernelPackage,usb-net-rtl8152-vendor))
|
$(eval $(call KernelPackage,usb-net-rtl8152-vendor))
|
||||||
|
@ -14,15 +14,15 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
|
|
||||||
--- a/r8152.c
|
--- a/r8152.c
|
||||||
+++ b/r8152.c
|
+++ b/r8152.c
|
||||||
@@ -18,6 +18,7 @@
|
@@ -19,6 +19,7 @@
|
||||||
#include <linux/mii.h>
|
|
||||||
#include <linux/ethtool.h>
|
#include <linux/ethtool.h>
|
||||||
|
#include <linux/phy.h>
|
||||||
#include <linux/usb.h>
|
#include <linux/usb.h>
|
||||||
+#include <linux/of.h>
|
+#include <linux/of.h>
|
||||||
#include <linux/crc32.h>
|
#include <linux/crc32.h>
|
||||||
#include <linux/if_vlan.h>
|
#include <linux/if_vlan.h>
|
||||||
#include <linux/uaccess.h>
|
#include <linux/uaccess.h>
|
||||||
@@ -12596,6 +12597,22 @@ out:
|
@@ -12645,6 +12646,22 @@ out:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
static int r8152b_init(struct r8152 *tp)
|
static int r8152b_init(struct r8152 *tp)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@@ -12695,6 +12712,8 @@ static int r8152b_init(struct r8152 *tp)
|
@@ -12744,6 +12761,8 @@ static int r8152b_init(struct r8152 *tp)
|
||||||
ret = ocp_word_clr_bits(tp, MCU_TYPE_USB, USB_USB_CTRL,
|
ret = ocp_word_clr_bits(tp, MCU_TYPE_USB, USB_USB_CTRL,
|
||||||
RX_AGG_DISABLE | RX_ZERO_EN);
|
RX_AGG_DISABLE | RX_ZERO_EN);
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
out:
|
out:
|
||||||
return (ret < 0) ? ret : 0;
|
return (ret < 0) ? ret : 0;
|
||||||
}
|
}
|
||||||
@@ -12883,6 +12902,8 @@ static int r8153_init(struct r8152 *tp)
|
@@ -12932,6 +12951,8 @@ static int r8153_init(struct r8152 *tp)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
out:
|
out:
|
||||||
return (ret < 0) ? ret : 0;
|
return (ret < 0) ? ret : 0;
|
||||||
}
|
}
|
||||||
@@ -13013,6 +13034,8 @@ static int r8153b_init(struct r8152 *tp)
|
@@ -13062,6 +13083,8 @@ static int r8153b_init(struct r8152 *tp)
|
||||||
|
|
||||||
tp->coalesce = 15000; /* 15 us */
|
tp->coalesce = 15000; /* 15 us */
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
|
|||||||
out:
|
out:
|
||||||
return (ret < 0) ? ret : 0;
|
return (ret < 0) ? ret : 0;
|
||||||
}
|
}
|
||||||
@@ -13124,6 +13147,8 @@ static int r8153c_init(struct r8152 *tp)
|
@@ -13176,6 +13199,8 @@ static int r8153c_init(struct r8152 *tp)
|
||||||
|
|
||||||
tp->coalesce = 15000; /* 15 us */
|
tp->coalesce = 15000; /* 15 us */
|
||||||
|
|
||||||
|
@ -1,111 +0,0 @@
|
|||||||
--- a/r8152.c
|
|
||||||
+++ b/r8152.c
|
|
||||||
@@ -1000,7 +1000,10 @@ struct r8152 {
|
|
||||||
int (*up)(struct r8152 *tp);
|
|
||||||
int (*down)(struct r8152 *tp);
|
|
||||||
void (*unload)(struct r8152 *tp);
|
|
||||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
|
|
||||||
+ int (*eee_get)(struct r8152 *tp, struct ethtool_keee *eee);
|
|
||||||
+ int (*eee_set)(struct r8152 *tp, struct ethtool_keee *eee);
|
|
||||||
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
|
|
||||||
int (*eee_get)(struct r8152 *tp, struct ethtool_eee *eee);
|
|
||||||
int (*eee_set)(struct r8152 *tp, struct ethtool_eee *eee);
|
|
||||||
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0) */
|
|
||||||
@@ -23361,7 +23364,11 @@ static void rtl8152_get_strings(struct n
|
|
||||||
}
|
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
|
|
||||||
+static int r8152_get_eee(struct r8152 *tp, struct ethtool_keee *eee)
|
|
||||||
+#else
|
|
||||||
static int r8152_get_eee(struct r8152 *tp, struct ethtool_eee *eee)
|
|
||||||
+#endif
|
|
||||||
{
|
|
||||||
u32 lp, adv, supported = 0;
|
|
||||||
int ret;
|
|
||||||
@@ -23387,17 +23394,33 @@ static int r8152_get_eee(struct r8152 *t
|
|
||||||
|
|
||||||
eee->eee_enabled = tp->eee_en;
|
|
||||||
eee->eee_active = !!(supported & adv & lp);
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
|
|
||||||
+ ethtool_convert_legacy_u32_to_link_mode(eee->supported, supported);
|
|
||||||
+ ethtool_convert_legacy_u32_to_link_mode(eee->advertised, tp->eee_adv);
|
|
||||||
+ ethtool_convert_legacy_u32_to_link_mode(eee->lp_advertised, lp);
|
|
||||||
+#else
|
|
||||||
eee->supported = supported;
|
|
||||||
eee->advertised = mmd_eee_adv_to_ethtool_adv_t(tp->eee_adv);
|
|
||||||
eee->lp_advertised = lp;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
out:
|
|
||||||
return (ret < 0) ? ret : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
|
|
||||||
+static int r8152_set_eee(struct r8152 *tp, struct ethtool_keee *eee)
|
|
||||||
+#else
|
|
||||||
static int r8152_set_eee(struct r8152 *tp, struct ethtool_eee *eee)
|
|
||||||
+#endif
|
|
||||||
{
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
|
|
||||||
+ u32 advertised = 0;
|
|
||||||
+ ethtool_convert_link_mode_to_legacy_u32(&advertised, eee->advertised);
|
|
||||||
+ u16 val = ethtool_adv_to_mmd_eee_adv_t(advertised);
|
|
||||||
+#else
|
|
||||||
u16 val = ethtool_adv_to_mmd_eee_adv_t(eee->advertised);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
tp->eee_en = eee->eee_enabled;
|
|
||||||
tp->eee_adv = val;
|
|
||||||
@@ -23405,7 +23428,11 @@ static int r8152_set_eee(struct r8152 *t
|
|
||||||
return rtl_eee_enable(tp, tp->eee_en);
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
|
|
||||||
+static int r8153_get_eee(struct r8152 *tp, struct ethtool_keee *eee)
|
|
||||||
+#else
|
|
||||||
static int r8153_get_eee(struct r8152 *tp, struct ethtool_eee *eee)
|
|
||||||
+#endif
|
|
||||||
{
|
|
||||||
u32 lp, adv, supported = 0;
|
|
||||||
u16 val;
|
|
||||||
@@ -23428,16 +23455,26 @@ static int r8153_get_eee(struct r8152 *t
|
|
||||||
|
|
||||||
eee->eee_enabled = tp->eee_en;
|
|
||||||
eee->eee_active = !!(supported & adv & lp);
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
|
|
||||||
+ ethtool_convert_legacy_u32_to_link_mode(eee->supported, supported);
|
|
||||||
+ ethtool_convert_legacy_u32_to_link_mode(eee->advertised, tp->eee_adv);
|
|
||||||
+ ethtool_convert_legacy_u32_to_link_mode(eee->lp_advertised, lp);
|
|
||||||
+#else
|
|
||||||
eee->supported = supported;
|
|
||||||
eee->advertised = mmd_eee_adv_to_ethtool_adv_t(tp->eee_adv);
|
|
||||||
eee->lp_advertised = lp;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
out:
|
|
||||||
return (ret < 0) ? ret : 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 r8152 *tp = netdev_priv(net);
|
|
||||||
int ret;
|
|
||||||
@@ -23464,7 +23501,11 @@ out:
|
|
||||||
}
|
|
||||||
|
|
||||||
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 r8152 *tp = netdev_priv(net);
|
|
||||||
int ret;
|
|
@ -21,6 +21,8 @@
|
|||||||
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
|
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) */
|
||||||
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) */
|
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31) */
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,9,0)
|
||||||
|
#define ethtool_keee ethtool_eee
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0)
|
||||||
#define TSO_LEGACY_MAX_SIZE 65536
|
#define TSO_LEGACY_MAX_SIZE 65536
|
||||||
#define netif_napi_add_weight netif_napi_add
|
#define netif_napi_add_weight netif_napi_add
|
||||||
@ -637,6 +639,7 @@
|
|||||||
}
|
}
|
||||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0) */
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,17,0) */
|
||||||
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0) */
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(5,19,0) */
|
||||||
|
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(6,9,0) */
|
||||||
|
|
||||||
#ifndef FALSE
|
#ifndef FALSE
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
|
2068
src/r8152.c
2068
src/r8152.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user