Commit 326470b
net: fec: account for VLAN header in frame length calculations
commit ca1bb3f upstream.
The MAX_FL (maximum frame length) and related calculations used ETH_HLEN,
which does not account for the 4-byte VLAN tag in tagged frames. This
caused the hardware to reject valid VLAN frames as oversized, resulting
in RX errors and dropped packets.
Use VLAN_ETH_HLEN instead of ETH_HLEN in the MAX_FL register setup,
cut-through mode threshold, buffer allocation, and max_mtu calculation.
Cc: stable@kernel.org # v6.18+
Fixes: 62b5bb7 ("net: fec: update MAX_FL based on the current MTU")
Fixes: d466c16 ("net: fec: enable the Jumbo frame support for i.MX8QM")
Fixes: 59e9bf0 ("net: fec: add change_mtu to support dynamic buffer allocation")
Fixes: ec2a168 ("net: fec: use a member variable for maximum buffer size")
Signed-off-by: Clemens Gruber <mail@clemensgruber.at>
Reviewed-by: Wei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20260121083751.66997-1-mail@clemensgruber.at
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 03faa61 commit 326470b
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1151 | 1151 | | |
1152 | 1152 | | |
1153 | 1153 | | |
1154 | | - | |
| 1154 | + | |
1155 | 1155 | | |
1156 | 1156 | | |
1157 | 1157 | | |
| |||
1286 | 1286 | | |
1287 | 1287 | | |
1288 | 1288 | | |
1289 | | - | |
1290 | | - | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
1291 | 1292 | | |
1292 | 1293 | | |
1293 | 1294 | | |
1294 | | - | |
| 1295 | + | |
1295 | 1296 | | |
1296 | 1297 | | |
1297 | 1298 | | |
| |||
4052 | 4053 | | |
4053 | 4054 | | |
4054 | 4055 | | |
4055 | | - | |
| 4056 | + | |
4056 | 4057 | | |
4057 | 4058 | | |
4058 | 4059 | | |
| |||
4609 | 4610 | | |
4610 | 4611 | | |
4611 | 4612 | | |
4612 | | - | |
| 4613 | + | |
4613 | 4614 | | |
4614 | 4615 | | |
4615 | 4616 | | |
| |||
0 commit comments