ramips: 5.10: port and refresh patches, ralink drv
[openwrt/staging/mkresin.git] / target / linux / ramips / patches-5.10 / 700-net-ethernet-mediatek-support-net-labels.patch
index 6583fca60b189b3901c8c4f07c6eaf91c0af1021..ec3ca93770cbd1f34e1e547809dbb01004f956fb 100644 (file)
@@ -14,15 +14,15 @@ Signed-off-by: RenĂ© van Dorst <opensource@vdorst.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2922,6 +2922,7 @@ static const struct net_device_ops mtk_n
+@@ -2901,6 +2901,7 @@ static const struct net_device_ops mtk_n
  
  static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
  {
 +      const char *name = of_get_property(np, "label", NULL);
        const __be32 *_id = of_get_property(np, "reg", NULL);
+       phy_interface_t phy_mode;
        struct phylink *phylink;
-       int phy_mode, id, err;
-@@ -3014,6 +3015,9 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -2993,6 +2994,9 @@ static int mtk_add_mac(struct mtk_eth *e
  
        eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH - MTK_RX_ETH_HLEN;