Commit 606c07f3 authored by Lendacky, Thomas's avatar Lendacky, Thomas Committed by David S. Miller

net: ethtool: Add macro to clear a link mode setting

There are currently macros to set and test an ETHTOOL_LINK_MODE_ setting,
but not to clear one. Add a macro to clear an ETHTOOL_LINK_MODE_ setting.
Signed-off-by: default avatarTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 80a788c9
...@@ -136,6 +136,17 @@ struct ethtool_link_ksettings { ...@@ -136,6 +136,17 @@ struct ethtool_link_ksettings {
#define ethtool_link_ksettings_add_link_mode(ptr, name, mode) \ #define ethtool_link_ksettings_add_link_mode(ptr, name, mode) \
__set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name) __set_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
/**
* ethtool_link_ksettings_del_link_mode - clear bit in link_ksettings
* link mode mask
* @ptr : pointer to struct ethtool_link_ksettings
* @name : one of supported/advertising/lp_advertising
* @mode : one of the ETHTOOL_LINK_MODE_*_BIT
* (not atomic, no bound checking)
*/
#define ethtool_link_ksettings_del_link_mode(ptr, name, mode) \
__clear_bit(ETHTOOL_LINK_MODE_ ## mode ## _BIT, (ptr)->link_modes.name)
/** /**
* ethtool_link_ksettings_test_link_mode - test bit in ksettings link mode mask * ethtool_link_ksettings_test_link_mode - test bit in ksettings link mode mask
* @ptr : pointer to struct ethtool_link_ksettings * @ptr : pointer to struct ethtool_link_ksettings
......
Markdown is supported
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