]> git.itanic.dy.fi Git - linux-stable/commit
net: dsa: microchip: ksz8795: Correctly handle huge frame configuration
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 17 Apr 2023 18:19:33 +0000 (20:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Apr 2023 12:29:58 +0000 (14:29 +0200)
commitc3d81540dff971b21b4bbe229deae926d6463f78
tree7c0b3350d8d042634650b59e6d7eb3a4bc12354e
parent71035a0508c04827b91a5bfeb2c9ef374f321e65
net: dsa: microchip: ksz8795: Correctly handle huge frame configuration

[ Upstream commit 3d2f8f1f184c60508f7af3022536651d7ac2dd07 ]

Because of the logic in place, SW_HUGE_PACKET can never be set.
(If the first condition is true, then the 2nd one is also true, but is not
executed)

Change the logic and update each bit individually.

Fixes: 29d1e85f45e0 ("net: dsa: microchip: ksz8: add MTU configuration support")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/43107d9e8b5b8b05f0cbd4e1f47a2bb88c8747b2.1681755535.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/dsa/microchip/ksz8795.c