net: stmmac: Fixed mtu channged by cache aligned
authorDavid Wu <david.wu@rock-chips.com>
Wed, 13 Jan 2021 03:41:09 +0000 (11:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jan 2021 15:04:02 +0000 (16:04 +0100)
commit5ae7725043250a61589f426ef454b1fb8e7be808
treee18a0e1bfb7fefd0f0fd04c59e722ecab82f3325
parent741690db7a357743545e0fa83310bdb1152ecaac
net: stmmac: Fixed mtu channged by cache aligned

[ Upstream commit 5b55299eed78538cc4746e50ee97103a1643249c ]

Since the original mtu is not used when the mtu is updated,
the mtu is aligned with cache, this will get an incorrect.
For example, if you want to configure the mtu to be 1500,
but mtu 1536 is configured in fact.

Fixed: eaf4fac478077 ("net: stmmac: Do not accept invalid MTU values")
Signed-off-by: David Wu <david.wu@rock-chips.com>
Link: https://lore.kernel.org/r/20210113034109.27865-1-david.wu@rock-chips.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c