Skip to content
Commit aa3d020b authored by Dan Carpenter's avatar Dan Carpenter Committed by David S. Miller
Browse files

net: dsa: qca8k: fix an endian bug in qca8k_get_ethtool_stats()



The "hi" variable is a u64 but the qca8k_read() writes to the top 32
bits of it.  That will work on little endian systems but it's a bit
subtle.  It's cleaner to make declare "hi" as a u32.  We will still need
to cast it when we shift it later on in the function but that's fine.

Fixes: 7c9896e3 ("net: dsa: qca8k: check return value of read functions correctly")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarVladimir Oltean <olteanv@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent dac81152
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment