]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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 14:57:59 +0000 (15:57 +0100)
commita3870cf8a7a243eadd83a063152049be870a412e
treeecc03aa2e0f3302277561bcc1708bcee3858def7
parentc213d85cae390bdb9f6a6e9f95009ba8dc356fc1
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