platform: use consistent naming for ethtool functions
For unknown reasons (wrong copy and paste?) the getter functions had a "link" in the name. Remove it.
This commit is contained in:
@@ -2746,7 +2746,7 @@ _ethtool_features_set(NMDevice *self,
|
|||||||
if (nm_setting_ethtool_init_features(s_ethtool, ethtool_state->requested) == 0)
|
if (nm_setting_ethtool_init_features(s_ethtool, ethtool_state->requested) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
features = nm_platform_ethtool_get_link_features(platform, ethtool_state->ifindex);
|
features = nm_platform_ethtool_get_features(platform, ethtool_state->ifindex);
|
||||||
if (!features) {
|
if (!features) {
|
||||||
_LOGW(LOGD_DEVICE, "ethtool: failure setting offload features (cannot read features)");
|
_LOGW(LOGD_DEVICE, "ethtool: failure setting offload features (cannot read features)");
|
||||||
return;
|
return;
|
||||||
@@ -2865,9 +2865,9 @@ _ethtool_coalesce_set(NMDevice *self,
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!has_old) {
|
if (!has_old) {
|
||||||
if (!nm_platform_ethtool_get_link_coalesce(platform,
|
if (!nm_platform_ethtool_get_coalesce(platform,
|
||||||
ethtool_state->ifindex,
|
ethtool_state->ifindex,
|
||||||
&coalesce_old)) {
|
&coalesce_old)) {
|
||||||
_LOGW(LOGD_DEVICE, "ethtool: failure getting coalesce settings (cannot read)");
|
_LOGW(LOGD_DEVICE, "ethtool: failure getting coalesce settings (cannot read)");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2946,7 +2946,7 @@ _ethtool_ring_set(NMDevice *self,
|
|||||||
nm_assert(g_variant_is_of_type(variant, G_VARIANT_TYPE_UINT32));
|
nm_assert(g_variant_is_of_type(variant, G_VARIANT_TYPE_UINT32));
|
||||||
|
|
||||||
if (!has_old) {
|
if (!has_old) {
|
||||||
if (!nm_platform_ethtool_get_link_ring(platform, ethtool_state->ifindex, &ring_old)) {
|
if (!nm_platform_ethtool_get_ring(platform, ethtool_state->ifindex, &ring_old)) {
|
||||||
_LOGW(LOGD_DEVICE,
|
_LOGW(LOGD_DEVICE,
|
||||||
"ethtool: failure setting ring options (cannot read existing setting)");
|
"ethtool: failure setting ring options (cannot read existing setting)");
|
||||||
return;
|
return;
|
||||||
@@ -3042,9 +3042,9 @@ _ethtool_channels_set(NMDevice *self,
|
|||||||
nm_assert(g_variant_is_of_type(variant, G_VARIANT_TYPE_UINT32));
|
nm_assert(g_variant_is_of_type(variant, G_VARIANT_TYPE_UINT32));
|
||||||
|
|
||||||
if (!has_old) {
|
if (!has_old) {
|
||||||
if (!nm_platform_ethtool_get_link_channels(platform,
|
if (!nm_platform_ethtool_get_channels(platform,
|
||||||
ethtool_state->ifindex,
|
ethtool_state->ifindex,
|
||||||
&channels_old)) {
|
&channels_old)) {
|
||||||
_LOGW(LOGD_DEVICE,
|
_LOGW(LOGD_DEVICE,
|
||||||
"ethtool: failure setting channels options (cannot read existing setting)");
|
"ethtool: failure setting channels options (cannot read existing setting)");
|
||||||
return;
|
return;
|
||||||
@@ -3161,7 +3161,7 @@ _ethtool_pause_set(NMDevice *self,
|
|||||||
nm_assert(g_variant_is_of_type(variant, G_VARIANT_TYPE_BOOLEAN));
|
nm_assert(g_variant_is_of_type(variant, G_VARIANT_TYPE_BOOLEAN));
|
||||||
|
|
||||||
if (!has_old) {
|
if (!has_old) {
|
||||||
if (!nm_platform_ethtool_get_link_pause(platform, ethtool_state->ifindex, &pause_old)) {
|
if (!nm_platform_ethtool_get_pause(platform, ethtool_state->ifindex, &pause_old)) {
|
||||||
_LOGW(LOGD_DEVICE,
|
_LOGW(LOGD_DEVICE,
|
||||||
"ethtool: failure setting pause options (cannot read "
|
"ethtool: failure setting pause options (cannot read "
|
||||||
"existing setting)");
|
"existing setting)");
|
||||||
@@ -3247,7 +3247,7 @@ _ethtool_eee_set(NMDevice *self,
|
|||||||
nm_assert(g_variant_is_of_type(variant, G_VARIANT_TYPE_BOOLEAN));
|
nm_assert(g_variant_is_of_type(variant, G_VARIANT_TYPE_BOOLEAN));
|
||||||
|
|
||||||
if (!has_old) {
|
if (!has_old) {
|
||||||
if (!nm_platform_ethtool_get_link_eee(platform, ethtool_state->ifindex, &eee_old)) {
|
if (!nm_platform_ethtool_get_eee(platform, ethtool_state->ifindex, &eee_old)) {
|
||||||
_LOGW(LOGD_DEVICE,
|
_LOGW(LOGD_DEVICE,
|
||||||
"ethtool: failure setting eee options (cannot read "
|
"ethtool: failure setting eee options (cannot read "
|
||||||
"existing setting)");
|
"existing setting)");
|
||||||
|
@@ -3595,7 +3595,7 @@ nm_platform_ethtool_get_link_settings(NMPlatform *self,
|
|||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
NMEthtoolFeatureStates *
|
NMEthtoolFeatureStates *
|
||||||
nm_platform_ethtool_get_link_features(NMPlatform *self, int ifindex)
|
nm_platform_ethtool_get_features(NMPlatform *self, int ifindex)
|
||||||
{
|
{
|
||||||
_CHECK_SELF_NETNS(self, klass, netns, NULL);
|
_CHECK_SELF_NETNS(self, klass, netns, NULL);
|
||||||
|
|
||||||
@@ -3640,9 +3640,7 @@ nm_platform_ethtool_set_fec_mode(NMPlatform *self, int ifindex, uint32_t fec_mod
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
nm_platform_ethtool_get_link_coalesce(NMPlatform *self,
|
nm_platform_ethtool_get_coalesce(NMPlatform *self, int ifindex, NMEthtoolCoalesceState *coalesce)
|
||||||
int ifindex,
|
|
||||||
NMEthtoolCoalesceState *coalesce)
|
|
||||||
{
|
{
|
||||||
_CHECK_SELF_NETNS(self, klass, netns, FALSE);
|
_CHECK_SELF_NETNS(self, klass, netns, FALSE);
|
||||||
|
|
||||||
@@ -3665,7 +3663,7 @@ nm_platform_ethtool_set_coalesce(NMPlatform *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
nm_platform_ethtool_get_link_ring(NMPlatform *self, int ifindex, NMEthtoolRingState *ring)
|
nm_platform_ethtool_get_ring(NMPlatform *self, int ifindex, NMEthtoolRingState *ring)
|
||||||
{
|
{
|
||||||
_CHECK_SELF_NETNS(self, klass, netns, FALSE);
|
_CHECK_SELF_NETNS(self, klass, netns, FALSE);
|
||||||
|
|
||||||
@@ -3686,9 +3684,7 @@ nm_platform_ethtool_set_ring(NMPlatform *self, int ifindex, const NMEthtoolRingS
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
nm_platform_ethtool_get_link_channels(NMPlatform *self,
|
nm_platform_ethtool_get_channels(NMPlatform *self, int ifindex, NMEthtoolChannelsState *channels)
|
||||||
int ifindex,
|
|
||||||
NMEthtoolChannelsState *channels)
|
|
||||||
{
|
{
|
||||||
_CHECK_SELF_NETNS(self, klass, netns, FALSE);
|
_CHECK_SELF_NETNS(self, klass, netns, FALSE);
|
||||||
|
|
||||||
@@ -3711,7 +3707,7 @@ nm_platform_ethtool_set_channels(NMPlatform *self,
|
|||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
nm_platform_ethtool_get_link_pause(NMPlatform *self, int ifindex, NMEthtoolPauseState *pause)
|
nm_platform_ethtool_get_pause(NMPlatform *self, int ifindex, NMEthtoolPauseState *pause)
|
||||||
{
|
{
|
||||||
_CHECK_SELF_NETNS(self, klass, netns, FALSE);
|
_CHECK_SELF_NETNS(self, klass, netns, FALSE);
|
||||||
|
|
||||||
@@ -3721,17 +3717,6 @@ nm_platform_ethtool_get_link_pause(NMPlatform *self, int ifindex, NMEthtoolPause
|
|||||||
return nmp_utils_ethtool_get_pause(ifindex, pause);
|
return nmp_utils_ethtool_get_pause(ifindex, pause);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean
|
|
||||||
nm_platform_ethtool_get_link_eee(NMPlatform *self, int ifindex, NMEthtoolEEEState *eee)
|
|
||||||
{
|
|
||||||
_CHECK_SELF_NETNS(self, klass, netns, FALSE);
|
|
||||||
|
|
||||||
g_return_val_if_fail(ifindex > 0, FALSE);
|
|
||||||
g_return_val_if_fail(eee, FALSE);
|
|
||||||
|
|
||||||
return nmp_utils_ethtool_get_eee(ifindex, eee);
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
nm_platform_ethtool_set_pause(NMPlatform *self, int ifindex, const NMEthtoolPauseState *pause)
|
nm_platform_ethtool_set_pause(NMPlatform *self, int ifindex, const NMEthtoolPauseState *pause)
|
||||||
{
|
{
|
||||||
@@ -3742,6 +3727,17 @@ nm_platform_ethtool_set_pause(NMPlatform *self, int ifindex, const NMEthtoolPaus
|
|||||||
return nmp_utils_ethtool_set_pause(ifindex, pause);
|
return nmp_utils_ethtool_set_pause(ifindex, pause);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
nm_platform_ethtool_get_eee(NMPlatform *self, int ifindex, NMEthtoolEEEState *eee)
|
||||||
|
{
|
||||||
|
_CHECK_SELF_NETNS(self, klass, netns, FALSE);
|
||||||
|
|
||||||
|
g_return_val_if_fail(ifindex > 0, FALSE);
|
||||||
|
g_return_val_if_fail(eee, FALSE);
|
||||||
|
|
||||||
|
return nmp_utils_ethtool_get_eee(ifindex, eee);
|
||||||
|
}
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
nm_platform_ethtool_set_eee(NMPlatform *self, int ifindex, const NMEthtoolEEEState *eee)
|
nm_platform_ethtool_set_eee(NMPlatform *self, int ifindex, const NMEthtoolEEEState *eee)
|
||||||
{
|
{
|
||||||
|
@@ -2631,7 +2631,7 @@ gboolean nm_platform_ethtool_get_link_settings(NMPlatform *self,
|
|||||||
guint32 *out_speed,
|
guint32 *out_speed,
|
||||||
NMPlatformLinkDuplexType *out_duplex);
|
NMPlatformLinkDuplexType *out_duplex);
|
||||||
|
|
||||||
NMEthtoolFeatureStates *nm_platform_ethtool_get_link_features(NMPlatform *self, int ifindex);
|
NMEthtoolFeatureStates *nm_platform_ethtool_get_features(NMPlatform *self, int ifindex);
|
||||||
gboolean nm_platform_ethtool_set_features(
|
gboolean nm_platform_ethtool_set_features(
|
||||||
NMPlatform *self,
|
NMPlatform *self,
|
||||||
int ifindex,
|
int ifindex,
|
||||||
@@ -2639,22 +2639,20 @@ gboolean nm_platform_ethtool_set_features(
|
|||||||
const NMOptionBool *requested /* indexed by NMEthtoolID - _NM_ETHTOOL_ID_FEATURE_FIRST */,
|
const NMOptionBool *requested /* indexed by NMEthtoolID - _NM_ETHTOOL_ID_FEATURE_FIRST */,
|
||||||
gboolean do_set /* or reset */);
|
gboolean do_set /* or reset */);
|
||||||
|
|
||||||
gboolean nm_platform_ethtool_get_link_coalesce(NMPlatform *self,
|
gboolean
|
||||||
int ifindex,
|
nm_platform_ethtool_get_coalesce(NMPlatform *self, int ifindex, NMEthtoolCoalesceState *coalesce);
|
||||||
NMEthtoolCoalesceState *coalesce);
|
|
||||||
|
|
||||||
gboolean nm_platform_ethtool_set_coalesce(NMPlatform *self,
|
gboolean nm_platform_ethtool_set_coalesce(NMPlatform *self,
|
||||||
int ifindex,
|
int ifindex,
|
||||||
const NMEthtoolCoalesceState *coalesce);
|
const NMEthtoolCoalesceState *coalesce);
|
||||||
|
|
||||||
gboolean nm_platform_ethtool_get_link_ring(NMPlatform *self, int ifindex, NMEthtoolRingState *ring);
|
gboolean nm_platform_ethtool_get_ring(NMPlatform *self, int ifindex, NMEthtoolRingState *ring);
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
nm_platform_ethtool_set_ring(NMPlatform *self, int ifindex, const NMEthtoolRingState *ring);
|
nm_platform_ethtool_set_ring(NMPlatform *self, int ifindex, const NMEthtoolRingState *ring);
|
||||||
|
|
||||||
gboolean nm_platform_ethtool_get_link_channels(NMPlatform *self,
|
gboolean
|
||||||
int ifindex,
|
nm_platform_ethtool_get_channels(NMPlatform *self, int ifindex, NMEthtoolChannelsState *channels);
|
||||||
NMEthtoolChannelsState *channels);
|
|
||||||
|
|
||||||
gboolean nm_platform_ethtool_set_channels(NMPlatform *self,
|
gboolean nm_platform_ethtool_set_channels(NMPlatform *self,
|
||||||
int ifindex,
|
int ifindex,
|
||||||
@@ -2664,10 +2662,9 @@ gboolean nm_platform_ethtool_get_fec_mode(NMPlatform *self, int ifindex, uint32_
|
|||||||
|
|
||||||
gboolean nm_platform_ethtool_set_fec_mode(NMPlatform *self, int ifindex, uint32_t fec_mode);
|
gboolean nm_platform_ethtool_set_fec_mode(NMPlatform *self, int ifindex, uint32_t fec_mode);
|
||||||
|
|
||||||
gboolean
|
gboolean nm_platform_ethtool_get_pause(NMPlatform *self, int ifindex, NMEthtoolPauseState *pause);
|
||||||
nm_platform_ethtool_get_link_pause(NMPlatform *self, int ifindex, NMEthtoolPauseState *pause);
|
|
||||||
|
|
||||||
gboolean nm_platform_ethtool_get_link_eee(NMPlatform *self, int ifindex, NMEthtoolEEEState *eee);
|
gboolean nm_platform_ethtool_get_eee(NMPlatform *self, int ifindex, NMEthtoolEEEState *eee);
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
nm_platform_ethtool_set_pause(NMPlatform *self, int ifindex, const NMEthtoolPauseState *pause);
|
nm_platform_ethtool_set_pause(NMPlatform *self, int ifindex, const NMEthtoolPauseState *pause);
|
||||||
|
Reference in New Issue
Block a user