]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: Fix link extended state for big endian
authorMoshe Tal <moshet@nvidia.com>
Thu, 20 Jan 2022 09:55:50 +0000 (11:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 20 Jan 2022 11:30:15 +0000 (11:30 +0000)
commit8b4a1385f5d91b85df03b0409ac5b6f23d8c88d2
treec365705d71dfe612d868af00b79b3642ad4e272c
parent2d300db346454c9eab42b9649ca00321f0641614
ethtool: Fix link extended state for big endian

The link extended sub-states are assigned as enum that is an integer
size but read from a union as u8, this is working for small values on
little endian systems but for big endian this always give 0. Fix the
variable in the union to match the enum size.

Fixes: 713e8043cef7 ("ethtool: Add link extended state")
Signed-off-by: Moshe Tal <moshet@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Reviewed-by: Amit Cohen <amcohen@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/ethtool.h