diff --git a/patch/kernel/rockchip64-current/general-disable-mtu-validation.patch b/patch/kernel/rockchip64-current/general-disable-mtu-validation.patch index c5d9c4e756..d266ef09b9 100644 --- a/patch/kernel/rockchip64-current/general-disable-mtu-validation.patch +++ b/patch/kernel/rockchip64-current/general-disable-mtu-validation.patch @@ -2,7 +2,6 @@ This patch reverts: https://github.com/torvalds/linux/commit/eaf4fac478077d4ed57 It works around following issues: - no way to change MTU (tx_fifo_size is reported as 0 for Rockchip's dwmac) - - no way to set MTU of 1500 (it is aligned to 1536) Signed-off-by: Piotr Szczepanik @@ -10,11 +9,12 @@ diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/eth index 122a06972..951d2281f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -3961,24 +3961,12 @@ static void stmmac_set_rx_mode(struct net_device *dev) +@@ -3961,25 +3961,13 @@ static void stmmac_set_rx_mode(struct net_device *dev) static int stmmac_change_mtu(struct net_device *dev, int new_mtu) { struct stmmac_priv *priv = netdev_priv(dev); - int txfifosz = priv->plat->tx_fifo_size; + const int mtu = new_mtu; - - if (txfifosz == 0) - txfifosz = priv->dma_cap.tx_fifo_size; @@ -32,6 +32,6 @@ index 122a06972..951d2281f 100644 - if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB)) - return -EINVAL; - - dev->mtu = new_mtu; + dev->mtu = mtu; netdev_update_features(dev); diff --git a/patch/kernel/rockchip64-dev/general-disable-mtu-validation.patch b/patch/kernel/rockchip64-dev/general-disable-mtu-validation.patch index c5d9c4e756..d266ef09b9 100644 --- a/patch/kernel/rockchip64-dev/general-disable-mtu-validation.patch +++ b/patch/kernel/rockchip64-dev/general-disable-mtu-validation.patch @@ -2,7 +2,6 @@ This patch reverts: https://github.com/torvalds/linux/commit/eaf4fac478077d4ed57 It works around following issues: - no way to change MTU (tx_fifo_size is reported as 0 for Rockchip's dwmac) - - no way to set MTU of 1500 (it is aligned to 1536) Signed-off-by: Piotr Szczepanik @@ -10,11 +9,12 @@ diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/eth index 122a06972..951d2281f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c -@@ -3961,24 +3961,12 @@ static void stmmac_set_rx_mode(struct net_device *dev) +@@ -3961,25 +3961,13 @@ static void stmmac_set_rx_mode(struct net_device *dev) static int stmmac_change_mtu(struct net_device *dev, int new_mtu) { struct stmmac_priv *priv = netdev_priv(dev); - int txfifosz = priv->plat->tx_fifo_size; + const int mtu = new_mtu; - - if (txfifosz == 0) - txfifosz = priv->dma_cap.tx_fifo_size; @@ -32,6 +32,6 @@ index 122a06972..951d2281f 100644 - if ((txfifosz < new_mtu) || (new_mtu > BUF_SIZE_16KiB)) - return -EINVAL; - - dev->mtu = new_mtu; + dev->mtu = mtu; netdev_update_features(dev);