kernel: bump 5.4 to 5.4.139
[openwrt/staging/thess.git] / target / linux / octeon / patches-5.4 / 700-allocate_interface_by_label.patch
index 4ee6f8466099faaf29bf4a08158a3d870c9b50ac..e4dc3f96e52823b7bca9ab94a786fbc687ca2a1f 100644 (file)
@@ -12,19 +12,20 @@ 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,7 +408,11 @@ int cvm_oct_common_init(struct net_devic
+@@ -407,8 +407,12 @@ static int cvm_oct_common_set_mac_addres
  int cvm_oct_common_init(struct net_device *dev)
  {
        struct octeon_ethernet *priv = netdev_priv(dev);
 +      const u8 *label = NULL;
-       int ret;
-+
+       int ret;
 +      if (priv->of_node)
 +              label = of_get_property(priv->of_node, "label", NULL);
++
        ret = of_get_mac_address(priv->of_node, dev->dev_addr);
        if (ret)
-@@ -445,6 +448,9 @@ int cvm_oct_common_init(struct net_devic
+               eth_hw_addr_random(dev);
+@@ -441,6 +445,9 @@ int cvm_oct_common_init(struct net_devic
        if (dev->netdev_ops->ndo_stop)
                dev->netdev_ops->ndo_stop(dev);