Skip to content
Commit 1ee5269a authored by Christian Marangi's avatar Christian Marangi Committed by Greg Kroah-Hartman
Browse files

net: dsa: qca8k: fix inband mgmt for big-endian systems

[ Upstream commit a2550d3c ]

The header and the data of the skb for the inband mgmt requires
to be in little-endian. This is problematic for big-endian system
as the mgmt header is written in the cpu byte order.

Fix this by converting each value for the mgmt header and data to
little-endian, and convert to cpu byte order the mgmt header and
data sent by the switch.

Fixes: 5950c7c0

 ("net: dsa: qca8k: add support for mgmt read/write in Ethernet packet")
Tested-by: default avatarPawel Dembicki <paweldembicki@gmail.com>
Tested-by: default avatarLech Perczak <lech.perczak@gmail.com>
Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
Reviewed-by: default avatarLech Perczak <lech.perczak@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent fef70f97
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment