]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: qca8k: fix ethtool autocast mib for big-endian systems
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 12 Oct 2022 17:18:37 +0000 (19:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 Oct 2022 07:22:28 +0000 (08:22 +0100)
commit3e1bc3bc1bd8c336ca6e815e20eab79d868f2731
treea4daa7ebb64891c2035451152598538d883cbaed
parent6348744bff9fa14349833cf09f626947748dbb6a
net: dsa: qca8k: fix ethtool autocast mib for big-endian systems

The switch sends autocast mib in little-endian. This is problematic for
big-endian system as the values needs to be converted.

Fix this by converting each mib value to cpu byte order.

Fixes: 71e1366f72e5 ("net: dsa: qca8k: add support for mib autocast in Ethernet packet")
Tested-by: Pawel Dembicki <paweldembicki@gmail.com>
Tested-by: Lech Perczak <lech.perczak@gmail.com>
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca/qca8k-8xxx.c
include/linux/dsa/tag_qca.h