Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2024-11-09 20:28:46 +08:00
commit 66932c6cef
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
20 changed files with 81 additions and 141 deletions

View File

@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8125
PKG_VERSION:=9.013.02
PKG_RELEASE:=4
PKG_VERSION:=9.014.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:=d36410ee99c956f250d9cd08340d8c36567d190f420a8ee128ff6e51225aac0c
PKG_HASH:=f006aa95501738ca55c522812c9d1b473ac781675f3ad88ce341a09316b8aa13
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2

View File

@ -1,26 +0,0 @@
From cd20cf48c0ec2a01fd9f512e25218a6ac8131794 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
Date: Sat, 17 Aug 2024 22:07:23 +0200
Subject: [PATCH] r8125_rss: silence rxnfc log
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This log is noisy and useless, just ignore it.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
---
src/r8125_rss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/r8125_rss.c
+++ b/src/r8125_rss.c
@@ -91,7 +91,7 @@ int rtl8125_get_rxnfc(struct net_device
struct rtl8125_private *tp = netdev_priv(dev);
int ret = -EOPNOTSUPP;
- netif_info(tp, drv, tp->dev, "rss get rxnfc\n");
+ netif_dbg(tp, drv, tp->dev, "rss get rxnfc\n");
if (!(dev->features & NETIF_F_RXHASH))
return ret;

View File

@ -18,7 +18,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/src/r8125.h
+++ b/src/r8125.h
@@ -1563,6 +1563,8 @@ enum RTL8125_register_content {
@@ -1672,6 +1672,8 @@ enum RTL8125_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
@ -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>
@@ -5112,6 +5113,38 @@ rtl8125_link_down_patch(struct net_devic
@@ -5116,6 +5117,38 @@ rtl8125_link_down_patch(struct net_devic
#endif
}
@ -74,10 +74,10 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+}
+
static void
_rtl8125_check_link_status(struct net_device *dev)
_rtl8125_check_link_status(struct net_device *dev, unsigned int link_state)
{
@@ -5120,11 +5153,18 @@ _rtl8125_check_link_status(struct net_de
if (tp->link_ok(dev)) {
@@ -5128,11 +5161,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))

View File

@ -8,7 +8,7 @@
#include <linux/if_vlan.h>
#include <linux/crc32.h>
#include <linux/interrupt.h>
@@ -13666,6 +13667,25 @@ rtl8125_setup_mqs_reg(struct rtl8125_pri
@@ -14755,6 +14756,25 @@ rtl8125_setup_mqs_reg(struct rtl8125_pri
tp->imr_reg[i] = (u16)(IMR1_8125 + (i - 1) * 4);
}
@ -34,7 +34,7 @@
static void
rtl8125_init_software_variable(struct net_device *dev)
{
@@ -14300,6 +14320,8 @@ rtl8125_init_software_variable(struct ne
@@ -15358,6 +15378,8 @@ rtl8125_init_software_variable(struct ne
else if (tp->InitRxDescType == RX_DESC_RING_TYPE_4)
tp->rtl8125_rx_config &= ~EnableRxDescV4_1;

View File

@ -1,6 +1,6 @@
--- a/src/r8125_n.c
+++ b/src/r8125_n.c
@@ -15345,6 +15345,7 @@ rtl8125_init_board(struct pci_dev *pdev,
@@ -16423,6 +16423,7 @@ rtl8125_init_board(struct pci_dev *pdev,
void __iomem *ioaddr;
struct net_device *dev;
struct rtl8125_private *tp;
@ -8,12 +8,12 @@
int rc = -ENOMEM, i, pm_cap;
assert(ioaddr_out != NULL);
@@ -15359,6 +15360,9 @@ rtl8125_init_board(struct pci_dev *pdev,
@@ -16437,6 +16438,9 @@ rtl8125_init_board(struct pci_dev *pdev,
goto err_out;
}
+ if (devname)
+ strlcpy(dev->name, devname, IFNAMSIZ);
+ strscpy(dev->name, devname, IFNAMSIZ);
+
SET_MODULE_OWNER(dev);
SET_NETDEV_DEV(dev, &pdev->dev);

View File

@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8126
PKG_VERSION:=10.013.00
PKG_RELEASE:=4
PKG_VERSION:=10.014.01
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:=b41bda6ff3bbb7d9bc5b81c5c21355f031587d3a3a5862abcd4d766e942272e7
PKG_HASH:=dbb10a7abd0972e4abd1b89ea4eb22fc55d6c1dc2f711b5acf4a3bc376275e21
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2

View File

@ -1,21 +0,0 @@
From 9649df50a239d1379cc8d9febd4854a0c7ca0731 Mon Sep 17 00:00:00 2001
From: Mieczyslaw Nalewaj <namiltd@poczta.onet.pl>
Date: Sat, 10 Aug 2024 17:42:44 +0200
Subject: [PATCH] r8126.h: use BIT_ULL
Fixes compilation on 32 bit systems.
---
src/r8126.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/r8126.h
+++ b/src/r8126.h
@@ -678,7 +678,7 @@ This is free software, and you are welco
#ifndef ADVERTISED_2500baseX_Full
#define ADVERTISED_2500baseX_Full 0x8000
#endif
-#define RTK_ADVERTISED_5000baseX_Full BIT(48)
+#define RTK_ADVERTISED_5000baseX_Full BIT_ULL(48)
#define RTK_ADVERTISE_2500FULL 0x80
#define RTK_ADVERTISE_5000FULL 0x100

View File

@ -1,27 +0,0 @@
From cd20cf48c0ec2a01fd9f512e25218a6ac8131794 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
Date: Sat, 17 Aug 2024 22:07:23 +0200
Subject: [PATCH] r8126_rss: silence rxnfc log
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This log is noisy and useless, just ignore it.
Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
src/r8126_rss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/src/r8126_rss.c
+++ b/src/r8126_rss.c
@@ -91,7 +91,7 @@ int rtl8126_get_rxnfc(struct net_device
struct rtl8126_private *tp = netdev_priv(dev);
int ret = -EOPNOTSUPP;
- netif_info(tp, drv, tp->dev, "rss get rxnfc\n");
+ netif_dbg(tp, drv, tp->dev, "rss get rxnfc\n");
if (!(dev->features & NETIF_F_RXHASH))
return ret;

View File

@ -18,7 +18,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
--- a/src/r8126.h
+++ b/src/r8126.h
@@ -1561,6 +1561,8 @@ enum RTL8126_register_content {
@@ -1740,6 +1740,8 @@ enum RTL8126_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
@ -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>
@@ -4740,6 +4741,40 @@ rtl8126_link_down_patch(struct net_devic
@@ -4744,6 +4745,40 @@ rtl8126_link_down_patch(struct net_devic
#endif
}
@ -76,10 +76,10 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+}
+
static void
_rtl8126_check_link_status(struct net_device *dev)
_rtl8126_check_link_status(struct net_device *dev, unsigned int link_state)
{
@@ -4748,11 +4783,18 @@ _rtl8126_check_link_status(struct net_de
if (tp->link_ok(dev)) {
@@ -4756,11 +4791,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))

View File

@ -8,8 +8,8 @@
#include <linux/if_vlan.h>
#include <linux/crc32.h>
#include <linux/interrupt.h>
@@ -11652,6 +11653,25 @@ rtl8126_setup_mqs_reg(struct rtl8126_pri
}
@@ -12282,6 +12283,25 @@ rtl8126_setup_mqs_reg(struct rtl8126_pri
tp->imr_reg[i] = (u16)(IMR1_8125 + (i - 1) * 4);
}
+static int
@ -34,9 +34,9 @@
static void
rtl8126_init_software_variable(struct net_device *dev)
{
@@ -12024,6 +12044,8 @@ rtl8126_init_software_variable(struct ne
if (tp->InitRxDescType == RX_DESC_RING_TYPE_3)
tp->rtl8126_rx_config |= EnableRxDescV3;
@@ -12688,6 +12708,8 @@ rtl8126_init_software_variable(struct ne
else if (tp->InitRxDescType == RX_DESC_RING_TYPE_4)
tp->rtl8126_rx_config &= ~EnableRxDescV4_1;
+ rtl8126_led_configuration(tp);
+

View File

@ -1,6 +1,6 @@
--- a/src/r8126_n.c
+++ b/src/r8126_n.c
@@ -13058,6 +13058,7 @@ rtl8126_init_board(struct pci_dev *pdev,
@@ -13740,6 +13740,7 @@ rtl8126_init_board(struct pci_dev *pdev,
void __iomem *ioaddr;
struct net_device *dev;
struct rtl8126_private *tp;
@ -8,12 +8,12 @@
int rc = -ENOMEM, i, pm_cap;
assert(ioaddr_out != NULL);
@@ -13072,6 +13073,9 @@ rtl8126_init_board(struct pci_dev *pdev,
@@ -13754,6 +13755,9 @@ rtl8126_init_board(struct pci_dev *pdev,
goto err_out;
}
+ if (devname)
+ strlcpy(dev->name, devname, IFNAMSIZ);
+ strscpy(dev->name, devname, IFNAMSIZ);
+
SET_MODULE_OWNER(dev);
SET_NETDEV_DEV(dev, &pdev->dev);

View File

@ -1,12 +1,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=r8168
PKG_VERSION:=8.053.00
PKG_RELEASE:=2
PKG_VERSION:=8.054.00
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=https://github.com/openwrt/rtl8168/releases/download/$(PKG_VERSION)
PKG_HASH:=52f1e6200672b598a04d4ac21ac92a8a9e128b38208c7b03a464bfa93bbfcc8f
PKG_HASH:=5480120cf823e991e8cbd325118c1ec0c57d8f42760ba1a7334bd07d291d235d
PKG_BUILD_PARALLEL:=1
PKG_LICENSE:=GPLv2

View File

@ -18,7 +18,7 @@ Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
--- a/src/r8168.h
+++ b/src/r8168.h
@@ -1385,6 +1385,8 @@ enum RTL8168_register_content {
@@ -1468,6 +1468,8 @@ enum RTL8168_register_content {
LinkStatus = 0x02,
FullDup = 0x01,
@ -37,7 +37,7 @@ Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
@@ -5373,6 +5374,36 @@ rtl8168_link_down_patch(struct net_devic
@@ -5369,6 +5370,36 @@ rtl8168_link_down_patch(struct net_devic
#endif
}
@ -74,7 +74,7 @@ Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
static void
rtl8168_check_link_status(struct net_device *dev)
{
@@ -5392,11 +5423,18 @@ rtl8168_check_link_status(struct net_dev
@@ -5388,11 +5419,18 @@ rtl8168_check_link_status(struct net_dev
if (link_status_on) {
rtl8168_link_on_patch(dev);

View File

@ -8,7 +8,7 @@
#include <linux/if_vlan.h>
#include <linux/crc32.h>
#include <linux/interrupt.h>
@@ -25983,6 +25984,22 @@ rtl8168_setup_mqs_reg(struct rtl8168_pri
@@ -26097,6 +26098,22 @@ rtl8168_setup_mqs_reg(struct rtl8168_pri
tp->imr_reg[3] = IntrMask3;
}
@ -31,7 +31,7 @@
static void
rtl8168_init_software_variable(struct net_device *dev)
{
@@ -26678,6 +26695,8 @@ err1:
@@ -26792,6 +26809,8 @@ err1:
if (tp->InitRxDescType == RX_DESC_RING_TYPE_2)
tp->RxDescLength = RX_DESC_LEN_TYPE_2;

View File

@ -3,6 +3,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=nu801
PKG_FLAGS:=nonshared
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git

View File

@ -66,13 +66,20 @@
#address-cells = <1>;
#size-cells = <1>;
/* ath9k */
cal_caldata_1000: cal@1000 {
reg = <0x1000 0x440>;
};
/* ath10k wave1 in plain MF286 */
cal_caldata_5000: cal@5000 {
reg = <0x5000 0x844>;
};
/* ath10k wave2 in early MF286A */
precal_caldata_5000: precal@5000 {
reg = <0x5000 0x2f20>;
};
};
partition@280000 {
@ -119,7 +126,7 @@
};
&wifi_ath10k {
nvmem-cells = <&macaddr_mac_0>, <&cal_caldata_5000>, <&cal_caldata_5000>;
nvmem-cells = <&macaddr_mac_0>, <&cal_caldata_5000>, <&precal_caldata_5000>;
nvmem-cell-names = "mac-address", "calibration", "pre-calibration";
mac-address-increment = <1>;
};

View File

@ -58,7 +58,7 @@
phy-mode = "sgmii";
phy-handle = <&phy2>;
nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 0>;
nvmem-cell-names = "mac-address";
};
@ -84,11 +84,17 @@
pagesize = <32>;
reg = <0x56>;
read-only;
#address-cells = <1>;
#size-cells = <1>;
mac_address: mac-address@66 {
reg = <0x66 0x6>;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
mac_address: mac-address@66 {
compatible = "mac-base";
reg = <0x66 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
};
@ -186,21 +192,18 @@
};
&wifi0 {
nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
&wifi1 {
nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 2>;
nvmem-cell-names = "mac-address";
mac-address-increment = <2>;
};
&wifi2 {
nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 3>;
nvmem-cell-names = "mac-address";
mac-address-increment = <3>;
};
&hs_phy_0 {

View File

@ -46,12 +46,12 @@
lan1_green {
label = "green:lan1";
gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
};
lan2_green {
label = "green:lan2";
gpios = <&qcom_pinmux 24 GPIO_ACTIVE_HIGH>;
gpios = <&qcom_pinmux 23 GPIO_ACTIVE_HIGH>;
};
led_active: active {
@ -61,12 +61,12 @@
lan1_orange {
label = "orange:lan1";
gpios = <&qcom_pinmux 60 GPIO_ACTIVE_HIGH>;
gpios = <&qcom_pinmux 62 GPIO_ACTIVE_HIGH>;
};
lan2_orange {
label = "orange:lan2";
gpios = <&qcom_pinmux 62 GPIO_ACTIVE_HIGH>;
gpios = <&qcom_pinmux 60 GPIO_ACTIVE_HIGH>;
};
};
};
@ -80,7 +80,7 @@
phy-mode = "sgmii";
phy-handle = <&phy0>;
nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 0>;
nvmem-cell-names = "mac-address";
};
@ -93,9 +93,8 @@
phy-mode = "sgmii";
phy-handle = <&phy4>;
nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 1>;
nvmem-cell-names = "mac-address";
mac-address-increment = <1>;
};
&gsbi7 {
@ -142,11 +141,17 @@
pagesize = <32>;
reg = <0x52>;
read-only;
#address-cells = <1>;
#size-cells = <1>;
mac_address: mac-address@66 {
reg = <0x66 0x6>;
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
mac_address: mac-address@66 {
compatible = "mac-base";
reg = <0x66 0x6>;
#nvmem-cell-cells = <1>;
};
};
};
};
@ -212,21 +217,18 @@
};
&wifi0 {
nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 4>;
nvmem-cell-names = "mac-address";
mac-address-increment = <4>;
};
&wifi1 {
nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 3>;
nvmem-cell-names = "mac-address";
mac-address-increment = <3>;
};
&wifi2 {
nvmem-cells = <&mac_address>;
nvmem-cells = <&mac_address 2>;
nvmem-cell-names = "mac-address";
mac-address-increment = <2>;
};
&hs_phy_0 {

View File

@ -36,6 +36,7 @@
regulator-name = "led_vbus";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
enable-active-high;
regulator-always-on;
gpio = <&pio 5 GPIO_ACTIVE_HIGH>;
};

View File

@ -34,7 +34,7 @@
led {
label = "led";
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
debounce_interval = <60>;
debounce-interval = <60>;
linux,code = <KEY_BRIGHTNESS_TOGGLE>;
};