Lines Matching refs:gfeatures
582 _cleanup_free_ struct ethtool_gfeatures *gfeatures = NULL; in get_features() local
590 gfeatures = malloc0(offsetof(struct ethtool_gfeatures, features) + in get_features()
591 DIV_ROUND_UP(n_features, 32U) * sizeof(gfeatures->features[0])); in get_features()
592 if (!gfeatures) in get_features()
595 gfeatures->cmd = ETHTOOL_GFEATURES; in get_features()
596 gfeatures->size = DIV_ROUND_UP(n_features, 32U); in get_features()
599 .ifr_data = (void*) gfeatures, in get_features()
606 *ret = TAKE_PTR(gfeatures); in get_features()
612 const struct ethtool_gfeatures *gfeatures, in set_features_bit() argument
618 assert(gfeatures); in set_features_bit()
634 if (!FLAGS_SET(gfeatures->features[block].available, mask) || in set_features_bit()
635 FLAGS_SET(gfeatures->features[block].never_changed, mask)) in set_features_bit()
649 const struct ethtool_gfeatures *gfeatures, in set_features_multiple_bit() argument
658 assert(gfeatures); in set_features_multiple_bit()
674 if (!FLAGS_SET(gfeatures->features[block].available, mask) || in set_features_multiple_bit()
675 FLAGS_SET(gfeatures->features[block].never_changed, mask)) { in set_features_multiple_bit()
695 _cleanup_free_ struct ethtool_gfeatures *gfeatures = NULL; in ethtool_set_features() local
722 r = get_features(*ethtool_fd, ifname, strings->len, &gfeatures); in ethtool_set_features()
735 … r = set_features_bit(strings, gfeatures, sfeatures, netdev_feature_table[i], features[i]); in ethtool_set_features()
741 …r = set_features_multiple_bit(strings, gfeatures, sfeatures, netdev_feature_table[i], features[i]); in ethtool_set_features()