diff --git a/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch b/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch index 5c57f73fa67..d8805ae70f7 100644 --- a/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch +++ b/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch @@ -88,7 +88,7 @@ Signed-off-by: Maxime Chevallier +ipq_ess-objs := ipqess.o ipqess_ethtool.o --- /dev/null +++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess.c -@@ -0,0 +1,1246 @@ +@@ -0,0 +1,1251 @@ +// SPDX-License-Identifier: GPL-2.0 OR ISC +/* Copyright (c) 2014 - 2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2017 - 2018, John Crispin @@ -659,11 +659,6 @@ Signed-off-by: Maxime Chevallier +{ + struct ipqess *ess = netdev_priv(netdev); + struct device_node *of_node = ess->pdev->dev.of_node; -+ int ret; -+ -+ ret = of_get_ethdev_address(of_node, netdev); -+ if (ret) -+ eth_hw_addr_random(netdev); + + return phylink_of_phy_connect(ess->phylink, of_node, 0); +} @@ -1201,6 +1196,16 @@ Signed-off-by: Maxime Chevallier + SET_NETDEV_DEV(netdev, &pdev->dev); + platform_set_drvdata(pdev, netdev); + ++ err = of_get_ethdev_address(np, netdev); ++ if (err) { ++ dev_dbg(&pdev->dev, "failed to get MAC address from DT: %d\n", err); ++ if (err == -EPROBE_DEFER) ++ return err; ++ eth_hw_addr_random(netdev); ++ dev_info(&pdev->dev, "using random MAC address %pM\n", ++ netdev->dev_addr); ++ } ++ + ess->hw_addr = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); + if (IS_ERR(ess->hw_addr)) + return PTR_ERR(ess->hw_addr); diff --git a/target/linux/ipq40xx/patches-6.6/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch b/target/linux/ipq40xx/patches-6.6/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch index bc755bf728b..d273ef2656d 100644 --- a/target/linux/ipq40xx/patches-6.6/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch +++ b/target/linux/ipq40xx/patches-6.6/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch @@ -72,7 +72,7 @@ Signed-off-by: Matthias Schiffer napi_gro_receive(&rx_ring->napi_rx, skb); rx_ring->ess->stats.rx_packets++; -@@ -706,6 +715,26 @@ static void ipqess_rollback_tx(struct ip +@@ -701,6 +710,26 @@ static void ipqess_rollback_tx(struct ip tx_ring->head = start_index; } @@ -99,7 +99,7 @@ Signed-off-by: Matthias Schiffer static int ipqess_tx_map_and_fill(struct ipqess_tx_ring *tx_ring, struct sk_buff *skb) { -@@ -716,6 +745,8 @@ static int ipqess_tx_map_and_fill(struct +@@ -711,6 +740,8 @@ static int ipqess_tx_map_and_fill(struct u16 len; int i; @@ -108,7 +108,7 @@ Signed-off-by: Matthias Schiffer if (skb_is_gso(skb)) { if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4) { lso_word1 |= IPQESS_TPD_IPV4_EN; -@@ -917,6 +948,33 @@ static const struct net_device_ops ipqes +@@ -912,6 +943,33 @@ static const struct net_device_ops ipqes .ndo_tx_timeout = ipqess_tx_timeout, }; @@ -142,7 +142,7 @@ Signed-off-by: Matthias Schiffer static void ipqess_hw_stop(struct ipqess *ess) { int i; -@@ -1184,12 +1242,19 @@ static int ipqess_axi_probe(struct platf +@@ -1189,12 +1247,19 @@ static int ipqess_axi_probe(struct platf netif_napi_add(netdev, &ess->rx_ring[i].napi_rx, ipqess_rx_napi); } diff --git a/target/linux/ipq40xx/patches-6.6/703-net-qualcomm-ipqess-release-IRQ-s-on-network-device-.patch b/target/linux/ipq40xx/patches-6.6/703-net-qualcomm-ipqess-release-IRQ-s-on-network-device-.patch index bd890e5c71c..1ad96ecd87b 100644 --- a/target/linux/ipq40xx/patches-6.6/703-net-qualcomm-ipqess-release-IRQ-s-on-network-device-.patch +++ b/target/linux/ipq40xx/patches-6.6/703-net-qualcomm-ipqess-release-IRQ-s-on-network-device-.patch @@ -50,7 +50,7 @@ Signed-off-by: Robert Marko --- a/drivers/net/ethernet/qualcomm/ipqess/ipqess.c +++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess.c -@@ -636,9 +636,22 @@ static int ipqess_stop(struct net_device +@@ -631,9 +631,22 @@ static int ipqess_stop(struct net_device netif_tx_stop_all_queues(netdev); phylink_stop(ess->phylink); ipqess_irq_disable(ess); diff --git a/target/linux/ipq40xx/patches-6.6/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch b/target/linux/ipq40xx/patches-6.6/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch index 322be36678b..a366a514657 100644 --- a/target/linux/ipq40xx/patches-6.6/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch +++ b/target/linux/ipq40xx/patches-6.6/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch @@ -38,7 +38,7 @@ Signed-off-by: Robert Marko } return IRQ_HANDLED; -@@ -1264,6 +1264,8 @@ static int ipqess_axi_probe(struct platf +@@ -1269,6 +1269,8 @@ static int ipqess_axi_probe(struct platf if (err) goto err_notifier_unregister;