mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
update
This commit is contained in:
parent
8cf19a4638
commit
678c91253d
30 changed files with 12291 additions and 83 deletions
43
r8125/patches/030-add-LED-configuration-from-OF.patch
Normal file
43
r8125/patches/030-add-LED-configuration-from-OF.patch
Normal file
|
@ -0,0 +1,43 @@
|
|||
--- a/src/r8125_n.c
|
||||
+++ b/src/r8125_n.c
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/mii.h>
|
||||
+#include <linux/of.h>
|
||||
#include <linux/if_vlan.h>
|
||||
#include <linux/crc32.h>
|
||||
#include <linux/interrupt.h>
|
||||
@@ -10407,6 +10408,23 @@ rtl8125_setup_mqs_reg(struct rtl8125_private *tp)
|
||||
}
|
||||
}
|
||||
|
||||
+static int
|
||||
+rtl8125_led_configuration(struct rtl8125_private *tp)
|
||||
+{
|
||||
+ u32 led_data;
|
||||
+ int ret;
|
||||
+
|
||||
+ ret = of_property_read_u32(tp->pci_dev->dev.of_node,
|
||||
+ "realtek,led-data", &led_data);
|
||||
+
|
||||
+ if (ret)
|
||||
+ return ret;
|
||||
+
|
||||
+ RTL_W16(tp, CustomLED, led_data);
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
rtl8125_init_software_variable(struct net_device *dev)
|
||||
{
|
||||
@@ -10838,6 +10856,8 @@ rtl8125_init_software_variable(struct net_device *dev)
|
||||
if (tp->InitRxDescType == RX_DESC_RING_TYPE_3)
|
||||
tp->rtl8125_rx_config |= EnableRxDescV3;
|
||||
|
||||
+ rtl8125_led_configuration(tp);
|
||||
+
|
||||
tp->NicCustLedValue = RTL_R16(tp, CustomLED);
|
||||
|
||||
tp->wol_opts = rtl8125_get_hw_wol(tp);
|
Loading…
Add table
Add a link
Reference in a new issue