History

Revert "UAPI: ethtool: Use __struct_group() in struct ethtool_link_settings"

This reverts commit 43d3487035e9a86fad952de4240a518614240d43. We cannot use tagged struct groups in UAPI because C++ will throw syntax errors even under "extern C".

Kees Cook committed 1 year ago

Commit ebda1231 parent 1cfb5e51 file · +15 −18Browse files

Showing the changes to include/uapi (1 of 1 file). Show all

Unified · Split

include/uapi/linux/ethtool.h+15−18
@@ -2511,24 +2511,21 @@ enum ethtool_reset_flags { · 2510 unmodified lines
25112511 * autonegotiation; 0 if unknown or not applicable. Read-only.
25122512 */
25132513 struct ethtool_link_settings {
2514− /* New members MUST be added within the __struct_group() macro below. */
2515− __struct_group(ethtool_link_settings_hdr, hdr, /* no attrs */,
2516− __u32 cmd;
2517− __u32 speed;
2518− __u8 duplex;
2519− __u8 port;
2520− __u8 phy_address;
2521− __u8 autoneg;
2522− __u8 mdio_support;
2523− __u8 eth_tp_mdix;
2524− __u8 eth_tp_mdix_ctrl;
2525− __s8 link_mode_masks_nwords;
2526− __u8 transceiver;
2527− __u8 master_slave_cfg;
2528− __u8 master_slave_state;
2529− __u8 rate_matching;
2530− __u32 reserved[7];
2531− );
2514+ __u32 cmd;
2515+ __u32 speed;
2516+ __u8 duplex;
2517+ __u8 port;
2518+ __u8 phy_address;
2519+ __u8 autoneg;
2520+ __u8 mdio_support;
2521+ __u8 eth_tp_mdix;
2522+ __u8 eth_tp_mdix_ctrl;
2523+ __s8 link_mode_masks_nwords;
2524+ __u8 transceiver;
2525+ __u8 master_slave_cfg;
2526+ __u8 master_slave_state;
2527+ __u8 rate_matching;
2528+ __u32 reserved[7];
25322529 __u32 link_mode_masks[];
25332530 /* layout of link_mode_masks fields:
25342531 * __u32 map_supported[link_mode_masks_nwords];