diff options
Diffstat (limited to 'libnm-core/nm-setting-ethtool.c')
-rw-r--r-- | libnm-core/nm-setting-ethtool.c | 209 |
1 files changed, 0 insertions, 209 deletions
diff --git a/libnm-core/nm-setting-ethtool.c b/libnm-core/nm-setting-ethtool.c index 0057e10e0c..28307e4941 100644 --- a/libnm-core/nm-setting-ethtool.c +++ b/libnm-core/nm-setting-ethtool.c @@ -112,14 +112,6 @@ G_DEFINE_TYPE (NMSettingEthtool, nm_setting_ethtool, NM_TYPE_SETTING) /*****************************************************************************/ -static void -_notify_attributes (NMSettingEthtool *self) -{ - _nm_setting_option_notify (NM_SETTING (self), TRUE); -} - -/*****************************************************************************/ - /** * nm_setting_ethtool_get_feature: * @setting: the #NMSettingEthtool @@ -245,207 +237,6 @@ nm_setting_ethtool_init_features (NMSettingEthtool *setting, return n_req; } -/** - * nm_setting_ethtool_get_coalesce: - * @setting: the #NMSettingEthtool - * @optname: option name of the coalescing setting to get - * @out_value (out) (allow-none): value of the coalescing setting - * - * Gets the value of coalescing setting. - * - * Note that @optname must be a valid name for a setting, according to - * nm_ethtool_optname_is_coalesce(). - * - * - * Returns: %TRUE and places the coalesce setting value in @out_value or %FALSE if unset. - * - * Since: 1.26 - */ -gboolean -nm_setting_ethtool_get_coalesce (NMSettingEthtool *setting, - const char *optname, - guint32 *out_value) -{ - g_return_val_if_fail (NM_IS_SETTING_ETHTOOL (setting), FALSE); - g_return_val_if_fail (nm_ethtool_optname_is_coalesce (optname), FALSE); - - return nm_setting_option_get_uint32 (NM_SETTING (setting), - optname, - out_value); -} - -/** - * nm_setting_ethtool_set_coalesce: - * @setting: the #NMSettingEthtool - * @optname: option name of the coalesce setting - * @value: the new value to set. - * - * Sets a coalesce setting. - * - * Note that @optname must be a valid name for a coalesce setting, according to - * nm_ethtool_optname_is_coalesce(). - * - * Since: 1.26 - */ -void -nm_setting_ethtool_set_coalesce (NMSettingEthtool *setting, - const char *optname, - guint32 value) -{ - NMEthtoolID ethtool_id; - - g_return_if_fail (NM_IS_SETTING_ETHTOOL (setting)); - - ethtool_id = nm_ethtool_id_get_by_name (optname); - - g_return_if_fail (nm_ethtool_id_is_coalesce (ethtool_id)); - - if (NM_IN_SET (ethtool_id, - NM_ETHTOOL_ID_COALESCE_ADAPTIVE_RX, - NM_ETHTOOL_ID_COALESCE_ADAPTIVE_TX)) - value = !!value; - - nm_setting_option_set_uint32 (NM_SETTING (setting), - optname, - value); - _notify_attributes (setting); -} - -/** - * nm_setting_ethtool_clear_coalesce: - * @setting: the #NMSettingEthtool - * @optname: option name of the coalesce setting - * - * Clear a coalesce setting - * - * Since: 1.26 - */ -void -nm_setting_ethtool_clear_coalesce (NMSettingEthtool *setting, - const char *optname) -{ - g_return_if_fail (NM_IS_SETTING_ETHTOOL (setting)); - g_return_if_fail (nm_str_not_empty (optname)); - - if (_nm_setting_option_clear (NM_SETTING (setting), optname)) - _notify_attributes (setting); -} - -/** - * nm_setting_ethtool_clear_coalesce_all: - * @setting: the #NMSettingEthtool - * - * Clears all coalesce settings - * - * Since: 1.26 - */ -void -nm_setting_ethtool_clear_coalesce_all (NMSettingEthtool *setting) -{ - g_return_if_fail (NM_IS_SETTING_ETHTOOL (setting)); - - nm_setting_option_clear_by_name (NM_SETTING (setting), - nm_ethtool_optname_is_coalesce); -} - -/** - * nm_setting_ethtool_get_ring: - * @setting: the #NMSettingEthtool - * @optname: option name of the ring setting to get - * @out_value (out) (allow-none): value of the ring setting - * - * Gets the value of ring setting. - * - * Note that @optname must be a valid name for a setting, according to - * nm_ethtool_optname_is_ring(). - * - * - * Returns: %TRUE and places the ring setting value in @out_value or %FALSE if unset. - * - * Since: 1.26 - */ -gboolean -nm_setting_ethtool_get_ring (NMSettingEthtool *setting, - const char *optname, - guint32 *out_value) -{ - g_return_val_if_fail (NM_IS_SETTING_ETHTOOL (setting), FALSE); - g_return_val_if_fail (nm_ethtool_optname_is_ring (optname), FALSE); - - return nm_setting_option_get_uint32 (NM_SETTING (setting), - optname, - out_value); -} - -/** - * nm_setting_ethtool_set_ring: - * @setting: the #NMSettingEthtool - * @optname: option name of the ring setting - * @value: the new value to set. - * - * Sets a ring setting. - * - * Note that @optname must be a valid name for a ring setting, according to - * nm_ethtool_optname_is_ring(). - * - * Since: 1.26 - */ -void -nm_setting_ethtool_set_ring (NMSettingEthtool *setting, - const char *optname, - guint32 value) -{ - NMEthtoolID ethtool_id; - - g_return_if_fail (NM_IS_SETTING_ETHTOOL (setting)); - - ethtool_id = nm_ethtool_id_get_by_name (optname); - - g_return_if_fail (nm_ethtool_id_is_ring (ethtool_id)); - - nm_setting_option_set_uint32 (NM_SETTING (setting), - optname, - value); - _notify_attributes (setting); -} - -/** - * nm_setting_ethtool_clear_ring: - * @setting: the #NMSettingEthtool - * @optname: option name of the ring setting - * - * Clear a ring setting - * - * Since: 1.26 - */ -void -nm_setting_ethtool_clear_ring (NMSettingEthtool *setting, - const char *optname) -{ - g_return_if_fail (NM_IS_SETTING_ETHTOOL (setting)); - g_return_if_fail (nm_str_not_empty (optname)); - - if (_nm_setting_option_clear (NM_SETTING (setting), optname)) - _notify_attributes (setting); -} - -/** - * nm_setting_ethtool_clear_ring_all: - * @setting: the #NMSettingEthtool - * - * Clears all ring settings - * - * Since: 1.26 - */ -void -nm_setting_ethtool_clear_ring_all (NMSettingEthtool *setting) -{ - g_return_if_fail (NM_IS_SETTING_ETHTOOL (setting)); - - nm_setting_option_clear_by_name (NM_SETTING (setting), - nm_ethtool_optname_is_ring); -} - /*****************************************************************************/ /** |