Lines Matching +full:data +full:- +full:active

1 // SPDX-License-Identifier: GPL-2.0-only
15 u32 active[ETHTOOL_DEV_FEATURE_WORDS]; member
40 struct features_reply_data *data = FEATURES_REPDATA(reply_base); in features_prepare_data() local
41 struct net_device *dev = reply_base->dev; in features_prepare_data()
44 ethnl_features_to_bitmap32(data->hw, dev->hw_features); in features_prepare_data()
45 ethnl_features_to_bitmap32(data->wanted, dev->wanted_features); in features_prepare_data()
46 ethnl_features_to_bitmap32(data->active, dev->features); in features_prepare_data()
47 ethnl_features_to_bitmap32(data->nochange, NETIF_F_NEVER_CHANGE); in features_prepare_data()
48 all_features = GENMASK_ULL(NETDEV_FEATURE_COUNT - 1, 0); in features_prepare_data()
49 ethnl_features_to_bitmap32(data->all, all_features); in features_prepare_data()
57 const struct features_reply_data *data = FEATURES_REPDATA(reply_base); in features_reply_size() local
58 bool compact = req_base->flags & ETHTOOL_FLAG_COMPACT_BITSETS; in features_reply_size()
62 ret = ethnl_bitset32_size(data->hw, data->all, NETDEV_FEATURE_COUNT, in features_reply_size()
67 ret = ethnl_bitset32_size(data->wanted, NULL, NETDEV_FEATURE_COUNT, in features_reply_size()
72 ret = ethnl_bitset32_size(data->active, NULL, NETDEV_FEATURE_COUNT, in features_reply_size()
77 ret = ethnl_bitset32_size(data->nochange, NULL, NETDEV_FEATURE_COUNT, in features_reply_size()
90 const struct features_reply_data *data = FEATURES_REPDATA(reply_base); in features_fill_reply() local
91 bool compact = req_base->flags & ETHTOOL_FLAG_COMPACT_BITSETS; in features_fill_reply()
94 ret = ethnl_put_bitset32(skb, ETHTOOL_A_FEATURES_HW, data->hw, in features_fill_reply()
95 data->all, NETDEV_FEATURE_COUNT, in features_fill_reply()
99 ret = ethnl_put_bitset32(skb, ETHTOOL_A_FEATURES_WANTED, data->wanted, in features_fill_reply()
104 ret = ethnl_put_bitset32(skb, ETHTOOL_A_FEATURES_ACTIVE, data->active, in features_fill_reply()
110 data->nochange, NULL, NETDEV_FEATURE_COUNT, in features_fill_reply()
152 ret &= ~(netdev_features_t)0 >> (nft_bits - NETDEV_FEATURE_COUNT); in ethnl_bitmap_to_features()
159 const unsigned long *active, in features_send_reply() argument
173 ret = ethnl_bitset_size(active, active_mask, NETDEV_FEATURE_COUNT, in features_send_reply()
179 ret = -ENOMEM; in features_send_reply()
191 ret = ethnl_put_bitset(rskb, ETHTOOL_A_FEATURES_ACTIVE, active, in features_send_reply()
221 struct nlattr **tb = info->attrs; in ethnl_set_features()
227 return -EINVAL; in ethnl_set_features()
230 genl_info_net(info), info->extack, in ethnl_set_features()
240 ethnl_features_to_bitmap(old_active, dev->features); in ethnl_set_features()
241 ethnl_features_to_bitmap(old_wanted, dev->wanted_features); in ethnl_set_features()
244 netdev_features_strings, info->extack); in ethnl_set_features()
248 GENL_SET_ERR_MSG(info, "attempt to change non-ethtool features"); in ethnl_set_features()
249 ret = -EINVAL; in ethnl_set_features()
258 dev->wanted_features &= ~dev->hw_features; in ethnl_set_features()
259 dev->wanted_features |= ethnl_bitmap_to_features(req_wanted) & dev->hw_features; in ethnl_set_features()
262 ethnl_features_to_bitmap(new_active, dev->features); in ethnl_set_features()