diff options
author | Christian Marangi <ansuelsmth@gmail.com> | 2022-10-12 19:18:37 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-10-14 08:22:28 +0100 |
commit | 0d4636f7d72df3179b20a2d32b647881917a5e2a (patch) | |
tree | a4daa7ebb64891c2035451152598538d883cbaed /include/linux/dsa | |
parent | a2550d3ce53c68f54042bc5e468c4d07491ffe0e (diff) | |
download | linux-0d4636f7d72df3179b20a2d32b647881917a5e2a.tar.gz linux-0d4636f7d72df3179b20a2d32b647881917a5e2a.tar.bz2 linux-0d4636f7d72df3179b20a2d32b647881917a5e2a.zip |
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: 5c957c7ca78c ("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>
Diffstat (limited to 'include/linux/dsa')
-rw-r--r-- | include/linux/dsa/tag_qca.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/dsa/tag_qca.h b/include/linux/dsa/tag_qca.h index 0e176da1e43f..b1b5720d89a5 100644 --- a/include/linux/dsa/tag_qca.h +++ b/include/linux/dsa/tag_qca.h @@ -73,7 +73,7 @@ enum mdio_cmd { }; struct mib_ethhdr { - u32 data[3]; /* first 3 mib counter */ + __le32 data[3]; /* first 3 mib counter */ __be16 hdr; /* qca hdr */ } __packed; |