diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2023-12-09 23:37:35 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2023-12-12 14:17:06 +0100 |
commit | d577ca429af36a3aea38d53d11be56dff015dfc9 (patch) | |
tree | 75116060c7610463140e11cb94df65e0a67f9ced /lib/crypto/mpi/mpi-inline.h | |
parent | 389119c842187e2425d8e0354aabe5c3383c5020 (diff) |
net: dsa: realtek: Rewrite RTL8366RB MTU handling
The MTU callbacks are in layer 1 size, so for example 1500
bytes is a normal setting. Cache this size, and only add
the layer 2 framing right before choosing the setting. On
the CPU port this will however include the DSA tag since
this is transmitted from the parent ethernet interface!
Add the layer 2 overhead such as ethernet and VLAN framing
and FCS before selecting the size in the register.
This will make the code easier to understand.
The rtl8366rb_max_mtu() callback returns a bogus MTU
just subtracting the CPU tag, which is the only thing
we should NOT subtract. Return the correct layer 1
max MTU after removing headers and checksum.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'lib/crypto/mpi/mpi-inline.h')
0 files changed, 0 insertions, 0 deletions