]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: hellcreek: Calculate checksums in tagger
authorKurt Kanzenbach <kurt@linutronix.de>
Fri, 15 Apr 2022 10:33:20 +0000 (12:33 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 19 Apr 2022 07:49:38 +0000 (09:49 +0200)
commit7531f7890779565bc79de7edf4f73029a633363b
tree3f7a7c8fbcfa3c41cd365afc6cdc56cc108be3fb
parentb75b2b7744d39671489b444888ba005b55404598
net: dsa: hellcreek: Calculate checksums in tagger

In case the checksum calculation is offloaded to the DSA master network
interface, it will include the switch trailing tag. As soon as the switch strips
that tag on egress, the calculated checksum is wrong.

Therefore, add the checksum calculation to the tagger (if required) before
adding the switch tag. This way, the hellcreek code works with all DSA master
interfaces regardless of their declared feature set.

Fixes: 9d466f313f1f ("net: dsa: Add tag handling for Hirschmann Hellcreek switches")
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220415103320.90657-1-kurt@linutronix.de
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/dsa/tag_hellcreek.c