Commit 62b5bb7b authored by Shenwei Wang's avatar Shenwei Wang Committed by Jakub Kicinski
Browse files

net: fec: update MAX_FL based on the current MTU



Configure the MAX_FL (Maximum Frame Length) register according to the
current MTU value, which ensures that packets exceeding the configured MTU
trigger an RX error.

Reviewed-by: default avatarWei Fang <wei.fang@nxp.com>
Signed-off-by: default avatarShenwei Wang <shenwei.wang@nxp.com>
Link: https://patch.msgid.link/20250910185211.721341-4-shenwei.wang@nxp.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 29e6d5f8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1149,7 +1149,7 @@ fec_restart(struct net_device *ndev)
	u32 rcntl = FEC_RCR_MII;

	if (OPT_ARCH_HAS_MAX_FL)
		rcntl |= fep->max_buf_size << 16;
		rcntl |= (fep->netdev->mtu + ETH_HLEN + ETH_FCS_LEN) << 16;

	if (fep->bufdesc_ex)
		fec_ptp_save_state(fep);