aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoshe Tal <[email protected]>2022-01-20 11:55:50 +0200
committerDavid S. Miller <[email protected]>2022-01-20 11:30:15 +0000
commite2f08207c558bc0bc8abaa557cdb29bad776ac7b (patch)
treec365705d71dfe612d868af00b79b3642ad4e272c
parentd15c7e875d44367005370e6a82e8f3a382a04f9b (diff)
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: ecc31c60240b ("ethtool: Add link extended state") Signed-off-by: Moshe Tal <[email protected]> Reviewed-by: Ido Schimmel <[email protected]> Tested-by: Ido Schimmel <[email protected]> Reviewed-by: Gal Pressman <[email protected]> Reviewed-by: Amit Cohen <[email protected]> Signed-off-by: David S. Miller <[email protected]>
-rw-r--r--include/linux/ethtool.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index a26f37a27167..11efc45de66a 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -111,7 +111,7 @@ struct ethtool_link_ext_state_info {
enum ethtool_link_ext_substate_bad_signal_integrity bad_signal_integrity;
enum ethtool_link_ext_substate_cable_issue cable_issue;
enum ethtool_link_ext_substate_module module;
- u8 __link_ext_substate;
+ u32 __link_ext_substate;
};
};