@@ -63,12 +63,12 @@ static void ipvtap_count_rx_dropped(struct tap_dev *tap)
}
static void ipvtap_update_features(struct tap_dev *tap,
- netdev_features_t features)
+ const netdev_features_t *features)
{
struct ipvtap_dev *vlantap = container_of(tap, struct ipvtap_dev, tap);
struct ipvl_dev *vlan = &vlantap->vlan;
- vlan->sfeatures = features;
+ netdev_features_copy(vlan->sfeatures, *features);
netdev_update_features(vlan->dev);
}
@@ -67,12 +67,12 @@ static void macvtap_count_rx_dropped(struct tap_dev *tap)
}
static void macvtap_update_features(struct tap_dev *tap,
- netdev_features_t features)
+ const netdev_features_t *features)
{
struct macvtap_dev *vlantap = container_of(tap, struct macvtap_dev, tap);
struct macvlan_dev *vlan = &vlantap->vlan;
- vlan->set_features = features;
+ netdev_features_copy(vlan->set_features, *features);
netdev_update_features(vlan->dev);
}
@@ -985,7 +985,7 @@ static int set_offload(struct tap_queue *q, unsigned long arg)
*/
tap->tap_features = feature_mask;
if (tap->update_features)
- tap->update_features(tap, features);
+ tap->update_features(tap, &features);
return 0;
}
@@ -44,7 +44,8 @@ struct tap_dev {
netdev_features_t tap_features;
int minor;
- void (*update_features)(struct tap_dev *tap, netdev_features_t features);
+ void (*update_features)(struct tap_dev *tap,
+ const netdev_features_t *features);
void (*count_tx_dropped)(struct tap_dev *tap);
void (*count_rx_dropped)(struct tap_dev *tap);
};
The function tap_dev.update_features() using netdev_features_t as parameters. For the prototype of netdev_features_t will be extended to be larger than 8 bytes, so change the prototype of the function, change the prototype of input features to 'netdev_features_t *'. Signed-off-by: Jian Shen <shenjian15@huawei.com> --- drivers/net/ipvlan/ipvtap.c | 4 ++-- drivers/net/macvtap.c | 4 ++-- drivers/net/tap.c | 2 +- include/linux/if_tap.h | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-)