linux/net/ethtool
Vladimir Oltean 35b288d6e3 net: ethtool: mm: sanitize some UAPI configurations
The verify-enabled boolean (ETHTOOL_A_MM_VERIFY_ENABLED) was intended to
be a sub-setting of tx-enabled (ETHTOOL_A_MM_TX_ENABLED). IOW, MAC Merge
TX can be enabled with or without verification, but verification with TX
disabled makes no sense.

The pmac-enabled boolean (ETHTOOL_A_MM_PMAC_ENABLED) was intended to be
a global toggle from an API perspective, whereas tx-enabled just handles
the TX direction. IOW, the pMAC can be enabled with or without TX, but
it doesn't make sense to enable TX if the pMAC is not enabled.

Add two checks which sanitize and reject these invalid cases.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-04-20 20:03:21 -07:00
..
bitset.c ethtool: fix stack overflow in ethnl_parse_bitset() 2020-12-09 15:50:38 -08:00
bitset.h ethtool: add ethnl_parse_bitset() helper 2020-03-12 15:32:32 -07:00
cabletest.c net: delete extra space and tab in blank line 2022-07-25 19:38:31 -07:00
channels.c ethtool: netlink: convert commands to common SET 2023-01-27 12:24:32 +00:00
coalesce.c ethtool: netlink: convert commands to common SET 2023-01-27 12:24:32 +00:00
common.c drivers/net/phy: add the link modes for the 10BASE-T1S Ethernet PHY 2023-01-11 08:35:02 +00:00
common.h net: ethtool: netlink: retrieve stats from multiple sources (eMAC, pMAC) 2023-01-23 12:44:18 +00:00
debug.c ethtool: netlink: convert commands to common SET 2023-01-27 12:24:32 +00:00
eee.c ethtool: netlink: convert commands to common SET 2023-01-27 12:24:32 +00:00
eeprom.c ethtool: eeprom: fix null-deref on genl_info in dump 2022-10-24 19:08:07 -07:00
features.c ethtool: use ethnl_parse_header_dev_put() 2021-12-15 10:27:47 +00:00
fec.c ethtool: netlink: convert commands to common SET 2023-01-27 12:24:32 +00:00
ioctl.c ipv6: Remove in6addr_any alternatives. 2023-03-29 08:22:52 +01:00
linkinfo.c ethtool: netlink: convert commands to common SET 2023-01-27 12:24:32 +00:00
linkmodes.c ethtool: reset #lanes when lanes is omitted 2023-04-04 18:57:10 -07:00
linkstate.c ethtool: linkstate: add a statistic for PHY down events 2022-11-08 10:36:54 +01:00
Makefile net: ethtool: add support for MAC Merge layer 2023-01-23 12:44:18 +00:00
mm.c net: ethtool: mm: sanitize some UAPI configurations 2023-04-20 20:03:21 -07:00
module.c ethtool: netlink: convert commands to common SET 2023-01-27 12:24:32 +00:00
netlink.c ethtool: netlink: convert commands to common SET 2023-01-27 12:24:32 +00:00
netlink.h ethtool: Add support for configuring tx_push_buf_len 2023-03-27 19:49:58 -07:00
pause.c ethtool: netlink: handle SET intro/outro in the common code 2023-01-27 12:24:31 +00:00
phc_vclocks.c ethtool: add a new command for getting PHC virtual clocks 2021-07-01 13:08:18 -07:00
plca.c ethtool: netlink: convert commands to common SET 2023-01-27 12:24:32 +00:00
privflags.c ethtool: netlink: convert commands to common SET 2023-01-27 12:24:32 +00:00
pse-pd.c ethtool: pse-pd: Fix double word in comments 2023-02-21 09:02:13 -08:00
rings.c ethtool: Add support for configuring tx_push_buf_len 2023-03-27 19:49:58 -07:00
rss.c ethtool: add netlink attr in rss get reply only if value is not null 2023-01-12 21:52:46 -08:00
stats.c net: ethtool: fix NULL pointer dereference in stats_prepare_data() 2023-01-25 09:56:31 +00:00
strset.c ethtool: strset: report missing ETHTOOL_A_STRINGSET_ID via ext_ack 2022-08-30 12:20:43 +02:00
tsinfo.c ethtool: link up ethnl_header_policy as a nested policy 2020-10-06 06:25:55 -07:00
tunnels.c ethtool: tunnels: check the return value of nla_nest_start() 2022-09-22 19:28:10 -07:00
wol.c ethtool: netlink: convert commands to common SET 2023-01-27 12:24:32 +00:00