hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/net/dsa/vitesse-vsc73xx-core.c
....@@ -1025,17 +1025,17 @@
10251025 struct vsc73xx *vsc = ds->priv;
10261026
10271027 return vsc73xx_write(vsc, VSC73XX_BLOCK_MAC, port,
1028
- VSC73XX_MAXLEN, new_mtu);
1028
+ VSC73XX_MAXLEN, new_mtu + ETH_HLEN + ETH_FCS_LEN);
10291029 }
10301030
10311031 /* According to application not "VSC7398 Jumbo Frames" setting
1032
- * up the MTU to 9.6 KB does not affect the performance on standard
1032
+ * up the frame size to 9.6 KB does not affect the performance on standard
10331033 * frames. It is clear from the application note that
10341034 * "9.6 kilobytes" == 9600 bytes.
10351035 */
10361036 static int vsc73xx_get_max_mtu(struct dsa_switch *ds, int port)
10371037 {
1038
- return 9600;
1038
+ return 9600 - ETH_HLEN - ETH_FCS_LEN;
10391039 }
10401040
10411041 static const struct dsa_switch_ops vsc73xx_ds_ops = {