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)
committerJakub Kicinski <kuba@kernel.org>
Thu, 14 Jan 2021 04:09:26 +0000 (20:09 -0800)
commit5b55299eed78538cc4746e50ee97103a1643249c
treeb5e5b49e4ee2b84ea9cd86b0ee475364d5e5ff65
parent8ad2a970d2010add3963e7219eb50367ab3fa4eb
net: stmmac: Fixed mtu channged by cache aligned

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>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c