mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 22:23:27 +00:00
a47279154e
Manually rebased patches: bcm27xx: patches-5.4/950-0267-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch bcm53xx: patches-5.4/180-usb-xhci-add-support-for-performing-fake-doorbell.patch layerscape: patches-5.4/802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch patches-5.4/808-i2c-0002-MLK-10893-i2c-imx-add-irqf_no_suspend.patch patches-5.4/820-usb-0016-MLK-16735-usb-host-add-XHCI_CDNS_HOST-flag.patch Removed since could be reverse-applied by quilt: mediatek: patches-5.4/0700-arm-dts-mt7623-add-missing-pause-for-switchport.patch All modifications made by update_kernel.sh Build system: x86_64 Build-tested: ipq806x/R7800, ath79/generic, bcm27xx/bcm2711, x86_64 Run-tested: ipq806x/R7800, x86_64 No dmesg regressions, everything functional Signed-off-by: John Audia <graysky@archlinux.us> Tested-by: Curtis Deptuck <curtdept@me.com> [x86_64] Rebase of 802-can-0025-can-flexcan-add-LPSR-mode-support-for-i.MX7D.patch Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
39 lines
1.1 KiB
Diff
39 lines
1.1 KiB
Diff
From: Roman Kuzmitskii <damex.pp@icloud.com>
|
|
Date: Wed, 28 Oct 2020 19:00:00 +0000
|
|
Subject: [PATCH] staging: octeon: add net-labels support
|
|
|
|
With this patch, device name can be set within dts file
|
|
in the same way as dsa port can.
|
|
|
|
Add label to pip interface node to use this feature:
|
|
label = "lan0";
|
|
|
|
Tested-by: Johannes Kimmel <fff@bareminimum.eu>
|
|
Signed-off-by: Roman Kuzmitskii <damex.pp@icloud.com>
|
|
--- a/drivers/staging/octeon/ethernet.c
|
|
+++ b/drivers/staging/octeon/ethernet.c
|
|
@@ -408,9 +408,12 @@ int cvm_oct_common_init(struct net_devic
|
|
{
|
|
struct octeon_ethernet *priv = netdev_priv(dev);
|
|
const u8 *mac = NULL;
|
|
+ const u8 *label = NULL;
|
|
|
|
- if (priv->of_node)
|
|
+ if (priv->of_node) {
|
|
mac = of_get_mac_address(priv->of_node);
|
|
+ label = of_get_property(priv->of_node, "label", NULL);
|
|
+ }
|
|
|
|
if (!IS_ERR_OR_NULL(mac))
|
|
ether_addr_copy(dev->dev_addr, mac);
|
|
@@ -445,6 +448,9 @@ int cvm_oct_common_init(struct net_devic
|
|
if (dev->netdev_ops->ndo_stop)
|
|
dev->netdev_ops->ndo_stop(dev);
|
|
|
|
+ if (!IS_ERR_OR_NULL(label))
|
|
+ dev_alloc_name(dev, label);
|
|
+
|
|
return 0;
|
|
}
|
|
|