The following warnings are introduced by our own patches:
lantiq_etop.c:173:1: warning: no semicolon at end of struct or union
};
^
lantiq_etop.c: In function 'ltq_etop_change_mtu':
lantiq_etop.c:725:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
int max = ETH_HLEN + VLAN_HLEN + new_mtu + ETH_FCS_LEN;
^~~
Signed-off-by: Mathias Kresin <dev@kresin.me>
+ struct clk *clk_ppe;
+ struct clk *clk_switch;
+ struct clk *clk_ephy;
+ struct clk *clk_ppe;
+ struct clk *clk_switch;
+ struct clk *clk_ephy;
-+ struct clk *clk_ephycgu
++ struct clk *clk_ephycgu;
};
+static int ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr,
};
+static int ltq_etop_mdio_wr(struct mii_bus *bus, int phy_addr,
netif_tx_stop_queue(txq);
return NETDEV_TX_OK;
netif_tx_stop_queue(txq);
return NETDEV_TX_OK;
-@@ -518,8 +712,10 @@ ltq_etop_change_mtu(struct net_device *d
+@@ -515,11 +709,14 @@ ltq_etop_change_mtu(struct net_device *d
+ {
+ struct ltq_etop_priv *priv = netdev_priv(dev);
+ unsigned long flags;
++ int max;
-+ int max = ETH_HLEN + VLAN_HLEN + new_mtu + ETH_FCS_LEN;
++ max = ETH_HLEN + VLAN_HLEN + new_mtu + ETH_FCS_LEN;
+
spin_lock_irqsave(&priv->lock, flags);
- ltq_etop_w32((ETOP_PLEN_UNDER << 16) | new_mtu, LTQ_ETOP_IGPLEN);
+
spin_lock_irqsave(&priv->lock, flags);
- ltq_etop_w32((ETOP_PLEN_UNDER << 16) | new_mtu, LTQ_ETOP_IGPLEN);
spin_unlock_irqrestore(&priv->lock, flags);
return 0;
spin_unlock_irqrestore(&priv->lock, flags);
return 0;
-@@ -579,6 +775,9 @@ ltq_etop_init(struct net_device *dev)
+@@ -579,6 +776,9 @@ ltq_etop_init(struct net_device *dev)
if (err)
goto err_hw;
ltq_etop_change_mtu(dev, 1500);
if (err)
goto err_hw;
ltq_etop_change_mtu(dev, 1500);
memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
if (!is_valid_ether_addr(mac.sa_data)) {
memcpy(&mac, &priv->pldata->mac, sizeof(struct sockaddr));
if (!is_valid_ether_addr(mac.sa_data)) {
-@@ -596,9 +795,10 @@ ltq_etop_init(struct net_device *dev)
+@@ -596,9 +796,10 @@ ltq_etop_init(struct net_device *dev)
dev->addr_assign_type = NET_ADDR_RANDOM;
ltq_etop_set_multicast_list(dev);
dev->addr_assign_type = NET_ADDR_RANDOM;
ltq_etop_set_multicast_list(dev);
-@@ -618,6 +818,9 @@ ltq_etop_tx_timeout(struct net_device *d
+@@ -618,6 +819,9 @@ ltq_etop_tx_timeout(struct net_device *d
err = ltq_etop_hw_init(dev);
if (err)
goto err_hw;
err = ltq_etop_hw_init(dev);
if (err)
goto err_hw;
netif_trans_update(dev);
netif_wake_queue(dev);
return;
netif_trans_update(dev);
netif_wake_queue(dev);
return;
-@@ -641,14 +844,19 @@ static const struct net_device_ops ltq_e
+@@ -641,14 +845,19 @@ static const struct net_device_ops ltq_e
.ndo_tx_timeout = ltq_etop_tx_timeout,
};
.ndo_tx_timeout = ltq_etop_tx_timeout,
};
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
-@@ -674,31 +882,62 @@ ltq_etop_probe(struct platform_device *p
+@@ -674,31 +883,62 @@ ltq_etop_probe(struct platform_device *p
err = register_netdev(dev);
if (err)
err = register_netdev(dev);
if (err)
-@@ -727,31 +966,22 @@ ltq_etop_remove(struct platform_device *
+@@ -727,31 +967,22 @@ ltq_etop_remove(struct platform_device *
+early_param("ethaddr", setup_ethaddr);
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
+early_param("ethaddr", setup_ethaddr);
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
-@@ -779,7 +779,11 @@ ltq_etop_init(struct net_device *dev)
+@@ -780,7 +780,11 @@ ltq_etop_init(struct net_device *dev)